From 896fbc5c63665de3ff937db6e995c02888d080b9 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Wed, 16 Sep 2026 20:05:56 -0400 Subject: [PATCH] [emacs] Update reminders --- emacs/.config/doom/+org-reminders.el | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/emacs/.config/doom/+org-reminders.el b/emacs/.config/doom/+org-reminders.el index 58cea9a..39e33f6 100644 --- a/emacs/.config/doom/+org-reminders.el +++ b/emacs/.config/doom/+org-reminders.el @@ -114,6 +114,16 @@ The default interval is appended unless REM suppresses it." (setq found (match-string 0))) (and found (org-reminder-ts-to-seconds found))))) +(defun org-reminder-entry-anchor (subtree-end) + "Return epoch seconds of the reminder anchor for the entry at point. +Prefers the DEADLINE, then SCHEDULED, then the first inline active +timestamp in the body before SUBTREE-END." + (or (org-reminder-ts-to-seconds (org-entry-get nil "DEADLINE")) + (org-reminder-ts-to-seconds (org-entry-get nil "SCHEDULED")) + (progn + (org-end-of-meta-data t) + (org-reminder-first-inline-ts subtree-end)))) + (defun org-reminder-parse-file (file) "Parse FILE and return its list of reminder specs. Each spec is (ID HEADING FIRE-TIME LABEL SECONDS)." @@ -130,9 +140,7 @@ Each spec is (ID HEADING FIRE-TIME LABEL SECONDS)." (id (or (org-entry-get nil "ID") (format "%s|%s" file heading))) (rem (org-entry-get nil "REMINDER" t)) - (anchor (progn - (org-end-of-meta-data t) - (org-reminder-first-inline-ts subtree-end)))) + (anchor (org-reminder-entry-anchor subtree-end))) (when anchor (dolist (interval (org-reminder-task-intervals rem)) (push (list id heading