From e30ab3f2604232cc3247186f57c295b5fa89f7f9 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Tue, 15 Aug 2023 18:11:47 +0200 Subject: [PATCH] Ensure inserting links works when the source buffer is narrowed --- site-lisp/db-org.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index 1c0f20f..81e9307 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -1501,8 +1501,9 @@ linking to any item." ;; the target file (save-mark-and-excursion (with-current-buffer (find-file-noselect (nth 1 target-pointer)) - (goto-char pom) - (point-marker)))) + (org-with-wide-buffer + (goto-char pom) + (point-marker))))) (t (user-error "Invalid location")))))) (defun db/org-find-links-to-current-item (arg)