From 04e8f42452c9f7fd5a9c9f76b34f51c7cb78673a Mon Sep 17 00:00:00 2001 From: Josh Moller-Mara Date: Sun, 22 Dec 2019 05:35:14 +0800 Subject: [PATCH] Fix org-ql--value-at returning org-ql-nil during cache miss "org-ql--value-at" improperly returned "org-ql-nil" when "fn" returns nil during a cache miss. All following calls to "org-ql--value-at", however, would properly return "nil". --- org-ql.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org-ql.el b/org-ql.el index 1f39d3f..b253fee 100644 --- a/org-ql.el +++ b/org-ql.el @@ -477,7 +477,9 @@ Values compared with `equal'." org-ql-node-value-cache)) (map-put value-cache fn new-value) (puthash position value-cache position-cache) - new-value))) + (pcase new-value + ('org-ql-nil nil) + (_ new-value))))) (defun org-ql--add-markers (element) "Return ELEMENT with Org marker text properties added.