方案一:通过 Emacs 批处理模式

emacs file.org --batch -f org-hugo-export-wim-to-md --kill

--batch 默认不启用配置文件,可以使用 -l

emacs file.org --batch -l ~/.emacs.d/init.el -f org-hugo-export-wim-to-md --kill

方案二:通过 LISP 遍历

(mapc
 (lambda (x)
   (with-current-buffer
	   (find-file-noselect x)
	 (org-hugo-export-wim-to-md t)))
 (directory-files "/Users/wh/codes/notes/roam-research-notes-hugo/journal" nil "^[0-9]+$" t))