Re: [Orgmode] Capture into subheading of current headline

2010-12-01 Thread Nathan Neff
On Wed, Dec 1, 2010 at 8:30 AM, Eric S Fraga  wrote:
> Carsten Dominik  writes:
>
>> 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.
>>
>> You can insert a capture entry at the location where you are
>> at using a zero prefix to the capture command:
>>
>> C-0 C-c r
>>
>> Does that do what you want?  It hast the advantage that
>> it works for any entry-like templates in your setup.
>>
>> I guess we could make a special target for filing as child
>> of current heading if mor ethan one person found this useful
>>
>> - Carsten
>
> I can see this being useful but isn't this really a case of trying to
> massage org-capture into doing something which would best handled
> through a more general template mechanism (e.g yasnippet)?  I may be
> biased because I already use yasnippet to insert particular types of
> entries into org files, especially latex directives and some babel
> code blocks...
>
> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
> : using Org-mode version 7.3 (release_7.3.159.g23265)
>

I had the same thoughts, but I already have a capture template which
uses (clock)
to insert itself as a child of the currently clocked item.

I want to use that same template, except just be able to insert it as
a child of the current item.

I could define a yasnippet, but didn't want to define the same template twice.

Thanks,
--Nate

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Capture into subheading of current headline

2010-12-01 Thread Eric S Fraga
Carsten Dominik  writes:

> 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.
>
> You can insert a capture entry at the location where you are
> at using a zero prefix to the capture command:
>
> C-0 C-c r
>
> Does that do what you want?  It hast the advantage that
> it works for any entry-like templates in your setup.
>
> I guess we could make a special target for filing as child
> of current heading if mor ethan one person found this useful
>
> - Carsten

I can see this being useful but isn't this really a case of trying to
massage org-capture into doing something which would best handled
through a more general template mechanism (e.g yasnippet)?  I may be
biased because I already use yasnippet to insert particular types of
entries into org files, especially latex directives and some babel
code blocks...

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.159.g23265)

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Capture into subheading of current headline

2010-12-01 Thread Carsten Dominik

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

some text in this heading


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:

* 
* Some Heading

** < 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/emacs-orgmode@gnu.org/msg28946.html

Any help appreciated,

Thanks,
--Nate

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Capture into subheading of current headline

2010-12-01 Thread Carsten Dominik

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.


You can insert a capture entry at the location where you are
at using a zero prefix to the capture command:

C-0 C-c r

Does that do what you want?  It hast the advantage that
it works for any entry-like templates in your setup.

I guess we could make a special target for filing as child
of current heading if mor ethan one person found this useful

- Carsten



For example:

* Some Heading

some text in this heading


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:

* 
* Some Heading

** < 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/emacs-orgmode@gnu.org/msg28946.html

Any help appreciated,

Thanks,
--Nate

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Capture into subheading of current headline

2010-11-28 Thread Nathan Neff
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.

For example:

* Some Heading

some text in this heading


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:

* 
* Some Heading

** < 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/emacs-orgmode@gnu.org/msg28946.html

Any help appreciated,

Thanks,
--Nate

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode