[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Feature request: two-letter combination for org-capture
From: |
Darlan Cavalcante Moreira |
Subject: |
Re: [O] Feature request: two-letter combination for org-capture |
Date: |
Wed, 08 Jun 2011 00:02:57 -0300 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) Emacs/24.0 Mule/6.0 (HANACHIRUSATO) |
Thank you Sebastien,
This works perfectly.
--
Darlan
At Tue, 07 Jun 2011 23:53:59 +0200,
"Sebastien Vauban" <address@hidden> wrote:
>
> Hi Darlan,
>
> Darlan Cavalcante Moreira wrote:
> > A nice feature of the org-agenda is the possibility to define two letter
> > combinations for the custom commands. From the manual I could not see how to
> > do this with org-capture and I'm guessing it is not possible right now.
>
> It already is... See an example below, with the helper function I defined for
> myself...
>
> #+begin_src emacs-lisp
> (defun my/org-capture-template (keys description file headline)
> "Create template for captured elements."
> `(,keys ,description entry
> (file+headline ,file ,headline)
> "* %^{Title}
> :PROPERTIES:
> :Created: %:date-timestamp-inactive
> :END:
> %?
> %i
>
> From %a"
> :empty-lines 1))
> #+end_src
>
> ... for avoiding repetitive skeleton:
>
> #+begin_src emacs-lisp
> (setq org-capture-templates
> `(;; notes
> ("N" "Templates adding notes")
> ,(my/org-capture-template
> "Ne" "Emacs" "~/Public/Notes-on-Emacs.txt" "Notes")
> ;; [...]
> ,(my/org-capture-template
> "No" "Org" "~/Public/Notes-on-Org.txt" "Notes")))
> #+end_src
>
> Best regards,
> Seb
>
> --
> Sebastien Vauban
>
>