From mboxrd@z Thu Jan 1 00:00:00 1970 From: Huy Subject: Re: Semantics of 'C-c -' and massively-indented lists Date: Sat, 28 May 2011 07:09:06 -0700 Message-ID: <20110528140906.BEE06C7C25@fish.malachiarts.com> References: <20110527115942.B361BC7C17@fish.malachiarts.com> <87mxi7nh4c.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQKCU-00015P-Dx for emacs-orgmode@gnu.org; Sat, 28 May 2011 10:09:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQKCT-0006D7-Ab for emacs-orgmode@gnu.org; Sat, 28 May 2011 10:09:10 -0400 Received: from fish.malachiarts.com ([8.3.218.132]:33718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQKCS-0006Cy-Uv for emacs-orgmode@gnu.org; Sat, 28 May 2011 10:09:09 -0400 Received: from malachiarts.org.malachiarts.org (localhost [127.0.0.1]) by fish.malachiarts.com (Postfix) with ESMTP id BEE06C7C25 for ; Sat, 28 May 2011 07:09:06 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87mxi7nh4c.fsf@gmail.com> 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: emacs-orgmode@gnu.org On Sat, May 28, 2011 at 02:29:07PM +0200, Nicolas Goaziou wrote: > 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. Perfect behavior! Exactly what I was expecting. The only problem is a typo 'skip-blank' instead of 'skip-blanks' Thanks a lot for the quick turnaround! > > Regards, > > -- > Nicolas Goaziou >