相关配置如下:
(defun pina/create-org-file-name ()
"Create an org file in current directory"
(interactive)
(let ((name (read-string "Org filename to create in org-directory (without .org extention): ")))
(expand-file-name (format "%s.org" name) org-directory)))
(setq org-capture-templates
'(("h" "Org file with predefined head" plain
(file (lambda() (pina/create-org-file-name)))
"#+title: %?\n#+time_created: %U\n#+time_updated: %U\n\n"
:jump-to-captured t
:unnarrowed t)
))
输入英文文件名(title)时:
输入中文文件名(title)时:
可以看到中文时能自动有个#+title并把输入的内容放进来,可是英文的没有自动的,完全按照模板。不清楚是什么原因。想问一下如何配置模板,使得中英文都能够自动把#+title后面自动补上输入内容,且不额外产生内容?