Browse Source

org-mime: change `org-mime-org-export' to more closely mimic `org-run-like-in-org-mode'

Eric Schulte 10 years ago
parent
commit
b617a457ae
1 changed files with 4 additions and 1 deletions
  1. 4 1
      contrib/lisp/org-mime.el

+ 4 - 1
contrib/lisp/org-mime.el

@@ -188,9 +188,12 @@ TMP-FILE during export."
       (insert org-mime-default-header)
       (insert body)
       (write-file tmp-file)
+      (org-load-modules-maybe)
+      (unless org-local-vars
+        (setq org-local-vars (org-get-local-variables)))
       (substring
        (eval ;; convert to fmt -- mimicing `org-run-like-in-org-mode'
-        (list 'let org-local-vars
+        (list 'let org-local-vars 
               (list (intern (concat "org-export-as-" fmt))
                     nil nil nil ''string t)))
        (if (string= fmt "org") (length org-mime-default-header) 0)))))