emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Huy <list-orgmode@reml.org>
To: emacs-orgmode@gnu.org
Subject: Re: Semantics of 'C-c -' and massively-indented lists
Date: Sat, 28 May 2011 07:09:06 -0700	[thread overview]
Message-ID: <20110528140906.BEE06C7C25@fish.malachiarts.com> (raw)
In-Reply-To: <87mxi7nh4c.fsf@gmail.com>

On Sat, May 28, 2011 at 02:29:07PM +0200, Nicolas Goaziou wrote:
> Hello,
> 
> Huy <list-orgmode@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.

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
> 

  reply	other threads:[~2011-05-28 14:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27 11:59 Semantics of 'C-c -' and massively-indented lists Huy
2011-05-28 12:29 ` Nicolas Goaziou
2011-05-28 14:09   ` Huy [this message]
2011-05-28 15:24     ` Nicolas Goaziou
     [not found]   ` <20110528140906.GA31956@malachiarts.com>
2011-05-28 16:43     ` Huy
2011-05-28 17:49       ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110528140906.BEE06C7C25@fish.malachiarts.com \
    --to=list-orgmode@reml.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).