summaryrefslogtreecommitdiff
path: root/bog.el
diff options
context:
space:
mode:
Diffstat (limited to 'bog.el')
-rw-r--r--bog.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/bog.el b/bog.el
index d0aa2b7..4d22361 100644
--- a/bog.el
+++ b/bog.el
@@ -1091,7 +1091,9 @@ If the citekey prompt is slow to appear, consider enabling the
(interactive "P")
(let* ((orig-buf (current-buffer))
(citekey (bog-citekey-from-point-or-all-headings no-context))
- (marker (bog--find-citekey-heading-in-notes citekey)))
+ (marker (with-current-buffer (or (buffer-base-buffer)
+ (current-buffer))
+ (bog--find-citekey-heading-in-notes citekey))))
(if marker
(with-current-buffer (marker-buffer marker)
(org-with-wide-buffer