From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Insert heading above current one Date: Sat, 30 Sep 2017 09:29:20 +0200 Message-ID: <87mv5clk4v.fsf@nicolasgoaziou.fr> References: <874lrlmg9u.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyCDE-0002il-IO for emacs-orgmode@gnu.org; Sat, 30 Sep 2017 03:29:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyCDD-0003rT-L3 for emacs-orgmode@gnu.org; Sat, 30 Sep 2017 03:29:24 -0400 Received: from relay2-d.mail.gandi.net ([2001:4b98:c:538::194]:45236) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dyCDD-0003rA-Ep for emacs-orgmode@gnu.org; Sat, 30 Sep 2017 03:29:23 -0400 In-Reply-To: (Luciano Passuello's message of "Fri, 29 Sep 2017 19:58:44 -0300") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Luciano Passuello Cc: emacs-orgmode@gnu.org, Kaushal Modi Hello, Luciano Passuello 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