ENH get todo state more efficiently

This commit is contained in:
Nathan Dwarshuis 2021-04-06 23:22:51 -04:00
parent b2c295f0fd
commit 8907ab75f6
1 changed files with 1 additions and 3 deletions

View File

@ -204,9 +204,7 @@ compared to REF-TIME. Returns nil if no timestamp is found."
(defun org-x-is-todoitem-p ()
"Return todo keyword if heading has one."
(let ((keyword (nth 2 (org-heading-components))))
(if (member keyword org-todo-keywords-1)
keyword)))
(-some-> (org-get-todo-state) (substring-no-properties)))
(defun org-x-is-project-p ()
"Return todo keyword if heading has todoitem children."