Ihor Radchenko writes: > stardiviner writes: > >> I have a large `org-tag-alist` value that contains about ~7000 tags. >> When I press [C-c C-q] `org-set-tags-command`. Emacs suspends a long time. > > Indeed. That's because `org-fast-tag-selection' tries to put all those > 7k tags into tag selection window. > > We can probably limit the maximum number of tags in the quick selection > window. > > Can you try the attached simple diff for `org-fast-tag-selection' and > check if it is enough to solve the hang? > > diff --git a/lisp/org.el b/lisp/org.el > index c148409d9..d745fd01e 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -11765,7 +11765,7 @@ (defun org-fast-tag-selection (current inherited table &optional todo-table) > (org-fast-tag-insert "Current" current c-face "\n\n") > (org-fast-tag-show-exit exit-after-next) > (org-set-current-tags-overlay current ov-prefix) > - (setq tbl fulltable char ?a cnt 0) > + (setq tbl (seq-take fulltable 26) char ?a cnt 0) > (while (setq e (pop tbl)) > (cond > ((eq (car e) :startgroup) I applied your diff with a testing. This indeed solved the performance issue. Will this be updated in Org-mode source code? -- [ 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