emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Bug: Unicode ORG-TODO-KEYWORDS not recognized in agenda's stuck proj


From: Andy Drop
Subject: Re: Bug: Unicode ORG-TODO-KEYWORDS not recognized in agenda's stuck projects [9.3.6 (9.3.6-4-gdfa7a3-elpa @ /home/andy/.config/emacs/elpa/org-20200217/)]
Date: Wed, 23 Sep 2020 15:02:37 +0200

Bastien writes:

> Hi Andreas,
>
> I don't see what can go wrong with unicode symbols for TODO keywords
> when listing stuck projects.
>
> ... find `org-agenda-list-stuck-projects' ...
>
> Go at the end of the function and instrument it with C-u C-M-x then
> list stuck projects and see where the function chokes?

I just had the time to give it a deeper look. I can reproduce it with a
clean install of org 9.4, and I think I found the problematic code

file org-agenda.el:

(defun org-agenda-list-stuck-projects (&rest ignore)

.
.
.

(todo-re (and todo
       (format "^\\*+[ \t]+\\(%s\\)\\>"
              (mapconcat #'identity todo-wds "\\|"))))

.
.
.

I'm no elisp expert, but it looks to me, as if it builds a list of
regular expressions for every todo keyword in org-stuck-projects (todo-re) and 
it simply puts
the keyword in place of the %s
Each regex is then matched with every line that qualifies as a project
(found by the tags-re)

That works for normal keywords
"^\\*+[ \t]+\\(NEXT\\)\\"
matches with
** NEXT Task 1

BUT
"^\\*+[ \t]+\\(▶\\)\\"
DOES NOT match with
** ▶ Task 1

now my elisp knowledge is completely gone, but as I understood the
documentation for regex in elisp, unicode symbols have to be written
something like '\u1234' (out of my head) to work in a regex.


A minimal test.org:
* Project                                                           :project:
** ▶ Task 1
** ⸰ Task 2

A minimal init.el:
(setq org-todo-keywords '((sequence "⸰(t)" "▶(n)" "⏸(w)" "|" "✔(d)" "❌(c)" 
"⏩(r)")))      
(setq org-stuck-projects '("project" ("NEXT" "▶") nil ""))
(setq org-agenda-files '("~/org/test.org"))
(setq org-tags-exclude-from-inheritance '("project"))


With this config the Project is marked as stuck even when it contains a
▶ keyword, when you change that to NEXT (which is not even a
valid todo-keyword here) it becomes unstuck.

Hope this helps
Andy





   
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]