Emacs 如何为组织捕获键入动态文件条目
我试图找出是否有某种方法可以在emacs组织模式下为捕获创建动态文件名Emacs 如何为组织捕获键入动态文件条目,emacs,elisp,org-mode,Emacs,Elisp,Org Mode,我试图找出是否有某种方法可以在emacs组织模式下为捕获创建动态文件名 ("z" "test" entry (file+headline ***A date specific headline*** "Notes")) "** %^{prompt}") 是否有一些简单的方法将日期和年份传递给文件部分,以便我可以为每个月动态创建一个文件。我想要的是这样的: (concat "/home/me/file/report_notes_" (format-time-string "%m_%Y")
("z" "test" entry (file+headline ***A date specific headline*** "Notes"))
"** %^{prompt}")
是否有一些简单的方法将日期和年份传递给文件部分,以便我可以为每个月动态创建一个文件。我想要的是这样的:
(concat "/home/me/file/report_notes_" (format-time-string "%m_%Y") ".org")
(defun capture-report-date-file (path)
(concat path (format-time-string "%m_%Y")))
编辑-我终于通过反向引用使其正常工作了:
`(("z" "test" entry (file+headline ,(capture-report-date-file "/path/path/name_")
"Notes")
"** %^{prompt}")))
然后编写如下函数:
(concat "/home/me/file/report_notes_" (format-time-string "%m_%Y") ".org")
(defun capture-report-date-file (path)
(concat path (format-time-string "%m_%Y")))
在阅读了一个类似的问题后,我得到了答案。看一看“org daypage”:
现在,它会为当前日期创建一个页面并将其保存到特定目录中,也许您可以根据需要修改代码