Hello, Huy <list-orgm...@reml.org> 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 <TAB> 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