From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sergey Vinokurov Newsgroups: gmane.emacs.bugs Subject: bug#53537: Emacs 28 regression: fill-column is not always respected for the first line of commented block Date: Wed, 26 Jan 2022 00:14:21 +0000 Message-ID: <3a18005d-bbb4-c201-c60f-a583711cba37@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28845"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 To: 53537@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 26 01:16:54 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nCVzZ-0007N2-Qj for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Jan 2022 01:16:53 +0100 Original-Received: from localhost ([::1]:56368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCVzY-00026j-Gj for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Jan 2022 19:16:52 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCVxn-00024q-9E for bug-gnu-emacs@gnu.org; Tue, 25 Jan 2022 19:15:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57611) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nCVxm-00073s-8v for bug-gnu-emacs@gnu.org; Tue, 25 Jan 2022 19:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nCVxm-0007KC-3y for bug-gnu-emacs@gnu.org; Tue, 25 Jan 2022 19:15:02 -0500 X-Loop: help-debbugs@gnu.org 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-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.164315606928088 (code B ref -1); Wed, 26 Jan 2022 00:15:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Jan 2022 00:14:29 +0000 Original-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 Original-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 Original-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 Original-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 Original-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) Original-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) Content-Language: en-GB 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:225228 Archived-At: 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.