From mboxrd@z Thu Jan 1 00:00:00 1970 From: Darlan Cavalcante Moreira Subject: Re: Feature request: two-letter combination for org-capture Date: Wed, 08 Jun 2011 00:02:57 -0300 Message-ID: <4deee668.13c7640a.5250.02b0@mx.google.com> References: <4dee959c.0a92ec0a.1471.0181@mx.google.com> <80wrgxs3yg.fsf@somewhere.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([140.186.70.92]:53623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QU930-0003Mv-On for emacs-orgmode@gnu.org; Tue, 07 Jun 2011 23:03:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QU92z-0005Ol-HA for emacs-orgmode@gnu.org; Tue, 07 Jun 2011 23:03:10 -0400 Received: from mail-yw0-f41.google.com ([209.85.213.41]:46596) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QU92z-0005Ob-AI for emacs-orgmode@gnu.org; Tue, 07 Jun 2011 23:03:09 -0400 Received: by ywb26 with SMTP id 26so38506ywb.0 for ; Tue, 07 Jun 2011 20:03:08 -0700 (PDT) In-Reply-To: <80wrgxs3yg.fsf@somewhere.org> 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: Sebastien Vauban Cc: emacs-orgmode@gnu.org Thank you Sebastien, This works perfectly. -- Darlan At Tue, 07 Jun 2011 23:53:59 +0200, "Sebastien Vauban" 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 > >