1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-21 06:55:35 +00:00

org-agenda-to-appt: Do not hard-code not-done todo keywords

* lisp/org-agenda.el (org-agenda-to-appt): Use org-todo-regexp and
org-not-done-regexp to determine whether an even is already done.

Reported-by: Raffael Stocker <r.stocker@mnet-mail.de>
Link: https://orgmode.org/list/yplmsf4ac6va.fsf@mnet-mail.de
This commit is contained in:
Ihor Radchenko 2023-12-11 15:17:41 +01:00
parent 420ed4e033
commit 7505055f58
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B

View File

@ -11141,10 +11141,16 @@ to override `appt-message-warning-time'."
(string-match cat-filter cat))
(and (stringp evt-filter)
(string-match evt-filter evt)))))))
(wrn (get-text-property 1 'warntime x)))
(wrn (get-text-property 1 'warntime x))
(todo-regexp (get-text-property 1 'org-todo-regexp x))
(not-done-regexp (get-text-property 1 'org-not-done-regexp x)))
;; FIXME: Shall we remove text-properties for the appt text?
;; (setq evt (set-text-properties 0 (length evt) nil evt))
(when (and ok tod (not (string-match "\\`DONE\\|CANCELLED" evt)))
(when (and ok tod
;; Exclude done items unconditionally.
(or (not (and todo-regexp (string-match-p todo-regexp evt))) ; no todo keyword
(and not-done-regexp (string-match-p not-done-regexp evt)) ; or not done
))
(setq tod (concat "00" (number-to-string tod)))
(setq tod (when (string-match
"\\([0-9]\\{1,2\\}\\)\\([0-9]\\{2\\}\\)\\'" tod)