From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#66326: 29.1.50; There should be a way to promote warnings to errors Date: Fri, 10 Nov 2023 16:40:14 -0500 Message-ID: References: <83y1gj5ya9.fsf@gnu.org> <87wmw3zfd3.fsf@catern.com> <83wmw353ny.fsf@gnu.org> <83mswlslxu.fsf@gnu.org> <87o7h0yh7k.fsf@catern.com> <83a5skqvzz.fsf@gnu.org> <83r0lqu7wi.fsf@gnu.org> <83cyxatzva.fsf@gnu.org> <83bkcuty8v.fsf@gnu.org> <83v8b1sqtw.fsf@gnu.org> <875y30t7jr.fsf@catern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26215"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 66326@debbugs.gnu.org, Stefan Kangas To: sbaugh@catern.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 10 22:41:48 2023 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 1r1ZG5-0004py-MT for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Nov 2023 22:41:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1ZFl-0001UZ-DQ; Fri, 10 Nov 2023 16:41:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1ZFj-0001NG-BT for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2023 16:41:23 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r1ZFi-0005ru-Lz for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2023 16:41:23 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r1ZGM-0000Qz-Bi for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2023 16:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Nov 2023 21:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66326 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66326-submit@debbugs.gnu.org id=B66326.16996524631586 (code B ref 66326); Fri, 10 Nov 2023 21:42:02 +0000 Original-Received: (at 66326) by debbugs.gnu.org; 10 Nov 2023 21:41:03 +0000 Original-Received: from localhost ([127.0.0.1]:50967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1ZFO-0000PW-UR for submit@debbugs.gnu.org; Fri, 10 Nov 2023 16:41:03 -0500 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]:49247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1ZFL-0000Oq-SX for 66326@debbugs.gnu.org; Fri, 10 Nov 2023 16:41:01 -0500 In-Reply-To: <875y30t7jr.fsf@catern.com> (sbaugh@catern.com's message of "Sat, 21 Oct 2023 13:43:37 +0000 (UTC)") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275495 sbaugh@catern.com writes: > Stefan Kangas writes: > >> Eli Zaretskii writes: >> >>> More generally, I'm worried by the tendency of people to submit >>> patches for Emacs as soon as they find something they think is missing >>> in Emacs that they need for some one-time job. Emacs is not supposed >>> to be a huge heap of random features that someone at some time found >>> useful for some random job. Emacs is Free Software: you can easily >>> implement this stuff in your local copy and use it as much as you >>> want; no need to add that to the Emacs core, unless there's a real >>> need for it expressed by enough people, and no better solutions in >>> hand. I do this for my local jobs all the time. >> >> FWIW, I'm generally always in favor of features that make the Emacs Lisp >> developers' lives easier, and as much as I appreciate that some users >> might want to debug warnings, I don't think I understand the use case(s). > > I see, let me try to explain further. (BTW, before submitting I > discussed the idea of this patch on #emacs on Libera IRC and people > seemed interested and approving, which is why I assumed this would be > uncontroversial. If I had realized I would have sent it to > emacs-devel.) > > I had some warnings and I went to debug them, and I assumed there would > be some kind of debug-on-warning like how there is debug-on-error and > debug-on-message and debug-on-quit. But there is not. So I figured it > would be uncontroversial to add something which enables a > debug-on-warning, since right now it is difficult to find out what code > triggered some warning. > > The alternative which I've been using is > (debug-on-entry 'display-warning) > but this: > 1. always debugs regardless of what kind of warning > 2. isn't helpful for the "automated tests where warnings > should fail the test" use case I just ran into a situation like this yet again. Again, there was a stray warning on startup (something about "Symbol=E2=80=99s value as variab= le is void", definitely concerning), which the warning itself didn't provide sufficient information to track down. I did my usual (debug-on-entry 'display-warning)... ...but then I ran into the further issue that this Emacs had the "editorconfig" package installed, which apparently calls display-warning at :debug level on every buffer switch. So I spent a while hitting c in the debugger. I would have like to be able to turn only :error level warnings into... errors. Which is what this feature would provide.