emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: John Hendy <jw.hendy@gmail.com>
Cc: Jisang Yoo <jisang.yoo.ac+org@gmail.com>,
	emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: M-RET inside the first second-level heading of the first first-level heading
Date: Tue, 07 May 2013 11:54:45 +0200	[thread overview]
Message-ID: <87txmf83j4.fsf@bzg.ath.cx> (raw)
In-Reply-To: <CA+M2ft_ANihjF7ZLoGb7To23KaJwunwejf1NAd+jFqLoBJdN6A@mail.gmail.com> (John Hendy's message of "Thu, 2 May 2013 13:51:26 -0500")

Hi John,

John Hendy <jw.hendy@gmail.com> writes:

> On Fri, Apr 26, 2013 at 1:54 AM, Bastien <bzg@gnu.org> wrote:
>> Hi Jisang,
>> Jisang Yoo <jisang.yoo.ac+org@gmail.com> writes:
>>> 2. Place cursor at the beginning of "** bacon" and press M-RET and org creates
>>> a first-level heading.
>> This should now be fixed.  Thanks for reporting this,
> There were some same/similar/related issues as well, and I'm still not
> getting perfect results.
> Using a minimal config (below), if I create this in a new file
> * test
> ** test1
> ** test2
> and then fold on * test, I get this:
> * test...2

I do have (setq require-final-newline t) in my config, which prevents
this.  What happens is this: if you don't have the config above, the
folding will get wrong and display the "2" from the end of the buffer.

> Also, after navigating to the end of * test...2 (with it folded) and
> issuing M-RET, I get a new second level heading after ** test2. I
> would have expected a new first level headline since I did M-RET on a
> first level headline. Or is that the default behavior?

If you are before the "..." ellipsis, you are on a first level
headline and M-RET will insert a first level headline.  Otherwise you
are on a second level headline ("test2") and it will insert a second
level headline.

> If so, I guess my only concern is the folding of the end of a headline
> if there's no hard return after it into the ellipsis of it's parent.

Yes.  Maybe M-RET could/should handle this corner-case but since
`org-insert-heading' is deserving a full rewrite, I'm not going to
try to handle this corner-case myself... let's just keep it in mind 
when doing the rewrite.  Thanks for spotting it,


  parent reply	other threads:[~2013-05-07 10:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-25 20:39 Jisang Yoo
2013-04-25 21:51 ` John Hendy
2013-04-26  6:54 ` Bastien
2013-05-02 18:51   ` John Hendy
2013-05-02 18:52     ` John Hendy
2013-05-07  9:54     ` Bastien [this message]
2013-05-07 21:34       ` John Hendy
2013-05-10  6:49         ` Carsten Dominik
2013-05-17 23:08           ` John Hendy

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:

  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=87txmf83j4.fsf@bzg.ath.cx \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=jisang.yoo.ac+org@gmail.com \
    --cc=jw.hendy@gmail.com \
    --subject='Re: M-RET inside the first second-level heading of the first first-level heading' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


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