emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Simon Brown <lists@700c.org>
To: orgmode@grierwhite.com
Cc: emacs-orgmode@gnu.org
Subject: Re: Capturing to a list in a dynamic 2nd level heading
Date: Tue, 14 Aug 2012 19:12:51 +0100	[thread overview]
Message-ID: <87obmd736k.wl%lists@700c.org> (raw)
In-Reply-To: <50293E51.9020204@grierwhite.com>

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	other threads:[~2012-08-14 18:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-13 16:26 Capturing to a list in a dynamic 2nd level heading Simon Brown
2012-08-13 17:50 ` Christopher J. White
2012-08-14 18:12   ` Simon Brown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87obmd736k.wl%lists@700c.org \
    --to=lists@700c.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=orgmode@grierwhite.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).