all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Jayson Williams <williams.jayson@gmail.com>
Cc: 5437@debbugs.gnu.org
Subject: bug#5437: C-q reformat and Autofill error
Date: Fri, 22 Jan 2010 11:41:28 -0500	[thread overview]
Message-ID: <87d412ks7b.fsf@stupidchicken.com> (raw)
In-Reply-To: <8bd354bf1001210850i229a8be5r6522dd7372946674@mail.gmail.com>

> When I edit the beginning of the first line with an "-" character, and
> reformat using M-q, I expected all the lines to be indented
>
> Instead, after adding the '-' at the beginning, and reformatting with
> M-q, what I get is normal wrapping of the text
>
> This appears to be a bug, because it only seems to happens when the
> first line of the text is edited after the fact. If I include the '-'
> character when I first start typing the multiple lines, I get the
> indented wrapping that I expected. Additionally if I join the lines
> back together, and then type M-q, I get the expected indented
> wrapping.

This is not a bug, it's part of the indentation logic.  Emacs has no way
of knowing whether you intend to indent like this:

- foo goo...
bar baz...

or like this:

- foo goo...
  bar baz...

Clearly, each indentation could be valid under different circumstances,
and Emacs must not impose one single choice when M-q is typed.

So, if you start out with a long line that is not already indented, it
will try option 2.  But if you start out with either choice, it will
stick with that choice.






      reply	other threads:[~2010-01-22 16:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21 16:50 bug#5437: C-q reformat and Autofill error Jayson Williams
2010-01-22 16:41 ` Chong Yidong [this message]

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

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

  git send-email \
    --in-reply-to=87d412ks7b.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=5437@debbugs.gnu.org \
    --cc=williams.jayson@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.