"Christopher M. Miles" writes: > [[PGP Signed Part:Undecided]] > > 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. > > Ok, I re-implemented the mechanism like bellowing, can you check whether it fits? > > #+begin_src emacs-lisp > (setq tbl (let ((bound-tags (seq-filter 'cdr fulltable))) > (if (length< fulltable org-fast-tag-selection-maximum-tags) > fulltable > (if (length< bound-tags org-fast-tag-selection-maximum-tags) > (progn > (seq-take (seq-uniq (append bound-tags fulltable)) > org-fast-tag-selection-maximum-tags) > (message "Tags are limited displayed by `org-fast-tag-selection-maximum-tags'.")) > bound-tags > (message "Tags are limited displayed only has key bound.")))) > char ?a cnt 0) > #+end_src Updated version which fix the `message` error in upper code: #+begin_src emacs-lisp (setq tbl (let ((bound-tags (seq-filter 'cdr fulltable))) (if (length< fulltable org-fast-tag-selection-maximum-tags) fulltable (if (length< bound-tags org-fast-tag-selection-maximum-tags) (progn (insert "Tags are limited displayed by `org-fast-tag-selection-maximum-tags'.\n") (seq-take (seq-uniq (append bound-tags fulltable)) org-fast-tag-selection-maximum-tags)) (insert "Tags are limited displayed only has key bound.\n") bound-tags))) char ?a cnt 0) #+end_src -- [ 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