From unknown Fri Aug 15 03:38:05 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#22847 <22847@debbugs.gnu.org> To: bug#22847 <22847@debbugs.gnu.org> Subject: Status: #17062: 24.3 current-fill-column breaks fill-match-adaptive-prefix Reply-To: bug#22847 <22847@debbugs.gnu.org> Date: Fri, 15 Aug 2025 10:38:05 +0000 retitle 22847 #17062: 24.3 current-fill-column breaks fill-match-adaptive-p= refix reassign 22847 emacs submitter 22847 Andreas R=C3=B6hler severity 22847 minor tag 22847 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 29 02:32:36 2016 Received: (at submit) by debbugs.gnu.org; 29 Feb 2016 07:32:36 +0000 Received: from localhost ([127.0.0.1]:51799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaIJn-0002oo-VC for submit@debbugs.gnu.org; Mon, 29 Feb 2016 02:32:36 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60161) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaIJn-0002oY-E4 for submit@debbugs.gnu.org; Mon, 29 Feb 2016 02:32:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaIJh-0004Rh-13 for submit@debbugs.gnu.org; Mon, 29 Feb 2016 02:32:29 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaIJg-0004Rd-UO for submit@debbugs.gnu.org; Mon, 29 Feb 2016 02:32:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaIJf-00088p-Uc for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 02:32:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaIJb-0004Pf-Pw for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 02:32:27 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:59586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaIJb-0004PN-GN for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 02:32:23 -0500 Received: from [192.168.178.35] ([77.6.162.94]) by mrelayeu.kundenserver.de (mreue004) with ESMTPSA (Nemesis) id 0MSFaB-1aSmMQ3Cgd-00TYid for ; Mon, 29 Feb 2016 08:32:21 +0100 To: bug-gnu-emacs@gnu.org From: =?UTF-8?Q?Andreas_R=c3=b6hler?= Subject: #17062: 24.3 current-fill-column breaks fill-match-adaptive-prefix Message-ID: <56D3F443.9000706@easy-emacs.de> Date: Mon, 29 Feb 2016 08:33:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------070403000008000605030402" X-Provags-ID: V03:K0:EXFw9Kz67vAtB8dioJkHwY9tAyZEGslVnsVyiyHlRHKCbM04vAL ffAmNd4wX4qnKgvv5nl8JXuAbs8WW0cmZ42IAK164K/2aprv+JINkYGam8E1b+fhFHHSilT UMJAx5I1KTlJyh7BpO+YkBfsg5cNkFLQ94ugNmrWGH+umS0O0M5KKw6+0BVfx2EWfM2TH36 VkKL1faO6HUqo5HTb4YTg== X-UI-Out-Filterresults: notjunk:1;V01:K0:mhPl1pGuxOU=:8b1wAHBQHB6emPKmSv5nd7 bNSWLARCVEOhZmyS+KBCTC/iZEAXtZmcR6EeTBEyIrvvxbeV1g8aagethZZLvkLRKpgFIi9rD LC1HlvOHa+8xjTmn7bXcytbIC2c+JfhsOVJ9QC/frpEQOht0BRcIV74O8bqMZh2WGBQqUp3G1 4r1I3e9Olqk5hP9SRk2qJpxCWhnx/5x/+p5HmYHitLUdACRoQbD8r/qT3sz9EJ2PnIwE15/99 rJvU+aMw8ZvxCe+7BkkgOVWkmMOyZj/8WR/6RpoufUj7hRk9Usr7AHvQqV29biqJC7uEH17iu ayFT1YyPUYYOvlhMDGpOppk69utwn5by4vl22jRjD+lOjtIqW0QMDVliUsPuJ/6rP8zMjuL69 RXvTGnheUMNSXc27TNFkaH1coylnDD7KFlFUFlIDDiYjaFiPUkXJvJYvANTjtiXGVXkkNF9px r10ZuFUzOH2vEZmmq4Yp7KZYb8g2Tyihpsgs+s5qE88afj7NR19IkBXbVRme9UOb4GKdJp9Av yuJg78Vpno+cM63ar8BBSXPnNfzrpfwxzMeos3pZyihdbgfrAN+NYuTcc6rdaKg37KWldKiIS GhHo8O3LmZ4wQnhlwb+BEDIWYPjnnDE6GWyI/w7cI7Ab6xKPj2KrOHIlOmA8po9+lMANySOrU O6lFlqNAvPbQwsofUNZyXuxCnFzcF2hGy/scZkXkXs7tlcw4pZbZl5iT6XtbCQiLyCwEofO+J DQxDrFWi/WCgERuM X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit 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: -5.0 (-----) This is a multi-part message in MIME format. --------------070403000008000605030402 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit |reopen| #17062 Unfortunatly can't deliver a backtrace, as it was some times ago. The bug is visible by program-logic already. fill-match-adaptive-prefix counts on current-fill-column having: (>= (+ (current-left-margin) (length str)) (current-fill-column)) This will be broken if current-fill-column returns nil. Returning nil is possible, see inside current-fill-column: (if fill-column If fill-column is nil, current-fill-column will return nil which was the case coming upon. A fix might make sure an integer is returned anyway: think at 0 or default value. --------------070403000008000605030402 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit reopen #17062


Unfortunatly can't deliver a backtrace, as it was some times ago.

The bug is visible by program-logic already.

fill-match-adaptive-prefix counts on current-fill-column having:

(>= (+ (current-left-margin) (length str)) (current-fill-column))

This will be broken if current-fill-column returns nil.

Returning nil is possible, see inside current-fill-column:

    (if fill-column

If fill-column is nil, current-fill-column will return nil which was the case coming upon.
A fix might make sure an integer is returned anyway: think at 0 or default value.


--------------070403000008000605030402-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 29 02:49:23 2016 Received: (at control) by debbugs.gnu.org; 29 Feb 2016 07:49:23 +0000 Received: from localhost ([127.0.0.1]:51815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaIa2-0003Ej-Um for submit@debbugs.gnu.org; Mon, 29 Feb 2016 02:49:23 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:51915) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaIa1-0003EZ-1H for control@debbugs.gnu.org; Mon, 29 Feb 2016 02:49:21 -0500 Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aaIZa-0008Tp-6U for control@debbugs.gnu.org; Mon, 29 Feb 2016 08:48:54 +0100 Date: Mon, 29 Feb 2016 18:48:50 +1100 Message-Id: <87io18gdnh.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #17062 X-MailScanner-ID: 1aaIZa-0008Tp-6U X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1457336935.58753@98uW4usYkQ5Dgm0v340xag X-Spam-Status: No X-Spam-Score: 0.0 (/) 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: 0.0 (/) forcemerge 17062 22847 From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 29 10:57:18 2016 Received: (at 22847) by debbugs.gnu.org; 29 Feb 2016 15:57:18 +0000 Received: from localhost ([127.0.0.1]:53863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaQCE-0005uq-3w for submit@debbugs.gnu.org; Mon, 29 Feb 2016 10:57:18 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45820) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaQCC-0005ue-CE for 22847@debbugs.gnu.org; Mon, 29 Feb 2016 10:57:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaQC3-0003VZ-EK for 22847@debbugs.gnu.org; Mon, 29 Feb 2016 10:57:11 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaQC3-0003VV-B2; Mon, 29 Feb 2016 10:57:07 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4729 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aaQC2-0007FI-Ho; Mon, 29 Feb 2016 10:57:07 -0500 Date: Mon, 29 Feb 2016 17:56:54 +0200 Message-Id: <83si0b8q7t.fsf@gnu.org> From: Eli Zaretskii To: Andreas =?utf-8?Q?R=C3=B6hler?= In-reply-to: <56D3F443.9000706@easy-emacs.de> (message from Andreas =?utf-8?Q?R=C3=B6hler?= on Mon, 29 Feb 2016 08:33:23 +0100) Subject: Re: bug#22847: #17062: 24.3 current-fill-column breaks fill-match-adaptive-prefix References: <56D3F443.9000706@easy-emacs.de> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22847 Cc: 22847@debbugs.gnu.org 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Andreas Röhler > Date: Mon, 29 Feb 2016 08:33:23 +0100 > > fill-match-adaptive-prefix counts on current-fill-column having: > > (>= (+ (current-left-margin) (length str)) (current-fill-column)) > > This will be broken if current-fill-column returns nil. > > Returning nil is possible, see inside current-fill-column: > > (if fill-column > > If fill-column is nil, current-fill-column will return nil which was the case coming upon. > A fix might make sure an integer is returned anyway: think at 0 or default value. While at that, please also fix the calculation of string length: it should use 'string-width', not 'length', IMO. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 08 17:32:46 2016 Received: (at 22847) by debbugs.gnu.org; 8 Dec 2016 22:32:46 +0000 Received: from localhost ([127.0.0.1]:34955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cF7F8-0005PB-1F for submit@debbugs.gnu.org; Thu, 08 Dec 2016 17:32:46 -0500 Received: from eggs.gnu.org ([208.118.235.92]:36637) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cF7F7-0005Ox-2z for 22847@debbugs.gnu.org; Thu, 08 Dec 2016 17:32:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cF7F1-0003SA-5u for 22847@debbugs.gnu.org; Thu, 08 Dec 2016 17:32:39 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cF7F1-0003S6-3D for 22847@debbugs.gnu.org; Thu, 08 Dec 2016 17:32:39 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1cF7F0-00065S-I4; Thu, 08 Dec 2016 17:32:38 -0500 From: Glenn Morris To: 22847@debbugs.gnu.org Subject: Re: bug#22847: #17062: 24.3 current-fill-column breaks fill-match-adaptive-prefix References: <56D3F443.9000706@easy-emacs.de> <83si0b8q7t.fsf@gnu.org> X-Spook: PET Drug Administration Consular Recovery Albanian X-Ran: :x5#/GD-TdQd,hpLHb48 X-Hue: yellow X-Attribution: GM Date: Thu, 08 Dec 2016 17:32:38 -0500 In-Reply-To: <83si0b8q7t.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 29 Feb 2016 17:56:54 +0200") Message-ID: <7dvauuyruh.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.0 (--------) X-Debbugs-Envelope-To: 22847 Cc: Eli Zaretskii 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: -8.0 (--------) So this seems like a mess. fill-column is documented to be an integer, and that is its custom-type. Nowhere does it say it can be nil, AFAICS. Many places in Emacs are not prepared for it (or current-fill-column) to be nil. Yet 1e87252 explicitly added a check for a nil fill-column to current-fill-column. AFAICS, do-auto-fill is the only place in Emacs that tests for this, and uses it to disable auto-fill. The only uses I find for "(setq fill-column nil)" are a few people using it in their .emacs to disable auto-fill (I guess) in some major mode. The idiomatic way to do this is just to turn off auto-fill in that mode. TLDR: Let's remove the test for nil fill-column in current-fill-column. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 08 17:34:16 2016 Received: (at control) by debbugs.gnu.org; 8 Dec 2016 22:34:16 +0000 Received: from localhost ([127.0.0.1]:34959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cF7Ga-0005S9-AU for submit@debbugs.gnu.org; Thu, 08 Dec 2016 17:34:16 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37001) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cF7GY-0005Ru-QB for control@debbugs.gnu.org; Thu, 08 Dec 2016 17:34:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cF7GT-0003vs-5I for control@debbugs.gnu.org; Thu, 08 Dec 2016 17:34:09 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cF7GT-0003vn-2O for control@debbugs.gnu.org; Thu, 08 Dec 2016 17:34:09 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1cF7GS-0006mC-PB for control@debbugs.gnu.org; Thu, 08 Dec 2016 17:34:08 -0500 Subject: control message for bug 17062 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Thu, 08 Dec 2016 17:34:08 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.0 (--------) 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: -8.0 (--------) tag 17062 - moreinfo From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 09 03:08:14 2016 Received: (at 22847) by debbugs.gnu.org; 9 Dec 2016 08:08:14 +0000 Received: from localhost ([127.0.0.1]:35171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFGE2-0006ug-91 for submit@debbugs.gnu.org; Fri, 09 Dec 2016 03:08:14 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFGE1-0006uR-5i for 22847@debbugs.gnu.org; Fri, 09 Dec 2016 03:08:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFGDq-0006m4-99 for 22847@debbugs.gnu.org; Fri, 09 Dec 2016 03:08:08 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFGDq-0006lu-4d for 22847@debbugs.gnu.org; Fri, 09 Dec 2016 03:08:02 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3349 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cFGDo-0005R8-J4; Fri, 09 Dec 2016 03:08:01 -0500 Date: Fri, 09 Dec 2016 10:08:29 +0200 Message-Id: <831sxhikxu.fsf@gnu.org> From: Eli Zaretskii To: Glenn Morris In-reply-to: <7dvauuyruh.fsf@fencepost.gnu.org> (message from Glenn Morris on Thu, 08 Dec 2016 17:32:38 -0500) Subject: Re: bug#22847: #17062: 24.3 current-fill-column breaks fill-match-adaptive-prefix References: <56D3F443.9000706@easy-emacs.de> <83si0b8q7t.fsf@gnu.org> <7dvauuyruh.fsf@fencepost.gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.0 (--------) X-Debbugs-Envelope-To: 22847 Cc: 22847@debbugs.gnu.org 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.0 (--------) > From: Glenn Morris > cc: Eli Zaretskii > Date: Thu, 08 Dec 2016 17:32:38 -0500 > > So this seems like a mess. But a very old one. > fill-column is documented to be an integer, and that is its custom-type. > Nowhere does it say it can be nil, AFAICS. > Many places in Emacs are not prepared for it (or current-fill-column) to > be nil. > > Yet 1e87252 explicitly added a check for a nil fill-column to > current-fill-column. AFAICS, do-auto-fill is the only place in Emacs > that tests for this, and uses it to disable auto-fill. > > The only uses I find for "(setq fill-column nil)" are a few people using > it in their .emacs to disable auto-fill (I guess) in some major mode. > The idiomatic way to do this is just to turn off auto-fill in that mode. > > TLDR: > Let's remove the test for nil fill-column in current-fill-column. I don't understand what you propose to do instead. current-fill-column does arithmetics on fill-column when it's non-nil, so we cannot just remove the test, because the function will then signal an error. I see 3 possible ways to fix these bugs: . Fix the code which is not prepared for fill-column being nil to be prepared. This leaves everyone happy, except, perhaps, the person who would need to fix all those places in Emacs. . Change current-fill-column to return most-positive-fixnum when fill-column is nil. This is an easy way out, but it might slow down do-auto-fill when fill-column is nil. Not sure if we care about that slow down. . Disallow fill-column being nil and remove the test from current-fill-column without changing anything else, i.e. let it signal an error, perhaps with some text that tells this value is no longer supported. This will break setups of those who use that value to disable auto-fill, something that was available since forever, so I don't think we can do that. Comments? From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 10 21:19:05 2016 Received: (at 22847) by debbugs.gnu.org; 11 Dec 2016 02:19:05 +0000 Received: from localhost ([127.0.0.1]:37374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFtjF-0002Vt-5v for submit@debbugs.gnu.org; Sat, 10 Dec 2016 21:19:05 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFtjE-0002VP-I5 for 22847@debbugs.gnu.org; Sat, 10 Dec 2016 21:19:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFtj8-0004ux-Ln for 22847@debbugs.gnu.org; Sat, 10 Dec 2016 21:18:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFtj8-0004us-IK for 22847@debbugs.gnu.org; Sat, 10 Dec 2016 21:18:58 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1cFtj8-0003dl-3m; Sat, 10 Dec 2016 21:18:58 -0500 From: Glenn Morris To: Eli Zaretskii Subject: Re: bug#22847: #17062: 24.3 current-fill-column breaks fill-match-adaptive-prefix References: <56D3F443.9000706@easy-emacs.de> <83si0b8q7t.fsf@gnu.org> <7dvauuyruh.fsf@fencepost.gnu.org> <831sxhikxu.fsf@gnu.org> X-Spook: argus Merlin Al Qaida Chemical spill Wave MILSATCOM X-Ran: HW@GG:pIi@Y5nv@C#-oKYJHs16'=3hjYtyZD{HEN,~5G,1J`JTad%tpixo][5E6zU0*M"m X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Sat, 10 Dec 2016 21:18:57 -0500 In-Reply-To: <831sxhikxu.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 09 Dec 2016 10:08:29 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.0 (--------) X-Debbugs-Envelope-To: 22847 Cc: 22847@debbugs.gnu.org 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: -8.0 (--------) Eli Zaretskii wrote: >> TLDR: >> Let's remove the test for nil fill-column in current-fill-column. > > I don't understand what you propose to do instead. > current-fill-column does arithmetics on fill-column when it's non-nil, > so we cannot just remove the test, because the function will then > signal an error. Yes, I'm fine with the error. > I see 3 possible ways to fix these bugs: > > . Fix the code which is not prepared for fill-column being nil to be > prepared. This leaves everyone happy, except, perhaps, the person > who would need to fix all those places in Emacs. I think this would be a waste of time for the Emacs, and third party, maintainers. > . Change current-fill-column to return most-positive-fixnum when > fill-column is nil. I suppose this would be ok, so long as it comes with something like a once-per session display-warning about this being an obsolete usage that will be removed soon. > . Disallow fill-column being nil and remove the test from > current-fill-column without changing anything else, i.e. let it > signal an error, perhaps with some text that tells this value is > no longer supported. This will break setups of those who use that > value to disable auto-fill, something that was available since > forever, so I don't think we can do that. That's what I would do. I don't have a problem breaking an undocumented feature that already fails in several places, and has a trivial workaround (don't want auto-fill - don't turn it on). Other times I can recall similar breakage happening: byte-compile of nil, setq with odd number of arguments. People gripe for a bit, then get on with life. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 15 01:14:19 2020 Received: (at 22847) by debbugs.gnu.org; 15 Aug 2020 05:14:19 +0000 Received: from localhost ([127.0.0.1]:54191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6oWJ-0000pR-Bh for submit@debbugs.gnu.org; Sat, 15 Aug 2020 01:14:19 -0400 Received: from mail-yb1-f194.google.com ([209.85.219.194]:41881) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6oWG-0000p5-Di for 22847@debbugs.gnu.org; Sat, 15 Aug 2020 01:14:16 -0400 Received: by mail-yb1-f194.google.com with SMTP id s195so6349582ybc.8 for <22847@debbugs.gnu.org>; Fri, 14 Aug 2020 22:14:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=Ux6I8ve1h+cpedoBCkRzxW2Yu9gfbM3oCWsw/opS0nQ=; b=i0j+eEun/L9/Vt+Ec9jqVM3BZPqXVFXAAgC7PT1ZdeXUn2oLdHhsRK7YmQ0OM24u2s A6RFpN3QFa2DxrNL5rZUdwwkKheVWuMbw7svPHI0AyBwQF4oj85YiDCOAZEKIbX7RVcd y8KckIQX1Sy/cJl9HRo0hO8EOk9kE8wZvmHhw3qAKTTZCs45c4c84NxxLL32e/rZ/xQa 3NXL7t6NxNG14yyAJsMinqg1oN7pL2ZwDhUCs7OzLxTHfwY6uePACFOtOfXK0XWa9d2w lTdTmh4CB12Glg2Uogv570NueF/VeuZ1FIdNM3L+eGkvJytY+jO0mTVYiihtBBDCIy1W i+lQ== X-Gm-Message-State: AOAM531DDDkI6+wqjqFQlqCI0z0xDf8iswigx+c+Dwmv8EaoRZ3YmToi f4IQTyWvCsOq3jNDvXWKJfUO4n7fcfY2E5domFQ= X-Google-Smtp-Source: ABdhPJylRgabaF2PWiT4rPYXahg4EfLQfyhXtOcpHPY4GEL0HGUOBYqb1ps8z8UwmPqaRA8EPBXuRO9Oe1RU4jOssdI= X-Received: by 2002:a5b:410:: with SMTP id m16mr7706540ybp.309.1597468450953; Fri, 14 Aug 2020 22:14:10 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 14 Aug 2020 22:14:09 -0700 From: Stefan Kangas In-Reply-To: (Glenn Morris's message of "Sat, 10 Dec 2016 21:18:57 -0500") References: <56D3F443.9000706@easy-emacs.de> <83si0b8q7t.fsf@gnu.org> <7dvauuyruh.fsf@fencepost.gnu.org> <831sxhikxu.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Fri, 14 Aug 2020 22:14:09 -0700 Message-ID: Subject: Re: bug#22847: #17062: 24.3 current-fill-column breaks fill-match-adaptive-prefix To: Glenn Morris Content-Type: multipart/mixed; boundary="0000000000008f3ff905ace39bba" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22847 Cc: 22847@debbugs.gnu.org, Eli Zaretskii 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: -1.0 (-) --0000000000008f3ff905ace39bba Content-Type: text/plain; charset="UTF-8" tags 22847 + patch thanks Glenn Morris writes: > Eli Zaretskii wrote: > >>> TLDR: >>> Let's remove the test for nil fill-column in current-fill-column. >> >> I don't understand what you propose to do instead. >> current-fill-column does arithmetics on fill-column when it's non-nil, >> so we cannot just remove the test, because the function will then >> signal an error. > > Yes, I'm fine with the error. > >> I see 3 possible ways to fix these bugs: >> >> . Fix the code which is not prepared for fill-column being nil to be >> prepared. This leaves everyone happy, except, perhaps, the person >> who would need to fix all those places in Emacs. > > I think this would be a waste of time for the Emacs, and third party, > maintainers. Agreed. >> . Change current-fill-column to return most-positive-fixnum when >> fill-column is nil. > > I suppose this would be ok, so long as it comes with something like a > once-per session display-warning about this being an obsolete usage that > will be removed soon. I've attached a proposed patch which does that here. >> . Disallow fill-column being nil and remove the test from >> current-fill-column without changing anything else, i.e. let it >> signal an error, perhaps with some text that tells this value is >> no longer supported. This will break setups of those who use that >> value to disable auto-fill, something that was available since >> forever, so I don't think we can do that. > > That's what I would do. I don't have a problem breaking an undocumented > feature that already fails in several places, and has a trivial > workaround (don't want auto-fill - don't turn it on). Other times I can > recall similar breakage happening: byte-compile of nil, setq with odd > number of arguments. People gripe for a bit, then get on with life. I'm perfectly fine with this solution as well, if we prefer that. Thoughts? Best regards, Stefan Kangas --0000000000008f3ff905ace39bba Content-Type: text/x-diff; charset="US-ASCII"; name="0001-Make-nil-value-of-fill-column-obsolete.patch" Content-Disposition: attachment; filename="0001-Make-nil-value-of-fill-column-obsolete.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: 6aadec35deeb4c85_0.1 RnJvbSA1ZjQxZDhkZjg1Y2Q3ZTE2YTdhMzM1NTkyYTAyYjNkYzM4ZGM5YjBiIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBTdGVmYW4gS2FuZ2FzIDxzdGVmY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lIGNoYW5nZQogCQkgIGhlcmUtY29sIGNvbCkpCi0JICAobWF4IGhlcmUtY29sIGZpbGwt Y29sKSkpKSkKKwkgIChtYXggaGVyZS1jb2wgZmlsbC1jb2wpKQorICAgICAgOzsgVGhpcyB3YXJu aW5nIHdhcyBhZGRlZCBpbiAyOC4xLiAgSXQgc2hvdWxkIGJlIHJlbW92ZWQgbGF0ZXIsCisgICAg ICA7OyBhbmQgdGhpcyBmdW5jdGlvbiBjaGFuZ2VkIHRvIG5ldmVyIHJldHVybiBuaWwuCisgICAg ICAodW5sZXNzIGN1cnJlbnQtZmlsbC1jb2x1bW4tLWhhcy13YXJuZWQKKyAgICAgICAgKGx3YXJu ICcoZmlsbC1jb2x1bW4pIDp3YXJuaW5nCisgICAgICAgICAgICAgICAiU2V0dGluZyB0aGlzIHZh cmlhYmxlIHRvIG5pbCBpcyBvYnNvbGV0ZSIpCisgICAgICAgIChzZXRxIGN1cnJlbnQtZmlsbC1j b2x1bW4tLWhhcy13YXJuZWQgdCkpCisgICAgICBtb3N0LXBvc2l0aXZlLWZpeG51bSkpKQogCiAo ZGVmdW4gY2Fub25pY2FsbHktc3BhY2UtcmVnaW9uIChiZWcgZW5kKQogICAiUmVtb3ZlIGV4dHJh IHNwYWNlcyBiZXR3ZWVuIHdvcmRzIGluIHJlZ2lvbi4KLS0gCjIuMjguMAoK --0000000000008f3ff905ace39bba-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 10 07:48:20 2021 Received: (at 22847) by debbugs.gnu.org; 10 May 2021 11:48:20 +0000 Received: from localhost ([127.0.0.1]:57569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lg4Oa-0002xK-6F for submit@debbugs.gnu.org; Mon, 10 May 2021 07:48:20 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lg4OY-0002x8-7r for 22847@debbugs.gnu.org; Mon, 10 May 2021 07:48:19 -0400 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=BhZcHrWXiXx37NtNVi5OfCAR9R57q1nVNk/UccZ31gs=; b=smExuIZREDcCCLUCq1/LSjw0wg lSIAHfzPQcAoSKas+0sMXJ2xeapwMXh1KiHQV09TYe/4xWIsZRVPbZ4XrO7VkNzIkfulSLhwVftMO kPGLRIdWEYTRurCZaOq7mMwqocPG7DeFUTSEQmwgDGvi7XgRqtRfU1bxu41CG/g+TAGI=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lg4OQ-0007lo-1E; Mon, 10 May 2021 13:48:12 +0200 From: Lars Ingebrigtsen To: Stefan Kangas Subject: Re: bug#22847: #17062: 24.3 current-fill-column breaks fill-match-adaptive-prefix References: <56D3F443.9000706@easy-emacs.de> <83si0b8q7t.fsf@gnu.org> <7dvauuyruh.fsf@fencepost.gnu.org> <831sxhikxu.fsf@gnu.org> X-Now-Playing: Severed Heads's _Gigapus_: "Pure" Date: Mon, 10 May 2021 13:48:09 +0200 In-Reply-To: (Stefan Kangas's message of "Fri, 14 Aug 2020 22:14:09 -0700") Message-ID: <875yzqstc6.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: Stefan Kangas writes: > +** Setting fill-columns to nil is obsolete. > +This undocumented use of fill-columns is now obsolete. If you have > +set this value to nil disable auto filling, stop setting this variable > +and di [...] 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: 0.0 (/) X-Debbugs-Envelope-To: 22847 Cc: 22847@debbugs.gnu.org, Glenn Morris , Eli Zaretskii 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: -1.0 (-) Stefan Kangas writes: > +** Setting fill-columns to nil is obsolete. > +This undocumented use of fill-columns is now obsolete. If you have > +set this value to nil disable auto filling, stop setting this variable > +and disable auto-fill-mode in the relevant mode instead. Skimming this thread, this patch makes sense to me, I think? But it was never applied? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon May 10 09:29:57 2021 Received: (at 22847) by debbugs.gnu.org; 10 May 2021 13:29:57 +0000 Received: from localhost ([127.0.0.1]:57734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lg5yv-0005mx-Jx for submit@debbugs.gnu.org; Mon, 10 May 2021 09:29:57 -0400 Received: from mail-pj1-f43.google.com ([209.85.216.43]:34780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lg5yt-0005mk-KI for 22847@debbugs.gnu.org; Mon, 10 May 2021 09:29:56 -0400 Received: by mail-pj1-f43.google.com with SMTP id t2-20020a17090a0242b0290155433387beso8266764pje.1 for <22847@debbugs.gnu.org>; Mon, 10 May 2021 06:29:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=8ScgPAl0ozRZt9D/2wzYSvEVUC9p8lp7f3ClbTEaBv4=; b=PiT4X2PJ9IiRKQJSrRTXREevFuC4/DUfJTYIScQ3RNQ9OtEhBt3ey5Dxc0pwwbw/Iz pXdL+2+xckP1l37gKpNolbLgYv6Tr9YhgvJ5ooQV6Au7taaL8SRXzx5XCdlomYmOy4DQ HhFKlZysBdlvYanMpDlu1ke2UcqpuQYQl0peKV+QKdktyNmH+0aUR6ojpB+yz/2xXI/J Z0WrgmAnqbAp+rygDOrsL4HRU5pyFNo7iE1BtBhh6HfePmGfx1HSmekz3B4ecT9ivBdJ 4cKkoYJEfSKPaP7pTz3kY5WWm41o2f79ZhAITCRVZKDbvmS+57cVFLUAZ2VPrX/aaGjt tvWg== X-Gm-Message-State: AOAM530dbxi1xXwVy3H2D64a6n89HV3HFlPVuTI8MlB7xavpPvzfIbhF eJ1gIiVfz7sB0g2zYUZfNX4+4YjstDSI6lgSWdU= X-Google-Smtp-Source: ABdhPJwUNYEYNjGM3H4p6iidzX/N6d0DL4VudqcUq30GpVhoa7GfQ07vo9935CCc9FIFkJ5zaqeMPR2ZH+Gc/6QReAU= X-Received: by 2002:a17:90b:350:: with SMTP id fh16mr28270037pjb.104.1620653389772; Mon, 10 May 2021 06:29:49 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 10 May 2021 08:29:49 -0500 From: Stefan Kangas In-Reply-To: <875yzqstc6.fsf@gnus.org> References: <56D3F443.9000706@easy-emacs.de> <83si0b8q7t.fsf@gnu.org> <7dvauuyruh.fsf@fencepost.gnu.org> <831sxhikxu.fsf@gnu.org> <875yzqstc6.fsf@gnus.org> MIME-Version: 1.0 Date: Mon, 10 May 2021 08:29:49 -0500 Message-ID: Subject: Re: bug#22847: #17062: 24.3 current-fill-column breaks fill-match-adaptive-prefix To: Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 22847 Cc: 22847@debbugs.gnu.org, Glenn Morris , Eli Zaretskii 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: -0.5 (/) Lars Ingebrigtsen writes: > Stefan Kangas writes: > >> +** Setting fill-columns to nil is obsolete. >> +This undocumented use of fill-columns is now obsolete. If you have >> +set this value to nil disable auto filling, stop setting this variable >> +and disable auto-fill-mode in the relevant mode instead. > > Skimming this thread, this patch makes sense to me, I think? But it was > never applied? There might be a subtle problem with it after all but I can't remember the details now. This code is a little bit more tricky than what first meets the eye, I think. So I would suggest someone takes a closer look before installing. From debbugs-submit-bounces@debbugs.gnu.org Wed May 12 09:26:06 2021 Received: (at 22847) by debbugs.gnu.org; 12 May 2021 13:26:07 +0000 Received: from localhost ([127.0.0.1]:38446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgosI-0005iu-Cx for submit@debbugs.gnu.org; Wed, 12 May 2021 09:26:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgosD-0005iP-Rh for 22847@debbugs.gnu.org; Wed, 12 May 2021 09:26:05 -0400 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=x3S1s3NSQXYBxzfrtVXleNKNt8hpjzKxsQonOR3FKk0=; b=ocs7bbQDVMDMyNQhvgfq52e6G3 skW1UC3lk8v0tx+/Vu7NGWuGr22TM9zR19oj5Y5WyJB2FvVUMV2URP+8122XRzVIOVsMdMVqcA+F4 XECzRlKTLS/8s7Aww4tk4q6/dOrfUIefS9NUd6PArx1LPSYCmDYVFqi6slZVKEGmRGN0=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lgos4-0004oY-7T; Wed, 12 May 2021 15:25:55 +0200 From: Lars Ingebrigtsen To: Stefan Kangas Subject: Re: bug#22847: #17062: 24.3 current-fill-column breaks fill-match-adaptive-prefix References: <56D3F443.9000706@easy-emacs.de> <83si0b8q7t.fsf@gnu.org> <7dvauuyruh.fsf@fencepost.gnu.org> <831sxhikxu.fsf@gnu.org> <875yzqstc6.fsf@gnus.org> X-Now-Playing: Neil Young's _Archives Vol. II (1): Everybody's Alone (1972 - 1976)_: "Sweet Joni" Date: Wed, 12 May 2021 15:25:51 +0200 In-Reply-To: (Stefan Kangas's message of "Mon, 10 May 2021 08:29:49 -0500") Message-ID: <871rackrs0.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: Stefan Kangas writes: > There might be a subtle problem with it after all but I can't remember > the details now. > > This code is a little bit more tricky than what first meets the eye, I > think. So I would suggest someo [...] 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: 0.0 (/) X-Debbugs-Envelope-To: 22847 Cc: 22847@debbugs.gnu.org, Glenn Morris , Eli Zaretskii 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: -1.0 (-) Stefan Kangas writes: > There might be a subtle problem with it after all but I can't remember > the details now. > > This code is a little bit more tricky than what first meets the eye, I > think. So I would suggest someone takes a closer look before > installing. I've given the patch a try, and it seems to work as advertised. Does anybody else have a comment? I've respun the patch against the current tree and done some minor edits: diff --git a/etc/NEWS b/etc/NEWS index de3779cd73..3069b4d498 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -108,6 +108,16 @@ avoid security issues when executing untrusted code. See the manual page for 'seccomp' system call, for details about Secure Computing filters. +** Setting 'fill-column' to nil is obsolete. +This undocumented use of 'fill-column' is now obsolete. If you have +set this value to nil disable auto filling, instead disable +'auto-fill-mode' in the relevant mode instead. + +For instance, you could add something like the following to your init +file: + + (add-hook 'foo-mode-hook (lambda () (auto-fill-mode -1)) + * Changes in Emacs 28.1 diff --git a/lisp/simple.el b/lisp/simple.el index b4e34f1e4c..d21daf9e19 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -7931,7 +7931,7 @@ do-auto-fill (let (fc justify give-up (fill-prefix fill-prefix)) (if (or (not (setq justify (current-justification))) - (null (setq fc (current-fill-column))) + (setq fc (current-fill-column)) (and (eq justify 'left) (<= (current-column) fc)) (and auto-fill-inhibit-regexp diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 3914bdeb83..f394171fb6 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -133,6 +133,8 @@ adaptive-fill-function (defvar fill-indent-according-to-mode nil ;Screws up CC-mode's filling tricks. "Whether or not filling should try to use the major mode's indentation.") +(defvar current-fill-column--has-warned nil) + (defun current-fill-column () "Return the fill-column to use for this line. The fill-column to use for a buffer is stored in the variable `fill-column', @@ -158,7 +160,14 @@ current-fill-column (< col fill-col))) (setq here change here-col col)) - (max here-col fill-col))))) + (max here-col fill-col)) + ;; This warning was added in 28.1. It should be removed later, + ;; and this function changed to never return nil. + (unless current-fill-column--has-warned + (lwarn '(fill-column) :warning + "Setting this variable to nil is obsolete; use `(auto-fill-mode -1)' instead") + (setq current-fill-column--has-warned t)) + most-positive-fixnum))) (defun canonically-space-region (beg end) "Remove extra spaces between words in region. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 23 08:58:32 2021 Received: (at 22847) by debbugs.gnu.org; 23 Jul 2021 12:58:33 +0000 Received: from localhost ([127.0.0.1]:42554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6ul6-0001xF-Nj for submit@debbugs.gnu.org; Fri, 23 Jul 2021 08:58:32 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6ul4-0001wy-PV for 22847@debbugs.gnu.org; Fri, 23 Jul 2021 08:58:31 -0400 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=p7xdGTNJtXMKSOuqmVEeSgNDwXWalX5yqrfskWt+RlU=; b=WOK35PFpENVhz1mvPsBsPvdQPd Y4/TIJYrRoqrG1wdzm2RA3U/J/LpkIO/M3JN0YdWV9MKUxniAsyJyEaqSieSy1SYksCG0a8dskhUK 0aXEyy7v5vbrIW0I+R7Xqn8rY07wBztckOT86cVV/mrnQEQ+WG3l+SWUn6BO/ZwgT0H8=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6ukw-0008Ia-Iz; Fri, 23 Jul 2021 14:58:24 +0200 From: Lars Ingebrigtsen To: Stefan Kangas Subject: Re: bug#22847: #17062: 24.3 current-fill-column breaks fill-match-adaptive-prefix References: <56D3F443.9000706@easy-emacs.de> <83si0b8q7t.fsf@gnu.org> <7dvauuyruh.fsf@fencepost.gnu.org> <831sxhikxu.fsf@gnu.org> <875yzqstc6.fsf@gnus.org> <871rackrs0.fsf@gnus.org> X-Now-Playing: The Human League's _Octopus (2)_: "Tell Me When (Demo)" Date: Fri, 23 Jul 2021 14:58:22 +0200 In-Reply-To: <871rackrs0.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 12 May 2021 15:25:51 +0200") Message-ID: <87tuklchld.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: Lars Ingebrigtsen writes: > I've given the patch a try, and it seems to work as advertised. Does > anybody else have a comment? There were no comments, so I've now pushed Stefan K's patch to the trunk. 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: 22847 Cc: 22847@debbugs.gnu.org, Glenn Morris , Eli Zaretskii 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 (---) Lars Ingebrigtsen writes: > I've given the patch a try, and it seems to work as advertised. Does > anybody else have a comment? There were no comments, so I've now pushed Stefan K's patch to the trunk. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 23 08:58:38 2021 Received: (at control) by debbugs.gnu.org; 23 Jul 2021 12:58:38 +0000 Received: from localhost ([127.0.0.1]:42557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6ulB-0001xW-VZ for submit@debbugs.gnu.org; Fri, 23 Jul 2021 08:58:38 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6ulA-0001x7-7P for control@debbugs.gnu.org; Fri, 23 Jul 2021 08:58:36 -0400 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=Ht//La64rNx0LFwAAI3urpzVlaXCEcjo2j2slDuvcJs=; b=XFlm67os6/WRa/iFjbgvTyP4pe WT33oVUHuUkBkx2Lqrv41hqTLZpHYZ/iGbVj1oMDVaVyEMiPlZsE9/tqY9EU2mh2ArFTZLq6g3Hj6 ABsOcmFl7SPbRtsZ0yN7bp9HzS9Fmin3dly+rWLMLtSF3MQy8zicpoB5Dk/zK8eMC9IM=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6ul2-0008Il-HU for control@debbugs.gnu.org; Fri, 23 Jul 2021 14:58:30 +0200 Date: Fri, 23 Jul 2021 14:58:28 +0200 Message-Id: <87sg05chl7.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #22847 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 22847 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 22847 28.1 quit From unknown Fri Aug 15 03:38:05 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 21 Aug 2021 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator