Subject: bug#77313: closed (Re: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 19 Apr 2025 14:40:07 +0000

Your bug report

#77313: 30.1.50; Regression: flymake indicators are erroneously using margins

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
77313: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77313
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
From: Eli Zaretskii <[email-masked]>
To: Spencer Baugh <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Sat, 19 Apr 2025 17:39:08 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Spencer Baugh <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Thu, 17 Apr 2025 16:23:40 -0400
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> From: Spencer Baugh <[email-masked]>
> >> Cc: [email-masked],  [email-masked]
> >> Date: Wed, 16 Apr 2025 13:57:03 -0400
> >> 
> >> Eli Zaretskii <[email-masked]> writes:
> >> >> From: Spencer Baugh <[email-masked]>
> >> >> Date: Sat, 12 Apr 2025 07:43:11 -0400
> >> >> Cc: [email-masked], Juri Linkov <[email-masked]>
> >> >> 
> >> >> On Sat, Apr 12, 2025, 7:13 AM Eli Zaretskii <[email-masked]> wrote:
> >> >> 
> >> >>  Thanks, installed on master.
> >> >> 
> >> >>  Should we now close this bug?
> >> >> 
> >> >> No, we need to backport it to Emacs 30.2 to fix the regression.
> >> >
> >> > OK, but it cannot be cherry-picked as is, because it includes a NEWS
> >> > entry.  So the fix for emacs-30, when we decide to install it, will
> >> > need to be a separate commit.
> >> 
> >> OK, here is a version ready for backporting to emacs-30, with a NEWS
> >> entry appropriate for 30.2.
> >
> > I don't understand: this seems to be identical to the commit on
> > master.  Did you show a wrong patch?
> >
> > What I had in mind was a change only to flymake.el, with "Do not
> > merge" in the commit log message, since you say this is basically a
> > bugfix.  I see no reason to announce this in NEWS, let alone with an
> > entry that is identical to what we have on master.
> 
> I see, that makes sense.  OK, here's a patch like that.

Thanks, installed on emacs-30, and closing the bug.

Subject: 30.1.50; Regression: flymake indicators are erroneously using margins
From: Spencer Baugh <[email-masked]>
To: [email-masked]
Date: Thu, 27 Mar 2025 11:13:44 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

The addition of margin-based flymake indicators in Emacs 30 (for use in
terminal frames) also led to a regression: the margin-based indicators
are uglier and should not be used when not necessary, but the code for
determining the default for flymake-indicator-type was wrong and caused
margin indicators to be used sometimes on graphical frames.

The simplest fix, suitable for backporting, is to always default to
fringes.

Please apply the attached patch and backport to Emacs 30.

>From 252dd491890323710782d22483bd9cedb9d5b90c Mon Sep 17 00:00:00 2001
From: Spencer Baugh <[email-masked]>
Date: Thu, 27 Mar 2025 11:07:41 -0400
Subject: [PATCH] flymake: default to displaying indicators on fringes

Checking (display-graphic-p) at load time is not a correct way to
determine what kind of indicators to use.  This led to a regression in
Emacs 30, where we used the uglier margin indicators even while on
graphical frames if flymake was loaded before any graphical frame was
created.  For example, users of the emacs daemon who load flymake in
their init.el.

We can re-add this as a per-frame check later.

* lisp/progmodes/flymake.el (flymake-indicator-type): Default to fringes.
---
 lisp/progmodes/flymake.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index f8a294908ba..29bc3dacdba 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -185,9 +185,7 @@ flymake-fringe-indicator-position
 		 (const right-fringe)
 		 (const :tag "No fringe indicators" nil)))
 
-(defcustom flymake-indicator-type (if (display-graphic-p)
-                                      'fringes
-                                    'margins)
+(defcustom flymake-indicator-type 'fringes
   "Indicate which indicator type to use for display errors.
 
 The value can be nil (don't indicate errors but just highlight them),
-- 
2.39.3