[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] create new files from capture
From: |
Bill Wishon |
Subject: |
Re: [O] create new files from capture |
Date: |
Wed, 20 Apr 2011 19:00:57 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
> (function function-finding-location)
> Most general way, write your own function to find both
> file and location
I just started trying to do this today myself when I found this thread.
>From what I can tell the expectation is that this function places the point
in the buffer/file at the location where you want to insert the captured
template item.
I created to following which works for me to open a new file and puts the
test template there:
(defun prompt-for-new-orgfile ()
"This function prompts for a file to save to"
(call-interactively 'find-file)
(end-of-buffer))
(setq org-capture-templates
'(("t" "Todo" entry (file+headline (concat org-directory "/gtd.org")
"Tasks")
"* TODO %?\n %i\n %a")
("m" "Meeting Notes" entry (function prompt-for-new-orgfile)
"* %^{meetingtitle}" :unnarrowed)))
What I'm trying to figure out now is how to read the template from a file.
The documentation says that it can be done by using (file "path/to/file")
in place of the template text argument, but I haven't gotten that working yet.
~>Bill