[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] using %(sexp) in remember templates
From: |
Nick Dokos |
Subject: |
Re: [Orgmode] using %(sexp) in remember templates |
Date: |
Mon, 15 Jun 2009 01:01:57 -0400 |
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