2011-12-23 19 views
1

我想知道是否有某種方法可以在emacs組織模式下爲捕獲創建動態文件名。如何爲組織捕獲輸入動態文件條目

("z" "test" entry (file+headline ***A date specific headline*** "Notes")) 
    "** %^{prompt}") 

有一些簡單的方法來傳遞一個日期和年份的文件的一部分,所以我可以有每月動態創建的文件。我想是這樣的:

(concat "/home/me/file/report_notes_" (format-time-string "%m_%Y") ".org") 

編輯 - 我終於懂了工作,用backquoting:

`(("z" "test" entry (file+headline ,(capture-report-date-file "/path/path/name_") 
    "Notes") 
    "** %^{prompt}"))) 

然後寫一個函數是這樣的:

(defun capture-report-date-file (path) 
    (concat path (format-time-string "%m_%Y"))) 

我在閱讀this answer後得到了類似問題的答案。

回答