GNU bug report logs - #70711
30.0.50; Issue with flymake indicators

Previous Next

Package: emacs;

Reported by: Roman Rudakov <rrudakov <at> fastmail.com>

Date: Thu, 2 May 2024 08:07:02 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 70711 in the body.
You can then email your comments to 70711 AT debbugs.gnu.org in the normal way.

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#70711; Package emacs. (Thu, 02 May 2024 08:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Roman Rudakov <rrudakov <at> fastmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 02 May 2024 08:07:02 GMT) Full text and rfc822 format available.

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

From: Roman Rudakov <rrudakov <at> fastmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; Issue with flymake indicators
Date: Thu, 02 May 2024 10:06:15 +0200
[Message part 1 (text/plain, inline)]
After the latest update of flymake I started experiencing an issue 
with indicators. The problem occurs if I try to disable indicators 
completely.

Steps to reproduce from "emacs -q":
1. Evaluate the following forms:

(setopt flymake-fringe-indicator-position nil 
       flymake-margin-indicator-position nil) 
(flymake-mode)

2. Type some invalid expression to trigger flymake.

Expected result: No indicators.

Actual result: Exclamation mark is shown right before the faulty 
expression (not even on fringe or margin).
[flymake-bug.png (image/png, attachment)]
[Message part 3 (text/plain, inline)]

-- 
Best regards, Roman

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

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Roman Rudakov <rrudakov <at> fastmail.com>, Elijah G <eg642616 <at> gmail.com>
Cc: 70711 <at> debbugs.gnu.org
Subject: Re: bug#70711: 30.0.50; Issue with flymake indicators
Date: Thu, 02 May 2024 14:04:25 +0300
> From: Roman Rudakov <rrudakov <at> fastmail.com>
> Date: Thu, 02 May 2024 10:06:15 +0200
> 
> After the latest update of flymake I started experiencing an issue 
> with indicators. The problem occurs if I try to disable indicators 
> completely.
> 
> Steps to reproduce from "emacs -q":
> 1. Evaluate the following forms:
> 
> (setopt flymake-fringe-indicator-position nil 
>         flymake-margin-indicator-position nil) 
> (flymake-mode)
> 
> 2. Type some invalid expression to trigger flymake.
> 
> Expected result: No indicators.
> 
> Actual result: Exclamation mark is shown right before the faulty 
> expression (not even on fringe or margin).

Elijah, could you please look into this?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70711; Package emacs. (Thu, 02 May 2024 20:44:01 GMT) Full text and rfc822 format available.

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

From: Roman Rudakov <rrudakov <at> fastmail.com>
To: Elijah G <eg642616 <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 70711 <at> debbugs.gnu.org
Subject: Re: bug#70711: 30.0.50; Issue with flymake indicators
Date: Thu, 02 May 2024 22:43:07 +0200
Elijah G <eg642616 <at> gmail.com> writes:

> On Thu, May 2, 2024 at 5:04 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>>
>> > From: Roman Rudakov <rrudakov <at> fastmail.com>
>> > Date: Thu, 02 May 2024 10:06:15 +0200
>> >
>> > After the latest update of flymake I started experiencing an issue
>> > with indicators. The problem occurs if I try to disable indicators
>> > completely.
>> >
>> > Steps to reproduce from "emacs -q":
>> > 1. Evaluate the following forms:
>> >
>> > (setopt flymake-fringe-indicator-position nil
>> >         flymake-margin-indicator-position nil)
>> > (flymake-mode)
>> >
>> > 2. Type some invalid expression to trigger flymake.
>> >
>> > Expected result: No indicators.
>> >
>> > Actual result: Exclamation mark is shown right before the faulty
>> > expression (not even on fringe or margin).
>>
>> Elijah, could you please look into this?
>>
>> Thanks.
>
> Hi Eli, below you can find the attached patch that
> should fix this issue.
>
> Roman Can you eval this defun and tell
> if the bug is fixed?
>
> Thanks.
>
> ``` elisp
> (defun flymake--indicator-overlay-spec (indicator)
>   "Return INDICATOR as propertized string to use in error indicators."
>   (let* ((value (if (symbolp indicator)
>                     (symbol-value indicator)
>                   indicator))
>          (indicator-car (if (listp value)
>                             (car value)
>                           value))
>          (indicator-cdr (if (listp value)
>                             (cdr value))))
>     (cond
>      ((and (symbolp indicator-car)
>            flymake-fringe-indicator-position)
>       (propertize "!" 'display
>                   (cons flymake-fringe-indicator-position
>                         (if (listp value)
>                             value
>                           (list value)))))
>      ((and (stringp indicator-car)
>            flymake-margin-indicator-position)
>       (propertize "!"
>                   'display
>                   `((margin ,flymake-margin-indicator-position)
>                     ,(propertize
>                       indicator-car
>                       'face
>                       `(:inherit (,indicator-cdr
>                                   default)))))))))
> ````

Hello Elijah, I can confirm that the patch fixes the issue. Thank you.
-- 
Best regards, Roman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70711; Package emacs. (Fri, 03 May 2024 04:42:03 GMT) Full text and rfc822 format available.

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

From: Elijah G <eg642616 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Roman Rudakov <rrudakov <at> fastmail.com>
Cc: 70711 <at> debbugs.gnu.org
Subject: Re: bug#70711: 30.0.50; Issue with flymake indicators
Date: Thu, 2 May 2024 11:03:14 -0600
[Message part 1 (text/plain, inline)]
On Thu, May 2, 2024 at 5:04 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Roman Rudakov <rrudakov <at> fastmail.com>
> > Date: Thu, 02 May 2024 10:06:15 +0200
> >
> > After the latest update of flymake I started experiencing an issue
> > with indicators. The problem occurs if I try to disable indicators
> > completely.
> >
> > Steps to reproduce from "emacs -q":
> > 1. Evaluate the following forms:
> >
> > (setopt flymake-fringe-indicator-position nil
> >         flymake-margin-indicator-position nil)
> > (flymake-mode)
> >
> > 2. Type some invalid expression to trigger flymake.
> >
> > Expected result: No indicators.
> >
> > Actual result: Exclamation mark is shown right before the faulty
> > expression (not even on fringe or margin).
>
> Elijah, could you please look into this?
>
> Thanks.

Hi Eli, below you can find the attached patch that
should fix this issue.

Roman Can you eval this defun and tell
if the bug is fixed?

Thanks.

``` elisp
(defun flymake--indicator-overlay-spec (indicator)
  "Return INDICATOR as propertized string to use in error indicators."
  (let* ((value (if (symbolp indicator)
                    (symbol-value indicator)
                  indicator))
         (indicator-car (if (listp value)
                            (car value)
                          value))
         (indicator-cdr (if (listp value)
                            (cdr value))))
    (cond
     ((and (symbolp indicator-car)
           flymake-fringe-indicator-position)
      (propertize "!" 'display
                  (cons flymake-fringe-indicator-position
                        (if (listp value)
                            value
                          (list value)))))
     ((and (stringp indicator-car)
           flymake-margin-indicator-position)
      (propertize "!"
                  'display
                  `((margin ,flymake-margin-indicator-position)
                    ,(propertize
                      indicator-car
                      'face
                      `(:inherit (,indicator-cdr
                                  default)))))))))
````
[0001-Fix-bug-70711.patch (application/octet-stream, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 03 May 2024 06:19:02 GMT) Full text and rfc822 format available.

Notification sent to Roman Rudakov <rrudakov <at> fastmail.com>:
bug acknowledged by developer. (Fri, 03 May 2024 06:19:02 GMT) Full text and rfc822 format available.

Message #19 received at 70711-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Roman Rudakov <rrudakov <at> fastmail.com>
Cc: eg642616 <at> gmail.com, 70711-done <at> debbugs.gnu.org
Subject: Re: bug#70711: 30.0.50; Issue with flymake indicators
Date: Fri, 03 May 2024 09:18:04 +0300
> From: Roman Rudakov <rrudakov <at> fastmail.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,   70711 <at> debbugs.gnu.org
> Date: Thu, 02 May 2024 22:43:07 +0200
> 
> 
> Hello Elijah, I can confirm that the patch fixes the issue. Thank you.

Thanks for testing.  I've now installed this on the master branch, and
I'm therefore closing this bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 31 May 2024 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 20 days ago.

Previous Next


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