Fix: (org-ql-view--contract-buffers-files) Single file/buffer
This fixes the bug for now, but it needs to be tested more carefully. And now the view dispatcher has a minor bug when changing the list of buffers-files sometimes that requires pressing it more than once to get the prompt; not sure if related to this.
This commit is contained in:
parent
132173b36e
commit
20f3ce747c
1 changed files with 11 additions and 7 deletions
|
|
@ -827,16 +827,20 @@ current buffer. Otherwise BUFFERS-FILES is returned unchanged."
|
|||
(string (expand-file-name it))
|
||||
(otherwise it))
|
||||
list)))
|
||||
(pcase (expand-files buffers-files)
|
||||
;; 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 (equal (current-buffer)))
|
||||
"buffer")
|
||||
(_ (let ((print-length nil))
|
||||
(concat "'" (prin1-to-string buffers-files)))))))
|
||||
(prin1-to-string buffers-files))))))
|
||||
|
||||
(defun org-ql-view--complete-buffers-files ()
|
||||
"Return value for `org-ql-view-buffers-files' using completion."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue