From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Counter-intuitive behavior of org-insert-heading Date: Sat, 31 Aug 2013 08:19:27 +0200 Message-ID: <56C99AEF-941C-4091-80B9-885B248A68C5@gmail.com> References: <87mwrpr5y0.fsf@fastmail.fm> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFeX2-0003TT-Lg for emacs-orgmode@gnu.org; Sat, 31 Aug 2013 02:19:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFeWx-0003Rk-Ng for emacs-orgmode@gnu.org; Sat, 31 Aug 2013 02:19:36 -0400 Received: from mail-ea0-x232.google.com ([2a00:1450:4013:c01::232]:50734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFeWx-0003RY-Gj for emacs-orgmode@gnu.org; Sat, 31 Aug 2013 02:19:31 -0400 Received: by mail-ea0-f178.google.com with SMTP id a15so1307199eae.9 for ; Fri, 30 Aug 2013 23:19:30 -0700 (PDT) In-Reply-To: <87mwrpr5y0.fsf@fastmail.fm> 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: Matt Lundin Cc: Org Mode Hi Matt, is this problem fixed now, or still present? Thanks! - Carsten On 20.5.2013, at 18:07, Matt Lundin wrote: > The following commit introduced a bug in org-insert-heading. > > commit 3449c6d001b8d261b104bc9dd42bf1290d74bc0b > Author: Bastien Guerry > Date: Thu Apr 11 00:35:31 2013 +0200 > > org.el (org-insert-heading): Convert the current line into a headline > > * org.el (org-insert-heading-respect-content): Fix docstring. > (org-insert-heading): When in a non-empty non-headline line, > convert the current line into a headline. > > Thanks to Bernt Hansen for reporting this issue > > I have org-insert-heading-respect-content set to nil. > > Previously, when hit M-Ret at the end of a line, a new headline was > created on the next line. Pressing return at the end of the line > containing the date would result in a new headline, as expected. E.g., > > * A heading > [2013-05-20 Mon 11:02] > > ...would become > > * A heading > [2013-05-20 Mon 11:02] > * > > ... with the cursor placed after the new asterisk > > And if the cursor was at the end of a folded headline, such as. > > * A heading... > > ...a new heading would be created as expected... > > * A heading... > * > > With the commit above, however, the following happens when I hit the > cursor at the end of the line: > > * A heading > * [2013-05-20 Mon 11:02] > > And with a folded headline, the same thing happens. When the cursor is > placed after the invisible section and I hit M-Ret: > > * A heading... > > ...unfolds and becomes... > > * A heading > * [2013-05-20 Mon 11:02] > > Best, > Matt > >