Automation 通过elisp自动导出组织模式html

Automation 通过elisp自动导出组织模式html,automation,elisp,org-mode,Automation,Elisp,Org Mode,我想使用~/.emacs中定义的elisp defun自动导出两个组织模式文件的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) )

我想使用
~/.emacs
中定义的elisp defun自动导出两个组织模式文件的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)
)
但这不会导出文件;相反,它在minibuffer中显示了一个奇怪的输出:


我做错了什么?

您可以尝试将组织导出为html批处理

(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)
)

组织导出为html至少需要一个参数<代码>(组织导出为html组织导出标题级别)或
(组织导出为html 3)
必须正确。