all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#70711: 30.0.50; Issue with flymake indicators
@ 2024-05-02  8:06 Roman Rudakov
  2024-05-02 11:04 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Roman Rudakov @ 2024-05-02  8:06 UTC (permalink / raw)
  To: 70711

[-- Attachment #1: Type: text/plain, Size: 525 bytes --]

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).

[-- Attachment #2: Flymake indicators issue --]
[-- Type: image/png, Size: 35918 bytes --]

[-- Attachment #3: Type: text/plain, Size: 26 bytes --]



-- 
Best regards, Roman

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#70711: 30.0.50; Issue with flymake indicators
  2024-05-02  8:06 bug#70711: 30.0.50; Issue with flymake indicators Roman Rudakov
@ 2024-05-02 11:04 ` Eli Zaretskii
  2024-05-02 17:03   ` Elijah G
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2024-05-02 11:04 UTC (permalink / raw)
  To: Roman Rudakov, Elijah G; +Cc: 70711

> From: Roman Rudakov <rrudakov@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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#70711: 30.0.50; Issue with flymake indicators
  2024-05-02 11:04 ` Eli Zaretskii
@ 2024-05-02 17:03   ` Elijah G
  2024-05-02 20:43     ` Roman Rudakov
  0 siblings, 1 reply; 5+ messages in thread
From: Elijah G @ 2024-05-02 17:03 UTC (permalink / raw)
  To: Eli Zaretskii, Roman Rudakov; +Cc: 70711

[-- Attachment #1: Type: text/plain, Size: 2159 bytes --]

On Thu, May 2, 2024 at 5:04 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Roman Rudakov <rrudakov@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)))))))))
````

[-- Attachment #2: 0001-Fix-bug-70711.patch --]
[-- Type: application/octet-stream, Size: 1360 bytes --]

From f47840dfa17e27cede2b10039f8cd36f94384c66 Mon Sep 17 00:00:00 2001
From: "Elias G. Perez" <eg642616@gmail.com>
Date: Thu, 2 May 2024 10:33:43 -0600
Subject: [PATCH] Fix bug#70711

* lisp/progmodes/flymake.el (flymake--indicator-overlay-spec):
Check if `flymake-fringe-indicator-position' or
`flymake-margin-indicator-position' are non-nil for allow no
indicators.
---
 lisp/progmodes/flymake.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 22a139d3045..f3578152b36 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -754,13 +754,15 @@ flymake--indicator-overlay-spec
          (indicator-cdr (if (listp value)
                             (cdr value))))
     (cond
-     ((symbolp indicator-car)
+     ((and (symbolp indicator-car)
+           flymake-fringe-indicator-position)
       (propertize "!" 'display
                   (cons flymake-fringe-indicator-position
                         (if (listp value)
                             value
                           (list value)))))
-     ((stringp indicator-car)
+     ((and (stringp indicator-car)
+           flymake-margin-indicator-position)
       (propertize "!"
                   'display
                   `((margin ,flymake-margin-indicator-position)
-- 
2.44.0.windows.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#70711: 30.0.50; Issue with flymake indicators
  2024-05-02 17:03   ` Elijah G
@ 2024-05-02 20:43     ` Roman Rudakov
  2024-05-03  6:18       ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Roman Rudakov @ 2024-05-02 20:43 UTC (permalink / raw)
  To: Elijah G; +Cc: Eli Zaretskii, 70711

Elijah G <eg642616@gmail.com> writes:

> On Thu, May 2, 2024 at 5:04 AM Eli Zaretskii <eliz@gnu.org> wrote:
>>
>> > From: Roman Rudakov <rrudakov@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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#70711: 30.0.50; Issue with flymake indicators
  2024-05-02 20:43     ` Roman Rudakov
@ 2024-05-03  6:18       ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2024-05-03  6:18 UTC (permalink / raw)
  To: Roman Rudakov; +Cc: eg642616, 70711-done

> From: Roman Rudakov <rrudakov@fastmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,   70711@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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-03  6:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-02  8:06 bug#70711: 30.0.50; Issue with flymake indicators Roman Rudakov
2024-05-02 11:04 ` Eli Zaretskii
2024-05-02 17:03   ` Elijah G
2024-05-02 20:43     ` Roman Rudakov
2024-05-03  6:18       ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.