emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Feature request: two-letter combination for org-capture
@ 2011-06-07 21:18 Darlan Cavalcante Moreira
  2011-06-07 21:53 ` Sebastien Vauban
  0 siblings, 1 reply; 3+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-06-07 21:18 UTC (permalink / raw)
  To: Orgmode Mailing List


Hello list,

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.

Of course one can always define a single letter template for each
situation, but the same goes for the org-agenda and two-letter templates
can help a lot with the organization (also finding good letter choices).


Some use-case scenarios I can imagine:
 - Add todo items to specific projects (I know you can refile the note
   during the capture process, but this would be faster). All of the
   letters "t" and a project specific letter
 - Add a contact to a specific category: people using org-contacts could
   define different templates for work contacts and personal contacts, for
   instance.
 - Add a line to a specific table: Suppose you use tables in org to
   organize your expenses, but you have multiple tables, one for each kind
   of expense. You would be able to add one expense to a specific table
   (I'm not sure if refile from the capture buffer even works in this
   case).
 - Etc.


--
Darlan Cavalcante

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

* Re: Feature request: two-letter combination for org-capture
  2011-06-07 21:18 Feature request: two-letter combination for org-capture Darlan Cavalcante Moreira
@ 2011-06-07 21:53 ` Sebastien Vauban
  2011-06-08  3:02   ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastien Vauban @ 2011-06-07 21:53 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

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

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

* Re: Feature request: two-letter combination for org-capture
  2011-06-07 21:53 ` Sebastien Vauban
@ 2011-06-08  3:02   ` Darlan Cavalcante Moreira
  0 siblings, 0 replies; 3+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-06-08  3:02 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode


Thank you Sebastien,
This works perfectly.

--
Darlan

At Tue, 07 Jun 2011 23:53:59 +0200,
"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> 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
> 
> 

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

end of thread, other threads:[~2011-06-08  3:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-07 21:18 Feature request: two-letter combination for org-capture Darlan Cavalcante Moreira
2011-06-07 21:53 ` Sebastien Vauban
2011-06-08  3:02   ` Darlan Cavalcante Moreira

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).