From a8dbac57df587a32141d8903bfa9a90a178295ba Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 5 Sep 2015 02:56:56 -0400 Subject: bog-goto-citekey-heading-in-notes: Cosmetics --- bog.el | 17 ++++++++--------- 1 file 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. -- cgit v1.2.3