From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shelagh Manton Subject: Re: using %(sexp) in remember templates Date: Mon, 15 Jun 2009 05:16:11 +0000 (UTC) Message-ID: References: <29830.1245042117@gamaville> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MG4Yg-0002L1-9S for emacs-orgmode@gnu.org; Mon, 15 Jun 2009 01:16:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MG4Yb-0002El-BE for emacs-orgmode@gnu.org; Mon, 15 Jun 2009 01:16:37 -0400 Received: from [199.232.76.173] (port=56423 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MG4Yb-0002ES-3y for emacs-orgmode@gnu.org; Mon, 15 Jun 2009 01:16:33 -0400 Received: from main.gmane.org ([80.91.229.2]:47060 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MG4Ya-0004ls-QL for emacs-orgmode@gnu.org; Mon, 15 Jun 2009 01:16:33 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MG4YZ-0002aT-8Z for emacs-orgmode@gnu.org; Mon, 15 Jun 2009 05:16:31 +0000 Received: from 203-219-222-168-cbr-pow-ts2-2600.tpgi.com.au ([203.219.222.168]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Jun 2009 05:16:31 +0000 Received: from shelagh.manton by 203-219-222-168-cbr-pow-ts2-2600.tpgi.com.au with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Jun 2009 05:16:31 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On Mon, 15 Jun 2009 01:01:57 -0400, Nick Dokos wrote: > Shelagh Manton wrote: > >> I'm trying to make a remember template that inserts some text >> automatically. >> >> I read in the manual that %(sexp) would expand in the template. This >> would be what I want, if I've understood the manual aright. >> >> I made a small function that inserts text (org-csa) and this is the >> template I originally tried. >> ("CSA" ?C "* TODO %^{topic} %^g\n %t\n %(org-csa) %&" "CSA.org" bottom) >> > The function should not insert anything into any buffer: it should > *return* what you want to be inserted. For example, the following > minimal .emacs works just fine (after fixing the path appropriately): > > ,---- > | (add-to-list 'load-path (expand-file-name "/path/to/org-mode/lisp")) | > (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . > org-mode)) | (require 'org-install) > | (global-set-key "\C-cl" 'org-store-link) | (global-set-key "\C-ca" > 'org-agenda) | > | ;;;; > | (setq org-remember-templates '(("CSA" ?C "* TODO %^{topic} %^g\n %t\n > %(org-csa) %&" "CSA.org" bottom))) | (defun org-csa () > | "foobar") > | (org-remember-insinuate) > | > | ;;;;; > `---- > > HTH, > Nick > > So my problem is that my function org-csa is inserting text? I will try this out. Ah thanks that works nicely. A conceptual dissonance between returning values and inserting text. Shelagh > > > > _______________________________________________ Emacs-orgmode mailing > list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode