[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Define capture template with dynamic id target
From: |
David Maus |
Subject: |
Re: [O] Define capture template with dynamic id target |
Date: |
Fri, 10 Jun 2011 07:31:43 +0200 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.3 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
At Thu, 09 Jun 2011 15:18:00 -0300,
Darlan Cavalcante Moreira wrote:
>
>
> Hello List,
>
> I'm trying to create a few templates for org capture and I have found a
> weird behavior with the ID target type. It works OK if I use the ID
> directly like below
> #+begin_src emacs-lisp
> (id "Junho2011Contas")
> #+end_src
> but it does not find the ID if I try to get it from a function, such as
> #+begin_src emacs-lisp
> (id (get-me-an-org-id-for-the-month "Contas"))
> #+end_src
Org capture does not support executing a function in the ID target spec.
C-h v org-capture-templates RET
target Specification of where the captured item should be placed.
In Org-mode files, targets usually define a node. Entries will
become children of this node, other types will be added to the
table or list in the body of this node.
Most target specifications contain a file name. If that file
name is the empty string, it defaults to `org-default-notes-file'.
A file can also be given as a variable, function, or Emacs Lisp
form.
Valid values are:
(file "path/to/file")
Text will be placed at the beginning or end of that file
(id "id of existing org entry")
File as child of this entry, or in the body of the entry
...
You might use the `function' target spec
(function function-finding-location)
Most general way, write your own function to find both
file and location
HTH,
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... address@hidden
Email..... address@hidden
pgpD43BPSVpuO.pgp
Description: PGP signature