Re: [PATCH v2] Re: Improve the performance of `org-set-tags-command` on large `org-tag-alist`

2023-05-15 Thread Ihor Radchenko
"Christopher M. Miles"  writes:

>> I do not think that we need to care about the value of
>> `org-use-fast-tag-selection'.  Instead, just
>>
>> 1. If the total number of tags does not exceed
>>`org-fast-tag-selection-maximum-tags', display them all.
>> 2. If the total number of tags is larger, just display all the bound
>>tags + any extra tags, up to `org-fast-tag-selection-maximum-tags',
>>and add a note in the tag selection buffer that more tags are not
>>displayed.
>
> I think we should consider the option `org-use-fast-tag-selection'.
> Because it controls the behavior that whether auto assign short-key to
> tags. Make condition decision based on this option is needed. I hope you
> can reconsider this.

We probably have a misunderstanding about the role of
`org-use-fast-tag-selection'.

`org-use-fast-tag-selection' _currently_ determines whether to display
the tag selection window at all:

Non-nil means use fast tag selection scheme.

This is a special interface to select and deselect tags with single keys.
When nil, fast selection is never used.
When the symbol auto, fast selection is used if and only if selection
characters for tags have been configured, either through the variable
org-tag-alist or through a #+TAGS line in the buffer.
When t, fast selection is always used and selection keys are assigned
automatically if necessary.

Even when the value is t, not 'auto, the user bindings for tags are
honored. `org-fast-tag-selection' never checks the value of
`org-use-fast-tag-selection'.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [PATCH v2] Re: Improve the performance of `org-set-tags-command` on large `org-tag-alist`

2023-05-15 Thread Christopher M. Miles

Ihor Radchenko  writes:

> "Christopher M. Miles"  writes:
>
>>> You are almost there.
>>> Just run your code only when (lentgh> fulltable 26).
>>>
>>> Of course, 26 should be a defcustom rather than a hard-coded constant.
>>> And do the same for `org-fast-todo-selection'.
>>
>> Ok, I added defcustom option, and add cl-case condition on custom option
>> `org-use-fast-tag-selection'.
>
> I do not think that we need to care about the value of
> `org-use-fast-tag-selection'.  Instead, just
>
> 1. If the total number of tags does not exceed
>`org-fast-tag-selection-maximum-tags', display them all.
> 2. If the total number of tags is larger, just display all the bound
>tags + any extra tags, up to `org-fast-tag-selection-maximum-tags',
>and add a note in the tag selection buffer that more tags are not
>displayed.

I think we should consider the option `org-use-fast-tag-selection'.
Because it controls the behavior that whether auto assign short-key to
tags. Make condition decision based on this option is needed. I hope you
can reconsider this.

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


signature.asc
Description: PGP signature


Re: [PATCH v2] Re: Improve the performance of `org-set-tags-command` on large `org-tag-alist`

2023-05-15 Thread Ihor Radchenko
"Christopher M. Miles"  writes:

>> You are almost there.
>> Just run your code only when (lentgh> fulltable 26).
>>
>> Of course, 26 should be a defcustom rather than a hard-coded constant.
>> And do the same for `org-fast-todo-selection'.
>
> Ok, I added defcustom option, and add cl-case condition on custom option
> `org-use-fast-tag-selection'.

I do not think that we need to care about the value of
`org-use-fast-tag-selection'.  Instead, just

1. If the total number of tags does not exceed
   `org-fast-tag-selection-maximum-tags', display them all.
2. If the total number of tags is larger, just display all the bound
   tags + any extra tags, up to `org-fast-tag-selection-maximum-tags',
   and add a note in the tag selection buffer that more tags are not
   displayed.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at