From f4d7399e677904cdc7e220440610704e4bd668bc Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 7 Apr 2020 12:06:57 -0500 Subject: [PATCH] Fix: (org-ql-view--contract-buffers-files) Only compare to function If the org-agenda-files variable points to a file pointing to a list of agenda files, it shouldn't be compared to. We should only compare to the value returned by the org-agenda-files function. Fixes #104. Thanks to @gdindi for reporting. --- org-ql-view.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/org-ql-view.el b/org-ql-view.el index d6cd536..7739ea7 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -841,14 +841,14 @@ current buffer. Otherwise BUFFERS-FILES is returned unchanged." list))) ;; TODO: Test this more exhaustively. (pcase buffers-files - ((pred listp) (pcase (expand-files buffers-files) - ((or (pred (seq-set-equal-p (mapcar #'expand-file-name (org-agenda-files)))) - (pred (seq-set-equal-p (mapcar #'expand-file-name org-agenda-files)))) - "org-agenda-files") - ((pred (seq-set-equal-p (org-ql-search-directories-files))) - "org-directory") - (_ (let ((print-length nil)) - (concat "'" (prin1-to-string buffers-files)))))) + ((pred listp) + (pcase (expand-files buffers-files) + ((pred (seq-set-equal-p (mapcar #'expand-file-name (org-agenda-files)))) + "org-agenda-files") + ((pred (seq-set-equal-p (org-ql-search-directories-files))) + "org-directory") + (_ (let ((print-length nil)) + (concat "'" (prin1-to-string buffers-files)))))) ((pred (equal (current-buffer))) "buffer") ((or 'org-agenda-files '(function org-agenda-files))