From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: org-insert-heading rewritten from scratch Date: Sat, 31 Aug 2013 16:34:45 +0200 Message-ID: <877gf2nd2y.fsf@gmail.com> References: <6570EFE0-1DCA-44D1-AAD9-BE51A278EE58@gmail.com> <87txj0d3y8.fsf@ericabrahamsen.net> <2CBE3492-5A45-48D6-AF3B-A81D0C322009@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFmG8-0003Pl-1v for emacs-orgmode@gnu.org; Sat, 31 Aug 2013 10:34:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFmG2-0007Xp-D8 for emacs-orgmode@gnu.org; Sat, 31 Aug 2013 10:34:40 -0400 Received: from mail-ee0-x22e.google.com ([2a00:1450:4013:c00::22e]:40705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFmG2-0007Xk-5H for emacs-orgmode@gnu.org; Sat, 31 Aug 2013 10:34:34 -0400 Received: by mail-ee0-f46.google.com with SMTP id c13so1437859eek.19 for ; Sat, 31 Aug 2013 07:34:33 -0700 (PDT) In-Reply-To: <2CBE3492-5A45-48D6-AF3B-A81D0C322009@gmail.com> (Carsten Dominik's message of "Sat, 31 Aug 2013 16:00:56 +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 Hello, Carsten Dominik writes: > On 8.8.2013, at 09:41, Eric Abrahamsen wrote: > >> Carsten Dominik writes: >> >>> Hi, >>> >>> I have rewritten org-insert-heading, because it had become an unmaintainable beast. >>> Please follow up in this thread if you find problems with the new implementation. >>> Very likely there will be bugs, but now I am at least confident they can be fixed. >>> >>> - Carsten >> >> Awesome! Thanks very much for doing this. Will report back with bugs. > > I take it none have been found? Not really a bug, but I find some behaviour surprising: when at a the beginning of a regular text line, there is no way to create a headline just above it. In the following example: XCursor is at "X" Neither M-RET, C-u M-RET, C-RET nor C-u C-RET can do it. Is it intended? Also in this case, I think C-RET should create the new headline _after_ the subtree, since that's its whole point anyway, AFAIU. Eventually, it seems that behaviour towards empty lines is a bit unpredictable. In the following example, M-RET will be behave differently on each blank line between Paragraph and "H2". C-RET will be consistent. Note: I have `auto' as value for `heading' key in `org-blank-before-new-entry'. * H1 Paragraph * H2 IMO, using M-RET and C-RET should be as smooth an experience as possible. I also suggest to write function specifications as tests in test-org.el. Regards, -- Nicolas Goaziou