diff --git a/emacs/org/org-agenda.el b/emacs/org/org-agenda.el index 631c6d0..a826b26 100644 --- a/emacs/org/org-agenda.el +++ b/emacs/org/org-agenda.el @@ -5425,6 +5425,14 @@ the documentation of `org-diary'." (org-end-of-subtree 'invisible)))) (nreverse ee))) +(defun org-agenda-get-warntime () + "Return warn time number when the property exists." + (save-excursion + (org-back-to-heading t) + (let ((warntime (get-text-property (point) 'org-appt-warntime))) + (when warntime + (string-to-number warntime))))) + (defun org-agenda-todo-custom-ignore-p (time n) "Check whether timestamp is farther away than n number of days. This function is invoked if `org-agenda-todo-ignore-deadlines', @@ -5570,7 +5578,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', clockp (and org-agenda-include-inactive-timestamps (or (string-match org-clock-string tmp) (string-match "]-+\\'" tmp))) - warntime (get-text-property (point) 'org-appt-warntime) + warntime (org-agenda-get-warntime) donep (member todo-state org-done-keywords)) (if (or scheduledp deadlinep closedp clockp (and donep org-agenda-skip-timestamp-if-done)) @@ -5659,7 +5667,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', (memq 'agenda org-agenda-use-tag-inheritance)))) tags (org-get-tags-at nil (not inherited-tags)) todo-state (org-get-todo-state) - warntime (get-text-property (point) 'org-appt-warntime) + warntime (org-agenda-get-warntime) extra nil) (dolist (r (if (stringp result) @@ -6059,7 +6067,7 @@ specification like [h]h:mm." (not (= diff 0)))) (setq txt nil) (setq category (org-get-category) - warntime (get-text-property (point) 'org-appt-warntime) + warntime (org-agenda-get-warntime) category-pos (get-text-property (point) 'org-category-position)) (if (not (re-search-backward "^\\*+[ \t]+" nil t)) (throw :skip nil)