GNU bug report logs - #70752
30.0.50; flymake: add a command for resetting state

Previous Next

Package: emacs;

Reported by: Óscar Fuentes <ofv <at> wanadoo.es>

Date: Fri, 3 May 2024 17:28:17 UTC

Severity: normal

Found in version 30.0.50

To reply to this bug, email your comments to 70752 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#70752; Package emacs. (Fri, 03 May 2024 17:28:18 GMT) Full text and rfc822 format available.

Acknowledgement sent to Óscar Fuentes <ofv <at> wanadoo.es>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 03 May 2024 17:28:18 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; flymake: add a command for resetting state
Date: Fri, 03 May 2024 19:27:21 +0200
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.


In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.18.0) of 2024-04-29 built on sky
Repository revision: 58ca91fe0723c861d53375f52e5b6dd54a49a2e3
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101011
System Description: Debian GNU/Linux trixie/sid

Configured using:
 'configure --with-native-compilation --without-toolkit-scroll-bars
 --with-x-toolkit=lucid --with-modules --without-imagemagick'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND THREADS TIFF TREE_SITTER WEBP X11 XAW3D XDBE XIM
XINPUT2 XPM LUCID ZLIB

Important settings:
  value of $LANG: C
  locale-coding-system: nil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70752; Package emacs. (Sat, 04 May 2024 11:56:02 GMT) Full text and rfc822 format available.

Message #8 received at 70752 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Óscar Fuentes <ofv <at> wanadoo.es>, Spencer Baugh
 <sbaugh <at> janestreet.com>
Cc: 70752 <at> debbugs.gnu.org
Subject: Re: bug#70752: 30.0.50; flymake: add a command for resetting state
Date: Sat, 04 May 2024 14:54:31 +0300
> From: Óscar Fuentes <ofv <at> wanadoo.es>
> Date: Fri, 03 May 2024 19:27:21 +0200
> 
> 
> 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.

Spencer, could you please look into this?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70752; Package emacs. (Sat, 04 May 2024 23:24:02 GMT) Full text and rfc822 format available.

Message #11 received at 70752 <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Spencer Baugh <sbaugh <at> janestreet.com>, 70752 <at> debbugs.gnu.org,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: bug#70752: 30.0.50; flymake: add a command for resetting state
Date: Sun, 05 May 2024 01:22:53 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Spencer, could you please look into this?

Isn't João the flymake maintainer nowadays? (CCed)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70752; Package emacs. (Sat, 18 May 2024 08:36:01 GMT) Full text and rfc822 format available.

Message #14 received at 70752 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: sbaugh <at> janestreet.com
Cc: ofv <at> wanadoo.es, 70752 <at> debbugs.gnu.org
Subject: Re: bug#70752: 30.0.50; flymake: add a command for resetting state
Date: Sat, 18 May 2024 11:34:48 +0300
Ping!  Spencer, are you looking into this?

> Cc: 70752 <at> debbugs.gnu.org
> Date: Sat, 04 May 2024 14:54:31 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > From: Óscar Fuentes <ofv <at> wanadoo.es>
> > Date: Fri, 03 May 2024 19:27:21 +0200
> > 
> > 
> > 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.
> 
> Spencer, could you please look into this?
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70752; Package emacs. (Sat, 18 May 2024 14:38:01 GMT) Full text and rfc822 format available.

Message #17 received at 70752 <at> debbugs.gnu.org (full text, mbox):

From: Spencer Baugh <sbaugh <at> janestreet.com>
To: Óscar Fuentes <ofv <at> wanadoo.es>
Cc: 70752 <at> debbugs.gnu.org
Subject: Re: bug#70752: 30.0.50; flymake: add a command for resetting state
Date: Sat, 18 May 2024 10:37:21 -0400
Óscar Fuentes <ofv <at> wanadoo.es> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70752; Package emacs. (Sat, 18 May 2024 15:11:01 GMT) Full text and rfc822 format available.

Message #20 received at 70752 <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: 70752 <at> debbugs.gnu.org
Subject: Re: bug#70752: 30.0.50; flymake: add a command for resetting state
Date: Sat, 18 May 2024 17:09:59 +0200
Spencer Baugh <sbaugh <at> janestreet.com> writes:

> Óscar Fuentes <ofv <at> wanadoo.es> 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!




This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.