From 67ec6997698eda1b5107c71d073b95884d69f25a Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Tue, 9 Apr 2024 14:04:02 +0300 Subject: [PATCH] org-dblock-write:columnview: Fix when :id file:foo.org is not open * lisp/org-colview.el (org-dblock-write:columnview): Fix generating columnview when :id point to a file that is not yet open in Emacs. Just open it as needed. Reported-by: Vlastimil Vondra Link: https://orgmode.org/list/CACjq+cwjyi-d_jFY9oVe_kviMfLqm4t3+DVtr_Qk_kZaZt7ncA@mail.gmail.com --- lisp/org-colview.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-colview.el b/lisp/org-colview.el index d0be87fcc..5c19d08ef 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -1495,7 +1495,7 @@ PARAMS is a property list of parameters: (setq view-file filename) (setq view-pos position)) (_ (user-error "Cannot find entry with :ID: %s" id))) - (with-current-buffer (if view-file (get-file-buffer view-file) + (with-current-buffer (if view-file (org-get-agenda-file-buffer view-file) (current-buffer)) (org-with-wide-buffer (when view-pos (goto-char view-pos))