如何键入用于组织捕获的动态文件条目 [英] How to type a dynamic file entry for org capture
问题描述
(ztestentry(file + headline *** A date specific headline ***Notes))
**%^ {prompt})
有没有一些简单的方法可以将日期和年份传递给文件部分,以便我可以为每个文件动态创建一个文件月。我想要的是这样的:
(concat/ home / me / file / report_notes_(格式时间-string%m_%Y).org)
编辑 - 我终于有它使用反引号:
`((ztestentry(file + headline,(capture-report-日期文件/ path / path / name_)
Notes)
**%^ {prompt})))
然后编写一个这样的函数:
(defun capture- report-date-file(path)
(concat path(format-time-string%m_%Y)))
在阅读此答案后,我得到了一个类似问题的答案。 >
看看org-daypage: https://github.com/almost/org-daypage
现在,它创建了当天的页面,保存它o一个特定的目录,也许你可以根据你的需要修改代码。
I'm trying to figure out if there is some way to create a dynamic file name for capture in emacs org-mode.
("z" "test" entry (file+headline ***A date specific headline*** "Notes"))
"** %^{prompt}")
Is there some simple way to pass a date and year to the file part, so that I can have a file dynamically created for each month. What I'd like is something like this:
(concat "/home/me/file/report_notes_" (format-time-string "%m_%Y") ".org")
Edit - I've finally got it working, using backquoting:
`(("z" "test" entry (file+headline ,(capture-report-date-file "/path/path/name_")
"Notes")
"** %^{prompt}")))
then writing a function like this:
(defun capture-report-date-file (path)
(concat path (format-time-string "%m_%Y")))
I got to the answer after reading this answer to a similar question.
Have a look at "org-daypage": https://github.com/almost/org-daypage
Right now it creates a page for the current day and saves it to a specific directory, maybe you can modify the code according to your needs.
这篇关于如何键入用于组织捕获的动态文件条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!