[Top][All Lists]

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

Re: org-capture and fast selection of tags

From: Christian Heinrich
Subject: Re: org-capture and fast selection of tags
Date: Sat, 16 Jul 2022 17:03:00 +0200
User-agent: Evolution 3.44.2-1

Hi Ihor,

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.

Anyways, please find the patch attached. Feedback is welcome, particularly on 
naming the auxiliary
function (org-input-tags does not seem like a great name).

I didn't sign any papers yet, but as this is just a minor refactoring without 
new logic, I'm not
sure whether it would be required.


On Sat, 2022-07-16 at 17:12 +0800, Ihor Radchenko wrote:
> Christian Heinrich <com-orgmode-mailinglist@gladbachcity.de> writes:
> > I looked at the code and came up with a patch that works for me (see 
> > below). However, this may
> > change behavior for others:
> Thanks!
> > 1. The original %^g will work on non-headlines, but if 
> > (org-set-tags-command) is called as I do,
> > this is no longer possible and would need to be checked (what would be a 
> > good way here?)
> > 
> > 2. Can I really deduce from (org-use-fast-tag-selection) being non-nil that 
> > fast selection
> > should be
> > used in capture templates as well? Does it actually make sense to 
> > incorporate this into %^g/G?
> > 
> > I am neither a lisp programmer nor acquainted with the org codebase; this 
> > is a draft I came up
> > with. If you can provide me with further feedback, I'm willing to make this 
> > more stable.
> The idea is reasonable, but using org-set-tags-command is not ideal
> indeed. Instead, you can take the relevant part of org-set-tags-command
> (it is all but last line of the "t" cond clause) and put it into a
> separate auxiliary function. Then, you can simply call that function
> inside the org-set-tags-command and inside the capture template code.
> Best,
> Ihor

Attachment: org-capture-add-fast-tag-select-support.diff
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

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