emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Luciano Passuello <lucianop@litemind.com>
Cc: emacs-orgmode@gnu.org, Kaushal Modi <kaushal.modi@gmail.com>
Subject: Re: Insert heading above current one
Date: Sat, 30 Sep 2017 09:29:20 +0200	[thread overview]
Message-ID: <87mv5clk4v.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CACqKfLeiOkTPSyhS5WnvYcg0OUCDfQYYpN-kZdPjLV8TwgQcag@mail.gmail.com> (Luciano Passuello's message of "Fri, 29 Sep 2017 19:58:44 -0300")

Hello,

Luciano Passuello <lucianop@litemind.com> writes:

> I also think the earlier behavior made more sense.

Then we have to agree to disagree, I guess.

> The variable
> org-insert-heading-respect-content (or the universal argument)
> controls how a new headline is inserted BELOW the current header
> (either add immediately after the current line or down below). I don't
> see how this variable should alter the behavior of adding a heading
> ABOVE the current header (ie. "respecting content" or not has no
> effect here, above is always above).

Quoting `org-insert-heading-respect-content':

  Non-nil means insert new headings after the current subtree.

I see no exception there. Consequently, both C-u M-RET and C-RET insert
new heading after the current subtree. If you want to insert it before
current header, use M-RET. There is no feature lost. 

OTOH, if we force the previous behaviour, as you suggest, there is no
way to insert a new headline after the current subtree when point is at
the beginning of a headline. A feature is lost.

> You have a good point. Looking this way, the
> org-insert-heading-respect-content variable is indeed of little use.
> But since the variable does exist (even though perhaps it should be
> deprecated?), it should behave correctly.

It does behave correctly, since it obeys its docstring. 

And I agree it should be deprecated. If there is no objection, I'll
remove it.


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2017-09-30  7:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29 14:12 Insert heading above current one Luciano Passuello
2017-09-29 14:41 ` Kaushal Modi
2017-09-29 14:46   ` Kaushal Modi
2017-09-29 19:55     ` Nicolas Goaziou
2017-09-29 22:58       ` Luciano Passuello
2017-09-30  7:29         ` Nicolas Goaziou [this message]
2017-09-30 20:02           ` Luciano Passuello
2017-09-30 20:21             ` Nicolas Goaziou
2017-09-30 20:50               ` Luciano Passuello
2017-09-30 10:47       ` Rasmus

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=87mv5clk4v.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=kaushal.modi@gmail.com \
    --cc=lucianop@litemind.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).