1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2025-01-05 11:45:52 +00:00

org-agenda-get-progress: Fix detecting time when todo keyword contains ]

* lisp/org-agenda.el (org-agenda-get-progress): Improve accuracy
matching time inside state note.

The old code failed to match time in
- State "[X]"        from "[ ]"        [2022-10-25 Tue 10:00]

Link: https://old.reddit.com/r/orgmode/comments/ycshlg/orgagendalogmode_does_not_display_time_for/
This commit is contained in:
Ihor Radchenko 2024-01-10 16:04:31 +01:00
parent f9702a09e7
commit d0a917ab23
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B

View File

@ -6124,7 +6124,7 @@ then those holidays will be skipped."
effort (save-match-data (or (get-text-property (point) 'effort)
(org-entry-get (point) org-effort-property))))
(setq effort-minutes (when effort (save-match-data (org-duration-to-minutes effort))))
(when (string-match "\\]" timestr)
(when (string-match org-ts-regexp-inactive timestr)
;; substring should only run to end of time stamp
(setq rest (substring timestr (match-end 0))
timestr (substring timestr 0 (match-end 0)))