From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=C3=93scar?= Fuentes Newsgroups: gmane.emacs.bugs Subject: bug#70752: 30.0.50; flymake: add a command for resetting state Date: Sat, 18 May 2024 17:09:59 +0200 Message-ID: <87ikzbqhq0.fsf@telefonica.net> References: <87zft6hkli.fsf@telefonica.net> 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="30182"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 70752@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 18 17:11:26 2024 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 1s8LiY-0007fB-0u for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 May 2024 17:11:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8Li9-0006qU-0f; Sat, 18 May 2024 11:11:01 -0400 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 1s8Li6-0006po-Ts for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 11:10:58 -0400 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 1s8Li6-0002NO-LY for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 11:10:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s8Li9-0005cU-T6 for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 11:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 May 2024 15:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70752 X-GNU-PR-Package: emacs Original-Received: via spool by 70752-submit@debbugs.gnu.org id=B70752.171604501721567 (code B ref 70752); Sat, 18 May 2024 15:11:01 +0000 Original-Received: (at 70752) by debbugs.gnu.org; 18 May 2024 15:10:17 +0000 Original-Received: from localhost ([127.0.0.1]:33963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8LhR-0005bn-Cw for submit@debbugs.gnu.org; Sat, 18 May 2024 11:10:17 -0400 Original-Received: from relayout03-redir.e.movistar.es ([86.109.101.203]:28443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8LhO-0005bZ-VY for 70752@debbugs.gnu.org; Sat, 18 May 2024 11:10:16 -0400 Original-Received: from sky (81.red-81-39-130.dynamicip.rima-tde.net [81.39.130.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: 981711563@telefonica.net) by relayout03.e.movistar.es (Postfix) with ESMTPSA id 4VhS1M5FF4zMlhK; Sat, 18 May 2024 17:09:59 +0200 (CEST) In-Reply-To: (Spencer Baugh's message of "Sat, 18 May 2024 10:37:21 -0400") X-TnetOut-Country: IP: 81.39.130.81 | Country: ES X-TnetOut-Information: AntiSPAM and AntiVIRUS on relayout03 X-TnetOut-MsgID: 4VhS1M5FF4zMlhK.A41FF X-TnetOut-SpamCheck: no es spam, clean X-TnetOut-From: ofv@wanadoo.es X-TnetOut-Watermark: 1716649800.07712@pSgPk2UswcxrvIBKmPGyKQ 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:285343 Archived-At: Spencer Baugh writes: > =C3=93scar Fuentes writes: >> Sometimes flymake shows indicators of unexisting diagnostics. The only >> method I know of clearing those indicators is killing all buffers with >> the same mode. >> >> The real fix is to not show unexisting diagnostics, but since that can >> be caused either by bugs in flymake or in third-party diagnostic >> functions (including in the function's development) providing a command >> or easy method to clear those diagnostics would be pragmatic and >> convenient. > > Could you give an example of a flymake diagnostic function which reports > non-existing diagnostics? > > Also, I expect that you would be able to clear the diagnostics by simply > toggling flymake-mode in the buffer with undesirable diagnostics > present. Hello. I've made a function for an internal language programming. The function follows the example on the manual. The function does not report those diagnostics, something else is at play. Anyway, fixing a faulty function is not the point of this report. This is about flymake showing "sticky" diagnostics that do not go away even when the function reports no diagnostics. More specifically, this is about how to get rid of those phantom diagnostic indicators. It happens infrequently enough (IMAO) that having to invoke some "flymake-cleanup" command would not be a serious nuisance. I've seen the problem happen just after an edited buffer is reverted: random lines on the buffer appear decorated with a diagnostic indicator. Turning off and on flymake-mode does not work. More surprisingly, killing the buffer and visiting it again doesn't work either: the diagnostics are back (and I insist on the function not reporting them, that's 100% checked). The only thing that works is to kill all the buffers with the same major mode. Recently, I noticed that deleting the decorated lines and simply undoing the deletion also gets rid of the decoration. BTW, flymake not only decorates the lines, it also adds them to the diagnostic counter on the modeline. So, to recap, a flymake-clean-diagnostics or somesuch command would be handy. A quick inspection of flymake's source does not indicate an obvious way of doing this, as it seems that the diagnostic information is scattered over several places (including overlays on the affected buffers.) Thanks!