开发者

Emacs org-mode capture -> file+datetree+prompt template help

开发者 https://www.devze.com 2023-01-31 02:36 出处:网络
Hey org-mode fanatics. I\'m wanting to set up my 开发者_StackOverflow中文版org-capture journal template to use file+datetree+prompt to dynamically set up date on creation (instead of using file+datetr

Hey org-mode fanatics. I'm wanting to set up my 开发者_StackOverflow中文版org-capture journal template to use file+datetree+prompt to dynamically set up date on creation (instead of using file+datetree which automatically sets date to today).

When I replace file+datetree with file+datetree+prompt in my template,

("j" "Journal" entry (file+datetree+prompt "~/Dropbox/doc/journal.org")
     "* %?\n----Entered on %U\n  %i\n  %a")))

I receive error: "Invalid capture target specification.

I've tried messing with this template quite a bit and haven't had success yet. I'd appreciate any help on how to properly set up my journal template. Thanks!

Here's a link to the info page on file+datetree+prompt: Template Elements


The manual page you mentioned is the development version of the manual. The template target element file+datetree+prompt was introduced in commit 341e9ce1d7085316c78d92f19790ad828c15731e which was part of release 7.4:

$ git name-rev --name-only 341e9ce1d7085316c78d92f19790ad828c15731e
tags/release_7.4~44

(means: commit 341…e was introduced 44 commits before tag release_7.4)

So you just have to update to the latest release or you can also use the development version of Org-Mode.


I think the problem is there is no documentation for file+datetree+prompt. Try file+datetree instead. I had good results from that.

("j" "Journal" entry (file+datetree "~/Dropbox/doc/journal.org")
     "* %?\n----Entered on %U\n  %i\n  %a")))

Resulted in this entry on the file journal.org: (using the word 'Test' when prompted)

* 2010
** 2010-12 December
*** 2010-12-20 Monday
**** Test
----Entered on [2010-12-20 Mon 12:12]

Looking at the source code for org v7.3, there is no reference to file-datetree-prompt, although I did see it mentioned in an online manual. It would be a nice feature, but I'm just manually changing the date in the entry window itself if that's necessary.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号