> On 2022-09-03, at 10:14, Ihor Radchenko <yanta...@gmail.com> wrote:
>
> Marcel Lauhoff <m...@irq0.org> writes:
>
>> My TODO keywords:
>> ┌────
>> │ org-todo-keywords '((sequence "≣(p)" "|" "∎(f)")
>> │ (sequence "◇(t)" "★" "⌛(w)" "🔥(.)" "⚙(s)" "⎇(r)" "⏵(e)" "|"
>> "✔(d)" "✘(c)")
>> │ (sequence "⛱(m)" "|"))
>> │
>> └────
>> ...
>> The `(regexp-opt org-todo-keywords-1 'words)' excludes most of my TODO
>> keywords (but not all). Changing `'words' to `'symbols' give me my
>> desired result.
>
> Thanks for reporting!
> Fixed on main via a1c923afd.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a1c923afda22089cbf14c7b7a175cee10bfd297b
┌────
│ - " *\\(" (regexp-opt org-todo-keywords-1 'words) "\\)?"
│ + " *\\(" (regexp-opt org-todo-keywords-1 'words) " \\)?"
└────
That change doesn't seem to work for me, but maybe I'm holding it wrong or
missed a follow up commit.
The following snippet tries some regex variations matched to one of `("TODO"
"≣" "TODO " "≣ ")'. a1c923afd does seem to require a space after the keyword
now:
┌────
│ (let* ((kwds '("TODO" "DONE" "PROJECT" "≣" "∎" "◇" "★" "⌛" "🔥" "⚙" "⎇" "⏵"
"✔" "✘"))
│ (test-todos '("TODO" "≣" "TODO " "≣ "))
│ (regexes (list (concat "^ *\\(" (regexp-opt kwds 'words) "\\)?") ;;
orig
│ (concat "^ *\\(" (regexp-opt kwds 'words) " \\)?") ;;
a1c923afd
│ (concat "^ *\\(" (regexp-opt kwds 'symbols) "\\)?") ;;
symbols
│ (concat "^ *\\(" (regexp-opt kwds 'symbols) " \\)?"))))
;; symbols + space
│ (-map (lambda (regex)
│ (list regex
│ (-map (lambda (todo)
│ (s-match-strings-all regex todo))
│ test-todos)))
│ regexes))
└────
┌────
│ (("^ *\\(\\<\\(DONE\\|PROJECT\\|TODO\\|[∎≣⌛⎇⏵◇★⚙✔✘🔥]\\)\\>\\)?"
│ ((("TODO" "TODO" "TODO"))
│ ((""))
│ (("TODO" "TODO" "TODO"))
│ ((""))))
│ ("^ *\\(\\<\\(DONE\\|PROJECT\\|TODO\\|[∎≣⌛⎇⏵◇★⚙✔✘🔥]\\)\\> \\)?"
│ (((""))
│ ((""))
│ (("TODO " "TODO " "TODO"))
│ ((""))))
│ ("^ *\\(\\_<\\(DONE\\|PROJECT\\|TODO\\|[∎≣⌛⎇⏵◇★⚙✔✘🔥]\\)\\_>\\)?"
│ ((("TODO" "TODO" "TODO"))
│ (("≣" "≣" "≣"))
│ (("TODO" "TODO" "TODO"))
│ (("≣" "≣" "≣"))))
│ ("^ *\\(\\_<\\(DONE\\|PROJECT\\|TODO\\|[∎≣⌛⎇⏵◇★⚙✔✘🔥]\\)\\_> \\)?"
│ (((""))
│ ((""))
│ (("TODO " "TODO " "TODO"))
│ (("≣ " "≣ " "≣")))))
└────
~marcel