summaryrefslogtreecommitdiff
path: root/bog.el
diff options
context:
space:
mode:
Diffstat (limited to 'bog.el')
-rw-r--r--bog.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/bog.el b/bog.el
index 1b87e84..cd1d26c 100644
--- a/bog.el
+++ b/bog.el
@@ -280,9 +280,9 @@ be preceded by a characters in `bog-allowed-before-citekey'."
(bog-citekey-from-property)))
(defun bog-citekey-from-heading-title ()
- (--if-let (ignore-errors (org-no-properties (org-get-heading t t)))
- (when (bog-citekey-p it)
- it)))
+ (unless (org-before-first-heading-p)
+ (let ((heading (org-no-properties (org-get-heading t t))))
+ (when (bog-citekey-p heading) heading))))
(defun bog-citekey-from-property ()
(--when-let (org-entry-get (point) bog-citekey-property)