emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Define capture template with dynamic id target
@ 2011-06-09 18:18 Darlan Cavalcante Moreira
  2011-06-10  5:31 ` David Maus
  0 siblings, 1 reply; 4+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-06-09 18:18 UTC (permalink / raw)
  To: Orgmode Mailing List


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

All the get-me-an-org-id-for-the-month function does is returning
"MonthnameYearArgument", in this case it returns "Junho2011Contas". The
definition is given below
#+begin_src emacs-lisp
  (defun get-me-an-org-id-for-the-month (categoryName)
    "Used only in my template for the expenses of the month. It
  return a suitable ID for the month sub-headline."
    (interactive)
    (concat (get-current-month) (get-current-year) categoryName)
    )
#+end_src


--
Darlan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-11  8:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-09 18:18 Define capture template with dynamic id target Darlan Cavalcante Moreira
2011-06-10  5:31 ` David Maus
2011-06-10 15:50   ` Darlan Cavalcante Moreira
2011-06-11  8:06     ` Aankhen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).