emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: using %(sexp) in remember templates


From: Shelagh Manton
Subject: [Orgmode] Re: using %(sexp) in remember templates
Date: Mon, 15 Jun 2009 05:16:11 +0000 (UTC)
User-agent: Pan/0.132 (Waxed in Black)

On Mon, 15 Jun 2009 01:01:57 -0400, Nick Dokos wrote:

> Shelagh Manton <address@hidden> 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.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode






reply via email to

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