about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ennum.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/ennum.el b/ennum.el
index b7548ea..a271fa6 100644
--- a/ennum.el
+++ b/ennum.el
@@ -369,6 +369,9 @@ respectively by - and _, and the pad character = is optional."
 
 (defmemoize ennum--read-post (filename _last-modified)
   (ennum-with-file-contents filename
+    ;; org-element-at-point produces warnings when used in a non-org
+    ;; buffer. So, activate org mode.
+    (org-mode)
     (let ((metadata (org-export-get-environment 'ennum-html))
           (export (apply-partially 'org-export-with-backend 'ennum-html)))
       (dolist (key (ennum-setting :required-metadata))