diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-09-05 02:59:32 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-09-05 03:03:04 -0400 |
commit | 591803d1c30c9cadd027dccd2504c0b4c019d285 (patch) | |
tree | 4531b4f8a4a054d8cf36cdf2e4deec18bf71bf4a /bog.el | |
parent | a8dbac57df587a32141d8903bfa9a90a178295ba (diff) | |
download | bog-591803d1c30c9cadd027dccd2504c0b4c019d285.tar.gz |
goto-citekey-heading: Prefer current indirect buffer
When in an indirect buffer for a file in bog-notes, jump to the heading
in the indirect buffer instead of the base buffer.
Diffstat (limited to 'bog.el')
-rw-r--r-- | bog.el | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -968,14 +968,11 @@ is non-nil, return the position instead of a marker." CITEKEY can either be the heading title or the property value of the key `bog-citekey-property'. When in a note file, search for headings there first." - (let* ((base-buf (buffer-base-buffer)) - (buf (or base-buf (current-buffer))) - (buf-file (buffer-file-name buf))) - (or (and (member buf-file (bog-notes)) - (with-current-buffer buf - (bog--find-citekey-heading-in-buffer citekey))) - (org-find-exact-heading-in-directory citekey bog-note-directory) - (bog--find-citekey-property-in-notes citekey)))) + (or (and (member (buffer-file-name (buffer-base-buffer)) + (bog-notes)) + (bog--find-citekey-heading-in-buffer citekey)) + (org-find-exact-heading-in-directory citekey bog-note-directory) + (bog--find-citekey-property-in-notes citekey))) (defun bog--find-citekey-property-in-notes (citekey) "Return marker within notes for heading with CITEKEY as a property value. |