diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-09-05 02:56:56 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-09-05 03:03:04 -0400 |
commit | a8dbac57df587a32141d8903bfa9a90a178295ba (patch) | |
tree | a15b141deed8c4f973e15d721f2d46b8ca099af1 /bog.el | |
parent | a0c6f836d44d9813115f9add97b335e98558dffa (diff) | |
download | bog-a8dbac57df587a32141d8903bfa9a90a178295ba.tar.gz |
bog-goto-citekey-heading-in-notes: Cosmetics
Diffstat (limited to 'bog.el')
-rw-r--r-- | bog.el | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -924,15 +924,14 @@ buffer, the narrowing is removed." (bog-citekey-from-point-or-buffer-headings no-context) (bog-citekey-from-point-or-all-headings no-context))) (marker (bog--find-citekey-heading-in-notes citekey))) - (if marker - (progn - (pop-to-buffer (marker-buffer marker)) - (when (or (< marker (point-min)) - (> marker (point-max))) - (widen)) - (goto-char marker) - (org-show-context)) - (message "Heading for %s not found in notes" citekey)))) + (if (not marker) + (message "Heading for %s not found in notes" citekey) + (pop-to-buffer (marker-buffer marker)) + (when (or (< marker (point-min)) + (> marker (point-max))) + (widen)) + (goto-char marker) + (org-show-context)))) (defun bog--find-citekey-heading-in-buffer (citekey &optional pos-only) "Return the marker of heading for CITEKEY. |