emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Define capture template with dynamic id target


From: Darlan Cavalcante Moreira
Subject: [O] Define capture template with dynamic id target
Date: Thu, 09 Jun 2011 15:18:00 -0300
User-agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/24.0 Mule/6.0 (HANACHIRUSATO)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]