From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#22847: #17062: 24.3 current-fill-column breaks fill-match-adaptive-prefix Date: Fri, 14 Aug 2020 22:14:09 -0700 Message-ID: References: <56D3F443.9000706@easy-emacs.de> <83si0b8q7t.fsf@gnu.org> <7dvauuyruh.fsf@fencepost.gnu.org> <831sxhikxu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0000000000008f3ff905ace39bba" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5915"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 22847@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 15 07:15:11 2020 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 1k6oX9-0001Ox-4B for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Aug 2020 07:15:11 +0200 Original-Received: from localhost ([::1]:50016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6oX8-0004N4-0H for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Aug 2020 01:15:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6oX0-0004MT-9d for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2020 01:15:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42645) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k6oX0-0001x0-0N for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2020 01:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k6oWz-0000qm-RU for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2020 01:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Aug 2020 05:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22847 X-GNU-PR-Package: emacs Original-Received: via spool by 22847-submit@debbugs.gnu.org id=B22847.15974684593198 (code B ref 22847); Sat, 15 Aug 2020 05:15:01 +0000 Original-Received: (at 22847) by debbugs.gnu.org; 15 Aug 2020 05:14:19 +0000 Original-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 Original-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 Original-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) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 14 Aug 2020 22:14:09 -0700 In-Reply-To: (Glenn Morris's message of "Sat, 10 Dec 2016 21:18:57 -0500") 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:185192 Archived-At: --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 MDA6MDA6MDAgMjAwMQpGcm9tOiBTdGVmYW4gS2FuZ2FzIDxzdGVmYW5rYW5nYXNAZ21haWwuY29t PgpEYXRlOiBTYXQsIDE1IEF1ZyAyMDIwIDA2OjU2OjA1ICswMjAwClN1YmplY3Q6IFtQQVRDSF0g TWFrZSBuaWwgdmFsdWUgb2YgZmlsbC1jb2x1bW4gb2Jzb2xldGUK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