summaryrefslogtreecommitdiff
path: root/bog.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-09-05 02:56:56 -0400
committerKyle Meyer <kyle@kyleam.com>2015-09-05 03:03:04 -0400
commita8dbac57df587a32141d8903bfa9a90a178295ba (patch)
treea15b141deed8c4f973e15d721f2d46b8ca099af1 /bog.el
parenta0c6f836d44d9813115f9add97b335e98558dffa (diff)
downloadbog-a8dbac57df587a32141d8903bfa9a90a178295ba.tar.gz
bog-goto-citekey-heading-in-notes: Cosmetics
Diffstat (limited to 'bog.el')
-rw-r--r--bog.el17
1 files changed, 8 insertions, 9 deletions
diff --git a/bog.el b/bog.el
index 201457a..c9af66a 100644
--- a/bog.el
+++ b/bog.el
@@ -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.