Skip to content

Commit f4d7399

Browse files
committedApr 7, 2020
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.
1 parent 81673fc commit f4d7399

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
 

‎org-ql-view.el

+8-8
Original file line numberDiff line numberDiff line change
@@ -841,14 +841,14 @@ current buffer. Otherwise BUFFERS-FILES is returned unchanged."
841841
list)))
842842
;; TODO: Test this more exhaustively.
843843
(pcase buffers-files
844-
((pred listp) (pcase (expand-files buffers-files)
845-
((or (pred (seq-set-equal-p (mapcar #'expand-file-name (org-agenda-files))))
846-
(pred (seq-set-equal-p (mapcar #'expand-file-name org-agenda-files))))
847-
"org-agenda-files")
848-
((pred (seq-set-equal-p (org-ql-search-directories-files)))
849-
"org-directory")
850-
(_ (let ((print-length nil))
851-
(concat "'" (prin1-to-string buffers-files))))))
844+
((pred listp)
845+
(pcase (expand-files buffers-files)
846+
((pred (seq-set-equal-p (mapcar #'expand-file-name (org-agenda-files))))
847+
"org-agenda-files")
848+
((pred (seq-set-equal-p (org-ql-search-directories-files)))
849+
"org-directory")
850+
(_ (let ((print-length nil))
851+
(concat "'" (prin1-to-string buffers-files))))))
852852
((pred (equal (current-buffer)))
853853
"buffer")
854854
((or 'org-agenda-files '(function org-agenda-files))

0 commit comments

Comments
 (0)