From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Brown Subject: Re: Capturing to a list in a dynamic 2nd level heading Date: Tue, 14 Aug 2012 19:12:51 +0100 Message-ID: <87obmd736k.wl%lists@700c.org> References: <1344875203.2482.140661114279681.51ABA6DA@webmail.messagingengine.com> <50293E51.9020204@grierwhite.com> 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 ([208.118.235.92]:39603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1Lbs-0006cB-51 for emacs-orgmode@gnu.org; Tue, 14 Aug 2012 14:12:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1Lbr-0003G1-1A for emacs-orgmode@gnu.org; Tue, 14 Aug 2012 14:12:56 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:43612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1Lbq-0003Fu-M9 for emacs-orgmode@gnu.org; Tue, 14 Aug 2012 14:12:54 -0400 In-Reply-To: <50293E51.9020204@grierwhite.com> 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: orgmode@grierwhite.com Cc: emacs-orgmode@gnu.org 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)))))))