From 87b952c7bf8f947997006651dd08818824e5ad85 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 11 Nov 2020 19:05:38 -0600 Subject: [PATCH] Fix: (org-ql-view--link-store) Don't store link to buffers --- org-ql-view.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org-ql-view.el b/org-ql-view.el index 8f1b50d..0bb873a 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -652,6 +652,10 @@ When opened, the link searches the buffer it's opened from." (require 'url-util) (when org-ql-view-query ;; Only Org QL View buffers should have `org-ql-view-query' set. + (when (or (bufferp org-ql-view-buffers-files) + (cl-some #'bufferp org-ql-view-buffers-files)) + ;; Buffers are unreadable, so they can't be linked to. + (user-error "Views that search buffers rather than files can't be linked to")) (cl-incf org-ql-view--link-store-counter) (cl-flet ((prompt-for (buffers-files) ;; HACK: Use counter to avoid prompting the first of the