diff options
author | Kyle Meyer <kyle@kyleam.com> | 2016-03-06 01:27:51 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2016-03-06 01:27:51 -0500 |
commit | 74d9010541a6acf14c07b10957f3b907dd3210e3 (patch) | |
tree | d9065e03f60e4a903a1d1fb405030a9d1fc09893 | |
parent | 2b6c49882e8724b9a2e365311e9812785386932d (diff) | |
download | bog-74d9010541a6acf14c07b10957f3b907dd3210e3.tar.gz |
bog-citekey-tree-to-indirect-buffer: Use base-buffer
org-tree-to-indirect-buffer fails if it is called from the indirect
buffer create by the previous org-tree-to-indirect-buffer call. Using
the base-buffer to find the citekey heading avoids this error.
Even if the error is fixed on Org's side, this change has the advantage
of preventing the name from appending the indirect buffer name rather
than the original note buffer's names.
-rw-r--r-- | bog.el | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |