From eb41c5fa2dfe235d4a3b553acd67868ee77e7ccf Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 24 Nov 2014 02:18:31 -0500 Subject: Don't believe org-up-heading-safe (yet) In Org mode 8.2.10 (built-in version with Emacs 24.4), this function will still throw an error if it is before the first heading. This was fixed in Org mode commit 9ba9f916e87297d863c197cb87199adbb39da894. --- bog.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bog.el') diff --git a/bog.el b/bog.el index 5c10709..240e570 100644 --- a/bog.el +++ b/bog.el @@ -262,7 +262,10 @@ be preceded by a characters in `bog-allowed-before-citekey'." (org-with-wide-buffer (let (maybe-citekey) (while (and (not (setq maybe-citekey (bog-citekey-from-heading))) - (org-up-heading-safe))) + ;; This isn't actually safe in Org mode <= 8.2.10. + ;; Fixed in Org mode commit + ;; 9ba9f916e87297d863c197cb87199adbb39da894. + (ignore-errors (org-up-heading-safe)))) maybe-citekey))) (defun bog-citekey-from-heading () -- cgit v1.2.3