forked from mirrors/org-mode
org-diary-sexp-entry: Re-use cached nil return values
* lisp/org.el (org-diary-sexp-entry): Do not consider cached nil return values as if they are not cached.
This commit is contained in:
parent
9dde82411a
commit
d240386c10
|
@ -14433,7 +14433,8 @@ D may be an absolute day number, or a calendar-type list (month day year)."
|
||||||
(require 'diary-lib)
|
(require 'diary-lib)
|
||||||
;; `org-anniversary' and alike expect ENTRY and DATE to be bound
|
;; `org-anniversary' and alike expect ENTRY and DATE to be bound
|
||||||
;; dynamically.
|
;; dynamically.
|
||||||
(or (gethash (list sexp entry d) org--diary-sexp-entry-cache)
|
(let ((cached (gethash (list sexp entry d) org--diary-sexp-entry-cache 'none)))
|
||||||
|
(if (not (eq 'none cached)) cached
|
||||||
(puthash (list sexp entry d)
|
(puthash (list sexp entry d)
|
||||||
(let* ((sexp `(let ((entry ,entry)
|
(let* ((sexp `(let ((entry ,entry)
|
||||||
(date ',d))
|
(date ',d))
|
||||||
|
@ -14458,7 +14459,7 @@ D may be an absolute day number, or a calendar-type list (month day year)."
|
||||||
(stringp (car result)))
|
(stringp (car result)))
|
||||||
result)
|
result)
|
||||||
(result entry)))
|
(result entry)))
|
||||||
org--diary-sexp-entry-cache)))
|
org--diary-sexp-entry-cache))))
|
||||||
|
|
||||||
(defun org-diary-to-ical-string (frombuf)
|
(defun org-diary-to-ical-string (frombuf)
|
||||||
"Get iCalendar entries from diary entries in buffer FROMBUF.
|
"Get iCalendar entries from diary entries in buffer FROMBUF.
|
||||||
|
|
Loading…
Reference in New Issue