emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Capturing to a list in a dynamic 2nd level heading


From: Simon Brown
Subject: Re: [O] Capturing to a list in a dynamic 2nd level heading
Date: Tue, 14 Aug 2012 19:12:51 +0100
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hi cj

At Mon, 13 Aug 2012 13:50:09 -0400,
Christopher J. White wrote:
> I have a capture template that does almost exactly that, I just use a 
> user entered subheading -- should be easy enough to tweak for your task.

Yes indeed, thank you very much!

Simon

> Capture template:
> 
>    ("d" "Discussion Item" item
>           (file+function
>            "~/org/Todo.org"
>            (lambda ()
>              (let* ((ctxt (read-string "Discussion context: "))
>                     (ctxt-pt
>                       (condition-case msg
>                           (org-find-olp (list "Discussion Items" ctxt) t)
>                         (error nil))))
>                (if ctxt-pt
>                    (progn
>                      (goto-char ctxt-pt)
>                      (org-end-of-subtree)
>                      (insert-string "\n"))
>                  (goto-char (org-find-olp (list "Discussion Items") t))
>                  (org-end-of-subtree)
>                  (insert-string (format "\n** %s\n" ctxt)))))))



reply via email to

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