From 78fd672cc7c474bc99b40bdee37ca6b8c75546d3 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 11 Nov 2020 00:21:19 -0600 Subject: [PATCH] Fix: (org-ql-view--format-element) Get tags from marker buffer Fixes bug introduced in 359a280d11d54c940125f11d7be6a93f8c0c1095. Fixes #150. Thanks to @tpeacock19 for reporting. --- org-ql-view.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/org-ql-view.el b/org-ql-view.el index 8875499..cd6ccbb 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -837,10 +837,12 @@ return an empty string." ;; MAYBE: Use our own variable instead of `org-use-tag-inheritance'. (if-let ((marker (or (org-element-property :org-hd-marker element) (org-element-property :org-marker element)))) - (cl-loop for type in (org-ql--tags-at marker) - unless (or (eq 'org-ql-nil type) - (not type)) - append type) + (with-current-buffer (marker-buffer marker) + (org-with-wide-buffer + (cl-loop for type in (org-ql--tags-at marker) + unless (or (eq 'org-ql-nil type) + (not type)) + append type))) ;; No marker found ;; TODO: Use `display-warning' with `org-ql' as the type. (warn "No marker found for item: %s" title)