From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Semantics of 'C-c -' and massively-indented lists Date: Sat, 28 May 2011 14:29:07 +0200 Message-ID: <87mxi7nh4c.fsf@gmail.com> References: <20110527115942.B361BC7C17@fish.malachiarts.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:40834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQIdd-00045z-Nf for emacs-orgmode@gnu.org; Sat, 28 May 2011 08:29:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQIdc-0000zT-E5 for emacs-orgmode@gnu.org; Sat, 28 May 2011 08:29:05 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:48322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQIdc-0000zC-6g for emacs-orgmode@gnu.org; Sat, 28 May 2011 08:29:04 -0400 Received: by wyf19 with SMTP id 19so2212060wyf.0 for ; Sat, 28 May 2011 05:29:03 -0700 (PDT) In-Reply-To: <20110527115942.B361BC7C17@fish.malachiarts.com> (Huy's message of "Fri, 27 May 2011 04:59:42 -0700") 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: Huy Cc: emacs-orgmode@gnu.org Hello, Huy writes: > The effects of converting from headline to list with 'C-c -' and back > to 'C-c *' don't behave as I'd expect. The indentation levels seem all > wrong, no matter how you look at it. I have pushed a patch that should go in the right direction. See below. > What I would like is a LEVEL=1 list, properly indented along with the > rest of the body text. > > If org-adapt-indentation is t, then I would expect to see: > ***** Headline > - Converted Line > where the '-' is aligned with the 'H' of the above headline, at the > same column where any body text would start if I hit in a line > after Headline (if there were no list). > > And if org-adapt-indentation is nil, then I would expect to see: > ***** Headline > - Converted Line Fixed. > In fact, if I take the list and I try to convert it back to a headline > with 'C-c *', it doesn't even matter how many spaces there are in > front of the '-': it's always converted to a LEVEL=5 headline because > the parent is LEVEL=4: This is the intended behavior. > Things look especially weird when org-indent-mode is turned on, since > you have a mixture of "visual" indentation and hard space indentation. > I would expect a 'C-c -' to insert no hard spaces at all and leave > everything in column 0 and let the visual-line-mode adjust the > display. Fixed. It's the same as the first case, as org-indent-mode sets org-adapt-indentation to nil. > Now, what happens when we convert the previous example back by using > 'C-c *'? We get a LEVEL-4 headline. > ***** Headline LEVEL=3 > - Converted Line LEVEL=4 > becomes > ***** Headline LEVEL=3 > ******* Converted Line LEVEL=4 > The operations are not symmetric because somehow the LEVEL was > incremented. Operations are not symmetric because lists and headlines are not equivalent objects. > In most cases, 'C-c *' acts sanely. It acts weird when there is no > Headline above a list item and you try to convert to a Headline. > Again, in 'odd' mode. > - Converted Line LEVEL=1 (alone without parent) > becomes > ** Converted Line LEVEL=1.5 (alone without parent) > > Yes, that's a decimal. It's trying to hide in the cracks. Fixed. Please report back if something is still wrong. Thank you. Regards, -- Nicolas Goaziou