emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH v4] Re: Improve the performance of `org-set-tags-command` on


From: Ihor Radchenko
Subject: Re: [PATCH v4] Re: Improve the performance of `org-set-tags-command` on large `org-tag-alist`
Date: Tue, 16 May 2023 18:53:21 +0000

"Christopher M. Miles" <numbchild@gmail.com> writes:

>>>                             (seq-take (seq-uniq (append bound-tags 
>>> fulltable))
>>>                                       org-fast-tag-selection-maximum-tags))
>>
>> This will behave awkwardly with tag groups. You may better use 
>> `org--tag-add-to-alist'.
>
> I think here should use `append' instead of `org--tag-add-to-alist' to merge.

Yeah. `org--tag-add-to-alist' does not tell it, but it actually prefers
keeping duplicate tag copies from its second argument.

Yet, however, tags with their binding assigned might occur inside a
group. Your code will incorrectly pull them out.

I think that the right approach to handle tag groups and explicitly
bound tags is showing them all the time, even when the total number of
tags exceeds the limit:

1. If a tag is bound explicitly (cdr non-nil) show it
2. If a tag is inside a group - show it
3. If there is still some room left, show up to the limit.

My logic is that tag groups and bound tags can only be customized by the
user. So, it makes sense to display them all the time - users likely
expect such behaviour.

WDYT?

-- 
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]