emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Capture into subheading of current headline


From: Carsten Dominik
Subject: Re: [Orgmode] Capture into subheading of current headline
Date: Wed, 1 Dec 2010 14:05:15 +0100

Hi Nathan,

On Nov 28, 2010, at 8:10 PM, Nathan Neff wrote:

I think I'm missing something obvious here -- I can't
define a capture template that puts the results as a sub-heading
of the heading that the cursor is currently in.

To insert a capture entry at point can be done with a zero prefix argument

C-0 C-c r

which will work for any "entry" templates you have defined.

I guess we could also have a special target for this.
To make your own, make the target function point at the *parent* headline.

- Carsten


For example:

* Some Heading
<cursor is here>
some text in this heading
<I want to use org-capture to put a subheading here>

I tried defining a template that used the "org-end-of-subtree" function:

(setq org-capture-templates
    `(("x" "Subheading" entry (function org-end-of-subtree) "*
%?\n\n" :clock-in t :clock-resume t)
     )
 )

But, the captured data is inserted as a sibling heading
in front of the heading where the cursor is, like this:

* <The result of my capture template>
* Some Heading
<cursor is here>
** < I want the result of the capture template here>

I've also tried "outline-next-heading", and "outline-end-of-subtree"
but they add
non-subtree headlines, and insert into #+begin_src / #+end_src blocks,
which is undesirable

I've also tried the solution proposed in this thread, but haven't
quite got it correct:
http://www.mail-archive.com/address@hidden/msg28946.html

Any help appreciated,

Thanks,
--Nate

_______________________________________________
Emacs-orgmode mailing list
Please 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]