diff options
-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. |