From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: org-insert-heading rewritten from scratch Date: Tue, 03 Sep 2013 15:58:31 +0200 Message-ID: <87r4d62eig.fsf@gmail.com> References: <6570EFE0-1DCA-44D1-AAD9-BE51A278EE58@gmail.com> <87txj0d3y8.fsf@ericabrahamsen.net> <2CBE3492-5A45-48D6-AF3B-A81D0C322009@gmail.com> <877gf2nd2y.fsf@gmail.com> <87a9jxlzsa.fsf@gmail.com> <7F861E6F-B668-4D9E-A684-37610C5BF93D@gmail.com> <878uze3v0x.fsf@gmail.com> <145CF774-77B2-4FCE-B52D-998D9EEC468F@gmail.com> <87zjru2fg7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGrBd-0003b8-J4 for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 10:02:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGrBV-0000oK-6K for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 10:02:29 -0400 Received: from mail-ee0-x22a.google.com ([2a00:1450:4013:c00::22a]:53369) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGr7Z-00086e-OC for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 09:58:17 -0400 Received: by mail-ee0-f42.google.com with SMTP id b45so3023150eek.29 for ; Tue, 03 Sep 2013 06:58:16 -0700 (PDT) In-Reply-To: (Carsten Dominik's message of "Tue, 3 Sep 2013 15:47:17 +0200") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: Eric Abrahamsen , emacs-orgmode@gnu.org Carsten Dominik writes: > I am still not clear about this. In your earlier mail you made this example: > >> Well same as above: I think it eats blank lines where it shouldn't. It >> the following cases: >> >> * H1 >> >> ** H2 >> >> H >> X >> >> and >> >> * H1 >> >> * H2 >> >> H >> >> X >> >> I don't think there's any reason for M-RET to eat blank line before >> point with either `org-blank-before-new-entry' set to `auto' or t. It >> should know that a blank line is expected before the new entry and >> therefore should create the headline at point. > > WIth `auto', there will be an empty line before the next entry in both > cases. In both cases it looks at the H2 headline and sees the empty > line before it. Are you saying the behaviour should be different in > both cases? Yes, it should. As you point out, in both cases the algorithm knows that there should be a blank line before the new entry (with the assumption that behaviour is set to `auto'). In the first case, if it inserts the headline at point, there will be none, so it has to add one. In the second case, there is no need to add one since creating it at point will fulfill the requirement (which is "a blank line before new headline"). Re-reading myself, I agree that my quoted explanations are a bit confusing. I hope this should clarify my point. Regards, -- Nicolas Goaziou