Rainer M Krug <r.m.krug@gmail.com> writes:Thats fun!
> I would like to capture todo items, changes and other things in the
> file I am working in (literate programming), but I am struggling: how
> can I specify thet the file is the actual file I am working in?
From the info manual on capture templates
to google "org capture "entry (function"" which led
to the mailing list archive (Thread start: http://tinyurl.com/3fj25gq)
to the git log:
,----
| commit 030960559e24b5b364b6237d223429b5050fc2f1
| Author: Bastien Guerry <bzg@altern.org>
| Date: Sun Mar 6 17:31:56 2011 +0100
|
| org-capture.el: remove (currentfile) as a file specification in templates.
|
| You can already use a function like (buffer-file-name) to get the currently
| visited file. So (currentfile) is not necessary.
`----
What a round trip :).
A quick test suggests this should do:
--8<---------------cut here---------------start------------->8---
("w"
"*TEST*: entry function currentfile"
entry
(file+headline (buffer-file-name) "Notes")
"* Eintrag")
--8<---------------cut here---------------end--------------->8---
This should file your capture item "* Eintrag" under the Node "* Notes"
in the buffer you called capture from.
Is that what you had in mind?
hth
Memnon
Tested with:
,----
| (setq org-capture-templates
| `(("w"
| "*TEST*: entry function currentfile"
| entry
| (file+headline (buffer-file-name) "Note")
| "* Eintrag")))
`----
on GNU Emacs 23.3.1 (i486-pc-linux-gnu, GTK+ Version 2.24.3)
of 2011-04-10 on raven, modified by Debian
with
Org-mode version 7.5