GNU bug report logs -
#28003
26.0.50; Auto fill broken in Message mode
Previous Next
Reported by: Stephen Berman <stephen.berman <at> gmx.net>
Date: Mon, 7 Aug 2017 19:58:02 UTC
Severity: normal
Found in version 26.0.50
Done: Tom Tromey <tom <at> tromey.com>
Bug is archived. No further changes may be made.
Full log
Message #19 received at 28003 <at> debbugs.gnu.org (full text, mbox):
On Wed, 09 Aug 2017 06:37:42 -0600 Tom Tromey <tom <at> tromey.com> wrote:
>>>>>> "Stephen" == Stephen Berman <stephen.berman <at> gmx.net> writes:
>
> Stephen> On Wed, 09 Aug 2017 12:33:01 +0900 Katsumi Yamaoka <yamaoka <at> jpl.org> wrote:
>>> On Mon, 07 Aug 2017 21:56:42 +0200, Stephen Berman wrote:
>>>> This change:
>>> [...]
>>>> broke auto filling in Message mode; the breakage is due specifically to
>>>> this change in comment-indent-new-line:
>>>
>>> This will probably be no more than a workaround, though.
>>>
>>> --- message.el~ 2017-08-08 22:08:28.694840400 +0000
>>> +++ message.el 2017-08-09 03:30:33.407170200 +0000
>>> @@ -3451,7 +3451,7 @@
>>> (defun message-do-auto-fill ()
>>> "Like `do-auto-fill', but don't fill in message header."
>>> (unless (message-point-in-header-p)
>>> - (do-auto-fill)))
>>> + (let ((comment-start nil)) (do-auto-fill))))
>>>
>>> (defun message-insert-signature (&optional force)
>>> "Insert a signature. See documentation for variable `message-signature'."
>
> Stephen> This change doesn't fix the problem. I don't know what the motivation
> Stephen> for the change that caused this problem was, so I don't know how to fix
> Stephen> it; cc'ing Tom Tromey, who made the change.
>
> I've been discussing this off-list with another person who ran into this
> problem, but I haven't managed to reproduce it myself.
Strange; you did try the recipe of my OP? That shows the problem for me
every time (with emacs -Q and well as with my initializations). But see
below...
> I suspect the newcomment.el change is incorrect and should be reverted.
> Could you try that? The other changes should, I think, remain in place though.
Yes, restoring the variable comment-auto-fill-only-comments in
comment-indent-new-line restores auto-filling in Message mode.
> The basic idea of my patch is to make comment-auto-fill-only-comments
> work properly. Without it, setting comment-auto-fill-only-comments and
> enabling auto-fill in js-mode will cause auto-filling even when typing a
> long line of code, which is clearly incorrect.
I haven't looked at js-mode, but it seems strange that setting
comment-auto-fill-only-comments to t there does auto-filling of
non-commented lines...
This prompted me to look closer at Katsumi Yamaoka's patch above, and it
turns out that message-do-auto-fill is not being called, although it is
the value of normal-auto-fill-function in the Message mode buffer I'm
typing in right now; instead, the default value do-auto-fill is called.
When you try my recipe is message-do-auto-fill being used? That may
explain why you can't reproduce the problem. I have no idea why
message-do-auto-fill isn't being called here...
Steve Berman
This bug report was last modified 7 years and 328 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.