我想使用~/.emacs
中定义的elisp defun自动执行两个org-mode文件的html导出。我写了以下代码:
(defun publish-custom-orgs ()
"publish certain org files as html files"
(interactive)
(find-file "~/org/a.org")
(org-export-as-html)
(find-file "~/org/b.org")
(org-export-as-html)
)
但这不会导出文件;相反,它在迷你缓冲区中显示一个奇怪的输出:
我做错了什么?
答案 0 :(得分:2)
您可以尝试org-export-as-html-batch
(defun publish-custom-orgs ()
"publish certain org files as html files"
(interactive)
(find-file "~/org/a.org")
(org-export-as-html-batch)
(find-file "~/org/b.org")
(org-export-as-html-batch)
)