From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#28003: 26.0.50; Auto fill broken in Message mode Date: Wed, 09 Aug 2017 15:04:56 +0200 Message-ID: <87efskyjrb.fsf@rosalinde> References: <87shh3cft1.fsf@rosalinde> <87valxxglm.fsf@rosalinde> <8760dwx6g9.fsf@pokyo> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1502283977 20754 195.159.176.226 (9 Aug 2017 13:06:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 9 Aug 2017 13:06:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Katsumi Yamaoka , Stephen Berman , 28003@debbugs.gnu.org To: Tom Tromey Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 09 15:06:07 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfQgX-0004pE-Qp for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Aug 2017 15:06:06 +0200 Original-Received: from localhost ([::1]:47466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfQge-000810-3p for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Aug 2017 09:06:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfQgX-00080s-T0 for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 09:06:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dfQgU-0000ob-Os for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 09:06:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44094) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dfQgU-0000oM-M5 for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 09:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dfQgU-0008Ga-F9 for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 09:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2017 13:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28003 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28003-submit@debbugs.gnu.org id=B28003.150228392531730 (code B ref 28003); Wed, 09 Aug 2017 13:06:02 +0000 Original-Received: (at 28003) by debbugs.gnu.org; 9 Aug 2017 13:05:25 +0000 Original-Received: from localhost ([127.0.0.1]:52775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfQft-0008Fi-4f for submit@debbugs.gnu.org; Wed, 09 Aug 2017 09:05:25 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:58534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfQfr-0008FU-6P for 28003@debbugs.gnu.org; Wed, 09 Aug 2017 09:05:23 -0400 Original-Received: from rosalinde ([83.135.6.205]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Llm9w-1d6Mxv2drU-00ZQCQ; Wed, 09 Aug 2017 15:04:59 +0200 In-Reply-To: <8760dwx6g9.fsf@pokyo> (Tom Tromey's message of "Wed, 09 Aug 2017 06:37:42 -0600") X-Provags-ID: V03:K0:Gmzt1b9PP6K49yP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ugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135599 Archived-At: On Wed, 09 Aug 2017 06:37:42 -0600 Tom Tromey wrote: >>>>>> "Stephen" == Stephen Berman writes: > > Stephen> On Wed, 09 Aug 2017 12:33:01 +0900 Katsumi Yamaoka 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