emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [FR] org-colview.el, add annotation for functions summary-types


From: Ihor Radchenko
Subject: Re: [FR] org-colview.el, add annotation for functions summary-types
Date: Sun, 18 Aug 2024 09:56:42 +0000

Sławomir Grochowski <slawomir.grochowski@gmail.com> writes:

> So I have those 3 code snipets: 
>
> (defun org-columns--summary-types-completion-function (string)
>   (docstring-first-line
>    (cdr (assoc string (append
>                      org-columns-summary-types
>                      org-columns-summary-types-default)))))
>
> (completing-read
>  "Summary: "
>  (lambda (string pred flag)
> ....

This lambda is the completion function.
It is what should go into
`org-columns--summary-types-completion-function'.

> But I have no idea where to put this piece:
>
>  (if doc
>         (format " -- %s" doc)
>       "")
>
> It should not be in docstring-first-line. 
> What do you think? 

Into `org-columns--summary-types-completion-function'.
Or, if you want, you can create a separate "affixation function" that
will format the suffix and call it from
`org-columns--summary-types-completion-function'.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]