emacs-orgmode
[Top][All Lists]
Advanced

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

Re: org-capture and fast selection of tags


From: Ihor Radchenko
Subject: Re: org-capture and fast selection of tags
Date: Sun, 17 Jul 2022 18:14:36 +0800

Christian Heinrich <com-orgmode-mailinglist@gladbachcity.de> writes:

> thanks for your feedback. I attached a patch, but I'm not sure why you said 
> "all but the last line".
> That last line for me was (org-set-tags tags), which proved important as 
> otherwise the tags were not
> set in the buffer.

By "all but last line" I implied that the part that reads the tags
should be factored out. That part should not modify the tags in file,
just read the tags using the preferred interface and return the selected
tag list. This return value can be used in org-set-tags-command to be
passed to org-set-tags. For org-capture the return value can be used to
insert the tags in place of %^g (rather than putting the tags under
headline unconditionally).

Now, after examining the code of org-set-tags-command more closely, I
found out that org-fast-tag-selection is actually tricky to use as I
described above. org-fast-tag-selection itself is changing the headline
tags even before the user finishes the selection process. So, an
appropriate patch would also need to alter org-fast-tag-selection in
such a way that it could be called without side effects (changing buffer
text) - it can be done by providing a new optional argument to
org-fast-tag-selection.

Best,
Ihor



reply via email to

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