unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jesse Sheidlower <jester@panix.com>
To: Glenn Morris <rgm@gnu.org>
Cc: 7987@debbugs.gnu.org
Subject: bug#7987: 23.2; Refill error in message-mode
Date: Tue, 8 Feb 2011 10:44:19 -0500	[thread overview]
Message-ID: <20110208154418.GL22848@panix.com> (raw)
In-Reply-To: <8lr5bj60dx.fsf@fencepost.gnu.org>

On Mon, Feb 07, 2011 at 03:43:54PM -0500, Glenn Morris wrote:
> Jesse Sheidlower wrote:
> 
> > $ emacs -Q
> > M-x message-mode
> > (type or paste the following text, not including dashes):
> >
> > ---
> > I read with great interest your text, the "Declaration of Independence,"
> > and I was particularly taken with the introduction:
> >
> >   When in the Course of human events it becomes necessary for one people
> >   to dissolve the 
> >   political bands which have connected them with another
> >   and to assume among the powers of the earth, the separate 
> >   and equal
> >   station to which the Laws of Nature and of Nature's God entitle them,
> >   a decent respect to the opinions of mankind requires 
> >   that they should
> >   declare the causes which impel them to the separation.
> >
> > I do think this is one of my favorite passages. Thank you.
> > ---
> >
> > Position point anywhere in the indented section, and type M-q.  The text
> > will be refilled such that there's no space before or after the indented
> > paragraph, the first line of the indented paragraph will be indented
> > four spaces, and the second and subsequent lines should be indented
> > eight spaces.
> 
> This is an artificial example because it is not how a mail buffer
> normally looks. The message filling code does different things in the
> header and in the body of an email. Since your example does not contain
> `mail-header-separator', message thinks it is in the header and fills
> accordingly. If you insert `mail-header-separator' at the start of your
> example buffer, message fills the paragraph correctly.
> 
> Do you have an example of an actual mail composition buffer where the
> message filling code does the wrong thing?

Hmm. I guess you're right, although this behavior doesn't seem to be
mentioned in the Manual. I'm using message-mode with Mutt, so there are
no headers in the buffer. 

The EmacsWiki page on MuttInEmacs does give a code sample (apparently
problematic, as there are various kludgy-looking updates) that 'sets
mail-header-separator to "" for M-q and auto-fill to work correctly', so
the fact that it doesn't normally "work correctly" does seem to be known
behavior. But for what it's worth, one of the Emacs maintainers did look
this over and think it was a bug, so I'm not the only one confused.

I'll experiment further and will update if necessary. Is there a
preferred way to tell message-mode to assume that the buffer is a
message body, rather than a header?

Thanks for the reply.

Jesse Sheidlower





  reply	other threads:[~2011-02-08 15:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-05  3:18 bug#7987: 23.2; Refill error in message-mode Jesse Sheidlower
2011-02-07 20:43 ` Glenn Morris
2011-02-08 15:44   ` Jesse Sheidlower [this message]
2011-02-08 19:16     ` Glenn Morris
2011-02-10 19:50     ` Stefan Monnier
2011-02-10 21:02       ` Jesse Sheidlower
2011-02-11  1:58         ` Stefan Monnier
2011-02-11  9:46           ` Andreas Schwab
2011-02-11 11:06           ` Jesse Sheidlower
2011-02-11  9:41         ` Andreas Schwab
2011-02-11 11:14           ` Jesse Sheidlower
2011-06-30  0:40 ` Lars Magne Ingebrigtsen
2011-06-30 20:00   ` Stefan Monnier
2011-06-30 20:10     ` Lars Magne Ingebrigtsen

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20110208154418.GL22848@panix.com \
    --to=jester@panix.com \
    --cc=7987@debbugs.gnu.org \
    --cc=rgm@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.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).