From c9279118186fbcf1caa28baf12c7be8f922854e1 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 9 Feb 2015 22:20:26 -0500 Subject: 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. --- bog.el | 4 ++-- 1 file 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)) -- cgit v1.2.3