From unknown Sun Aug 17 01:48:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53537: Emacs 28 regression: fill-column is not always respected for the first line of commented block Resent-From: Sergey Vinokurov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jan 2022 00:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53537 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 53537@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164315606928088 (code B ref -1); Wed, 26 Jan 2022 00:15:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Jan 2022 00:14:29 +0000 Received: from localhost ([127.0.0.1]:50513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCVxF-0007Iy-BM for submit@debbugs.gnu.org; Tue, 25 Jan 2022 19:14:29 -0500 Received: from lists.gnu.org ([209.51.188.17]:57798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCVxC-0007Io-Fl for submit@debbugs.gnu.org; Tue, 25 Jan 2022 19:14:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCVxC-0001cK-4C for bug-gnu-emacs@gnu.org; Tue, 25 Jan 2022 19:14:26 -0500 Received: from [2a00:1450:4864:20::42f] (port=37676 helo=mail-wr1-x42f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nCVxA-0006yw-9G for bug-gnu-emacs@gnu.org; Tue, 25 Jan 2022 19:14:25 -0500 Received: by mail-wr1-x42f.google.com with SMTP id w11so10619564wra.4 for ; Tue, 25 Jan 2022 16:14:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:content-language:to:from :subject:content-transfer-encoding; bh=Vb+A08fJTmi46H+AvKYTbVia+NM15+rQvXrDlYjUMk8=; b=KhNawgzOYtqtpuDc5Cp9HtvqncvQdDXrpMzDUBM9YgSWeTQ46BtTcWwVS3pQO+/qfU b2TpRu9LYx37driIuQ/yB8zbppXZuv0jnxFuBMKzreif3naWUkoTbfI3ufckpnGvQIDO X7e0bXvR/IZZGJZSw/C3136q+fRQVyTT2bpELVk3/7adQOKpcBp0QxF6jidehMJSAHJu LMibZR0t5RSQ1IEnIsL/Fn3KDbLR4HJPawdVnix8LQJmfuEfv4+uUM/yuiHf28XDdxPN OaFvRY/At7e1kRKO6buzvdQE+QAUopDYL7ttWlX+hg5cV1owOJ+UEZHo6ES7heWUWk0K vFrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:from:subject:content-transfer-encoding; bh=Vb+A08fJTmi46H+AvKYTbVia+NM15+rQvXrDlYjUMk8=; b=uOjH+kv1j3VIDIwkVAyAQ4Mw+S+W7nU3jSPYGBMvEcBTvwtHNG1/HgPwvVUPxxpVs6 RDtZ2UP5C9JvPccThvzabZ68eDhM8utQJJt0eXSeEz0HDTYdiiI3hMSJxNM/ZlQGTStt FoXCfetnHBaNtqHn41YVMquHyqj1/YGgg/cvxOUDCgDsh2OmObvncH/AYq60ABHC76aY OIN+bD5uRkr5TjEMdSOQVKFegaZEyVOTVZvWWjY2FBQ9iimFC3tPGe5bF+B0J9FKAjHI /2lwepABvX7wrTMA78hD5NFdQNV4crI/pH+eEwNl7j/SDw5OFlzVMOljyX+WpGzSlSVt +ItQ== X-Gm-Message-State: AOAM530iLmFwNd+UEyoOUOw+uxXyrO2ZS0FJwo6/97YRsysncf3n+TPQ 6ffEgYiSaRtPXNQ5oEfNWQ8jGDZZn+s= X-Google-Smtp-Source: ABdhPJx0JdhTMsjpqK/qNNbNQWt3BZhH3lX3X1IbpbuI7tbIFBsLleR4f9UnGC66qMfq4cGGMx3xVQ== X-Received: by 2002:a05:6000:18af:: with SMTP id b15mr7404129wri.589.1643156062200; Tue, 25 Jan 2022 16:14:22 -0800 (PST) Received: from ?IPV6:2a01:4b00:8697:de00:607c:1dff:fe2e:2452? ([2a01:4b00:8697:de00:607c:1dff:fe2e:2452]) by smtp.gmail.com with ESMTPSA id x4sm19309185wrp.13.2022.01.25.16.14.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Jan 2022 16:14:21 -0800 (PST) Message-ID: <3a18005d-bbb4-c201-c60f-a583711cba37@gmail.com> Date: Wed, 26 Jan 2022 00:14:21 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-GB From: Sergey Vinokurov Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42f (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=serg.foo@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hello, The #45720 bug introduces edge case in treatment of fill-column for the first line of commented block. This is caught by haskell-mode tests (https://github.com/haskell/haskell-mode/blob/master/tests/haskell-mode-tests.el#L330) but is not limited to that mode. I have managed to reproduce it using the following snippet: (princ (with-temp-buffer (asm-mode) (dolist (line '(" ;; a b c" " ;; d e f" " ;; x y z" " ;; w")) (insert line "\n")) (goto-char (point-min)) (end-of-line) (setf fill-column 10) (fill-paragraph nil) (buffer-string))) The idea is that everything is already filled and nothing should happen when fill-column equals to 10. On Emacs 27 I get the expected output (snippet above is in /tmp/test.el): $ emacs --version GNU Emacs 27.2.50 Copyright (C) 2021 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. $ emacs -Q --batch -l /tmp/test.el ;; a b c ;; d e f ;; x y z ;; w On Emacs 28 pretest I get: $ emacs --version GNU Emacs 28.0.91 Copyright (C) 2022 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. $ emacs -Q --batch -l /tmp/test.el ;; a b c d ;; e f x ;; y z w The first line is of length 11 which is in violation of requested fill-column equals 10. Couldn't reproduce for emacs-lisp-mode and c-mode presumably because they override fill-paragraph-function so asm-mode is the simplest programming related mode I could find in vanilla Emacs. Other modes that don't do anything fancy with fill-paragraph-function (e.g. haskell-mode) should be susceptible to the issue as well. From unknown Sun Aug 17 01:48:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53537: Emacs 28 regression: fill-column is not always respected for the first line of commented block Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jan 2022 12:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53537 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sergey Vinokurov , Lars Ingebrigtsen Cc: 53537@debbugs.gnu.org Received: via spool by 53537-submit@debbugs.gnu.org id=B53537.164320108930631 (code B ref 53537); Wed, 26 Jan 2022 12:45:01 +0000 Received: (at 53537) by debbugs.gnu.org; 26 Jan 2022 12:44:49 +0000 Received: from localhost ([127.0.0.1]:51135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nChfM-0007xz-Un for submit@debbugs.gnu.org; Wed, 26 Jan 2022 07:44:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nChfL-0007xn-4H for 53537@debbugs.gnu.org; Wed, 26 Jan 2022 07:44:47 -0500 Received: from [2001:470:142:3::e] (port=57574 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCheh-0005lE-Nt; Wed, 26 Jan 2022 07:44:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=NhbtSkFL8nbvu3ejjbYjButA1Wd7MEV6//utpvsYZJw=; b=lS4V15QbgNco hPzhS+OfDAvcfy9Kc2MW94nsLCl009fC3jLy7CpFJT358dalL3ozoHcU/Hev8tCHA3UQndpza9/oh AAZwYIJp84pvvWSp6iOl7y7YHDZoZvWbvv4Ve+h3DhN2VCBD859ibeWEWade5tAOdm7bXXXfyWPQV GAgkJK0Y90hJGelvU4ox19U+zh6pbP5wEXZ4wDEip/zaIh6Q7RFOTD1FUsg3HovcXhyPedL7Op+w7 2bxIlI5wX3aewHZu6kaWDL1ePu48rrxPlJU2uWANU1FUB3reeKaKJQj5H4EKEI1q+r95vOa0o45Uv YgtRUeIDJeIJoQ+Fb4TYKA==; Received: from [87.69.77.57] (port=2537 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nChea-0003ss-Ac; Wed, 26 Jan 2022 07:44:05 -0500 Date: Wed, 26 Jan 2022 14:43:52 +0200 Message-Id: <83sftahdkn.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <3a18005d-bbb4-c201-c60f-a583711cba37@gmail.com> (message from Sergey Vinokurov on Wed, 26 Jan 2022 00:14:21 +0000) References: <3a18005d-bbb4-c201-c60f-a583711cba37@gmail.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 26 Jan 2022 00:14:21 +0000 > From: Sergey Vinokurov > > The #45720 bug introduces edge case in treatment of fill-column for the > first line of commented block. This is caught by haskell-mode tests > (https://github.com/haskell/haskell-mode/blob/master/tests/haskell-mode-tests.el#L330) > but is not limited to that mode. > > I have managed to reproduce it using the following snippet: > > (princ > (with-temp-buffer > (asm-mode) > (dolist (line '(" ;; a b c" > " ;; d e f" > " ;; x y z" > " ;; w")) > (insert line "\n")) > (goto-char (point-min)) > (end-of-line) > (setf fill-column 10) > (fill-paragraph nil) > (buffer-string))) > > The idea is that everything is already filled and nothing should happen > when fill-column equals to 10. Lars, do we revert the fix for bug#45720, or is there a better idea? From unknown Sun Aug 17 01:48:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#53537: Emacs 28 regression: fill-column is not always respected for the first line of commented block Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jan 2022 15:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53537 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 53537@debbugs.gnu.org, Sergey Vinokurov Received: via spool by 53537-submit@debbugs.gnu.org id=B53537.164321039117511 (code B ref 53537); Wed, 26 Jan 2022 15:20:02 +0000 Received: (at 53537) by debbugs.gnu.org; 26 Jan 2022 15:19:51 +0000 Received: from localhost ([127.0.0.1]:53181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCk5P-0004YM-Ec for submit@debbugs.gnu.org; Wed, 26 Jan 2022 10:19:51 -0500 Received: from quimby.gnus.org ([95.216.78.240]:48726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCk5N-0004Y8-Sn for 53537@debbugs.gnu.org; Wed, 26 Jan 2022 10:19:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LZWKJu8rKnHHrua5kHkuMut8U6KqfTqHACbyLZSEEIk=; b=h7qDh4YmvGyaEgshhiXNQ2j5M5 P/+ZEoT6pUktnZuhdkRrpbgbSWlVvbhMsm+/gl3LAsCWy5ZqTlQryc51PlPzKFCJp4kp1UqxCAUNW /7PYIAWDDBYVkOpE7zGuESsRNSF0Q8i61GRUXTZwZICK22lrawQML7ow2o5tQIrBsZ8s=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nCk5F-00036X-9p; Wed, 26 Jan 2022 16:19:43 +0100 From: Lars Ingebrigtsen References: <3a18005d-bbb4-c201-c60f-a583711cba37@gmail.com> <83sftahdkn.fsf@gnu.org> X-Now-Playing: Julie Driscoll, Brian Auger & The Trinity's _Jools & Brian_: "If You Should Ever Leave Me" Date: Wed, 26 Jan 2022 16:19:40 +0100 In-Reply-To: <83sftahdkn.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 26 Jan 2022 14:43:52 +0200") Message-ID: <87pmoer0c3.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Lars, do we revert the fix for bug#45720, or is there a better idea? I think this needs a lot more work, so I've reverted it in emacs-28, and added the new test case and left the now-failing old test case, and reopened #45720. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > Lars, do we revert the fix for bug#45720, or is there a better idea? I think this needs a lot more work, so I've reverted it in emacs-28, and added the new test case and left the now-failing old test case, and reopened #45720. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 26 10:20:03 2022 Received: (at control) by debbugs.gnu.org; 26 Jan 2022 15:20:03 +0000 Received: from localhost ([127.0.0.1]:53184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCk5a-0004Yw-Lw for submit@debbugs.gnu.org; Wed, 26 Jan 2022 10:20:03 -0500 Received: from quimby.gnus.org ([95.216.78.240]:48742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCk5Z-0004YZ-Dl for control@debbugs.gnu.org; Wed, 26 Jan 2022 10:20:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MHNsURpfzF2ZeIGg1mJJFIpTBPsR2YbKBzanjpzFBc0=; b=dDSI1YyNxt1tCHeXydeF8SmbaJ NglcMfJgS4ef8McWPMiMAqCAbu2SxJR3BdzNBth4Sy883Fekx7ZmlMSk9bRwfQ43Egepr1BAIGRfe RWceVxOwfAT+RI+i9/7FXQ2O4JabvzDlzSvD4McQakBIeKWU/OgNOg2fGhnIsIYYDUp8=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nCk5R-00036k-FZ for control@debbugs.gnu.org; Wed, 26 Jan 2022 16:19:55 +0100 Date: Wed, 26 Jan 2022 16:19:51 +0100 Message-Id: <87o83yr0bs.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #53537 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 53537 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 53537 28.1 quit