summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-02-09 22:20:26 -0500
committerKyle Meyer <kyle@kyleam.com>2015-02-09 22:20:26 -0500
commitc9279118186fbcf1caa28baf12c7be8f922854e1 (patch)
tree73bda3dd7a7fc1724e2b2c99e61f768d8f2dfbcf
parent81e3fba86d8cb4fa7186afbda7ad59c4287cc6df (diff)
downloadbog-c9279118186fbcf1caa28baf12c7be8f922854e1.tar.gz
Activate Org mode after inserting file contents
Otherwise, setup file will not be loaded, which results in some citekey headings not being found if custom TODO words are used.
-rw-r--r--bog.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/bog.el b/bog.el
index 64f4335..877814e 100644
--- a/bog.el
+++ b/bog.el
@@ -339,8 +339,8 @@ word constituents."
(defun bog-heading-citekeys-in-file (file)
"Return all citekeys in headings of FILE."
(with-temp-buffer
- (org-mode)
(insert-file-contents file)
+ (org-mode)
(bog-heading-citekeys-in-buffer)))
(defun bog-heading-citekeys-in-buffer ()
@@ -356,8 +356,8 @@ word constituents."
(let (citekeys
case-fold-search)
(with-temp-buffer
- (org-mode)
(insert-file-contents file)
+ (org-mode)
(while (re-search-forward bog-citekey-format nil t)
(unless (or (org-at-heading-p)
(org-at-property-p))