Remove APPT_WARNTIME text property cache

* lisp/org.el (org-agenda-ignore-properties):
(org-agenda-prepare-buffers): Remove APPT_WARNTIME cache.
* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-sexps):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled): Use `org-entry-get' to retrieve
APPT_WARNTIME.
This commit is contained in:
Ihor Radchenko 2023-05-08 16:24:22 +02:00
parent 5898fcf269
commit 598d7bbcf2
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
2 changed files with 9 additions and 13 deletions

View File

@ -5849,7 +5849,7 @@ displayed in agenda view."
(looking-at org-ts-regexp-both)
(match-string 0))))
(todo-state (org-get-todo-state))
(warntime (get-text-property (point) 'org-appt-warntime))
(warntime (org-entry-get (point) "APPT_WARNTIME" 'selective))
(done? (member todo-state org-done-keywords)))
;; Possibly skip done tasks.
(when (and done? org-agenda-skip-timestamp-if-done)
@ -5995,7 +5995,7 @@ displayed in agenda view."
(memq 'agenda org-agenda-use-tag-inheritance))))
tags (org-get-tags nil (not inherited-tags))
todo-state (org-get-todo-state)
warntime (get-text-property (point) 'org-appt-warntime)
warntime (org-entry-get (point) "APPT_WARNTIME" 'selective)
extra nil)
(setq effort-minutes (when effort (save-match-data (org-duration-to-minutes effort))))
@ -6010,10 +6010,10 @@ displayed in agenda view."
(setq txt r)
(setq txt "SEXP entry returned empty string"))
(setq txt (org-agenda-format-item extra
(org-add-props txt nil
'effort effort
'effort-minutes effort-minutes)
level category tags 'time))
(org-add-props txt nil
'effort effort
'effort-minutes effort-minutes)
level category tags 'time))
(org-add-props txt props 'org-marker marker
'date date 'todo-state todo-state
'effort effort 'effort-minutes effort-minutes
@ -6470,7 +6470,7 @@ specification like [h]h:mm."
(face (org-agenda-deadline-face
(- 1 (/ (float diff) (max wdays 1)))))
(upcoming? (and today? (> deadline today)))
(warntime (get-text-property (point) 'org-appt-warntime)))
(warntime (org-entry-get (point) "APPT_WARNTIME" 'selective)))
(org-add-props item props
'org-marker (org-agenda-new-marker pos)
'org-hd-marker (org-agenda-new-marker (line-beginning-position))
@ -6587,7 +6587,7 @@ scheduled items with an hour specification like [h]h:mm."
(org-agenda--timestamp-to-absolute
s base 'future (current-buffer) pos)))))
(diff (- current schedule))
(warntime (get-text-property (point) 'org-appt-warntime))
(warntime (org-entry-get (point) "APPT_WARNTIME" 'selective))
(pastschedp (< schedule today))
(futureschedp (> schedule today))
(habitp (and (fboundp 'org-is-habit-p)

View File

@ -15102,10 +15102,8 @@ Properties are used to prepare buffers for effort estimates,
appointments, statistics and subtree-local categories.
If you don't use these in the agenda, you can add them to this
list and agenda building will be a bit faster.
The value is a list, with zero or more of the symbols `appt' or
`stats'."
The value is a list, with symbol `stats'."
:type '(set :greedy t
(const appt)
(const stats))
:version "26.1"
:package-version '(Org . "8.3")
@ -15393,8 +15391,6 @@ When a buffer is unmodified, it is just killed. When modified, it is saved
(org-set-regexps-and-options 'tags-only)
(or (memq 'stats org-agenda-ignore-properties)
(org-refresh-stats-properties))
(or (memq 'appt org-agenda-ignore-properties)
(org-refresh-properties "APPT_WARNTIME" 'org-appt-warntime))
(dolist (el org-todo-keywords-1)
(unless (member el org-todo-keywords-for-agenda)
(push el org-todo-keywords-for-agenda)))