emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-insert-heading and inline tasks
@ 2010-10-14 18:11 Matt Lundin
  2010-10-15  5:45 ` Noorul Islam K M
  2010-10-15  6:48 ` Carsten Dominik
  0 siblings, 2 replies; 4+ messages in thread
From: Matt Lundin @ 2010-10-14 18:11 UTC (permalink / raw)
  To: Org Mode

Hi Carsten,

The following commit changes the behavior of org-insert-heading within
the context of inline tasks:

19d695ef8fd27ac1b1ef1b675c3960b9b7d6abdc

I find that new headlines are no longer inserted at the same depth as
inline tasks. A quick skim of the diff suggests that this is the
intended behavior. While I understand that one would not normally want a
new headline to derive its depth from an inline task further up in the
subtree, I often enter a few inline tasks at the same depth in quick
succession, e.g., when creating a mini project-hierarchy from a single
inline task.

Take the following example:

--8<---------------cut here---------------start------------->8---
* My big writing project

Blah blah blah blah blah blah.

*************** PROJECT Add some variety to the above
**************** TODO Look up synonyms for blah

Blah blah blah blah blah blah blah.
--8<---------------cut here---------------end--------------->8---

If I hit M-RET at the beginning of the second TODO headline, I get the
following:

--8<---------------cut here---------------start------------->8---
* My big writing project

Blah blah blah blah blah blah.

*************** PROJECT Add some variety to the above
* 

**************** TODO Look up synonyms for blah

Blah blah blah blah blah blah blah.
--8<---------------cut here---------------end--------------->8---

Would it be possible to respect the depth of an inline task if one calls
org-insert-headline directly on the headline? Normally, if I call M-RET
from an inline-task headline, I intend to insert another task at the
same depth. This is especially true if I'd like to add an END headline
to an inline task.

Thanks!
Matt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-insert-heading and inline tasks
  2010-10-14 18:11 org-insert-heading and inline tasks Matt Lundin
@ 2010-10-15  5:45 ` Noorul Islam K M
  2010-10-15  6:16   ` Nick Dokos
  2010-10-15  6:48 ` Carsten Dominik
  1 sibling, 1 reply; 4+ messages in thread
From: Noorul Islam K M @ 2010-10-15  5:45 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Org Mode

Matt Lundin <mdl@imapmail.org> writes:

> Hi Carsten,
>
> The following commit changes the behavior of org-insert-heading within
> the context of inline tasks:
>
> 19d695ef8fd27ac1b1ef1b675c3960b9b7d6abdc
>
> I find that new headlines are no longer inserted at the same depth as
> inline tasks. A quick skim of the diff suggests that this is the
> intended behavior. While I understand that one would not normally want a
> new headline to derive its depth from an inline task further up in the
> subtree, I often enter a few inline tasks at the same depth in quick
> succession, e.g., when creating a mini project-hierarchy from a single
> inline task.
>
> Take the following example:
>
> * My big writing project
>
> Blah blah blah blah blah blah.
>
> *************** PROJECT Add some variety to the above
> **************** TODO Look up synonyms for blah
>
> Blah blah blah blah blah blah blah.
>
> If I hit M-RET at the beginning of the second TODO headline, I get the
> following:
>
> * My big writing project
>
> Blah blah blah blah blah blah.
>
> *************** PROJECT Add some variety to the above
> * 
>
> **************** TODO Look up synonyms for blah
>
> Blah blah blah blah blah blah blah.

But this is what I get 

* My big writing project

Blah blah blah blah blah blah.

*************** PROJECT Add some variety to the above
**************** I go this one when I hit M-RET at the beginning of line
**************** TODO Look up synonyms for blah
**************** I go this one when I hit M-RET at the end of line

I have

Org-mode version 7.01trans (release_7.01h.661.g6803)
GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12)
 of 2010-01-30 on noorul

Thanks and Regards
Noorul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: org-insert-heading and inline tasks
  2010-10-15  5:45 ` Noorul Islam K M
@ 2010-10-15  6:16   ` Nick Dokos
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Dokos @ 2010-10-15  6:16 UTC (permalink / raw)
  To: Noorul Islam K M; +Cc: Matt Lundin, Org Mode, nicholas.dokos

Noorul Islam K M <noorul@noorul.com> wrote:

> Matt Lundin <mdl@imapmail.org> writes:
> 
> > Hi Carsten,
> >
> > The following commit changes the behavior of org-insert-heading within
> > the context of inline tasks:
> >
> > 19d695ef8fd27ac1b1ef1b675c3960b9b7d6abdc
> 
> But this is what I get 
> 
> * My big writing project
> 
> Blah blah blah blah blah blah.
> 
> *************** PROJECT Add some variety to the above
> **************** I go this one when I hit M-RET at the beginning of line
> **************** TODO Look up synonyms for blah
> **************** I go this one when I hit M-RET at the end of line
> 
> I have
> 
> Org-mode version 7.01trans (release_7.01h.661.g6803)
> GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12)
>  of 2010-01-30 on noorul
> 

You probably don't have the relevant commit in your version - haven't
counted exactly but it's probably around

        Org-mode version 7.01trans (release_7.01h.682.xxxx)

or so, about 20 commits after yours.

Try

    git show 19d695ef8fd27ac1b1ef1b675c3960b9b7d6abdc

If it gives you no output, you don't have it, so you wouldn't see
the problem anyway.

OTOH, I tried it with "Org-mode version 7.01trans (release_7.01h.700.gd32c)"
and I get the behavior described by Noorul, not the behavior described by
Matt. But I am sufficiently toasted by now that I wouldn't trust anything
I say :-) I'll try again afresh tomorrow.

Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-insert-heading and inline tasks
  2010-10-14 18:11 org-insert-heading and inline tasks Matt Lundin
  2010-10-15  5:45 ` Noorul Islam K M
@ 2010-10-15  6:48 ` Carsten Dominik
  1 sibling, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2010-10-15  6:48 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Org Mode


On Oct 14, 2010, at 8:11 PM, Matt Lundin wrote:

> Hi Carsten,
>
> The following commit changes the behavior of org-insert-heading within
> the context of inline tasks:
>
> 19d695ef8fd27ac1b1ef1b675c3960b9b7d6abdc
>
> I find that new headlines are no longer inserted at the same depth as
> inline tasks. A quick skim of the diff suggests that this is the
> intended behavior. While I understand that one would not normally  
> want a
> new headline to derive its depth from an inline task further up in the
> subtree, I often enter a few inline tasks at the same depth in quick
> succession, e.g., when creating a mini project-hierarchy from a single
> inline task.
>
> Take the following example:
>
> --8<---------------cut here---------------start------------->8---
> * My big writing project
>
> Blah blah blah blah blah blah.
>
> *************** PROJECT Add some variety to the above
> **************** TODO Look up synonyms for blah
>
> Blah blah blah blah blah blah blah.
> --8<---------------cut here---------------end--------------->8---
>
> If I hit M-RET at the beginning of the second TODO headline, I get the
> following:
>
> --8<---------------cut here---------------start------------->8---
> * My big writing project
>
> Blah blah blah blah blah blah.
>
> *************** PROJECT Add some variety to the above
> *
>
> **************** TODO Look up synonyms for blah
>
> Blah blah blah blah blah blah blah.
> --8<---------------cut here---------------end--------------->8---
>
> Would it be possible to respect the depth of an inline task if one  
> calls
> org-insert-headline directly on the headline? Normally, if I call M- 
> RET
> from an inline-task headline, I intend to insert another task at the
> same depth. This is especially true if I'd like to add an END headline
> to an inline task.

Okay, fair anough, it now works like this.

- Carsten

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-15  6:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14 18:11 org-insert-heading and inline tasks Matt Lundin
2010-10-15  5:45 ` Noorul Islam K M
2010-10-15  6:16   ` Nick Dokos
2010-10-15  6:48 ` Carsten Dominik

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).