diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-10-31 11:56:01 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-11-01 01:23:00 -0400 |
commit | a513bac4fb7c77a001c37c55d7e1464b95d3600a (patch) | |
tree | 10d72f20d91c9841ec04a01fdd0b440a3af91f8e | |
parent | e7b8dd96e103cf4c9f818b8d46e946cf9af2ab4a (diff) | |
download | bog-a513bac4fb7c77a001c37c55d7e1464b95d3600a.tar.gz |
Use org-before-first-heading-p
-rw-r--r-- | bog.el | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |