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: Sławomir Grochowski
Subject: Re: [FR] org-colview.el, add annotation for functions summary-types
Date: Thu, 15 Aug 2024 19:29:15 +0200

Ihor Radchenko <yantar92@posteo.net> writes:

> Why not applying faces?

Because in case of 'annotation-function':
https://www.gnu.org/software/emacs/manual/html_node/elisp/Programmed-Completion.html
"...Unless this function puts own face on the annotation suffix string, 
the completions-annotations face is added by default to that string.

>> (completing-read
>>  "Summary: "
>>  (lambda (s pred flag)
>>    (pcase flag
>>      ('t (all-completions s
>>                             (mapcar #'car org-columns-summary-types-default)
>>                             pred))
>>      ('metadata (list 'metadata
>>                       (cons 'annotation-function
>>                             (lambda (c)
>>                               (first-line-docstring
>>                                (cdr (assoc c 
>> org-columns-summary-types-default))))))))))
>
> Looks reasonable.
> Although, I'd prefer to avoid lambda here and simply make it into a
> proper function. Just like `org-tags-completion-function'.

And this will be private function in colview.el?
With name... `org-columns--completion-summary-types-function' ? 

-- 
Slawomir Grochowski



reply via email to

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