From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: Define capture template with dynamic id target Date: Fri, 10 Jun 2011 07:31:43 +0200 Message-ID: <87aadqjlq8.wl%dmaus@ictsoc.de> References: <4df10e5c.4b6edc0a.1d4f.1a14@mx.google.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Fri_Jun_10_07:31:43_2011-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:56446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUuJx-0004F5-Pt for emacs-orgmode@gnu.org; Fri, 10 Jun 2011 01:31:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUuJv-0006OR-Kh for emacs-orgmode@gnu.org; Fri, 10 Jun 2011 01:31:49 -0400 Received: from mailout114.xlhost.de ([213.202.242.114]:35057 helo=backup1.xlhost.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUuJv-0006OK-5n for emacs-orgmode@gnu.org; Fri, 10 Jun 2011 01:31:47 -0400 In-Reply-To: <4df10e5c.4b6edc0a.1d4f.1a14@mx.google.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Darlan Cavalcante Moreira Cc: Orgmode Mailing List --pgp-sign-Multipart_Fri_Jun_10_07:31:43_2011-1 Content-Type: text/plain; charset=US-ASCII 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.... dmjena@jabber.org Email..... dmaus@ictsoc.de --pgp-sign-Multipart_Fri_Jun_10_07:31:43_2011-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iF4EABEIAAYFAk3xrD8ACgkQma24O1pEeOYTaQD9G6xu0efbgVCekXbxVPmGRsV4 ciLsnCA6Fw6oPBa7CbgBAOCIlowTqnr7bP7/y+S14RICyCTdQkxQWUVu4AHbZR/L =3Kp8 -----END PGP SIGNATURE----- --pgp-sign-Multipart_Fri_Jun_10_07:31:43_2011-1--