GNU logs - #77313, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 27 Mar 2025 15:14:03 +0000
Resent-Message-ID: <handler.77313.B.174308844128697 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 77313 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.174308844128697
          (code B ref -1); Thu, 27 Mar 2025 15:14:03 +0000
Received: (at submit) by debbugs.gnu.org; 27 Mar 2025 15:14:01 +0000
Received: from localhost ([127.0.0.1]:50853 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txovf-0007SY-KX
	for submit <at> debbugs.gnu.org; Thu, 27 Mar 2025 11:14:00 -0400
Received: from lists.gnu.org ([2001:470:142::17]:40506)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1txova-0007Ql-M7
 for submit <at> debbugs.gnu.org; Thu, 27 Mar 2025 11:13:56 -0400
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 <sbaugh@HIDDEN>)
 id 1txovU-00059T-KG
 for bug-gnu-emacs@HIDDEN; Thu, 27 Mar 2025 11:13:48 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <sbaugh@HIDDEN>)
 id 1txovS-0003BE-KR
 for bug-gnu-emacs@HIDDEN; Thu, 27 Mar 2025 11:13:48 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
Date: Thu, 27 Mar 2025 11:13:44 -0400
Message-ID: <ierbjtmsdzr.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1743088424;
 bh=CjN9DW4paAhfjrTRdzs2Aqif7FbCEfBMj0xcH0+FzQw=;
 h=From:To:Subject:Date;
 b=H36rsu+6Ds2psF4nX5OEZE8oQOTMcqZfdab5Ykqm/5H7ZmEsKudoFu7wc61v9XiKf
 pCYuZQ+Wy8jxyMqiaQR+SpM1pN805kzCVO/OL0IZ92k9puStlorTgN2Pwxiwqa4cjK
 u1Lpi3deKkyzUp58LP1u+Nbn2YHDqCuKSfRwG0U4qlHQZwVssum+0dzwrjM+HJ7wBN
 1bQ3pKVpHtpuTj1iRsmJ1p9s7INJ74u+o079krVar4254GNlS8koGxkXAPeUSmkWtv
 EAwasLT+11jISGJuhXiSjOuGeJ4WN+fWw/Y8CGJu4HVaLgOIspVBQrL0JjaiwkiW1/
 q2GZtredaj+4w==
Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@HIDDEN;
 helo=mxout5.mail.janestreet.com
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

--=-=-=
Content-Type: text/plain


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.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-flymake-default-to-displaying-indicators-on-fringes.patch

From 252dd491890323710782d22483bd9cedb9d5b90c Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh@HIDDEN>
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


--=-=-=--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Spencer Baugh <sbaugh@HIDDEN>
Subject: bug#77313: Acknowledgement (30.1.50; Regression: flymake
 indicators are erroneously using margins)
Message-ID: <handler.77313.B.174308844128697.ack <at> debbugs.gnu.org>
References: <ierbjtmsdzr.fsf@HIDDEN>
X-Gnu-PR-Message: ack 77313
X-Gnu-PR-Package: emacs
Reply-To: 77313 <at> debbugs.gnu.org
Date: Thu, 27 Mar 2025 15:14:04 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 77313 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
77313: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77313
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 27 Mar 2025 16:15:02 +0000
Resent-Message-ID: <handler.77313.B77313.17430920812442 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17430920812442
          (code B ref 77313); Thu, 27 Mar 2025 16:15:02 +0000
Received: (at 77313) by debbugs.gnu.org; 27 Mar 2025 16:14:41 +0000
Received: from localhost ([127.0.0.1]:51026 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txpsO-0000dJ-LM
	for submit <at> debbugs.gnu.org; Thu, 27 Mar 2025 12:14:40 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:34714)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1txpsM-0000ci-MV
 for 77313 <at> debbugs.gnu.org; Thu, 27 Mar 2025 12:14:39 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1txpsF-0002dy-OK; Thu, 27 Mar 2025 12:14:31 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=UbtSYBIOMYWagPJUOP3n6tJ4a4rTIbhHgSE5SgHuDhM=; b=ff8g3A4MmvxT
 m6PBHq+o0lRS/KtX8Zu+mzABodJ3f/CXcBu64ADAf5CTd1wZ0/59JRUOHBryUBmq/TN7hTGFxcrG+
 DCsHnYB6afLkKfxorFlepYzwIv9P6CGJ+XZXJEQ5+ysIA83iE05hyYsK79gTyVNqRmyRj8X3yV+X/
 ZRsASnWxhDg+3zmiEJmoD6oK7b8zM6d8Qc4+eyEV6QBcN22SQjZkp4K713szrS4Lu4JUI0qzEMWp2
 i7cd3aClK4t1IIezMiKBiUHRgrClkBU2xSEx9EntbfMowKQCxgWih56GnGE5LH3BseLumWWVr/BGH
 /j6/1R/DwjLJQ6tbPzPz2w==;
Date: Thu, 27 Mar 2025 18:14:27 +0200
Message-Id: <86wmcabgd8.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <ierbjtmsdzr.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
References: <ierbjtmsdzr.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 27 Mar 2025 11:13:44 -0400
> From:  Spencer Baugh via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> 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.

Please tell how that could or did happen.

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

Which means there will be no indicators on TTY frames, right?

If you don't like the default for a user option, you can easily
customize it locally.  But why make that change for everyone?  Options
are options so that they could be easily adapted to local needs.

At this point, I see no evidence that any change is needed.  But maybe
if you tell more about the problems you encountered, I will change my
mind.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 27 Mar 2025 16:29:02 +0000
Resent-Message-ID: <handler.77313.B77313.17430929299573 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17430929299573
          (code B ref 77313); Thu, 27 Mar 2025 16:29:02 +0000
Received: (at 77313) by debbugs.gnu.org; 27 Mar 2025 16:28:49 +0000
Received: from localhost ([127.0.0.1]:51050 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txq64-0002UI-Q4
	for submit <at> debbugs.gnu.org; Thu, 27 Mar 2025 12:28:49 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:40187)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1txq60-0002Ti-Cy
 for 77313 <at> debbugs.gnu.org; Thu, 27 Mar 2025 12:28:46 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <86wmcabgd8.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 27 Mar
 2025 18:14:27 +0200")
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
Date: Thu, 27 Mar 2025 12:28:39 -0400
Message-ID: <iercye2fnew.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1743092919;
 bh=/q/LqcvwWzPoqOy3lx8MA9cr7tZQTz0mEViJ3MucunI=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=ZxcTtZ28Y8kQ0/dmYP/V43meKNK38KRotF0XDusJQhH9Ble+zAGgiZpdZ6rF3ZZdc
 lkzyI6NRSwr4AG2qipbcyiCoMF+JEHHkWOBc2Fg9oshmkwrDjpQz2b7PPRkNwiR5st
 UaX69Ru6r7Sh/hVE1O2ZMuq8++dGtT5qQOxzVkCkERMoSJIpIT+fluCwRKaxUNN39q
 jOMppA9IZcrs/P/Hly+LMCuz8fC+J/KGXeK8s93+qKE9bCgG+oR3IyicLmaUFL1uUi
 KJPeRkafxQ1Ba9Rn6tbOQUFYM3GzQLQF2RIdj+O6o9LeVN721PwNyh48g3kjlfpAdJ
 nR5T6L/RVrd8Q==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> Date: Thu, 27 Mar 2025 11:13:44 -0400
>> From:  Spencer Baugh via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>> 
>> 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.
>
> Please tell how that could or did happen.

e.g.:

1. emacs --daemon -l flymake
2. emacsclient -c somefile.el -f flymake-mode
   (opening a graphical frame)

In Emacs 29, this uses fringes for the indicators.

In Emacs 30, this uses margins, which is a substantial regression.

>> The simplest fix, suitable for backporting, is to always default to
>> fringes.
>
> Which means there will be no indicators on TTY frames, right?

There were never indicators in TTY frames in Emacs 29.

In Emacs 30, there will also be no indicators on TTY frames if, for
example, the user does:

1. emacs (opening a graphical Emacs)
2. (require 'flymake)
   The default of flymake-indicator-type is now 'fringes, since display-graphic-p is true.
3. emacsclient -t
   No indicators.

> If you don't like the default for a user option, you can easily
> customize it locally.  But why make that change for everyone?  Options
> are options so that they could be easily adapted to local needs.

Because it's a regression from Emacs 29.

Keep in mind I was the one who, while reviewing the flymake patch adding
margins, suggested that TTY frames automatically default to using
margins.  This code exists because I requested it.  I sadly did not
realize that the behavior was implemented with a buggy default value for
flymake-indicator-type, nor was it caught before release; I only just
now have received direct user complaints about the regression.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 27 Mar 2025 16:53:01 +0000
Resent-Message-ID: <handler.77313.B77313.174309438020533 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174309438020533
          (code B ref 77313); Thu, 27 Mar 2025 16:53:01 +0000
Received: (at 77313) by debbugs.gnu.org; 27 Mar 2025 16:53:00 +0000
Received: from localhost ([127.0.0.1]:51097 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txqTU-0005L6-A2
	for submit <at> debbugs.gnu.org; Thu, 27 Mar 2025 12:53:00 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33062)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1txqTP-0005K8-Rs
 for 77313 <at> debbugs.gnu.org; Thu, 27 Mar 2025 12:52:57 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1txqTI-0007ph-W1; Thu, 27 Mar 2025 12:52:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=M5bOkUBKodjGWl49XHGrNbvJ3qBGkyiiTkfwHbozNnk=; b=jeq4barMzzAp
 zN+oOCj8XEW5/0E3aL4PTweNt9ilEg/gv2k03xGpH64OXFc9dHxdLFKJyDpBtoqrHWjCaXJTeOduG
 lsMgtv4pYew1vx4eMOuD1h90xvMfT3h7xLFXgQ/f3xYKDpuXhbRkWEFmRjgpcoOgpMBnNZcn8u6sj
 R005CqXmcRUJdt3K3fs0Y0WQIkP9+fx4ROY8/0qHkjqQlnGI8tFeerD06XvDGtt5uZ3COcTjyM1pa
 FpNu3f76VeDWLxnEZskfVK3waqSy6AL4LXkCf3AdnyyMHr2FQ4+E3eV3/JaYZy1qZKdkiBwQudmRk
 P51i4qm2A0+jKK/MpHs05w==;
Date: Thu, 27 Mar 2025 18:52:46 +0200
Message-Id: <86r02ibeld.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <iercye2fnew.fsf@HIDDEN> (message from Spencer Baugh on
 Thu, 27 Mar 2025 12:28:39 -0400)
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: 77313 <at> debbugs.gnu.org
> Date: Thu, 27 Mar 2025 12:28:39 -0400
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >> Date: Thu, 27 Mar 2025 11:13:44 -0400
> >> From:  Spencer Baugh via "Bug reports for GNU Emacs,
> >>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> >> 
> >> 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.
> >
> > Please tell how that could or did happen.
> 
> e.g.:
> 
> 1. emacs --daemon -l flymake
> 2. emacsclient -c somefile.el -f flymake-mode
>    (opening a graphical frame)

You can reset the option in after-make-frame-functions.

The daemon is known to be tricky in turning on GUI features; many of
them need to be (re)initialized in after-make-frame-functions.  That
doesn't mean we will be turning off all the features that cater to
text-only frames due to those complications.

> >> The simplest fix, suitable for backporting, is to always default to
> >> fringes.
> >
> > Which means there will be no indicators on TTY frames, right?
> 
> There were never indicators in TTY frames in Emacs 29.

Yes, and Emacs 30 attempted to improve the situation.  Going back is a
step in the wrong direction.

> In Emacs 30, there will also be no indicators on TTY frames if, for
> example, the user does:
> 
> 1. emacs (opening a graphical Emacs)
> 2. (require 'flymake)
>    The default of flymake-indicator-type is now 'fringes, since display-graphic-p is true.
> 3. emacsclient -t
>    No indicators.

I'm okay with making this smarter, but I object to making it dumber.

> > If you don't like the default for a user option, you can easily
> > customize it locally.  But why make that change for everyone?  Options
> > are options so that they could be easily adapted to local needs.
> 
> Because it's a regression from Emacs 29.

Only in certain situations.  The most popular situation where the
users get a TTY frame is when they invoke "emacs -nw", and there we
have an improvement, as intended.

> Keep in mind I was the one who, while reviewing the flymake patch adding
> margins, suggested that TTY frames automatically default to using
> margins.  This code exists because I requested it.  I sadly did not
> realize that the behavior was implemented with a buggy default value for
> flymake-indicator-type, nor was it caught before release; I only just
> now have received direct user complaints about the regression.

That's fine.  We all make mistakes.  But the way to correct those
mistakes is not to go back, it's to go forward.

So I urge you to work on a fix which doesn't disable the indicators in
"emacs -nw", but instead attempts to detect the situations you
describe above and adapt the indicator style to them.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 27 Mar 2025 16:58:01 +0000
Resent-Message-ID: <handler.77313.B77313.174309466122432 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174309466122432
          (code B ref 77313); Thu, 27 Mar 2025 16:58:01 +0000
Received: (at 77313) by debbugs.gnu.org; 27 Mar 2025 16:57:41 +0000
Received: from localhost ([127.0.0.1]:51118 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txqY0-0005pe-KY
	for submit <at> debbugs.gnu.org; Thu, 27 Mar 2025 12:57:41 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:35191)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1txqXy-0005p1-18
 for 77313 <at> debbugs.gnu.org; Thu, 27 Mar 2025 12:57:38 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <86r02ibeld.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 27 Mar
 2025 18:52:46 +0200")
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
Date: Thu, 27 Mar 2025 12:57:32 -0400
Message-ID: <iera596fm2r.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1743094652;
 bh=Sh5knUgnO8o2I+Av+V6NO69loIQYzMN+OZZx4jb6GSQ=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=rvb5yOMztA1Z0tBYcOiNL+jepGyYGMi9leraYnKpiIH/kBM8eZCtRTJpZddW6UohT
 afqu9Ftd/SohOzNJB2WSfGz1fT8QA2ooT0S87LyA607BQCj0EP5OpmvYWG/x/LeDKc
 5VyKOo47yH9RaRl6DYqtrJnb5EPZ7NQ5Kg7VNrdrAAF0YqMBiO7LU7pwSFkpEx786+
 PpqWnR+ytfIUa5/EklOMdaWWtsXvnf13IrkrFH3viZFgQmrIEZ7TCFXRYJ0DHVye92
 8BQqgt2p/nq/KwYld0dd590w3qXQcynjVDb7f2XxDMxoa3EeUpU+Z5YVVBBqvXKjL1
 qFNgAMj+rtOFw==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:
>> From: Spencer Baugh <sbaugh@HIDDEN>
>> Keep in mind I was the one who, while reviewing the flymake patch adding
>> margins, suggested that TTY frames automatically default to using
>> margins.  This code exists because I requested it.  I sadly did not
>> realize that the behavior was implemented with a buggy default value for
>> flymake-indicator-type, nor was it caught before release; I only just
>> now have received direct user complaints about the regression.
>
> That's fine.  We all make mistakes.  But the way to correct those
> mistakes is not to go back, it's to go forward.
>
> So I urge you to work on a fix which doesn't disable the indicators in
> "emacs -nw", but instead attempts to detect the situations you
> describe above and adapt the indicator style to them.

If you insist, I will develop such a fix.  It will be more complex.  But
can we please nevertheless backport it to Emacs 30?  I really want this
regression to be fixed in Emacs 30.2; I've gotten multiple user
complaints about it.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 27 Mar 2025 17:43:01 +0000
Resent-Message-ID: <handler.77313.B77313.174309734419042 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174309734419042
          (code B ref 77313); Thu, 27 Mar 2025 17:43:01 +0000
Received: (at 77313) by debbugs.gnu.org; 27 Mar 2025 17:42:24 +0000
Received: from localhost ([127.0.0.1]:51205 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txrFI-0004x3-Bk
	for submit <at> debbugs.gnu.org; Thu, 27 Mar 2025 13:42:24 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42770)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1txrFD-0004wJ-Vn
 for 77313 <at> debbugs.gnu.org; Thu, 27 Mar 2025 13:42:20 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1txrF7-0006Rw-UQ; Thu, 27 Mar 2025 13:42:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=rrHbfFFxHNpZVX+BtAPRwv+Xs1mR2YYQXW0PXT7lTJc=; b=Ultsp3zkNR2r
 mn6S9SY5yc1vBNoukzW6cm9XQ4o7tIuQ5aVr69nk32MM10o0Vi9EXym45XjlGSsCh0F6m+AZ49B1h
 mIjROnm5ygvRt3IjvWNhIYnISfBtTJwKmvntJ2f3RvUvv14gOXjzzF8QE7FZeytJrJyo7jyZwKy6+
 DDJqcEaVKIP8GOfS3PSNGb+4NOXVchhcRxBiDA0hm7NeJGCpcdBByIFm3+/nhzzu+QJ4IssjHR5gF
 L5hgNf9sznJIzcTSJvL/muexp5csFNrETommRY9zLFK8wl0Eev/ve8xhZpef5VGqFj13EO4je3fHn
 6qKGUJrVrOw+jNaBjoEhxg==;
Date: Thu, 27 Mar 2025 19:42:11 +0200
Message-Id: <86o6xmbcb0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <iera596fm2r.fsf@HIDDEN> (message from Spencer Baugh on
 Thu, 27 Mar 2025 12:57:32 -0400)
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: 77313 <at> debbugs.gnu.org
> Date: Thu, 27 Mar 2025 12:57:32 -0400
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> >> From: Spencer Baugh <sbaugh@HIDDEN>
> >> Keep in mind I was the one who, while reviewing the flymake patch adding
> >> margins, suggested that TTY frames automatically default to using
> >> margins.  This code exists because I requested it.  I sadly did not
> >> realize that the behavior was implemented with a buggy default value for
> >> flymake-indicator-type, nor was it caught before release; I only just
> >> now have received direct user complaints about the regression.
> >
> > That's fine.  We all make mistakes.  But the way to correct those
> > mistakes is not to go back, it's to go forward.
> >
> > So I urge you to work on a fix which doesn't disable the indicators in
> > "emacs -nw", but instead attempts to detect the situations you
> > describe above and adapt the indicator style to them.
> 
> If you insist, I will develop such a fix.  It will be more complex.  But
> can we please nevertheless backport it to Emacs 30?  I really want this
> regression to be fixed in Emacs 30.2; I've gotten multiple user
> complaints about it.

I'm reluctant to "fix" this by reverting a useful improvement.  So
let's first see the proper solution, which solves the problem for
daemon sessions without reintroducing the problem for -nw sessions,
and let's take it from there.

Thanks.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 27 Mar 2025 18:24:02 +0000
Resent-Message-ID: <handler.77313.B77313.17430997891313 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17430997891313
          (code B ref 77313); Thu, 27 Mar 2025 18:24:02 +0000
Received: (at 77313) by debbugs.gnu.org; 27 Mar 2025 18:23:09 +0000
Received: from localhost ([127.0.0.1]:51288 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txrsi-0000L4-E6
	for submit <at> debbugs.gnu.org; Thu, 27 Mar 2025 14:23:08 -0400
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:46221)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1txrsX-0000J8-Ha
 for 77313 <at> debbugs.gnu.org; Thu, 27 Mar 2025 14:22:58 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 677242047F;
 Thu, 27 Mar 2025 18:22:50 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <iera596fm2r.fsf@HIDDEN>
Organization: LINKOV.NET
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN>
Date: Thu, 27 Mar 2025 20:20:14 +0200
Message-ID: <875xjuuyht.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-State: clean
X-GND-Score: -100
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduieeluddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepfedprhgtphhtthhopeejjeefudefseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtohepshgsrghughhhsehjrghnvghsthhrvggvthdrtghomh
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>> Keep in mind I was the one who, while reviewing the flymake patch adding
>>> margins, suggested that TTY frames automatically default to using
>>> margins.  This code exists because I requested it.  I sadly did not
>>> realize that the behavior was implemented with a buggy default value for
>>> flymake-indicator-type, nor was it caught before release; I only just
>>> now have received direct user complaints about the regression.
>>
>> That's fine.  We all make mistakes.  But the way to correct those
>> mistakes is not to go back, it's to go forward.
>>
>> So I urge you to work on a fix which doesn't disable the indicators in
>> "emacs -nw", but instead attempts to detect the situations you
>> describe above and adapt the indicator style to them.
>
> If you insist, I will develop such a fix.  It will be more complex.  But
> can we please nevertheless backport it to Emacs 30?  I really want this
> regression to be fixed in Emacs 30.2; I've gotten multiple user
> complaints about it.

There are many improvements developed in Emacs 31 for flymake margins
in bug#75841 and bug#76254.  But maybe better indeed to change
the default in Emacs 30.2 (with no merge to master).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 27 Mar 2025 20:35:01 +0000
Resent-Message-ID: <handler.77313.B77313.17431076664716 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17431076664716
          (code B ref 77313); Thu, 27 Mar 2025 20:35:01 +0000
Received: (at 77313) by debbugs.gnu.org; 27 Mar 2025 20:34:26 +0000
Received: from localhost ([127.0.0.1]:51533 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txtvl-0001Dz-Tv
	for submit <at> debbugs.gnu.org; Thu, 27 Mar 2025 16:34:26 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:37291)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1txtvi-0001Dm-AQ
 for 77313 <at> debbugs.gnu.org; Thu, 27 Mar 2025 16:34:23 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <875xjuuyht.fsf@HIDDEN> (Juri Linkov's message of "Thu, 
 27 Mar 2025 20:20:14 +0200")
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN> <875xjuuyht.fsf@HIDDEN>
Date: Thu, 27 Mar 2025 16:34:16 -0400
Message-ID: <ier7c4afc1j.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1743107656;
 bh=62AoHdRQMNwdxuuNbZKykRH4WbjOzYNZ7nqCE8fLf9A=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=3qtNOMZbFGTiCMs3vxyIkwPAWgT0me/GK4pawKl2rTZDptiAmcBKF8iz2iVWuxJPs
 r5hBgfA4yJolB/os2Uhjt09IowHc6EG+0RAOfSZ1DJ5iqv5t93aymFEvxhF058z+y0
 v5z2wH0wKvUgdzosf8AigAFleLXdKznkWPrxRZ9Vq1S8Gi1o09/aVST//lCsr7wgin
 Z/h19Pzm3URGJiXBvwjLxbbJsonf7bVjhumlUNx+Y2X499orwPoe/Z07OKC4ecbVat
 ZaSQIwAmPEry7cVITb78udeu1LmyDAEG8CqKzkm6myeyt4VpOuq9UTPgrIAvznHWz9
 s35tmlalZdjgg==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Juri Linkov <juri@HIDDEN> writes:

>>>> Keep in mind I was the one who, while reviewing the flymake patch adding
>>>> margins, suggested that TTY frames automatically default to using
>>>> margins.  This code exists because I requested it.  I sadly did not
>>>> realize that the behavior was implemented with a buggy default value for
>>>> flymake-indicator-type, nor was it caught before release; I only just
>>>> now have received direct user complaints about the regression.
>>>
>>> That's fine.  We all make mistakes.  But the way to correct those
>>> mistakes is not to go back, it's to go forward.
>>>
>>> So I urge you to work on a fix which doesn't disable the indicators in
>>> "emacs -nw", but instead attempts to detect the situations you
>>> describe above and adapt the indicator style to them.
>>
>> If you insist, I will develop such a fix.  It will be more complex.  But
>> can we please nevertheless backport it to Emacs 30?  I really want this
>> regression to be fixed in Emacs 30.2; I've gotten multiple user
>> complaints about it.
>
> There are many improvements developed in Emacs 31 for flymake margins
> in bug#75841 and bug#76254.  But maybe better indeed to change
> the default in Emacs 30.2 (with no merge to master).

Yes, that's what I was suggesting, not merging to master.

Anyway, how about this patch, which changes the default so that the
fringe vs margin decision is made in a per-frame way?

(Opinions welcome on what to name the new default for
flymake-indicator-type)


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-flymake-default-to-deciding-indicator-type-per-buffe.patch

From b64253c0f56e3f15f2807654baad462379d1a052 Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh@HIDDEN>
Date: Thu, 27 Mar 2025 16:32:59 -0400
Subject: [PATCH] flymake: default to deciding indicator type per-buffer

Previously, flymake-indicator-type defaults to either fringes or
margins.  But fringes should be used on graphical frames, and
margins on TTY frames, so a single global default is incorrect.
Instead, it should be decided on a per-frame basis.

Now flymake-indicator-type defaults to 'fringes-per-frame, which
uses fringes on (buffers in) graphical frames, margins on
(buffers in) terminal frames.

* lisp/progmodes/flymake.el (flymake-indicator-type): Set to
fringes-per-frame.  (bug#77313)
(flymake--use-fringes-p, flymake--use-margins-p): Add.
(flymake--resize-margins): Check flymake--use-margins-p.
(flymake--highlight-line): Check flymake--use-fringes-p and
flymake--use-margins.
---
 lisp/progmodes/flymake.el | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 75ba3efeb65..06001abe156 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-per-frame
   "Indicate which indicator type to use for display errors.
 
 The value can be nil (don't indicate errors but just highlight them),
@@ -199,8 +197,10 @@ flymake-indicator-type
 
 See Info node `Fringes' and Info node `(elisp)Display Margins'."
   :version "30.1"
-  :type '(choice (const :tag "Use Fringes" fringes)
-                 (const :tag "Use Margins "margins)
+  :type '(choice (const :tag "Use fringes on graphical, margins on TTY frames"
+                        fringes-per-frame)
+                 (const :tag "Use Fringes" fringes)
+                 (const :tag "Use Margins" margins)
                  (const :tag "No indicators" nil)))
 
 (defcustom flymake-margin-indicators-string
@@ -777,10 +777,20 @@ flymake--indicator-overlay-spec
                       `(:inherit (,indicator-cdr
                                   default)))))))))
 
+(defun flymake--use-fringes-p ()
+  (cl-case flymake-indicator-type
+    (fringes t)
+    ((nil margins) nil)
+    (fringes-per-frame (display-graphic-p))
+    (t t)))
+
+(defun flymake--use-margins-p ()
+  (not (flymake--use-fringes-p)))
+
 (defun flymake--resize-margins (&optional orig-width)
   "Resize current window margins according to `flymake-margin-indicator-position'.
 Return to original margin width if ORIG-WIDTH is non-nil."
-  (when (and (eq flymake-indicator-type 'margins)
+  (when (and (flymake--use-margins-p)
              flymake-autoresize-margins)
     (cond
      ((and orig-width flymake--original-margin-width)
@@ -945,9 +955,9 @@ flymake--highlight-line
         (flymake--indicator-overlay-spec
          (flymake--lookup-type-property
           type
-          (cond ((eq flymake-indicator-type 'fringes)
+          (cond ((flymake--use-fringes-p)
                  'flymake-bitmap)
-                ((eq flymake-indicator-type 'margins)
+                ((flymake--use-margins-p)
                  'flymake-margin-string))
           (alist-get 'bitmap (alist-get type ; backward compat
                                         flymake-diagnostic-types-alist)))))
-- 
2.39.3


--=-=-=--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 28 Mar 2025 07:13:01 +0000
Resent-Message-ID: <handler.77313.B77313.17431459264862 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17431459264862
          (code B ref 77313); Fri, 28 Mar 2025 07:13:01 +0000
Received: (at 77313) by debbugs.gnu.org; 28 Mar 2025 07:12:06 +0000
Received: from localhost ([127.0.0.1]:52568 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ty3ss-0001GL-3Q
	for submit <at> debbugs.gnu.org; Fri, 28 Mar 2025 03:12:06 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36238)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ty3so-0001Fi-18
 for 77313 <at> debbugs.gnu.org; Fri, 28 Mar 2025 03:12:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ty3sg-0008Pn-Me; Fri, 28 Mar 2025 03:11:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=BpApZOsV/rvSLfTDupMgolt1bO4IIDdTWLw5GPNqR0k=; b=cVAAm9t7vpFc
 wWdJ5GLC684xZ+6nnbAmasPcItzzsadvBtioeQ9lQJiB5vGgT7MFbGAxAjxn/h1ko6XKra3hCDmLP
 5L18UzFFow5/vBkzddXkM+Gkan/AFvRjujXkhK7AIlLICGlhgu0x8/8ZwmZ1mcy1p+zAXMva0KStt
 v8hOnBmiaIyRuWCb3b7q/kFF3+5Xhkwb4iyK5ntzPNOnWjQwlCjpFnHJ7/+2fZyL69bpqgV8cfR1y
 HjI814dytseEFO/7p+cy5oTQrQG5/4HkPne2s1M1PHUZ/Wo3QqDtNEf3ebrpUmH2w57Oltziv737P
 E5glDa/mhAHB/TvUqbgHbg==;
Date: Fri, 28 Mar 2025 10:11:33 +0300
Message-Id: <86a595bpei.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <ier7c4afc1j.fsf@HIDDEN> (message from Spencer Baugh on
 Thu, 27 Mar 2025 16:34:16 -0400)
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN> <875xjuuyht.fsf@HIDDEN>
 <ier7c4afc1j.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  77313 <at> debbugs.gnu.org
> Date: Thu, 27 Mar 2025 16:34:16 -0400
> 
> Juri Linkov <juri@HIDDEN> writes:
> 
> > There are many improvements developed in Emacs 31 for flymake margins
> > in bug#75841 and bug#76254.  But maybe better indeed to change
> > the default in Emacs 30.2 (with no merge to master).
> 
> Yes, that's what I was suggesting, not merging to master.

You are saying that this problem doesn't exist on master?  If so,
perhaps we should consider backporting some of the changes on master
to emacs-30 (if that's feasible)?

> Anyway, how about this patch, which changes the default so that the
> fringe vs margin decision is made in a per-frame way?

I think it's the correct direction, but wouldn't it be easier to make
this a frame parameter instead?  Then the defcustom could be nil by
default, and if it's non-nil, it would override the frame parameter.
The bonus will be that users will be able to define different styles
even for frames of the same type.  Another bonus is that the
frame-parameter machinery is well-tested, so the change will be a
low-risk one.

WDYT?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 28 Mar 2025 16:54:02 +0000
Resent-Message-ID: <handler.77313.B77313.174318080016444 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174318080016444
          (code B ref 77313); Fri, 28 Mar 2025 16:54:02 +0000
Received: (at 77313) by debbugs.gnu.org; 28 Mar 2025 16:53:20 +0000
Received: from localhost ([127.0.0.1]:55365 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tyCxL-0004H9-Vj
	for submit <at> debbugs.gnu.org; Fri, 28 Mar 2025 12:53:20 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:47691)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1tyCxJ-0004Gu-Hi
 for 77313 <at> debbugs.gnu.org; Fri, 28 Mar 2025 12:53:18 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <86a595bpei.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 28 Mar
 2025 10:11:33 +0300")
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN> <875xjuuyht.fsf@HIDDEN>
 <ier7c4afc1j.fsf@HIDDEN> <86a595bpei.fsf@HIDDEN>
Date: Fri, 28 Mar 2025 12:53:11 -0400
Message-ID: <ier1puhf66g.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1743180792;
 bh=ES3bYdEvn3ZWNV/45+jTRX2PiAys3fvd7KQp2j080/s=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=zr9ToiR7pNUnS56Cf47tb6oDVGk/9BnyToT2g2M+UZDp4z7QLdv2ltPAfwX6CAnml
 S2C4tbjzFhmPOgjNkVRGSLBJgrNeq275+ri3NIqkkLMfFSUbhPa6c8dR95Bi4L7xmF
 Ssl2wpuz18C5PSBVRDLAAE9SPc1xzRR3LgTesjyxM19fIIYZ0cCGlfMl8aqueV88xL
 rc+6qQqbsssfgGi/tE6+GCSCbTAg/o5yYavn6g5BEdyNKbP+Z3EwwbskLJPCvsDV1W
 aaOdvgs7zTdWN2BjHZbfvFmYbpwBFUuf6srYbi9fWP3TTw74cRyhr8IOxyC8pmSQM3
 U+FYD1fwzlFfw==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Spencer Baugh <sbaugh@HIDDEN>
>> Cc: Eli Zaretskii <eliz@HIDDEN>,  77313 <at> debbugs.gnu.org
>> Date: Thu, 27 Mar 2025 16:34:16 -0400
>> 
>> Juri Linkov <juri@HIDDEN> writes:
>> 
>> > There are many improvements developed in Emacs 31 for flymake margins
>> > in bug#75841 and bug#76254.  But maybe better indeed to change
>> > the default in Emacs 30.2 (with no merge to master).
>> 
>> Yes, that's what I was suggesting, not merging to master.
>
> You are saying that this problem doesn't exist on master?  If so,
> perhaps we should consider backporting some of the changes on master
> to emacs-30 (if that's feasible)?

No, it does exist on master.  I was thinking of having a more
sophisticated fix for master which makes the margin vs fringe
autodetection work reliably.  But for emacs-30 we'd do the simpler thing
of defaulting to 'fringe, to preserve the behavior that was in Emasc 29.

>> Anyway, how about this patch, which changes the default so that the
>> fringe vs margin decision is made in a per-frame way?
>
> I think it's the correct direction, but wouldn't it be easier to make
> this a frame parameter instead?  Then the defcustom could be nil by
> default, and if it's non-nil, it would override the frame parameter.
> The bonus will be that users will be able to define different styles
> even for frames of the same type.  Another bonus is that the
> frame-parameter machinery is well-tested, so the change will be a
> low-risk one.
>
> WDYT?

Note that a nil value for the defcustom is already interpreted as
meaning "show no indicators".

As for adding a frame parameter: that's a good idea, but I think we'd
still want to behave correctly if the frame parameter isn't set.  In the
case where the frame parameter isn't set, I think we'd have the same
logic that exists in my patch right now, where we decide margin vs
fringe based on (display-graphic-p).

So, adding a frame parameter would be useful, but it could be done
later, purely additively.  Which is nice because it keeps this patch
small and more plausible to backport to emacs-30, if we need to do that.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 29 Mar 2025 07:06:01 +0000
Resent-Message-ID: <handler.77313.B77313.174323194121076 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174323194121076
          (code B ref 77313); Sat, 29 Mar 2025 07:06:01 +0000
Received: (at 77313) by debbugs.gnu.org; 29 Mar 2025 07:05:41 +0000
Received: from localhost ([127.0.0.1]:56508 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tyQGC-0005Ts-KP
	for submit <at> debbugs.gnu.org; Sat, 29 Mar 2025 03:05:41 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51588)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tyQG9-0005Te-Md
 for 77313 <at> debbugs.gnu.org; Sat, 29 Mar 2025 03:05:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tyQG3-0006s1-Bk; Sat, 29 Mar 2025 03:05:31 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=+lsmibo26re0Ig9L0pgZDnoghJAewZ+bfdUK8bMuGC8=; b=K/sJ+Q/cS39W
 DCgPChhAUvPIQPjp3z9G736jxOX0ymvnqMBjRwMFicgnUf21FFzUKELj5/NJjcEGoJVxsupPOtGwu
 jCfcvuoWjd4aQX0NfoIuwuAjeOnX9OT4EzK3fminjX21ETN5Iww+uZj18d6W4H4rn2ugttDvKwdIy
 UWulBuoFpv977vDOEVoMKR3NCmz3Z5fbpe3fYf4ei5JXw8H8vE9qdu94LT3Fi8NxvmKzgeesyy+NW
 0NBCrc9VqcU5m34q6+aiOetYBBNifZkaJX3A3d/XNMc8dPCFeF2vc51HhAyp4eKnmDYtdJklgRBxD
 but6v5Nmk8NA7Z5IEVVHDw==;
Date: Sat, 29 Mar 2025 10:05:29 +0300
Message-Id: <86cye09v0m.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <ier1puhf66g.fsf@HIDDEN> (message from Spencer Baugh on
 Fri, 28 Mar 2025 12:53:11 -0400)
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN> <875xjuuyht.fsf@HIDDEN>
 <ier7c4afc1j.fsf@HIDDEN> <86a595bpei.fsf@HIDDEN>
 <ier1puhf66g.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Fri, 28 Mar 2025 12:53:11 -0400
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > I think it's the correct direction, but wouldn't it be easier to make
> > this a frame parameter instead?  Then the defcustom could be nil by
> > default, and if it's non-nil, it would override the frame parameter.
> > The bonus will be that users will be able to define different styles
> > even for frames of the same type.  Another bonus is that the
> > frame-parameter machinery is well-tested, so the change will be a
> > low-risk one.
> >
> > WDYT?
> 
> Note that a nil value for the defcustom is already interpreted as
> meaning "show no indicators".
> 
> As for adding a frame parameter: that's a good idea, but I think we'd
> still want to behave correctly if the frame parameter isn't set.  In the
> case where the frame parameter isn't set, I think we'd have the same
> logic that exists in my patch right now, where we decide margin vs
> fringe based on (display-graphic-p).

Maybe.  Or maybe we should leave the defcustom in its current simple
form.  Because if the default is to have the frame parameter, then
what the defcustom does is much less important.

> So, adding a frame parameter would be useful, but it could be done
> later, purely additively.

I think it should be the main solution for emacs-30, not the backup or
future extension.  Why not?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 01 Apr 2025 22:22:02 +0000
Resent-Message-ID: <handler.77313.B77313.174354610715255 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174354610715255
          (code B ref 77313); Tue, 01 Apr 2025 22:22:02 +0000
Received: (at 77313) by debbugs.gnu.org; 1 Apr 2025 22:21:47 +0000
Received: from localhost ([127.0.0.1]:52058 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzjzO-0003xv-Ma
	for submit <at> debbugs.gnu.org; Tue, 01 Apr 2025 18:21:47 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:43165)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1tzjzL-0003ws-UH
 for 77313 <at> debbugs.gnu.org; Tue, 01 Apr 2025 18:21:44 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <86cye09v0m.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 29 Mar
 2025 10:05:29 +0300")
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN> <875xjuuyht.fsf@HIDDEN>
 <ier7c4afc1j.fsf@HIDDEN> <86a595bpei.fsf@HIDDEN>
 <ier1puhf66g.fsf@HIDDEN> <86cye09v0m.fsf@HIDDEN>
Date: Tue, 01 Apr 2025 18:21:38 -0400
Message-ID: <ierr02btte5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1743546098;
 bh=XSru6f0L6Esz+6Jy7wb3vlM/fCgqdtb3PVi6uO57jw0=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=P3hArS8ebHWz+uPFPOApdurznVFajAkLRt5PZNFNzc9Gdbz7I6j4Pw3zidshe/cE1
 7b7gMKE2LAV5JwVDQE1a+XKr4GEU2ZytZS2PA5lEHv3HN7G0Pvwr4jardW8npyqfGJ
 LFpZ00oeXvUj7vrG+hkCdYTojcJkkqVN2oc84gpR9zr8AYxDorL2UuQYetUhfQN697
 XgqzGXKKLlxylNsbpP3g+sP50TfaWczRkf2BUGkK/OY+eRIFPhTJ/mkFeZs8l8ZR7b
 T574793pVS87NvObXkF8/UF37SoyO5FMlj+rXdmVr64bfaR08Nb1A1evlhw4ztVWxY
 2xYEi5LXBDO7g==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Spencer Baugh <sbaugh@HIDDEN>
>> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
>> Date: Fri, 28 Mar 2025 12:53:11 -0400
>> 
>> Eli Zaretskii <eliz@HIDDEN> writes:
>> 
>> > I think it's the correct direction, but wouldn't it be easier to make
>> > this a frame parameter instead?  Then the defcustom could be nil by
>> > default, and if it's non-nil, it would override the frame parameter.
>> > The bonus will be that users will be able to define different styles
>> > even for frames of the same type.  Another bonus is that the
>> > frame-parameter machinery is well-tested, so the change will be a
>> > low-risk one.
>> >
>> > WDYT?
>> 
>> Note that a nil value for the defcustom is already interpreted as
>> meaning "show no indicators".
>> 
>> As for adding a frame parameter: that's a good idea, but I think we'd
>> still want to behave correctly if the frame parameter isn't set.  In the
>> case where the frame parameter isn't set, I think we'd have the same
>> logic that exists in my patch right now, where we decide margin vs
>> fringe based on (display-graphic-p).
>
> Maybe.  Or maybe we should leave the defcustom in its current simple
> form.  Because if the default is to have the frame parameter, then
> what the defcustom does is much less important.

How would we achieve "the default is to have the frame parameter"?  How
would we make sure that the frame parameter exists on frames which were
created before flymake.el is loaded, for example?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 02 Apr 2025 11:54:02 +0000
Resent-Message-ID: <handler.77313.B77313.174359480917621 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174359480917621
          (code B ref 77313); Wed, 02 Apr 2025 11:54:02 +0000
Received: (at 77313) by debbugs.gnu.org; 2 Apr 2025 11:53:29 +0000
Received: from localhost ([127.0.0.1]:55758 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzweu-0004a5-HO
	for submit <at> debbugs.gnu.org; Wed, 02 Apr 2025 07:53:29 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33726)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tzwes-0004Z6-0C
 for 77313 <at> debbugs.gnu.org; Wed, 02 Apr 2025 07:53:26 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tzwej-0000Z4-Tx; Wed, 02 Apr 2025 07:53:19 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=b978ektpS/pYg9LvNdZRx7o+DTgJkZ6keYkdfBOm4zM=; b=JQUAqhdnco9R
 pkweeajCbGtk4hZhE1feCCXzGz44RKk4gTSSjioGbINBFbMTSuWhkPk5zF3O/bOBLXBb9jD/EURIv
 4sMMD2+uS443TQhJZDqSu7Sg3QxjSfBo3Ox+5wO7xjc8KrqeQD+xT1BOfG2TdP1yWWfRp1M6oV/rT
 V6WNvvkXwHCAMdDEwN0rntEIW7rdafZRC0utgYLMhHyyBgAOP5YcVtUczVr6KPqGFAz5dQaGkMgUu
 yBNNSE8va6WjEB07xhbD1xBkDNGcR8HvsF65zPrpMb0O5gBUZ3/D6Yl2I8oL+0W28JW13Ernbh0Er
 2SSPkHqGK4+7hVF3JTy1xw==;
Date: Wed, 02 Apr 2025 14:53:08 +0300
Message-Id: <86tt762317.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <ierr02btte5.fsf@HIDDEN> (message from Spencer Baugh on
 Tue, 01 Apr 2025 18:21:38 -0400)
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN> <875xjuuyht.fsf@HIDDEN>
 <ier7c4afc1j.fsf@HIDDEN> <86a595bpei.fsf@HIDDEN>
 <ier1puhf66g.fsf@HIDDEN> <86cye09v0m.fsf@HIDDEN>
 <ierr02btte5.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Tue, 01 Apr 2025 18:21:38 -0400
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >> From: Spencer Baugh <sbaugh@HIDDEN>
> >> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
> >> Date: Fri, 28 Mar 2025 12:53:11 -0400
> >> 
> >> Eli Zaretskii <eliz@HIDDEN> writes:
> >> 
> >> > I think it's the correct direction, but wouldn't it be easier to make
> >> > this a frame parameter instead?  Then the defcustom could be nil by
> >> > default, and if it's non-nil, it would override the frame parameter.
> >> > The bonus will be that users will be able to define different styles
> >> > even for frames of the same type.  Another bonus is that the
> >> > frame-parameter machinery is well-tested, so the change will be a
> >> > low-risk one.
> >> >
> >> > WDYT?
> >> 
> >> Note that a nil value for the defcustom is already interpreted as
> >> meaning "show no indicators".
> >> 
> >> As for adding a frame parameter: that's a good idea, but I think we'd
> >> still want to behave correctly if the frame parameter isn't set.  In the
> >> case where the frame parameter isn't set, I think we'd have the same
> >> logic that exists in my patch right now, where we decide margin vs
> >> fringe based on (display-graphic-p).
> >
> > Maybe.  Or maybe we should leave the defcustom in its current simple
> > form.  Because if the default is to have the frame parameter, then
> > what the defcustom does is much less important.
> 
> How would we achieve "the default is to have the frame parameter"?  How
> would we make sure that the frame parameter exists on frames which were
> created before flymake.el is loaded, for example?

There are several possible way that come to mind.  For example, the
first time Flymake is activated in a frame that doesn't have this
parameter, it (Flymake) will set the parameter with the default value
for the frame type.  Another possibility is to inject the parameter by
default in the respective frame-creation functions.  And there are
probably more ways.  If you evaluate (frame-parameters) in "emacs -Q",
you will see quite a few parameters there already, so evidently we
have a means of pulling that trick.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 02 Apr 2025 13:06:02 +0000
Resent-Message-ID: <handler.77313.B77313.174359911132743 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174359911132743
          (code B ref 77313); Wed, 02 Apr 2025 13:06:02 +0000
Received: (at 77313) by debbugs.gnu.org; 2 Apr 2025 13:05:11 +0000
Received: from localhost ([127.0.0.1]:56100 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzxmI-0008Vu-Go
	for submit <at> debbugs.gnu.org; Wed, 02 Apr 2025 09:05:11 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:39111)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1tzxmD-0008U7-Nn
 for 77313 <at> debbugs.gnu.org; Wed, 02 Apr 2025 09:05:06 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <86tt762317.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 02 Apr
 2025 14:53:08 +0300")
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN> <875xjuuyht.fsf@HIDDEN>
 <ier7c4afc1j.fsf@HIDDEN> <86a595bpei.fsf@HIDDEN>
 <ier1puhf66g.fsf@HIDDEN> <86cye09v0m.fsf@HIDDEN>
 <ierr02btte5.fsf@HIDDEN> <86tt762317.fsf@HIDDEN>
Date: Wed, 02 Apr 2025 09:05:00 -0400
Message-ID: <iero6xeu32b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1743599100;
 bh=v4UkbskeViEik/i8LeG+ReDv9dfLoZepE5HuTjguMlA=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=YeGzmc9jqQrdIDpCrBE8TnH2vF2pzlvANOmGSejbuxEPI39uMbcBol/ndl+O0Y50G
 mQqIhW8jG5E4Gf801VRlPLypciOEKoBvm9Ee2nkcF3pcax/8D+Iv9Q7j7XALRRHzmw
 v12JIFQ/TB/dEmFGcMcIwrzzixqy6jWjWACgCl3EwsyuG55Df1rmqDZlIsbJt41EY8
 ObFGIf7WeE9M5wBEzqUOzjMRIGlnrwjPXvn+ZKsrvFOHkDiFaXaOkAnMUAYrKVMoOW
 iakVyFTo3abJSItZCno/gPQsz8DmvFPFkAkgr9s9vnjseavRQ5bdvvUmVVcbsEVYam
 uFtz+W6VRBUFg==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Spencer Baugh <sbaugh@HIDDEN>
>> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
>> Date: Tue, 01 Apr 2025 18:21:38 -0400
>> 
>> Eli Zaretskii <eliz@HIDDEN> writes:
>> 
>> >> From: Spencer Baugh <sbaugh@HIDDEN>
>> >> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
>> >> Date: Fri, 28 Mar 2025 12:53:11 -0400
>> >> 
>> >> Eli Zaretskii <eliz@HIDDEN> writes:
>> >> 
>> >> > I think it's the correct direction, but wouldn't it be easier to make
>> >> > this a frame parameter instead?  Then the defcustom could be nil by
>> >> > default, and if it's non-nil, it would override the frame parameter.
>> >> > The bonus will be that users will be able to define different styles
>> >> > even for frames of the same type.  Another bonus is that the
>> >> > frame-parameter machinery is well-tested, so the change will be a
>> >> > low-risk one.
>> >> >
>> >> > WDYT?
>> >> 
>> >> Note that a nil value for the defcustom is already interpreted as
>> >> meaning "show no indicators".
>> >> 
>> >> As for adding a frame parameter: that's a good idea, but I think we'd
>> >> still want to behave correctly if the frame parameter isn't set.  In the
>> >> case where the frame parameter isn't set, I think we'd have the same
>> >> logic that exists in my patch right now, where we decide margin vs
>> >> fringe based on (display-graphic-p).
>> >
>> > Maybe.  Or maybe we should leave the defcustom in its current simple
>> > form.  Because if the default is to have the frame parameter, then
>> > what the defcustom does is much less important.
>> 
>> How would we achieve "the default is to have the frame parameter"?  How
>> would we make sure that the frame parameter exists on frames which were
>> created before flymake.el is loaded, for example?
>
> There are several possible way that come to mind.  For example, the
> first time Flymake is activated in a frame that doesn't have this
> parameter, it (Flymake) will set the parameter with the default value
> for the frame type.

Yes, and presumably the default value for the frame type would be
user-configurable via a defcustom, which would have the same logic that
exists in my patch right now, where we can either:

- always use margins
- always use fringes
- decide margins vs fringes based on (display-graphic-p)

So again, we can't leave the defcustom in its current simple state.

> Another possibility is to inject the parameter by default in the
> respective frame-creation functions.

So frame.el and x-win.el (and others) will mention "flymake-indicators"?
That seems like a bad idea.

> And there are probably more ways.  If you evaluate n(frame-parameters)
> in "emacs -Q", you will see quite a few parameters there already, so
> evidently we have a means of pulling that trick.

I don't see any members of (frame-parameters) which wouldn't be OK with
a default of nil.

This seems substantially more complicated than just using the current
simple defcustom.  For another thing, we don't have any customize
support for frame-parameters.  I don't think we should do this, at least
not until some user actually requests it.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 08 Apr 2025 12:47:02 +0000
Resent-Message-ID: <handler.77313.B77313.174411638613476 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174411638613476
          (code B ref 77313); Tue, 08 Apr 2025 12:47:02 +0000
Received: (at 77313) by debbugs.gnu.org; 8 Apr 2025 12:46:26 +0000
Received: from localhost ([127.0.0.1]:59805 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u28LR-0003VH-Li
	for submit <at> debbugs.gnu.org; Tue, 08 Apr 2025 08:46:26 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:44653)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1u28LP-0003UW-EC
 for 77313 <at> debbugs.gnu.org; Tue, 08 Apr 2025 08:46:23 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <iero6xeu32b.fsf@HIDDEN> (Spencer Baugh's message of
 "Wed, 02 Apr 2025 09:05:00 -0400")
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN> <875xjuuyht.fsf@HIDDEN>
 <ier7c4afc1j.fsf@HIDDEN> <86a595bpei.fsf@HIDDEN>
 <ier1puhf66g.fsf@HIDDEN> <86cye09v0m.fsf@HIDDEN>
 <ierr02btte5.fsf@HIDDEN> <86tt762317.fsf@HIDDEN>
 <iero6xeu32b.fsf@HIDDEN>
Date: Tue, 08 Apr 2025 08:46:17 -0400
Message-ID: <iera58qzuqu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1744116377;
 bh=P68BbvCMsXSKtjeRs4COXdvaKnHez0G2bj67FBapbYs=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=1tjhmepAPyrpZ/u8HLYck4aJWnOYZzSnLtBldC2yQhcbNGdh6xz5Ltjz3gm9xEwBj
 Ej1V8EYtE6dXgGxXPdlvbv6LJ56yxs1SxyqhIOa6nYB0tzBjqeTnKySMaRmv5hM9lO
 vdRnsHm/ELLZPuA5aN+mZgaDkz8e7iphXH8MlJ2PN7lxg7QieMBqeCEJSqEDgvwnnX
 EXBXmEeVFMLdKZtpb1RjJ6gwrWvByciEdfZ9VTbxHAJQPIQsLa0AxGwMN91AbJie7r
 /xzrKlLAaz5qiZMuihmj1hy7PASC11B61ck0/ziqPm7Mglsa2G1CYZUg91ov4wr+f3
 VAq1Gy8eZ+uPA==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain


Here's an updated version of my previous patch which avoids the need for
a new variant in the defcustom.  When flymake-indicator-type is set to
fringes and we're on a text frame, we simply fall back to using margins.
That allows it to be set to fringes by default without losing
functionality for text terminals; this is how this should have been
implemented originally.

Can we make progress on at least installing this on master, so we can
test it before backporting it to Emacs 30.2?


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-flymake-fall-back-to-margins-on-text-terminals.patch

From d6122447985b9f1f20b86c3ea714cc447eedcf39 Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh@HIDDEN>
Date: Tue, 8 Apr 2025 08:43:37 -0400
Subject: [PATCH] flymake: fall back to margins on text terminals

Previously, flymake-indicator-type defaulted to either fringes
or margins.  But fringes should be used on graphical frames, and
margins on TTY frames.  So default to fringes instead, and
simply fall back to margins automatically on text frames.

* lisp/progmodes/flymake.el (flymake-indicator-type): Set to
fringes.  (bug#77313)
(flymake--use-fringes-p, flymake--use-margins-p): Add.
(flymake--resize-margins): Check flymake--use-margins-p.
(flymake--highlight-line): Check flymake--use-fringes-p and
flymake--use-margins.
---
 lisp/progmodes/flymake.el | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 6cc7e1f7a79..4b40f9b9c31 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -185,22 +185,22 @@ 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),
-fringes (use fringes) or margins (use margins)
+`fringes' (use fringes) or `margins' (use margins)
 
 Difference between fringes and margin is that fringes support displaying
 bitmaps on graphical displays and margins display text in a blank area
 from current buffer that works in both graphical and text displays.
+Thus, even when `fringes' is selected, margins will still be used on
+text displays.
 
 See Info node `Fringes' and Info node `(elisp)Display Margins'."
   :version "30.1"
   :type '(choice (const :tag "Use Fringes" fringes)
-                 (const :tag "Use Margins "margins)
+                 (const :tag "Use Margins" margins)
                  (const :tag "No indicators" nil)))
 
 (defcustom flymake-margin-indicators-string
@@ -752,9 +752,9 @@ flymake--indicator-overlay-spec
   "Return INDICATOR as propertized string to use in error indicators."
   (let* ((indicator (flymake--lookup-type-property
                      type
-                     (cond ((eq flymake-indicator-type 'fringes)
+                     (cond ((flymake--use-fringes-p)
                             'flymake-bitmap)
-                           ((eq flymake-indicator-type 'margins)
+                           ((flymake--use-margins-p)
                             'flymake-margin-string))
                      (alist-get 'bitmap (alist-get type ; backward compat
                                                    flymake-diagnostic-types-alist))))
@@ -784,10 +784,22 @@ flymake--indicator-overlay-spec
                                              (format "<%s> <mouse-1>" flymake-margin-indicator-position)
                                              #'flymake-show-buffer-diagnostics-at-event-line))))))))
 
+(defun flymake--use-fringes-p ()
+  (cl-case flymake-indicator-type
+    (fringes (display-graphic-p))
+    ((nil margins) nil)
+    (t t)))
+
+(defun flymake--use-margins-p ()
+  (cl-case flymake-indicator-type
+    (fringes (not (display-graphic-p)))
+    (margins t)
+    (t nil)))
+
 (defun flymake--resize-margins (&optional orig-width)
   "Resize current window margins according to `flymake-margin-indicator-position'.
 Return to original margin width if ORIG-WIDTH is non-nil."
-  (when (and (eq flymake-indicator-type 'margins)
+  (when (and (flymake--use-margins-p)
              flymake-autoresize-margins)
     (cond
      ((and orig-width flymake--original-margin-width)
-- 
2.39.3


--=-=-=--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 08 Apr 2025 14:17:02 +0000
Resent-Message-ID: <handler.77313.B77313.174412178321184 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174412178321184
          (code B ref 77313); Tue, 08 Apr 2025 14:17:02 +0000
Received: (at 77313) by debbugs.gnu.org; 8 Apr 2025 14:16:23 +0000
Received: from localhost ([127.0.0.1]:34314 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u29kU-0005VV-Kd
	for submit <at> debbugs.gnu.org; Tue, 08 Apr 2025 10:16:22 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54854)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u29kS-0005Ue-6B
 for 77313 <at> debbugs.gnu.org; Tue, 08 Apr 2025 10:16:21 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1u29kL-0006eQ-Hk; Tue, 08 Apr 2025 10:16:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=dNGciYVSLxVvj/EoEbkEIsCMSf1+yZXMuANczElqTA4=; b=gFL1z2cJUgPn
 oJlum29n/cUb5zwomW2y5kMU3umGhRX310OQSpwicVx2pvSKKVxdWlpE7Us1/QlhFS8SEq7V43cqM
 Ij7+PVYGVrumua/lQ/rAei024uRGCSANgPlK4361QguGcNfnMGtektkR5NWxUwehZ2aDCgIeyWfmo
 Ah15HAOK6YB8Cetg56+HLbJU88Hh3h4cO6/1H7Hy5XAze8hIGPI/R5wjLk48mTEtH9IBg+hl2Xk7k
 kvA1N0bsTmXU+CJMCUdI+lg+TR/niDSD/bNFLgGR2g8+IJb+yEEuvXEfKTTjigKx9bVJlaKaUQImw
 1hvcUZVw3j3U2qCYVkg4uw==;
Date: Tue, 08 Apr 2025 17:15:57 +0300
Message-Id: <865xjeu4bm.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <iera58qzuqu.fsf@HIDDEN> (message from Spencer Baugh on
 Tue, 08 Apr 2025 08:46:17 -0400)
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN> <875xjuuyht.fsf@HIDDEN>
 <ier7c4afc1j.fsf@HIDDEN> <86a595bpei.fsf@HIDDEN>
 <ier1puhf66g.fsf@HIDDEN> <86cye09v0m.fsf@HIDDEN>
 <ierr02btte5.fsf@HIDDEN> <86tt762317.fsf@HIDDEN>
 <iero6xeu32b.fsf@HIDDEN> <iera58qzuqu.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Tue, 08 Apr 2025 08:46:17 -0400
> 
> Here's an updated version of my previous patch which avoids the need for
> a new variant in the defcustom.  When flymake-indicator-type is set to
> fringes and we're on a text frame, we simply fall back to using margins.
> That allows it to be set to fringes by default without losing
> functionality for text terminals; this is how this should have been
> implemented originally.

I think we should also fall back on using margins if the fringes are
disabled on GUI frames.
> -(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),
> -fringes (use fringes) or margins (use margins)
> +`fringes' (use fringes) or `margins' (use margins)
>  
>  Difference between fringes and margin is that fringes support displaying
>  bitmaps on graphical displays and margins display text in a blank area
>  from current buffer that works in both graphical and text displays.
> +Thus, even when `fringes' is selected, margins will still be used on
> +text displays.
   ^^^^^^^^^^^^^
"...and also when fringes are disabled."

>  
>  See Info node `Fringes' and Info node `(elisp)Display Margins'."
>    :version "30.1"

The :version should change, since the default value changes.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 08 Apr 2025 14:31:01 +0000
Resent-Message-ID: <handler.77313.B77313.174412261627481 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174412261627481
          (code B ref 77313); Tue, 08 Apr 2025 14:31:01 +0000
Received: (at 77313) by debbugs.gnu.org; 8 Apr 2025 14:30:16 +0000
Received: from localhost ([127.0.0.1]:34386 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u29xt-000776-Nn
	for submit <at> debbugs.gnu.org; Tue, 08 Apr 2025 10:30:15 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:55303)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1u29xl-0006vQ-Jc
 for 77313 <at> debbugs.gnu.org; Tue, 08 Apr 2025 10:30:10 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <865xjeu4bm.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 08 Apr
 2025 17:15:57 +0300")
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN> <875xjuuyht.fsf@HIDDEN>
 <ier7c4afc1j.fsf@HIDDEN> <86a595bpei.fsf@HIDDEN>
 <ier1puhf66g.fsf@HIDDEN> <86cye09v0m.fsf@HIDDEN>
 <ierr02btte5.fsf@HIDDEN> <86tt762317.fsf@HIDDEN>
 <iero6xeu32b.fsf@HIDDEN> <iera58qzuqu.fsf@HIDDEN>
 <865xjeu4bm.fsf@HIDDEN>
Date: Tue, 08 Apr 2025 10:29:59 -0400
Message-ID: <ier7c3uzpy0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1744122600;
 bh=MIHf5eArxl3QGYcTp8AoOOEut/yOnp0wV8LQxheCPM4=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=QZ9TPkA3Qol5Fk9r5jOUeYjDFY6hPz82BZGXoxZ78oPHMXfAMIOdgjcVramiBNzht
 61aOzgKlyN5NZE3KxvATmyinA8gbKZsyzrR+zbGNrnhRh4wXdLU/gXNJamETBYVpDg
 Zx3ZYMWadqCVYKvU5mAZKGLEnLBAorn3jd53VIo40Ly+TKnK4E2Zi8G3T8k6CAeeBL
 I91hDc+D/8z+RX2vTia3Z9TOw43HBxrPzrSgdlENOJXltuosIKtby0VOkhGxZav01T
 ZRbxkSsWPhXhPGhRFZaqqtqJ4JQRYS+/u9oIGOP4NtNao4yv/dEKK6FvxFmZ1Qk69K
 DFsedL9i7CZ6g==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Spencer Baugh <sbaugh@HIDDEN>
>> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
>> Date: Tue, 08 Apr 2025 08:46:17 -0400
>> 
>> Here's an updated version of my previous patch which avoids the need for
>> a new variant in the defcustom.  When flymake-indicator-type is set to
>> fringes and we're on a text frame, we simply fall back to using margins.
>> That allows it to be set to fringes by default without losing
>> functionality for text terminals; this is how this should have been
>> implemented originally.
>
> I think we should also fall back on using margins if the fringes are
> disabled on GUI frames.

Disabled how?  I don't see a way to disable the fringe.  Do you mean
when the fringe width is set to 0?  So are you suggesting we should call
window-fringes and check the width of the fringe we're going to use?  I
can do that, just want to confirm.

>> -(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),
>> -fringes (use fringes) or margins (use margins)
>> +`fringes' (use fringes) or `margins' (use margins)
>>  
>>  Difference between fringes and margin is that fringes support displaying
>>  bitmaps on graphical displays and margins display text in a blank area
>>  from current buffer that works in both graphical and text displays.
>> +Thus, even when `fringes' is selected, margins will still be used on
>> +text displays.
>    ^^^^^^^^^^^^^
> "...and also when fringes are disabled."
>
>>  
>>  See Info node `Fringes' and Info node `(elisp)Display Margins'."
>>    :version "30.1"
>
> The :version should change, since the default value changes.

Will update these in the next version.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 08 Apr 2025 14:57:02 +0000
Resent-Message-ID: <handler.77313.B77313.174412418917390 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174412418917390
          (code B ref 77313); Tue, 08 Apr 2025 14:57:02 +0000
Received: (at 77313) by debbugs.gnu.org; 8 Apr 2025 14:56:29 +0000
Received: from localhost ([127.0.0.1]:34541 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u2ANI-0004WM-1G
	for submit <at> debbugs.gnu.org; Tue, 08 Apr 2025 10:56:28 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:53941)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1u2ANF-0004VW-HB
 for 77313 <at> debbugs.gnu.org; Tue, 08 Apr 2025 10:56:26 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <ier7c3uzpy0.fsf@HIDDEN> (Spencer Baugh's message of
 "Tue, 08 Apr 2025 10:29:59 -0400")
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN> <875xjuuyht.fsf@HIDDEN>
 <ier7c4afc1j.fsf@HIDDEN> <86a595bpei.fsf@HIDDEN>
 <ier1puhf66g.fsf@HIDDEN> <86cye09v0m.fsf@HIDDEN>
 <ierr02btte5.fsf@HIDDEN> <86tt762317.fsf@HIDDEN>
 <iero6xeu32b.fsf@HIDDEN> <iera58qzuqu.fsf@HIDDEN>
 <865xjeu4bm.fsf@HIDDEN> <ier7c3uzpy0.fsf@HIDDEN>
Date: Tue, 08 Apr 2025 10:56:20 -0400
Message-ID: <ier4iyyzoq3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1744124180;
 bh=pCcKL2ZhzQwhRRHSfboXxDW3htNJhoai6jQZ9IKwMPg=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=Nfig8TbpWjvpFLNC8XKo2wdb3Tb3RzImTF+W5mGbQ0LD2V3FjmWjRt8/CuxL3g/kL
 glx/g1yhYGhHxTWtmAsPXgse9S6l+AQOqPu16neYgXoARB/KRl7TMGpU/Le5fak/QI
 bzl+eeJj+gYv3RpnaTGt4tTk4XKxFT+8TVULGkSiuv4KJgjoJcOmbC6Qm1abYtCRfj
 bRlXZGER9pGPQOzLIKz/7EmXx2KZ1mm7eSLC3Ft3dscz6gEQadSmCm8fxKPddrppJT
 1+iuqDg6TRWc7nLuygyTHOdIkIghXvj5lDYXCRcyXHxEiTdf3xkb9Gfd7lJE/4fE0w
 HrJ/EQg2DUdXA==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Spencer Baugh <sbaugh@HIDDEN> writes:
> Eli Zaretskii <eliz@HIDDEN> writes:
>
>>> From: Spencer Baugh <sbaugh@HIDDEN>
>>> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
>>> Date: Tue, 08 Apr 2025 08:46:17 -0400
>>> 
>>> Here's an updated version of my previous patch which avoids the need for
>>> a new variant in the defcustom.  When flymake-indicator-type is set to
>>> fringes and we're on a text frame, we simply fall back to using margins.
>>> That allows it to be set to fringes by default without losing
>>> functionality for text terminals; this is how this should have been
>>> implemented originally.
>>
>> I think we should also fall back on using margins if the fringes are
>> disabled on GUI frames.
>
> Disabled how?  I don't see a way to disable the fringe.  Do you mean
> when the fringe width is set to 0?  So are you suggesting we should call
> window-fringes and check the width of the fringe we're going to use?  I
> can do that, just want to confirm.

Assuming that's what you mean, here's the updated patch.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-flymake-fall-back-to-margins-on-text-terminals.patch

From 555ebfec9641d535778dfc6295f4accb70557721 Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh@HIDDEN>
Date: Tue, 8 Apr 2025 08:43:37 -0400
Subject: [PATCH] flymake: fall back to margins on text terminals

Previously, flymake-indicator-type defaulted to either fringes
or margins.  But fringes should be used on graphical frames, and
margins on TTY frames.  So default to fringes instead, and
simply fall back to margins automatically on text frames.

* lisp/progmodes/flymake.el (flymake-indicator-type): Set to
fringes.  (bug#77313)
(flymake-mode): Fallback to margins if there's no fringes.
---
 lisp/progmodes/flymake.el | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 6cc7e1f7a79..7340fed9be4 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -185,22 +185,23 @@ 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),
-fringes (use fringes) or margins (use margins)
+the symbol `fringes' (use fringes) or the symbol `margins' (use
+margins).
 
 Difference between fringes and margin is that fringes support displaying
 bitmaps on graphical displays and margins display text in a blank area
 from current buffer that works in both graphical and text displays.
+Thus, even when `fringes' is selected, margins will still be used on
+text displays and also when fringes are disabled.
 
 See Info node `Fringes' and Info node `(elisp)Display Margins'."
-  :version "30.1"
+  :version "31.1"
   :type '(choice (const :tag "Use Fringes" fringes)
-                 (const :tag "Use Margins "margins)
+                 (const :tag "Use Margins" margins)
                  (const :tag "No indicators" nil)))
 
 (defcustom flymake-margin-indicators-string
@@ -1439,6 +1440,13 @@ flymake-mode
     (add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t)
     (add-hook 'eldoc-documentation-functions 'flymake-eldoc-function t t)
 
+    (when (and (eq flymake-indicator-type 'fringes)
+               (not (cl-case flymake-fringe-indicator-position
+                      (left-fringe (< 0 (nth 0 (window-fringes))))
+                      (right-fringe (< 0 (nth 1 (window-fringes)))))))
+      ;; There are no fringes in the buffer, fallback to margins.
+      (setq-local flymake-indicator-type 'margins))
+
     ;; AutoResize margins.
     (flymake--resize-margins)
 
-- 
2.39.3


--=-=-=--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 08 Apr 2025 15:55:02 +0000
Resent-Message-ID: <handler.77313.B77313.174412769610483 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174412769610483
          (code B ref 77313); Tue, 08 Apr 2025 15:55:02 +0000
Received: (at 77313) by debbugs.gnu.org; 8 Apr 2025 15:54:56 +0000
Received: from localhost ([127.0.0.1]:34889 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u2BHs-0002iz-49
	for submit <at> debbugs.gnu.org; Tue, 08 Apr 2025 11:54:56 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:58224)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u2BHp-0002iG-0Q
 for 77313 <at> debbugs.gnu.org; Tue, 08 Apr 2025 11:54:53 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1u2BHj-0005Yv-6W; Tue, 08 Apr 2025 11:54:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=w7x8fHd6HbN6ozHAoRPJALFQA2eKOq62cGe/i5/00Fw=; b=pqA9+svv1Rco
 far9jI/v0UWh10mlDgZnGnxYPjJV2nhGD43FKRNAHu4ErpmsEg6bjjLMBhJdmCLrVZdgWeXgSNfJJ
 cwvjnDBGzn2Um7FjmavDLiqa0fhAAf+ym8LB0q03JmYQ2yjp3r0xBvhmca8vJsqT/kI8OnF+WtL4V
 6QpFLR4ePl0mG8nr9VS/43Ocq/r4y3UqfBn2WZuRBA/Wokyi0Gw1J/oDBBIM+pz9fIi4exwTdfiqO
 nXQz4rWDm0yyU2aDZqCSKHaDXhPxYckh/qE0DSH5SjCiuc8hIIcUht73sly3tAVG36fepmOEOUVKw
 wjIrgmQQC1fHRkaLfLZ6Og==;
Date: Tue, 08 Apr 2025 18:54:42 +0300
Message-Id: <8634eitzr1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <ier4iyyzoq3.fsf@HIDDEN> (message from Spencer Baugh on
 Tue, 08 Apr 2025 10:56:20 -0400)
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN> <875xjuuyht.fsf@HIDDEN>
 <ier7c4afc1j.fsf@HIDDEN> <86a595bpei.fsf@HIDDEN>
 <ier1puhf66g.fsf@HIDDEN> <86cye09v0m.fsf@HIDDEN>
 <ierr02btte5.fsf@HIDDEN> <86tt762317.fsf@HIDDEN>
 <iero6xeu32b.fsf@HIDDEN> <iera58qzuqu.fsf@HIDDEN>
 <865xjeu4bm.fsf@HIDDEN> <ier7c3uzpy0.fsf@HIDDEN>
 <ier4iyyzoq3.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Tue, 08 Apr 2025 10:56:20 -0400
> 
> Spencer Baugh <sbaugh@HIDDEN> writes:
> > Eli Zaretskii <eliz@HIDDEN> writes:
> >
> >> I think we should also fall back on using margins if the fringes are
> >> disabled on GUI frames.
> >
> > Disabled how?  I don't see a way to disable the fringe.  Do you mean
> > when the fringe width is set to 0?  So are you suggesting we should call
> > window-fringes and check the width of the fringe we're going to use?  I
> > can do that, just want to confirm.
> 
> Assuming that's what you mean, here's the updated patch.

Yes, that's what I meant.

> >From 555ebfec9641d535778dfc6295f4accb70557721 Mon Sep 17 00:00:00 2001
> From: Spencer Baugh <sbaugh@HIDDEN>
> Date: Tue, 8 Apr 2025 08:43:37 -0400
> Subject: [PATCH] flymake: fall back to margins on text terminals
> 
> Previously, flymake-indicator-type defaulted to either fringes
> or margins.  But fringes should be used on graphical frames, and
> margins on TTY frames.  So default to fringes instead, and
> simply fall back to margins automatically on text frames.

The above needs to be updated to mention the disabled fringes.

> * lisp/progmodes/flymake.el (flymake-indicator-type): Set to
> fringes.  (bug#77313)
> (flymake-mode): Fallback to margins if there's no fringes.

This needs a NEWS entry, but other than that it LGTM.  Let's wait for
a couple of days to let others a chance to comment.

Thanks.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 08 Apr 2025 21:51:01 +0000
Resent-Message-ID: <handler.77313.B77313.17441490552942 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17441490552942
          (code B ref 77313); Tue, 08 Apr 2025 21:51:01 +0000
Received: (at 77313) by debbugs.gnu.org; 8 Apr 2025 21:50:55 +0000
Received: from localhost ([127.0.0.1]:35871 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u2GqM-0000lN-9v
	for submit <at> debbugs.gnu.org; Tue, 08 Apr 2025 17:50:54 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:33789)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1u2GqB-0000ku-Lt
 for 77313 <at> debbugs.gnu.org; Tue, 08 Apr 2025 17:50:44 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <8634eitzr1.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 08 Apr
 2025 18:54:42 +0300")
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN> <875xjuuyht.fsf@HIDDEN>
 <ier7c4afc1j.fsf@HIDDEN> <86a595bpei.fsf@HIDDEN>
 <ier1puhf66g.fsf@HIDDEN> <86cye09v0m.fsf@HIDDEN>
 <ierr02btte5.fsf@HIDDEN> <86tt762317.fsf@HIDDEN>
 <iero6xeu32b.fsf@HIDDEN> <iera58qzuqu.fsf@HIDDEN>
 <865xjeu4bm.fsf@HIDDEN> <ier7c3uzpy0.fsf@HIDDEN>
 <ier4iyyzoq3.fsf@HIDDEN> <8634eitzr1.fsf@HIDDEN>
Date: Tue, 08 Apr 2025 17:50:38 -0400
Message-ID: <iermscqqq4x.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1744149038;
 bh=bccBT6PTveUN9UxFJXPQdlcJfTwZT7YQ2NX//qRY+lc=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=tYW/yOs3aZNh3mVo2IW5HabU32jcZIzYHbMncVrB+mHD1acMUtaJf6vIJO83//eOO
 AdejH1zvnz5zKMORWmGe4RH1FtLSj+rjeg2Cz3JV+7Fx7Tj1J2ODY6YY5NjjTw/Giz
 1nTqY98Cvll4CY6Hv0B05gSSxmChjmcxmdujaAVMxGiLmZJMviVPgf7SXiQRvLssDm
 R+BxE3tAUBYWBZe6/AKs85IK6jZjMvIiGN6wK9oN/ExMHXHP6d2oI6ETwTGj9MM342
 lxMM8dF5kH7Ko68IBeAH/w8xdI08Cu0LzLuSg8cb+eauYWMN/v41vkRmJeuRCfaUhX
 q4S4Qe6DYUU3Q==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Eli Zaretskii <eliz@HIDDEN> writes:
>> From: Spencer Baugh <sbaugh@HIDDEN>
>> Date: Tue, 8 Apr 2025 08:43:37 -0400
>> Subject: [PATCH] flymake: fall back to margins on text terminals
>> 
>> Previously, flymake-indicator-type defaulted to either fringes
>> or margins.  But fringes should be used on graphical frames, and
>> margins on TTY frames.  So default to fringes instead, and
>> simply fall back to margins automatically on text frames.
>
> The above needs to be updated to mention the disabled fringes.

Updated.

>> * lisp/progmodes/flymake.el (flymake-indicator-type): Set to
>> fringes.  (bug#77313)
>> (flymake-mode): Fallback to margins if there's no fringes.
>
> This needs a NEWS entry, but other than that it LGTM.  Let's wait for
> a couple of days to let others a chance to comment.

Added a NEWS entry.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-flymake-fall-back-to-margins-on-text-terminals.patch

From 792d90c4f01a6b054a4a05ae7dc2598716def7ea Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh@HIDDEN>
Date: Tue, 8 Apr 2025 08:43:37 -0400
Subject: [PATCH] flymake: fall back to margins on text terminals

Previously, flymake-indicator-type defaulted to either fringes
or margins.  But fringes should be used on graphical frames, and
margins on TTY frames.  So default to fringes instead, and
simply fall back to margins automatically on text frames.

* lisp/progmodes/flymake.el (flymake-indicator-type): Set to
fringes.  (bug#77313)
(flymake-mode): Fallback to margins if there's no fringes.
* doc/misc/flymake.texi (Customizable variables): Mention
fallback behavior.
* etc/NEWS: Announce fallback behavior.
---
 doc/misc/flymake.texi     |  3 +++
 etc/NEWS                  |  8 ++++++++
 lisp/progmodes/flymake.el | 20 ++++++++++++++------
 3 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index 54835767928..668a72b4cd1 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -313,6 +313,9 @@ Customizable variables
 errors or warnings.
 Depending on your preference, this can either use @code{fringes} or
 @code{margins} for indicating errors.
+If set to @code{fringes} (the default), it will automatically fall back
+to using margins in windows or frames without fringes, such as text
+terminals.
 
 @item flymake-error-bitmap
 A bitmap used in the fringe to mark lines for which an error has
diff --git a/etc/NEWS b/etc/NEWS
index b2286236d57..123a04527c4 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1720,6 +1720,14 @@ change their face if the current line exceeds the 'fill-column'.  The
 new face 'display-fill-column-indicator-warning-face' is used to
 highlight the fill-column indicators.  By default this is disabled.
 
+---
+** Flymake
+
+*** Windows without fringes now automatically use margin indicators
+When flymake-indicator-type is set to 'fringes', as is now the default,
+flymake will automatically fall back to using margin indicators in
+windows without fringes, including any window in a text terminal.
+
 
 * New Modes and Packages in Emacs 31.1
 
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 6cc7e1f7a79..7340fed9be4 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -185,22 +185,23 @@ 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),
-fringes (use fringes) or margins (use margins)
+the symbol `fringes' (use fringes) or the symbol `margins' (use
+margins).
 
 Difference between fringes and margin is that fringes support displaying
 bitmaps on graphical displays and margins display text in a blank area
 from current buffer that works in both graphical and text displays.
+Thus, even when `fringes' is selected, margins will still be used on
+text displays and also when fringes are disabled.
 
 See Info node `Fringes' and Info node `(elisp)Display Margins'."
-  :version "30.1"
+  :version "31.1"
   :type '(choice (const :tag "Use Fringes" fringes)
-                 (const :tag "Use Margins "margins)
+                 (const :tag "Use Margins" margins)
                  (const :tag "No indicators" nil)))
 
 (defcustom flymake-margin-indicators-string
@@ -1439,6 +1440,13 @@ flymake-mode
     (add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t)
     (add-hook 'eldoc-documentation-functions 'flymake-eldoc-function t t)
 
+    (when (and (eq flymake-indicator-type 'fringes)
+               (not (cl-case flymake-fringe-indicator-position
+                      (left-fringe (< 0 (nth 0 (window-fringes))))
+                      (right-fringe (< 0 (nth 1 (window-fringes)))))))
+      ;; There are no fringes in the buffer, fallback to margins.
+      (setq-local flymake-indicator-type 'margins))
+
     ;; AutoResize margins.
     (flymake--resize-margins)
 
-- 
2.39.3


--=-=-=--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 12 Apr 2025 11:14:02 +0000
Resent-Message-ID: <handler.77313.B77313.174445639413340 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174445639413340
          (code B ref 77313); Sat, 12 Apr 2025 11:14:02 +0000
Received: (at 77313) by debbugs.gnu.org; 12 Apr 2025 11:13:14 +0000
Received: from localhost ([127.0.0.1]:54228 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u3YnS-0003T4-96
	for submit <at> debbugs.gnu.org; Sat, 12 Apr 2025 07:13:14 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47358)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u3YnP-0003Sj-PA
 for 77313 <at> debbugs.gnu.org; Sat, 12 Apr 2025 07:13:12 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1u3YnJ-0003Au-GW; Sat, 12 Apr 2025 07:13:05 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=+2CI0adhjQrOhUjuSjjE+1qBInDzb5u/VLcZCh3Jh7U=; b=TSz5cpf6+lve
 7AgHDy0hb4QQWpl6AH7KWzebVijP9IXl4ZA3QzaGBr4ndy3GEO+c/EMzD3j6uDp/6vQwSXXJ+4KYo
 pbi3CXhyvFozuMLbOUVr8nXJUr1qJDVvnbiOVeGTqRCtxFPLod2Z5DqV+u414Qi0lIlx0syH/8vJE
 GqyKZo6DL5GkBc7rKp2Ewk8bqHEwhMoIQkTKPpQSXbpJGC3SgEz7Gtwv2dlv2tPhBsXeTnd/pVQxf
 JXfhVk91yfj6W/xcgssDjxMvPGBCIYqBJhOdEwzCXha7VtA6tORgrdOtDXNkVbRol1WVrqT6v2tJs
 1PtY2auytzcT9bAXQfBPTg==;
Date: Sat, 12 Apr 2025 14:13:00 +0300
Message-Id: <86jz7pmy4j.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <iermscqqq4x.fsf@HIDDEN> (message from Spencer Baugh on
 Tue, 08 Apr 2025 17:50:38 -0400)
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN> <875xjuuyht.fsf@HIDDEN>
 <ier7c4afc1j.fsf@HIDDEN> <86a595bpei.fsf@HIDDEN>
 <ier1puhf66g.fsf@HIDDEN> <86cye09v0m.fsf@HIDDEN>
 <ierr02btte5.fsf@HIDDEN> <86tt762317.fsf@HIDDEN>
 <iero6xeu32b.fsf@HIDDEN> <iera58qzuqu.fsf@HIDDEN>
 <865xjeu4bm.fsf@HIDDEN> <ier7c3uzpy0.fsf@HIDDEN>
 <ier4iyyzoq3.fsf@HIDDEN> <8634eitzr1.fsf@HIDDEN>
 <iermscqqq4x.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Tue, 08 Apr 2025 17:50:38 -0400
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> >> From: Spencer Baugh <sbaugh@HIDDEN>
> >> Date: Tue, 8 Apr 2025 08:43:37 -0400
> >> Subject: [PATCH] flymake: fall back to margins on text terminals
> >> 
> >> Previously, flymake-indicator-type defaulted to either fringes
> >> or margins.  But fringes should be used on graphical frames, and
> >> margins on TTY frames.  So default to fringes instead, and
> >> simply fall back to margins automatically on text frames.
> >
> > The above needs to be updated to mention the disabled fringes.
> 
> Updated.
> 
> >> * lisp/progmodes/flymake.el (flymake-indicator-type): Set to
> >> fringes.  (bug#77313)
> >> (flymake-mode): Fallback to margins if there's no fringes.
> >
> > This needs a NEWS entry, but other than that it LGTM.  Let's wait for
> > a couple of days to let others a chance to comment.
> 
> Added a NEWS entry.

Thanks, installed on master.

Should we now close this bug?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 12 Apr 2025 11:44:05 +0000
Resent-Message-ID: <handler.77313.B77313.17444582133977 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17444582133977
          (code B ref 77313); Sat, 12 Apr 2025 11:44:05 +0000
Received: (at 77313) by debbugs.gnu.org; 12 Apr 2025 11:43:33 +0000
Received: from localhost ([127.0.0.1]:54303 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u3ZGl-00011q-SN
	for submit <at> debbugs.gnu.org; Sat, 12 Apr 2025 07:43:33 -0400
Received: from mxout1.mail.janestreet.com ([38.105.200.78]:36893)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1u3ZGi-00010j-FV
 for 77313 <at> debbugs.gnu.org; Sat, 12 Apr 2025 07:43:29 -0400
Received: from mail-ej1-f69.google.com ([209.85.218.69])
 by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128)
 (Exim 4.98.1) id 1u3ZGd-00000003AgU-0Lgl for 77313 <at> debbugs.gnu.org;
 Sat, 12 Apr 2025 07:43:22 -0400
Received: by mail-ej1-f69.google.com with SMTP id
 a640c23a62f3a-ac6b047c0dcso261061666b.0
 for <77313 <at> debbugs.gnu.org>; Sat, 12 Apr 2025 04:43:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=janestreet.com; s=google; t=1744458202; x=1745063002; darn=debbugs.gnu.org; 
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=0U51Qps+KPXC4X4APez62chsu5z3/hQfn4u99VKLq4c=;
 b=0MHiyK0AQt19edLDAfGnKep9nM5vKyF95H49A9Zqnebnpb5u6+7xx982Mc2Ti53d9F
 RrHPOkl9EjPQkgzul0dm3oSgAHWeMGsZpj+hs1NsWkwVNEd+JxMc75ONbQdRvqzF5dau
 zD7HCjw94n1jfohGfWvl2ln4AvQCjnqPZApWI=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1744458202;
 bh=0U51Qps+KPXC4X4APez62chsu5z3/hQfn4u99VKLq4c=;
 h=References:In-Reply-To:From:Date:Subject:To:Cc;
 b=Zcvmdqro8K43mTr8cy80VGy+GIJmWgpAupvKrmVCc1osfcTqxrgS5wNApHKf2iekM
 MqW6+UBMiPifiZUnU3hT0ZgkXSUCnsuN5BzSuCSCV5ZmOfv4uc8sTIHxx7VMEyEHU9
 E+wIuLYF2YNmdmGdJueQrFzcC5N9KIiaOe6YA9SJVTFzbRk1QkOQ0UGmxKt+ISHgo9
 z4lMoQKVR+eJx2iFfwHxLPMbdRb3FRo/Y3StasPeO2sdtw6JdHCI93F/q0TBbmaaa6
 d4/eCh+hgAIR0rVOSnC0FPVgpz4gj7S3DbRRZzSy08OhoVuAoUBIvz1cyrE6mWMNYd
 P0NcRou0eMYGQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1744458202; x=1745063002;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=0U51Qps+KPXC4X4APez62chsu5z3/hQfn4u99VKLq4c=;
 b=ijf8hw2SOdiDekW+jA4i+nuhh5vBY4sFsbBxlBez8i/GU8SFCQ8V5lTvtyrFs+n3cY
 OjXR6wlrDWiLCSXFKxr+mLN+Z3cCznAbKQPGBC//vQw1YsL/ACeYU5wAl69Fzddx9bsX
 Ay/N3OQjkDC++OJmwDE/T9I+H3DDmClhiL29nG9ICE4DiC2Jcfq6ewCubnLqa65N5uV2
 l4TvDsY+fnrQzai9LvlOd9vg5NvUOv6mUQIhHg3bWL+vvKJCutFuLV8u2oSMAyPSDcp7
 E9ZpDv8vLekLqIe+Ca7sVfGMc4bg23QHlqceY7rCXRnvOOp2prOqYR6a5ae6AZt0+sKO
 uaQA==
X-Gm-Message-State: AOJu0YyqcvFgCUioYI8KJcXxsg3tbu/U8A3fW+zC0K0UmsEGyNxxvcat
 dpYQLcBSfm+ciQr2vLqDixTJx+hB4gGZ7hZ9Qh18aJkJwFnnyO2xjuH2A53kQNCfC3ri+nnGNrk
 R6xuEHYVn4iLzC9otIGkPQ1rKQy78NhiIJyPsLrvaNwE7RywXkqRmQuN04UNB8ATZFTOwgnsbME
 9qRKDhuXbx4aUKMC2aWu+vKiDFYg==
X-Gm-Gg: ASbGncsODUrMf2B/7suEA7XNeIp6UUwFeCYnK/1+8qN/+A2T5w806bTu7lP2O28ZOY6
 QVZbwBtzGwCY5NFPMRZWYktSl82IEXbXGFMA8cYpRmqTSEfW2wjVMlYvdifnG9uPxiHvW
X-Received: by 2002:a17:907:1b1e:b0:aca:95e7:ec59 with SMTP id
 a640c23a62f3a-acad348b53bmr514541066b.19.1744458201682; 
 Sat, 12 Apr 2025 04:43:21 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IG9wjBVI+UWDOVFNOHhfiYCQLkytZehAUEU7+N9raCSG78GhClVKyfrITALu7ZyOMl0mmSrlEvQ/zhR9NxIK5Y=
X-Received: by 2002:a17:907:1b1e:b0:aca:95e7:ec59 with SMTP id
 a640c23a62f3a-acad348b53bmr514539666b.19.1744458201256; Sat, 12 Apr 2025
 04:43:21 -0700 (PDT)
MIME-Version: 1.0
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN>
 <875xjuuyht.fsf@HIDDEN> <ier7c4afc1j.fsf@HIDDEN>
 <86a595bpei.fsf@HIDDEN> <ier1puhf66g.fsf@HIDDEN>
 <86cye09v0m.fsf@HIDDEN>
 <ierr02btte5.fsf@HIDDEN> <86tt762317.fsf@HIDDEN>
 <iero6xeu32b.fsf@HIDDEN>
 <iera58qzuqu.fsf@HIDDEN> <865xjeu4bm.fsf@HIDDEN>
 <ier7c3uzpy0.fsf@HIDDEN>
 <ier4iyyzoq3.fsf@HIDDEN> <8634eitzr1.fsf@HIDDEN>
 <iermscqqq4x.fsf@HIDDEN> <86jz7pmy4j.fsf@HIDDEN>
In-Reply-To: <86jz7pmy4j.fsf@HIDDEN>
From: Spencer Baugh <sbaugh@HIDDEN>
Date: Sat, 12 Apr 2025 07:43:11 -0400
X-Gm-Features: ATxdqUFsXhn2qAo-RBwpm9LZaCC6LdbBAz6Srnb-6yYXqVskOzc5jM5Vi8NZ4iI
Message-ID: <CAO=BR8OfSU+8+2UXKF2x_q9wJkRFQkft0mgGaYNh08ZO+SX_LQ@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000006970bc06329353ec"
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--0000000000006970bc06329353ec
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, Apr 12, 2025, 7:13=E2=80=AFAM Eli Zaretskii <eliz@HIDDEN> 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.

>

--0000000000006970bc06329353ec
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote gmail_quote_contai=
ner"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Apr 12, 2025, 7:13=E2=80=
=AFAM Eli Zaretskii &lt;<a href=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>&gt=
; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .=
8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks, installed on maste=
r.<br>
<br>
Should we now close this bug?<br></blockquote></div></div><div dir=3D"auto"=
><br></div><div dir=3D"auto">No, we need to backport it to Emacs 30.2 to fi=
x the regression.</div><div dir=3D"auto"><div class=3D"gmail_quote gmail_qu=
ote_container"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>

--0000000000006970bc06329353ec--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 12 Apr 2025 12:51:03 +0000
Resent-Message-ID: <handler.77313.B77313.174446222616848 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174446222616848
          (code B ref 77313); Sat, 12 Apr 2025 12:51:03 +0000
Received: (at 77313) by debbugs.gnu.org; 12 Apr 2025 12:50:26 +0000
Received: from localhost ([127.0.0.1]:54379 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u3aJT-0004Mo-6b
	for submit <at> debbugs.gnu.org; Sat, 12 Apr 2025 08:50:25 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48906)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u3aJP-0004J6-6M
 for 77313 <at> debbugs.gnu.org; Sat, 12 Apr 2025 08:50:20 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1u3aJI-0001aQ-Ob; Sat, 12 Apr 2025 08:50:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=ndICiXnky74bMho1T39vtS1WVuNiJFOSrAy0M8zOy5o=; b=lB3zxkRNq0d8MmysoVDL
 VZ1PxKGjRBlgkpAP4XqQF+Of0cx78L9CPpCvOcbM3Qi6a53lHgXT77GflrKxEzSHJb+i3JqxLteyu
 KiNIe37kh28OeOCf4itxJg1Rr195Lbf2kqjc3lQ10hN8IcIRRssXHy3NoNUVgSpCILXtvTN7YTKPo
 D8OUBawk0EEvRHVHlrhGu/dadxYgVieD8vv/2jYpxR8vL+ldmJG+YKfs7ocEVohPjaH3aCnvbMZNo
 fOaKllvXjFMX5VjM+ojwONom4NWqdfGIOlz1thROv4jL9mEF0ITUa6Cu9QeikU0PTlMZfLA5R3Q6T
 944vsF80wtR+4g==;
Date: Sat, 12 Apr 2025 15:50:10 +0300
Message-Id: <86a58lmtml.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <CAO=BR8OfSU+8+2UXKF2x_q9wJkRFQkft0mgGaYNh08ZO+SX_LQ@HIDDEN>
 (message from Spencer Baugh on Sat, 12 Apr 2025 07:43:11 -0400)
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN>
 <875xjuuyht.fsf@HIDDEN> <ier7c4afc1j.fsf@HIDDEN>
 <86a595bpei.fsf@HIDDEN> <ier1puhf66g.fsf@HIDDEN>
 <86cye09v0m.fsf@HIDDEN>
 <ierr02btte5.fsf@HIDDEN> <86tt762317.fsf@HIDDEN>
 <iero6xeu32b.fsf@HIDDEN>
 <iera58qzuqu.fsf@HIDDEN> <865xjeu4bm.fsf@HIDDEN>
 <ier7c3uzpy0.fsf@HIDDEN>
 <ier4iyyzoq3.fsf@HIDDEN> <8634eitzr1.fsf@HIDDEN>
 <iermscqqq4x.fsf@HIDDEN> <86jz7pmy4j.fsf@HIDDEN>
 <CAO=BR8OfSU+8+2UXKF2x_q9wJkRFQkft0mgGaYNh08ZO+SX_LQ@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Date: Sat, 12 Apr 2025 07:43:11 -0400
> Cc: 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
> 
> On Sat, Apr 12, 2025, 7:13 AM Eli Zaretskii <eliz@HIDDEN> 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.





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 16 Apr 2025 17:58:04 +0000
Resent-Message-ID: <handler.77313.B77313.174482623515753 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174482623515753
          (code B ref 77313); Wed, 16 Apr 2025 17:58:04 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Apr 2025 17:57:15 +0000
Received: from localhost ([127.0.0.1]:41576 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u570c-00045z-Qf
	for submit <at> debbugs.gnu.org; Wed, 16 Apr 2025 13:57:15 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:40683)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1u570W-00045X-Vl
 for 77313 <at> debbugs.gnu.org; Wed, 16 Apr 2025 13:57:12 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <86a58lmtml.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 12 Apr
 2025 15:50:10 +0300")
References: <ierbjtmsdzr.fsf@HIDDEN> <iercye2fnew.fsf@HIDDEN>
 <86r02ibeld.fsf@HIDDEN> <iera596fm2r.fsf@HIDDEN>
 <875xjuuyht.fsf@HIDDEN> <ier7c4afc1j.fsf@HIDDEN>
 <86a595bpei.fsf@HIDDEN> <ier1puhf66g.fsf@HIDDEN>
 <86cye09v0m.fsf@HIDDEN> <ierr02btte5.fsf@HIDDEN>
 <86tt762317.fsf@HIDDEN> <iero6xeu32b.fsf@HIDDEN>
 <iera58qzuqu.fsf@HIDDEN> <865xjeu4bm.fsf@HIDDEN>
 <ier7c3uzpy0.fsf@HIDDEN> <ier4iyyzoq3.fsf@HIDDEN>
 <8634eitzr1.fsf@HIDDEN> <iermscqqq4x.fsf@HIDDEN>
 <86jz7pmy4j.fsf@HIDDEN>
 <CAO=BR8OfSU+8+2UXKF2x_q9wJkRFQkft0mgGaYNh08ZO+SX_LQ@HIDDEN>
 <86a58lmtml.fsf@HIDDEN>
Date: Wed, 16 Apr 2025 13:57:03 -0400
Message-ID: <ierlds07zww.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1744826223;
 bh=goMnPIkc8G3sY2A/Nhp3vN+Xq4bsSm8ikFC0I9TJ/JY=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=MT/TAdUYPAsLi5ZfHFK+cpKPVc17MBWN03H4RwQhXgY3+oystzy28jIj5l4HJmboZ
 LbUKuHt+lu/iPCB/5aEgS0lzLJrvwfibWlvDbqwH8rp4CIu7CjBz8L0A3Pj/rsMG0w
 Sd3Suv7xaXm2qmnQU2nBYPaDm0NmVgvEqfVkVt2vUYl3d/74ldJ9oM0h2fIiBH5fJb
 j5M51KAo7WPeMXBeUb9nMee2vRdGzd9+fcbMKKqzOLm7ZRaRQwQ0ee7cEGYDzJ8m5+
 8VOZ0Z7yPUidtnA/FkT+svOBUxkRIuOEx0Z2sU/do6Prjrn1lJalggXBcWNeCAZi6a
 eyUwQUGRDeqCQ==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Eli Zaretskii <eliz@HIDDEN> writes:
>> From: Spencer Baugh <sbaugh@HIDDEN>
>> Date: Sat, 12 Apr 2025 07:43:11 -0400
>> Cc: 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
>>=20
>> On Sat, Apr 12, 2025, 7:13=E2=80=AFAM Eli Zaretskii <eliz@HIDDEN> wrote:
>>=20
>>  Thanks, installed on master.
>>=20
>>  Should we now close this bug?
>>=20
>> 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.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-flymake-fall-back-to-margins-on-text-terminals.patch

From 1031bf89a5444ad225b1ef1af64bbb32a2a7512a Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh@HIDDEN>
Date: Tue, 8 Apr 2025 08:43:37 -0400
Subject: [PATCH] flymake: fall back to margins on text terminals

Previously, flymake-indicator-type defaulted to either fringes
or margins.  But fringes should be used on graphical frames, and
margins on TTY frames.  So default to fringes instead, and
simply fall back to margins automatically on text frames.

* lisp/progmodes/flymake.el (flymake-indicator-type): Set to
fringes.  (bug#77313)
(flymake-mode): Fallback to margins if there's no fringes.
* doc/misc/flymake.texi (Customizable variables): Mention
fallback behavior.
* etc/NEWS: Announce fallback behavior.
---
 doc/misc/flymake.texi     |  3 +++
 etc/NEWS                  |  7 +++++++
 lisp/progmodes/flymake.el | 20 ++++++++++++++------
 3 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index 54835767928..668a72b4cd1 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -313,6 +313,9 @@ Customizable variables
 errors or warnings.
 Depending on your preference, this can either use @code{fringes} or
 @code{margins} for indicating errors.
+If set to @code{fringes} (the default), it will automatically fall back
+to using margins in windows or frames without fringes, such as text
+terminals.
 
 @item flymake-error-bitmap
 A bitmap used in the fringe to mark lines for which an error has
diff --git a/etc/NEWS b/etc/NEWS
index dfe4c65f1dd..1915c3170a7 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -30,6 +30,13 @@ with a prefix argument or by typing 'C-u C-h C-n'.
 
 * Changes in Specialized Modes and Packages in Emacs 30.2
 
+** Flymake
+
+*** Windows without fringes now automatically use margin indicators
+When flymake-indicator-type is set to 'fringes', as is now the default,
+flymake will automatically fall back to using margin indicators in
+windows without fringes, including any window in a text terminal.
+
 
 * New Modes and Packages in Emacs 30.2
 
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index f8a294908ba..08e96565229 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -185,22 +185,23 @@ 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),
-fringes (use fringes) or margins (use margins)
+the symbol `fringes' (use fringes) or the symbol `margins' (use
+margins).
 
 Difference between fringes and margin is that fringes support displaying
 bitmaps on graphical displays and margins display text in a blank area
 from current buffer that works in both graphical and text displays.
+Thus, even when `fringes' is selected, margins will still be used on
+text displays and also when fringes are disabled.
 
 See Info node `Fringes' and Info node `(elisp)Display Margins'."
-  :version "30.1"
+  :version "31.1"
   :type '(choice (const :tag "Use Fringes" fringes)
-                 (const :tag "Use Margins "margins)
+                 (const :tag "Use Margins" margins)
                  (const :tag "No indicators" nil)))
 
 (defcustom flymake-margin-indicators-string
@@ -1393,6 +1394,13 @@ flymake-mode
     (add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t)
     (add-hook 'eldoc-documentation-functions 'flymake-eldoc-function t t)
 
+    (when (and (eq flymake-indicator-type 'fringes)
+               (not (cl-case flymake-fringe-indicator-position
+                      (left-fringe (< 0 (nth 0 (window-fringes))))
+                      (right-fringe (< 0 (nth 1 (window-fringes)))))))
+      ;; There are no fringes in the buffer, fallback to margins.
+      (setq-local flymake-indicator-type 'margins))
+
     ;; AutoResize margins.
     (flymake--resize-margins)
 
-- 
2.39.3


--=-=-=--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 17 Apr 2025 05:42:02 +0000
Resent-Message-ID: <handler.77313.B77313.174486850012990 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174486850012990
          (code B ref 77313); Thu, 17 Apr 2025 05:42:02 +0000
Received: (at 77313) by debbugs.gnu.org; 17 Apr 2025 05:41:40 +0000
Received: from localhost ([127.0.0.1]:45434 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u5I0J-0003NS-Vd
	for submit <at> debbugs.gnu.org; Thu, 17 Apr 2025 01:41:40 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52350)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u5I0H-0003Mi-19
 for 77313 <at> debbugs.gnu.org; Thu, 17 Apr 2025 01:41:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1u5I09-0007qs-HP; Thu, 17 Apr 2025 01:41:30 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=o0ggARotNSMB+PKf7JZXwxJM6ZLNHvYfQCXXyv4Qwyg=; b=AANyZHX760dHujogegs2
 iq/5CRG6F+pUCxHm439KwJe/E4gq2Sd4cBH6ueEqVxpQtyznnoa2Q/NfKtBlF+lDzt9c7w08J9KyX
 NX7z/dNeFb8t44GeQCAKddrbX2kKfpBzby1o+YWCXyYuw874vx8vwRyZfX7y5Q9S7ebGoD0zKuo34
 CM1+ysiWaHhD60izDV/57mcc6q7tVSl0/Cl9MtqkJ8mYPOjGugGzrK5p/LGDQJbLU1ESDj4gBEzh4
 plxBQ79SELL5ZZirSMBnp4Ij9sMos0fZ05Jd0XTvDcsw1EwF7oshZ9Pc0D47GAvvBM0QmvG2uwKx0
 idRTICmk2NrIPA==;
Date: Thu, 17 Apr 2025 08:41:12 +0300
Message-Id: <864iynfipz.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <ierlds07zww.fsf@HIDDEN> (message from Spencer Baugh on
 Wed, 16 Apr 2025 13:57:03 -0400)
References: <ierbjtmsdzr.fsf@HIDDEN> <iercye2fnew.fsf@HIDDEN>
 <86r02ibeld.fsf@HIDDEN> <iera596fm2r.fsf@HIDDEN>
 <875xjuuyht.fsf@HIDDEN> <ier7c4afc1j.fsf@HIDDEN>
 <86a595bpei.fsf@HIDDEN> <ier1puhf66g.fsf@HIDDEN>
 <86cye09v0m.fsf@HIDDEN> <ierr02btte5.fsf@HIDDEN>
 <86tt762317.fsf@HIDDEN> <iero6xeu32b.fsf@HIDDEN>
 <iera58qzuqu.fsf@HIDDEN> <865xjeu4bm.fsf@HIDDEN>
 <ier7c3uzpy0.fsf@HIDDEN> <ier4iyyzoq3.fsf@HIDDEN>
 <8634eitzr1.fsf@HIDDEN> <iermscqqq4x.fsf@HIDDEN>
 <86jz7pmy4j.fsf@HIDDEN>
 <CAO=BR8OfSU+8+2UXKF2x_q9wJkRFQkft0mgGaYNh08ZO+SX_LQ@HIDDEN>
 <86a58lmtml.fsf@HIDDEN> <ierlds07zww.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Wed, 16 Apr 2025 13:57:03 -0400
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> >> From: Spencer Baugh <sbaugh@HIDDEN>
> >> Date: Sat, 12 Apr 2025 07:43:11 -0400
> >> Cc: 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
> >> 
> >> On Sat, Apr 12, 2025, 7:13 AM Eli Zaretskii <eliz@HIDDEN> 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.

What am I missing?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 17 Apr 2025 20:24:05 +0000
Resent-Message-ID: <handler.77313.B77313.174492143326408 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.174492143326408
          (code B ref 77313); Thu, 17 Apr 2025 20:24:05 +0000
Received: (at 77313) by debbugs.gnu.org; 17 Apr 2025 20:23:53 +0000
Received: from localhost ([127.0.0.1]:48589 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u5Vm0-0006rA-Uk
	for submit <at> debbugs.gnu.org; Thu, 17 Apr 2025 16:23:52 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:57669)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1u5Vlx-0006pi-Lv
 for 77313 <at> debbugs.gnu.org; Thu, 17 Apr 2025 16:23:46 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <864iynfipz.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 17 Apr
 2025 08:41:12 +0300")
References: <ierbjtmsdzr.fsf@HIDDEN> <iera596fm2r.fsf@HIDDEN>
 <875xjuuyht.fsf@HIDDEN> <ier7c4afc1j.fsf@HIDDEN>
 <86a595bpei.fsf@HIDDEN> <ier1puhf66g.fsf@HIDDEN>
 <86cye09v0m.fsf@HIDDEN> <ierr02btte5.fsf@HIDDEN>
 <86tt762317.fsf@HIDDEN> <iero6xeu32b.fsf@HIDDEN>
 <iera58qzuqu.fsf@HIDDEN> <865xjeu4bm.fsf@HIDDEN>
 <ier7c3uzpy0.fsf@HIDDEN> <ier4iyyzoq3.fsf@HIDDEN>
 <8634eitzr1.fsf@HIDDEN> <iermscqqq4x.fsf@HIDDEN>
 <86jz7pmy4j.fsf@HIDDEN>
 <CAO=BR8OfSU+8+2UXKF2x_q9wJkRFQkft0mgGaYNh08ZO+SX_LQ@HIDDEN>
 <86a58lmtml.fsf@HIDDEN> <ierlds07zww.fsf@HIDDEN>
 <864iynfipz.fsf@HIDDEN>
Date: Thu, 17 Apr 2025 16:23:40 -0400
Message-ID: <ier34e68rlf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1744921420;
 bh=RdEzshAgGiUL9rON9exlnXNn/Ybn8Q/Qbs0vt/Jo9h0=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=sK/OaA/XfPYV5HD7L3WO9ZkoKyX+UjxmSOEBbDB6OPrUPLRFZY8l3FgYtvhjM54fa
 UvIPXuUOO/5UgusUrxVVCIZYLCNptFdo6E54d0yVjgeQs9ZxTF6AFFFIcJFo+ww3Ys
 9uCTgr7Ci9PhRjF22jwbPkM+L5uMesYw7VFZhw16NEu6wcFPTvXVDDRZJJbcDF45Ku
 ZsRGCbVXOGI59Mpa3pdkwbstuQ4xDQ2IehUiHaodere8KCSwyLrNAXN9YFne/WEhf+
 fJ9Napch0GZDmWO0XZtHQdBWMCSQ6YWFzGSpmA+avvoJYOSW+OigFxsMzaCnXjN/RM
 sQ7eEqO7BrlUQ==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Spencer Baugh <sbaugh@HIDDEN>
>> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
>> Date: Wed, 16 Apr 2025 13:57:03 -0400
>>=20
>> Eli Zaretskii <eliz@HIDDEN> writes:
>> >> From: Spencer Baugh <sbaugh@HIDDEN>
>> >> Date: Sat, 12 Apr 2025 07:43:11 -0400
>> >> Cc: 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
>> >>=20
>> >> On Sat, Apr 12, 2025, 7:13=E2=80=AFAM Eli Zaretskii <eliz@HIDDEN> wr=
ote:
>> >>=20
>> >>  Thanks, installed on master.
>> >>=20
>> >>  Should we now close this bug?
>> >>=20
>> >> 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.
>>=20
>> 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.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-Backport-fix-flymake-margin-indicator-fallback-logic.patch

From b111266fdc8411f0852088d9eaec22042e841a04 Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh@HIDDEN>
Date: Thu, 17 Apr 2025 16:22:08 -0400
Subject: [PATCH] Backport: fix flymake margin indicator fallback logic

Backport 861e7f8b60e4bf076bf5991d25a22b3a012746bd to fix bug#77313, so
that fringe indicators are once again reliably the default on frames
that support them.

Do not merge to master.

* lisp/progmodes/flymake.el (flymake-indicator-type)
(flymake-mode): Fix margin fallback behavior.
---
 lisp/progmodes/flymake.el | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index f8a294908ba..a9e15fbbb12 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -185,22 +185,23 @@ 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),
-fringes (use fringes) or margins (use margins)
+the symbol `fringes' (use fringes) or the symbol `margins' (use
+margins).
 
 Difference between fringes and margin is that fringes support displaying
 bitmaps on graphical displays and margins display text in a blank area
 from current buffer that works in both graphical and text displays.
+Thus, even when `fringes' is selected, margins will still be used on
+text displays and also when fringes are disabled.
 
 See Info node `Fringes' and Info node `(elisp)Display Margins'."
-  :version "30.1"
+  :version "30.2"
   :type '(choice (const :tag "Use Fringes" fringes)
-                 (const :tag "Use Margins "margins)
+                 (const :tag "Use Margins" margins)
                  (const :tag "No indicators" nil)))
 
 (defcustom flymake-margin-indicators-string
@@ -1393,6 +1394,13 @@ flymake-mode
     (add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t)
     (add-hook 'eldoc-documentation-functions 'flymake-eldoc-function t t)
 
+    (when (and (eq flymake-indicator-type 'fringes)
+               (not (cl-case flymake-fringe-indicator-position
+                      (left-fringe (< 0 (nth 0 (window-fringes))))
+                      (right-fringe (< 0 (nth 1 (window-fringes)))))))
+      ;; There are no fringes in the buffer, fallback to margins.
+      (setq-local flymake-indicator-type 'margins))
+
     ;; AutoResize margins.
     (flymake--resize-margins)
 
-- 
2.39.3


--=-=-=--




Message sent:


MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Eli Zaretskii <eliz@HIDDEN>
Subject: bug#77313: closed (30.1.50; Regression: flymake indicators are
 erroneously using margins)
CC: tracker <at> debbugs.gnu.org
Message-ID: <handler.77313.D77313.17450735619844.ackdone <at> debbugs.gnu.org>
References: <86y0vw6ws3.fsf@HIDDEN> <ierbjtmsdzr.fsf@HIDDEN>
X-Gnu-PR-Message: closed 77313
X-Gnu-PR-Package: emacs
Date: Sat, 19 Apr 2025 14:40:06 +0000
Content-Type: multipart/mixed; boundary="----------=_1745073606-10117-0"

This is a multi-part message in MIME format...

------------=_1745073606-10117-0
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=utf-8

Your message dated Sat, 19 Apr 2025 17:39:08 +0300
with message-id <86y0vw6ws3.fsf@HIDDEN>
and subject line Re: bug#77313: 30.1.50; Regression: flymake indicators are=
 erroneously using margins
has caused the debbugs.gnu.org bug report #77313,
regarding 30.1.50; Regression: flymake indicators are erroneously using mar=
gins
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@HIDDEN)


--=20
77313: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77313
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems

------------=_1745073606-10117-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at submit) by debbugs.gnu.org; 27 Mar 2025 15:14:01 +0000
Received: from localhost ([127.0.0.1]:50853 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txovf-0007SY-KX
	for submit <at> debbugs.gnu.org; Thu, 27 Mar 2025 11:14:00 -0400
Received: from lists.gnu.org ([2001:470:142::17]:40506)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1txova-0007Ql-M7
 for submit <at> debbugs.gnu.org; Thu, 27 Mar 2025 11:13:56 -0400
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 <sbaugh@HIDDEN>)
 id 1txovU-00059T-KG
 for bug-gnu-emacs@HIDDEN; Thu, 27 Mar 2025 11:13:48 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <sbaugh@HIDDEN>)
 id 1txovS-0003BE-KR
 for bug-gnu-emacs@HIDDEN; Thu, 27 Mar 2025 11:13:48 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.1.50; Regression: flymake indicators are erroneously using margins
X-Debbugs-Cc: 
Date: Thu, 27 Mar 2025 11:13:44 -0400
Message-ID: <ierbjtmsdzr.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1743088424;
 bh=CjN9DW4paAhfjrTRdzs2Aqif7FbCEfBMj0xcH0+FzQw=;
 h=From:To:Subject:Date;
 b=H36rsu+6Ds2psF4nX5OEZE8oQOTMcqZfdab5Ykqm/5H7ZmEsKudoFu7wc61v9XiKf
 pCYuZQ+Wy8jxyMqiaQR+SpM1pN805kzCVO/OL0IZ92k9puStlorTgN2Pwxiwqa4cjK
 u1Lpi3deKkyzUp58LP1u+Nbn2YHDqCuKSfRwG0U4qlHQZwVssum+0dzwrjM+HJ7wBN
 1bQ3pKVpHtpuTj1iRsmJ1p9s7INJ74u+o079krVar4254GNlS8koGxkXAPeUSmkWtv
 EAwasLT+11jISGJuhXiSjOuGeJ4WN+fWw/Y8CGJu4HVaLgOIspVBQrL0JjaiwkiW1/
 q2GZtredaj+4w==
Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@HIDDEN;
 helo=mxout5.mail.janestreet.com
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

--=-=-=
Content-Type: text/plain


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.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-flymake-default-to-displaying-indicators-on-fringes.patch

From 252dd491890323710782d22483bd9cedb9d5b90c Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh@HIDDEN>
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


--=-=-=--



------------=_1745073606-10117-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 77313-done) by debbugs.gnu.org; 19 Apr 2025 14:39:21 +0000
Received: from localhost ([127.0.0.1]:35145 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u69Ll-0002Yi-4D
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 10:39:21 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:44222)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u69Li-0002YM-64
 for 77313-done <at> debbugs.gnu.org; Sat, 19 Apr 2025 10:39:19 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1u69Lb-0007Il-Eh; Sat, 19 Apr 2025 10:39:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=2po3DsdqLR9eEG1VE1bieJFtIfeVh/Wa+JX8Ohk3fco=; b=sWisExFK2Fb+cQKw7xuS
 8rlC964qdH14EOM0VA+WwjoRTu7xaJsQk+h10kxBtczPfWQ+wRVm82XxOoGd+MsK8dTN2N/Gf7FEd
 PbwIgpDA78aoODFEBa8IjDhYYHrx81WAH4RyuF7vSJw6WDQUXc3Qv2LTxW+OEwF0BLI3yGIkK1N1V
 WQFrTKk0vlJpeQFsPOeoYHIpUAGCAw1TQOZgpITPhR4zI5eiIVPmT7xlwAlsIr8SDsiGIHzvWJzyo
 L7g/9sUSWUo6ZXHaASxIifhmhQSaSufDjZ18E4cJVfGS51ta0dnWRDy4/BCdODGLHOH6Od1YH6u0Z
 mbjf86Khd5HqSw==;
Date: Sat, 19 Apr 2025 17:39:08 +0300
Message-Id: <86y0vw6ws3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <ier34e68rlf.fsf@HIDDEN> (message from Spencer Baugh on
 Thu, 17 Apr 2025 16:23:40 -0400)
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
References: <ierbjtmsdzr.fsf@HIDDEN> <iera596fm2r.fsf@HIDDEN>
 <875xjuuyht.fsf@HIDDEN> <ier7c4afc1j.fsf@HIDDEN>
 <86a595bpei.fsf@HIDDEN> <ier1puhf66g.fsf@HIDDEN>
 <86cye09v0m.fsf@HIDDEN> <ierr02btte5.fsf@HIDDEN>
 <86tt762317.fsf@HIDDEN> <iero6xeu32b.fsf@HIDDEN>
 <iera58qzuqu.fsf@HIDDEN> <865xjeu4bm.fsf@HIDDEN>
 <ier7c3uzpy0.fsf@HIDDEN> <ier4iyyzoq3.fsf@HIDDEN>
 <8634eitzr1.fsf@HIDDEN> <iermscqqq4x.fsf@HIDDEN>
 <86jz7pmy4j.fsf@HIDDEN>
 <CAO=BR8OfSU+8+2UXKF2x_q9wJkRFQkft0mgGaYNh08ZO+SX_LQ@HIDDEN>
 <86a58lmtml.fsf@HIDDEN> <ierlds07zww.fsf@HIDDEN>
 <864iynfipz.fsf@HIDDEN> <ier34e68rlf.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77313-done
Cc: 77313-done <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Thu, 17 Apr 2025 16:23:40 -0400
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >> From: Spencer Baugh <sbaugh@HIDDEN>
> >> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
> >> Date: Wed, 16 Apr 2025 13:57:03 -0400
> >> 
> >> Eli Zaretskii <eliz@HIDDEN> writes:
> >> >> From: Spencer Baugh <sbaugh@HIDDEN>
> >> >> Date: Sat, 12 Apr 2025 07:43:11 -0400
> >> >> Cc: 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
> >> >> 
> >> >> On Sat, Apr 12, 2025, 7:13 AM Eli Zaretskii <eliz@HIDDEN> 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.


------------=_1745073606-10117-0--


Message sent:


MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Spencer Baugh <sbaugh@HIDDEN>
Subject: bug#77313: closed (Re: bug#77313: 30.1.50; Regression: flymake
 indicators are erroneously using margins)
Message-ID: <handler.77313.D77313.17450735619844.notifdone <at> debbugs.gnu.org>
References: <86y0vw6ws3.fsf@HIDDEN> <ierbjtmsdzr.fsf@HIDDEN>
X-Gnu-PR-Message: they-closed 77313
X-Gnu-PR-Package: emacs
Reply-To: 77313 <at> debbugs.gnu.org
Date: Sat, 19 Apr 2025 14:40:07 +0000
Content-Type: multipart/mixed; boundary="----------=_1745073607-10117-1"

This is a multi-part message in MIME format...

------------=_1745073607-10117-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

Your bug report

#77313: 30.1.50; Regression: flymake indicators are erroneously using margi=
ns

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 77313 <at> debbugs.gnu.org.

--=20
77313: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77313
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems

------------=_1745073607-10117-1
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 77313-done) by debbugs.gnu.org; 19 Apr 2025 14:39:21 +0000
Received: from localhost ([127.0.0.1]:35145 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u69Ll-0002Yi-4D
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 10:39:21 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:44222)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u69Li-0002YM-64
 for 77313-done <at> debbugs.gnu.org; Sat, 19 Apr 2025 10:39:19 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1u69Lb-0007Il-Eh; Sat, 19 Apr 2025 10:39:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=2po3DsdqLR9eEG1VE1bieJFtIfeVh/Wa+JX8Ohk3fco=; b=sWisExFK2Fb+cQKw7xuS
 8rlC964qdH14EOM0VA+WwjoRTu7xaJsQk+h10kxBtczPfWQ+wRVm82XxOoGd+MsK8dTN2N/Gf7FEd
 PbwIgpDA78aoODFEBa8IjDhYYHrx81WAH4RyuF7vSJw6WDQUXc3Qv2LTxW+OEwF0BLI3yGIkK1N1V
 WQFrTKk0vlJpeQFsPOeoYHIpUAGCAw1TQOZgpITPhR4zI5eiIVPmT7xlwAlsIr8SDsiGIHzvWJzyo
 L7g/9sUSWUo6ZXHaASxIifhmhQSaSufDjZ18E4cJVfGS51ta0dnWRDy4/BCdODGLHOH6Od1YH6u0Z
 mbjf86Khd5HqSw==;
Date: Sat, 19 Apr 2025 17:39:08 +0300
Message-Id: <86y0vw6ws3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <ier34e68rlf.fsf@HIDDEN> (message from Spencer Baugh on
 Thu, 17 Apr 2025 16:23:40 -0400)
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
References: <ierbjtmsdzr.fsf@HIDDEN> <iera596fm2r.fsf@HIDDEN>
 <875xjuuyht.fsf@HIDDEN> <ier7c4afc1j.fsf@HIDDEN>
 <86a595bpei.fsf@HIDDEN> <ier1puhf66g.fsf@HIDDEN>
 <86cye09v0m.fsf@HIDDEN> <ierr02btte5.fsf@HIDDEN>
 <86tt762317.fsf@HIDDEN> <iero6xeu32b.fsf@HIDDEN>
 <iera58qzuqu.fsf@HIDDEN> <865xjeu4bm.fsf@HIDDEN>
 <ier7c3uzpy0.fsf@HIDDEN> <ier4iyyzoq3.fsf@HIDDEN>
 <8634eitzr1.fsf@HIDDEN> <iermscqqq4x.fsf@HIDDEN>
 <86jz7pmy4j.fsf@HIDDEN>
 <CAO=BR8OfSU+8+2UXKF2x_q9wJkRFQkft0mgGaYNh08ZO+SX_LQ@HIDDEN>
 <86a58lmtml.fsf@HIDDEN> <ierlds07zww.fsf@HIDDEN>
 <864iynfipz.fsf@HIDDEN> <ier34e68rlf.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77313-done
Cc: 77313-done <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Thu, 17 Apr 2025 16:23:40 -0400
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >> From: Spencer Baugh <sbaugh@HIDDEN>
> >> Cc: 77313 <at> debbugs.gnu.org,  juri@HIDDEN
> >> Date: Wed, 16 Apr 2025 13:57:03 -0400
> >> 
> >> Eli Zaretskii <eliz@HIDDEN> writes:
> >> >> From: Spencer Baugh <sbaugh@HIDDEN>
> >> >> Date: Sat, 12 Apr 2025 07:43:11 -0400
> >> >> Cc: 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
> >> >> 
> >> >> On Sat, Apr 12, 2025, 7:13 AM Eli Zaretskii <eliz@HIDDEN> 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.


------------=_1745073607-10117-1
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at submit) by debbugs.gnu.org; 27 Mar 2025 15:14:01 +0000
Received: from localhost ([127.0.0.1]:50853 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txovf-0007SY-KX
	for submit <at> debbugs.gnu.org; Thu, 27 Mar 2025 11:14:00 -0400
Received: from lists.gnu.org ([2001:470:142::17]:40506)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1txova-0007Ql-M7
 for submit <at> debbugs.gnu.org; Thu, 27 Mar 2025 11:13:56 -0400
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 <sbaugh@HIDDEN>)
 id 1txovU-00059T-KG
 for bug-gnu-emacs@HIDDEN; Thu, 27 Mar 2025 11:13:48 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <sbaugh@HIDDEN>)
 id 1txovS-0003BE-KR
 for bug-gnu-emacs@HIDDEN; Thu, 27 Mar 2025 11:13:48 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.1.50; Regression: flymake indicators are erroneously using margins
X-Debbugs-Cc: 
Date: Thu, 27 Mar 2025 11:13:44 -0400
Message-ID: <ierbjtmsdzr.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1743088424;
 bh=CjN9DW4paAhfjrTRdzs2Aqif7FbCEfBMj0xcH0+FzQw=;
 h=From:To:Subject:Date;
 b=H36rsu+6Ds2psF4nX5OEZE8oQOTMcqZfdab5Ykqm/5H7ZmEsKudoFu7wc61v9XiKf
 pCYuZQ+Wy8jxyMqiaQR+SpM1pN805kzCVO/OL0IZ92k9puStlorTgN2Pwxiwqa4cjK
 u1Lpi3deKkyzUp58LP1u+Nbn2YHDqCuKSfRwG0U4qlHQZwVssum+0dzwrjM+HJ7wBN
 1bQ3pKVpHtpuTj1iRsmJ1p9s7INJ74u+o079krVar4254GNlS8koGxkXAPeUSmkWtv
 EAwasLT+11jISGJuhXiSjOuGeJ4WN+fWw/Y8CGJu4HVaLgOIspVBQrL0JjaiwkiW1/
 q2GZtredaj+4w==
Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@HIDDEN;
 helo=mxout5.mail.janestreet.com
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

--=-=-=
Content-Type: text/plain


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.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-flymake-default-to-displaying-indicators-on-fringes.patch

From 252dd491890323710782d22483bd9cedb9d5b90c Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh@HIDDEN>
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


--=-=-=--



------------=_1745073607-10117-1--


Message received at fakecontrol@fakecontrolmessage:


Received: (at fakecontrol) by fakecontrolmessage;
To: internal_control <at> debbugs.gnu.org
From: Debbugs Internal Request <help-debbugs@HIDDEN>
Subject: Internal Control
Message-Id: bug archived.
Date: Sun, 18 May 2025 11:24:07 +0000
User-Agent: Fakemail v42.6.9

# This is a fake control message.
#
# The action:
# bug archived.
thanks
# This fakemail brought to you by your local debbugs
# administrator


Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 6 Oct 2025 22:26:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 06 18:26:52 2025
Received: from localhost ([127.0.0.1]:55425 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v5tfQ-00019W-3m
	for submit <at> debbugs.gnu.org; Mon, 06 Oct 2025 18:26:52 -0400
Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]:46438)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1v5tfE-00018u-3w
 for control <at> debbugs.gnu.org; Mon, 06 Oct 2025 18:26:41 -0400
Received: by mail-oi1-x230.google.com with SMTP id
 5614622812f47-43f715fb494so1322557b6e.1
 for <control <at> debbugs.gnu.org>; Mon, 06 Oct 2025 15:26:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1759789593; x=1760394393; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=CnYp7u3yjFQN8mCOqArEsHW3BoQlRPydq+olNtXZO3w=;
 b=X/KkXSS5eYWWNV1s6Xi3uDZ993lz7knOypMKlYC7k0LRhhS1FiyQwR77AwL7bahCRG
 QjT/Sf/wCpeE5AQUlmEfq5BX6e0mJHub6PO4nYAe8Nz7Ulwo9ay7EC9X+mGXP8eilmAv
 3MXlv7EBobqF9ePNXeqKYknRu//J24EQrh8eA03wt7c+WX3nbEpQofeRvBh09bOC15Ci
 IfQbx59eCmkpEsdHMsea+xW2SqLT5bdseGNDGRBLfjTuJ9vgyFY05R+6hrU32kU0rXEJ
 qSdaQ8+OCpaYFn47L1t/rf9JyvVHK5/dFpXIdBJH6UZxiBekpl+juZ3fg/QxxlYiAL3R
 w6BQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1759789593; x=1760394393;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=CnYp7u3yjFQN8mCOqArEsHW3BoQlRPydq+olNtXZO3w=;
 b=uEN/yNEL80VPw1TpiLE5razbeF+hHw8ehJLrveJIvC0tPomee2dDmIGirfOzFkf96I
 Ki7d7jjtIRBYFkWhliEyniPc4NtkyEf5jKL0qTA5P+xwGHtcK5ZbqpBXIYcM4DcoQh6W
 QRykxT9aPU8CmgjzvAF8uIYejQYHeFE04ROryhmTAMCinqYjioIUEryvk8mEeQbWdOzI
 MDBYCFECrbMIFMJcRmkxMmmiK8JQscbvJstOlg0tzmxtRilfsDGe5Q/+vk/bpoXG3n0G
 F6RPM7HErnEvydCNwQgM0Lw7jzVVz+eO27JmYETB7CmPoEe/IjjrIaDmmHVjS+mZkMhV
 6Wtw==
X-Forwarded-Encrypted: i=1;
 AJvYcCUtRW1OiZMK8yfSUe60WbY+yJ+YA41W3k6qB7x201Q+w4v1aLTP6qNZnuM29U3lDM0qIvL5caSR <at> debbugs.gnu.org
X-Gm-Message-State: AOJu0Yy/kzgRFchoN2NTDP6uXZzF3I+RK0WvXFSoeTjb5OLmtLbZ24p3
 o9CF6lnL/cPd15QvaxXKglNWM7TT86LoZYXc1VnlcFLbjERknN4tM2Rt+IgqiMB2ATJq25NJ9GT
 gmCNVZGDJJAT+ZUNpZt/fTWrwXGu+DyY=
X-Gm-Gg: ASbGncsLH1I1SwbBMffr9P/XXbCeC809X2ZKL67V+jqXbUjQ1p5vQFlAKG9BV0dAL92
 0OdlPFaebAqO7GjP91t9ViAoeS9Eb24oi1jmJJVrsrpHBCxJWuGE9KOJ1UArZPUVViy36/OZDEg
 YLREGr6iQfF0Lxyy0KpUCKhIaKI3Bo2QPPDVqjxNdjeXy+OFkOVjrb1PSbg0jwTlpUSzo9CyT0H
 KyhL67YmkAwpny/KG4iHIzeF8hcFRk=
X-Google-Smtp-Source: AGHT+IF8eWe068YdmMknlXxkOzrnm6LUz8/h6IyrHazIv16Eio4BGjsWkca4NXhfvKbar2cEMKrK5b73ulj8SeIoV2g=
X-Received: by 2002:a05:6808:1b26:b0:43f:1dbb:752f with SMTP id
 5614622812f47-43fc1772b3emr6734340b6e.7.1759789592797; Mon, 06 Oct 2025
 15:26:32 -0700 (PDT)
MIME-Version: 1.0
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
In-Reply-To: <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Date: Mon, 6 Oct 2025 23:27:42 +0100
X-Gm-Features: AS18NWCuyVv5GXYOUtbU_wH_IZGm_LPPAs8FdiLcZyGL5aOrdoUqiWoFxBE7bhg
Message-ID: <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
Subject: Re: Regression. TTY emacs doesn't get Flymake indicators at all by
 default
To: Spencer Baugh <sbaugh@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000008ee7c3064084f19b"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: control
Cc: GNU bug tracker automated control server <control <at> debbugs.gnu.org>,
 77313 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000008ee7c3064084f19b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

unarchive 77313
thanks

I noticed that the bug was archived so probably no-one is reading the
messages
but me and Spencer.

Let's hope this unarchives it.

On Mon, Sep 29, 2025 at 4:36=E2=80=AFPM Jo=C3=A3o T=C3=A1vora <joaotavora@g=
mail.com> wrote:
>
>
> Something doesn't add up.  If I run this one-liner with an emacs 30, I
get an error indication regardless of TTY or GUI emacs:
>
>    emacs -Q -nw -f flymake-mode --eval '(insert "\nboo!")'
>    emacs -Q        -f flymake-mode --eval '(insert "\nboo!")'
>
> If I do the same after your commit (and I add `--eval (setq
trusted-content :all)` for demo purposes) I only see the indicator in the
second case.
>
> So what am I missing??  What version are you using?
>
>> I agree that avoiding regressions should take priority.  That's why I
made this commit, because the existing fallback logic caused regressions,
by breaking the indicators on graphical displays.
> Perhaps in some corner cases, but what I'm showing you above isn't a
corner case.  It's the most common use case for Flymake, turning it on.

--0000000000008ee7c3064084f19b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">unarchive 77313<br>thanks<br><br>I noticed that the bug wa=
s archived so probably no-one is reading the messages <br>but me and Spence=
r.<br><br>Let&#39;s hope this unarchives it.<br><br>On Mon, Sep 29, 2025 at=
 4:36=E2=80=AFPM Jo=C3=A3o T=C3=A1vora &lt;<a href=3D"mailto:joaotavora@gma=
il.com">joaotavora@HIDDEN</a>&gt; wrote:<br>&gt;<br>&gt;<br>&gt; Somethi=
ng doesn&#39;t add up.=C2=A0 If I run this one-liner with an emacs 30, I ge=
t an error indication regardless of TTY or GUI emacs:<br>&gt;<br>&gt; =C2=
=A0 =C2=A0emacs -Q -nw -f flymake-mode --eval &#39;(insert &quot;\nboo!&quo=
t;)&#39; <br>&gt; =C2=A0 =C2=A0emacs -Q =C2=A0 =C2=A0 =C2=A0 =C2=A0-f flyma=
ke-mode --eval &#39;(insert &quot;\nboo!&quot;)&#39;<br>&gt;<br>&gt; If I d=
o the same after your commit (and I add `--eval (setq trusted-content :all)=
` for demo purposes) I only see the indicator in the second case.<br>&gt;<b=
r>&gt; So what am I missing??=C2=A0 What version are you using?<br>&gt; =C2=
=A0<br>&gt;&gt; I agree that avoiding regressions should take priority.=C2=
=A0 That&#39;s why I made this commit, because the existing fallback logic =
caused regressions, by breaking the indicators on graphical displays.<br>&g=
t; Perhaps in some corner cases, but what I&#39;m showing you above isn&#39=
;t a corner case.=C2=A0 It&#39;s the most common use case for Flymake, turn=
ing it on.<br><br></div>

--0000000000008ee7c3064084f19b--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: Regression. TTY emacs doesn't get Flymake indicators at all by default
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 06 Oct 2025 22:32:01 +0000
Resent-Message-ID: <handler.77313.B77313.175978992116075 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.175978992116075
          (code B ref 77313); Mon, 06 Oct 2025 22:32:01 +0000
Received: (at 77313) by debbugs.gnu.org; 6 Oct 2025 22:32:01 +0000
Received: from localhost ([127.0.0.1]:55434 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v5tkO-0004BD-Cx
	for submit <at> debbugs.gnu.org; Mon, 06 Oct 2025 18:32:00 -0400
Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]:56403)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1v5tkJ-0004An-Lo
 for 77313 <at> debbugs.gnu.org; Mon, 06 Oct 2025 18:31:56 -0400
Received: by mail-oi1-x236.google.com with SMTP id
 5614622812f47-43f5e44f9c6so2872288b6e.0
 for <77313 <at> debbugs.gnu.org>; Mon, 06 Oct 2025 15:31:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1759789908; x=1760394708; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=sLkkVLhWMlcsqqH95QnHXs9wjk0P/x+A5RQsKRz/OqQ=;
 b=dyn/uquCHOpMBDqjiO3phdMKl0QkMTPykTZQxyMcFXZIxI8lAW5DBac4uB68JxEKwz
 PRwETpex7brckjo1dtdZTnCEJMpiqve7PH+nFbq4HedBywERJlczqohorkj/u4WEZUiE
 XvxnJ0inXT1XYo2zAta6RHjptICOIfKpiVrSg7/HrFGF2/ODceXPGy1jUrrNjAIuQpv/
 URzgKkTzPXYrqDzo3TI7bwadtxlDUY1HRfgSe9txVshxrm8dYwoO1AF6MLZcRu4WOvMG
 DanP37+/bO8n8uJuoaIsn+B5K8dT4Z2fDTlv6W5uqreupAuTKQpmHbiP2QaCfld09E+i
 7NDg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1759789908; x=1760394708;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=sLkkVLhWMlcsqqH95QnHXs9wjk0P/x+A5RQsKRz/OqQ=;
 b=lrGzupZBOVy817jd/9yVHK1Gkdwfp55mH+20lmsyP7F/dmAiFtisCHBy9uf3JhcTPm
 K1f8VjScxIDIrLO1+TLdPbRKSqKPG0MPhll+cdcOG6rQlp55/KvdE1gXcf0VsSmsZdGL
 dDIfv9N7PcTDqEJt8iYy6Ob7JeCYX1n4Dd3c9I6JZQNX0rIG2nghqYZ75i0ogLIHPenr
 A2n1PobruZbCRnDrbkOdontqjerArzb+lBSXXHPHXbxeJuaIh98+4gc+a+H2sHiyjqqo
 rOpYfq4gheJtokXxOb77pmxnK2OrbpOgNsVmPCveryAFmn/fU0BqUTgAjAUHg8WwmGNk
 B6Pw==
X-Gm-Message-State: AOJu0Yy1lS1PMQC/Qq9D3FyG8KL2dXgM83snCeWsrzkP5Ll1diZZk14j
 u2jndLldd2WxY8spUB/3DygAcggvKaRgKceEIKJgG13M+G+Jc/UL6EUXSJ603iFNyXS7ionmsdU
 EXht8GL5iLVMl/AHLKo6ta4xq/62SBa/B3+IIs68=
X-Gm-Gg: ASbGncsZpQKzaKKNPIY0lQFaKDEoQT6geTRJrjwIPIYixzoCpGBgMNAqNWnddmDkGMr
 mK/EjK7Rv2vLEWYmnn713X6+LIgqG+FZTq60oEqthmMk4k7JKqOBnc2doY+FnamqurzJTkSc3HP
 P+0VGcMqpUrR1HliLcZ2FE/GTEMLbQlwgHFOjZkJbEKw4kN8d9+tF1yH3wKVC/7Mn2XyW7fPgAI
 dvPUzDJpOvcLCc0l2Gpqv6DYScVvlY=
X-Google-Smtp-Source: AGHT+IHf0wBfpyskBgY//PBX+tzX5k1xvlqrWBEEul/16PtyPlQozw1enKxPkhodb31fZSr/azvxnM6/wcMG2N6557c=
X-Received: by 2002:a05:6808:f86:b0:43f:1b7d:b631 with SMTP id
 5614622812f47-43fc1847701mr7203671b6e.35.1759789908245; Mon, 06 Oct 2025
 15:31:48 -0700 (PDT)
MIME-Version: 1.0
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
In-Reply-To: <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Date: Mon, 6 Oct 2025 23:32:58 +0100
X-Gm-Features: AS18NWDNaRcI1HabRL7JF1EAIrhUV0fTL-EiYdPcfu9MqLkV0IjkdYEibvMhkSU
Message-ID: <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000005c42c1064085048b"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000005c42c1064085048b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Once again, just in case the previous mail also didn't make its way to the
bug thread,
here's a summary.

Spencer's commit in the context of this bug#77313 made it so that Flymake
margin indicators for TTY emacs no longer appear without explicit
customization by the user.

I gather this was done to cover off some situation where the calculation
of the default value of a customization interface was being done
incorrectly.

According to my testing:

* in Emacs 30 both these invocations immediately show indicators:

emacs -Q -nw -f flymake-mode --eval '(insert "\nboo!")'  # (TTY Emacs)
emacs -Q        -f flymake-mode --eval '(insert "\nboo!")' # (window-system
emacs)

* in Emacs 31 *only* the second one shows indicators:

emacs -Q -nw --eval (setq trusted-content :all) -f flymake-mode --eval
'(insert "\nboo!")'  # (TTY Emacs)
emacs -Q        --eval (setq trusted-content :all) -f flymake-mode --eval
'(insert "\nboo!")' # (window-system emacs)

(the "trusted-content" thing is unrelated to this report)

Anyway, I think this is a regression. If there was a bug to fix in a corner
case,
it should not be fixed at the expense of the introduction of another bug
in a much more common use case.

Jo=C3=A3o

On Mon, Oct 6, 2025 at 11:27=E2=80=AFPM Jo=C3=A3o T=C3=A1vora <joaotavora@g=
mail.com> wrote:

> unarchive 77313
> thanks
>
> I noticed that the bug was archived so probably no-one is reading the
> messages
> but me and Spencer.
>
> Let's hope this unarchives it.
>
> On Mon, Sep 29, 2025 at 4:36=E2=80=AFPM Jo=C3=A3o T=C3=A1vora <joaotavora=
@gmail.com> wrote:
> >
> >
> > Something doesn't add up.  If I run this one-liner with an emacs 30, I
> get an error indication regardless of TTY or GUI emacs:
> >
> >    emacs -Q -nw -f flymake-mode --eval '(insert "\nboo!")'
> >    emacs -Q        -f flymake-mode --eval '(insert "\nboo!")'
> >
> > If I do the same after your commit (and I add `--eval (setq
> trusted-content :all)` for demo purposes) I only see the indicator in the
> second case.
> >
> > So what am I missing??  What version are you using?
> >
> >> I agree that avoiding regressions should take priority.  That's why I
> made this commit, because the existing fallback logic caused regressions,
> by breaking the indicators on graphical displays.
> > Perhaps in some corner cases, but what I'm showing you above isn't a
> corner case.  It's the most common use case for Flymake, turning it on.
>
>

--=20
Jo=C3=A3o T=C3=A1vora

--0000000000005c42c1064085048b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Once again, just in case the previous mail also didn&=
#39;t make its way to the bug thread,</div><div>here&#39;s a summary.</div>=
<div><br></div><div>Spencer&#39;s commit in the context of this bug#77313 m=
ade it so that Flymake=C2=A0</div><div>margin indicators for TTY emacs no l=
onger appear without explicit=C2=A0</div><div>customization by the user.</d=
iv><div><br></div><div>I gather this was done to cover off some situation w=
here the calculation</div><div>of the default value of a customization inte=
rface was being done incorrectly.</div><div><br></div><div>According to my =
testing:</div><div><br></div><div>* in Emacs 30 both these invocations imme=
diately show indicators:</div><div><br></div><div><div>emacs -Q -nw -f flym=
ake-mode --eval &#39;(insert &quot;\nboo!&quot;)&#39;=C2=A0 # (TTY Emacs)</=
div><div>emacs -Q=C2=A0 =C2=A0 =C2=A0 =C2=A0 -f flymake-mode --eval &#39;(i=
nsert &quot;\nboo!&quot;)&#39; # (window-system emacs)</div><div><br></div>=
<div>* in Emacs 31 *only* the second one shows indicators:</div></div><div>=
<div><br></div><div><div>emacs -Q -nw=C2=A0--eval (setq trusted-content :al=
l) -f flymake-mode --eval &#39;(insert &quot;\nboo!&quot;)&#39;=C2=A0 # (TT=
Y Emacs)</div><div>emacs -Q=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0--eval (setq tr=
usted-content :all) -f flymake-mode --eval &#39;(insert &quot;\nboo!&quot;)=
&#39; # (window-system emacs)</div><div><br></div><div>(the &quot;trusted-c=
ontent&quot; thing is unrelated to this report)</div><div><br></div><div>An=
yway, I think this is a regression. If there was a bug to fix in a corner c=
ase,=C2=A0</div><div>it should not be fixed at the expense of the introduct=
ion of another bug=C2=A0</div><div>in a much more common use case.</div><di=
v><br></div><div></div><div>Jo=C3=A3o</div></div></div></div><br><div class=
=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr=
">On Mon, Oct 6, 2025 at 11:27=E2=80=AFPM Jo=C3=A3o T=C3=A1vora &lt;<a href=
=3D"mailto:joaotavora@HIDDEN">joaotavora@HIDDEN</a>&gt; wrote:<br></d=
iv><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord=
er-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">unarc=
hive 77313<br>thanks<br><br>I noticed that the bug was archived so probably=
 no-one is reading the messages <br>but me and Spencer.<br><br>Let&#39;s ho=
pe this unarchives it.<br><br>On Mon, Sep 29, 2025 at 4:36=E2=80=AFPM Jo=C3=
=A3o T=C3=A1vora &lt;<a href=3D"mailto:joaotavora@HIDDEN" target=3D"_bla=
nk">joaotavora@HIDDEN</a>&gt; wrote:<br>&gt;<br>&gt;<br>&gt; Something d=
oesn&#39;t add up.=C2=A0 If I run this one-liner with an emacs 30, I get an=
 error indication regardless of TTY or GUI emacs:<br>&gt;<br>&gt; =C2=A0 =
=C2=A0emacs -Q -nw -f flymake-mode --eval &#39;(insert &quot;\nboo!&quot;)&=
#39; <br>&gt; =C2=A0 =C2=A0emacs -Q =C2=A0 =C2=A0 =C2=A0 =C2=A0-f flymake-m=
ode --eval &#39;(insert &quot;\nboo!&quot;)&#39;<br>&gt;<br>&gt; If I do th=
e same after your commit (and I add `--eval (setq trusted-content :all)` fo=
r demo purposes) I only see the indicator in the second case.<br>&gt;<br>&g=
t; So what am I missing??=C2=A0 What version are you using?<br>&gt; =C2=A0<=
br>&gt;&gt; I agree that avoiding regressions should take priority.=C2=A0 T=
hat&#39;s why I made this commit, because the existing fallback logic cause=
d regressions, by breaking the indicators on graphical displays.<br>&gt; Pe=
rhaps in some corner cases, but what I&#39;m showing you above isn&#39;t a =
corner case.=C2=A0 It&#39;s the most common use case for Flymake, turning i=
t on.<br><br></div>
</blockquote></div><div><br clear=3D"all"></div><br><span class=3D"gmail_si=
gnature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature">Jo=
=C3=A3o T=C3=A1vora</div>

--0000000000005c42c1064085048b--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: Regression. TTY emacs doesn't get Flymake indicators at all by default
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 08 Oct 2025 16:11:02 +0000
Resent-Message-ID: <handler.77313.B77313.17599398542409 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17599398542409
          (code B ref 77313); Wed, 08 Oct 2025 16:11:02 +0000
Received: (at 77313) by debbugs.gnu.org; 8 Oct 2025 16:10:54 +0000
Received: from localhost ([127.0.0.1]:33844 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v6Wke-0000cl-UP
	for submit <at> debbugs.gnu.org; Wed, 08 Oct 2025 12:10:53 -0400
Received: from mout-p-102.mailbox.org ([80.241.56.152]:55714)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v6WkN-0000cC-WE
 for 77313 <at> debbugs.gnu.org; Wed, 08 Oct 2025 12:10:44 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4chdJf6LWkz9tmC;
 Wed,  8 Oct 2025 18:10:26 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1759939826;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=DsuY+6WRMj5u4shDbsbFLDeqO1EJRw1fBFSpqY1UejQ=;
 b=tqe+k/A9b5oS6XondviJEZnTwaIZndN3fI7V/Z8unXfEpjc3rm7+1YRPoTRULF8gSlEu+S
 4hcOaEMfIdrE2LbcP8OXVVyC+Yip3c0nRmY7/14qPHOOLyPqV27GR3FtIuf3u32gX8PyXs
 1cmYchSxlstOq9DyNV4B7P8C+oL59lRnFcP3L42bTMCiAUCPJ+Tk9Qbsojt/pRCA6+Y0/j
 nnKBIN2YJxZ9QevLSX0qs+Dxthc1ZHRH5mo2Y3s1EhJ+hRvn36HSYpjjLMwfINOr4f92Es
 taJhzA+qtK4D/DyeUHd9KG5RM/QDtC0l79gMSSUSe4r2pFohPT1KSJeU9g9RuQ==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::102 as permitted sender)
 smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
Date: Wed, 08 Oct 2025 19:06:31 +0300
Message-ID: <87v7kpfls0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4chdJf6LWkz9tmC
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Spencer's commit in the context of this bug#77313 made it so that Flymake 
> margin indicators for TTY emacs no longer appear without explicit 
> customization by the user.
>
> I gather this was done to cover off some situation where the calculation
> of the default value of a customization interface was being done
> incorrectly.

The problem is that it's impossible to cover 100% of use cases.

For example, such case when flymake-mode is enabled in a buffer
on a graphical display with fridges, then the same buffer is displayed
on a TTY frame - all indicators will disappear.

Therefore some compromise is unavoidable.

I recommend to push Spencer's patch that introduces the value
'fringes-per-frame' for 'flymake-indicator-type'.  Only better
would be to check it in 'flymake-mode' like in the patch
with 'window-fringes' that was reverted.

Another improvement for that patch would be to support
a predicate function for 'flymake-indicator-type'.
Then if someone needs to additionally check for 'window-fringes'
it will be possible to do this in a custom function.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 08 Oct 2025 17:46:02 +0000
Resent-Message-ID: <handler.77313.B77313.175994556026164 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: dmitry@HIDDEN, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.175994556026164
          (code B ref 77313); Wed, 08 Oct 2025 17:46:02 +0000
Received: (at 77313) by debbugs.gnu.org; 8 Oct 2025 17:46:00 +0000
Received: from localhost ([127.0.0.1]:34129 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v6YEg-0006np-Ph
	for submit <at> debbugs.gnu.org; Wed, 08 Oct 2025 13:45:59 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:47225)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v6YEb-0006mk-Sx
 for 77313 <at> debbugs.gnu.org; Wed, 08 Oct 2025 13:45:55 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <87v7kpfls0.fsf@HIDDEN> (Juri Linkov's message of "Wed, 
 08 Oct 2025 19:06:31 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN>
Date: Wed, 08 Oct 2025 13:45:47 -0400
Message-ID: <ierfrbt8eyc.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1759945547;
 bh=/v6ABPFJIuuLlalp51E036zVycidlQci4VjN/wbzTfk=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=C0uTi1sbvTDxKfIM6aW7+0aMXj6aoGtbmEzQ3PQsZ8pkt9asVly9XCYwQe+v/zj5e
 AeTPCZmfpEwaojv67oMS75Ob0MxSaCAoUjOlIs6Ubu+vmOe5hZplVXtkXZlucHaa6W
 gilHSSQ1Gucr134pjYUa7YW9B7NPKumxMcRRksiDTCafy6NZF8VWzGz+pve4fXwFsH
 Kk1Qp6U8XxFJKRnQRMU+uJGVUizbeBVCAoMwpTAeV8Xn8lCfm/dR1RZ0xUmCckEGe8
 eftd7SI+ciYqDb7DRdGuUN3M+AMFFohikrgmTr34Ch/xwnUZkMxOEy8DBcX+bDFnNN
 MdRb7vlFwfgrQ==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

>> Spencer's commit in the context of this bug#77313 made it so that Flymake 
>> margin indicators for TTY emacs no longer appear without explicit 
>> customization by the user.
>>
>> I gather this was done to cover off some situation where the calculation
>> of the default value of a customization interface was being done
>> incorrectly.
>
> The problem is that it's impossible to cover 100% of use cases.
>
> For example, such case when flymake-mode is enabled in a buffer
> on a graphical display with fridges, then the same buffer is displayed
> on a TTY frame - all indicators will disappear.
>
> Therefore some compromise is unavoidable.

Yes.

Specifically, I think what we need is some way to have "per-window" text
displayed in the margins.

Then flymake could add text to the margins which is only displayed in
windows in terminal frames.  And also only widen the margins in such
frames, too.

I'm not sure if this is possible right now, though.  Maybe this needs an
enhancement to the low-level display of margins?

If we did that, then we could wrap it in some new higher-level functions
for managing margins.  This would also be useful for diff-hl (cc'd
Dmitry) which also started off only supporting fringes and recently
added support for margins for the sake of tty frames, and probably will
run into the same issues that flymake did.

> I recommend to push Spencer's patch that introduces the value
> 'fringes-per-frame' for 'flymake-indicator-type'.  Only better
> would be to check it in 'flymake-mode' like in the patch
> with 'window-fringes' that was reverted.

Do you mean the one which check display-graphic-p?  Yes, I think
checking display-graphic-p in flymake-mode would lead to OK results
(better than the reverted patch which checks window-fringes, which very
often doesn't work since it depends on the selected window).  It still
unfortunately depends on the selected frame, so is broken during daemon
startup or when a terminal frame is opened for a multi-frame Emacs.

> Another improvement for that patch would be to support
> a predicate function for 'flymake-indicator-type'.
> Then if someone needs to additionally check for 'window-fringes'
> it will be possible to do this in a custom function.

Eh... such a predicate is basically impossible to write correctly, so I
think that's not necessary.  Really we should just get it right in core
Emacs.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 09 Oct 2025 05:52:02 +0000
Resent-Message-ID: <handler.77313.B77313.17599890654558 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: dmitry@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17599890654558
          (code B ref 77313); Thu, 09 Oct 2025 05:52:02 +0000
Received: (at 77313) by debbugs.gnu.org; 9 Oct 2025 05:51:05 +0000
Received: from localhost ([127.0.0.1]:35426 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v6jYO-0001BS-4p
	for submit <at> debbugs.gnu.org; Thu, 09 Oct 2025 01:51:04 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:35638)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v6jY7-0001AX-96
 for 77313 <at> debbugs.gnu.org; Thu, 09 Oct 2025 01:50:59 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1v6jXy-0006Os-6B; Thu, 09 Oct 2025 01:50:38 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=f7fI9IggGHmnfXsJ6eFlddv8rhfospVGWpCvoYa0kXk=; b=mM5Uo5NO3sMJHDfiqhVX
 eemMRyQ7LJBO++w42+Eeq9aYLsoSaW+ALrPO7aqZz5eVByHejeVNF/64cZKireVm+aIdQer5Pq2YK
 A0zzOvo7L6Z81oGKDgFK8vL/au0SqjD30TKDBkkL0Nxufn4ATOqkWQXIHvU6ypcd/4a1EDqc1j8Yp
 hatJvruRCC32A1XIizwGdgrfTXsJP1TmbRj5BTOHsIkd9AEEruJHRrlL7Y1X8vjiM7RiCX25ltsUO
 K3PZsHHJ6S9EZNNTf1CF8BObl7HddSRzwaeKyAI4X+hRGonbmizA1xgOl93YQAI00EQqm57JxMqkw
 SDk5KLNuruCKpg==;
Date: Thu, 09 Oct 2025 08:50:33 +0300
Message-Id: <86v7koaaja.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <ierfrbt8eyc.fsf_-_@HIDDEN> (bug-gnu-emacs@HIDDEN)
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: dmitry@HIDDEN,
>  João Távora <joaotavora@HIDDEN>,
>  77313 <at> debbugs.gnu.org
> Date: Wed, 08 Oct 2025 13:45:47 -0400
> From:  Spencer Baugh via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> Juri Linkov <juri@HIDDEN> writes:
> 
> >> Spencer's commit in the context of this bug#77313 made it so that Flymake 
> >> margin indicators for TTY emacs no longer appear without explicit 
> >> customization by the user.
> >>
> >> I gather this was done to cover off some situation where the calculation
> >> of the default value of a customization interface was being done
> >> incorrectly.
> >
> > The problem is that it's impossible to cover 100% of use cases.
> >
> > For example, such case when flymake-mode is enabled in a buffer
> > on a graphical display with fridges, then the same buffer is displayed
> > on a TTY frame - all indicators will disappear.
> >
> > Therefore some compromise is unavoidable.
> 
> Yes.
> 
> Specifically, I think what we need is some way to have "per-window" text
> displayed in the margins.

Can Flymake use per-window overlays?  Then each window could have the
margin display specific to that window.





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 09 Oct 2025 05:52:02 +0000
Resent-Message-ID: <handler.77313.B77313.17599891174630 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: dmitry@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17599891174630
          (code B ref 77313); Thu, 09 Oct 2025 05:52:02 +0000
Received: (at 77313) by debbugs.gnu.org; 9 Oct 2025 05:51:57 +0000
Received: from localhost ([127.0.0.1]:35433 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v6jZE-0001Cc-Ho
	for submit <at> debbugs.gnu.org; Thu, 09 Oct 2025 01:51:57 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51874)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v6jZB-0001CO-U4
 for 77313 <at> debbugs.gnu.org; Thu, 09 Oct 2025 01:51:54 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1v6jZ5-0006SB-PF; Thu, 09 Oct 2025 01:51:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=21dnT86JRhMjxQhFKCVV82IuCwjVMNz7us7CMX6IVbQ=; b=X4iU7LcuayLOPNA2vGfw
 rj8g2IsyZ36j6SWW1Q63FzRZux192smQLqJAQg+Lvn8G0e3MK4aBWk8PMBTvnTMfn7FzwdpDBXxme
 i23651HdqyH7m3GTswJ500WejtA5L3KhEUGrnTeq8OejfFaCpjjvZY9bsFaz8Q7L3a2PPlXCDAiXM
 1yKuFJ/SLJV/CskR58OBqajZGma7VW2mrHcyf3tblZ4Y1VSTc46sQQt7ipoSVBS+5a43DGpyyzlOK
 3uD7rNOCPAhg8iBY9b7581/rAxrMX5TikkFAM9wTPfxCSqNv3VG15licI8To6L8wWncxDmdn467Q1
 j6orwYG+vaaZmA==;
Date: Thu, 09 Oct 2025 08:51:44 +0300
Message-Id: <86tt08aahb.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <ierfrbt8eyc.fsf_-_@HIDDEN> (bug-gnu-emacs@HIDDEN)
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: dmitry@HIDDEN,
>  João Távora <joaotavora@HIDDEN>,
>  77313 <at> debbugs.gnu.org
> Date: Wed, 08 Oct 2025 13:45:47 -0400
> From:  Spencer Baugh via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> > I recommend to push Spencer's patch that introduces the value
> > 'fringes-per-frame' for 'flymake-indicator-type'.  Only better
> > would be to check it in 'flymake-mode' like in the patch
> > with 'window-fringes' that was reverted.
> 
> Do you mean the one which check display-graphic-p?  Yes, I think
> checking display-graphic-p in flymake-mode would lead to OK results
> (better than the reverted patch which checks window-fringes, which very
> often doesn't work since it depends on the selected window).  It still
> unfortunately depends on the selected frame, so is broken during daemon
> startup or when a terminal frame is opened for a multi-frame Emacs.

The function display-graphic-p accepts an argument, which could be a
frame.  So it is not limited to the selected frame.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 09 Oct 2025 07:07:01 +0000
Resent-Message-ID: <handler.77313.B77313.175999361719315 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.175999361719315
          (code B ref 77313); Thu, 09 Oct 2025 07:07:01 +0000
Received: (at 77313) by debbugs.gnu.org; 9 Oct 2025 07:06:57 +0000
Received: from localhost ([127.0.0.1]:35607 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v6kjo-00051R-28
	for submit <at> debbugs.gnu.org; Thu, 09 Oct 2025 03:06:57 -0400
Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]:35924)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v6kja-000511-0H
 for 77313 <at> debbugs.gnu.org; Thu, 09 Oct 2025 03:06:44 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4cj1Bd72NLz9tgp;
 Thu,  9 Oct 2025 09:06:33 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1759993594;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=DKsQqAP1RqUFfckxRblmwKPW2vPj+XbCVWcNITrk4oI=;
 b=jPf4tZ5x8e0Ss38Do8Q17ukkuQWQLDj8JoSdzxr/8rhRw0c7zBTBGLP99u12rHGfI1AU4M
 L+ZelNFlwl1CcoKZCsGFQyvhD3lPnzZTGKfEIhZdhSDfRXdF//hgE9moj0dzy7eR5ONQbR
 d9acJI/NvJRH56A0Mbo4nFom2fCIX9SyyoAkXPIEZTGuUxJ47upvrmd44rE1LMxGqp6MBd
 jolyzDRfCQTdmEbetjQhj5DOXdVrYyKNd5c22HJuFtzvRYC06jjdRFbQItxchfuXdi0fpx
 fs93+Aq3PsFP8ETBd+AAoxrw/x10m38qWIh03j+rrEWHeq4bRfAHpTjXtSYCBQ==
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <86v7koaaja.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN>
Date: Thu, 09 Oct 2025 09:49:57 +0300
Message-ID: <87347sh85u.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Specifically, I think what we need is some way to have "per-window" text
>> displayed in the margins.
>>
>> Then flymake could add text to the margins which is only displayed in
>> windows in terminal frames.  And also only widen the margins in such
>> frames, too.
>>
>> I'm not sure if this is possible right now, though.  Maybe this needs an
>> enhancement to the low-level display of margins?
>
> Can Flymake use per-window overlays?  Then each window could have the
> margin display specific to that window.

Adding per-window overlays will limit usability of Flymake that will
hide indicators in the same buffer displayed in other windows.

While as the same time it doesn't solve the original problem
because after hiding margin indicators on a graphical display,
it can't automatically enable fringe indicators.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 09 Oct 2025 08:03:02 +0000
Resent-Message-ID: <handler.77313.B77313.175999693430246 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: sbaugh@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.175999693430246
          (code B ref 77313); Thu, 09 Oct 2025 08:03:02 +0000
Received: (at 77313) by debbugs.gnu.org; 9 Oct 2025 08:02:14 +0000
Received: from localhost ([127.0.0.1]:35710 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v6lbJ-0007rm-Ez
	for submit <at> debbugs.gnu.org; Thu, 09 Oct 2025 04:02:13 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:45356)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v6lbE-0007rX-Sh
 for 77313 <at> debbugs.gnu.org; Thu, 09 Oct 2025 04:02:10 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1v6lb7-0006FG-A3; Thu, 09 Oct 2025 04:02:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=xOiKlhOAVjYUpQhZnijRM/G/jy6J93L4jPH2f3ylsX0=; b=O7saaRuAfpTa
 MLrZ5oDJm+yppQrlrBNKHt1LRO6b0/YAEGwE2EzPRuCwUHCu6p6Q7NhhC+X24zLF57ByjUDdFLGj3
 lGvYUzvvTzkiVhkGVUpFpzQpFRZoaZgqOUmSFr11r9XC7+U7yxFFsIixcAA46Yji/W+iC/lFF78cK
 FTdT5PRUfvf1crY+clwZJxZDPOHNyG5WgB586aUY7qIHehHw2+IDo6OAoypJGzj9vXW8yJEZT35BJ
 i/rk6nbqQn5pdRNZDwzirkth6HRBT7CJrlBISL65qbRWpqYFKacadIEuf/aJcQ912hvJYUnwz6VQ9
 BngB/S6RHP6ocpY0HD32ug==;
Date: Thu, 09 Oct 2025 11:01:54 +0300
Message-Id: <86bjmga4gd.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87347sh85u.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 09 Oct 2025 09:49:57 +0300)
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: Spencer Baugh <sbaugh@HIDDEN>,  dmitry@HIDDEN,
>   joaotavora@HIDDEN,  77313 <at> debbugs.gnu.org
> Date: Thu, 09 Oct 2025 09:49:57 +0300
> 
> >> Specifically, I think what we need is some way to have "per-window" text
> >> displayed in the margins.
> >>
> >> Then flymake could add text to the margins which is only displayed in
> >> windows in terminal frames.  And also only widen the margins in such
> >> frames, too.
> >>
> >> I'm not sure if this is possible right now, though.  Maybe this needs an
> >> enhancement to the low-level display of margins?
> >
> > Can Flymake use per-window overlays?  Then each window could have the
> > margin display specific to that window.
> 
> Adding per-window overlays will limit usability of Flymake that will
> hide indicators in the same buffer displayed in other windows.

No, it will need that Flymake defines a (possibly) slightly different
overlay for each window of those which display a buffer.

> While as the same time it doesn't solve the original problem
> because after hiding margin indicators on a graphical display,
> it can't automatically enable fringe indicators.

Sorry, I don't think I understand the scenario.  Can you describe this
in more detail?  Why would hiding margin indicators require
automatically enabling fringe indicators?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: Regression. TTY emacs doesn't get Flymake indicators at all by default
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 09 Oct 2025 08:13:02 +0000
Resent-Message-ID: <handler.77313.B77313.1759997573924 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.1759997573924
          (code B ref 77313); Thu, 09 Oct 2025 08:13:02 +0000
Received: (at 77313) by debbugs.gnu.org; 9 Oct 2025 08:12:53 +0000
Received: from localhost ([127.0.0.1]:35761 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v6llc-0000Ei-2u
	for submit <at> debbugs.gnu.org; Thu, 09 Oct 2025 04:12:52 -0400
Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]:52224)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1v6llU-0000Cx-I8
 for 77313 <at> debbugs.gnu.org; Thu, 09 Oct 2025 04:12:48 -0400
Received: by mail-oi1-x22b.google.com with SMTP id
 5614622812f47-43f47280160so453318b6e.0
 for <77313 <at> debbugs.gnu.org>; Thu, 09 Oct 2025 01:12:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1759997558; x=1760602358; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=/Ra6+0Fo8woIkx8/ZHfUyWOD/oafhtIhJcCW16HzKM8=;
 b=H/bhuSubvwUxlMJZCIIAWa6jpgRbRPm0nlqArJkd0/4ZNXDRPagCDFkrbYsh3ma0/l
 eTRzZPQJVoV54cx52dRzG5oqiCj2gYbvgyyG1b5usnM7GnQjmIevI5R0q9RksXLFFRAR
 45xBKjCNxFl/PVZsoS6e26KaFHxN5KWZWGOVKzNIUXdHw6sqvofSp0m2AYiKRxkX8yqg
 e+VIDifDTE2KDCF6VxVPwhVROQDbtAgXjso4C71rvNpbwOKOHm8gfyGfVxvy9YnNSPfR
 SZ7J2LViE3KhqcP5IS3b7nkIKXQvjDWY3aruDmHa7UTVep4svOQVzqWDX0mVdoRF4yX5
 CD8A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1759997558; x=1760602358;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=/Ra6+0Fo8woIkx8/ZHfUyWOD/oafhtIhJcCW16HzKM8=;
 b=PCMgiriU5NT7jX8xhm4+yAI20i5rp4pfVeyeA6Wd43xMkovCalc62qeBW2hsZ1a7yf
 FPOWOwUBF5xhuckQdBeihwf175n3EweU66S6pc4yVO7P2Q0DYUazaxVOI0pZhk9yU4ys
 RuA9KkxAYHNmFoAsUuo6aeT12O9sZgcBAhTve1iUnER/ZCVy7W3oR3IvYM1gyM87jnh/
 jaqx4EnNrIdJDM7spSQLeKH44bU8aB5W7EM4Bk1MfS/8BLKsxt4Y91pu+sjAxvOP17Z1
 pWJ+Mv0xL9gxvbu0jvwYeMWPNeBp2x86eJ1+BIRDFFU1ZlSrtFSYFA8EBhqLDd+zq9d7
 WP/Q==
X-Forwarded-Encrypted: i=1;
 AJvYcCU3E5fvl366a0kcOBKBV0jyxIG03OCFrH/6MD/y6YLmOOhe4Qq6NvSeA/BzV+GjsSZVooLdFg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YwkHvGxxwm4TAcP71gUaXGomFvBeUo4PW2tEFAL474UdBkWT/+b
 SGYxglghkA6sFj3hgkHHOJMqZ+TgjSoRRvXyAUNy8l9iAIn93gWZCVbQ19VHNSj3RZayogcEBNM
 sGMWuVmoggXOyk6R6UtPxUQ4oIbCTNwU=
X-Gm-Gg: ASbGncvehHgG5g83my6+WnG/IsPzR/GxLAKR+FLMgzayWjNICWdxsqupkWAzE31a77F
 Dq4PhrThI43/5zOPHkY0tOjEZKyIWbcRkmwhSSa2Mwkeb+OOG8DO6MMCvFC63D4fhfOWNgr7SlJ
 wbJANMZGgPW+8BM5I7F0V7lWW1Ufqua86pAeFUlNXSp+UyVtBgAy/DRo+xyF2QZbd3TQn53LDCU
 fIeeTvpVDnVW0YBvJkyMLoe1FIghw==
X-Google-Smtp-Source: AGHT+IFRAg6A42bFYRBnIDtT8X71VnPqIqr1c5FpBRV3FHnCra7l3cFucjBa9qDC2FFjUz4ALQp2DF9EGHPiTjW7Dc4=
X-Received: by 2002:a05:6808:188e:b0:43f:b7f8:e1f8 with SMTP id
 5614622812f47-4417b1c86a3mr3324930b6e.0.1759997557876; Thu, 09 Oct 2025
 01:12:37 -0700 (PDT)
MIME-Version: 1.0
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN>
In-Reply-To: <87v7kpfls0.fsf@HIDDEN>
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Date: Thu, 9 Oct 2025 09:12:27 +0100
X-Gm-Features: AS18NWC0x7Euk4Hx9PagCqOyHSxzRGS8DCHllJV9RuxkxJPQLgKGo2DhMdl5ef8
Message-ID: <CALDnm52+4ZDFjr0tE9puPb5CyXH_As+WCOKELCzGg-rPq8WKsA@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000003e2e9b0640b55d04"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000003e2e9b0640b55d04
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Wed, Oct 8, 2025, 17:10 Juri Linkov <juri@HIDDEN> wrote:

> I gather this was done to cover off some situation where the calculation
> > of the default value of a customization interface was being done
> > incorrectly.
>
> The problem is that it's impossible to cover 100% of use cases.
>

Fair enough. Then we should think about what percentage we want to cover,
or what areas. Currently the "launch TTY Emacs, then enable Flymake" use
case is 0% covered which I think is pretty bad. Not only what, it's very
surprising regression  to Emacs 30.1, a released version.

I recommend to push Spencer's patch that introduces the value
> 'fringes-per-frame' for 'flymake-indicator-type'.  Only better
> would be to check it in 'flymake-mode' like in the patch
> with 'window-fringes' that was reverted.
>


Fine with me as long as it re-enables the above use case (and doesn't
blatantly break another basic use case).

Other more esoteric use cases, such as starting headless then making a TTY
frame, then a windowed frame, etc, can afford to be "buggy", if indeed it
is impossible to have 100% accuracy. That's where the compromise should
happen. It should not happen in the most basic of cases, even less so when
regressive behaviour is at stake.

Let's have the very first frame created make the decision, for example,
_regardless_ of whether Flymake was loaded or enabled when that happened.
This will cover 95% of cases, I estimate.

Jo=C3=A3o

--0000000000003e2e9b0640b55d04
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div dir=3D"auto"><br></div><div dir=3D"auto"><br></div><=
div data-smartmail=3D"gmail_signature" dir=3D"auto">On Wed, Oct 8, 2025, 17=
:10 Juri Linkov &lt;<a href=3D"mailto:juri@HIDDEN">juri@HIDDEN</a>&=
gt; wrote:</div><div data-smartmail=3D"gmail_signature" dir=3D"auto"><br></=
div><div class=3D"gmail_quote gmail_quote_container" dir=3D"auto"><blockquo=
te class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px =
solid rgb(204,204,204);padding-left:1ex">
&gt; I gather this was done to cover off some situation where the calculati=
on<br>
&gt; of the default value of a customization interface was being done<br>
&gt; incorrectly.<br>
<br>
The problem is that it&#39;s impossible to cover 100% of use cases.<br></bl=
ockquote></div><div dir=3D"auto"><br></div><div dir=3D"auto">Fair enough. T=
hen we should think about what percentage we want to cover, or what areas. =
Currently the &quot;launch TTY Emacs, then enable Flymake&quot; use case is=
 0% covered which I think is pretty bad. Not only what, it&#39;s very surpr=
ising regression=C2=A0 to Emacs 30.1, a released version.</div><div dir=3D"=
auto"><br></div><div class=3D"gmail_quote gmail_quote_container" dir=3D"aut=
o"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord=
er-left:1px solid rgb(204,204,204);padding-left:1ex">
I recommend to push Spencer&#39;s patch that introduces the value<br>
&#39;fringes-per-frame&#39; for &#39;flymake-indicator-type&#39;.=C2=A0 Onl=
y better<br>
would be to check it in &#39;flymake-mode&#39; like in the patch<br>
with &#39;window-fringes&#39; that was reverted.<br></blockquote></div><div=
 dir=3D"auto"><br></div><div dir=3D"auto"><br></div><div dir=3D"auto">Fine =
with me as long as it re-enables the above use case (and doesn&#39;t blatan=
tly break another basic use case).</div><div dir=3D"auto"><br></div><div di=
r=3D"auto">Other more esoteric use cases, such as starting headless then ma=
king a TTY frame, then a windowed frame, etc, can afford to be &quot;buggy&=
quot;, if indeed it is impossible to have 100% accuracy. That&#39;s where t=
he compromise should happen. It should not happen in the most basic of case=
s, even less so when regressive behaviour is at stake.</div><div dir=3D"aut=
o"><br></div><div dir=3D"auto">Let&#39;s have the very first frame created =
make the decision, for example, _regardless_ of whether Flymake was loaded =
or enabled when that happened. This will cover 95% of cases, I estimate.</d=
iv><div dir=3D"auto"><br></div><div dir=3D"auto">Jo=C3=A3o</div></div>

--0000000000003e2e9b0640b55d04--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 09 Oct 2025 16:48:02 +0000
Resent-Message-ID: <handler.77313.B77313.176002843721379 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: sbaugh@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176002843721379
          (code B ref 77313); Thu, 09 Oct 2025 16:48:02 +0000
Received: (at 77313) by debbugs.gnu.org; 9 Oct 2025 16:47:17 +0000
Received: from localhost ([127.0.0.1]:39099 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v6tnQ-0005Yk-AZ
	for submit <at> debbugs.gnu.org; Thu, 09 Oct 2025 12:47:16 -0400
Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]:49704)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v6tnM-0005YA-G1
 for 77313 <at> debbugs.gnu.org; Thu, 09 Oct 2025 12:47:13 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4cjG4R4B1bz9tJZ;
 Thu,  9 Oct 2025 18:47:03 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760028423;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=1DyPhV/lR36XPPvitnNKqMFNKXTrIDbMSkVTuZh2768=;
 b=c52Jv0wEaTUqlYEZboEvWh5UzLP4PObd7ib+FcA5ISVVzYjGq7SLDshqHndWf8cqg+Q9lf
 IjGCru8DZ7lNyKjgVi1ryNiuRjiJ79wq3721pUI6jb2mUdqwKrmBAwOWE182GLVXM1l7rE
 WLYVkb+KZE/rBcWAxnALz+TMV1nETkoihsmGkVdGr2eCDjTAMPOzDlwwy8L3JbFHoqqFQj
 kcT0+0VNcvNOWyix0AVE2TFQZLC1xn5KATJEMoES04xfg4Kux40poZD3N6I3vHJni8pEuq
 WQU5dnMG6ROdjVosS8exQkPFKV9SNR2rbVo7yxnA1Dpbj/17/AMpOSB+83blZw==
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <86bjmga4gd.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN>
Date: Thu, 09 Oct 2025 19:46:11 +0300
Message-ID: <878qhkaur0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> > Can Flymake use per-window overlays?  Then each window could have the
>> > margin display specific to that window.
>> 
>> Adding per-window overlays will limit usability of Flymake that will
>> hide indicators in the same buffer displayed in other windows.
>
> No, it will need that Flymake defines a (possibly) slightly different
> overlay for each window of those which display a buffer.

For example, the user splits the selected window, so that
two windows are displaying the same buffer.  How can
Flymake define a different overlay for the new window?

>> While as the same time it doesn't solve the original problem
>> because after hiding margin indicators on a graphical display,
>> it can't automatically enable fringe indicators.
>
> Sorry, I don't think I understand the scenario.  Can you describe this
> in more detail?  Why would hiding margin indicators require
> automatically enabling fringe indicators?

For example, the user enables flymake-mode on a TTY frame,
then opens the same buffer on a graphical frame.
How can the existing buffer switch from displaying
the indicators in margins to displaying the indicators
in fringes?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 09 Oct 2025 17:01:02 +0000
Resent-Message-ID: <handler.77313.B77313.176002923824532 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176002923824532
          (code B ref 77313); Thu, 09 Oct 2025 17:01:02 +0000
Received: (at 77313) by debbugs.gnu.org; 9 Oct 2025 17:00:38 +0000
Received: from localhost ([127.0.0.1]:39132 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v6u0H-0006NW-39
	for submit <at> debbugs.gnu.org; Thu, 09 Oct 2025 13:00:38 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:38513)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v6u00-0006HL-Qr
 for 77313 <at> debbugs.gnu.org; Thu, 09 Oct 2025 13:00:21 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <878qhkaur0.fsf@HIDDEN> (Juri Linkov's message of "Thu, 
 09 Oct 2025 19:46:11 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
Date: Thu, 09 Oct 2025 13:00:09 -0400
Message-ID: <ierms60ypra.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760029209;
 bh=aTQEw1FF5vUNVy4csVa9PLTw1N9xrNqA65ZDwyvHEEQ=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=sGgFUzSrBF+KvvuDDHBV8b8iFv5rvAF9KbTjDubsQ8yuJWCkdYu90MThxSkmcRfDh
 c54NeVaoeABdoaVVxCCOxpcEuHwwZjeUfPdO2T3k5rtln9S3oCjbM5xE6Clt/Pmp2Y
 8oG0WatAXK3tr/ecerc9jEpFbHDPCNoOs48ChtBnalyyyc3PcTCUHbBfmqn9kmH5ah
 n7NuKKWPcfef6/C6FJbXIJ0Q+KExb7j8++ytWgxj0JIHrBU8qX9pIBAG47jDE9WlYA
 Jzxldwj18wGm2VpvWqSZyXSu8mHj40oM7rj+Ow1tqZ47176N67jz4oNEvw5NUunOEk
 Hy+jkdlRHbSAg==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

>>> > Can Flymake use per-window overlays?  Then each window could have the
>>> > margin display specific to that window.
>>> 
>>> Adding per-window overlays will limit usability of Flymake that will
>>> hide indicators in the same buffer displayed in other windows.
>>
>> No, it will need that Flymake defines a (possibly) slightly different
>> overlay for each window of those which display a buffer.
>
> For example, the user splits the selected window, so that
> two windows are displaying the same buffer.  How can
> Flymake define a different overlay for the new window?

Yes, this is the core question.

>>> While as the same time it doesn't solve the original problem
>>> because after hiding margin indicators on a graphical display,
>>> it can't automatically enable fringe indicators.
>>
>> Sorry, I don't think I understand the scenario.  Can you describe this
>> in more detail?  Why would hiding margin indicators require
>> automatically enabling fringe indicators?
>
> For example, the user enables flymake-mode on a TTY frame,
> then opens the same buffer on a graphical frame.
> How can the existing buffer switch from displaying
> the indicators in margins to displaying the indicators
> in fringes?

This part is actually not so hard.  The problem has two halves:

A. in a graphical frame, we want to display indicators in fringes
B. in a graphical frame, we want to not display indicators in margins

A is actually easy: we can simply unconditionally have fringe indicators
in all frames, because fringes aren't displayed anyway in TTY frames.
No need to turn fringe indicators on and off.

B is the harder one.  Not sure how to do it, but perhaps there's a
solution with overlay tricks.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 09 Oct 2025 20:13:02 +0000
Resent-Message-ID: <handler.77313.B77313.176004076213253 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176004076213253
          (code B ref 77313); Thu, 09 Oct 2025 20:13:02 +0000
Received: (at 77313) by debbugs.gnu.org; 9 Oct 2025 20:12:42 +0000
Received: from localhost ([127.0.0.1]:39626 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v6x0D-0003Rf-Kw
	for submit <at> debbugs.gnu.org; Thu, 09 Oct 2025 16:12:42 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:42063)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v6x08-0003Pn-LC
 for 77313 <at> debbugs.gnu.org; Thu, 09 Oct 2025 16:12:38 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <CALDnm52+4ZDFjr0tE9puPb5CyXH_As+WCOKELCzGg-rPq8WKsA@HIDDEN>
 ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Thu, 9 Oct 2025
 09:12:27 +0100")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN>
 <CALDnm52+4ZDFjr0tE9puPb5CyXH_As+WCOKELCzGg-rPq8WKsA@HIDDEN>
Date: Thu, 09 Oct 2025 16:12:22 -0400
Message-ID: <ierh5w7zvfd.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760040743;
 bh=FkRtDoWYZATCHq5I1BUreo5Ef0/RBsZLENVpr8pg4eU=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=vV25tOG7wlkRJRYcSiZvW7MXY1SuA7IwBBYfqzxdHtpvboOJmfwwZoWM58gzVg/Nz
 o4c3URJryAHFKp6I+WGEoc6StSTeCCTHgEqJ0P9JkpFe3EUzQZ8jrntwYgHWULGCEK
 8OzFE2SMljCVE5I5fszidLHvB0Xnf1cDuvDtUL9bRyWyt6xZ6Ij129o+XpoLDnZId4
 tjulDl3ER0WNGGZWhccKtAbN78BJHNbJkNXZMmHtFPaygPAsEDANzB0UB2kl9gKsYc
 TpyXa5T0eZH8cdLdz2bTXUyvXawy1/qthCxE5ZONjXHZt4RUzaRj9sfK4TckOGRF+P
 fjCvzli1nECgw==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes:

> On Wed, Oct 8, 2025, 17:10 Juri Linkov <juri@HIDDEN> wrote:
>
>  > I gather this was done to cover off some situation where the calculati=
on
>  > of the default value of a customization interface was being done
>  > incorrectly.
>
>  The problem is that it's impossible to cover 100% of use cases.
>
> Fair enough. Then we should think about what percentage we want to cover,=
 or what areas. Currently the "launch TTY Emacs, then
> enable Flymake" use case is 0% covered which I think is pretty bad. Not o=
nly what, it's very surprising regression  to Emacs 30.1, a
> released version.
>
>  I recommend to push Spencer's patch that introduces the value
>  'fringes-per-frame' for 'flymake-indicator-type'.  Only better
>  would be to check it in 'flymake-mode' like in the patch
>  with 'window-fringes' that was reverted.
>
> Fine with me as long as it re-enables the above use case (and doesn't bla=
tantly break another basic use case).
>
> Other more esoteric use cases, such as starting headless then making a TT=
Y frame, then a windowed frame, etc, can afford to be
> "buggy", if indeed it is impossible to have 100% accuracy. That's where t=
he compromise should happen. It should not happen in the
> most basic of cases, even less so when regressive behaviour is at stake.
>
> Let's have the very first frame created make the decision, for example, _=
regardless_ of whether Flymake was loaded or enabled
> when that happened. This will cover 95% of cases, I estimate.

Alas, that fails if the user uses "emacs --daemon" and graphical frames,
because the first (pseudo-)frame created is non-graphical.  I think that
is a pretty common configuration.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 09 Oct 2025 22:16:02 +0000
Resent-Message-ID: <handler.77313.B77313.17600481037903 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17600481037903
          (code B ref 77313); Thu, 09 Oct 2025 22:16:02 +0000
Received: (at 77313) by debbugs.gnu.org; 9 Oct 2025 22:15:03 +0000
Received: from localhost ([127.0.0.1]:39898 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v6yuc-000230-52
	for submit <at> debbugs.gnu.org; Thu, 09 Oct 2025 18:15:03 -0400
Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]:45310)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1v6yuY-00022Y-Dk
 for 77313 <at> debbugs.gnu.org; Thu, 09 Oct 2025 18:14:59 -0400
Received: by mail-ot1-x331.google.com with SMTP id
 46e09a7af769-7af40016ab3so1118122a34.2
 for <77313 <at> debbugs.gnu.org>; Thu, 09 Oct 2025 15:14:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760048091; x=1760652891; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=xcToJp8RQ9qXjnEHxRgnCrYmy7oeDmU5XoLscdv3/S0=;
 b=Ae2XrbyivMFzKJ5wm4gZbCWSZXLRw5EFsbDQNc0HiK1PJ81DIgVNCWLihDBYJKD996
 p8bluZX89LLkoufYRx+x9YXr4CjCMYjfc/emYVq8DBKhVw+8QbMxGj5EplgE9TpBOPnP
 aycoZRLtT0v6Kxhobnn8DKEoV9KV03sFTZjSrNM9xZBt598XfvqgNWQ2SuM1T6cHvBVT
 ONIb3uuhGHhsSrgWlNkheoEUMMpyoSE83E1airDmSeFH8pzs/CSL4b4fXBkteXo1HuvA
 y4OU1krrn24g6Zvid1K74GmN/bLpmHfL6vWfy21DIsfug+EYWtSJO+bFr/NmiuAW0J3j
 Nupg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760048091; x=1760652891;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=xcToJp8RQ9qXjnEHxRgnCrYmy7oeDmU5XoLscdv3/S0=;
 b=lEiOpfee8YEQxPcX9tuGrqWy/Wh4QeAm5UZDX+GZpRcEBfdysUReI/gsKYhVws1xCE
 BF2PgV2qCbrXB+WWuuWw7VTdwB818L47GhMtPd5GHa0DbeoKdUAcy9m7QsoR+EO6yaPe
 Fmcy+u5qBUbXigEPbX6gva7FDtf3fBecw4RdVNT/DBkuClPN49vRrf9KBsaCTIbz0xtF
 0orlrj9RewEYfnlakeojJSqYlLzSSz82RFjI7bBdR4Eid5DgGPwPEpfrViAdoQt8/IAT
 aU3kwGu5IB5clhymniv8oYhiAe3OHs2cM2Zxt4Q/u084lgsNJrJzRDXuDUH3adZgTmnI
 LzUQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCX35z1uEDNefFNgsLgzQSXUnZIrjKcN24qbs+XuyJD8TtIVKhpMwfbyvl59PKGQ73QyKl6QQg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YzjtV4RG1eM7hisK66/izY74FzSugYI9T/bLJCbHPJGbLmfArOM
 ZxdvcRZHKvk6hchYEv8Ep9Ku7pQJdkwgjIJD9Y6uh0anFdUq8v+PGZkrsqo6jLm/zTLYmxfZ3wa
 OiYiTe+1ToqbvbSWsvZKGmQ7E4WOtLejIhBmS
X-Gm-Gg: ASbGnctZhPk7Jt0V5sPiZ0nFjzBK83CrFAmyCATzFpqw/Lxy4bcAn0J0Z/mSEDTaDrp
 rZhATPEKbAPSsoPI4+yDGgsGT9xc5jifN5Bk9nkxL2Sv789ctBqbeTxLZ57T085pRAcTcASCbVG
 qY8/lBSyRR6bmxPCEWsXsmrRmdoqThzQevx03l/TNNOaJp5RwRaNqF8WtAdFZgpp3xiDgbirCIP
 0SqiDc2Mv4Apa0BFa5Fd6ZK3wNr5bQ=
X-Google-Smtp-Source: AGHT+IGRXFPEDOlAsNDxVM+bV9u2VnM6UVGz7b9ShsUPpqml85FglrafRZ544+6redfWVB773fariqNAPuo4HuJ7pXg=
X-Received: by 2002:a05:6808:118e:b0:43f:1ae3:78f1 with SMTP id
 5614622812f47-4417b2efeffmr3856008b6e.20.1760048091086; Thu, 09 Oct 2025
 15:14:51 -0700 (PDT)
MIME-Version: 1.0
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN>
 <CALDnm52+4ZDFjr0tE9puPb5CyXH_As+WCOKELCzGg-rPq8WKsA@HIDDEN>
 <ierh5w7zvfd.fsf_-_@HIDDEN>
In-Reply-To: <ierh5w7zvfd.fsf_-_@HIDDEN>
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Date: Thu, 9 Oct 2025 23:16:02 +0100
X-Gm-Features: AS18NWCl800fx4HVZk2CW7VQwt0zx-IkdjFVVmBWIipY2hW2otGPh6UMuzZwLXQ
Message-ID: <CALDnm52cFeBkEGKC2kH=A0eofATN72_-C37CBXXaieLNjFojFA@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000041c4210640c12153"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--00000000000041c4210640c12153
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thu, Oct 9, 2025 at 9:12=E2=80=AFPM Spencer Baugh <sbaugh@HIDDEN=
> wrote:

>
> > Let's have the very first frame created make the decision, for example,
> _regardless_ of whether Flymake was loaded or enabled
> > when that happened. This will cover 95% of cases, I estimate.
>
> Alas, that fails if the user uses "emacs --daemon" and graphical frames,
> because the first (pseudo-)frame created is non-graphical.  I think that
> is a pretty common configuration.
>

I use that setup! No idea what a pseudo-frame is, but see the patch
after my sig. It works how I envisioned it for these 4 cases.

emacs -Q -nw
emacs -Q
emacs -Q --daemon, followed by a first emacsclient -c
emacs -Q --daemon, followed by a first emacsclient -tty

I'm sure you guys can implement something better as long as
you know where you want to draw the unavoidable (according
to you) compromise.  I think the first ever frame the user sees is
a good such place. There are others more sophisticated, probably.
The current situation, OTOH, is a bit untenable IMO.

Jo=C3=A3o

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 8b6d477c385..80a5beeeead 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -185,7 +185,7 @@ flymake-fringe-indicator-position
  (const right-fringe)
  (const :tag "No fringe indicators" nil)))

-(defcustom flymake-indicator-type 'fringes
+(defcustom flymake-indicator-type (if window-system 'fringes 'margins)
   "Indicate which indicator type to use for display errors.

 The value can be nil (don't indicate errors but just highlight them),
@@ -202,6 +202,18 @@ flymake-indicator-type
                  (const :tag "Use Margins" margins)
                  (const :tag "No indicators" nil)))

+
+;;;###autoload
+(progn
+  (defun flymake--set-flymake-indicator-type (frame)
+    (setq flymake-indicator-type
+          (if (alist-get 'tty (frame-parameters frame))
+              'margins 'fringes))
+    (remove-hook 'after-make-frame-functions
+                 'flymake--set-flymake-indicator-type))
+  (add-hook 'after-make-frame-functions
+            'flymake--set-flymake-indicator-type))
+
 (defcustom flymake-margin-indicators-string
   '((error "!!" compilation-error)
     (warning "!" compilation-warning)

--00000000000041c4210640c12153
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">On Thu, Oct 9, 2025 at 9:12=E2=80=AFPM Sp=
encer Baugh &lt;<a href=3D"mailto:sbaugh@HIDDEN">sbaugh@janestreet.=
com</a>&gt; wrote:</div><div class=3D"gmail_quote gmail_quote_container"><b=
lockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-le=
ft:1px solid rgb(204,204,204);padding-left:1ex"><br>
&gt; Let&#39;s have the very first frame created make the decision, for exa=
mple, _regardless_ of whether Flymake was loaded or enabled<br>
&gt; when that happened. This will cover 95% of cases, I estimate.<br>
<br>
Alas, that fails if the user uses &quot;emacs --daemon&quot; and graphical =
frames,<br>
because the first (pseudo-)frame created is non-graphical.=C2=A0 I think th=
at<br>
is a pretty common configuration.<br>
</blockquote></div><div><br></div><div></div><div></div><div>I use that set=
up! No idea what a pseudo-frame is, but see the patch=C2=A0</div><div>after=
 my sig. It works how I envisioned it for these 4 cases.</div><div><br></di=
v><div>emacs -Q -nw</div><div>emacs -Q</div><div>emacs -Q --daemon, followe=
d by a first emacsclient -c</div><div>emacs -Q --daemon, followed by a firs=
t emacsclient -tty</div><div><br></div><div>I&#39;m sure you guys can imple=
ment something better as long as</div><div>you know where you want to draw =
the unavoidable (according</div><div>to you) compromise.=C2=A0 I think the =
first ever frame the user sees is=C2=A0</div><div>a=C2=A0good such place. T=
here are others more sophisticated, probably.</div><div>The current=C2=A0si=
tuation, OTOH, is a bit untenable IMO.</div><div><br></div><div>Jo=C3=A3o</=
div><div><br>diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymak=
e.el<br>index 8b6d477c385..80a5beeeead 100644<br>--- a/lisp/progmodes/flyma=
ke.el<br>+++ b/lisp/progmodes/flymake.el<br>@@ -185,7 +185,7 @@ flymake-fri=
nge-indicator-position<br>=C2=A0		 (const right-fringe)<br>=C2=A0		 (const =
:tag &quot;No fringe indicators&quot; nil)))<br>=C2=A0<br>-(defcustom flyma=
ke-indicator-type &#39;fringes<br>+(defcustom flymake-indicator-type (if wi=
ndow-system &#39;fringes &#39;margins)<br>=C2=A0 =C2=A0&quot;Indicate which=
 indicator type to use for display errors.<br>=C2=A0<br>=C2=A0The value can=
 be nil (don&#39;t indicate errors but just highlight them),<br>@@ -202,6 +=
202,18 @@ flymake-indicator-type<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 (const :tag &quot;Use Margins&quot; margins)<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (const :tag =
&quot;No indicators&quot; nil)))<br>=C2=A0<br>+<br>+;;;###autoload<br>+(pro=
gn<br>+ =C2=A0(defun flymake--set-flymake-indicator-type (frame)<br>+ =C2=
=A0 =C2=A0(setq flymake-indicator-type<br>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0(if (alist-get &#39;tty (frame-parameters frame))<br>+ =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&#39;margins &#39;fringes))<br>+ =C2=A0 =C2=
=A0(remove-hook &#39;after-make-frame-functions<br>+ =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &#39;flymake--set-flymake-indicator-type=
))<br>+ =C2=A0(add-hook &#39;after-make-frame-functions<br>+ =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0&#39;flymake--set-flymake-indicator-type))<br>+<=
br>=C2=A0(defcustom flymake-margin-indicators-string<br>=C2=A0 =C2=A0&#39;(=
(error &quot;!!&quot; compilation-error)<br>=C2=A0 =C2=A0 =C2=A0(warning &q=
uot;!&quot; compilation-warning)</div></div>

--00000000000041c4210640c12153--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 10 Oct 2025 06:30:02 +0000
Resent-Message-ID: <handler.77313.B77313.176007778430272 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: sbaugh@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176007778430272
          (code B ref 77313); Fri, 10 Oct 2025 06:30:02 +0000
Received: (at 77313) by debbugs.gnu.org; 10 Oct 2025 06:29:44 +0000
Received: from localhost ([127.0.0.1]:40823 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v76dL-0007sC-RW
	for submit <at> debbugs.gnu.org; Fri, 10 Oct 2025 02:29:44 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50606)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v76dE-0007rM-Ll
 for 77313 <at> debbugs.gnu.org; Fri, 10 Oct 2025 02:29:41 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1v76d7-0004i0-O4; Fri, 10 Oct 2025 02:29:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=hedJ1Zfgxtth1gzHSjzl0TkeCugUmNLpyaLTqTeFz+w=; b=XARPEbtcXVZv
 j7T6D9psP39dytVC67K/Er4OBC3wzT9pqbtkOUqoKJxVx05UbhflaaP0/zxljSsiXF9IX2W2XphOt
 tNvTwJb5+w5dBRnwhjNdVB/78WAmRD1pLuoojeGfXn9KtGGJJdbmeYaaRAATKEMMqlCOPvv1wwKYK
 utyzzsgV0sQLJTokvJTlIDb98fOnS2UERaWzNK8RI1ZEsJCl6bIBQ6IiZ0ZmtoTeOLe7qoBVmv6oq
 QbHSoh9D6CEXDkU+/xnXE/2ch/r4KlZm+gtBYzACQW1MESaHqRqoUC66+P+NFqTDLiZc4ZMLFqjyM
 jDRYGHquJb1NLCkUvPxjKQ==;
Date: Fri, 10 Oct 2025 09:29:26 +0300
Message-Id: <86o6qf8e2h.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <878qhkaur0.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 09 Oct 2025 19:46:11 +0300)
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: sbaugh@HIDDEN,  dmitry@HIDDEN,  joaotavora@HIDDEN,
>   77313 <at> debbugs.gnu.org
> Date: Thu, 09 Oct 2025 19:46:11 +0300
> 
> >> > Can Flymake use per-window overlays?  Then each window could have the
> >> > margin display specific to that window.
> >> 
> >> Adding per-window overlays will limit usability of Flymake that will
> >> hide indicators in the same buffer displayed in other windows.
> >
> > No, it will need that Flymake defines a (possibly) slightly different
> > overlay for each window of those which display a buffer.
> 
> For example, the user splits the selected window, so that
> two windows are displaying the same buffer.  How can
> Flymake define a different overlay for the new window?

Flymake will need to go over the overlays and add an identical overlay
with the new window's ID.  This processing will have to be done in one
of the hooks described in "Window Hooks" node of the ELisp manual.

> >> While as the same time it doesn't solve the original problem
> >> because after hiding margin indicators on a graphical display,
> >> it can't automatically enable fringe indicators.
> >
> > Sorry, I don't think I understand the scenario.  Can you describe this
> > in more detail?  Why would hiding margin indicators require
> > automatically enabling fringe indicators?
> 
> For example, the user enables flymake-mode on a TTY frame,
> then opens the same buffer on a graphical frame.
> How can the existing buffer switch from displaying
> the indicators in margins to displaying the indicators
> in fringes?

When the buffer is shown in any window it wasn't before, the
corresponding window hook will need to run Flymake function which adds
overlays specific to that window, and that will take the GUI/TTY
nature of the window into account.

Deletion of windows will need to delete the overlays specific to those
windows.

Yes, this makes the processing more expensive, and will increase the
number of overlays in buffers shown in many windows.  But I see no
other way of doing TRT in this case.

The only alternative is to disable the indicators if the fringes are
not available on the frame or window.  If we don't mind punting like
that, we could go this easier way.  This means we will show the fringe
indicators only in GUI windows that have the fringes; users who want
the indicators in all windows will have to customize the option to use
the margin, and we will then use the margin in all windows.  If the
user customizes to use the fringe, the indicator will simply not be
shown in windows without fringes.  We will need to carefully consider
the default value if we decide to do it this way, and probably use the
margin as the default.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 10 Oct 2025 06:43:02 +0000
Resent-Message-ID: <handler.77313.B77313.1760078568980 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.1760078568980
          (code B ref 77313); Fri, 10 Oct 2025 06:43:02 +0000
Received: (at 77313) by debbugs.gnu.org; 10 Oct 2025 06:42:48 +0000
Received: from localhost ([127.0.0.1]:40856 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v76pz-0000Fj-2U
	for submit <at> debbugs.gnu.org; Fri, 10 Oct 2025 02:42:48 -0400
Received: from mout-p-101.mailbox.org ([80.241.56.151]:34026)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v76pS-0000Eh-H9
 for 77313 <at> debbugs.gnu.org; Fri, 10 Oct 2025 02:42:17 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4cjcbs2lN6z9sv4;
 Fri, 10 Oct 2025 08:42:01 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760078521;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=DZYtS3WttDOzuTqmRYyLqwjlOaHBYxbnY66zn7+jao0=;
 b=XdEF2QVM2LN9ofFYeZpNfSbbuxyZRs9J9wsYlkzGzDviLt8yuvH3CxCSYKOb0ZoQkwVnI8
 PiW+pQx73tFj39vJ4FrbmNhbiiJNsm+S1YNqe8Q9B5PG9cRYaDOfo8fueCp/dp6HM83r1T
 a3ocFqTmDNJhbXgqAGxE53Nv7c20P4bu5dXLtCiIhUXElAbbhQ8REfw/GJXQ0m9VXvCCAp
 hNzgqvT5riOoOFPp/abggHKSwGXpJ0URh16+f3DsU4PXVWCJInKY/ZJReIXOpOZT+vvwsg
 m2YUk1/xj3nPq12Ai0BvMvoneDzZy42nuy3woLjpTAoaiTaqm1pWmkr7/Tj9uQ==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::102 as permitted sender)
 smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <CALDnm52cFeBkEGKC2kH=A0eofATN72_-C37CBXXaieLNjFojFA@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN>
 <CALDnm52+4ZDFjr0tE9puPb5CyXH_As+WCOKELCzGg-rPq8WKsA@HIDDEN>
 <ierh5w7zvfd.fsf_-_@HIDDEN>
 <CALDnm52cFeBkEGKC2kH=A0eofATN72_-C37CBXXaieLNjFojFA@HIDDEN>
Date: Fri, 10 Oct 2025 09:31:23 +0300
Message-ID: <87y0pje090.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4cjcbs2lN6z9sv4
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>     Alas, that fails if the user uses "emacs --daemon" and graphical
>>     frames,
>>     because the first (pseudo-)frame created is non-graphical.  I think
>>     that
>>     is a pretty common configuration.
>
> I use that setup! No idea what a pseudo-frame is,

The daemon's initial frame is a virtual pseudo-frame
that is not displayed anywhere.  Usually it can be detected as

  (and (daemonp) (not (frame-parameter nil 'client)))

> but see the patch after my sig.
> It works how I envisioned it for these 4 cases.
>
> emacs -Q -nw
> emacs -Q
> emacs -Q --daemon, followed by a first emacsclient -c
> emacs -Q --daemon, followed by a first emacsclient -tty
>
> I'm sure you guys can implement something better as long as
> you know where you want to draw the unavoidable (according
> to you) compromise.  I think the first ever frame the user sees is 
> a good such place. There are others more sophisticated, probably.
> The current situation, OTOH, is a bit untenable IMO.

I think using 'after-make-frame-functions' is a good compromise.
Maybe better to add this hook only after the first activation of
'flymake-mode'.  And on the first activation it could also check
the selected frame as well.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 10 Oct 2025 07:37:02 +0000
Resent-Message-ID: <handler.77313.B77313.176008176210781 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: sbaugh@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176008176210781
          (code B ref 77313); Fri, 10 Oct 2025 07:37:02 +0000
Received: (at 77313) by debbugs.gnu.org; 10 Oct 2025 07:36:02 +0000
Received: from localhost ([127.0.0.1]:40946 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v77fW-0002ni-5i
	for submit <at> debbugs.gnu.org; Fri, 10 Oct 2025 03:36:02 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47780)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v77fQ-0002nF-IZ
 for 77313 <at> debbugs.gnu.org; Fri, 10 Oct 2025 03:35:58 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1v77fG-0000aq-NZ; Fri, 10 Oct 2025 03:35:46 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=ajSkAkpPw6YQ9MnZ9NPLj3Htot0Ouxybk63MjWAYPwU=; b=PHeoajGhzyW6
 XBpWSDNgO5Gyf09s6w/q7/VeCLANlx0Ei2UrL9t+QfhW3xqCgWN5UUQHLQCrNnelFEzIAfMGaGRuv
 Rr41IfPGS+xHZ74sqaTqMiCUlqjrXLOJclsoWAz5vnzvoF6KAA3LbW8r2bfJMyBSM4lOUsE03JicR
 x53ywyLMHiuMVmbIFQLe3cd9REhvdAm7UmTQwvcVTBRz6R9l1SihBxXeq6zISDTOXOuEsZ3KSNl7b
 glab3p+wzTkqxkXS0LtQEreIFR/35gwAOJ9bx5iIK4XHfi5px2b8PEbc4vWEB95AzOAfKSCMz8NT4
 wn4xgw075R+tulth6rKMFw==;
Date: Fri, 10 Oct 2025 10:35:43 +0300
Message-Id: <86bjmf8b00.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87y0pje090.fsf@HIDDEN> (message from Juri Linkov on
 Fri, 10 Oct 2025 09:31:23 +0300)
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN>
 <CALDnm52+4ZDFjr0tE9puPb5CyXH_As+WCOKELCzGg-rPq8WKsA@HIDDEN>
 <ierh5w7zvfd.fsf_-_@HIDDEN>
 <CALDnm52cFeBkEGKC2kH=A0eofATN72_-C37CBXXaieLNjFojFA@HIDDEN>
 <87y0pje090.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: Spencer Baugh <sbaugh@HIDDEN>, 77313 <at> debbugs.gnu.org
> From: Juri Linkov <juri@HIDDEN>
> Date: Fri, 10 Oct 2025 09:31:23 +0300
> 
> >>     Alas, that fails if the user uses "emacs --daemon" and graphical
> >>     frames,
> >>     because the first (pseudo-)frame created is non-graphical.  I think
> >>     that
> >>     is a pretty common configuration.
> >
> > I use that setup! No idea what a pseudo-frame is,
> 
> The daemon's initial frame is a virtual pseudo-frame
> that is not displayed anywhere.  Usually it can be detected as
> 
>   (and (daemonp) (not (frame-parameter nil 'client)))
> 
> > but see the patch after my sig.
> > It works how I envisioned it for these 4 cases.
> >
> > emacs -Q -nw
> > emacs -Q
> > emacs -Q --daemon, followed by a first emacsclient -c
> > emacs -Q --daemon, followed by a first emacsclient -tty
> >
> > I'm sure you guys can implement something better as long as
> > you know where you want to draw the unavoidable (according
> > to you) compromise.  I think the first ever frame the user sees is 
> > a good such place. There are others more sophisticated, probably.
> > The current situation, OTOH, is a bit untenable IMO.
> 
> I think using 'after-make-frame-functions' is a good compromise.
> Maybe better to add this hook only after the first activation of
> 'flymake-mode'.  And on the first activation it could also check
> the selected frame as well.

Note that there's also server-after-make-frame-hook, which is specific
to client frames.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 10 Oct 2025 08:11:02 +0000
Resent-Message-ID: <handler.77313.B77313.176008384816314 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176008384816314
          (code B ref 77313); Fri, 10 Oct 2025 08:11:02 +0000
Received: (at 77313) by debbugs.gnu.org; 10 Oct 2025 08:10:48 +0000
Received: from localhost ([127.0.0.1]:41003 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v78D9-0004F3-Du
	for submit <at> debbugs.gnu.org; Fri, 10 Oct 2025 04:10:47 -0400
Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:47186)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1v78D5-0004En-HH
 for 77313 <at> debbugs.gnu.org; Fri, 10 Oct 2025 04:10:44 -0400
Received: by mail-wm1-x32a.google.com with SMTP id
 5b1f17b1804b1-46e34052bb7so20991125e9.2
 for <77313 <at> debbugs.gnu.org>; Fri, 10 Oct 2025 01:10:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760083836; x=1760688636; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=gva+LHLdvvXjbQDOKP/GHKrnG+JFQE7/mV+rcrYT8e8=;
 b=JUSeJr+lh4JVGntoCozoL+vvn6v0PESdJsj72hjdMm689WUgdkt/7nzZxkNoGOEQOc
 p1f505fZgH97NFJd298fTj7Xw5nSCDcZGP2UNvCvZfs7+dSOcEu+gND85cFXtmHOZ47f
 O7Jwqm1lRzclLMjG0q2pzKb/N/jF8diOjIhphuZjoYu/9RR0kUp1yAR+5JA0pf5uJgPu
 V9J6380tsW2JKKY6bSpzMB9LwSsqGKjFeYK5VtVb1qlGCnYdPZRg7KZudWChTnnkSni4
 nTZFTlseQ15QGSkl6+3rh4EQmugl80Cf4YZDQKg5PuSH064nqaeym9/K51gFOtTD/5ac
 bozA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760083836; x=1760688636;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=gva+LHLdvvXjbQDOKP/GHKrnG+JFQE7/mV+rcrYT8e8=;
 b=c22lGXJbBRhZH55ZQ87p2YJk7Ica3OsRCA6mu6w2j6tEQQ9tgM/C0jzpkbhmL7F6XD
 FHAjS5jeJMn3iL3wr0IrZ1jN1AmnIIvTFpjP+GGmyrDPyabfIuhP3wDmsxAnGe78N64i
 T77W0Xn+u0bG7MS1UPfnZATkbuF2yMjItD/24C3nv5Brx0TNeWMl3f0C5+Z55yHNHJPD
 x5PdsLkr2kbp3k7OHlkr+O8kWqeNWeJq/QevJemwiTIbE4fef8WGYHEwEroUywf8t/2C
 5vWZ0MbF/8u1DATD0wKBrZDbCGSKz7ywbK3U95jSaEXsgHZxjbmdTgY93/Vj2i667xp9
 X/aA==
X-Forwarded-Encrypted: i=1;
 AJvYcCX1Th/kMySRTSBU2QJb5Bfkxm/tOW04CDbEE79UQAWVh1Nl9BhDsgsRDv4s9bb+s4brz6z7Xg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YzRol73dP0Czmw7fI8l78zpdOYt5yPY8yZ2zSuXHKsGikClk+Be
 Xl+iEOm0/edf2aQZd/5IRWO4dHNL3aiBiR5F38Gza/5pGR3F/FGIr6DP+VvGvA==
X-Gm-Gg: ASbGncsp9P9kgEd2npQULWgIeczBXFhy2OVeEjs+5b9zwugm8Xq5I+mBA/9/TcEeE6t
 WYdpJaxOd0UZzYYjrVrkeWPvsQPO02CnNFob4tW//4+5HuxhB3wacgCrRzjPpEvdSY6b2LNu2Cb
 KHGr+pnpbFpxDgC0n+5WKZPr76SysGIS0dc/UjuZ20CVpfBh6o0Oa95IWKE3wi9F4VB1XQvn944
 iwnOkXNrdkuWep/eoooZpAA6mGGCc2PduPxepsAXYLPtQF/Ljl0d7GXGNDGzitENNVN1su+qC4h
 4PvClAcyANUWbutPlvl3fk57Yx8eeziDdPdQx6HzMb9FTzHcFmW1IhpTp39b2PI0cJqjwV1C+fc
 XC0Y3IvHhlE/HqI1q4SFPla4M1cX3ZtODE47RCInX90RFw863pnGYfmYQeLk=
X-Google-Smtp-Source: AGHT+IGlJ56asFyqVW4/VcUpNRDdGfEgKjmNxUsigrmUJlXNTu8BxUkYTfeQCJV4/grW1nUI5zVcEg==
X-Received: by 2002:a05:6000:250a:b0:3ec:db0a:464c with SMTP id
 ffacd0b85a97d-4266e8d8f47mr7528572f8f.44.1760083835807; 
 Fri, 10 Oct 2025 01:10:35 -0700 (PDT)
Received: from krug (87-196-72-166.net.novis.pt. [87.196.72.166])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-426ce5e0e70sm2875565f8f.40.2025.10.10.01.10.34
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 10 Oct 2025 01:10:35 -0700 (PDT)
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
In-Reply-To: <87y0pje090.fsf@HIDDEN>
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN>
 <CALDnm52+4ZDFjr0tE9puPb5CyXH_As+WCOKELCzGg-rPq8WKsA@HIDDEN>
 <ierh5w7zvfd.fsf_-_@HIDDEN>
 <CALDnm52cFeBkEGKC2kH=A0eofATN72_-C37CBXXaieLNjFojFA@HIDDEN>
 <87y0pje090.fsf@HIDDEN>
Date: Fri, 10 Oct 2025 09:11:56 +0100
Message-ID: <871pnbdvlf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

> The daemon's initial frame is a virtual pseudo-frame
> that is not displayed anywhere.  Usually it can be detected as
>
>   (and (daemonp) (not (frame-parameter nil 'client)))

Thanks.  It doesn't seem to run the after-make-frame-functions though,
so it doesn't matter.

>
>> but see the patch after my sig.
>> It works how I envisioned it for these 4 cases.
>>
>> emacs -Q -nw
>> emacs -Q
>> emacs -Q --daemon, followed by a first emacsclient -c
>> emacs -Q --daemon, followed by a first emacsclient -tty
>>
>> I'm sure you guys can implement something better as long as
>> you know where you want to draw the unavoidable (according
>> to you) compromise.  I think the first ever frame the user sees is=20
>> a good such place. There are others more sophisticated, probably.
>> The current situation, OTOH, is a bit untenable IMO.
>
> I think using 'after-make-frame-functions' is a good compromise.
> Maybe better to add this hook only after the first activation of
> 'flymake-mode'.  And on the first activation it could also check
> the selected frame as well.

Could be.  It's slightly more subtlety for the user to reason about, as
the criteria would become somewhat more complicated, but again it would
serve 95% of use cases.  And the patch would become simpler (no
autoloads needed, I think).

So go ahead,
Jo=C3=A3o




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 10 Oct 2025 14:59:01 +0000
Resent-Message-ID: <handler.77313.B77313.17601082899264 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17601082899264
          (code B ref 77313); Fri, 10 Oct 2025 14:59:01 +0000
Received: (at 77313) by debbugs.gnu.org; 10 Oct 2025 14:58:09 +0000
Received: from localhost ([127.0.0.1]:42364 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v7EZM-0002PH-Cm
	for submit <at> debbugs.gnu.org; Fri, 10 Oct 2025 10:58:09 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:55113)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v7EZE-0002Nz-2I
 for 77313 <at> debbugs.gnu.org; Fri, 10 Oct 2025 10:58:02 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <87y0pje090.fsf@HIDDEN> (Juri Linkov's message of "Fri, 
 10 Oct 2025 09:31:23 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN>
 <CALDnm52+4ZDFjr0tE9puPb5CyXH_As+WCOKELCzGg-rPq8WKsA@HIDDEN>
 <ierh5w7zvfd.fsf_-_@HIDDEN>
 <CALDnm52cFeBkEGKC2kH=A0eofATN72_-C37CBXXaieLNjFojFA@HIDDEN>
 <87y0pje090.fsf@HIDDEN>
Date: Fri, 10 Oct 2025 10:57:53 -0400
Message-ID: <ierecraztvy.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760108273;
 bh=g/lzJVGY4QOuGauiMnDwDD99HBLCn0+x+tsCgPcv64o=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=Aq16mu6HKMKyXzebOfI26c6g6WSnpVWvfZXakzPj0BaToZhO0eRYcsba3x0c/pa1U
 cS9vXiGD8vYslLN1Mo47xh0HVmf5TTyEK53lAUl9Rxx+MYIVVfgRZz7ZF6Crp68E8l
 UQ7d8xTq+uObYTsiDs6rIbAXiHlPPr2rtCYPQ05qtluruqkNoYxGY3zPsvBez0Azoq
 AWBqnemJ4IG0h3akYoPdM7x6mYnZdKr+bA103U+Fdu9BxVHXPfnVrFVipcFr6Wn112
 fmHkS8ZsZZbU8FB/S7holIguAkmXuTgYQWu39/LUTohr5sPA6mqVvUTu72r6MBIlYM
 YYA9xba+g01/A==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:
>> but see the patch after my sig.
>> It works how I envisioned it for these 4 cases.
>>
>> emacs -Q -nw
>> emacs -Q
>> emacs -Q --daemon, followed by a first emacsclient -c
>> emacs -Q --daemon, followed by a first emacsclient -tty
>>
>> I'm sure you guys can implement something better as long as
>> you know where you want to draw the unavoidable (according
>> to you) compromise.  I think the first ever frame the user sees is 
>> a good such place. There are others more sophisticated, probably.
>> The current situation, OTOH, is a bit untenable IMO.
>
> I think using 'after-make-frame-functions' is a good compromise.
> Maybe better to add this hook only after the first activation of
> 'flymake-mode'.  And on the first activation it could also check
> the selected frame as well.

If the user's config opens a buffer with flymake-mode before the first
real frame is created, that won't work :(

(That was the cause of a specific bug report I received)




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 10 Oct 2025 15:08:01 +0000
Resent-Message-ID: <handler.77313.B77313.176010884011244 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: dmitry@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176010884011244
          (code B ref 77313); Fri, 10 Oct 2025 15:08:01 +0000
Received: (at 77313) by debbugs.gnu.org; 10 Oct 2025 15:07:20 +0000
Received: from localhost ([127.0.0.1]:42392 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v7EiF-0002vH-LU
	for submit <at> debbugs.gnu.org; Fri, 10 Oct 2025 11:07:20 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:46201)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v7Ei7-0002uP-JQ
 for 77313 <at> debbugs.gnu.org; Fri, 10 Oct 2025 11:07:15 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <86o6qf8e2h.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 10 Oct
 2025 09:29:26 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN>
Date: Fri, 10 Oct 2025 11:07:06 -0400
Message-ID: <ierbjmeztgl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760108826;
 bh=n8JBTjP3wxMfOJTj3w3dqEChZC7Q/8wWIYx/EqBszOQ=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=ycnqghxjW60X6xlmSDZFTwQFAdojSaXlEf3JUiGJnhtpPyc6SrMQBpZxqvAHmKqYG
 zgHYeWFHl1Keb4qKOkPyM49+U4JdMQdUK+S7T6lcPk/KOpbeDYErOTqsODv8LxKnYt
 XB+Gy4XZE/rEJV9Bp0w7coKrZb1ZyATnI0Xeagqmb5nNPg3LUxh8Rf6me2Kx54a82T
 MXTOBdGbH7hxpw2j0J6ZD0glfYI79A4ADTXyw/LKokfKMmhRZZFTd7ZR+TOLEbXusK
 /oQAA88KLbBNq6yGbWZgGwAV7/NTB4jSeiTGLBPZ/YgekK3aG1nSgxmTrq6PX+VCST
 Y4L5Uo/m2oTsg==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Juri Linkov <juri@HIDDEN>
>> Cc: sbaugh@HIDDEN,  dmitry@HIDDEN,  joaotavora@HIDDEN,
>>   77313 <at> debbugs.gnu.org
>> Date: Thu, 09 Oct 2025 19:46:11 +0300
>> 
>> >> > Can Flymake use per-window overlays?  Then each window could have the
>> >> > margin display specific to that window.
>> >> 
>> >> Adding per-window overlays will limit usability of Flymake that will
>> >> hide indicators in the same buffer displayed in other windows.
>> >
>> > No, it will need that Flymake defines a (possibly) slightly different
>> > overlay for each window of those which display a buffer.
>> 
>> For example, the user splits the selected window, so that
>> two windows are displaying the same buffer.  How can
>> Flymake define a different overlay for the new window?
>
> Flymake will need to go over the overlays and add an identical overlay
> with the new window's ID.  This processing will have to be done in one
> of the hooks described in "Window Hooks" node of the ELisp manual.

I guess with window-buffer-change-functions?

This would be much faster and less complex if the 'window overlay
property could be a list.  Or better yet, a symbol containing a list.
Then we would not need to make new overlays when a new window displays
the buffer: we would just need to add the new window to the list.

Is that a feature we could add?  It seems like it would be something
generally useful.

>> >> While as the same time it doesn't solve the original problem
>> >> because after hiding margin indicators on a graphical display,
>> >> it can't automatically enable fringe indicators.
>> >
>> > Sorry, I don't think I understand the scenario.  Can you describe this
>> > in more detail?  Why would hiding margin indicators require
>> > automatically enabling fringe indicators?
>> 
>> For example, the user enables flymake-mode on a TTY frame,
>> then opens the same buffer on a graphical frame.
>> How can the existing buffer switch from displaying
>> the indicators in margins to displaying the indicators
>> in fringes?
>
> When the buffer is shown in any window it wasn't before, the
> corresponding window hook will need to run Flymake function which adds
> overlays specific to that window, and that will take the GUI/TTY
> nature of the window into account.

Again with window-buffer-change-functions, I suppose.

> Deletion of windows will need to delete the overlays specific to those
> windows.

What hook would be used for that?  Obviously
window-configuration-change-hook could do it, but is there a better one?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 10 Oct 2025 16:40:01 +0000
Resent-Message-ID: <handler.77313.B77313.176011439228107 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176011439228107
          (code B ref 77313); Fri, 10 Oct 2025 16:40:01 +0000
Received: (at 77313) by debbugs.gnu.org; 10 Oct 2025 16:39:52 +0000
Received: from localhost ([127.0.0.1]:42619 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v7G9m-0007JF-Vt
	for submit <at> debbugs.gnu.org; Fri, 10 Oct 2025 12:39:52 -0400
Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:52487)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1v7G9Y-0007Ie-GF
 for 77313 <at> debbugs.gnu.org; Fri, 10 Oct 2025 12:39:41 -0400
Received: by mail-wr1-x433.google.com with SMTP id
 ffacd0b85a97d-3f2ae6fadb4so2633709f8f.1
 for <77313 <at> debbugs.gnu.org>; Fri, 10 Oct 2025 09:39:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760114367; x=1760719167; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=G8bXrnnvK4BGqSyUwl6il1JsN2ZxcM5rjt4twadE87M=;
 b=gmZsZVfFkJNF3W/dJ4GvEWs8mIcDWvrnK5Vt1XPlgAl+Dsva8AmV1r1qEU4af5LA/b
 fmzBBAvj8Etr/XtTUT9dg7T3BjgIYMxfWHyB+kPQVmvpH++04TGUTShuEJWn3rO5mxyK
 Ty5mKdLdn0qJNRceXPJ4iTU/2F2D+yD9IblhKKdFqnfXIu/DAdvRurhjB+1qWQKcZAV/
 rcEDkFQg4tOC+HsBifxK4CGFm+nAkREJJDlFY/8YYaLeBncl/sAYXNJniaTVD+NHCuHd
 p6UWRGBc0PPYVHbRWd85eWEqiZUINDKMNMCoyvj01oblhnrCKK5CJqm5jqE1c3FJhdyC
 WLLg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760114367; x=1760719167;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=G8bXrnnvK4BGqSyUwl6il1JsN2ZxcM5rjt4twadE87M=;
 b=HcwfKtElJuLPDxr59ItixOBTLhE6vFrKaTncv6BjO+750n7CIzNNMbXB91piBQ5nsv
 CFQ7ShSV3GaiqJO48KSJ/uLQT8O1iTT/7ZEF6daVCnzvAH1nbgpS2WbfIFd3cv2Pl8D7
 FE4AxxY2d6xe7wwMF9bXMXfhwWLYgnRYyzF7VVYHVAOK6PBc+dHcacdswVV4BvHPw+qw
 iig39dChnee7Wqc5qPcbhykcQRnZ4dG5uQOW6Oj86V7ZNeaf5ZoXJ/ERP8o+cunkh3YI
 ELUFrEzBVsJmLyuIGht5OKNbdmvX6OLRUeg1uQmw6dlg2zrr3P7t0PWXLgiBTzhQCIDF
 P3iA==
X-Forwarded-Encrypted: i=1;
 AJvYcCUtk/QcnZoCq7hWoCeSttWv3p6cNZYqlVoY5nT3liUMMlGs7W9RnEXh1ZegM/OFN3Ix/rqG0A==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YyDdQIrVSPpTES7PYHjZ6Ahko7dRiAs1D92mtKCcBj9S3qhOkQ7
 QmNlqyOBKIDndOrkf8NXrFs1LvMvaOP7JICZk8s5jEquDjDr6s7h87H2r5gbVw==
X-Gm-Gg: ASbGncv4gyC6sHnF+dHEX+MOmxRioAq2KxGy5YB6ng6n6nlf4jVnfSoI8o2Zz1PjQeL
 krk+tV1q6kzcDdb/Dkjg9d8GE1xGrkHbEPH7sIPsanKU9yInO48raSg/GSyoy/BMO7etc3nX0Qe
 WmyAU00AWl0tJgpeJQrvttma1fqRCHa3Ba29sL6414M0K+Vnt5CmlgWUJ8UfeE44JSFNsCSuLQU
 q82iSYf+mKV9os2ptxgdZawCRbNWMPDc8GiYAX1efiCdmXLMlsGVAHScCs4wZeB4BCAWwDs0Etg
 engEP3av3Is09v05ZUZlAuc4CaLNHsMLLblp/Ad4YF7Y3arlgA3b31Fx5vwK+x1120reLvyTivD
 nHFolntPx8LbdEEVBE5xuk8dZFYvTLGx8411/7Uh1c7NHTlFxjq62r92AGsY=
X-Google-Smtp-Source: AGHT+IFhpGmy3nYSvMLtEntqxcmAGk+hebjLrXDn0Ui/Rbh1+3UwVZCoTp30czZwjaHcBV/TRRy+iQ==
X-Received: by 2002:a05:6000:2287:b0:3ec:d80d:e59b with SMTP id
 ffacd0b85a97d-42666ac49camr6976596f8f.10.1760114367294; 
 Fri, 10 Oct 2025 09:39:27 -0700 (PDT)
Received: from krug (87-196-72-166.net.novis.pt. [87.196.72.166])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-426ce5e1024sm5075577f8f.42.2025.10.10.09.39.26
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 10 Oct 2025 09:39:26 -0700 (PDT)
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
In-Reply-To: <ierecraztvy.fsf@HIDDEN>
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN>
 <CALDnm52+4ZDFjr0tE9puPb5CyXH_As+WCOKELCzGg-rPq8WKsA@HIDDEN>
 <ierh5w7zvfd.fsf_-_@HIDDEN>
 <CALDnm52cFeBkEGKC2kH=A0eofATN72_-C37CBXXaieLNjFojFA@HIDDEN>
 <87y0pje090.fsf@HIDDEN> <ierecraztvy.fsf@HIDDEN>
Date: Fri, 10 Oct 2025 17:40:48 +0100
Message-ID: <87o6qer9pr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Spencer Baugh <sbaugh@HIDDEN> writes:

> Juri Linkov <juri@HIDDEN> writes:
>>> but see the patch after my sig.
>>> It works how I envisioned it for these 4 cases.
>>>
>>> emacs -Q -nw
>>> emacs -Q
>>> emacs -Q --daemon, followed by a first emacsclient -c
>>> emacs -Q --daemon, followed by a first emacsclient -tty
>>>
>>> I'm sure you guys can implement something better as long as
>>> you know where you want to draw the unavoidable (according
>>> to you) compromise.  I think the first ever frame the user sees is=20
>>> a good such place. There are others more sophisticated, probably.
>>> The current situation, OTOH, is a bit untenable IMO.
>>
>> I think using 'after-make-frame-functions' is a good compromise.
>> Maybe better to add this hook only after the first activation of
>> 'flymake-mode'.  And on the first activation it could also check
>> the selected frame as well.
>
> If the user's config opens a buffer with flymake-mode before the first
> real frame is created, that won't work :(
>
> (That was the cause of a specific bug report I received)

OK, I think I understand.  One first thing to say is that a config that
non-interactively makes use of Flymake, a visual an interactive
diagnostic annotation tool, is likely just wrong.  Or, at very least,
its existence should not preside over any decisions to introduce
regressions (and I say that knowing perfectly well _my_ config has
plenty of hacks).

Secondly, it's impossible to know the future.  I.e. it's impossible to
know the type of frame that will be created in the future.  But that
need only potentially break the buffers where you or the user have
already started a Flymake annotation process.  For all all other
buffers, both my patch and Juri's vapourware/idealized patch should be
more than fine.

Finally, if you really, really, really want to appease that user's use
case, you can just cleverly not take any decisions until you actually
need to, i.e. until the frame IS created.  For that effect, you may
notice that Flymake actually already has code, in flymake-start, to
defer the actual diagnostic annotation process until certain conditions
are met.  And one of that conditions happens to involve
'window-configuration-change-hooks', as has been suggested here already
(by Juri?).

It's true, it wasn't designed with this particular use case in mind (but
not far off either, consult the regional Git history if you're
interested).  Also, it doesn't understand the "pseudo-frames" I've just
learned about, but it's very easy to introduce that as Yuri suggested,
and I did.  See the patch after my sig.  As far as I can see, it does
exactly what you want and it undoes the regression.

Jo=C3=A3o

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 7426824e60a..717959c2f4c 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -870,6 +870,17 @@ flymake--indicator-overlay-spec
                                             #'flymake-show-buffer-diagnost=
ics)
                                            map))))))))
=20
+(defun flymake--use-margins-maybe ()
+  "Super-special heuristic to guess margins instead of fringes." ; bug#773=
13
+  (when (and (eq flymake-indicator-type 'fringes)
+             (not (cl-case flymake-fringe-indicator-position
+                    (left-fringe (< 0 (nth 0 (window-fringes))))
+                    (right-fringe (< 0 (nth 1 (window-fringes)))))))
+    ;; There are no fringes in the buffer, fallback to margins
+    ;; and auto-resize
+    (setq-local flymake-indicator-type 'margins)
+    (flymake--resize-margins)))
+
 (defun flymake--resize-margins (&optional orig-width)
   "Resize current window margins according to `flymake-margin-indicator-po=
sition'.
 Return to original margin width if ORIG-WIDTH is non-nil."
@@ -1366,8 +1377,10 @@ flymake-start
                     deferred))
         (buffer (current-buffer)))
     (cl-labels
-        ((start-post-command
-          ()
+        ((visible-p ()
+           (and (get-buffer-window (current-buffer))
+                (not (null (frame-parameter nil 'client)))))
+         (start-post-command ()
           (remove-hook 'post-command-hook #'start-post-command
                        nil)
           ;; The buffer may have disappeared already, e.g. because of
@@ -1375,28 +1388,24 @@ flymake-start
           (when (buffer-live-p buffer)
             (with-current-buffer buffer
               (flymake-start (remove 'post-command deferred) force))))
-         (start-on-display
-          ()
+         (start-on-display ()
           (remove-hook 'window-configuration-change-hook #'start-on-display
                        'local)
-          (flymake-start (remove 'on-display deferred) force)))
+          ;; Double check that buffer is actually visible (bug#77313)
+          (flymake-start (if (visible-p) (remove 'on-display deferred) def=
erred)
+                         force)))
       (cond ((and (memq 'post-command deferred)
                   this-command)
              (add-hook 'post-command-hook
                        #'start-post-command
                        'append nil))
             ((and (memq 'on-display deferred)
-                  (not (get-buffer-window (current-buffer))))
+                  (not (visible-p)))
              (add-hook 'window-configuration-change-hook
                        #'start-on-display
                        'append 'local))
             (flymake-mode
-             (when (and (eq flymake-indicator-type 'fringes)
-                        (not (cl-case flymake-fringe-indicator-position
-                               (left-fringe (< 0 (nth 0 (window-fringes))))
-                               (right-fringe (< 0 (nth 1 (window-fringes))=
)))))
-               ;; There are no fringes in the buffer, fallback to margins.
-               (setq-local flymake-indicator-type 'margins))
+             (flymake--use-margins-maybe)
              (setq flymake-check-start-time (float-time))
              (let ((backend-args
                     (and







Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 13 Oct 2025 15:03:01 +0000
Resent-Message-ID: <handler.77313.B77313.176036776620458 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176036776620458
          (code B ref 77313); Mon, 13 Oct 2025 15:03:01 +0000
Received: (at 77313) by debbugs.gnu.org; 13 Oct 2025 15:02:46 +0000
Received: from localhost ([127.0.0.1]:52450 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v8K4U-0005Jt-2n
	for submit <at> debbugs.gnu.org; Mon, 13 Oct 2025 11:02:46 -0400
Received: from mout-p-101.mailbox.org ([80.241.56.151]:37392)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v8K4M-0005JG-VW
 for 77313 <at> debbugs.gnu.org; Mon, 13 Oct 2025 11:02:43 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4clgYx5S4Kz9sWS;
 Mon, 13 Oct 2025 17:02:29 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760367749;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=NCNCrT2YTAbp+Bw5rZujvddfCBspRYVgeCeDLgBcQO4=;
 b=phGrzgNSTitNel2qGEOmkZ49kd4lWAakO5ejlbhi2rOzlHiHxxIhf3dp1NKiPfqS99sSwc
 G2jxt8cwv920Vgxa9eBfXq2L7yLN9yWyt040A1N/GrRseWodqZ/gAr1+0Utt491lge5nhp
 qYlEyKS6CoAwWTGYYX2sNkTBjZiwtuKP6iFs45yaw0oZa7FjWfuzpb+r0SPjfyzv4EY0qL
 yz31d8gGd86N83ACDvv3NjebGAQen8HrHW8kjgmD+fZDmOqjMhBtEI7mdmAEzs/c5CtkvN
 9ccozGg2k7kLZrqo6uLhpAM+X8ITiUnFUJm97eC1gjL8qI4JIHCMcL5zbM7f9Q==
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87o6qer9pr.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN>
 <CALDnm52+4ZDFjr0tE9puPb5CyXH_As+WCOKELCzGg-rPq8WKsA@HIDDEN>
 <ierh5w7zvfd.fsf_-_@HIDDEN>
 <CALDnm52cFeBkEGKC2kH=A0eofATN72_-C37CBXXaieLNjFojFA@HIDDEN>
 <87y0pje090.fsf@HIDDEN> <ierecraztvy.fsf@HIDDEN>
 <87o6qer9pr.fsf@HIDDEN>
Date: Mon, 13 Oct 2025 18:00:37 +0300
Message-ID: <87bjma7ues.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> +        ((visible-p ()
> +           (and (get-buffer-window (current-buffer))
> +                (not (null (frame-parameter nil 'client)))))

Shouldn't this rather be

           ((visible-p ()
              (and (get-buffer-window (current-buffer))
                   (or (not (daemonp))
                       (not (null (frame-parameter nil 'client))))))

i.e. to accept all frames except the daemon's initial frame.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 13 Oct 2025 15:03:02 +0000
Resent-Message-ID: <handler.77313.B77313.176036777420475 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: sbaugh@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176036777420475
          (code B ref 77313); Mon, 13 Oct 2025 15:03:02 +0000
Received: (at 77313) by debbugs.gnu.org; 13 Oct 2025 15:02:54 +0000
Received: from localhost ([127.0.0.1]:52452 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v8K4b-0005KA-Qb
	for submit <at> debbugs.gnu.org; Mon, 13 Oct 2025 11:02:54 -0400
Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]:36324)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v8K4P-0005JW-Mv
 for 77313 <at> debbugs.gnu.org; Mon, 13 Oct 2025 11:02:45 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4clgZ13hH3z9scN;
 Mon, 13 Oct 2025 17:02:33 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760367753;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=uv9r98Z10W04uFZKl8RulfKhGPnRtf1Cp85kVWk/WpE=;
 b=bEfcMAA7S7m60WFjXi2YlFhIx760vhk4RPkvOGnAQabAgBUhafOyvRuO7QWhx9ug4xgaRF
 1lFrQtForDC17kl1gd7A9y41yUEJNGevM074WxJGV4LFtpy+JcrCTSZheFIAhybHQ8jvLV
 ZfCBu6Rx6JwKBR+0pr6k72q8fsBIb5vXBDJ90Zhj4JbNZ9juQMUlEV0xTf8fO9BVgUN+J/
 wmymN/QuRXGnZo5Jtopn+UoMPC6GVH2xmxBBfHMlgxC/dGaa0A0XGTXGpZ24ZLEz53wUkb
 BBwIBBeXmYmMdH4x1jGa7wk0yEvZh6kuJ8/YGdCBmWuQdRBlzXjJ/H8RiMpliw==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::102 as permitted sender)
 smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <86o6qf8e2h.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN>
Date: Mon, 13 Oct 2025 18:01:09 +0300
Message-ID: <871pn67uak.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4clgZ13hH3z9scN
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Yes, this makes the processing more expensive, and will increase the
> number of overlays in buffers shown in many windows.  But I see no
> other way of doing TRT in this case.

When we will implement margin columns in shared margins, then we could
just remove the margin column dedicated to the flymake indicators
when fringes are used.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 13 Oct 2025 15:32:02 +0000
Resent-Message-ID: <handler.77313.B77313.176036949126667 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: sbaugh@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176036949126667
          (code B ref 77313); Mon, 13 Oct 2025 15:32:02 +0000
Received: (at 77313) by debbugs.gnu.org; 13 Oct 2025 15:31:31 +0000
Received: from localhost ([127.0.0.1]:52578 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v8KWI-0006w3-KV
	for submit <at> debbugs.gnu.org; Mon, 13 Oct 2025 11:31:30 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:34224)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v8KWA-0006vY-R5
 for 77313 <at> debbugs.gnu.org; Mon, 13 Oct 2025 11:31:26 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1v8KW1-0005Q8-Sw; Mon, 13 Oct 2025 11:31:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=aVvzIVAlo+MLwNEVcKuWMCP5tKV61/bROeCEX2LUhfA=; b=XrvV0oOtwjDg
 l8asJX1e+zQbyfmAbDcBEcntR+0WGslhLrplZy9vmYdPE31p430SQjHHIGa0YujstrKm7MbiWbKOD
 Raa8urQDZx2XXecl6Zv27zxgTeGBIpmY5STtWYfdY22C3uCRNFd4VIJE59eU+cwak+oyydRHauAH5
 8VqtP3lwBm0QAmhlhutN13ivi4fFKuukfIGpH6QGz8QTwHsfZr9oQ5m4CJWoFHsIcdq9XG5OLo7/M
 DpZWDv5si1WvaiM3zcPpnHEIrE+1VE7f7oIgmc+rzrXmmzdnXhU6AaQNLDBlSzovHglnMT6dubc3k
 kOdhRrmublQKPnNzyZ5sjA==;
Date: Mon, 13 Oct 2025 18:31:06 +0300
Message-Id: <864is24y4l.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <871pn67uak.fsf@HIDDEN> (message from Juri Linkov on
 Mon, 13 Oct 2025 18:01:09 +0300)
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: sbaugh@HIDDEN,  joaotavora@HIDDEN,  77313 <at> debbugs.gnu.org,
>   dmitry@HIDDEN
> Date: Mon, 13 Oct 2025 18:01:09 +0300
> 
> > Yes, this makes the processing more expensive, and will increase the
> > number of overlays in buffers shown in many windows.  But I see no
> > other way of doing TRT in this case.
> 
> When we will implement margin columns in shared margins, then we could
> just remove the margin column dedicated to the flymake indicators
> when fringes are used.

Maybe I'm missing something, but how will this help having the
indicators shown in all relevant windows, when some of those windows
could be on GUI frames and some on TTY frames?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 13 Oct 2025 16:40:01 +0000
Resent-Message-ID: <handler.77313.B77313.17603735698626 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17603735698626
          (code B ref 77313); Mon, 13 Oct 2025 16:40:01 +0000
Received: (at 77313) by debbugs.gnu.org; 13 Oct 2025 16:39:29 +0000
Received: from localhost ([127.0.0.1]:52774 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v8La5-0002F4-H7
	for submit <at> debbugs.gnu.org; Mon, 13 Oct 2025 12:39:29 -0400
Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]:56540)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1v8La2-0002Eq-GM
 for 77313 <at> debbugs.gnu.org; Mon, 13 Oct 2025 12:39:27 -0400
Received: by mail-oi1-x231.google.com with SMTP id
 5614622812f47-44181f9e5b4so1945040b6e.0
 for <77313 <at> debbugs.gnu.org>; Mon, 13 Oct 2025 09:39:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760373560; x=1760978360; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=nMMYPD6z0z13BFwKgGHvi643WNxJwUZGzmKRyvM6Vuw=;
 b=Ij0tG63WBmLeERtpMzJvBR98wx07W1GwYlXRZ702dm8eaOXtHD+3t9H/RaDvG//HOI
 0uc/EY+c+/tLGFrVRBNyAuHTgwFIlhWjQoTdFYMAkW2/0PwMqJI4BtFCfDbxeOJiOXGr
 XDRhV34V3PJqesrJH4waF8zBoXrmnwUWwlC22sPSdkE6HLYpRkwgN+F1CQFcmI4SfyJB
 vUSgkQ3Nj/UiQq/oeU5b8DQ4l4qgGFpezofrDdhYoD3IqB/Vg6ES3daELtPiO4GJ08rS
 vrLf1DYNdRoLM5IQLBuEp+xUjfkK7mYNCrGFbtKWQO4tBPZudjFBVGjlR8o9Ny2kTwmn
 amZg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760373560; x=1760978360;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=nMMYPD6z0z13BFwKgGHvi643WNxJwUZGzmKRyvM6Vuw=;
 b=KpwyZ+johoFuXs68KLI1OsidYOORhChg9KsvTO7TuWYXuQkwrLB+5QxFLgOO7nDUGt
 augwcW/9IXs2+o979rYcSXehsHwOyvVdYskrT0x3uKufrwiKo0Ou0/+zybNVoECdMe6V
 XX5bYidnywO7C9tIq/uKmDiqYJCgMPoBynOnvl2NTYr5Of7i1DiRSGk9cswDsXWop9jo
 pGQvU10Azdkzxiw+m7XfoB1UyDag5uc3/D9njsVKRVsuj8yS2t63FGJqis/zmna0sAAh
 9Dm2nMOQB/y/eOYqIyt0dwNzoFuj2hKgMdhFnah0AjgmZ+TTuafU8Gxwv7+Ylx2EP3Hu
 QZ7A==
X-Forwarded-Encrypted: i=1;
 AJvYcCVb5eIHRjvPNgfPolnTbJAoaznE5VHG9OZxHuyP8Z5Wa44eB4IKr1I1gQxwJVSV2gqenQSj4g==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YwicACBFOMlff4jO7vj/Fdp0ndSPKszAtjWjZVOUE5KTbAF82oi
 mmE+XinixADOTVxFVoPQvpCbN106Btw/jjM+YMv++wapf3a8jVUiLpyAJ2yMRO38hJi6ltyAOTT
 RYPEULor+fmE46gOmbenmJLJ2LvETIgU=
X-Gm-Gg: ASbGncv7rhtZvxbSqlfXHbb9qHNUFjM4sQdUMp4ZLnE2OVQ++UxwcyMxkHiYbnhlSom
 owlLTwOCRa9eMdMZdksEVWClv2pf6hoL7RIrYvtM6aL1+Z7bfiYBs1qa7QeQ6E0OnuuXQ/Lb1iY
 8jaOT/eHMMlI4KRnmBuJy+DTtRSpIo9rqTe0jxvizR+OMkCMwjFBdPSsjFys/JL+jeXWDL06JC0
 wStJrtsnB8yom5jC0EM1rMP6w==
X-Google-Smtp-Source: AGHT+IE6ztXAdi+zpl/CQw/MBzs7CF1mlMTSLZGGVmkPdsbdQuWcp5p8Z39AGfXMsNZW4z+Ggm1jjBNycwh4EoTqJd4=
X-Received: by 2002:a05:6808:6ec3:b0:441:8f74:e8d with SMTP id
 5614622812f47-4418f742067mr7598705b6e.55.1760373560121; Mon, 13 Oct 2025
 09:39:20 -0700 (PDT)
MIME-Version: 1.0
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN>
 <CALDnm52+4ZDFjr0tE9puPb5CyXH_As+WCOKELCzGg-rPq8WKsA@HIDDEN>
 <ierh5w7zvfd.fsf_-_@HIDDEN>
 <CALDnm52cFeBkEGKC2kH=A0eofATN72_-C37CBXXaieLNjFojFA@HIDDEN>
 <87y0pje090.fsf@HIDDEN> <ierecraztvy.fsf@HIDDEN>
 <87o6qer9pr.fsf@HIDDEN> <87bjma7ues.fsf@HIDDEN>
In-Reply-To: <87bjma7ues.fsf@HIDDEN>
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Date: Mon, 13 Oct 2025 17:39:08 +0100
X-Gm-Features: AS18NWBeawr20dabaqphHL5g1CB3tD1UQVAsVyYtEM7rhLKxsaHKFQdkUJjKHoo
Message-ID: <CALDnm50kyXAwTd3Pbya2fHRy_Lqfte1yLdMn4COWr-SQ4nNjDA@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000b9203206410ce88e"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000b9203206410ce88e
Content-Type: text/plain; charset="UTF-8"

On Mon, Oct 13, 2025, 16:02 Juri Linkov <juri@HIDDEN> wrote:

> > +        ((visible-p ()
> > +           (and (get-buffer-window (current-buffer))
> > +                (not (null (frame-parameter nil 'client)))))
>
> Shouldn't this rather be
>
>            ((visible-p ()
>               (and (get-buffer-window (current-buffer))
>                    (or (not (daemonp))
>                        (not (null (frame-parameter nil 'client))))))
>
> i.e. to accept all frames except the daemon's initial frame.
>

Yeah maybe. Though I don't think it matters in practice, at least didn't in
my testing. But it makes sense.

--000000000000b9203206410ce88e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div dir=3D"auto"><br></div><br><div class=3D"gmail_quote=
 gmail_quote_container" dir=3D"auto"><div dir=3D"ltr" class=3D"gmail_attr">=
On Mon, Oct 13, 2025, 16:02 Juri Linkov &lt;<a href=3D"mailto:juri@HIDDEN=
et">juri@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
;padding-left:1ex">&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 ((visible-p ()<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(and (get-buffer-window (cur=
rent-buffer))<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (not (null (f=
rame-parameter nil &#39;client)))))<br>
<br>
Shouldn&#39;t this rather be<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((visible-p ()<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (and (get-buffer-window (c=
urrent-buffer))<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(or (n=
ot (daemonp))<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0(not (null (frame-parameter nil &#39;client))))))<br>
<br>
i.e. to accept all frames except the daemon&#39;s initial frame.<br></block=
quote></div><div dir=3D"auto"><br></div><div dir=3D"auto">Yeah maybe. Thoug=
h I don&#39;t think it matters in practice, at least didn&#39;t in my testi=
ng. But it makes sense.=C2=A0</div><div dir=3D"auto"><br></div><div dir=3D"=
auto"><br></div><div class=3D"gmail_quote gmail_quote_container" dir=3D"aut=
o"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord=
er-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote></div></div>

--000000000000b9203206410ce88e--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 13 Oct 2025 16:50:02 +0000
Resent-Message-ID: <handler.77313.B77313.176037414310646 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, Spencer Baugh <sbaugh@HIDDEN>, 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176037414310646
          (code B ref 77313); Mon, 13 Oct 2025 16:50:02 +0000
Received: (at 77313) by debbugs.gnu.org; 13 Oct 2025 16:49:03 +0000
Received: from localhost ([127.0.0.1]:52793 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v8LjK-0002lI-1T
	for submit <at> debbugs.gnu.org; Mon, 13 Oct 2025 12:49:03 -0400
Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]:45093)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1v8LjF-0002kh-1q
 for 77313 <at> debbugs.gnu.org; Mon, 13 Oct 2025 12:48:59 -0400
Received: by mail-oi1-x22d.google.com with SMTP id
 5614622812f47-43f715b18caso2307279b6e.2
 for <77313 <at> debbugs.gnu.org>; Mon, 13 Oct 2025 09:48:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760374130; x=1760978930; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=BdAIWb2Ew8WmuFi1Q7MIOl0xRcIQ5r6WdBi6J/6PTFA=;
 b=T9x0l6pCHLF3wjU5XGHOc54nvcl1Ioz7G8ur/0bREv2ze5e8evoDkBeBk8wGViZ5NE
 TzT4OxJ8zA3c04lhv27xbFoFcUb0w8iduojbZ0lMmQp15FY43l0NvGjQgkJChdjwO7VQ
 qXUB9KiJEKPU5dUYA38oO2AuTxjt62AnBt1oU7C4ncQuthZg2yWUYspr9BUnvWxirYMc
 27dpRBOkcYWIZ7qx3dqoWMYmyuTy/0raq2Wad3p8HunJCaVumIbfyDeDTCLGkiCkNalx
 PaK6/GtxZzzx56+oNdqbBZBAJthMmWJMu/dUAP2tjlpzLTNGKi6f6jKkE14EEOZke1VH
 RzNw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760374130; x=1760978930;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=BdAIWb2Ew8WmuFi1Q7MIOl0xRcIQ5r6WdBi6J/6PTFA=;
 b=wRMgQDlT9U04oM1nbZLM4lzk05rXcyfS1x74wp2V7RytQ2Ot4Asl3ZoQcGVD3jfqNJ
 R6WFpWDDw22irsElAN1o7/KmYXZlPsjk/INpX40tra8bKyXOACQ4Qz1mN0UMDNBTIzI3
 Fsvx2nqICIIXubXb4XbddBj3Rleusirifwfd8w0YifL4fdd6rC8GMLSobaDoNuib6wqv
 gtPyI4SB66YV13g3cvIhPgjBgZ9JQMdTKW/PHeOiIUvpLa+wQ/GfCSyyttrKU+2pUal9
 xE/ScTQpVyQ6m0lGTirKqUIVC0npaXgvPxwMDmx2pGT/m5mjWxW/vhlXH+s76Q5lN962
 zJeQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCW4VwQBhXRB8+5spPAunQXTp13yv6zLtoMefzMYV5cEWTvUYjQHWn6tuL35LAPmOEyi/jAJag==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YyCkKBzRbm7WkAgaQiSqEIVB0iq5ggjSiV8dUMMiYZOOOH/TBUR
 27sWemND6cl/Zif36/9bSYjXEZgkB7AWok/5i+OY2+MZWfigZTy3ysQXprmn4qQxKApMvqCig7a
 DstZFZo3bIl9KmIBITPERryytFWFW9Nw=
X-Gm-Gg: ASbGncvRFjdAfUzHkoKWNp8E3mnDte4OafwdUqVjoxulBPAOqwQhjoCUllDibhqXzts
 ByLjGWzO7uZnNOTK6GjUPouXRz4UdCd5ZWU13RJea3RlxSPzcMGnZ4MMKjcBsb/IS4zcqwXj6dS
 gmW+FJGt9+6POyNpHXz5B9357haVK+OEaIdWQSkMTIfuqBJZa3ZHbw4XAjGDVKQZgf3jPHXWOeT
 6FQ5hvoJlIxLWcEzoJY9RzEvQ==
X-Google-Smtp-Source: AGHT+IFmXXKCyvcvnW0rShw015ug7hB0m4YefZDDkjmLPxdx4r6JSYmpg6eYZYlsP4Bfefm8vQ366QN6ounogSscDiY=
X-Received: by 2002:a05:6808:4f14:b0:43f:7a87:b39 with SMTP id
 5614622812f47-4417b38f36dmr9407701b6e.28.1760374130583; Mon, 13 Oct 2025
 09:48:50 -0700 (PDT)
MIME-Version: 1.0
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN>
 <878qhkaur0.fsf@HIDDEN> <86o6qf8e2h.fsf@HIDDEN>
 <871pn67uak.fsf@HIDDEN> <864is24y4l.fsf@HIDDEN>
In-Reply-To: <864is24y4l.fsf@HIDDEN>
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Date: Mon, 13 Oct 2025 17:48:39 +0100
X-Gm-Features: AS18NWAYm0ICWPRa_MMoiZMlGaZawdLVe0NTbQM_j3a2hNwWNpuYB0leROaYyUE
Message-ID: <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000b9b03006410d0ab2"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000b9b03006410d0ab2
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Oct 13, 2025, 16:31 Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: Juri Linkov <juri@HIDDEN>
> > Cc: sbaugh@HIDDEN,  joaotavora@HIDDEN,  77313@HIDDEN=
g
> ,
> >   dmitry@HIDDEN
> > Date: Mon, 13 Oct 2025 18:01:09 +0300
> >
> > > Yes, this makes the processing more expensive, and will increase the
> > > number of overlays in buffers shown in many windows.  But I see no
> > > other way of doing TRT in this case.
> >
> > When we will implement margin columns in shared margins, then we could
> > just remove the margin column dedicated to the flymake indicators
> > when fringes are used.
>
> Maybe I'm missing something, but how will this help having the
> indicators shown in all relevant windows, when some of those windows
> could be on GUI frames and some on TTY frames?
>

Not sure that is what anyone is looking for (maybe it is), but showing the
indicators in different bits of the window depending on the type of frame
that window is on, while theoretically nice, is waaay too much engineering
and overcomplicating in my opinion, especially if Flymake is the only
motivation.

We need to cover the common use casesb before the esoteric ones.

Right now there is a regression and a loss of indicators for TTY users.
Spencer, any objections that I install the patch that addresses this (and
doesn't break the daemon+fringes)?

Jo=C3=A3o

>

--000000000000b9b03006410d0ab2
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div dir=3D"auto">On Mon, Oct 13, 2025, 16:31 Eli Zaretsk=
ii &lt;<a href=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrote:</div><di=
v class=3D"gmail_quote gmail_quote_container" dir=3D"auto"><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r=
gb(204,204,204);padding-left:1ex">&gt; From: Juri Linkov &lt;<a href=3D"mai=
lto:juri@HIDDEN" target=3D"_blank" rel=3D"noreferrer">juri@HIDDEN</=
a>&gt;<br>
&gt; Cc: <a href=3D"mailto:sbaugh@HIDDEN" target=3D"_blank" rel=3D"=
noreferrer">sbaugh@HIDDEN</a>,=C2=A0 <a href=3D"mailto:joaotavora@g=
mail.com" target=3D"_blank" rel=3D"noreferrer">joaotavora@HIDDEN</a>,=C2=
=A0 <a href=3D"mailto:77313 <at> debbugs.gnu.org" target=3D"_blank" rel=3D"noref=
errer">77313 <at> debbugs.gnu.org</a>,<br>
&gt;=C2=A0 =C2=A0<a href=3D"mailto:dmitry@HIDDEN" target=3D"_blank" rel=
=3D"noreferrer">dmitry@HIDDEN</a><br>
&gt; Date: Mon, 13 Oct 2025 18:01:09 +0300<br>
&gt; <br>
&gt; &gt; Yes, this makes the processing more expensive, and will increase =
the<br>
&gt; &gt; number of overlays in buffers shown in many windows.=C2=A0 But I =
see no<br>
&gt; &gt; other way of doing TRT in this case.<br>
&gt; <br>
&gt; When we will implement margin columns in shared margins, then we could=
<br>
&gt; just remove the margin column dedicated to the flymake indicators<br>
&gt; when fringes are used.<br>
<br>
Maybe I&#39;m missing something, but how will this help having the<br>
indicators shown in all relevant windows, when some of those windows<br>
could be on GUI frames and some on TTY frames?<br></blockquote></div><div d=
ir=3D"auto"><br></div><div dir=3D"auto">Not sure that is what anyone is loo=
king for (maybe it is), but showing the indicators in different bits of the=
 window depending on the type of frame that window is on, while theoretical=
ly nice, is waaay too much engineering and overcomplicating in my opinion, =
especially if Flymake is the only motivation.</div><div dir=3D"auto"><br></=
div><div dir=3D"auto">We need to cover the common use casesb before the eso=
teric ones.=C2=A0</div><div dir=3D"auto"><br></div><div dir=3D"auto">Right =
now there is a regression and a loss of indicators for TTY users. Spencer, =
any objections that I install the patch that addresses this (and doesn&#39;=
t break the daemon+fringes)?</div><div dir=3D"auto"><br></div><div dir=3D"a=
uto">Jo=C3=A3o</div><div class=3D"gmail_quote gmail_quote_container" dir=3D=
"auto"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;=
border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote></div></div>

--000000000000b9b03006410d0ab2--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 13 Oct 2025 17:05:02 +0000
Resent-Message-ID: <handler.77313.B77313.176037505113973 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176037505113973
          (code B ref 77313); Mon, 13 Oct 2025 17:05:02 +0000
Received: (at 77313) by debbugs.gnu.org; 13 Oct 2025 17:04:11 +0000
Received: from localhost ([127.0.0.1]:52857 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v8Lxy-0003dI-VN
	for submit <at> debbugs.gnu.org; Mon, 13 Oct 2025 13:04:11 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:46171)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v8Lxv-0003d1-Pf
 for 77313 <at> debbugs.gnu.org; Mon, 13 Oct 2025 13:04:08 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Mon, 13 Oct 2025
 17:48:39 +0100")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
Date: Mon, 13 Oct 2025 13:04:01 -0400
Message-ID: <ier8qheka2m.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760375042;
 bh=PjxOv8abaA5GOB5YXTNhhbNSjpKyKc+IZ7SDT4hFmD8=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=jpkysvmReWNbjyjM87JGHXQxJ6qBat0N7oGHWSL4M2r2ZZGNpWsRb7sBplcIOLLci
 ZUMSx78PuO1ntf3KuDynmP095s+Q5P/GH0DbFQBRNzoOgN/9QSqhPOQVObZSkxT05L
 QUdyLmvsxwrqejVjLBJDcY5kUs65f7GEGFd7sTMRtNIsASUBz7IaNTHp/7/GlfRuxp
 fbXEos7MqdOCYL/scly3ZJMkNv7RT52oJcHkldRpUcIgMjjLe+hWULhGqtmytJr5WE
 BiFYsIQG73GQOutMUaO0+tryPrrLDO836BJOicboCSBeOlhMNaWu5+ZSTfuYTT9UYr
 /wd2ItdepsowA==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes:

> On Mon, Oct 13, 2025, 16:31 Eli Zaretskii <eliz@HIDDEN> wrote:
>
>  > From: Juri Linkov <juri@HIDDEN>
>  > Cc: sbaugh@HIDDEN,  joaotavora@HIDDEN,  77313@HIDDEN=
rg,
>  >   dmitry@HIDDEN
>  > Date: Mon, 13 Oct 2025 18:01:09 +0300
>  >=20
>  > > Yes, this makes the processing more expensive, and will increase the
>  > > number of overlays in buffers shown in many windows.  But I see no
>  > > other way of doing TRT in this case.
>  >=20
>  > When we will implement margin columns in shared margins, then we could
>  > just remove the margin column dedicated to the flymake indicators
>  > when fringes are used.
>
>  Maybe I'm missing something, but how will this help having the
>  indicators shown in all relevant windows, when some of those windows
>  could be on GUI frames and some on TTY frames?
>
> Not sure that is what anyone is looking for (maybe it is), but showing th=
e indicators in different bits of the window depending on
> the type of frame that window is on, while theoretically nice, is waaay t=
oo much engineering and overcomplicating in my opinion,
> especially if Flymake is the only motivation.
>
> We need to cover the common use casesb before the esoteric ones.=20
>
> Right now there is a regression and a loss of indicators for TTY users. S=
pencer, any objections that I install the patch that
> addresses this (and doesn't break the daemon+fringes)?

I do object.  The current state on master is not so problematic as to
require an urgent change.  TTY users had no way to get flymake
indicators for many years, the fact that they merely need to enable them
explicitly is not so terrible.  We can afford to spend time discussing
whether a better solution is possible.

Especially because the same issue affects other packages, e.g. diff-hl,
as I mentioned.  A flymake-specific hack does nothing to help solve the
general problem.

Also, in your patch, flymake--use-margins-maybe calls (window-fringes),
assuming that the current buffer is displayed in the selected window.
That's not always the case, I think, since flymake-start can be called
with nil DEFERRED.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
References: <ierbjtmsdzr.fsf@HIDDEN>
In-Reply-To: <ierbjtmsdzr.fsf@HIDDEN>
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 13 Oct 2025 19:05:02 +0000
Resent-Message-ID: <handler.77313.B77313.17603822645606 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17603822645606
          (code B ref 77313); Mon, 13 Oct 2025 19:05:02 +0000
Received: (at 77313) by debbugs.gnu.org; 13 Oct 2025 19:04:24 +0000
Received: from localhost ([127.0.0.1]:53058 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v8NqK-0001SL-34
	for submit <at> debbugs.gnu.org; Mon, 13 Oct 2025 15:04:24 -0400
Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:48620)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1v8NqG-0001S8-Pd
 for 77313 <at> debbugs.gnu.org; Mon, 13 Oct 2025 15:04:22 -0400
Received: by mail-wm1-x32d.google.com with SMTP id
 5b1f17b1804b1-46b303f7469so29414885e9.1
 for <77313 <at> debbugs.gnu.org>; Mon, 13 Oct 2025 12:04:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760382255; x=1760987055; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=sLdv82N95Ngfd8w44nqx2IlMG8XdreMEp/RRFB1sLNg=;
 b=bS46qhevne0ftzUfziuieDA2HvbvUGwPRFNuW1QsFE8Jt1IzQ3d556GQCepCrM5LTE
 RnJo5k0cpGF0DmwuIhInFv+zdxT8Kojm5HVEQOMnxKZ4/4nexbVK5/eSyRseV5XNtN3F
 /1mDzmamdBtd8ajdHeoAwxp6V/naqULjHLBSou0SOgstCEUx6PQlxt5T97Mj8+5gR60v
 qxv5VbcLkiZkNic6C9kURACMKtC+qJevEEGzA+g8GTycOcBZVdXP5g2OwhoGAm0Rq0He
 orZ+Y9LsN31UVyK0uLRwut6WNvBRXjmcwCSR0AZYUUQnJJm422ZrHSdA7W9kY4Hjqynw
 g0Zg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760382255; x=1760987055;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=sLdv82N95Ngfd8w44nqx2IlMG8XdreMEp/RRFB1sLNg=;
 b=EHLLQwZAIfMHNr/R3pyb9X85cRWFBnMVkDfUugFzzKbxwxpzOuZWGf2UsAqcNQPYCU
 V/Q3Z6UWYKg8RELu3fryrh/Zte0+F8oU2LzznpJmk/fAPSfCOhAYIQgR7sVErkFlh25U
 lXdx2cCUisUxiwS5/kzB5xgJGb/3FKLyRkU4gZJ2X34mDk31s4UhMOf6+RX43sp1rzP2
 vx4ipIN8qpL0FwdLr9a/wCdRmgHnuMT2+OMIhnWE7vWaTf9Y4PNZMfW9U2aYr/qUkKzs
 lXNn43d2f015R5n3HI5aSP0swNt6FZOSmNTQH7slfExGJQRM7/ksENZtdLuN9QdJ7gGU
 Prow==
X-Forwarded-Encrypted: i=1;
 AJvYcCWTLgM3s4xNsQsmZYk6Bd0XWBdHqidvZ72VpnQ6qSYo75uMr7gw4rUTFCbc9hlJAJbgnCuBfw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YyZhL4cYXWvrfgwMNOvw0BoV/BEsbO8D5/HQ1qd1uy70ll8BpLE
 LJkl21d2kJa9nYNDWCu9XcG+rkk0rpPRoQ2EUWSYS58ozxcsdHPsdihm
X-Gm-Gg: ASbGncuZ1KB2Z9xqEZv/dQuIknx65ogK94t6HN9lH+3cKhQDD1v90lmgmL5YPaH/ntM
 qB/Pdc9AbMjJMz5y4nFvjSj5IDtD0JDo17scm4vVxwD4jK9JeqyG4EwMTKf54E4+4WwwE60YRKK
 y8UauOB6dt4qY2GWzRIYU7S93A+MMF/dbTfcM7D8NKu+V9B6HewYIdvy08U6JcsO3WS7kzu/L1T
 349xIQFXsgE+lw3X1JP1nREY42BnmWVFC1C+j/Ica1Raw+JU+qeQI1JJWxTmV7R2jZRqH6VzXYf
 bNw2OWq8z+2y3wTmEiXuvEFYk2i26WPiavtv5O9FRSVQW5PjcTerlXtGaPB7LDc6ee0nFhebJQr
 v740PZs8q4FfAg6Ag2nfNF4/EahVTj3Jp3i2tC7XPNQmZ/tjNJaL5MtBZIW+gF7MuNhmqhg==
X-Google-Smtp-Source: AGHT+IE6HZvW1BsECUSfneT14BUZKFtIv39OaVTJKrIvgvJetcgOXwtUw1GwOwJm1oQ6NBzQ3MOqiQ==
X-Received: by 2002:a05:600c:810b:b0:468:4350:c84d with SMTP id
 5b1f17b1804b1-46fa9a8657fmr164935495e9.7.1760382254335; 
 Mon, 13 Oct 2025 12:04:14 -0700 (PDT)
Received: from krug (87-196-72-166.net.novis.pt. [87.196.72.166])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-426ce5cfe74sm19315315f8f.35.2025.10.13.12.04.13
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 13 Oct 2025 12:04:13 -0700 (PDT)
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Date: Mon, 13 Oct 2025 20:05:35 +0100
Message-ID: <87jz0yzkow.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Spencer Baugh <sbaugh@HIDDEN> writes:

>> Right now there is a regression and a loss of indicators for TTY
>> users. Spencer, any objections that I install the patch that
>> addresses this (and doesn't break the daemon+fringes)?
> I do object.  The current state on master is not so problematic as to
> require an urgent change.  TTY users had no way to get flymake
> indicators for many years, the fact that they merely need to enable them
> explicitly is not so terrible.

These arguments are not very strong because they apply equally to your
decision this summer to break TTY users.

The daemon + fringe + config_that_runs_flymake users you're protecting
could also have tweaked their customization (or at least Flymake could
have very easily been changed to allow that explicit tweaking to take
place).

> We can afford to spend time discussing whether a better solution is
> possible.

Of course, I applaud that discusison, I just can't take part in it.
I'll be very happy if some very elegant solution is found and won't
stand in the way.

Unfortunately, as it stands, there is a regression for 30.1 TTY Emacs
users.  So let's fix that (AND fix your case) while the discussion is
being had.

In my shop, we use TTY Eglot/Emacs over ssh exclusively (no X servers
allowed in those!).  So while I don't want to make life difficult for
you and your users, I hope you understand that having to explain to my
users why indicators are gone all of a sudden is not good.

> Especially because the same issue affects other packages, e.g. diff-hl,
> as I mentioned.  A flymake-specific hack does nothing to help solve the
> general problem.

It's not a hack.  Flymake has had code to defer display decisions to the
last possible moment for many years.  It's much better here than in
flymake-mode.

> Also, in your patch, flymake--use-margins-maybe calls (window-fringes),
> assuming that the current buffer is displayed in the selected window.
> That's not always the case, I think, since flymake-start can be called
> with nil DEFERRED.

OK, though I don't understand that that would be problem, I've tweaked
the patch so that window-margins can only be called on the window found
to be displaying the buffer about to be annotated.

So, I've tested this in the four main cases:

emacs -Q '(setq trusted-content :all)' --eval '(insert "\nboo!")' -f flymak=
e-mode
emacs -Q -nw '(setq trusted-content :all)' --eval '(insert "\nboo!")' -f fl=
ymake-mode
emacs -Q --daemon ... -f flymake-mode + tty client
emacs -Q --daemon ... -f flymake-mode + graphical client

Please review the patch after my sig again,
Jo=C3=A3o

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 8b6d477c385..c3faa7a81c8 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -870,6 +870,17 @@ flymake--indicator-overlay-spec
                                             #'flymake-show-buffer-diagnost=
ics)
                                            map))))))))
=20
+(defun flymake--use-margins-maybe (window)
+  "Super-special heuristic to guess margins instead of fringes." ; bug#773=
13
+  (when (and (eq flymake-indicator-type 'fringes)
+             (not (cl-case flymake-fringe-indicator-position
+                    (left-fringe (< 0 (nth 0 (window-fringes window))))
+                    (right-fringe (< 0 (nth 1 (window-fringes window)))))))
+    ;; There are no fringes in the buffer, fallback to margins
+    ;; and auto-resize
+    (setq-local flymake-indicator-type 'margins)
+    (flymake--resize-margins)))
+
 (defun flymake--resize-margins (&optional orig-width)
   "Resize current window margins according to `flymake-margin-indicator-po=
sition'.
 Return to original margin width if ORIG-WIDTH is non-nil."
@@ -1366,8 +1377,11 @@ flymake-start
                     deferred))
         (buffer (current-buffer)))
     (cl-labels
-        ((start-post-command
-          ()
+        ((visible-buffer-window ()
+           (and (or (not (daemonp))
+                    (not (null (frame-parameter nil 'client))))
+                (get-buffer-window (current-buffer))))
+         (start-post-command ()
           (remove-hook 'post-command-hook #'start-post-command
                        nil)
           ;; The buffer may have disappeared already, e.g. because of
@@ -1375,22 +1389,24 @@ flymake-start
           (when (buffer-live-p buffer)
             (with-current-buffer buffer
               (flymake-start (remove 'post-command deferred) force))))
-         (start-on-display
-          ()
+         (start-on-display ()
           (remove-hook 'window-configuration-change-hook #'start-on-display
                        'local)
-          (flymake-start (remove 'on-display deferred) force)))
+          ;; Double check that buffer is actually visible (bug#77313)
+          (flymake-start (if (visible-buffer-window) (remove 'on-display d=
eferred)) force)))
       (cond ((and (memq 'post-command deferred)
                   this-command)
              (add-hook 'post-command-hook
                        #'start-post-command
                        'append nil))
             ((and (memq 'on-display deferred)
-                  (not (get-buffer-window (current-buffer))))
+                  (not (visible-buffer-window)))
              (add-hook 'window-configuration-change-hook
                        #'start-on-display
                        'append 'local))
             (flymake-mode
+             (when-let* ((w (visible-buffer-window)))
+               (flymake--use-margins-maybe w))
              (setq flymake-check-start-time (float-time))
              (let ((backend-args
                     (and




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 14 Oct 2025 18:10:05 +0000
Resent-Message-ID: <handler.77313.B77313.176046534630483 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176046534630483
          (code B ref 77313); Tue, 14 Oct 2025 18:10:05 +0000
Received: (at 77313) by debbugs.gnu.org; 14 Oct 2025 18:09:06 +0000
Received: from localhost ([127.0.0.1]:42439 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v8jSK-0007vR-RJ
	for submit <at> debbugs.gnu.org; Tue, 14 Oct 2025 14:09:06 -0400
Received: from mout-p-102.mailbox.org ([80.241.56.152]:44320)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v8jSG-0007tB-8h
 for 77313 <at> debbugs.gnu.org; Tue, 14 Oct 2025 14:09:02 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4cmMfW2ftqz9t55;
 Tue, 14 Oct 2025 20:08:51 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760465331;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=S+tReGG+gxpT/E7aT6g5OAHKvIMBoXqp8SlJya9D+nE=;
 b=MI3IYZ5xIf4QCLT8Fj1sXePlhftxV4guZoiTyda6jLG7T6KVvNviDUnJ7MZbbIjeH4h1YK
 ZFFUFoI3xNdqwZp1HKrZNUNYx7SUcqWvHLSKLYECQ9oIUGIE6PK5vXOO7pJgTQvY3t72xt
 ZrTiZ8IL9WkvxClYl9EXzRszBl9jhWKez7k2oI/ALxWL9U9vHyouWu3Pbnc0ZynR81IUM4
 415sCXQ4/vhCIuY3MW6BDn4n/KZq43n+0PZrpAvJ0fV9xLYXfEF7XZZIERfT7EuKUR7uvx
 67qJhDi3K03WtVB9uMVM3Cm874tuKNZkO7L3Po3gZyD9Bu3mmbp0MyJXCP90gA==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::102 as permitted sender)
 smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <ier8qheka2m.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN>
Date: Tue, 14 Oct 2025 21:07:12 +0300
Message-ID: <87cy6ppdbj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 4cmMfW2ftqz9t55
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Especially because the same issue affects other packages, e.g. diff-hl,
> as I mentioned.  A flymake-specific hack does nothing to help solve the
> general problem.

Agreed that we need to find a general solution.  For example,
in 'hs-minor-mode' we have a new option 'hs-indicator-type' that can
be either 'fringe' or 'margin', with the default value set to 'fringe'.

And the fallback from 'fringe' or 'margin' depending on
(display-graphic-p) is performed in 'hs-minor-mode'.

Maybe this should be sufficient for modes that support both
indicator types.

Also the patch proposed by João should be fine for flymake
since it just postpones displaying the indicators until
the buffer's window becomes visible.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 14 Oct 2025 18:28:02 +0000
Resent-Message-ID: <handler.77313.B77313.17604664283597 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17604664283597
          (code B ref 77313); Tue, 14 Oct 2025 18:28:02 +0000
Received: (at 77313) by debbugs.gnu.org; 14 Oct 2025 18:27:08 +0000
Received: from localhost ([127.0.0.1]:42713 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v8jjn-0000vu-CJ
	for submit <at> debbugs.gnu.org; Tue, 14 Oct 2025 14:27:07 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:50279)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v8jjk-0000vA-Es
 for 77313 <at> debbugs.gnu.org; Tue, 14 Oct 2025 14:27:05 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <87cy6ppdbj.fsf@HIDDEN> (Juri Linkov's message of "Tue, 
 14 Oct 2025 21:07:12 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
Date: Tue, 14 Oct 2025 14:26:57 -0400
Message-ID: <ier5xchjq4u.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760466418;
 bh=S3vG31SfLkSR7ByfrVix2qwjKeYuxTE2YsYVgnZq9r4=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=h+hYbBH+3NLodLadQAb4cYa63uZrerFfVmAJoqt/F+ZVSuAXLhLAluL5qOd66Hf1Y
 2ghdDuLps5ADu4Mtnlb8GR2qIXM4IOaZgqWEhCM01/o9Bpn0NppytXXIVlJCN5FX7X
 YOqCRkh0jqy0sIC3DIVityIyQg0RUfPec4iO4L8mJchAvWpp1vbWG6Z0oPwmYWLue1
 1Ai2MPilTOngKUSyzzLs43CEfNay6DOBqzrXSrNsY5qBV8gVPiTrCrwptYFf9B/yPG
 3x2Y4UY4PAvTZfIuEL39+gbL1PT6DPCKGcyMycILKgB1tm138HizzjNd+fWsbs7epu
 i/BeDS0BieR1g==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

>> Especially because the same issue affects other packages, e.g. diff-hl,
>> as I mentioned.  A flymake-specific hack does nothing to help solve the
>> general problem.
>
> Agreed that we need to find a general solution.  For example,
> in 'hs-minor-mode' we have a new option 'hs-indicator-type' that can
> be either 'fringe' or 'margin', with the default value set to 'fringe'.

Yes, very similar.  The code looks pretty similar in fact, I'm guessing
it was mostly copied from flymake.  This really suggests we should have
a library for this...

> And the fallback from 'fringe' or 'margin' depending on
> (display-graphic-p) is performed in 'hs-minor-mode'.

Oh no, we should definitely fix that before Emacs 31 is released!  That
will cause the exact same bugs as with flymake.

> Maybe this should be sufficient for modes that support both
> indicator types.

display-graphic-p is somewhat better, but we should just do the proper fix.

What about my suggestion of a 'window overlay property which points to a
symbol containing a list of windows?  If we had that, I think we'd have
a very complete solution, which could also be used by hs-minor-mode.

And that solution can be wrapped up in a library used by hideshow,
flymake, and diff-hl.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 15 Oct 2025 14:05:06 +0000
Resent-Message-ID: <handler.77313.B77313.176053704718792 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176053704718792
          (code B ref 77313); Wed, 15 Oct 2025 14:05:06 +0000
Received: (at 77313) by debbugs.gnu.org; 15 Oct 2025 14:04:07 +0000
Received: from localhost ([127.0.0.1]:53951 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v926m-0004sd-5j
	for submit <at> debbugs.gnu.org; Wed, 15 Oct 2025 10:04:06 -0400
Received: from fhigh-a1-smtp.messagingengine.com ([103.168.172.152]:48731)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1v926a-0004pG-6C
 for 77313 <at> debbugs.gnu.org; Wed, 15 Oct 2025 10:03:56 -0400
Received: from phl-compute-09.internal (phl-compute-09.internal [10.202.2.49])
 by mailfhigh.phl.internal (Postfix) with ESMTP id DE11B14001D6;
 Wed, 15 Oct 2025 10:03:45 -0400 (EDT)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-09.internal (MEProxy); Wed, 15 Oct 2025 10:03:45 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1760537025;
 x=1760623425; bh=zu7TRJ/F9V5jmVxaXBX8N7ltu5A+mpmQ8OGs1INv5K8=; b=
 KPUawkysY14F88EW1Mcsd3+TjItsahDe01unhwi6+0mNJruy06OJYhTYmZ8EwEbJ
 qEKFsV41P7qwo5lNf0Z94wZVX81/b9eNL5yvdhna2ImQm28iiToIOvr5xe2M7slF
 pegv9o0+1V+EBurjE7A1lRaMHIWdxbqAm6h8KqycfvMrj2Fw1eh/A3We3M+wKqmg
 AD6ZcVxnCbtBMGami65bKy2AWlcgd4ELJnLUgb5IikQWPZCvHYKowEioXFR3w8wV
 m8CRQStLuNNrpePZUGuOrLokxNXqTdQ5CjKwvSdFPyC+Msr4HPbrVoN+g+82bgAt
 Ch4y44mKd64f7QCpcqv/mA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1760537025; x=
 1760623425; bh=zu7TRJ/F9V5jmVxaXBX8N7ltu5A+mpmQ8OGs1INv5K8=; b=N
 B8iqYBdGdZ+7c2qyFeZle4mBIDC/yvr07F3dli7I7bbsSNCMO/WxWLV6xGBAjR72
 9KNIn4ik5w3GO6GIqtinR2D4+SzeRu6PhO1UY70alIhqCq7LFeyrZ30+WRF0wJdx
 efANhywph5ByJJtDhcT/CwAYrIpq0ADpQvIU7OPyn9I5QaOhdDa/HOi72zynOyyD
 VBaqEuZl0B73oMyigRANT50n9fPtGzy9nW+k3iHPmaAy/tG7IIh+bhHTEtnalqjA
 A8zF+w+F4nj29W1V9upQhThyw/kvOztV9wgBO3XpFpi9wHEAx9yamMiXQwMQv/Nu
 pQ+c6JWZ9dvLYlokLj2bg==
X-ME-Sender: <xms:wanvaJLfJIJ7Q_uEgRAr3MM2zxSQ1lfBAB6dd1DnxsyLPmk81CMKIg>
 <xme:wanvaMBDVVzSgKijuhIkf58ucXJnmJGu57OxT-lSsV9xtQSEOyCwskGWFl3BI88vV
 ojzMjlvktxh7f9q6Qi18uWy12AvIED7YpLAePj9HWcfCGiX0sEOsfQ>
X-ME-Received: <xmr:wanvaKDrPoOdNSQj5GWq-YNtGqRY1uAC0iBf_J5jZ0SJBgaDPixAVWQ9kPsVoKwqGfwA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduvdefiedtucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu
 rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf
 gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhithhr
 hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg
 hrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedujeeh
 necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih
 htrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhp
 ohhuthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrdhnvghtpdhrtghpthhtohepvg
 hlihiisehgnhhurdhorhhgpdhrtghpthhtohepshgsrghughhhsehjrghnvghsthhrvggv
 thdrtghomhdprhgtphhtthhopehjohgrohhtrghvohhrrgesghhmrghilhdrtghomhdprh
 gtphhtthhopeejjeefudefseguvggssghughhsrdhgnhhurdhorhhg
X-ME-Proxy: <xmx:wanvaGA9nea4epcFuUiBzpghJA6dMBB_aXbfMAfh0npCQXIiKtGIhg>
 <xmx:wanvaNoerX_uYQ-m2f4fvuhzM7xszslH6mcRihhIKtoSdAmXwhc8Dg>
 <xmx:wanvaIlYYmfOuFrbFcMdZj5OFQe2Tay6HsvijyQ1j5QfWbQd7uu4mQ>
 <xmx:wanvaFwQ8CJi9OytJoGIQnAe8e_9GtT2Dd792732T8MQNfzx5VV2Ow>
 <xmx:wanvaESd1uJmMlROmXsqx7BDwErsIfGGACxj81uTVxhN40Qi1JgeNLIq>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 15 Oct 2025 10:03:43 -0400 (EDT)
Message-ID: <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
Date: Wed, 15 Oct 2025 17:03:41 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87347sh85u.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 09/10/2025 09:49, Juri Linkov wrote:
>>> Specifically, I think what we need is some way to have "per-window" text
>>> displayed in the margins.
>>>
>>> Then flymake could add text to the margins which is only displayed in
>>> windows in terminal frames.  And also only widen the margins in such
>>> frames, too.
>>>
>>> I'm not sure if this is possible right now, though.  Maybe this needs an
>>> enhancement to the low-level display of margins?
>> Can Flymake use per-window overlays?  Then each window could have the
>> margin display specific to that window.
> Adding per-window overlays will limit usability of Flymake that will
> hide indicators in the same buffer displayed in other windows.
> 
> While as the same time it doesn't solve the original problem
> because after hiding margin indicators on a graphical display,
> it can't automatically enable fringe indicators.

Perhaps we could use the

   (when condition . spec)

form of the display spec? Then it would take two overlays, though, which 
would provide specs for graphic and non-graphic.

If the conditions are evaluated repeatedly when displaying the same 
buffer in different windows, could be fine. There is a minor issue, 
though, that when condition evaluates to nil, the " " string used as a 
based becomes the overlay's display value. Maybe we could do something 
about that.

In diff-hl, code would look something like this:

diff --git a/diff-hl.el b/diff-hl.el
index 778d8fd..7a62fd2 100644
--- a/diff-hl.el
+++ b/diff-hl.el
@@ -351,9 +351,12 @@ It can be a relative expression as well, such as 
\"HEAD^\" with Git, or
      (unless val
        (let* ((face-sym (funcall diff-hl-fringe-face-function type pos))
               (bmp-sym (funcall diff-hl-fringe-bmp-function type pos)))
-        (setq val (propertize " " 'display `((,(intern (format 
"%s-fringe" side))
-                                              ,bmp-sym ,face-sym))))
+        (setq val (propertize " " 'display `((when (display-graphic-p)
+                                               .
+                                               (,(intern (format 
"%s-fringe" side))
+                                                ,bmp-sym ,face-sym)))))
          (puthash key val diff-hl-spec-cache)))
+
      val))

  (defun diff-hl-fringe-face-from-type (type _pos)





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 15 Oct 2025 16:46:01 +0000
Resent-Message-ID: <handler.77313.B77313.176054673313797 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176054673313797
          (code B ref 77313); Wed, 15 Oct 2025 16:46:01 +0000
Received: (at 77313) by debbugs.gnu.org; 15 Oct 2025 16:45:33 +0000
Received: from localhost ([127.0.0.1]:56033 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v94d1-0003aS-Qr
	for submit <at> debbugs.gnu.org; Wed, 15 Oct 2025 12:45:33 -0400
Received: from mout-p-201.mailbox.org ([80.241.56.171]:39972)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v94cd-0003TS-OF
 for 77313 <at> debbugs.gnu.org; Wed, 15 Oct 2025 12:45:17 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4cmxlG3XkGz9tjD;
 Wed, 15 Oct 2025 18:44:58 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760546698;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=y0caI0sk2Kg+MSko5vlRk03Ea9xcmX5k5frFLAs8fP8=;
 b=dMXcvk2eoXJU0rWT0DaS6n7vC1EHBrW/wlnxcAeKjWLoTGEPZx68cv1HABa6EQtdPh/hvl
 SVl4s25pGzTAAVBgYW4f598r48wE3gi6M95Te8jGz5QZFnQtslQQlVRZDUjBt2i0H8av4E
 OqWeWM8WPPlYvlxS3IVbk9PaftbX4V9qa/yt5b+cifYfaxKpTe0NTtIFaMdhncC1ryH3qV
 V5tpxWb4Gnz0R9RsbamqLD1L08Ym829IZhilf8VGE9UrgfSWQXfAAk9+nee7AUKFnB+cby
 JrOj9oWgYo2a7FP8VuOt3Y22rmjS+QfHcXVqZBPV4eAQMZuY9o2uwAuUDXKczQ==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::102 as permitted sender)
 smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <ier5xchjq4u.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN>
Date: Wed, 15 Oct 2025 19:43:09 +0300
Message-ID: <878qhcjeua.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Rspamd-Queue-Id: 4cmxlG3XkGz9tjD
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

> What about my suggestion of a 'window overlay property which points to a
> symbol containing a list of windows?  If we had that, I think we'd have
> a very complete solution, which could also be used by hs-minor-mode.

I tried to implement this feature with the patch attached below.

But unfortunately, it can't be used for flymake because it requires
duplicating all overlays, but flymake depends on the 1:1 mapping
between errors and overlays.

To keep the existing design with one overlay per error
we need to invent another way to add fringe/margin indicators
conditionally.

For example, to add a predicate to the fringe/margin spec like this:

  #("!" 0 1
    (display
     (left-fringe flymake-double-exclamation-mark compilation-error PREDICATE)))
  #("!" 0 1
    (display
     ((margin left-margin PREDICATE)
      #("‼" 0 1

on the same overlay.

Or like Dmitry proposed to add a condition to the display spec.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=flymake-fallback-to-margins.patch

diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 9e83e4a9bcc..1c5f137bb0d 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -1888,7 +1888,9 @@ Overlay Properties
 @kindex window @r{(overlay property)}
 @item window
 If the @code{window} property is non-@code{nil}, then the overlay
-applies only on that window.
+applies only on that window.  When the @code{window} property
+is a symbol bound to a variable with a list, then the overlay
+applies only on windows from this list.
 
 @kindex category @r{(overlay property)}
 @item category
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 88ebf1ccd97..360154670ab 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -185,7 +185,7 @@ flymake-fringe-indicator-position
 		 (const right-fringe)
 		 (const :tag "No fringe indicators" nil)))
 
-(defcustom flymake-indicator-type 'fringes
+(defcustom flymake-indicator-type 'fallback-to-margins
   "Indicate which indicator type to use for display errors.
 
 The value can be nil (don't indicate errors but just highlight them),
@@ -200,6 +200,7 @@ flymake-indicator-type
   :version "31.1"
   :type '(choice (const :tag "Use Fringes" fringes)
                  (const :tag "Use Margins" margins)
+                 (const :tag "Fallback to margins" fallback-to-margins)
                  (const :tag "No indicators" nil)))
 
 (defcustom flymake-margin-indicators-string
@@ -897,6 +898,18 @@ flymake--resize-margins
             (set-window-buffer x (window-buffer x)))
           (get-buffer-window-list nil nil 'visible))))
 
+(defvar-local flymake-margin-windows nil)
+
+(defun flymake-window-buffer-change (w)
+  (when (cl-case flymake-fringe-indicator-position
+          (left-fringe (< 0 (nth 0 (window-fringes))))
+          (right-fringe (< 0 (nth 1 (window-fringes)))))
+    (unless flymake-margin-windows
+      (let ((flymake-indicator-type 'margins))
+        (flymake--resize-margins)))
+    (unless (memq w flymake-margin-windows)
+      (setq flymake-margin-windows (cons w flymake-margin-windows)))))
+
 (defun flymake--equal-diagnostic-p (a b)
   "Tell if A and B are equivalent `flymake--diag' objects."
   (or (eq a b)
@@ -1012,7 +1034,16 @@ flymake--highlight-line
                   (overlay-put ov prop (flymake--lookup-type-property
                                         type prop value)))))
       (default-maybe 'face 'flymake-error)
-      (default-maybe 'before-string (flymake--indicator-overlay-spec type))
+      (default-maybe 'before-string
+                     (let ((flymake-indicator-type
+                            (if (eq flymake-indicator-type 'fallback-to-margins)
+                                'fringes
+                              flymake-indicator-type)))
+                       (flymake--indicator-overlay-spec type)))
+      (when (eq flymake-indicator-type 'fallback-to-margins)
+        (default-maybe 'window 'flymake-margin-windows)
+        (default-maybe 'after-string (let ((flymake-indicator-type 'margins))
+                                       (flymake--indicator-overlay-spec type))))
       ;; (default-maybe 'after-string
       ;;                (flymake--diag-text diagnostic))
       (default-maybe 'help-echo
@@ -1507,6 +1538,8 @@ flymake-mode
     (add-hook 'after-save-hook 'flymake-after-save-hook nil t)
     (add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t)
     (add-hook 'eldoc-documentation-functions 'flymake-eldoc-function t t)
+    (when (eq flymake-indicator-type 'fallback-to-margins)
+      (add-hook 'window-buffer-change-functions 'flymake-window-buffer-change nil t))
 
     ;; AutoResize margins.
     (flymake--resize-margins)
@@ -1526,6 +1559,7 @@ flymake-mode
     (remove-hook 'kill-buffer-hook 'flymake-kill-buffer-hook t)
     ;;+(remove-hook 'find-file-hook (function flymake-find-file-hook) t)
     (remove-hook 'eldoc-documentation-functions 'flymake-eldoc-function t)
+    (remove-hook 'window-buffer-change-functions 'flymake-window-buffer-change t)
 
     ;; return margin to original size
     (flymake--resize-margins t)
diff --git a/src/buffer.c b/src/buffer.c
index e44b6daf587..22dd3f894ff 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -3463,9 +3463,8 @@ overlay_strings (ptrdiff_t pos, struct window *w, unsigned char **pstr)
 
       if (endpos != pos && startpos != pos)
 	continue;
-      Lisp_Object window = Foverlay_get (overlay, Qwindow);
-      if (WINDOWP (window) && XWINDOW (window) != w)
-	continue;
+      if (! overlay_matches_window (w, overlay))
+        continue;
       Lisp_Object str;
       /* FIXME: Are we really sure that `record_overlay_string` can
          never cause a non-local exit?  */
diff --git a/src/window.h b/src/window.h
index 2266fc7814c..ccc3e20dfea 100644
--- a/src/window.h
+++ b/src/window.h
@@ -1257,8 +1257,30 @@ output_cursor_to (struct window *w, int vpos, int hpos, int y, int x)
 overlay_matches_window (const struct window *w, Lisp_Object ov)
 {
   eassert (OVERLAYP (ov));
-  Lisp_Object  window = Foverlay_get (ov, Qwindow);
-  return (! WINDOWP (window) || XWINDOW (window) == w);
+
+  Lisp_Object window = Foverlay_get (ov, Qwindow);
+  if (WINDOWP (window) && XWINDOW (window) != w)
+    return false;
+
+  /* The property `window' can also be a symbol
+     whose value is a list of windows. */
+  if (SYMBOLP (window) && !NILP (window) && !NILP (Fboundp (window)))
+    {
+      window = Fsymbol_value (window);
+      if (CONSP (window))
+	{
+	  FOR_EACH_TAIL (window)
+	    {
+	      Lisp_Object tem = XCAR (window);
+	      if (WINDOWP (tem) && XWINDOW (tem) == w)
+		return true;
+	    }
+	}
+
+      return false;
+    }
+
+  return true;
 }
 
 INLINE_HEADER_END
diff --git a/src/xdisp.c b/src/xdisp.c
index aef40c38e54..ccc31e56994 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -7036,9 +7036,8 @@ #define RECORD_OVERLAY_STRING(OVERLAY, STRING, AFTER_P)			\
         continue;
 
       /* Skip this overlay if it doesn't apply to IT->w.  */
-      Lisp_Object window = Foverlay_get (overlay, Qwindow);
-      if (WINDOWP (window) && XWINDOW (window) != it->w)
-        continue;
+      if (! overlay_matches_window (it->w, overlay))
+	continue;
 
       /* If the text ``under'' the overlay is invisible, both before-
 	 and after-strings from this overlay are visible; start and
@@ -7476,8 +7475,7 @@ strings_with_newlines (ptrdiff_t startpos, ptrdiff_t endpos, struct window *w)
       eassert (OVERLAYP (overlay));
 
       /* Skip this overlay if it doesn't apply to our window.  */
-      Lisp_Object window = Foverlay_get (overlay, Qwindow);
-      if (WINDOWP (window) && XWINDOW (window) != w)
+      if (! overlay_matches_window (w, overlay))
 	continue;
 
       ptrdiff_t ostart = node->begin;

--=-=-=--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 15 Oct 2025 17:33:02 +0000
Resent-Message-ID: <handler.77313.B77313.176054952625776 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176054952625776
          (code B ref 77313); Wed, 15 Oct 2025 17:33:02 +0000
Received: (at 77313) by debbugs.gnu.org; 15 Oct 2025 17:32:06 +0000
Received: from localhost ([127.0.0.1]:56445 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v95Lz-0006hE-GG
	for submit <at> debbugs.gnu.org; Wed, 15 Oct 2025 13:32:06 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:36439)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v95Lm-0006g7-19
 for 77313 <at> debbugs.gnu.org; Wed, 15 Oct 2025 13:31:50 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN> (Dmitry Gutov's
 message of "Wed, 15 Oct 2025 17:03:41 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
Date: Wed, 15 Oct 2025 13:31:40 -0400
Message-ID: <ier1pn4jclf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760549500;
 bh=nQSb2ja8g9/x1o/rcJ3sczth+oi619IcPJxH5pF+KQs=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=zt0hwWDReAVHQf5hYNuUNbY9fSXi+f3WGfI/2XpWg3IW6hPXVYCQlyt/scbVH3jma
 AWJNAJsgO9UVgck8SDtz1XchlaXrJaBlwdPrIdRfybuQW36B9PnS2hMLv4BMIYOVgO
 r8UYwRTyGVfbklxkeLrIBcAQ4/yNvSNSUGF0HGaJBDQDI2KT1Qk5qS39OSFRn/TEu4
 4jkv3rcwgK1SaT6XPqqRlvhjMym8lLWm9H6q3gEuBq0bwg/G6xVZB0qJxj6qI4eQM9
 63emBGiCGi6qIuJ+vLrHuWQVbExDdGug/AsZJ/ODmerzO7R2rZxBzacZSDlnxqBzXt
 xNHUJf/VvTz+g==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Dmitry Gutov <dmitry@HIDDEN> writes:

> On 09/10/2025 09:49, Juri Linkov wrote:
>>>> Specifically, I think what we need is some way to have "per-window" text
>>>> displayed in the margins.
>>>>
>>>> Then flymake could add text to the margins which is only displayed in
>>>> windows in terminal frames.  And also only widen the margins in such
>>>> frames, too.
>>>>
>>>> I'm not sure if this is possible right now, though.  Maybe this needs an
>>>> enhancement to the low-level display of margins?
>>> Can Flymake use per-window overlays?  Then each window could have the
>>> margin display specific to that window.
>> Adding per-window overlays will limit usability of Flymake that will
>> hide indicators in the same buffer displayed in other windows.
>> While as the same time it doesn't solve the original problem
>> because after hiding margin indicators on a graphical display,
>> it can't automatically enable fringe indicators.
>
> Perhaps we could use the
>
>   (when condition . spec)
>
> form of the display spec? Then it would take two overlays, though,
> which would provide specs for graphic and non-graphic.

Great idea.

It looks like having a list of conditions also works, e.g.

(propertize "foo" 'display
  '((when (not (display-graphic-p)) . "tty")
    (when (display-graphic-p) . "gui")))

successfully shows "tty" when the buffer is displayed in a tty frame,
and "gui" when displayed in a graphical frame.

So we don't need two overlays, just one would work, with this method.

Though, when the buffer is displayed in both frames at the same time,
what's displayed depends on the frame which was last interacted-with
(and therefore last redisplayed).

That's a little ugly.  It looks like having two overlays instead avoids
that problem, so maybe we would want to do that.

> If the conditions are evaluated repeatedly when displaying the same
> buffer in different windows, could be fine. There is a minor issue,
> though, that when condition evaluates to nil, the " " string used as a
> based becomes the overlay's display value. Maybe we could do something
> about that.

Ah, you're right.  And an empty string doesn't work:

(overlay-put (make-overlay 1 10 (current-buffer)) 'before-string (propertize "" 'display "foo"))

This just displays nothing, because of course an empty string can't have
text properties.

So, I guess, maybe we could just put the display properties on an empty
overlay?

(overlay-put (make-overlay 1 1 (current-buffer)) 'display "foo")

Alas, that also displays nothing.  Perhaps that's something we could
change, though?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 15 Oct 2025 17:54:02 +0000
Resent-Message-ID: <handler.77313.B77313.176055080530782 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: dmitry@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176055080530782
          (code B ref 77313); Wed, 15 Oct 2025 17:54:02 +0000
Received: (at 77313) by debbugs.gnu.org; 15 Oct 2025 17:53:25 +0000
Received: from localhost ([127.0.0.1]:56628 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v95gj-00080Q-28
	for submit <at> debbugs.gnu.org; Wed, 15 Oct 2025 13:53:25 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:43946)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v95gX-0007zT-Rm
 for 77313 <at> debbugs.gnu.org; Wed, 15 Oct 2025 13:53:20 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1v95gI-0004TL-RI; Wed, 15 Oct 2025 13:52:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=5lq59wRWcROfcvSdwBSQw73d3C20J1Qx7MFxr3su2AA=; b=Mr/E90VCNdHl
 XJwj+dFAPArCqYPDzWohwErLiozF8//cKBAuElPxqbhlEQOyEB1T6eJ/WBPnlqkxMrtEHoGh+v1Mx
 QpNG1wqJ+4VrISr0xcLMYXGvmWrKwUP73NshJR3T6k5fogwACah4QQ8HNQ/C8HgOlJUbnIyUoPANv
 4bOY89FlhGmDeDcxhiHiCtIqOTYJhd+VhW3xy1BbefXJyvOFoiV9FO4D/Cv1G0rXBFFM/6E4WMnOe
 mjzxBQqq72xU6eGXdIrozyGZr5YDcjrjyN8fDnOtI82qbVTXl1HAUn+us2FxTtKP+qQqMNy6CJEeY
 pqxecxKU4unJWPMT9zK8Hw==;
Date: Wed, 15 Oct 2025 20:52:53 +0300
Message-Id: <86ldlccaru.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <ier1pn4jclf.fsf@HIDDEN> (message from Spencer Baugh on
 Wed, 15 Oct 2025 13:31:40 -0400)
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: Juri Linkov <juri@HIDDEN>,  Eli Zaretskii <eliz@HIDDEN>,
>    joaotavora@HIDDEN,  77313 <at> debbugs.gnu.org
> Date: Wed, 15 Oct 2025 13:31:40 -0400
> 
> (overlay-put (make-overlay 1 1 (current-buffer)) 'display "foo")
> 
> Alas, that also displays nothing.  Perhaps that's something we could
> change, though?

I think you need to make this overlay's property be before-string, and
place the display property on that string.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 15 Oct 2025 18:08:02 +0000
Resent-Message-ID: <handler.77313.B77313.17605516222505 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17605516222505
          (code B ref 77313); Wed, 15 Oct 2025 18:08:02 +0000
Received: (at 77313) by debbugs.gnu.org; 15 Oct 2025 18:07:02 +0000
Received: from localhost ([127.0.0.1]:56700 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v95tq-0000dr-SH
	for submit <at> debbugs.gnu.org; Wed, 15 Oct 2025 14:07:02 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:56833)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v95tg-0000dK-NG
 for 77313 <at> debbugs.gnu.org; Wed, 15 Oct 2025 14:06:53 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <878qhcjeua.fsf@HIDDEN> (Juri Linkov's message of "Wed, 
 15 Oct 2025 19:43:09 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
Date: Wed, 15 Oct 2025 14:06:42 -0400
Message-ID: <iery0pchwel.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760551602;
 bh=cq+6pxOLwe4tPRhMIxA4Uz6COiFRvkfTbbv7JSgDNWs=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=qmZpRSDiRggSPcENOVm3uPKzUuoP9TJGIlLQ3YzCSRP815UATp3PDwHyRL55g05E1
 s1QSUyF8FnIcKRavVvVxRWOEoJkxYK0Zc3tKu/WQkR8aYdHmFQHSm9gRFS+0y5DM/G
 ga6/bJw2Zjyvd8u7VjKTmjrZJNXkUV/eiAKTRO/P2C+tCcYL1/htFAqfLLggLdasXV
 zQHFEP4IMN7qZ4kbIruyaIJlc5BXhyNnHC7IPigL6byBKBZNY6DfGVmJ6fLmF9E4sz
 mV/CVhyoMNt0YAn51fC/uRn22fIgmPPfgzofKTvDfsFA/EGDVAZ3R/HOKHXmoZofcQ
 UzL0UMNQqckhw==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

>> What about my suggestion of a 'window overlay property which points to a
>> symbol containing a list of windows?  If we had that, I think we'd have
>> a very complete solution, which could also be used by hs-minor-mode.
>
> I tried to implement this feature with the patch attached below.

Nice!

> But unfortunately, it can't be used for flymake because it requires
> duplicating all overlays, but flymake depends on the 1:1 mapping
> between errors and overlays.

Oh, right... we still need two different overlays to use this approach,
one for GUI and one for TTY.

flymake could be refactored to do that, though it would be a bit
annoying...

> To keep the existing design with one overlay per error
> we need to invent another way to add fringe/margin indicators
> conditionally.
>
> For example, to add a predicate to the fringe/margin spec like this:
>
>   #("!" 0 1
>     (display
>      (left-fringe flymake-double-exclamation-mark compilation-error PREDI=
CATE)))
>   #("!" 0 1
>     (display
>      ((margin left-margin PREDICATE)
>       #("=E2=80=BC" 0 1
>
> on the same overlay.
>
> Or like Dmitry proposed to add a condition to the display spec.

Oh, so we'd have two different strings with different text properties,
concatenated together?

With the conditional display spec approach, it would be like this:

(insert (concat
         (propertize "x" 'display '((when (not (display-graphic-p)) . "tty"=
)))
         (propertize "y" 'display '((when (display-graphic-p) . "gui")))))

This unfortunately still has the issue I mentioned in reply to Dmitry:
when you switch between frames, the appearance switches back and forth
in *all* frames.  I guess this is just due to details of the redisplay
machinery?  I suspect this would probably also be the case if we added a
new kind of PREDICATE on fringes and margins, as you suggest.

The 'window overlay property doesn't have this issue:

  (let ((ov (make-overlay 1 10)))
    (overlay-put ov 'window my-tty-window)
    (overlay-put ov 'display "tty"))
  (let ((ov (make-overlay 1 10)))
    (overlay-put ov 'window my-gui-window)
    (overlay-put ov 'display "gui"))

It also doesn't have the issue that Dmitry mentioned, where the
"carrier" string for the display properties needs to be non-empty, and
therefore will display on the other type of frame.  The "!" never
displays with these overlays:

(let ((ov (make-overlay 1 10)))
  (overlay-put ov 'window my-tty-window)
  (overlay-put ov 'before-string (propertize "!" 'display "tty")))
(let ((ov (make-overlay 1 10)))
  (overlay-put ov 'window my-gui-window)
  (overlay-put ov 'before-string (propertize "!" 'display "gui")))

So window-specific overlays seem great (when coupled with your patch
adding the ability to have a list of windows rather than just one), they
just require refactoring flymake to support multiple overlays.

Maybe refactoring flymake to duplicate the overlays is just the right
thing to do?

Pros:
- It works.

Cons:

- It's slightly complicated.

- It makes flymake performance slightly worse.

- It's less flexible.  If we wanted a third different kind of display
  later, and then we'd need to have three overlays for each diagnostic.
=20=20
Overall though, I think probably duplicating the overlays is the right
thing to do.

I'll wait for others to chime in though before I work on that, because
this still requires Juri's C changes to support a list of windows in the
window property.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 15 Oct 2025 18:29:02 +0000
Resent-Message-ID: <handler.77313.B77313.17605529387781 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17605529387781
          (code B ref 77313); Wed, 15 Oct 2025 18:29:02 +0000
Received: (at 77313) by debbugs.gnu.org; 15 Oct 2025 18:28:58 +0000
Received: from localhost ([127.0.0.1]:56815 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v96F7-00021M-PD
	for submit <at> debbugs.gnu.org; Wed, 15 Oct 2025 14:28:58 -0400
Received: from mout-p-101.mailbox.org ([80.241.56.151]:36232)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v96Ey-0001zh-Kf
 for 77313 <at> debbugs.gnu.org; Wed, 15 Oct 2025 14:28:54 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4cn02s61JHz9tK7;
 Wed, 15 Oct 2025 20:28:37 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760552917;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=CMI0/G+A8SvC8hHM3fhaxSWhALl6xgsHurYhq4WgYcQ=;
 b=Jh7uqfomlAlf+bDj7Sec2Y3iylwQYv7IeWmAvRqAVayN27Qu/9aTpSRj130iW1SEocyHQN
 9Ef2bOegxTXrJ2GBKLduhsG2H5xYzlILlGXAX6OuTzsRXXZF2OSq6DerbI/vwXvSGo2Kob
 AOUJ/Nx9/QUQtbxy6ynNMJmtHQDiBT74aisBlVGeEYQW5Lfo5MySzfhqT/+0fJoiSqFebb
 3TLiOAjeLJ6mD/HWoVw3GN6/X9L0yUYH//Bi+tCmEjLOYslXbj+3rzHQG0ONh90ll2NgjG
 tjV+O6gJdHD+gFcuZISfVtGwUmTpBlfdzrzuacyUgHSv3MU9umSIjoSmgCd54g==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::102 as permitted sender)
 smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <iery0pchwel.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN>
Date: Wed, 15 Oct 2025 21:27:23 +0300
Message-ID: <87ldlcggvo.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4cn02s61JHz9tK7
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> (insert (concat
>          (propertize "x" 'display '((when (not (display-graphic-p)) . "tty")))
>          (propertize "y" 'display '((when (display-graphic-p) . "gui")))))
>
> This unfortunately still has the issue I mentioned in reply to Dmitry:
> when you switch between frames, the appearance switches back and forth
> in *all* frames.  I guess this is just due to details of the redisplay
> machinery?

This is very strange, even separate conditions
on 'before-string' and 'after-string' can't display
their values independently on graphical and tty frames:

  (let ((o (make-overlay (pos-bol) (1+ (pos-bol)))))
    (overlay-put
     o 'before-string
     (propertize
      "!" 'display
      '((when (display-graphic-p) .
              (left-fringe flymake-double-exclamation-mark error)))))
    (overlay-put
     o 'after-string
     (propertize
      "?" 'display
      `((when (not (display-graphic-p)) .
              ((margin left-margin)
               ,(propertize ">" 'face 'error)))))))

They exhibit the same behavior that you described where the last frame wins,
and both frames show the same indicator in the margin.

> I suspect this would probably also be the case if we added a
> new kind of PREDICATE on fringes and margins, as you suggest.

Yes, very likely, since even the above case doesn't work as expected.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 15 Oct 2025 19:24:01 +0000
Resent-Message-ID: <handler.77313.B77313.176055620822882 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: sbaugh@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176055620822882
          (code B ref 77313); Wed, 15 Oct 2025 19:24:01 +0000
Received: (at 77313) by debbugs.gnu.org; 15 Oct 2025 19:23:28 +0000
Received: from localhost ([127.0.0.1]:57035 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v975o-0005wu-JL
	for submit <at> debbugs.gnu.org; Wed, 15 Oct 2025 15:23:28 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47240)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v975d-0005wK-Ef
 for 77313 <at> debbugs.gnu.org; Wed, 15 Oct 2025 15:23:17 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1v975V-00016L-CD; Wed, 15 Oct 2025 15:23:05 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=if4wEKnkbABB2YmIoaObl3aueesnCaD5GJxdwXTkDCU=; b=rMZj7wQAjeQC60a1jul5
 ZFd2iK7H/i1V+k7b3e+quqquQz1fO8MKHjRHiXpFxths2Whox2tFW3KxtjnEdnCm4vU4UucOXwioj
 rR78YdgbJTqVF5qwDgi7RZs7YhPN+x9m8JrCRM7NBDlRTZ+DBr5dOWItKYK0Zj8cQ89agaw7VHawu
 L0NZBfIbGPLe0lqtMgheNooRv+v76KF9mUQUzTnq6Rs0sTo0lGSey8HzY7cEfwajpovsYLAfF6rdx
 QRBWWi9TpkVkLwEYA7YlOQEx+IFI2oSU2F5C+tIHq4zLOA3QXq+IWteHdDp16Prio+zPTRl4Q6swj
 Ic0NtR1Bwcv3Jw==;
Date: Wed, 15 Oct 2025 22:22:59 +0300
Message-Id: <86frbkc6lo.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87ldlcggvo.fsf@HIDDEN> (message from Juri Linkov on
 Wed, 15 Oct 2025 21:27:23 +0300)
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Juri Linkov <juri@HIDDEN>
> Cc: Dmitry Gutov <dmitry@HIDDEN>,  Eli Zaretskii <eliz@HIDDEN>,
>   João Távora <joaotavora@HIDDEN>,
>   77313 <at> debbugs.gnu.org
> Date: Wed, 15 Oct 2025 21:27:23 +0300
> 
> > (insert (concat
> >          (propertize "x" 'display '((when (not (display-graphic-p)) . "tty")))
> >          (propertize "y" 'display '((when (display-graphic-p) . "gui")))))
> >
> > This unfortunately still has the issue I mentioned in reply to Dmitry:
> > when you switch between frames, the appearance switches back and forth
> > in *all* frames.  I guess this is just due to details of the redisplay
> > machinery?
> 
> This is very strange, even separate conditions
> on 'before-string' and 'after-string' can't display
> their values independently on graphical and tty frames:
> 
>   (let ((o (make-overlay (pos-bol) (1+ (pos-bol)))))
>     (overlay-put
>      o 'before-string
>      (propertize
>       "!" 'display
>       '((when (display-graphic-p) .
>               (left-fringe flymake-double-exclamation-mark error)))))
>     (overlay-put
>      o 'after-string
>      (propertize
>       "?" 'display
>       `((when (not (display-graphic-p)) .
>               ((margin left-margin)
>                ,(propertize ">" 'face 'error)))))))
> 
> They exhibit the same behavior that you described where the last frame wins,
> and both frames show the same indicator in the margin.

I think this is a manifestation of the caveat described in the last
paragraph of "Other Display Specs".

How about the following idea:

  . the overlay specifies indications both for the fringe and for the
    margin, like this:

     (let ((o (make-overlay 72 73)))
       (overlay-put
	o 'before-string
	(propertize
	 "!" 'display
	 '(left-fringe flymake-double-exclamation-mark error)))
       (overlay-put
	o 'after-string
	(propertize
	 "?" 'display
	 `((margin left-margin) ,(propertize ">" 'face 'error)))))

   . on GUI frames, we force the margin width to zero
   . on TTY frames, we force the margin to a positive value

Then on GUI frames, we will only see the fringe indicators, and on TTY
frames only the margin indicators.

(There's also the case of a GUI frame without fringes, but it could be
handled as if it were a TTY frame.)

WDYT?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 15 Oct 2025 20:03:03 +0000
Resent-Message-ID: <handler.77313.B77313.17605585675201 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: dmitry@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17605585675201
          (code B ref 77313); Wed, 15 Oct 2025 20:03:03 +0000
Received: (at 77313) by debbugs.gnu.org; 15 Oct 2025 20:02:47 +0000
Received: from localhost ([127.0.0.1]:57234 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v97hu-0001Ln-Ut
	for submit <at> debbugs.gnu.org; Wed, 15 Oct 2025 16:02:47 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:44593)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v97hp-0001K5-D1
 for 77313 <at> debbugs.gnu.org; Wed, 15 Oct 2025 16:02:42 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <86frbkc6lo.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 15 Oct
 2025 22:22:59 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN>
Date: Wed, 15 Oct 2025 16:02:34 -0400
Message-ID: <iersefkhr1h.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760558554;
 bh=FtCWHWGwcxoxnZdiYxG2NkBoDdrbLKe2/IZT17q+x3Q=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=JrspxJ/nWtlrOc2pYKtHrbD+od9ID4oYmo/X2YAI/Cfv9ay8FVfuqXjNRbJ0+iP6o
 1HYkvHRnNINwVCR/LB4y8C2ZzjPCfReRpyiXd37rDQeCsV6BZJ9f0j3cGqEvn25nB/
 F6ABnYm/8DceVqO7k+loISqZH2jaXbnHzwRLhUpPtps2v2rN0c34U0lRLdFQqRDKd3
 Vo+URAKzX6Jd10DP7GsXapaxyIJTHo5BYBcfsUSclLhYI3di5gnhaEWsDP/hhN9Ilr
 opIVaNqJlhZhCakJ0HiK4kAgMJ3c6+uHO5thOzdhMqnccw2+Es8j8CIADjTFX6czRF
 jNz4N4E51fR9Q==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:
>> From: Juri Linkov <juri@HIDDEN>
>> Cc: Dmitry Gutov <dmitry@HIDDEN>,  Eli Zaretskii <eliz@HIDDEN>,
>>   Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN>,
>>   77313 <at> debbugs.gnu.org
>> Date: Wed, 15 Oct 2025 21:27:23 +0300
>>=20
>> > (insert (concat
>> >          (propertize "x" 'display '((when (not (display-graphic-p)) . =
"tty")))
>> >          (propertize "y" 'display '((when (display-graphic-p) . "gui")=
))))
>> >
>> > This unfortunately still has the issue I mentioned in reply to Dmitry:
>> > when you switch between frames, the appearance switches back and forth
>> > in *all* frames.  I guess this is just due to details of the redisplay
>> > machinery?
>>=20
>> This is very strange, even separate conditions
>> on 'before-string' and 'after-string' can't display
>> their values independently on graphical and tty frames:
>>=20
>>   (let ((o (make-overlay (pos-bol) (1+ (pos-bol)))))
>>     (overlay-put
>>      o 'before-string
>>      (propertize
>>       "!" 'display
>>       '((when (display-graphic-p) .
>>               (left-fringe flymake-double-exclamation-mark error)))))
>>     (overlay-put
>>      o 'after-string
>>      (propertize
>>       "?" 'display
>>       `((when (not (display-graphic-p)) .
>>               ((margin left-margin)
>>                ,(propertize ">" 'face 'error)))))))
>>=20
>> They exhibit the same behavior that you described where the last frame w=
ins,
>> and both frames show the same indicator in the margin.
>
> I think this is a manifestation of the caveat described in the last
> paragraph of "Other Display Specs".
>
> How about the following idea:
>
>   . the overlay specifies indications both for the fringe and for the
>     margin, like this:
>
>      (let ((o (make-overlay 72 73)))
>        (overlay-put
> 	o 'before-string
> 	(propertize
> 	 "!" 'display
> 	 '(left-fringe flymake-double-exclamation-mark error)))
>        (overlay-put
> 	o 'after-string
> 	(propertize
> 	 "?" 'display
> 	 `((margin left-margin) ,(propertize ">" 'face 'error)))))
>
>    . on GUI frames, we force the margin width to zero
>    . on TTY frames, we force the margin to a positive value
>
> Then on GUI frames, we will only see the fringe indicators, and on TTY
> frames only the margin indicators.
>
> (There's also the case of a GUI frame without fringes, but it could be
> handled as if it were a TTY frame.)
>
> WDYT?

Good idea, that seems to work in my testing.

One issue, though, is bad interactions with other packages which want to
use the margin.

Namely: if some package wants to use the margin in a GUI frame, then
either we force the margin width to zero and break that package, or we
let the other package set a non-zero margin width and then our margin
indicators show up.

Maybe there's some other way we could hide the margin indicators on GUI
frames, other than just setting the margin width to 0?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 15 Oct 2025 23:52:06 +0000
Resent-Message-ID: <handler.77313.B77313.176057228619043 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176057228619043
          (code B ref 77313); Wed, 15 Oct 2025 23:52:06 +0000
Received: (at 77313) by debbugs.gnu.org; 15 Oct 2025 23:51:26 +0000
Received: from localhost ([127.0.0.1]:58405 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9BH3-0004vr-U9
	for submit <at> debbugs.gnu.org; Wed, 15 Oct 2025 19:51:24 -0400
Received: from fout-a2-smtp.messagingengine.com ([103.168.172.145]:58757)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1v9BGv-0004tE-Vy
 for 77313 <at> debbugs.gnu.org; Wed, 15 Oct 2025 19:51:14 -0400
Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52])
 by mailfout.phl.internal (Postfix) with ESMTP id 7717DEC01E1;
 Wed, 15 Oct 2025 19:51:03 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-12.internal (MEProxy); Wed, 15 Oct 2025 19:51:03 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1760572263;
 x=1760658663; bh=qesqUcCKFeHgrojw0IRP6K6PXm0VLriHx6Xzsdq0Rg4=; b=
 nRFDVMqvtsj11okHhqCoExATNuXzDBRgUIekgwUWsMNR+C7DelokbovkoUi77QMG
 pFNQShOwl+TleR3Jr+nvzHuOvvc7X0jq1O+nXdYiFZrjKJV/qt5VvqIt0a3kamve
 F+tLk60uWxDhx/nfWztF3OfuWPpEFIyOfmtUAMaGT5DoRDgN1bVgmUBzxLKJOd3U
 OMSDf+g/7P1/sHTrvrY2xbRD1neDCdXAf1KvAjd/e/GLbtHyPBagIMIHmcF2BLAO
 XFvK0ncUH38Dyitwud7gx+H7low9G8Qg8A9oa1abUzZ93jKoVRvV3L5m/zmcmZ8L
 AMLT6TkjCkKdnmoBnpxt4Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1760572263; x=
 1760658663; bh=qesqUcCKFeHgrojw0IRP6K6PXm0VLriHx6Xzsdq0Rg4=; b=R
 JQciTlxGA3vpfysENESN9vDGEjAmB0kXFsZql39dtHQg862OQR3LphFCOHikumxr
 c+Srq96V+3FmYTQga4CSATas0uGN2ZDUrT03HiG2+LYEREV44pWYVXeTrYjCbbrv
 65jZMywx2jNuF6HhixEH8iqC3MRKljG1O32b9QU/72VaMjBM1yT9pLwoIOG7u6tu
 xCDxpDEYBEsGjSxjzYQjji0PNjK8uEFKKIYANzuvWujlB6MFQ1uSYcLNfbXsHft5
 G/bpTzMsjGUk889wKsBJ9J0JWxP+hP5WzvBASUT81l6EeSUDTkqwoTd+j4tK2TZa
 FNYV26WTeXz1D5rwfOMxA==
X-ME-Sender: <xms:ZjPwaAkGuYK63YBIZJrxSHTYfXg2jQg3v338KhhrkkZqu98ZulN2zw>
 <xme:ZjPwaGuOrF3-o0pkvW6rVrCKFrZt6HuN9fhmjYR6r1eg3qW1XesRYb0FuGAdj1o-p
 bmroJghtLaR9ro1X82coXunz5S_VA6PLakiOJEJBFiw56fjplPs47Q>
X-ME-Received: <xmr:ZjPwaG9YI6Ka9YNsBR184MAlN3j93P3akvHLOKShMguksHk48kBuwDMNddA-2sS-7_Yl>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduvdegjeekucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu
 rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf
 gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhithhr
 hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg
 hrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedujeeh
 necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih
 htrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhp
 ohhuthdprhgtphhtthhopehssggruhhghhesjhgrnhgvshhtrhgvvghtrdgtohhmpdhrtg
 hpthhtohepjhhurhhisehlihhnkhhovhdrnhgvthdprhgtphhtthhopegvlhhiiiesghhn
 uhdrohhrghdprhgtphhtthhopehjohgrohhtrghvohhrrgesghhmrghilhdrtghomhdprh
 gtphhtthhopeejjeefudefseguvggssghughhsrdhgnhhurdhorhhg
X-ME-Proxy: <xmx:ZjPwaIOLdRhLV6LjYWRhtU-gqG73EqBVKookBmoqaJ7lqYtUbBOanw>
 <xmx:ZjPwaMHVPXEeCiSUQVza4Z6rPceRuyui18HnfK_Din6xbqWWu2kFgQ>
 <xmx:ZjPwaOTCRzVS7HYtZASbd8PB1HfyF3ijtL-J9Dh5g_pCq7zpkS8uKw>
 <xmx:ZjPwaBsbEOGPF8UrMZPtAlzhNyjShZOo2W5Q0s7FcVRw6yuHw6PqIQ>
 <xmx:ZzPwaD9JzLOEDx5Gj9XtONxKieJh9ea0gX0cJ4D0Sq6Pt8pJpDOYZvDr>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 15 Oct 2025 19:51:01 -0400 (EDT)
Message-ID: <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN>
Date: Thu, 16 Oct 2025 02:50:59 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <ier1pn4jclf.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 15/10/2025 20:31, Spencer Baugh wrote:

>> Perhaps we could use the
>>
>>    (when condition . spec)
>>
>> form of the display spec? Then it would take two overlays, though,
>> which would provide specs for graphic and non-graphic.
> 
> Great idea.
> 
> It looks like having a list of conditions also works, e.g.
> 
> (propertize "foo" 'display
>    '((when (not (display-graphic-p)) . "tty")
>      (when (display-graphic-p) . "gui")))
> 
> successfully shows "tty" when the buffer is displayed in a tty frame,
> and "gui" when displayed in a graphical frame.

Huh, it hadn't occurred to me to try a list. When the conditions are 
exhaustive, the " " thing can be a non-issue.

> So we don't need two overlays, just one would work, with this method.
> 
> Though, when the buffer is displayed in both frames at the same time,
> what's displayed depends on the frame which was last interacted-with
> (and therefore last redisplayed).

Personally, that sounds like a rare configuration, an even when that 
happens the user would probably continue to work on the buffer in the 
same frame (rather than switching back and forth), so they won't 
experience most of the downside.

So I would choose it as the "worse is better" kind of solution.

> That's a little ugly.  It looks like having two overlays instead avoids
> that problem, so maybe we would want to do that.

Maybe we could later alter the engine somehow to evaluate the conditions 
in all frames or something. I've no idea sure how difficult that is.

>> If the conditions are evaluated repeatedly when displaying the same
>> buffer in different windows, could be fine. There is a minor issue,
>> though, that when condition evaluates to nil, the " " string used as a
>> based becomes the overlay's display value. Maybe we could do something
>> about that.
> 
> Ah, you're right.  And an empty string doesn't work:
> 
> (overlay-put (make-overlay 1 10 (current-buffer)) 'before-string (propertize "" 'display "foo"))
> 
> This just displays nothing, because of course an empty string can't have
> text properties.

Right.

> So, I guess, maybe we could just put the display properties on an empty
> overlay?
> 
> (overlay-put (make-overlay 1 1 (current-buffer)) 'display "foo")
> 
> Alas, that also displays nothing.  Perhaps that's something we could
> change, though?

IIUC this will not help because the fringe spec needs to be in a 
'display' property on some string.

Here's also an example from the manual, which should have been shorter 
if putting a fringe spec on an overlay directly worked fine:

   (overlay-put
    (make-overlay (point) (point))
    'before-string (propertize
                    "x" 'display
                    `(left-fringe right-arrow warning)))




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 04:54:02 +0000
Resent-Message-ID: <handler.77313.B77313.176059042822127 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: dmitry@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176059042822127
          (code B ref 77313); Thu, 16 Oct 2025 04:54:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 04:53:48 +0000
Received: from localhost ([127.0.0.1]:60265 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9Fzn-0005kd-2H
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 00:53:48 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46828)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v9Fzk-0005jK-1u
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 00:53:45 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1v9Fzd-0007V7-Fd; Thu, 16 Oct 2025 00:53:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=j/kwvJ3g/1nkjyl5knX1eW4bXypamnvVDgv8yPDS3F0=; b=aWYfXyksPP4+
 BpisEQ9UqZOrc6UmCuufjpJxiSF0xAj+zPz9pmLpOxmsmztWDuTKl4B7dYtkF5YI+5cjkIsQDclcO
 JJpor9oRxkGmRNNzOtAjWcN6Eit3fhBp9+hQDSVPBLWjf3RxMyo6X12P2NUaWv1C5I0rXrgi6Pkt8
 Pk8lWUmoKOXi4cnY57BABGKNSEc/oWkrFnx2N8h0jBcS0q8l2V6UWJMIb5e3WqAOJzWbAtngxgD7c
 jAnPHVqd0SUlACuAsd7zWgTGtrPB1y3JbJYH+KViwM7bsfkDtfyo2nlc30T/4Ch4JGSlDUvi2a3pc
 d0+i33K97uLwssYHOTBjGw==;
Date: Thu, 16 Oct 2025 07:53:34 +0300
Message-Id: <86a51rcur5.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <iersefkhr1h.fsf@HIDDEN> (message from Spencer Baugh on
 Wed, 15 Oct 2025 16:02:34 -0400)
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: Juri Linkov <juri@HIDDEN>,  joaotavora@HIDDEN,
>    77313 <at> debbugs.gnu.org,  dmitry@HIDDEN
> Date: Wed, 15 Oct 2025 16:02:34 -0400
> 
> >   . the overlay specifies indications both for the fringe and for the
> >     margin, like this:
> >
> >      (let ((o (make-overlay 72 73)))
> >        (overlay-put
> > 	o 'before-string
> > 	(propertize
> > 	 "!" 'display
> > 	 '(left-fringe flymake-double-exclamation-mark error)))
> >        (overlay-put
> > 	o 'after-string
> > 	(propertize
> > 	 "?" 'display
> > 	 `((margin left-margin) ,(propertize ">" 'face 'error)))))
> >
> >    . on GUI frames, we force the margin width to zero
> >    . on TTY frames, we force the margin to a positive value
> >
> > Then on GUI frames, we will only see the fringe indicators, and on TTY
> > frames only the margin indicators.
> >
> > (There's also the case of a GUI frame without fringes, but it could be
> > handled as if it were a TTY frame.)
> >
> > WDYT?
> 
> Good idea, that seems to work in my testing.
> 
> One issue, though, is bad interactions with other packages which want to
> use the margin.
> 
> Namely: if some package wants to use the margin in a GUI frame, then
> either we force the margin width to zero and break that package, or we
> let the other package set a non-zero margin width and then our margin
> indicators show up.

Which packages that could be turned ON together with Flymake are
those?  How much of the margin space do they use when turned ON?

> Maybe there's some other way we could hide the margin indicators on GUI
> frames, other than just setting the margin width to 0?

Make the indicator string wider than the margin, by prepending leading
spaces and the indicator character at its end?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 05:35:02 +0000
Resent-Message-ID: <handler.77313.B77313.176059284922302 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: sbaugh@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176059284922302
          (code B ref 77313); Thu, 16 Oct 2025 05:35:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 05:34:09 +0000
Received: from localhost ([127.0.0.1]:60778 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9Gcq-0005ne-3D
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 01:34:08 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:38182)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v9Gcm-0005mz-Lf
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 01:34:05 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1v9Gcf-00045K-Ui; Thu, 16 Oct 2025 01:33:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=vGVounvMH0B12BQEcUIYplEFGrDtZ5KdbvggRA1ltVM=; b=rWVOaJqG4iSS
 wcluYI+LDbbXKrHvrGQpZec7zx0Ux48QYc7bkwIXXppX8b9juEbrgQ7YUDVCzIg2sS0OSft+IfJDJ
 8hLUAPCNtIE6WhB51TvPRw8mBg194KfSNMV2GHt0YQMANtcwN+gSNef79hITkMSwKoDB8Ss4nBsKF
 +CZTeb+Y4csqt1dpGaxxgU9UcjwN82WC2TqRSvzZ1L+COP7zDDR6icdZjxX29ww4UaM+NL9xqtsn2
 2RyCHM/mvKTblbpzHKsaItX7RkU7/brBNHWlyLA8QCsEfw3tJhq7tg/LBS1I7RojtKTG9mD5b4OQb
 y4SPJ883ZT86+7RQTtSo6g==;
Date: Thu, 16 Oct 2025 08:33:55 +0300
Message-Id: <861pn3csvw.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN> (message from
 Dmitry Gutov on Thu, 16 Oct 2025 02:50:59 +0300)
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
 <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 16 Oct 2025 02:50:59 +0300
> Cc: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
>  joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> Maybe we could later alter the engine somehow to evaluate the conditions 
> in all frames or something. I've no idea sure how difficult that is.

See the last paragraph of "Other Display Specs": this non-evaluation
is inherent to the display code, since it only examines the parts of
text where it has some reason to believe that changes were made.
Changes that affect conditions of display specs are not considered.

> > So, I guess, maybe we could just put the display properties on an empty
> > overlay?
> > 
> > (overlay-put (make-overlay 1 1 (current-buffer)) 'display "foo")
> > 
> > Alas, that also displays nothing.  Perhaps that's something we could
> > change, though?
> 
> IIUC this will not help because the fringe spec needs to be in a 
> 'display' property on some string.
> 
> Here's also an example from the manual, which should have been shorter 
> if putting a fringe spec on an overlay directly worked fine:
> 
>    (overlay-put
>     (make-overlay (point) (point))
>     'before-string (propertize
>                     "x" 'display
>                     `(left-fringe right-arrow warning)))

An overlay _can_ have a 'display' property directly on it, but it must
"cover" some text to have any effect.  An "empty" overlay with a
'display' spec will not do anything because there are no characters to
be replaced on display with what the spec says.  "Empty" overlays can
only have any effect if they specify before-string or after-string.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 07:00:02 +0000
Resent-Message-ID: <handler.77313.B77313.176059799614158 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176059799614158
          (code B ref 77313); Thu, 16 Oct 2025 07:00:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 06:59:56 +0000
Received: from localhost ([127.0.0.1]:33622 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9Hxs-0003gI-5O
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 02:59:56 -0400
Received: from mout-p-201.mailbox.org ([80.241.56.171]:59520)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v9Hxo-0003fl-Fc
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 02:59:53 -0400
Received: from smtp1.mailbox.org (smtp1.mailbox.org
 [IPv6:2001:67c:2050:b231:465::1])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4cnJjS3B3qz9tdm;
 Thu, 16 Oct 2025 08:59:40 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760597980;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=EzU7C/i59egWIczB+Ujzfi71+HhhcDKDAbucMaUBq78=;
 b=g6uEb93wCvJGTCmtwHuTiek0TLVjKPjYS660dXwXkBgh52pgbkdz2T/C2p0oJCBelHQ+7a
 8Ew6ZzyS19aAyynbf3CByY7kgsKl7Zl9JKBUFo+WbE0i2WqPoe8W7qHlb/ZKFPYt9gO/No
 NQyGSTqA0YMvlgvwsVHtn1czlKE/YYbIRoIBjKFohnxbsw++Mp7Wg4Fhrn163//zSOvkzj
 6HeXXagBDQiy0sco8kjTMU4yPDv9gNrxuegnf/ueBGUHamaLXoDl9jaF/e8FU7i/OBUXGK
 Pe8gOlv36wh/mbokqO6k+X4or86WKHbCnIGpaSzF945gKmPbOTkSjK4cFg11Cg==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::1 as permitted sender) smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <86a51rcur5.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN>
Date: Thu, 16 Oct 2025 09:53:39 +0300
Message-ID: <87ecr3ib8g.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4cnJjS3B3qz9tdm
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> One issue, though, is bad interactions with other packages which want to
>> use the margin.
>> 
>> Namely: if some package wants to use the margin in a GUI frame, then
>> either we force the margin width to zero and break that package, or we
>> let the other package set a non-zero margin width and then our margin
>> indicators show up.
>
> Which packages that could be turned ON together with Flymake are
> those?  How much of the margin space do they use when turned ON?

For example, outline-minor-mode and hs-minor-mode
that both require one column in margins.

>> Maybe there's some other way we could hide the margin indicators on GUI
>> frames, other than just setting the margin width to 0?
>
> Make the indicator string wider than the margin, by prepending leading
> spaces and the indicator character at its end?

Then how to make it shorter when need to show the indicator?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 07:55:02 +0000
Resent-Message-ID: <handler.77313.B77313.176060125526047 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: sbaugh@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176060125526047
          (code B ref 77313); Thu, 16 Oct 2025 07:55:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 07:54:15 +0000
Received: from localhost ([127.0.0.1]:33775 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9IoQ-0006lz-FO
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 03:54:15 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42678)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v9IoK-0006lL-Bg
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 03:54:11 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1v9IoD-0006SJ-8I; Thu, 16 Oct 2025 03:54:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=0Zz2071+FQxHIOIb5XHrpnoswyxXHx28J7QSh0UVXVE=; b=ZZKwXB9Q1l7d
 MQmZSn/T9HcMR6pSE3r6NIkJGqh/rZ16cM79T82FheONuSITpMYSMPN5Cl299SVuchcplfh2GxxOl
 uLgcGkwuNBGwHE2OTNqkdz6fPSAKFOL3peBkmGS8640qvHi6qzNRHhB18K7PUVyeXg8vO2mGob5xk
 9AQzKHmWDs3jm0ZE12aoWqkPWOPqp3UWkojtf7Z2WBwJgCaFfW7HLkkTHiY8nAE8IgqLlVKy6h1tt
 ezrivpUyrozu1EIvQ+0FYJqbWaHIbZLCZY++GbUUXHZH2lHYM9H8dliCRRn8IBTurmGznzzwZbp12
 +t0khiDKyEscAPTtyK9J5Q==;
Date: Thu, 16 Oct 2025 10:53:56 +0300
Message-Id: <86planb7u3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87ecr3ib8g.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 16 Oct 2025 09:53:39 +0300)
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: Spencer Baugh <sbaugh@HIDDEN>,  joaotavora@HIDDEN,
>   77313 <at> debbugs.gnu.org,  dmitry@HIDDEN
> Date: Thu, 16 Oct 2025 09:53:39 +0300
> 
> >> Maybe there's some other way we could hide the margin indicators on GUI
> >> frames, other than just setting the margin width to 0?
> >
> > Make the indicator string wider than the margin, by prepending leading
> > spaces and the indicator character at its end?
> 
> Then how to make it shorter when need to show the indicator?

On GUI frames, we never need to show it in the margin, right?

So, if we expect, say, 2 columns be taken by outline-minor-mode and
hs-minor-mode, make the margin indicator of Flymake 3-column wide.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 11:29:01 +0000
Resent-Message-ID: <handler.77313.B77313.176061409113843 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: sbaugh@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176061409113843
          (code B ref 77313); Thu, 16 Oct 2025 11:29:01 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 11:28:11 +0000
Received: from localhost ([127.0.0.1]:34587 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9M9S-0003bD-Le
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 07:28:11 -0400
Received: from fout-b4-smtp.messagingengine.com ([202.12.124.147]:54175)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1v9M9N-0003aQ-8q
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 07:28:07 -0400
Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45])
 by mailfout.stl.internal (Postfix) with ESMTP id D81661D0009E;
 Thu, 16 Oct 2025 07:27:58 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-05.internal (MEProxy); Thu, 16 Oct 2025 07:27:59 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1760614078;
 x=1760700478; bh=qoJo6JJd4jB7uUCd2/HDXdi4nELqb1OXp8dvPmx2kpE=; b=
 nx9oUwCaCMKoy90umOa3XR5A7E4jSGUtBPVZ7+7DN/m6KMUyJIvMvzeQV5OMVmdx
 9k8GhYAnv24ndOvdjkoJgLVP2SJ0J/UhAkR12Asge+wFP1e2fSZkLnI3Or3aYI3T
 60oQnDFG5sQX6VkTp2vAOC3jCTYipQKymuikynmc8LAUlz5KxOIZDrML2ZigYjKI
 ZDMnN4TruN9+0Oivqkj5RrGbLYdlQzuDrM7yz2EGiiQwsryyQRO9ohAPkYHC4CoD
 YR5xHXACZ/FFg9i/F/nBScQvcGdyll32K8Vq/TEBTZbcwYWA7o4bngcgHg34+V9C
 TADE6FC8SeOFGjxUZyYppg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1760614078; x=
 1760700478; bh=qoJo6JJd4jB7uUCd2/HDXdi4nELqb1OXp8dvPmx2kpE=; b=X
 lvuqnVPWZBBnoHNrfvIxixmjKCkKLAVASDyK1i7NPT9/z7kPatuHyV4YVwyKUxWK
 NpEcimSKl3IzFYrw2u5NW6iQG6YOxc5RKAlwVceX+lSley5roZf/+qzyOWfBFq8S
 RgMkBhe/vAwsth+YKqfFdsgqUSYzlt6JfntV3xPjSOKumcB6eiLDyNZqIFV0crPX
 TJr1qsiejj3Xnbylh3insduXBempJhFqy2zUvy08kUansaNFnFXkO3HNiomzdkm6
 EiL3Kikhqap3neF8a4a7J71LZCOqjnBv8RRFfuuT7QPupYpBWCgeXbt0GHPwKU4H
 jYzJp6QDoci9Dl+XzR54w==
X-ME-Sender: <xms:vtbwaFsJaZolNweKoKQVG46Ig1WDPyZdPjvFOalmqBGMDb_YG2gpQw>
 <xme:vtbwaFWkMcL7CEmWyFn0SbvfqGg5LprhuVtS8I3eQa_Puat7RojOo8oCMFL2BmOYV
 -syZKgUKqfyL0pNzRi1RNWcIGQPwDV8ZutyFPPtF_BZR9msFVz7gbw>
X-ME-Received: <xmr:vtbwaBHpNSB9S3LEm5Aj5i2M_B5jiqddUCcwMmdRl6me_INMxrHW9KPVt789gIzbMiAI>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduvdeiudejucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu
 rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf
 gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhithhr
 hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg
 hrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedujeeh
 necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih
 htrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhp
 ohhuthdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopehssggruh
 hghhesjhgrnhgvshhtrhgvvghtrdgtohhmpdhrtghpthhtohepjhhurhhisehlihhnkhho
 vhdrnhgvthdprhgtphhtthhopehjohgrohhtrghvohhrrgesghhmrghilhdrtghomhdprh
 gtphhtthhopeejjeefudefseguvggssghughhsrdhgnhhurdhorhhg
X-ME-Proxy: <xmx:vtbwaH2spkW0rvMv8Vh3dtVGFQw2ucDoGVsVTtycA20nKjEDQ5m3vw>
 <xmx:vtbwaDN8QQUmSscCX2uofyQuz29xBB5F2uaZ-Bg_n6KoWi4QuR9TRw>
 <xmx:vtbwaG4NeM8UC7V-ZHEwnalhfjitumO-7Y7RuW4q7EjSeYkSzC94Ng>
 <xmx:vtbwaN3Tz01PS6lntuDV-Y4fIKntnmMD7G5dhjGyEEHYH5IZ-LxOrw>
 <xmx:vtbwaInoLsuTckT0dk3yUWDwkhDI5iQCR4WWOvNv0BoymQPDLNXYW7DS>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 16 Oct 2025 07:27:56 -0400 (EDT)
Message-ID: <7d01fcae-07b3-4126-a277-29150f24cac6@HIDDEN>
Date: Thu, 16 Oct 2025 14:27:54 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
 <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN> <861pn3csvw.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <861pn3csvw.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 16/10/2025 08:33, Eli Zaretskii wrote:
>> Date: Thu, 16 Oct 2025 02:50:59 +0300
>> Cc: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
>>   joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
>> From: Dmitry Gutov <dmitry@HIDDEN>
>>
>> Maybe we could later alter the engine somehow to evaluate the conditions
>> in all frames or something. I've no idea sure how difficult that is.
> 
> See the last paragraph of "Other Display Specs": this non-evaluation
> is inherent to the display code, since it only examines the parts of
> text where it has some reason to believe that changes were made.
> Changes that affect conditions of display specs are not considered.

I mean yes, the current behavior is fair and compliant.

Graphical/non-graphical terminals are fairly different, so it might make 
sense to redo some checks between terminals anyway.

>>> So, I guess, maybe we could just put the display properties on an empty
>>> overlay?
>>>
>>> (overlay-put (make-overlay 1 1 (current-buffer)) 'display "foo")
>>>
>>> Alas, that also displays nothing.  Perhaps that's something we could
>>> change, though?
>>
>> IIUC this will not help because the fringe spec needs to be in a
>> 'display' property on some string.
>>
>> Here's also an example from the manual, which should have been shorter
>> if putting a fringe spec on an overlay directly worked fine:
>>
>>     (overlay-put
>>      (make-overlay (point) (point))
>>      'before-string (propertize
>>                      "x" 'display
>>                      `(left-fringe right-arrow warning)))
> 
> An overlay _can_ have a 'display' property directly on it, but it must
> "cover" some text to have any effect.  An "empty" overlay with a
> 'display' spec will not do anything because there are no characters to
> be replaced on display with what the spec says.  "Empty" overlays can
> only have any effect if they specify before-string or after-string.

And if the overlay covers any text, then it would hide the corresponding 
characters, creating visible glitches.

What we could do is, uh, maybe a new overlay property which would work 
on overlays of 0 length, and would have the same possible values as the 
current display specs (though not all of them might make sense).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 12:25:01 +0000
Resent-Message-ID: <handler.77313.B77313.17606174493010 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: sbaugh@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17606174493010
          (code B ref 77313); Thu, 16 Oct 2025 12:25:01 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 12:24:09 +0000
Received: from localhost ([127.0.0.1]:34714 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9N1Z-0000mR-DZ
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 08:24:08 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51050)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v9N1T-0000ln-RB
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 08:24:00 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1v9N1H-0000g3-8f; Thu, 16 Oct 2025 08:23:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=/9NcVVxqGg91GYUkequq/kVej20//9saR7frkBD4x1U=; b=E/4wf/5ug4t1
 d+ARFxDMONTLC82CbrFkyFxZyKR+7etVTbMmHBKBc/JShEL5BFJHawK1+eSrOp+ZDuZ3HXUF+1qL+
 Fko3QDGYchQmzSdJmi4lYOH2Z9NCJHs4MDvOHQ+xeyb8xls8UhpxVEBFn3LhMwcR9+KbQfIksUn7d
 eKoadJK5K5CxBR/b4A3rpJ3WmqMS30c4zy+Cje9XmAKIxZOVzX0HM7eCYpkN9CEcIINLzcAd3/wH5
 wGpH1ZL2+kbh0zfvt/iijvbHin6MHBltUzj4eVZFkFmaSS/EGOgCHkviB12PpNMNqgxhGmwLuIDQp
 Z8KWbLVTWvK3TC401I40Og==;
Date: Thu, 16 Oct 2025 15:23:42 +0300
Message-Id: <86ldlbavch.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <7d01fcae-07b3-4126-a277-29150f24cac6@HIDDEN> (message from
 Dmitry Gutov on Thu, 16 Oct 2025 14:27:54 +0300)
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
 <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN> <861pn3csvw.fsf@HIDDEN>
 <7d01fcae-07b3-4126-a277-29150f24cac6@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 16 Oct 2025 14:27:54 +0300
> Cc: sbaugh@HIDDEN, juri@HIDDEN, joaotavora@HIDDEN,
>  77313 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> > An overlay _can_ have a 'display' property directly on it, but it must
> > "cover" some text to have any effect.  An "empty" overlay with a
> > 'display' spec will not do anything because there are no characters to
> > be replaced on display with what the spec says.  "Empty" overlays can
> > only have any effect if they specify before-string or after-string.
> 
> And if the overlay covers any text, then it would hide the corresponding 
> characters, creating visible glitches.

Yes, like 'display' property of this kind always does.

> What we could do is, uh, maybe a new overlay property which would work 
> on overlays of 0 length, and would have the same possible values as the 
> current display specs (though not all of them might make sense).

If we are going to make changes to display code, I'd rather support a
special kind of fringe spec which would automatically switch to using
the margin if the fringe is not available.  That's be easier to use
and will probably be welcome in more applications.  Patches welcome.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 13:03:02 +0000
Resent-Message-ID: <handler.77313.B77313.176061972422057 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176061972422057
          (code B ref 77313); Thu, 16 Oct 2025 13:03:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 13:02:04 +0000
Received: from localhost ([127.0.0.1]:34823 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9NcK-0005jg-5Q
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 09:02:04 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:42881)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v9NcA-0005ig-OM
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 09:01:57 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <86ldlbavch.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 16 Oct
 2025 15:23:42 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
 <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN>
 <861pn3csvw.fsf@HIDDEN>
 <7d01fcae-07b3-4126-a277-29150f24cac6@HIDDEN>
 <86ldlbavch.fsf@HIDDEN>
Date: Thu, 16 Oct 2025 09:01:48 -0400
Message-ID: <ierplanhuf7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760619708;
 bh=xy/8dgxKKkeZBqGew+E+X8DZqM2ULSPZmbv3kEgymJo=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=hgn9PqD65nraRosNKSFv0MQeONHn2iIaffCQClR+eo2GXP988DUH/Byh+1F6CPyKb
 OJBPs4I7B1rulJaMoH9vFOtIlZ+kkHjcI06jaVMP2N2g/oX0DHX1MtO2m+tx5MGuYz
 UjXp/rjvQ0r7Hfy2OO1COwNL6XDpbEKAW2LwR/1KSQHFk78/v8O/D/7ci8049+giBU
 ctXQfaSaGT5Bo/AnV3HJDyN6/o1oBn6QtwaRW7FdrT2t9B1yzLzlEniPmDVMqOVB7H
 0Dti7iOcvDF5GLIhpvuKlOuGQaBIJcNo7t1SyX7YHuQwdxleI+bKou91D5iIQs/4nO
 ffsyCtm4E6faA==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:
> If we are going to make changes to display code, I'd rather support a
> special kind of fringe spec which would automatically switch to using
> the margin if the fringe is not available.  That's be easier to use
> and will probably be welcome in more applications.  Patches welcome.

Something like that would be ideal, if we can decide on a way to do it.

I think what would be best is not falling back to the margin, but some
new "text fringe" which is a better match to the behavior of the
currently-existing bitmap fringe.

- the text fringe is mutually exclusive with the current bitmap fringe:
  only one of them is ever displayed in any window

- like the current bitmap fringe, and unlike the margin, the text fringe
  would only show one fringe spec at a time rather than combining them

- The default size of the text fringe would be 0, but flymake (or other
  applications) could set it to a non-zero size.  This would only affect
  windows which don't have bitmap fringes.  Since the text and bitmap
  fringes are mutually exclusive, flymake would simply enable the text
  fringe unconditionally in flymake-mode or flymake-start: no need to
  check if we're on a GUI frame.

- Fringe specs would have a new optional element at the end of the list
  which specifies the text to show in the text fringe.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 13:30:03 +0000
Resent-Message-ID: <handler.77313.B77313.176062134427778 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Cc: joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176062134427778
          (code B ref 77313); Thu, 16 Oct 2025 13:30:03 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 13:29:04 +0000
Received: from localhost ([127.0.0.1]:34908 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9O2R-0007Dv-Gn
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 09:29:04 -0400
Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]:51081)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1v9O2K-0007DW-A2
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 09:28:57 -0400
Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50])
 by mailfhigh.stl.internal (Postfix) with ESMTP id 7CEDF7A028A;
 Thu, 16 Oct 2025 09:28:50 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-10.internal (MEProxy); Thu, 16 Oct 2025 09:28:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1760621330;
 x=1760707730; bh=nQqx7qAMXJZ07ee7rq/y2bEJ59QQgn7HqUI+KfTVKRU=; b=
 cIe+AaWBcuWTl5jbN0ZkgZ4FaCU2Tv6FCQ9T+lvMMXX1Mvlr8mB0MsM4RyZNyH39
 jPcMohfwpv3/n6EbHb/dW+7T1Po3ThumaI2dZKXzr1nCdHsZcP0kdp6qUoL+hoCu
 Ica09dD50UmPov4522c2y+xwvDlf1dGuBnEOFDfmyeCB4N5ooOxz3EJ1dF4vlRPh
 +w94srNrChdWfudKit5TawXqkJZF2p/c52h9Gz/1YZcIBX9IR8YkmS/Jvhy59QmZ
 wRbVdts0y3C5wnpNU890Hkg0EFrepQQDPqZBDBKAExZ6tui3TdFOLHblBksgWeoO
 pXsExSXttIT6zaTQ+OjkQQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1760621330; x=
 1760707730; bh=nQqx7qAMXJZ07ee7rq/y2bEJ59QQgn7HqUI+KfTVKRU=; b=B
 WabdHjTckj0TR1GVjtjVU/EKBuEjAXjyuGmRPYUZbQ+wkmcfoYO36SKV7NLmegA4
 d7UCKgJnV8wrnR4FFK8azqrywnoW3jwusxDuq9MbecC4NsgfEL0YtZr/YsseGRrt
 tS4J1QGjbJSXWyp/dvQrkRjcTKsPPdUUNl9W0G1735ZI707Ktmd4tYispNFhVqjG
 Lu4I15N4emljKhUc3s6oSSqJZrqnWG/jjAZujiFr2aPxabZZpVDL5cDa7egGHtu8
 VGPsj4elBcOBd/5Sdfv9TZaNOffE9NHyJnWcU43emgqAtx/ziN2bn09m2tbRRR+M
 JgmaHLRGar6ypept1zMyA==
X-ME-Sender: <xms:EfPwaCy442qxsbhJjLkUYqi29dAILv_oI74k9KPSKLTZYxp6qVLyoA>
 <xme:EfPwaFLZKSaa86aCYXx2yzqBHUAF5AVnoKiLhEcyVPS6c92YXCwiR-psEDdFIUB0k
 Q0IGMXD-PAcT3nmyH8LyToJqzhjipp3lRXkETvmT_XY3_RpMwwgFJQ>
X-ME-Received: <xmr:EfPwaMrGu-8VVs5mqAHq76KnQNf7VHQnjVtpTaTriWOYMj1KLi2E4GMGaekQZYC26NXZ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduvdeigeduucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu
 rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf
 gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhithhr
 hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg
 hrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedujeeh
 necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih
 htrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhp
 ohhuthdprhgtphhtthhopehssggruhhghhesjhgrnhgvshhtrhgvvghtrdgtohhmpdhrtg
 hpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtohepjhhorghothgrvhhorhgr
 sehgmhgrihhlrdgtohhmpdhrtghpthhtohepjeejfedufeesuggvsggsuhhgshdrghhnuh
 drohhrghdprhgtphhtthhopehjuhhriheslhhinhhkohhvrdhnvght
X-ME-Proxy: <xmx:EfPwaEJKZrtdc6BXwiEbXgMtLMtBu54PBFaqwK48K9jNXKQ_QYSiSg>
 <xmx:EfPwaBSnMpfCjSBMiSeNHLrcwlcGzYFaTxOOyND3-ysnWE0fy1dJYA>
 <xmx:EfPwaDt1GUXjPq39x-O1nPjreKGKGAAfyN1Majbxn-h8Gv9eWwOqOA>
 <xmx:EfPwaCY0x91hPUu3WgZLfBxPSPB6J5jk8YeX2mn9mVOpH65FxKJgrQ>
 <xmx:EvPwaLZh7DD_pnxeISnORhamwMSlbTnjLBdmyPuGv-JtuWTe-53fGYZM>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 16 Oct 2025 09:28:48 -0400 (EDT)
Message-ID: <8d5b8064-32fa-44f1-ae17-238e41616dac@HIDDEN>
Date: Thu, 16 Oct 2025 16:28:46 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
 <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN> <861pn3csvw.fsf@HIDDEN>
 <7d01fcae-07b3-4126-a277-29150f24cac6@HIDDEN> <86ldlbavch.fsf@HIDDEN>
 <ierplanhuf7.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <ierplanhuf7.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 16/10/2025 16:01, Spencer Baugh wrote:
> Eli Zaretskii <eliz@HIDDEN> writes:
>> If we are going to make changes to display code, I'd rather support a
>> special kind of fringe spec which would automatically switch to using
>> the margin if the fringe is not available.  That's be easier to use
>> and will probably be welcome in more applications.  Patches welcome.
> 
> Something like that would be ideal, if we can decide on a way to do it.
> 
> I think what would be best is not falling back to the margin, but some
> new "text fringe" which is a better match to the behavior of the
> currently-existing bitmap fringe.
> 
> - the text fringe is mutually exclusive with the current bitmap fringe:
>    only one of them is ever displayed in any window
> 
> - like the current bitmap fringe, and unlike the margin, the text fringe
>    would only show one fringe spec at a time rather than combining them

Don't we want to be able to combine the markers from different sources? 
Like from diff-hl and flymake, say.

> - The default size of the text fringe would be 0, but flymake (or other
>    applications) could set it to a non-zero size.  This would only affect
>    windows which don't have bitmap fringes.  Since the text and bitmap
>    fringes are mutually exclusive, flymake would simply enable the text
>    fringe unconditionally in flymake-mode or flymake-start: no need to
>    check if we're on a GUI frame.

It would be nice to have the text fringe automagically resize when there 
is something to show, instead of having each package decide that it 
needs to enlarge it (and to which size).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 13:39:02 +0000
Resent-Message-ID: <handler.77313.B77313.176062193230015 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: dmitry@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176062193230015
          (code B ref 77313); Thu, 16 Oct 2025 13:39:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 13:38:52 +0000
Received: from localhost ([127.0.0.1]:35000 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9OBt-0007o0-6A
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 09:38:52 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56618)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v9OBd-0007nX-PT
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 09:38:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1v9OBU-00033c-Hf; Thu, 16 Oct 2025 09:38:24 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=nMbRUVsVSRahWpUYhJa6a9umHj+opftSvTfzrvIuDGg=; b=YIlr9TDldbDx
 lppjx1E8LUvKAFWQrYBLHQElDTS43AR9PkpQY0LInkPehegW84hGVhNIdtHJInnyUO2dGCMVvVCL8
 e6uGIO7yuU/x9cQ943cc+6uoGMycCVCVE9oNukuiFbc/aIgqHmQQ7S6WaGqv35vlW29L+xdpmAWoF
 /lkZKrg11IbEAMvcRibIFOCg/5jWVUrgeoBbYNic2pIUv1qs4K1ruhqsH4eydYHSpaIkXE7aVXN1O
 4kDQ69LB3cnQPTUpm7LOfZplEHJuX7siKD2tafdZqraVk110Yd6k7dNhoUQtUXMH7hbqZG70bkERA
 jpiw7dEZTDOMLbsQmUoiNw==;
Date: Thu, 16 Oct 2025 16:38:19 +0300
Message-Id: <86frbjge5w.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <ierplanhuf7.fsf@HIDDEN> (message from Spencer Baugh on
 Thu, 16 Oct 2025 09:01:48 -0400)
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
 <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN>
 <861pn3csvw.fsf@HIDDEN>
 <7d01fcae-07b3-4126-a277-29150f24cac6@HIDDEN>
 <86ldlbavch.fsf@HIDDEN> <ierplanhuf7.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: Dmitry Gutov <dmitry@HIDDEN>,  joaotavora@HIDDEN,
>    77313 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Thu, 16 Oct 2025 09:01:48 -0400
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> > If we are going to make changes to display code, I'd rather support a
> > special kind of fringe spec which would automatically switch to using
> > the margin if the fringe is not available.  That's be easier to use
> > and will probably be welcome in more applications.  Patches welcome.
> 
> Something like that would be ideal, if we can decide on a way to do it.
> 
> I think what would be best is not falling back to the margin, but some
> new "text fringe" which is a better match to the behavior of the
> currently-existing bitmap fringe.

That can also be done, but is much more complex and harder, and will
require more invasive changes in the display code.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 13:58:02 +0000
Resent-Message-ID: <handler.77313.B77313.17606230773279 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17606230773279
          (code B ref 77313); Thu, 16 Oct 2025 13:58:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 13:57:57 +0000
Received: from localhost ([127.0.0.1]:36277 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9OUN-0000ql-5F
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 09:57:56 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:55385)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v9OUB-0000on-VK
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 09:57:47 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <8d5b8064-32fa-44f1-ae17-238e41616dac@HIDDEN> (Dmitry Gutov's
 message of "Thu, 16 Oct 2025 16:28:46 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
 <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN>
 <861pn3csvw.fsf@HIDDEN>
 <7d01fcae-07b3-4126-a277-29150f24cac6@HIDDEN>
 <86ldlbavch.fsf@HIDDEN> <ierplanhuf7.fsf@HIDDEN>
 <8d5b8064-32fa-44f1-ae17-238e41616dac@HIDDEN>
Date: Thu, 16 Oct 2025 09:57:36 -0400
Message-ID: <ierms5rhru7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760623057;
 bh=9GmT0FIdIidA1bWf7ePQSN+3IIY+oXPxHYfTGT8ZiQg=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=DrnYyzAH/kEMdeZVYfiGjJz8hOMQsD9lknmSWedOfGl8wYtmK8NeZaRCCN6QPJXej
 gtAkjYoJOgumd2vdGCqKXYmeLI5xJWnnJ3QYlLkRwkyk8rheo1AeeWfgxZ0sbtc1Ro
 WLYSj4j0aFuQm98XNwIEVaphZM2ApSpo8smJ81RfQABQw5d1e/Lca2w2TXR5XEGa2l
 Kd+kpf6AfrkbP5aUm0ruU6pqphgCVEeppSmz83dgXOabF/HNyPxFHxDjzB7qdj0/xr
 jsGiHMJRDS97n7yfliIfU6jht2H0STKvWZybtBaB44AAjYlZnyWN0srv8J8GXC9Bah
 cjt35i54I1LyQ==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Dmitry Gutov <dmitry@HIDDEN> writes:

> On 16/10/2025 16:01, Spencer Baugh wrote:
>> Eli Zaretskii <eliz@HIDDEN> writes:
>>> If we are going to make changes to display code, I'd rather support a
>>> special kind of fringe spec which would automatically switch to using
>>> the margin if the fringe is not available.  That's be easier to use
>>> and will probably be welcome in more applications.  Patches welcome.
>> Something like that would be ideal, if we can decide on a way to do
>> it.
>> I think what would be best is not falling back to the margin, but
>> some
>> new "text fringe" which is a better match to the behavior of the
>> currently-existing bitmap fringe.
>> - the text fringe is mutually exclusive with the current bitmap
>> fringe:
>>    only one of them is ever displayed in any window
>> - like the current bitmap fringe, and unlike the margin, the text
>> fringe
>>    would only show one fringe spec at a time rather than combining them
>
> Don't we want to be able to combine the markers from different
> sources? Like from diff-hl and flymake, say.

Certainly, but there's no support for combining markers from different
sources for bitmap fringes, right?  And I'm not sure how we ever would
support it.  Which suggests we shouldn't support it for text fringes.

Though, if anyone has a clever idea for combining multiple fringe
bitmaps, it's worth talking about before deciding on this as the model
for text fringes.

>> - The default size of the text fringe would be 0, but flymake (or other
>>    applications) could set it to a non-zero size.  This would only affect
>>    windows which don't have bitmap fringes.  Since the text and bitmap
>>    fringes are mutually exclusive, flymake would simply enable the text
>>    fringe unconditionally in flymake-mode or flymake-start: no need to
>>    check if we're on a GUI frame.
>
> It would be nice to have the text fringe automagically resize when
> there is something to show, instead of having each package decide that
> it needs to enlarge it (and to which size).

I was initially thinking that, but I suspect the straightforward way to
do that in the display engine would be based on the display properties
which are currently on-screen.  Which in turn means that if you scroll
away from a diagnostic, the text fringe would resize back to 0, which
would be annoying, I think.

At the very least, if there were no overlays in the buffer with
diagnostics, the text fringe would be resized back to 0, and resized to
non-zero the first time an overlay is inserted, which seems like it
would be annoying as flymake clears and reinserts diagnostics.

So I think we may indeed just need to have applications explicitly
enable the text fringe, just like they need to resize the margin.  It's
annoying, but it's less bad than the margin case since we don't need to
accomodate multiple different identifiers showing up in the text fringe,
and resizing it to the sum of the lengths of all of those.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 15:47:02 +0000
Resent-Message-ID: <handler.77313.B77313.17606295885359 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: sbaugh@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17606295885359
          (code B ref 77313); Thu, 16 Oct 2025 15:47:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 15:46:28 +0000
Received: from localhost ([127.0.0.1]:36689 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9QBO-0001OJ-Vd
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 11:46:28 -0400
Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]:50148)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v9QBI-0001Nq-Kg
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 11:46:22 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4cnXP02rKQz9tHQ;
 Thu, 16 Oct 2025 17:46:12 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760629572;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=RHIaAigrd5VJ6P+8D8515+enq8Gk+81Bhwp51DffXAk=;
 b=h5ARnpKR/WDnYVdIgQ5LjD3LdINFKRnqHB2heD6Q+k5dFgakK9Zfb7o6RtwTTP2anEPEd2
 Y1gnTBhNGd1QLveQfXPVwSkfzEJReSlbVnbisqp3d+OeYGZcyUl04XbWFOoohW80Pc8tq4
 GdsTDqwIBra/pL/WbCKt+KqHkCDY0xXugKu6Om5fuUlzk5UiB8gNCE8bNVUV+sekV1UMm6
 OkiCw57PdEXHE+RHjxJgER1kNIYJ/93vFxTttqyQE7W1fBJ+6qzCp2Pl8epw0fEHt0LghL
 r0bdQNgNHBnHFSkJnewnagQw2QETD7dn9KuqzkpIe3x7bKK1JsWAUfk1tgw96Q==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::102 as permitted sender)
 smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <86planb7u3.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <ierfrbt8eyc.fsf_-_@HIDDEN> <86v7koaaja.fsf@HIDDEN>
 <87347sh85u.fsf@HIDDEN> <86bjmga4gd.fsf@HIDDEN>
 <878qhkaur0.fsf@HIDDEN> <86o6qf8e2h.fsf@HIDDEN>
 <871pn67uak.fsf@HIDDEN> <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN>
Date: Thu, 16 Oct 2025 18:29:27 +0300
Message-ID: <87qzv2oor1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Rspamd-Queue-Id: 4cnXP02rKQz9tHQ
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

> On GUI frames, we never need to show it in the margin, right?
>
> So, if we expect, say, 2 columns be taken by outline-minor-mode and
> hs-minor-mode, make the margin indicator of Flymake 3-column wide.

Here is the patch that shows the margins only on a tty frame
or on a graphical frame without fringes.  It keeps all existing
margins enabled by outline-minor-mode and hs-minor-mode.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=flymake-autoresize-margins.patch

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 88ebf1ccd97..735c37f020f 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -319,11 +320,6 @@ flymake-timer
 (defvar-local flymake-check-start-time nil
   "Time at which syntax check was started.")
 
-(defvar-local flymake--original-margin-width nil
-  "Store original margin width.
-Used by `flymake--resize-margins' for restoring original margin width
-when flymake is turned off.")
-
 (defun flymake--log-1 (level sublog msg &rest args)
   "Do actual work for `flymake-log'."
   (let (;; never popup the log buffer
@@ -874,17 +870,15 @@ flymake--indicator-overlay-spec
                                             #'flymake-show-buffer-diagnostics)
                                            map))))))))
 
-(defun flymake--resize-margins (&optional orig-width)
-  "Resize current window margins according to `flymake-margin-indicator-position'.
-Return to original margin width if ORIG-WIDTH is non-nil."
-  (when (and (eq flymake-indicator-type 'margins)
-             flymake-autoresize-margins)
-    (cond
-     ((and orig-width flymake--original-margin-width)
-      (if (eq flymake-margin-indicator-position 'left-margin)
-          (setq left-margin-width flymake--original-margin-width)
-        (setq right-margin-width flymake--original-margin-width)))
-     (t
+(defun flymake--resize-margins (window)
+  "Resize current window margins according to `flymake-margin-indicator-position'."
+  (if (and flymake-mode
+           flymake-autoresize-margins
+           (or (eq flymake-indicator-type 'margins)
+               (and (eq flymake-indicator-type 'fringes-margins)
+                    (not (cl-case flymake-fringe-indicator-position
+                           (left-fringe (< 0 (nth 0 (window-fringes))))
+                           (right-fringe (< 0 (nth 1 (window-fringes)))))))))
       (let* ((indicators
               (mapcar (lambda (sym)
                         (let ((ind (get sym 'flymake-margin-string)))
@@ -895,15 +889,15 @@ flymake--resize-margins
                           (car ind)))
                       '(flymake-error flymake-warning flymake-note)))
              (width (apply #'max (mapcar #'string-width indicators))))
-        (if (eq flymake-margin-indicator-position 'left-margin)
-            (setq flymake--original-margin-width left-margin-width
-                  left-margin-width width)
-          (setq flymake--original-margin-width right-margin-width
-                right-margin-width width)))))
-    ;; Apply margin to all windows available.
-    (mapc (lambda (x)
-            (set-window-buffer x (window-buffer x)))
-          (get-buffer-window-list nil nil 'visible))))
+        (set-window-margins
+         window
+         (if (eq flymake-margin-indicator-position 'left-margin)
+             (+ width left-margin-width)
+           left-margin-width)
+         (if (eq flymake-margin-indicator-position 'right-margin)
+             (+ width right-margin-width)
+           right-margin-width)))
+    (set-window-margins window left-margin-width right-margin-width)))
 
 (defun flymake--equal-diagnostic-p (a b)
   "Tell if A and B are equivalent `flymake--diag' objects."
@@ -1509,7 +1521,9 @@ flymake-mode
     (add-hook 'eldoc-documentation-functions 'flymake-eldoc-function t t)
 
     ;; AutoResize margins.
-    (flymake--resize-margins)
+    (when flymake-autoresize-margins
+      (mapc #'flymake--resize-margins (get-buffer-window-list nil nil t))
+      (add-hook 'window-buffer-change-functions #'flymake--resize-margins nil t))
 
     ;; We can't just `clrhash' `flymake--state': there may be in
     ;; in-transit requests from other backends if `flymake-mode' was
@@ -1528,7 +1542,9 @@ flymake-mode
     (remove-hook 'eldoc-documentation-functions 'flymake-eldoc-function t)
 
     ;; return margin to original size
-    (flymake--resize-margins t)
+    (when flymake-autoresize-margins
+      (mapc #'flymake--resize-margins (get-buffer-window-list nil nil t)))
+    (remove-hook 'window-buffer-change-functions #'flymake--resize-margins t)
 
     (when flymake-timer
       (cancel-timer flymake-timer)

--=-=-=--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 15:47:02 +0000
Resent-Message-ID: <handler.77313.B77313.17606296165459 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17606296165459
          (code B ref 77313); Thu, 16 Oct 2025 15:47:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 15:46:56 +0000
Received: from localhost ([127.0.0.1]:36693 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9QBr-0001Py-LK
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 11:46:56 -0400
Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]:48492)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v9QBI-0001Nl-BO
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 11:46:26 -0400
Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4cnXNw2PPGz9t7Z;
 Thu, 16 Oct 2025 17:46:08 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760629568;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=65MW1Qz7ok/PaQbmh8ViWCOYPDOzA0DsBi3OczL1Gs0=;
 b=a2jwozj66v4m5dAQL6vVwdRVm4/OOuTJKceo8LRQZl3tTdYXBhfOP9ZsASyhCm1kDOw/wh
 kdsMy1cf0FGNttBU3hwW0Jx3OieXEBEUo5M7+zWu9r1s9Vtu6F8hZhb9vRw3XR2nXlC8fH
 Cv2yf15e9i/g/DUvDA/j50n8WhziT2ZI/JCknIuqzKlDudSqp+l/64P1TF/V7PVYZyzFMM
 vDaC8Af8K+DXic/RbqdpIKInW7kcbOykkQkPFX8xmD6q4PFgxarbIshHVMySJs/HqYw/J7
 PLlKhPKaU3/4S5YKYiiomwWMm27BtGq8VzI8qDaA4pctvs6hOXd5bpXD1tfU4A==
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
 <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN>
Date: Thu, 16 Oct 2025 18:22:23 +0300
Message-ID: <87347iq3gm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

>> So we don't need two overlays, just one would work, with this method.
>> Though, when the buffer is displayed in both frames at the same time,
>> what's displayed depends on the frame which was last interacted-with
>> (and therefore last redisplayed).
>
> Personally, that sounds like a rare configuration, an even when that
> happens the user would probably continue to work on the buffer in the same
> frame (rather than switching back and forth), so they won't experience most
> of the downside.

I agree that it's a very rare situation when someone would prefer
looking at the same buffer in two side-by-side graphical and tty frames.
If we don't need to support such configurations, then below is the best
possible patch with constraints imposed currently by the display engine.

>> That's a little ugly.  It looks like having two overlays instead avoids
>> that problem, so maybe we would want to do that.
>
> Maybe we could later alter the engine somehow to evaluate the conditions in
> all frames or something. I've no idea sure how difficult that is.

I have some ideas for a less invasive refactoring of flymake
to use multiple overlays per indicator if needed.

But first let's see if Spencer agrees to the following patch:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=fringes-margins.patch

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 88ebf1ccd97..735c37f020f 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -185,7 +185,7 @@ flymake-fringe-indicator-position
 		 (const right-fringe)
 		 (const :tag "No fringe indicators" nil)))
 
-(defcustom flymake-indicator-type 'fringes
+(defcustom flymake-indicator-type 'fringes-margins
   "Indicate which indicator type to use for display errors.
 
 The value can be nil (don't indicate errors but just highlight them),
@@ -200,6 +200,7 @@ flymake-indicator-type
   :version "31.1"
   :type '(choice (const :tag "Use Fringes" fringes)
                  (const :tag "Use Margins" margins)
+                 (const :tag "Use both with fallback" fringes-margins)
                  (const :tag "No indicators" nil)))
 
 (defcustom flymake-margin-indicators-string
@@ -1012,7 +1006,25 @@ flymake--highlight-line
                   (overlay-put ov prop (flymake--lookup-type-property
                                         type prop value)))))
       (default-maybe 'face 'flymake-error)
-      (default-maybe 'before-string (flymake--indicator-overlay-spec type))
+      (default-maybe 'before-string
+                     (if (eq flymake-indicator-type 'fringes-margins)
+                         (propertize
+                          "!" 'display
+                          `((when (cl-case flymake-fringe-indicator-position
+                                    (left-fringe (< 0 (nth 0 (window-fringes))))
+                                    (right-fringe (< 0 (nth 1 (window-fringes)))))
+                              . ,(get-text-property
+                                  0 'display
+                                  (let ((flymake-indicator-type 'fringes))
+                                    (flymake--indicator-overlay-spec type))))
+                            (when (not (cl-case flymake-fringe-indicator-position
+                                         (left-fringe (< 0 (nth 0 (window-fringes))))
+                                         (right-fringe (< 0 (nth 1 (window-fringes))))))
+                              . ,(get-text-property
+                                  0 'display
+                                  (let ((flymake-indicator-type 'margins))
+                                    (flymake--indicator-overlay-spec type))))))
+                       (flymake--indicator-overlay-spec type)))
       ;; (default-maybe 'after-string
       ;;                (flymake--diag-text diagnostic))
       (default-maybe 'help-echo

--=-=-=--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 17:14:02 +0000
Resent-Message-ID: <handler.77313.B77313.176063480826717 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176063480826717
          (code B ref 77313); Thu, 16 Oct 2025 17:14:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 17:13:28 +0000
Received: from localhost ([127.0.0.1]:36982 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9RXb-0006wr-AC
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 13:13:27 -0400
Received: from [64.215.233.18] (port=59581 helo=mxout5.mail.janestreet.com)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v9RXX-0006w7-1D
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 13:13:24 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <87347iq3gm.fsf@HIDDEN> (Juri Linkov's message of "Thu, 
 16 Oct 2025 18:22:23 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
 <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN>
 <87347iq3gm.fsf@HIDDEN>
Date: Thu, 16 Oct 2025 13:13:03 -0400
Message-ID: <ierjz0uixcw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760634783;
 bh=kHJklC0li+cm1wvIY3kujfLqBaVWenxthljtoAbdQ+E=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=3jlbO9uSG6bcnlQuQ812M/jUlgBpruLX9TsoO6wHE8/Jd70udZJIkxZChliVFHXil
 2JuCoLgXHyqnP0S72zlxBcr2q68r57TvVld3WTw1OPk6jUC57RAsJJ2W7MHLckxlyd
 LdvMK8XPXIPqmJvoKtEKuKJW5YeFbyp2jSLzLQ+mRy+fOHs/iG7L29hoVsC+sTAPVn
 jLVfk3I0vw/40xKucmFaL6H0dZRvNvsPLPgaVfomgrrY1eCJrbGDXZ2Qlj8LfeBfgo
 mIBAa2ho1vqnR3hU+qRMUsiR/j4CKz9hF2Hb0igYz6IiqKqH6Snwwg7XAjrvrVq4Rm
 wZlZ0RYwEBWCg==
X-Spam-Score: -1.0 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.0 (--)

Juri Linkov <juri@HIDDEN> writes:
>>> So we don't need two overlays, just one would work, with this method.
>>> Though, when the buffer is displayed in both frames at the same time,
>>> what's displayed depends on the frame which was last interacted-with
>>> (and therefore last redisplayed).
>>
>> Personally, that sounds like a rare configuration, an even when that
>> happens the user would probably continue to work on the buffer in the same
>> frame (rather than switching back and forth), so they won't experience most
>> of the downside.
>
> I agree that it's a very rare situation when someone would prefer
> looking at the same buffer in two side-by-side graphical and tty frames.
> If we don't need to support such configurations, then below is the best
> possible patch with constraints imposed currently by the display engine.

Yeah, fair enough.  That isn't a very important case at all, so this is
a pretty good solution.

>>> That's a little ugly.  It looks like having two overlays instead avoids
>>> that problem, so maybe we would want to do that.
>>
>> Maybe we could later alter the engine somehow to evaluate the conditions in
>> all frames or something. I've no idea sure how difficult that is.
>
> I have some ideas for a less invasive refactoring of flymake
> to use multiple overlays per indicator if needed.
>
> But first let's see if Spencer agrees to the following patch:

The basic approach seems reasonable to me.

> diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
> index 88ebf1ccd97..735c37f020f 100644
> --- a/lisp/progmodes/flymake.el
> +++ b/lisp/progmodes/flymake.el
> @@ -185,7 +185,7 @@ flymake-fringe-indicator-position
>  		 (const right-fringe)
>  		 (const :tag "No fringe indicators" nil)))
>  
> -(defcustom flymake-indicator-type 'fringes
> +(defcustom flymake-indicator-type 'fringes-margins
>    "Indicate which indicator type to use for display errors.
>  
>  The value can be nil (don't indicate errors but just highlight them),
> @@ -200,6 +200,7 @@ flymake-indicator-type
>    :version "31.1"
>    :type '(choice (const :tag "Use Fringes" fringes)
>                   (const :tag "Use Margins" margins)
> +                 (const :tag "Use both with fallback" fringes-margins)
>                   (const :tag "No indicators" nil)))
>  
>  (defcustom flymake-margin-indicators-string
> @@ -1012,7 +1006,25 @@ flymake--highlight-line
>                    (overlay-put ov prop (flymake--lookup-type-property
>                                          type prop value)))))
>        (default-maybe 'face 'flymake-error)
> -      (default-maybe 'before-string (flymake--indicator-overlay-spec type))
> +      (default-maybe 'before-string
> +                     (if (eq flymake-indicator-type 'fringes-margins)
> +                         (propertize
> +                          "!" 'display
> +                          `((when (cl-case flymake-fringe-indicator-position
> +                                    (left-fringe (< 0 (nth 0 (window-fringes))))
> +                                    (right-fringe (< 0 (nth 1 (window-fringes)))))
> +                              . ,(get-text-property
> +                                  0 'display
> +                                  (let ((flymake-indicator-type 'fringes))
> +                                    (flymake--indicator-overlay-spec type))))
> +                            (when (not (cl-case flymake-fringe-indicator-position
> +                                         (left-fringe (< 0 (nth 0 (window-fringes))))
> +                                         (right-fringe (< 0 (nth 1 (window-fringes))))))

I think probably we should extract this out to a function to avoid
duplicating it:

  (cl-case flymake-fringe-indicator-position
   (left-fringe (< 0 (nth 0 (window-fringes))))
   (right-fringe (< 0 (nth 1 (window-fringes)))))

Especially because I think this cl-case won't get macro-expanded when
embedded like this, so I guess we'd be doing that at runtime, every time
we check the condition...

Or alternatively: perhaps we should check
flymake-fringe-indicator-position outside the display condition itself?
There's no need to check flymake-fringe-indicator-position every time
the display condition is re-evaluated, it is just less performant.

So in that case this would look more like:

(let ((use-fringe-condition
       (cl-case flymake-fringe-indicator-position
         (left-fringe '(< 0 (nth 0 (window-fringes))))
         (right-fringe '(< 0 (nth 1 (window-fringes)))))))
 ...
 `((when ,use-fringe-condition ...)
   (when (not ,use-fringe-condition) ...)))

Does that seem reasonable?

> +                              . ,(get-text-property
> +                                  0 'display
> +                                  (let ((flymake-indicator-type 'margins))
> +                                    (flymake--indicator-overlay-spec type))))))
> +                       (flymake--indicator-overlay-spec type)))
>        ;; (default-maybe 'after-string
>        ;;                (flymake--diag-text diagnostic))
>        (default-maybe 'help-echo

We still will also need an enhancement of flymake--resize-margins to
only resize margins in windows that need it, right?  Which probably
needs a window-buffer-change-functions hook?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 17:19:02 +0000
Resent-Message-ID: <handler.77313.B77313.17606351046378 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17606351046378
          (code B ref 77313); Thu, 16 Oct 2025 17:19:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 17:18:24 +0000
Received: from localhost ([127.0.0.1]:37060 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9RcI-0001eS-3w
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 13:18:23 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:36299)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v9Rc9-0001dy-Ms
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 13:18:14 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <87qzv2oor1.fsf@HIDDEN> (Juri Linkov's message of "Thu, 
 16 Oct 2025 18:29:27 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
Date: Thu, 16 Oct 2025 13:18:03 -0400
Message-ID: <ierfrbiix4k.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760635084;
 bh=WqwiVcgKnGMdT9OVKIRgLfWMUx72/S+Q7T5uVaEoDsQ=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=wX5BD78hGkEftWiOwIdLN7oTSQsHfM/lPAECYE0PH2lMCbjnpqaj7Jgyhv1YHd6A8
 HRPZDaYeD3WW6dqDaL0yW1UGU7gvpK+FtLXInsbBjWTkiqitV+cQYZB6oG4ajBQ0oa
 YzkgzzfNej5TbKR2lzFcYza7nj3H6s20AsAHfmoFjOiiu/b6T0uwd3iL7oQ37RDKGF
 tzRAgB+v3TKVvjePfGuXjseQwzorkP5K/ztxFcOBHVED2Hu5o+FeWoWWX0A7ILc9mv
 vSu3kpHbIpaO5lPy6qEX6PgC25WlC/i7YJ1iwR5QUSaGh1/c/aslgCqSj74XR/7Tfx
 ZmaAS9i8ZSZDA==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

>> On GUI frames, we never need to show it in the margin, right?
>>
>> So, if we expect, say, 2 columns be taken by outline-minor-mode and
>> hs-minor-mode, make the margin indicator of Flymake 3-column wide.
>
> Here is the patch that shows the margins only on a tty frame
> or on a graphical frame without fringes.  It keeps all existing
> margins enabled by outline-minor-mode and hs-minor-mode.

Thanks, this seems right to me.

> diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
> index 88ebf1ccd97..735c37f020f 100644
> --- a/lisp/progmodes/flymake.el
> +++ b/lisp/progmodes/flymake.el
> @@ -319,11 +320,6 @@ flymake-timer
>  (defvar-local flymake-check-start-time nil
>    "Time at which syntax check was started.")
>  
> -(defvar-local flymake--original-margin-width nil
> -  "Store original margin width.
> -Used by `flymake--resize-margins' for restoring original margin width
> -when flymake is turned off.")
> -
>  (defun flymake--log-1 (level sublog msg &rest args)
>    "Do actual work for `flymake-log'."
>    (let (;; never popup the log buffer
> @@ -874,17 +870,15 @@ flymake--indicator-overlay-spec
>                                              #'flymake-show-buffer-diagnostics)
>                                             map))))))))
>  
> -(defun flymake--resize-margins (&optional orig-width)
> -  "Resize current window margins according to `flymake-margin-indicator-position'.
> -Return to original margin width if ORIG-WIDTH is non-nil."
> -  (when (and (eq flymake-indicator-type 'margins)
> -             flymake-autoresize-margins)
> -    (cond
> -     ((and orig-width flymake--original-margin-width)
> -      (if (eq flymake-margin-indicator-position 'left-margin)
> -          (setq left-margin-width flymake--original-margin-width)
> -        (setq right-margin-width flymake--original-margin-width)))
> -     (t
> +(defun flymake--resize-margins (window)
> +  "Resize current window margins according to `flymake-margin-indicator-position'."
> +  (if (and flymake-mode
> +           flymake-autoresize-margins
> +           (or (eq flymake-indicator-type 'margins)
> +               (and (eq flymake-indicator-type 'fringes-margins)
> +                    (not (cl-case flymake-fringe-indicator-position
> +                           (left-fringe (< 0 (nth 0 (window-fringes))))
> +                           (right-fringe (< 0 (nth 1 (window-fringes)))))))))
>        (let* ((indicators
>                (mapcar (lambda (sym)
>                          (let ((ind (get sym 'flymake-margin-string)))
> @@ -895,15 +889,15 @@ flymake--resize-margins
>                            (car ind)))
>                        '(flymake-error flymake-warning flymake-note)))
>               (width (apply #'max (mapcar #'string-width indicators))))
> -        (if (eq flymake-margin-indicator-position 'left-margin)
> -            (setq flymake--original-margin-width left-margin-width
> -                  left-margin-width width)
> -          (setq flymake--original-margin-width right-margin-width
> -                right-margin-width width)))))
> -    ;; Apply margin to all windows available.
> -    (mapc (lambda (x)
> -            (set-window-buffer x (window-buffer x)))
> -          (get-buffer-window-list nil nil 'visible))))
> +        (set-window-margins
> +         window
> +         (if (eq flymake-margin-indicator-position 'left-margin)
> +             (+ width left-margin-width)
> +           left-margin-width)
> +         (if (eq flymake-margin-indicator-position 'right-margin)
> +             (+ width right-margin-width)
> +           right-margin-width)))
> +    (set-window-margins window left-margin-width right-margin-width)))

Hm... should we instead just substract our added margin width from the
current margin width, in the else case?

Otherwise, if there's two packages that both use the same approach of
only adjusting the window margin width, then when one of those packages
is turned off it will reset the window margins to match the buffer-local
margin width.  Which will undo the other package's modification of the
window margin width.

>  
>  (defun flymake--equal-diagnostic-p (a b)
>    "Tell if A and B are equivalent `flymake--diag' objects."
> @@ -1509,7 +1521,9 @@ flymake-mode
>      (add-hook 'eldoc-documentation-functions 'flymake-eldoc-function t t)
>  
>      ;; AutoResize margins.
> -    (flymake--resize-margins)
> +    (when flymake-autoresize-margins
> +      (mapc #'flymake--resize-margins (get-buffer-window-list nil nil t))
> +      (add-hook 'window-buffer-change-functions #'flymake--resize-margins nil t))
>  
>      ;; We can't just `clrhash' `flymake--state': there may be in
>      ;; in-transit requests from other backends if `flymake-mode' was
> @@ -1528,7 +1542,9 @@ flymake-mode
>      (remove-hook 'eldoc-documentation-functions 'flymake-eldoc-function t)
>  
>      ;; return margin to original size
> -    (flymake--resize-margins t)
> +    (when flymake-autoresize-margins
> +      (mapc #'flymake--resize-margins (get-buffer-window-list nil nil t)))
> +    (remove-hook 'window-buffer-change-functions #'flymake--resize-margins t)
>  
>      (when flymake-timer
>        (cancel-timer flymake-timer)




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 17:51:02 +0000
Resent-Message-ID: <handler.77313.B77313.176063702925737 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176063702925737
          (code B ref 77313); Thu, 16 Oct 2025 17:51:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 17:50:29 +0000
Received: from localhost ([127.0.0.1]:37453 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9S7Q-0006h3-HA
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 13:50:28 -0400
Received: from mout-p-101.mailbox.org ([80.241.56.151]:48712)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v9S7K-0006fi-Mk
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 13:50:25 -0400
Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4cnb850WfPz9stw;
 Thu, 16 Oct 2025 19:50:13 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760637013;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=cL5+FkEkkyCvETjo4fBvTJqy1jtfEKj82lFZ7kjFQyE=;
 b=hob3FvkHsYNKx5N3WUT517NLI62Bdt5N9vKJP6eD84CEpqB0AtG0xUkrfQHH6BbNxZvNw7
 Rr9hxu0wHTcXTIJbjtFNtkLV83KQFz99BJ1OdlBXnct2vZAhKLc8+vhZJiPx6vvzdMqbGi
 4QAkcHXq51bBYwp6pmTaafReJk6UohJv2LG+ntf9Av1VMi4XKc2RaVujkmQV9LS3HQhAF4
 KjVUhz57z38riB9a28K/8i9DBMPiJl+q0M1fWKZim4ti7YVoEB1U/WGMC8pojMCMzOIJ6A
 hEt9zXnwU9T6d3iJOzQCmTpK5xQIRo0OGlT2UxzsB3SKOaYuzgzefd0Mzo0xGg==
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <ierjz0uixcw.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
 <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN>
 <87347iq3gm.fsf@HIDDEN> <ierjz0uixcw.fsf@HIDDEN>
Date: Thu, 16 Oct 2025 20:42:00 +0300
Message-ID: <87frbikal3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> I think probably we should extract this out to a function to avoid
> duplicating it:
>
>   (cl-case flymake-fringe-indicator-position
>    (left-fringe (< 0 (nth 0 (window-fringes))))
>    (right-fringe (< 0 (nth 1 (window-fringes)))))
>
> Especially because I think this cl-case won't get macro-expanded when
> embedded like this, so I guess we'd be doing that at runtime, every time
> we check the condition...
>
> Or alternatively: perhaps we should check
> flymake-fringe-indicator-position outside the display condition itself?
> There's no need to check flymake-fringe-indicator-position every time
> the display condition is re-evaluated, it is just less performant.
>
> So in that case this would look more like:
>
> (let ((use-fringe-condition
>        (cl-case flymake-fringe-indicator-position
>          (left-fringe '(< 0 (nth 0 (window-fringes))))
>          (right-fringe '(< 0 (nth 1 (window-fringes)))))))
>  ...
>  `((when ,use-fringe-condition ...)
>    (when (not ,use-fringe-condition) ...)))
>
> Does that seem reasonable?

It would be interesting to achieve maximum optimization.
We could definitely rely on 'flymake-fringe-indicator-position'
being constant within the same flymake highlighting.

But the call to 'window-fringes' probably should be performed
on every redisplay to be able to catch the moment when fringes
become unavailable.

>> +                              . ,(get-text-property
>> +                                  0 'display
>> +                                  (let ((flymake-indicator-type 'margins))
>> +                                    (flymake--indicator-overlay-spec type))))))
>> +                       (flymake--indicator-overlay-spec type)))
>>        ;; (default-maybe 'after-string
>>        ;;                (flymake--diag-text diagnostic))
>>        (default-maybe 'help-echo
>
> We still will also need an enhancement of flymake--resize-margins to
> only resize margins in windows that need it, right?  Which probably
> needs a window-buffer-change-functions hook?

Yes, both patches are related.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 17:52:01 +0000
Resent-Message-ID: <handler.77313.B77313.176063706325810 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176063706325810
          (code B ref 77313); Thu, 16 Oct 2025 17:52:01 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 17:51:03 +0000
Received: from localhost ([127.0.0.1]:37464 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9S7u-0006hk-HV
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 13:51:03 -0400
Received: from mout-p-101.mailbox.org ([2001:67c:2050:0:465::101]:57692)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v9S7N-0006fp-MH
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 13:50:27 -0400
Received: from smtp1.mailbox.org (smtp1.mailbox.org
 [IPv6:2001:67c:2050:b231:465::1])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4cnb895glxz9sn5;
 Thu, 16 Oct 2025 19:50:17 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760637017;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=vEVunIBEOs4GoHKJifRjTP+GmVWhw6CeQCwJ8G1YF0g=;
 b=Q4lsZkt/LXwwlTVRjuVVMhFDItPnDaJnFk1P80K2a5/axO+Gg1sJRXTV8XBLCKvHfM6hfK
 6Jirajl34ZOU8EbICx/Yl4b4z1kVZ2VAX4Lzz89oKyQ3L02snaCFUnntVC/zCVDQwJjrFy
 s9B/SzzeSyLcLU55Cwp3NCQyL4FxY1Ui4kDbf09mBC7uspOGbQkDm5B/QTtyo3Q7Z75Sr4
 lxoRfIjEIpFUOtM7/qvM3XgSPjsGhvr3tM6UPHKox2Gsv4bKy1czqneON0TBguIzU+q9Q4
 aZ1mjPj6WQbUlBjhFz1IY3xOrsWnxSoYGirK1Q5yvqiJeJKG0nUvKCP88EtrzQ==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::1 as permitted sender) smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <ierfrbiix4k.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <87347sh85u.fsf@HIDDEN> <86bjmga4gd.fsf@HIDDEN>
 <878qhkaur0.fsf@HIDDEN> <86o6qf8e2h.fsf@HIDDEN>
 <871pn67uak.fsf@HIDDEN> <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN>
Date: Thu, 16 Oct 2025 20:47:23 +0300
Message-ID: <87wm4uivro.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4cnb895glxz9sn5
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> +        (set-window-margins
>> +         window
>> +         (if (eq flymake-margin-indicator-position 'left-margin)
>> +             (+ width left-margin-width)
>> +           left-margin-width)
>> +         (if (eq flymake-margin-indicator-position 'right-margin)
>> +             (+ width right-margin-width)
>> +           right-margin-width)))
>> +    (set-window-margins window left-margin-width right-margin-width)))
>
> Hm... should we instead just substract our added margin width from the
> current margin width, in the else case?
>
> Otherwise, if there's two packages that both use the same approach of
> only adjusting the window margin width, then when one of those packages
> is turned off it will reset the window margins to match the buffer-local
> margin width.  Which will undo the other package's modification of the
> window margin width.

Other packages like outline-minor-mode set the buffer-local variable
'left-margin-width'.  So the 'else' case just sets the window margins
back to the value of 'left-margin-width' that is either 0 by default,
and a positive number set by other packages.

But flymake needs to update the window margins directly by adding its
own width, since it's called from the hook 'window-buffer-change-functions'
and should react to the window changes.  Only this logic can handle
such case that a tty window should resize the window margins,
whereas a graphical windows with fringes will keep the default
margin width set by other packages via the buffer-local variable
'left-margin-width'.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 18:27:02 +0000
Resent-Message-ID: <handler.77313.B77313.17606391653644 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17606391653644
          (code B ref 77313); Thu, 16 Oct 2025 18:27:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 18:26:05 +0000
Received: from localhost ([127.0.0.1]:37919 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9Sfo-0000vk-UX
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 14:26:05 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:35065)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v9Sfl-0000un-A3
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 14:25:57 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <87wm4uivro.fsf@HIDDEN> (Juri Linkov's message of "Thu, 
 16 Oct 2025 20:47:23 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
Date: Thu, 16 Oct 2025 14:25:51 -0400
Message-ID: <iercy6mitzk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760639151;
 bh=tLL+5P1jG6XQ0KRee8R5u6m3qUcMcdTafxXNmOkqH4A=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=pSsTfH67jgL/Br2uBeGnTOGOLVsjuHnl1YPd6zVd45zYo0rj3pC2e0n96ldhZYyJ4
 gwCVS8ZwjYbvAtpXhJB44ndo3PX3QrxqY7iRR+XSl8VaPb19sV2pAOwv808OX+e9VR
 ihuRq8Y40t82jGXmxALSsdrAV20BhHHi98mZBbXWpOg5LCIW41mPhBsKtCDydT2/Lh
 Q6qm5inWG220qKHCdSvOQslKQiZ5PYF6r1QbVGSoOustji+SXWZsSRYe4eiVDSeaoJ
 jrIWBRfRVaR8BJu26fyHADeNJnTGHUb1yA7fDdL4/FhWiu8OjvWpWocUrupuiZWyZS
 YVC9R1t65TiCA==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

>>> +        (set-window-margins
>>> +         window
>>> +         (if (eq flymake-margin-indicator-position 'left-margin)
>>> +             (+ width left-margin-width)
>>> +           left-margin-width)
>>> +         (if (eq flymake-margin-indicator-position 'right-margin)
>>> +             (+ width right-margin-width)
>>> +           right-margin-width)))
>>> +    (set-window-margins window left-margin-width right-margin-width)))
>>
>> Hm... should we instead just substract our added margin width from the
>> current margin width, in the else case?
>>
>> Otherwise, if there's two packages that both use the same approach of
>> only adjusting the window margin width, then when one of those packages
>> is turned off it will reset the window margins to match the buffer-local
>> margin width.  Which will undo the other package's modification of the
>> window margin width.
>
> Other packages like outline-minor-mode set the buffer-local variable
> 'left-margin-width'.  So the 'else' case just sets the window margins
> back to the value of 'left-margin-width' that is either 0 by default,
> and a positive number set by other packages.
>
> But flymake needs to update the window margins directly by adding its
> own width, since it's called from the hook 'window-buffer-change-functions'
> and should react to the window changes.  Only this logic can handle
> such case that a tty window should resize the window margins,
> whereas a graphical windows with fringes will keep the default
> margin width set by other packages via the buffer-local variable
> 'left-margin-width'.

But what about other packages which also want to use margins only in tty
windows, like hideshow or diff-hl?

They won't be setting left-margin-width, they will (presumably) also be
setting the window margin width in a hook on
window-buffer-change-functions, with basically identical logic.

If flymake resets the window margin width to left-margin-width, won't it
break these other packages?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 18:27:03 +0000
Resent-Message-ID: <handler.77313.B77313.17606392213756 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17606392213756
          (code B ref 77313); Thu, 16 Oct 2025 18:27:03 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 18:27:01 +0000
Received: from localhost ([127.0.0.1]:37938 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9Sgj-0000yS-Us
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 14:27:01 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:54629)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v9Sgc-0000y0-Bu
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 14:26:51 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <87frbikal3.fsf@HIDDEN> (Juri Linkov's message of "Thu, 
 16 Oct 2025 20:42:00 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
 <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN>
 <87347iq3gm.fsf@HIDDEN> <ierjz0uixcw.fsf@HIDDEN>
 <87frbikal3.fsf@HIDDEN>
Date: Thu, 16 Oct 2025 14:26:43 -0400
Message-ID: <iera51qity4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760639203;
 bh=pKCnVDchpmMNQMsWMTXU6GMs9QLw4og2vyG0SDj0gbI=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=qwhQZuAPZImTeYN1xw4MyJsu2pW4gHKvZNUVEXCSR5nuksjk9/9ftCYPBJ+0AZBH3
 jdtOaEtPW6bVCsx+rnMdIJiZRFY/byAeZ4f8f9l7/Du9LGu2W5+BdsTXWz6xbD89Ps
 fGyS2/365Lf+v02di5eh+CHp9DvBGwOuoB5I86mTX4ZmqBb3QbeSVCfEUu0TZaY2XM
 X1L9l7I5Y/zklxyqjN9ruQ+gzHCUjgS9cQgoMrsutPZ6B86EsrLgfPfbMEIxx381es
 z6fR0MEqvTSx45ilgVVecUpL0wuEuKFfitutTsFZi37FypId8M61UI9IPQ+dZK3hIa
 FWxUmcjoFj66A==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

>> I think probably we should extract this out to a function to avoid
>> duplicating it:
>>
>>   (cl-case flymake-fringe-indicator-position
>>    (left-fringe (< 0 (nth 0 (window-fringes))))
>>    (right-fringe (< 0 (nth 1 (window-fringes)))))
>>
>> Especially because I think this cl-case won't get macro-expanded when
>> embedded like this, so I guess we'd be doing that at runtime, every time
>> we check the condition...
>>
>> Or alternatively: perhaps we should check
>> flymake-fringe-indicator-position outside the display condition itself?
>> There's no need to check flymake-fringe-indicator-position every time
>> the display condition is re-evaluated, it is just less performant.
>>
>> So in that case this would look more like:
>>
>> (let ((use-fringe-condition
>>        (cl-case flymake-fringe-indicator-position
>>          (left-fringe '(< 0 (nth 0 (window-fringes))))
>>          (right-fringe '(< 0 (nth 1 (window-fringes)))))))
>>  ...
>>  `((when ,use-fringe-condition ...)
>>    (when (not ,use-fringe-condition) ...)))
>>
>> Does that seem reasonable?
>
> It would be interesting to achieve maximum optimization.
> We could definitely rely on 'flymake-fringe-indicator-position'
> being constant within the same flymake highlighting.
>
> But the call to 'window-fringes' probably should be performed
> on every redisplay to be able to catch the moment when fringes
> become unavailable.

Agreed.

>>> +                              . ,(get-text-property
>>> +                                  0 'display
>>> +                                  (let ((flymake-indicator-type 'margins))
>>> +                                    (flymake--indicator-overlay-spec type))))))
>>> +                       (flymake--indicator-overlay-spec type)))
>>>        ;; (default-maybe 'after-string
>>>        ;;                (flymake--diag-text diagnostic))
>>>        (default-maybe 'help-echo
>>
>> We still will also need an enhancement of flymake--resize-margins to
>> only resize margins in windows that need it, right?  Which probably
>> needs a window-buffer-change-functions hook?
>
> Yes, both patches are related.

Right, makes sense, just didn't notice the other one at first.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 18:40:01 +0000
Resent-Message-ID: <handler.77313.B77313.17606399976722 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17606399976722
          (code B ref 77313); Thu, 16 Oct 2025 18:40:01 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 18:39:57 +0000
Received: from localhost ([127.0.0.1]:38096 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9StF-0001kI-FG
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 14:39:57 -0400
Received: from mout-p-101.mailbox.org ([2001:67c:2050:0:465::101]:42404)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v9St4-0001js-Ea
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 14:39:43 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4cncF14lPpz9t94;
 Thu, 16 Oct 2025 20:39:33 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760639973;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=BZ3QdMqPFZX8HB3grvKh+CA1zgn4E7PuQuQYcsLxrtU=;
 b=lkeGZMEeD7O9pnWJx2TkOaccBhYohZNLF1L15JTRlDOYNDrWUPJefPNYoK+4upHETmRK4u
 dll1GmSdaPGawav2oVP09n0s9zKI+VCvuCEq6Qm+oWWbRRmAInwyaOY3utaGbgCucpkB1l
 1MwnL3ku/NmrZTxUkqJWnBWXDpU5xpKQ5e3aQ+1hfsyCnUrB+EB76vZt/VaO9vgpvPYnLP
 yiF13oChqnSSk/FVgkR8q72ZB/bSwbeFgdU0mBuLBRYtPxBgFSQ10GmixmPiQEhj8ZUwJg
 6vh8iYwMhCKoHWPHBAx+PBux3uHZ+VnWK2WSr/PLP/nub6zmafjRZCJmTXE4Ug==
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <iercy6mitzk.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <878qhkaur0.fsf@HIDDEN> <86o6qf8e2h.fsf@HIDDEN>
 <871pn67uak.fsf@HIDDEN> <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN>
Date: Thu, 16 Oct 2025 21:37:40 +0300
Message-ID: <871pn2itfv.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> But what about other packages which also want to use margins only in tty
> windows, like hideshow or diff-hl?
>
> They won't be setting left-margin-width, they will (presumably) also be
> setting the window margin width in a hook on
> window-buffer-change-functions, with basically identical logic.
>
> If flymake resets the window margin width to left-margin-width, won't it
> break these other packages?

There is currently no way for two packages to update the window margin
because it's not known whether the current window margin was set
from the variable left-margin-width or explicitly by calling
set-window-margins from another package.

So we need to design a new feature.  For example, we could add
a new hook-like variable that contains a list of functions added
by different packages.  Each function returns the margin width required
by each package.  Then their sum is set as the window margin width.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 19:47:01 +0000
Resent-Message-ID: <handler.77313.B77313.176064401421141 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176064401421141
          (code B ref 77313); Thu, 16 Oct 2025 19:47:01 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 19:46:54 +0000
Received: from localhost ([127.0.0.1]:38202 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9Tw6-0005Uv-8Y
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 15:46:54 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:44037)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v9Tw3-0005Uf-Ny
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 15:46:52 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <871pn2itfv.fsf@HIDDEN> (Juri Linkov's message of "Thu, 
 16 Oct 2025 21:37:40 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN> <871pn2itfv.fsf@HIDDEN>
Date: Thu, 16 Oct 2025 15:46:45 -0400
Message-ID: <ier7bwuiq8q.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760644005;
 bh=OIDdvwYiDhjVQ5K9CKXHr3TdK6ZzStV2q/bCLGbci8w=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=KBB8pl+GqZVYz4ciUlE92x5xerNGLTTLBtxW/Le1vGiuxwB4IVXnmtHmt7PFit+VE
 jN4FO4jJSeBt3E2jGd7JUlxBA+e/+TQ+J+DVqnd70Q2viVz7tzxlXV8ziwpmgyaH8D
 2qiHiScEK9z7FzI6rVHfpI8LMOUB3PCkOCOdl2YnFaQxSPR8xDa/OmE/w2uj83vqCw
 uZ0qazumyQ2m517g9LFYoTFXahi4ax1bGeG8uaQwLZ6OV//P4WMkUA1527byLzpnwe
 1jn+38yWwzwZNx2cYSP2CK83dQe/pDQGTzJ590/ZHxsZkHz/aVXZUosGnq6q7mgK7E
 UztX2A3QQhl3w==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

>> But what about other packages which also want to use margins only in tty
>> windows, like hideshow or diff-hl?
>>
>> They won't be setting left-margin-width, they will (presumably) also be
>> setting the window margin width in a hook on
>> window-buffer-change-functions, with basically identical logic.
>>
>> If flymake resets the window margin width to left-margin-width, won't it
>> break these other packages?
>
> There is currently no way for two packages to update the window margin
> because it's not known whether the current window margin was set
> from the variable left-margin-width or explicitly by calling
> set-window-margins from another package.
>
> So we need to design a new feature.  For example, we could add
> a new hook-like variable that contains a list of functions added
> by different packages.  Each function returns the margin width required
> by each package.  Then their sum is set as the window margin width.

Yes, I was thinking we might want something like that.  Maybe called
window-margin-functions.

That design sounds good to me, but maybe others have objections.

How would {left,right}-margin-width be incorporated into
window-margin-functions?  Perhaps window-margin-functions could have a
default value of '(buffer-margin-width), where buffer-margin-width is a
function which returns (cons left-margin-width right-margin-width).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 20:41:02 +0000
Resent-Message-ID: <handler.77313.B77313.17606472554699 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17606472554699
          (code B ref 77313); Thu, 16 Oct 2025 20:41:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 20:40:55 +0000
Received: from localhost ([127.0.0.1]:38886 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9UmM-0001Dj-Ns
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 16:40:55 -0400
Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:51313)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1v9UmJ-0001DE-7y
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 16:40:52 -0400
Received: by mail-wr1-x435.google.com with SMTP id
 ffacd0b85a97d-426fd62bfeaso524535f8f.2
 for <77313 <at> debbugs.gnu.org>; Thu, 16 Oct 2025 13:40:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760647243; x=1761252043; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=sWzDnHFf3XaEAP2XhOAK/Hkxrq+oEfRMZjOEcv3H590=;
 b=PpBWMvFg09ELBRHrZsv+7fn1kXWzhwydznwO4etkihAdHHYpJ73lIJJZaPBGm8xxAf
 zjUW9xtr7yG0kzHKrmkfQXJ3StmnzzzC6HAgnfhYJ2YM/jpnPVnOFLGQ+4x1gqujp/Cj
 j0EIpoz/fdiIqDSUgTn36y31FlDjTeqMMSbkP3URd93uiPNT41mko73MTNbcEcf7GeDN
 n0aBtHOF1EzIT2y/0gqc58vbtu7meWm9eoqJkw/PCND0ZzyXhGrvNfEBylVVp0IglqtC
 iZkJgQP4M+kRurrCWjALYtqpqWdic7NrZxpdwy9wERnodAxrP4tuO4Qjd652j2UUE+hV
 cUFA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760647243; x=1761252043;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=sWzDnHFf3XaEAP2XhOAK/Hkxrq+oEfRMZjOEcv3H590=;
 b=mGguMGSrj+GV/jp7yWaxPLp7w/YG/5ngfqxusv8JgnsGXeGdpTla+hrgGXu/t9LTJl
 Y/kLvAlq9xgg+APDAue4A03BYxpAZbpA8hzG6wmSjWeyBdTIzkiOSVP5yRe37LAcnw4n
 YUwjoKLyIHDz9AmI9nIv96InaZyKoZbPWh3FS8YHNn/T4W42tPrNKvU8oyk0VGnR4iEl
 DKcYyrk7fURC0/hTf/2SAW6kSKTxS6pjV/6+HngPNvkqOtjW6mGDx03hu1izeNSFuMVt
 mM8khTVjnLhj4B2zh6dxzk80lPp1ZTlPh6xs7K/qzkjfyXN5/fZQVfH2P+PvSU6ub8aj
 DePw==
X-Forwarded-Encrypted: i=1;
 AJvYcCU16+8c2ifhUc/yGs7OIngJnIS/zX4tH6lgHyN1VVuO83uQ0//je6KhR6RVgi1MsvVTBTfszg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YyFXps/ehJdo0iGEQ4EcXOYHgYzRBksoKv5UeJUTeCRgjLoDwIV
 EcL6iPMlgg+tIhp1O80bBWBkJpny8R4vdupvMItgMWGCjgLY8OOaJhJCGAZJEg==
X-Gm-Gg: ASbGnctfaUbF3jYxkGCF8RZ5m+JJ2Hm81Fkifvur4t9iWwFIMzN1uGIq4CzqHsDjFzn
 OGpfROU0HZp/yZa3tthIkX+lV2vLDMyaEi1gqS4b3Zmx8lUBdqb8hjvEzHa/MDadOSV7/pQaHGT
 Aa37Ewm1FIy1tBq5lQEipl3LS/X/E1GtXhNUB4uJEC7nB7wdKhgNAW/eugPNTsHX7iR4T0BvMkH
 vT9pLqVOtsvVV5wuxdaqODomPbWsZxFiVRHrL0yPszTDoyjOspl7wyotVeLdq99VhD+BvdOLovx
 R06V6wZw8/vOF+0cnoeCvzkW63+dyYYBsElqYpYZCR+2x0rE3W2yuZAe6rqz8IcCfAivN/KqXL/
 iqa5d9Tfvgs9kCk8fJCtFhuHL52zLPgQmR+Tl4XkRH5nGo0fAoZQUvxXpkriIFaIZXsCUmh4Gku
 xlLCsd7aW2ubiD9vv6VA==
X-Google-Smtp-Source: AGHT+IEIpzZfOzNFr24nJWGDYnv61A/gEYcLv/pz5MzYfMoAZQyvdtOxN0tEk0CDT0BSKkKkFMBUDA==
X-Received: by 2002:a05:6000:220f:b0:427:630:4106 with SMTP id
 ffacd0b85a97d-4270630411bmr167223f8f.34.1760647242908; 
 Thu, 16 Oct 2025 13:40:42 -0700 (PDT)
Received: from krug (87-196-72-166.net.novis.pt. [87.196.72.166])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-4711442d9e8sm44898795e9.7.2025.10.16.13.40.41
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 16 Oct 2025 13:40:42 -0700 (PDT)
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
In-Reply-To: <ier7bwuiq8q.fsf@HIDDEN>
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <871pn67uak.fsf@HIDDEN> <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN> <871pn2itfv.fsf@HIDDEN>
 <ier7bwuiq8q.fsf@HIDDEN>
Date: Thu, 16 Oct 2025 21:42:05 +0100
Message-ID: <87v7ke1sv6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Spencer Baugh <sbaugh@HIDDEN> writes:

> That design sounds good to me, but maybe others have objections.

I think I've seen about two handful of ideas pop up in this thread in
the last few days, some more promising than others, but all interesting.
I think this is great.  It's somewhat flattering to see a piece of
software I (re)wrote from scratch be the target of so much creativity
(pardon the pretension!).

The one thing I haven't seen is a patch that unbreak the current broken
state of lisp/progmodes/flymake.el for TTY users.

From a brief read, I thought that patch by Juri Linkov that make
flymake-indicator-type be 'fringes-margin' by default and does the
decision in flymake--highlight-line would fix the problem, but I've just
tried and it doesn't.  Maybe that patch isn't finished??=20=20

It fails for this basic case

   emacs -Q -nw --eval '(setq trusted-content :all)' --eval '(insert "\nboo=
!")' -f flymake-mode

This shows an indicator in the margin for Emacs 30, but not in master.

Otherwise it looks like a perfectly valid idea to do it there, and I
encourage you to push it.  Maybe I'll try my hand at tweaking it.

Now, I might be wrong, but reading some of the messages and proposals,
at least one or two seems to be glossing over one very important and
basic fact, which is that Flymake (like ElDoc, Eglot, and many others)
is a GNU ELPA :core package.  It has a "Package-Requires: Emacs 26.1"
header.

This has some implications:

* If a version Flymake 1.4.2 were cut today the problem would
  automatically affect all users using Flymake 1.4.1.

* You can certainly bump that "Package-Requires"to 27 or 28 if it's
  useful, but even then it means any idea that relies on adding new
  machinery to the core must also take into account that that flymake.el
  will routinely be loaded in Emacsen that don't posess that machinery.
  The usual solution here is to add compatibility shims, if expressions,
  compat.el, or ponder carefully whether you cannot really make do with
  the longstanding bits of machinery from older versions and whether the
  complexity is worth it at all.

* This goes for C or Elisp machinery.  C is much more problematic.  For
  new bits of Elisp-only library, a newlib.el can be made a :core
  package itself and require whichever Emacs version Flymake also
  requires.

So again, I'm flattered that you are having so many ideas, but please
consider pushing either my patch which unambigously improves the current
situation.  Or some other patch (I suggest a variation on Juri's) that
does the same (and hopefully is simple enough in nature to follow the
above hard requirement).

Jo=C3=A3o




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 22:01:02 +0000
Resent-Message-ID: <handler.77313.B77313.176065204328973 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176065204328973
          (code B ref 77313); Thu, 16 Oct 2025 22:01:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 22:00:43 +0000
Received: from localhost ([127.0.0.1]:39798 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9W1Z-0007XD-V0
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 18:00:42 -0400
Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:47324)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1v9W1W-0007Wq-Av
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 18:00:40 -0400
Received: by mail-wm1-x32a.google.com with SMTP id
 5b1f17b1804b1-471193a9d9eso1663565e9.2
 for <77313 <at> debbugs.gnu.org>; Thu, 16 Oct 2025 15:00:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760652031; x=1761256831; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=VAHWGxyVudKdctd3nFPGQXzf5HW/D/NOanOE8uGjexo=;
 b=JHzwAVhvZRYVEBUyginsoyqFBQ1kkW6edFVDUMnickCtOT8ky4T8ycKOYkJ14dHBPq
 ephS8dI9JrjkSDtzR8d48ig1DiQhivSiQXRgm2/piHhrN/93lESMRenpeiUMDnySZTRM
 0lh/QqacwmWl19tMgUZbaGtBqjL4g6DuHsYxg6jwC6GMBej1GxqNC40fyYUfI0aoe3ZB
 cn7KKmhGVkVsAblGHhUFyVMQmk0XgizQrcZlHHmdA5CFXxY9+I/oomBHVNI5llIwFdE7
 sBpEM5sCttgSx30YqvoJkbY7PCd2fLT1p3Pb+kRBCSPRtNpvKJd8sJbZo7+4MPPtBuIy
 2P4A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760652031; x=1761256831;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=VAHWGxyVudKdctd3nFPGQXzf5HW/D/NOanOE8uGjexo=;
 b=rrszvawMQgIs8HX7VgIWnIMbpL0TXSvyBbzUuumh05g+AbtWbv4RiiZeBmI689BhNV
 XuFq36sIlrm3hKMAbuYC30Ezjt6ReB2XHsOrQrX2rTIhzdh53H4zAPeXMLvy9+pPTT6v
 sFL6SwncClVfoNyUjTFFFwj7aZsAzt3nfb+bNzYUvJveWAokOqDMR+zoG3cMcUI6DpW+
 X5rP0o5Soyeo3wCTc1KoeU5Iwv+6eijpjZ/DHBGGEy1q4A53GRkF+qeczhOguNGv3Zgn
 EdI2n/2oEnqdGJzNygHU+h8Kb8uBmC2WaBA4ZMj4jN7PxDpxe+td4bdyY4Ix/g6GEYGL
 CddQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCVzW0shcnOMEK2DSB3aqukSSeIc4GeZuVsJAzLluurTIlYCEYT7RqdsHke7RVOETPhPMa/T4g==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yw8QXgZpkC20/83VI0VeOxTUHXOGOLYcgXG2qcAM1IDcSFT2bFk
 ckI+MxRBapk51KYY4NQMs7jj8IYaPFEl2AIu6Gm7Pz1vIOMFea385UEcMLLR0w==
X-Gm-Gg: ASbGnctRst7b8GgUw7J5r8zv2QLfcHkqm5WTnSwa4zXQNlNTRM9WYD/bVH6tuioF/80
 psoGPw26ra1eGSEYury85Q/++dpBul7lZkMM2HtVveNAguCU0qtULAi2ySlJNRxYgY1KXxRf8Ag
 xX+mIvXLk7faXp0quNb3H5c/vIB2n8NG/aDnPFJ1O9CBMyD/CahfKwqQa7eDLhL6T1IVulNgT7l
 BFAngIlsNOeLTTr+taX1QMP+eR34KSscaZ9uy6qa5/3wa7K56H8lMmtUv92wxhgwSsrxH7QkXUO
 ofPlrTm7EHnyK5N3KfprVQuJsBpLqa7ZeQULpxfG/Ee4BMNEIX6p8GDlvFCtcBu7fqsDHeGP6oJ
 /BXa7RCcFXgWBhYCQL4LELUy1KqeweYyg1CsKpgDCX8NahXQoNciaFXFktGREnONaAWnCpT53z+
 KYHoypBbbsJQB/5H3+F44gLkPHASYi
X-Google-Smtp-Source: AGHT+IEzFAHtUToZtZwfMDKYmQw7wbSrolLPUo44fC4NQ7UlThZiJ5UFxMBzGFPaK/V7Ac7GVy/XZQ==
X-Received: by 2002:a05:600c:5299:b0:470:ff87:6c2d with SMTP id
 5b1f17b1804b1-4711791781fmr11120185e9.29.1760652030830; 
 Thu, 16 Oct 2025 15:00:30 -0700 (PDT)
Received: from krug (87-196-72-166.net.novis.pt. [87.196.72.166])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-4711441f975sm48017495e9.4.2025.10.16.15.00.29
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 16 Oct 2025 15:00:30 -0700 (PDT)
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
In-Reply-To: <87v7ke1sv6.fsf@HIDDEN>
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN> <871pn2itfv.fsf@HIDDEN>
 <ier7bwuiq8q.fsf@HIDDEN> <87v7ke1sv6.fsf@HIDDEN>
Date: Thu, 16 Oct 2025 23:01:53 +0100
Message-ID: <87qzv21p66.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes:

> encourage you to push it.  Maybe I'll try my hand at tweaking it.

I tried to do this and made some progress (also cleaning up the code).
But it still needs the conditional "just-in-time" margin resize code if
it's to pass the "daemon + config that runs flymake + graphical client"
case.

I attach an improved version of my earlier patch with Juri's idea of a
new value for 'flymake-indicator-type' (which I called 'auto' instead of
'fringes-margins', but I don't care that much).  I also cleaned up the
code and some existing documentation.

Installing this patch does not in any way end to your discussion about
more elegant alternatives.  I think Eli's idea of a display spec that
does the right thing the most promising (but it will have to be
special-cased so Flymake can work with older Emacsen).

Jo=C3=A3o

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 8b6d477c385..da2bf9638d3 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -185,21 +185,24 @@ flymake-fringe-indicator-position
 		 (const right-fringe)
 		 (const :tag "No fringe indicators" nil)))
=20
-(defcustom flymake-indicator-type 'fringes
+(defcustom flymake-indicator-type 'auto
   "Indicate which indicator type to use for display errors.
=20
 The value can be nil (don't indicate errors but just highlight them),
-the symbol `fringes' (use fringes) or the symbol `margins' (use
-margins).
+the symbol `fringes' (use fringes), the symbol `margins' (use margins),
+or the symbol `auto' to automatically guess.
=20
 Difference between fringes and margin is that fringes support displaying
 bitmaps on graphical displays and margins display text in a blank area
 from current buffer that works in both graphical and text displays.
+When margins are selected, Flymake may need to resize them for each
+buffer.  See `flymake-autoresize-margins'.
=20
 See Info node `Fringes' and Info node `(elisp)Display Margins'."
   :version "31.1"
   :type '(choice (const :tag "Use Fringes" fringes)
                  (const :tag "Use Margins" margins)
+                 (const :tag "Guess" auto)
                  (const :tag "No indicators" nil)))
=20
 (defcustom flymake-margin-indicators-string
@@ -222,7 +225,7 @@ flymake-margin-indicators-string
                        (face :tag "Face"))))
=20
 (defcustom flymake-autoresize-margins t
-  "If non-nil, automatically resize margin-width calling `flymake--resize-=
margins'.
+  "If non-nil, automatically resize margin-width.
=20
 Only relevant if `flymake-indicator-type' is set to margins."
   :version "30.1"
@@ -833,7 +836,8 @@ flymake--severity
                                  (warning-numeric-level :error)))
=20
 (defun flymake--indicator-overlay-spec (type)
-  "Return INDICATOR as propertized string to use in error indicators."
+  "Return propertized string for an overlay's `before-string'.
+The overlay will represent a diagnostic of type TYPE."
   (let* ((indicator (flymake--lookup-type-property
                      type
                      (cond ((eq flymake-indicator-type 'fringes)
@@ -870,26 +874,35 @@ flymake--indicator-overlay-spec
                                             #'flymake-show-buffer-diagnost=
ics)
                                            map))))))))
=20
-(defun flymake--resize-margins (&optional orig-width)
-  "Resize current window margins according to `flymake-margin-indicator-po=
sition'.
-Return to original margin width if ORIG-WIDTH is non-nil."
-  (when (and (eq flymake-indicator-type 'margins)
-             flymake-autoresize-margins)
-    (cond
-     ((and orig-width flymake--original-margin-width)
-      (if (eq flymake-margin-indicator-position 'left-margin)
-          (setq left-margin-width flymake--original-margin-width)
-        (setq right-margin-width flymake--original-margin-width)))
-     (t
-      (if (eq flymake-margin-indicator-position 'left-margin)
-          (setq flymake--original-margin-width left-margin-width
-		left-margin-width 2)
-        (setq flymake--original-margin-width right-margin-width
-	      right-margin-width 2))))
-    ;; Apply margin to all windows available.
-    (mapc (lambda (x)
-            (set-window-buffer x (window-buffer x)))
-          (get-buffer-window-list nil nil 'visible))))
+(defun flymake--use-margins-maybe (window)
+  "Super-special heuristic to guess margins instead of fringes." ; bug#773=
13
+  (when (eq flymake-indicator-type 'auto)
+    (cond ((not (cl-case flymake-fringe-indicator-position
+                 (left-fringe (< 0 (nth 0 (window-fringes window))))
+                 (right-fringe (< 0 (nth 1 (window-fringes window))))))
+           ;; No fringes in window, fallback to margins and auto-resize
+           (setq-local flymake-indicator-type 'margins)
+           (when flymake-autoresize-margins
+             (flymake--resize-margins)))
+          (t
+           ;; suitable fringes, locally set the decision
+           (setq-local flymake-indicator-type 'fringes)))))
+
+(defun flymake--restore-margins ()
+  (when flymake--original-margin-width
+    (if (eq flymake-margin-indicator-position 'left-margin)
+        (setq left-margin-width flymake--original-margin-width)
+      (setq right-margin-width flymake--original-margin-width))))
+
+(defun flymake--resize-margins ()
+  (if (eq flymake-margin-indicator-position 'left-margin)
+      (setq flymake--original-margin-width left-margin-width
+            left-margin-width 2)
+    (setq flymake--original-margin-width right-margin-width
+          right-margin-width 2))
+  (mapc (lambda (x)
+          (set-window-buffer x (window-buffer x)))
+        (get-buffer-window-list nil nil 'visible)))
=20
 (defun flymake--equal-diagnostic-p (a b)
   "Tell if A and B are equivalent `flymake--diag' objects."
@@ -1366,8 +1379,11 @@ flymake-start
                     deferred))
         (buffer (current-buffer)))
     (cl-labels
-        ((start-post-command
-          ()
+        ((visible-buffer-window ()
+           (and (or (not (daemonp))
+                    (not (null (frame-parameter nil 'client))))
+                (get-buffer-window (current-buffer))))
+         (start-post-command ()
           (remove-hook 'post-command-hook #'start-post-command
                        nil)
           ;; The buffer may have disappeared already, e.g. because of
@@ -1375,22 +1391,26 @@ flymake-start
           (when (buffer-live-p buffer)
             (with-current-buffer buffer
               (flymake-start (remove 'post-command deferred) force))))
-         (start-on-display
-          ()
+         (start-on-display ()
           (remove-hook 'window-configuration-change-hook #'start-on-display
                        'local)
-          (flymake-start (remove 'on-display deferred) force)))
+          ;; Double check that buffer is actually visible (bug#77313)
+          (if (visible-buffer-window)
+              (setq deferred (remove 'on-display deferred)))
+          (flymake-start deferred force)))
       (cond ((and (memq 'post-command deferred)
                   this-command)
              (add-hook 'post-command-hook
                        #'start-post-command
                        'append nil))
             ((and (memq 'on-display deferred)
-                  (not (get-buffer-window (current-buffer))))
+                  (not (visible-buffer-window)))
              (add-hook 'window-configuration-change-hook
                        #'start-on-display
                        'append 'local))
             (flymake-mode
+             (when-let* ((w (visible-buffer-window)))
+               (flymake--use-margins-maybe w))
              (setq flymake-check-start-time (float-time))
              (let ((backend-args
                     (and
@@ -1494,8 +1514,9 @@ flymake-mode
     (add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t)
     (add-hook 'eldoc-documentation-functions 'flymake-eldoc-function t t)
=20
-    ;; AutoResize margins.
-    (flymake--resize-margins)
+    ;; Maybe auto-resize margins
+    (when (and (eq flymake-indicator-type 'margins) flymake-autoresize-mar=
gins)
+      (flymake--resize-margins))
=20
     ;; We can't just `clrhash' `flymake--state': there may be in
     ;; in-transit requests from other backends if `flymake-mode' was
@@ -1513,8 +1534,8 @@ flymake-mode
     ;;+(remove-hook 'find-file-hook (function flymake-find-file-hook) t)
     (remove-hook 'eldoc-documentation-functions 'flymake-eldoc-function t)
=20
-    ;; return margin to original size
-    (flymake--resize-margins t)
+    ;; return any resized margin to original size
+    (flymake--restore-margins)
=20
     (when flymake-timer
       (cancel-timer flymake-timer)
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 8b6d477c385..da2bf9638d3 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -185,21 +185,24 @@ flymake-fringe-indicator-position
 		 (const right-fringe)
 		 (const :tag "No fringe indicators" nil)))
=20
-(defcustom flymake-indicator-type 'fringes
+(defcustom flymake-indicator-type 'auto
   "Indicate which indicator type to use for display errors.
=20
 The value can be nil (don't indicate errors but just highlight them),
-the symbol `fringes' (use fringes) or the symbol `margins' (use
-margins).
+the symbol `fringes' (use fringes), the symbol `margins' (use margins),
+or the symbol `auto' to automatically guess.
=20
 Difference between fringes and margin is that fringes support displaying
 bitmaps on graphical displays and margins display text in a blank area
 from current buffer that works in both graphical and text displays.
+When margins are selected, Flymake may need to resize them for each
+buffer.  See `flymake-autoresize-margins'.
=20
 See Info node `Fringes' and Info node `(elisp)Display Margins'."
   :version "31.1"
   :type '(choice (const :tag "Use Fringes" fringes)
                  (const :tag "Use Margins" margins)
+                 (const :tag "Guess" auto)
                  (const :tag "No indicators" nil)))
=20
 (defcustom flymake-margin-indicators-string
@@ -222,7 +225,7 @@ flymake-margin-indicators-string
                        (face :tag "Face"))))
=20
 (defcustom flymake-autoresize-margins t
-  "If non-nil, automatically resize margin-width calling `flymake--resize-=
margins'.
+  "If non-nil, automatically resize margin-width.
=20
 Only relevant if `flymake-indicator-type' is set to margins."
   :version "30.1"
@@ -833,7 +836,8 @@ flymake--severity
                                  (warning-numeric-level :error)))
=20
 (defun flymake--indicator-overlay-spec (type)
-  "Return INDICATOR as propertized string to use in error indicators."
+  "Return propertized string for an overlay's `before-string'.
+The overlay will represent a diagnostic of type TYPE."
   (let* ((indicator (flymake--lookup-type-property
                      type
                      (cond ((eq flymake-indicator-type 'fringes)
@@ -870,26 +874,35 @@ flymake--indicator-overlay-spec
                                             #'flymake-show-buffer-diagnost=
ics)
                                            map))))))))
=20
-(defun flymake--resize-margins (&optional orig-width)
-  "Resize current window margins according to `flymake-margin-indicator-po=
sition'.
-Return to original margin width if ORIG-WIDTH is non-nil."
-  (when (and (eq flymake-indicator-type 'margins)
-             flymake-autoresize-margins)
-    (cond
-     ((and orig-width flymake--original-margin-width)
-      (if (eq flymake-margin-indicator-position 'left-margin)
-          (setq left-margin-width flymake--original-margin-width)
-        (setq right-margin-width flymake--original-margin-width)))
-     (t
-      (if (eq flymake-margin-indicator-position 'left-margin)
-          (setq flymake--original-margin-width left-margin-width
-		left-margin-width 2)
-        (setq flymake--original-margin-width right-margin-width
-	      right-margin-width 2))))
-    ;; Apply margin to all windows available.
-    (mapc (lambda (x)
-            (set-window-buffer x (window-buffer x)))
-          (get-buffer-window-list nil nil 'visible))))
+(defun flymake--use-margins-maybe (window)
+  "Super-special heuristic to guess margins instead of fringes." ; bug#773=
13
+  (when (eq flymake-indicator-type 'auto)
+    (cond ((not (cl-case flymake-fringe-indicator-position
+                 (left-fringe (< 0 (nth 0 (window-fringes window))))
+                 (right-fringe (< 0 (nth 1 (window-fringes window))))))
+           ;; No fringes in window, fallback to margins and auto-resize
+           (setq-local flymake-indicator-type 'margins)
+           (when flymake-autoresize-margins
+             (flymake--resize-margins)))
+          (t
+           ;; suitable fringes, locally set the decision
+           (setq-local flymake-indicator-type 'fringes)))))
+
+(defun flymake--restore-margins ()
+  (when flymake--original-margin-width
+    (if (eq flymake-margin-indicator-position 'left-margin)
+        (setq left-margin-width flymake--original-margin-width)
+      (setq right-margin-width flymake--original-margin-width))))
+
+(defun flymake--resize-margins ()
+  (if (eq flymake-margin-indicator-position 'left-margin)
+      (setq flymake--original-margin-width left-margin-width
+            left-margin-width 2)
+    (setq flymake--original-margin-width right-margin-width
+          right-margin-width 2))
+  (mapc (lambda (x)
+          (set-window-buffer x (window-buffer x)))
+        (get-buffer-window-list nil nil 'visible)))
=20
 (defun flymake--equal-diagnostic-p (a b)
   "Tell if A and B are equivalent `flymake--diag' objects."
@@ -1366,8 +1379,11 @@ flymake-start
                     deferred))
         (buffer (current-buffer)))
     (cl-labels
-        ((start-post-command
-          ()
+        ((visible-buffer-window ()
+           (and (or (not (daemonp))
+                    (not (null (frame-parameter nil 'client))))
+                (get-buffer-window (current-buffer))))
+         (start-post-command ()
           (remove-hook 'post-command-hook #'start-post-command
                        nil)
           ;; The buffer may have disappeared already, e.g. because of
@@ -1375,22 +1391,26 @@ flymake-start
           (when (buffer-live-p buffer)
             (with-current-buffer buffer
               (flymake-start (remove 'post-command deferred) force))))
-         (start-on-display
-          ()
+         (start-on-display ()
           (remove-hook 'window-configuration-change-hook #'start-on-display
                        'local)
-          (flymake-start (remove 'on-display deferred) force)))
+          ;; Double check that buffer is actually visible (bug#77313)
+          (if (visible-buffer-window)
+              (setq deferred (remove 'on-display deferred)))
+          (flymake-start deferred force)))
       (cond ((and (memq 'post-command deferred)
                   this-command)
              (add-hook 'post-command-hook
                        #'start-post-command
                        'append nil))
             ((and (memq 'on-display deferred)
-                  (not (get-buffer-window (current-buffer))))
+                  (not (visible-buffer-window)))
              (add-hook 'window-configuration-change-hook
                        #'start-on-display
                        'append 'local))
             (flymake-mode
+             (when-let* ((w (visible-buffer-window)))
+               (flymake--use-margins-maybe w))
              (setq flymake-check-start-time (float-time))
              (let ((backend-args
                     (and
@@ -1494,8 +1514,9 @@ flymake-mode
     (add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t)
     (add-hook 'eldoc-documentation-functions 'flymake-eldoc-function t t)
=20
-    ;; AutoResize margins.
-    (flymake--resize-margins)
+    ;; Maybe auto-resize margins
+    (when (and (eq flymake-indicator-type 'margins) flymake-autoresize-mar=
gins)
+      (flymake--resize-margins))
=20
     ;; We can't just `clrhash' `flymake--state': there may be in
     ;; in-transit requests from other backends if `flymake-mode' was
@@ -1513,8 +1534,8 @@ flymake-mode
     ;;+(remove-hook 'find-file-hook (function flymake-find-file-hook) t)
     (remove-hook 'eldoc-documentation-functions 'flymake-eldoc-function t)
=20
-    ;; return margin to original size
-    (flymake--resize-margins t)
+    ;; return any resized margin to original size
+    (flymake--restore-margins)
=20
     (when flymake-timer
       (cancel-timer flymake-timer)







Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 16 Oct 2025 22:37:02 +0000
Resent-Message-ID: <handler.77313.B77313.17606542185459 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>, Juri Linkov <juri@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17606542185459
          (code B ref 77313); Thu, 16 Oct 2025 22:37:02 +0000
Received: (at 77313) by debbugs.gnu.org; 16 Oct 2025 22:36:58 +0000
Received: from localhost ([127.0.0.1]:40082 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9Waf-0001Pz-Mb
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 18:36:58 -0400
Received: from fout-b3-smtp.messagingengine.com ([202.12.124.146]:56099)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1v9Waa-0001Oe-Ad
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 18:36:55 -0400
Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41])
 by mailfout.stl.internal (Postfix) with ESMTP id 51D421D000AB;
 Thu, 16 Oct 2025 18:36:46 -0400 (EDT)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-01.internal (MEProxy); Thu, 16 Oct 2025 18:36:46 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1760654206;
 x=1760740606; bh=T/CzO+EhLnnqSmA0uVoab0gnWTaL/DKODX81rSAnZU0=; b=
 YfnupEnam6hqTbHub/slXKfGmW009pUeTwYuLqGGAvqkkCEU9QfF3+OhZw3AZcjx
 h4AG/v2RK30GyNCuRCznC9elHCnZkndYHbb4NenDwih4eXuxNos0sapwFW4Jlryv
 2OmDb9cxPWLhCMP28hpyN7L+mI/ZXMbNp95TGQBexMteb9loJRwt8mDyp03risCL
 mMtUaWONkQHWbGb9dzrd4Muw39NVgRwoBcmbDjouMnSqxFPiYf+IUuTDE0tL3Fui
 8PaLJRWcCkI5O5A/o/27Aa7n5wJpjMm+/1fEoy0vr7mU9IyHmFXGgrRmVE+BLZ05
 ivIpnKrjQ9kAshHlL3vbpg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1760654206; x=
 1760740606; bh=T/CzO+EhLnnqSmA0uVoab0gnWTaL/DKODX81rSAnZU0=; b=G
 X+gwFA7LgpMQd2b/uza9znWBdCRNYnY+8xgxJYATxTUg3SdyFnjGNqoNqECspS2T
 ikwOrDeqcQDeZicpovu+twjeWezPT69DqLJuuPFbBElbLp2uTlvOqg19BlRG7J08
 vm2AlH9S7V0gm6E6VedpF2zc7DRBGMoh1jtaD0rgpg0rX+SYJiH4u+YBq4Ms9NHH
 PFT6+VHRkB3PpBZNLIlX3tiyAtAGA/BnnJc6xOIEUP/mBeMpFMKp53IUVzgN5QmI
 I/kwQJAI5jtiwkcQxYfi3ndYQP0MvAJLjK+wx9+xz0gemCeTVJCOJfvSf15cXDHN
 MdykKuQTj2MHcCI0wy2RQ==
X-ME-Sender: <xms:fXPxaHwqvNHI5ZR974NRInrcJ0jOeN3QKa-T5MhSJ7so8foHADBXow>
 <xme:fXPxaGJlxigANtD7Sj8SKLjAuec0cbTy27Kvtx_v6tnBB0Cwg5eclpg5r63hUZpdx
 znpb4CeVgJv65s-zTmjYaiK0Ob-yq3sLf3tKOWH0JguGBoZ4IG3Ea_x>
X-ME-Received: <xmr:fXPxaJrJ-bC8UWbjR7W2I9bvJO8Lm_R9yMYqsNPeQF0c_JY6uzZjr5p82fBa5_50oLVW>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduvdejhedtucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu
 rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf
 gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhithhr
 hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg
 hrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedujeeh
 necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih
 htrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhp
 ohhuthdprhgtphhtthhopehssggruhhghhesjhgrnhgvshhtrhgvvghtrdgtohhmpdhrtg
 hpthhtohepjhhurhhisehlihhnkhhovhdrnhgvthdprhgtphhtthhopegvlhhiiiesghhn
 uhdrohhrghdprhgtphhtthhopehjohgrohhtrghvohhrrgesghhmrghilhdrtghomhdprh
 gtphhtthhopeejjeefudefseguvggssghughhsrdhgnhhurdhorhhg
X-ME-Proxy: <xmx:fXPxaNJcFLGn2tDDTkhGz4iq83HLmhMOQsaCCl-P54MbNcQTgPhIMw>
 <xmx:fXPxaGTuvZP8HvRsfyf4L_Bw31F4xfzsO9P8xrC6v-fS1jvm5iq_4w>
 <xmx:fXPxaEuyOAyCa-1NSmzjgoV5D6HJ95PVUy4HPIJXc7SGXXRfTKXA7g>
 <xmx:fXPxaPaTsOGlZG4r8PiU9uccX6MqAEQVD1TJ9BK50VVHQAA8VmltGw>
 <xmx:fnPxaMZsAvWC6i824KhsC0R1T-XKcJOkb78zyoHvwLUv6PX2VxNccH85>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 16 Oct 2025 18:36:44 -0400 (EDT)
Message-ID: <3fb2c878-83d8-4b79-8c3b-6077ef439da3@HIDDEN>
Date: Fri, 17 Oct 2025 01:36:42 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <86bjmga4gd.fsf@HIDDEN> <878qhkaur0.fsf@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <iercy6mitzk.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 16/10/2025 21:25, Spencer Baugh wrote:
> But what about other packages which also want to use margins only in tty
> windows, like hideshow or diff-hl?
> 
> They won't be setting left-margin-width, they will (presumably) also be
> setting the window margin width in a hook on
> window-buffer-change-functions, with basically identical logic.
> 
> If flymake resets the window margin width to left-margin-width, won't it
> break these other packages?

FWIW, diff-hl sets left-margin-width and follows that with a 
'set-window-buffer' call, for the value to take effect.

That happens in "regular" code, not in window-buffer-change-functions.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 17 Oct 2025 01:18:02 +0000
Resent-Message-ID: <handler.77313.B77313.176066387425793 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176066387425793
          (code B ref 77313); Fri, 17 Oct 2025 01:18:02 +0000
Received: (at 77313) by debbugs.gnu.org; 17 Oct 2025 01:17:54 +0000
Received: from localhost ([127.0.0.1]:41821 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9Z6O-0006hw-UM
	for submit <at> debbugs.gnu.org; Thu, 16 Oct 2025 21:17:53 -0400
Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]:47417)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1v9Z6D-0006hK-UQ
 for 77313 <at> debbugs.gnu.org; Thu, 16 Oct 2025 21:17:48 -0400
Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 7785F14001DB;
 Thu, 16 Oct 2025 21:17:35 -0400 (EDT)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-04.internal (MEProxy); Thu, 16 Oct 2025 21:17:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1760663855;
 x=1760750255; bh=Zs+hQmhFm7IOlMdgjVf9zvVpdJzTpwH5uB+lOQ7vlXg=; b=
 nrdoDXaRxPjFTdUi9vvSchSv+D1hyW3Z4fwF0jvw8/VdCiQEcujjSehQk5XoYT85
 vzmebcUaY82Fbwxr+VYNvpZoJeu/iN/GKgZ1CaL+ljB3z9kVtGgqn/uKgpvQoNOQ
 hV5Z1UYZJDVxXEIE8yWbZzGywpai8HpuxWo6iYSZFdQ4+yyFrHDqIlZ4Pcw3SW4l
 WC3mNaQbZuNTJI4+BOIBvpczy1sziVWF2W7qNDoyYSUz647KL4y9ttS/eIn0dTuB
 Nay6p6Ja+WSsXVr16GCm2qJO4ywA3x64t4s+/FNiJlx5s1YoLD6Ya/v9D62tvxEz
 wyYnP0QleADkuQ2a0mejjA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1760663855; x=
 1760750255; bh=Zs+hQmhFm7IOlMdgjVf9zvVpdJzTpwH5uB+lOQ7vlXg=; b=B
 lSrQqg0k7EERd1QmuMx7ThPJj17Bcp724L5Mt4fXrLZSqRtZHRG0dSixLD4kA/jQ
 SLZyZDuNI7cmr4v2o4fraokSJU2SBqVs6Gf3BRvF2wnGDOD6MZAvkXX3LAx3AzXe
 83oefSdNKvB8zTtBBQBSqxkiX/44BF6JPRyhbiDEh0W6xyHyqwEvucXdkFszYCK2
 JIgjcNXNET+DeD5VDjBV6n6/aZ7L5rSYTMzUWgQbGljaSYNIAHvEfOpT7uNksCbx
 TuShq964b0Us2+16IQBIrbWHDIizO3t2hJdiPtc2gOk3akKqT7SM5vWjiUtQ1dJD
 /VzBzce253q5spNuKSJpA==
X-ME-Sender: <xms:LpnxaMMCVRFQ3hS7nTy5YVa0vHygWDue0u-MBtwrIwgLOjzoaWZyVQ>
 <xme:LpnxaJ1FnoLgFUBNVlMvHkPendsANX4WD5ewSwHwD-sKgskOG8w1xVlPsj9BhXF11
 Rxtw8zaU2431O8PpL61RzGjxImyuFLEwHaoB83NokVNiotxrMKBrYM>
X-ME-Received: <xmr:LpnxaLlEvcWM_ALCs99iaIdWCjdWXRM8oVOir3aEGpoQ5vtVuObJe1cIJU1aOxxn0E_z>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduvdejkeefucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu
 rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf
 gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhithhr
 hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg
 hrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedujeeh
 necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih
 htrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhp
 ohhuthdprhgtphhtthhopehssggruhhghhesjhgrnhgvshhtrhgvvghtrdgtohhmpdhrtg
 hpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtohepjhhorghothgrvhhorhgr
 sehgmhgrihhlrdgtohhmpdhrtghpthhtohepjeejfedufeesuggvsggsuhhgshdrghhnuh
 drohhrghdprhgtphhtthhopehjuhhriheslhhinhhkohhvrdhnvght
X-ME-Proxy: <xmx:LpnxaAWjgYtgb_pomEKzj1-ne-Gf8Th1QqoxGWBKEYhvP79PXKK23w>
 <xmx:LpnxaBukWrLZJZ6AFrgzio-db9xSGgOj_Bi0RgVGzSwi0-J6_scFDA>
 <xmx:LpnxaDZ76BZfO7JrXNerX1iUN1X45V8msK1YPueMogLSIo1SDM_Opg>
 <xmx:LpnxaAVCsF_HsHynrS1T8F7HOwQF_5HHuY_QysZJyggeJ0VG2QLFOg>
 <xmx:L5nxaFGVh_CyVTwwus1217hhES651GsG0Ry1UBU2gh2KQvK7t2JXXKE_>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 16 Oct 2025 21:17:33 -0400 (EDT)
Message-ID: <89c7a05c-d7a7-4299-b535-1fe6d423f139@HIDDEN>
Date: Fri, 17 Oct 2025 04:17:31 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
 <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN> <861pn3csvw.fsf@HIDDEN>
 <7d01fcae-07b3-4126-a277-29150f24cac6@HIDDEN> <86ldlbavch.fsf@HIDDEN>
 <ierplanhuf7.fsf@HIDDEN>
 <8d5b8064-32fa-44f1-ae17-238e41616dac@HIDDEN>
 <ierms5rhru7.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <ierms5rhru7.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 16/10/2025 16:57, Spencer Baugh wrote:
> Dmitry Gutov <dmitry@HIDDEN> writes:
> 
>> On 16/10/2025 16:01, Spencer Baugh wrote:
>>> Eli Zaretskii <eliz@HIDDEN> writes:
>>>> If we are going to make changes to display code, I'd rather support a
>>>> special kind of fringe spec which would automatically switch to using
>>>> the margin if the fringe is not available.  That's be easier to use
>>>> and will probably be welcome in more applications.  Patches welcome.
>>> Something like that would be ideal, if we can decide on a way to do
>>> it.
>>> I think what would be best is not falling back to the margin, but
>>> some
>>> new "text fringe" which is a better match to the behavior of the
>>> currently-existing bitmap fringe.
>>> - the text fringe is mutually exclusive with the current bitmap
>>> fringe:
>>>     only one of them is ever displayed in any window
>>> - like the current bitmap fringe, and unlike the margin, the text
>>> fringe
>>>     would only show one fringe spec at a time rather than combining them
>>
>> Don't we want to be able to combine the markers from different
>> sources? Like from diff-hl and flymake, say.
> 
> Certainly, but there's no support for combining markers from different
> sources for bitmap fringes, right?  And I'm not sure how we ever would
> support it.  Which suggests we shouldn't support it for text fringes.

I don't know if it's a rendering limitation, or just something we never 
got around to. I remember people also dreaming about svg pictures on 
fringes, those could be the highest fidelity look, but also likely 
incompatible with more toolkits.

Depends on the overall investment one could put into the feature.

> Though, if anyone has a clever idea for combining multiple fringe
> bitmaps, it's worth talking about before deciding on this as the model
> for text fringes.

If the resulting bitmap is allowed to have multiple colors, even simple 
overlaying would suffice, perhaps with priority. E.g. diff-hl bitmaps 
are usually larger and flat, better as a background, whereas flymake's 
bitmaps are smaller and have distinct figures.

So if the latter could be painted on top of the former, it would create 
a recognizable combination. One would have to be able to indicate 
somehow, though, that only one bitmap's background color should be used.

A combination could also be overlaying with a small right-down offset, 
but one would need to fiddle and see how it looks.

Or we extend the fringe's width X times and just paint bitmaps side by 
side. Still depends on the use of multiple colors.

>>> - The default size of the text fringe would be 0, but flymake (or other
>>>     applications) could set it to a non-zero size.  This would only affect
>>>     windows which don't have bitmap fringes.  Since the text and bitmap
>>>     fringes are mutually exclusive, flymake would simply enable the text
>>>     fringe unconditionally in flymake-mode or flymake-start: no need to
>>>     check if we're on a GUI frame.
>>
>> It would be nice to have the text fringe automagically resize when
>> there is something to show, instead of having each package decide that
>> it needs to enlarge it (and to which size).
> 
> I was initially thinking that, but I suspect the straightforward way to
> do that in the display engine would be based on the display properties
> which are currently on-screen.  Which in turn means that if you scroll
> away from a diagnostic, the text fringe would resize back to 0, which
> would be annoying, I think.

Yeah, either on screen, or globally in the buffer.

But if the list of markers inside the buffer could be updated 
asynchronously, and not just in after-save-hook (like it mostly happens 
with diff-hl), that horizontal jump could be annoying.

Still, we could have a buffer-local registry where each package would 
note how much space it needs, and the "registry" would allocate a 
margin, or "advanced fringe", of corresponding total width.

Still would be better than having every package decide on the final 
value of the width.

> At the very least, if there were no overlays in the buffer with
> diagnostics, the text fringe would be resized back to 0, and resized to
> non-zero the first time an overlay is inserted, which seems like it
> would be annoying as flymake clears and reinserts diagnostics.

If it didn't happen asynchronously, could be fine, actually. But with 
async, maybe not.

> So I think we may indeed just need to have applications explicitly
> enable the text fringe, just like they need to resize the margin.  It's
> annoying, but it's less bad than the margin case since we don't need to
> accomodate multiple different identifiers showing up in the text fringe,
> and resizing it to the sum of the lengths of all of those.

If packages need to enable the text fringe, they will probably need to 
disable it as well, when the mode is disabled, and here again we have 
the possibility of stepping on each other's toes...




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 17 Oct 2025 06:11:03 +0000
Resent-Message-ID: <handler.77313.B77313.176068145012529 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: dmitry@HIDDEN, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org, sbaugh@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176068145012529
          (code B ref 77313); Fri, 17 Oct 2025 06:11:03 +0000
Received: (at 77313) by debbugs.gnu.org; 17 Oct 2025 06:10:50 +0000
Received: from localhost ([127.0.0.1]:45291 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9dfq-0003Fx-Oa
	for submit <at> debbugs.gnu.org; Fri, 17 Oct 2025 02:10:50 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52264)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v9dfj-0003En-Bv
 for 77313 <at> debbugs.gnu.org; Fri, 17 Oct 2025 02:10:40 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1v9dfZ-0007WO-BN; Fri, 17 Oct 2025 02:10:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=1Q3XIGeDEUzPPm+EKmD2qthv9Dx7ACOLsLTzDxnGp58=; b=AdnG9SFvjAd+
 hMdUC7kfTcQZtZlbXbOgKUt88w2CruBwrzcP8mvgKmBbGpaxOIrUe5pGWKInEYr0uSkDZuFjlvSu1
 MjuExGr12y1dqRvdFqAXWwec1NK/7uDf+J8LSBAe8RfgC6+TJ/11fnQ7lEZV1aaN259J9tD+hxtDh
 lfuXssMzzr62f5DaEvnTTM5PtTKYwAeDzNNF8dY13wWO0OeCdjkZ8TLCyZObY0U/KU50OfErqI4xT
 hP6bFo9shb58V68oq7EEBd6+GKckus5WyO9BH34Ye4vw/0akASgw2cgHM9fdbje6deFlX3iMACuXd
 hsB3l1styS0aMqj9/f6iFg==;
Date: Fri, 17 Oct 2025 09:10:24 +0300
Message-Id: <86cy6mgisv.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87347iq3gm.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 16 Oct 2025 18:22:23 +0300)
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CAO=BR8PSw-+VmeaEcZPVc0_yw7PfF-FTa_+5GWEtzv1nK0o+_Q@HIDDEN>
 <CALDnm50nDWaeym8=GYk3qoHsC=sdMgcB9913XtETZ5z2PnkSmQ@HIDDEN>
 <CAO=BR8Nin-h0phzBzHQKS-+RHOYpJE7RgMHuJgEYv48YBQMBiw@HIDDEN>
 <CALDnm51bQUQYxXpb9E2672K_-2aMnSNXNQbhy37yg+4L_bfyRw@HIDDEN>
 <CALDnm52Ajj37zfFBRgG12ZDCxCkFCJJHuvU=DzNY7imKVTc0HQ@HIDDEN>
 <CALDnm537vu_4i8EZid_TrA6QAS2RfQfPxPRytP+a0oi78ku1aA@HIDDEN>
 <87v7kpfls0.fsf@HIDDEN> <ierfrbt8eyc.fsf_-_@HIDDEN>
 <86v7koaaja.fsf@HIDDEN> <87347sh85u.fsf@HIDDEN>
 <d72e2dca-a948-43c7-a257-c760a8d251fa@HIDDEN>
 <ier1pn4jclf.fsf@HIDDEN>
 <a138c27f-527e-4ac5-95a3-0f6b2f49bfe3@HIDDEN>
 <87347iq3gm.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: Spencer Baugh <sbaugh@HIDDEN>,  Eli Zaretskii <eliz@HIDDEN>,
>   joaotavora@HIDDEN,  77313 <at> debbugs.gnu.org
> Date: Thu, 16 Oct 2025 18:22:23 +0300
> 
> @@ -200,6 +200,7 @@ flymake-indicator-type
>    :version "31.1"
>    :type '(choice (const :tag "Use Fringes" fringes)
>                   (const :tag "Use Margins" margins)
> +                 (const :tag "Use both with fallback" fringes-margins)

I think a better tag here is "Use fringes if possible, otherwise
margins".




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 17 Oct 2025 06:48:09 +0000
Resent-Message-ID: <handler.77313.B77313.176068364720679 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176068364720679
          (code B ref 77313); Fri, 17 Oct 2025 06:48:09 +0000
Received: (at 77313) by debbugs.gnu.org; 17 Oct 2025 06:47:27 +0000
Received: from localhost ([127.0.0.1]:45615 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9eFK-0005NQ-0D
	for submit <at> debbugs.gnu.org; Fri, 17 Oct 2025 02:47:26 -0400
Received: from mout-p-101.mailbox.org ([80.241.56.151]:57192)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v9eF6-0005MM-BW
 for 77313 <at> debbugs.gnu.org; Fri, 17 Oct 2025 02:47:16 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4cnwNQ2VL5z9tQr;
 Fri, 17 Oct 2025 08:47:02 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760683622;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=wuqdZzVpaVY8Di52T+wThCscyy3ZDQHw/sHDQROglNo=;
 b=F48xMfu3Tmk1She5NQVnPEeSehft/2ltO0TMn1UunL5MKb/6aEywmvpfive/iampZGbTbf
 7Ce2io2H3RTEm1LhwAIx68fTM5Bc2mJ52cjsfX+AI9AWT0impuTwGroxWO1t5sYYNs3Q1k
 iVcjPkDw2SQQYrE6wjz9hymhqEQE2jMuO9m8mcSmXlkXFAObvgRukDlnaxV5W+mE2BYGD4
 v3aIyFZOGUG9mOCpm5eXU5RJJMkyaBIBkJauwuBx3R/1a2qIISLltMhB3B7+F3BRugOdXJ
 kijRjqdYiNFTHsYAme98Hyp+hvxwvMLcgQvKUw3l6wL8rOhcAqMzjgttH3R6kw==
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87v7ke1sv6.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN> <871pn2itfv.fsf@HIDDEN>
 <ier7bwuiq8q.fsf@HIDDEN> <87v7ke1sv6.fsf@HIDDEN>
Date: Fri, 17 Oct 2025 09:39:59 +0300
Message-ID: <87sefic9q8.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From a brief read, I thought that patch by Juri Linkov that make
> flymake-indicator-type be 'fringes-margin' by default and does the
> decision in flymake--highlight-line would fix the problem, but I've just
> tried and it doesn't.  Maybe that patch isn't finished??  
>
> It fails for this basic case
>
>    emacs -Q -nw --eval '(setq trusted-content :all)' --eval '(insert "\nboo!")' -f flymake-mode
>
> This shows an indicator in the margin for Emacs 30, but not in master.

Because it requires the second patch with 'window-buffer-change-functions'
that I sent earlier.

> Otherwise it looks like a perfectly valid idea to do it there, and I
> encourage you to push it.  Maybe I'll try my hand at tweaking it.

Ok, will push after doing more optimizations, and after finishing
the second patch with 'window-buffer-change-functions'.

> Now, I might be wrong, but reading some of the messages and proposals,
> at least one or two seems to be glossing over one very important and
> basic fact, which is that Flymake (like ElDoc, Eglot, and many others)
> is a GNU ELPA :core package.  It has a "Package-Requires: Emacs 26.1"
> header.

So there is no way for packages to share the margins in older Emacs versions.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 17 Oct 2025 06:48:12 +0000
Resent-Message-ID: <handler.77313.B77313.176068364720688 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176068364720688
          (code B ref 77313); Fri, 17 Oct 2025 06:48:12 +0000
Received: (at 77313) by debbugs.gnu.org; 17 Oct 2025 06:47:27 +0000
Received: from localhost ([127.0.0.1]:45617 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9eFL-0005Nb-4R
	for submit <at> debbugs.gnu.org; Fri, 17 Oct 2025 02:47:27 -0400
Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]:57954)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v9eF3-0005LA-9l
 for 77313 <at> debbugs.gnu.org; Fri, 17 Oct 2025 02:47:16 -0400
Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4cnwNL4qlnz9tFN;
 Fri, 17 Oct 2025 08:46:58 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760683618;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=vGKMhoIsGscogsAKp1Lim6bQPNgc3FKSbL88/gOjL2g=;
 b=bKE4otD9caRrzBr2Yd2DHEKOdeWcMJJyWxmABiDrnm3I2Ak5uLLRjfqhwtaQ9FeigquEow
 K34xBrMEqy+ESEmNw8q/GHGHeT81/Et4aKsyJ6cCKGXGOZPwXCANLsukWQiJfjv+FroG5X
 fec+968lNKZQSd7e0yih0Esh1LqXKwyXrfoFz18Ivpp5Ad4mEERwpx6wP6PaoGJNC9LaX+
 KkcHc0xuPcTojcGmR1U1Reey1ZxwSa4s9VIMsM1PtUWcPdMPxwIxmQlF45lvZ6tI0/0xUx
 mI3d2VcDuA+lSkm+OVc/O3pQHBttTzeMSQpbLwgFdvo9HYXuIcTI2Umo6KuMyg==
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <3fb2c878-83d8-4b79-8c3b-6077ef439da3@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN>
 <3fb2c878-83d8-4b79-8c3b-6077ef439da3@HIDDEN>
Date: Fri, 17 Oct 2025 09:32:25 +0300
Message-ID: <87h5vydp3y.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> But what about other packages which also want to use margins only in tty
>> windows, like hideshow or diff-hl?
>> They won't be setting left-margin-width, they will (presumably) also be
>> setting the window margin width in a hook on
>> window-buffer-change-functions, with basically identical logic.
>> If flymake resets the window margin width to left-margin-width, won't it
>> break these other packages?
>
> FWIW, diff-hl sets left-margin-width and follows that with
> a 'set-window-buffer' call, for the value to take effect.

It should be sufficient to call just

  (set-window-margins nil left-margin-width right-margin-width)

> That happens in "regular" code, not in window-buffer-change-functions.

We could create a new minor mode that updates margin widths depending
on the display capabilities.  But probably it would be simpler just
to require from the packages to add one hook with a new function:

  (add-hook 'window-buffer-change-functions #'update-window-margins nil t)

that will set 'left-margin-width' to the sum of widths required
by all active packages.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 17 Oct 2025 06:48:13 +0000
Resent-Message-ID: <handler.77313.B77313.176068364820696 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176068364820696
          (code B ref 77313); Fri, 17 Oct 2025 06:48:13 +0000
Received: (at 77313) by debbugs.gnu.org; 17 Oct 2025 06:47:28 +0000
Received: from localhost ([127.0.0.1]:45619 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9eFL-0005Nk-Vl
	for submit <at> debbugs.gnu.org; Fri, 17 Oct 2025 02:47:28 -0400
Received: from mout-p-103.mailbox.org ([80.241.56.161]:38980)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1v9eF7-0005MZ-U9
 for 77313 <at> debbugs.gnu.org; Fri, 17 Oct 2025 02:47:18 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4cnwNT6jnMz9syZ;
 Fri, 17 Oct 2025 08:47:05 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760683625;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=CgGa1/KDUdMgEmL+HsF3c5va5nu5fsoRJtla0wSQfc8=;
 b=iuNnw3LmJIbh1VC/3FLejeU3MrgMULqBfRkmyIcJrTpSEFkwMxZSUTisVgGDmKXfz74UlP
 R452jWL86s1anolIWKqAxlOrju5y7ndYcvFPMZIwoGVbLlgefjX1YNJOYcJ+PLteL2+DEw
 r3Vu8e3soGgn/SG5TQHKh8Onr6YrPXSvdEqJXARjJK5ogoBY7eIWpwJoIfya/fvCv9ZYuc
 mYWpausP92sdXCeXwd1t8/Jjgv6O2HR1rCv5d4Bi/6vvvOUPDXDsWtEt37/x97/ErEroeN
 JlYs42qm98aSWAOG4egHqLPbgOluXiHcSfXLtpfQ6gint9e426bPa7oFHcOb/g==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::102 as permitted sender)
 smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <ier7bwuiq8q.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <871pn67uak.fsf@HIDDEN> <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN> <871pn2itfv.fsf@HIDDEN>
 <ier7bwuiq8q.fsf@HIDDEN>
Date: Fri, 17 Oct 2025 09:44:07 +0300
Message-ID: <874iryc9jc.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4cnwNT6jnMz9syZ
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> So we need to design a new feature.  For example, we could add
>> a new hook-like variable that contains a list of functions added
>> by different packages.  Each function returns the margin width required
>> by each package.  Then their sum is set as the window margin width.
>
> Yes, I was thinking we might want something like that.  Maybe called
> window-margin-functions.
>
> That design sounds good to me, but maybe others have objections.
>
> How would {left,right}-margin-width be incorporated into
> window-margin-functions?  Perhaps window-margin-functions could have a
> default value of '(buffer-margin-width), where buffer-margin-width is a
> function which returns (cons left-margin-width right-margin-width).

I now think that a new function update-window-margins that will call
the hook window-margin-functions should update the value of
left-margin-width and right-margin-width, and then just do

  (set-window-margins nil left-margin-width right-margin-width)

with updated values.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 17 Oct 2025 13:10:02 +0000
Resent-Message-ID: <handler.77313.B77313.176070658314312 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176070658314312
          (code B ref 77313); Fri, 17 Oct 2025 13:10:02 +0000
Received: (at 77313) by debbugs.gnu.org; 17 Oct 2025 13:09:43 +0000
Received: from localhost ([127.0.0.1]:49926 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9kDG-0003im-Pj
	for submit <at> debbugs.gnu.org; Fri, 17 Oct 2025 09:09:43 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:53477)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1v9kD7-0003hd-Tu
 for 77313 <at> debbugs.gnu.org; Fri, 17 Oct 2025 09:09:35 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <874iryc9jc.fsf@HIDDEN> (Juri Linkov's message of "Fri, 
 17 Oct 2025 09:44:07 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN> <871pn2itfv.fsf@HIDDEN>
 <ier7bwuiq8q.fsf@HIDDEN> <874iryc9jc.fsf@HIDDEN>
Date: Fri, 17 Oct 2025 09:09:27 -0400
Message-ID: <ierms5pu12w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760706568;
 bh=QyCML4OauN/FHKPoedENvzZwXzJakUhrZym7B57nQOY=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=Xv2ubv3EX2f+q+lQpEK6dPP5EvqeWhbUmTCk4ssP1hvMMp4KtAyxNqTKNRmYylpW4
 YP/DOX8jXfz6Z4roE9E/DRuayIoflQB8OQq/QAdM3GDzITLia1R6rxOC8fK/N1vjvN
 WUXkghoqyPR2zGUDeRsDT5WBIs0knxTjdtnUYSIp+4qVGAd6FYx4vVtH3FE7NlpRXk
 kUdy5WKpqbnFI+aQgxX1Updk6adE5TrtsENNCBtuDvANdVvV0xqWM9FJ9ZRwPPPZ5H
 xmBf71xKA1EFvx67tWsdZEJyU8rJYVdMcBtkRgu74rhI2LTNMZlPNKKJXqKLCClmI0
 Fss5xAa+iNYqQ==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

>>> So we need to design a new feature.  For example, we could add
>>> a new hook-like variable that contains a list of functions added
>>> by different packages.  Each function returns the margin width required
>>> by each package.  Then their sum is set as the window margin width.
>>
>> Yes, I was thinking we might want something like that.  Maybe called
>> window-margin-functions.
>>
>> That design sounds good to me, but maybe others have objections.
>>
>> How would {left,right}-margin-width be incorporated into
>> window-margin-functions?  Perhaps window-margin-functions could have a
>> default value of '(buffer-margin-width), where buffer-margin-width is a
>> function which returns (cons left-margin-width right-margin-width).
>
> I now think that a new function update-window-margins that will call
> the hook window-margin-functions should update the value of
> left-margin-width and right-margin-width, and then just do
>
>   (set-window-margins nil left-margin-width right-margin-width)
>
> with updated values.

But setting left-margin-width means the margins will be the same in all
windows.  We want margins to be different between graphical and TTY
windows.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 18 Oct 2025 00:40:02 +0000
Resent-Message-ID: <handler.77313.B77313.17607479928990 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17607479928990
          (code B ref 77313); Sat, 18 Oct 2025 00:40:02 +0000
Received: (at 77313) by debbugs.gnu.org; 18 Oct 2025 00:39:52 +0000
Received: from localhost ([127.0.0.1]:59926 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v9uz9-0002Ku-Ti
	for submit <at> debbugs.gnu.org; Fri, 17 Oct 2025 20:39:52 -0400
Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]:51081)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1v9uz6-0002K6-P9
 for 77313 <at> debbugs.gnu.org; Fri, 17 Oct 2025 20:39:49 -0400
Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45])
 by mailfout.phl.internal (Postfix) with ESMTP id 833EDEC0183;
 Fri, 17 Oct 2025 20:39:42 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-05.internal (MEProxy); Fri, 17 Oct 2025 20:39:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1760747982;
 x=1760834382; bh=iNcvC5L5oDV4dVtwKWepi7wSoFw+HgfofwMPrbqeJ7o=; b=
 HXZLJFK/6U8x9M38gTtTrztcu4X0AbvXYt8af8ZQaMQQvdzg73GOn6usRUvSmki2
 8P8roUQ1WHuDrsZm/hP6wTHrhc8LJlCUsY4cg59NtJpnamMWO89Yd/hsvXXujzwe
 i5to413TiNfu7sw/7B1hH0SlQzUzGag8wQjNrAly7mVRixAqEAP3LbPPj6YLYtkn
 B3QEtuf92HFA2D5AOtDsk9zBppTmYmsAvTeD8onNUnx+AXb2a1Di5kcmTR++ffrL
 BVM0ccVlhZR9X9oB9rE1EFatciJIrQomDXIg4qcpr2J0Gy8bPdDdOXwIAD/zApB4
 N+DOs5rkfA0ouMDVB7Hi0Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1760747982; x=
 1760834382; bh=iNcvC5L5oDV4dVtwKWepi7wSoFw+HgfofwMPrbqeJ7o=; b=q
 x3fJj36i5i3uYd45DwVzDZKqyPNr4M00DjDCo0vNgi5qjHZixsYnufRl3gzHt9X0
 44uGPIggFb7o8GKhxadRi85IRgtRPjmE648VUy3wdMXocPe+TeaJrAGIHB73ozpr
 htU/w38UkPaGikhpKN5Uh4htE2VVpoBes5jHKziamzS3MciCDM4aSMadW2VD7+0s
 XvqWh22oJq2rcNElTfxes7QCe+tJX5sEbG3uvrmk+zCe6l9OHnErQ/GTa6+/RyQv
 Yxm8ePe+gJSVSXuSMLrm1Wck/3NMJuOk4QdhxhrV+eInbsLyhgO7sz874IYHmqF0
 EZhUFcmlKVWlRuZuSEVVw==
X-ME-Sender: <xms:zuHyaMTGD4a2h5S6tSYu-NiWCLRCztp-n5TFyNYCDk-sic9WMRwy3Q>
 <xme:zuHyaAqgKJGXYUyp-UHBseA3cxnt4LGxR7EnFss_CM9-aZ50S-2Vbu6tQw7SRGfv6
 Riuf6d2opwfclOleKNynmi55qTHDgmFkAluo8dSifu7kSJYLZ_jwt8S>
X-ME-Received: <xmr:zuHyaCKzXyZrsBbQ_oNIYTyMLyJUepIG-_CS-Vsi_rVL6qsHWXi_f1vx11fe0k0Yfptq>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddufedtieefucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu
 rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf
 gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhithhr
 hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg
 hrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedujeeh
 necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih
 htrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhp
 ohhuthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrdhnvghtpdhrtghpthhtohepsh
 gsrghughhhsehjrghnvghsthhrvggvthdrtghomhdprhgtphhtthhopegvlhhiiiesghhn
 uhdrohhrghdprhgtphhtthhopehjohgrohhtrghvohhrrgesghhmrghilhdrtghomhdprh
 gtphhtthhopeejjeefudefseguvggssghughhsrdhgnhhurdhorhhg
X-ME-Proxy: <xmx:zuHyaLr7qHbcmRxZIFPMtGXuVcccvCTYQDbbUwGKU8m0aWyqjPa9tg>
 <xmx:zuHyaCwHqug6C-Vi9B3BXSL_O6rSeLi2ClDMb5h75Y4daWJOjIPrGg>
 <xmx:zuHyaHPvYpvvPEwORvlNKjR_a8Rw8oco2X5VAMyZuBZPkaQhXgKZSw>
 <xmx:zuHyaP6NftqAcQrACJSm9JK1_ChVGdUgp_rAiutAoNvqRuu5YGVP6A>
 <xmx:zuHyaO6c6MJnRaY4T12hHtsxF9pmQRBgPKIYv643_hCvYUeXEOJgfHGF>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 17 Oct 2025 20:39:40 -0400 (EDT)
Message-ID: <9be57038-c0f7-41d4-8fe4-a98e1664773f@HIDDEN>
Date: Sat, 18 Oct 2025 03:39:38 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <86o6qf8e2h.fsf@HIDDEN> <871pn67uak.fsf@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN>
 <3fb2c878-83d8-4b79-8c3b-6077ef439da3@HIDDEN>
 <87h5vydp3y.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87h5vydp3y.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 17/10/2025 09:32, Juri Linkov wrote:
>>> But what about other packages which also want to use margins only in tty
>>> windows, like hideshow or diff-hl?
>>> They won't be setting left-margin-width, they will (presumably) also be
>>> setting the window margin width in a hook on
>>> window-buffer-change-functions, with basically identical logic.
>>> If flymake resets the window margin width to left-margin-width, won't it
>>> break these other packages?
>>
>> FWIW, diff-hl sets left-margin-width and follows that with
>> a 'set-window-buffer' call, for the value to take effect.
> 
> It should be sufficient to call just
> 
>    (set-window-margins nil left-margin-width right-margin-width)

Probably. I'm not sure if it's significantly faster than just calling 
'set-window-buffer', though.

>> That happens in "regular" code, not in window-buffer-change-functions.
> 
> We could create a new minor mode that updates margin widths depending
> on the display capabilities.  But probably it would be simpler just
> to require from the packages to add one hook with a new function:
> 
>    (add-hook 'window-buffer-change-functions #'update-window-margins nil t)
> 
> that will set 'left-margin-width' to the sum of widths required
> by all active packages.

Either way it seems like a centralized setting is needed, so that 
'update-window-margins' could be written for that purpose.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 19 Oct 2025 17:44:01 +0000
Resent-Message-ID: <handler.77313.B77313.176089579916012 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176089579916012
          (code B ref 77313); Sun, 19 Oct 2025 17:44:01 +0000
Received: (at 77313) by debbugs.gnu.org; 19 Oct 2025 17:43:19 +0000
Received: from localhost ([127.0.0.1]:37257 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAXR7-00049u-OR
	for submit <at> debbugs.gnu.org; Sun, 19 Oct 2025 13:43:18 -0400
Received: from mout-p-201.mailbox.org ([2001:67c:2050:0:465::201]:58310)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1vAXR0-00048T-DU
 for 77313 <at> debbugs.gnu.org; Sun, 19 Oct 2025 13:43:15 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4cqQrQ4SxWz9sWq;
 Sun, 19 Oct 2025 19:43:02 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760895782;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=K8QStM2P7lLvQxa6SZR44U6znfeal3ABdbWJXPCrkDk=;
 b=SsWlQjkvHOdIxCxClUYxF2WAq8ow8TnjL+TZ08h44hRxdo8quycjBME9BMl9ItP7xrvJ38
 iNaixi0aN/I8wMQdSdktRVfWWINbLPW9BuG/VaWVws3WLx1FDc2QTW/2aZDFOoh6jO9i6b
 qpTjYZSQu6LsEchkJ6HI+AekAaVIhphEzw6oL/wg989i3taHNyJGYh/L8OV8eFRbHnCrE7
 k43OdoGj9Ipt32DZxOy3kLlBqg/sCqW9tY75SzFPCTfAmhJhX5kinl7MsNL03XDD7aRVC7
 /VFHl8SM/QUvLnwX71diGdvxJ6R7GAeW4mKBJKKTua+QV1R0Xgx+NBykxRb7DQ==
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87v7ke1sv6.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <864is24y4l.fsf@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN> <871pn2itfv.fsf@HIDDEN>
 <ier7bwuiq8q.fsf@HIDDEN> <87v7ke1sv6.fsf@HIDDEN>
Date: Sun, 19 Oct 2025 20:42:36 +0300
Message-ID: <87qzuy94bz.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Otherwise it looks like a perfectly valid idea to do it there, and I
> encourage you to push it.  Maybe I'll try my hand at tweaking it.

Ok, the minimal patch that supports all 4 cases is pushed now.

It uses the '(when CONDITION . SPEC)' display condition added in Emacs 21,
so no problem with backward-compatibility.

But the hook 'window-buffer-change-functions' was added in Emacs 27,
so let's add it with compatibility shims later, after implementing a new
hook 'window-margin-functions' that will also require compatibility shims.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 19 Oct 2025 17:49:02 +0000
Resent-Message-ID: <handler.77313.B77313.176089610417374 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176089610417374
          (code B ref 77313); Sun, 19 Oct 2025 17:49:02 +0000
Received: (at 77313) by debbugs.gnu.org; 19 Oct 2025 17:48:24 +0000
Received: from localhost ([127.0.0.1]:37318 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAXW3-0004W6-Ol
	for submit <at> debbugs.gnu.org; Sun, 19 Oct 2025 13:48:24 -0400
Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]:37988)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1vAXW0-0004VW-ED
 for 77313 <at> debbugs.gnu.org; Sun, 19 Oct 2025 13:48:20 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4cqQyL2yjKz9sWX;
 Sun, 19 Oct 2025 19:48:10 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760896090;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=s8U3je9CPFHhyhm9RBgWe7EAaReiAoZL6w/4zuiQDDA=;
 b=pGIJFeAszA06NluzevKj93ZdkYJCsjK4hYv9F6fw+zobeOCvIJASXCWW1xvA00qlNDTSd3
 BjOSv8zfFd3k99z2l4N1mWrHJqr9NH1XRtCehU8SB2z7wtDuRDAAah0SdEzb11/nYKCmGt
 UMNuE1ORpTYXSPzP7ZE46AbOWEdkMyWQwWPj9705KZjq2e5bFHEdAI/hzFjbmkEpAWDYPL
 EhVjQuAYn8XhcEVPD1PMsYArZ6tpzP8enQ01tVxBrSxhQo2XGSYYxLdKzIIWLnBOS9/AQb
 fpP4WbZos0vwqGixyBNDd7zl+/yybyY8if93jm+Qjen/UJz59lTLs4lxqGZg2g==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::102 as permitted sender)
 smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <ierms5pu12w.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN> <871pn2itfv.fsf@HIDDEN>
 <ier7bwuiq8q.fsf@HIDDEN> <874iryc9jc.fsf@HIDDEN>
 <ierms5pu12w.fsf@HIDDEN>
Date: Sun, 19 Oct 2025 20:47:01 +0300
Message-ID: <87cy6i942y.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4cqQyL2yjKz9sWX
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>>> So we need to design a new feature.  For example, we could add
>>>> a new hook-like variable that contains a list of functions added
>>>> by different packages.  Each function returns the margin width required
>>>> by each package.  Then their sum is set as the window margin width.
>>>
>>> Yes, I was thinking we might want something like that.  Maybe called
>>> window-margin-functions.
>>>
>>> That design sounds good to me, but maybe others have objections.
>>>
>>> How would {left,right}-margin-width be incorporated into
>>> window-margin-functions?  Perhaps window-margin-functions could have a
>>> default value of '(buffer-margin-width), where buffer-margin-width is a
>>> function which returns (cons left-margin-width right-margin-width).
>>
>> I now think that a new function update-window-margins that will call
>> the hook window-margin-functions should update the value of
>> left-margin-width and right-margin-width, and then just do
>>
>>   (set-window-margins nil left-margin-width right-margin-width)
>>
>> with updated values.
>
> But setting left-margin-width means the margins will be the same in all
> windows.  We want margins to be different between graphical and TTY
> windows.

I thought that maybe we should have two hooks: one for packages that
set only the variable left-margin-width and don't need to fall back
from fringes to margins, and another hook for packages that need
to update window margins dynamically depending on the presence
of fringes.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 19 Oct 2025 19:59:02 +0000
Resent-Message-ID: <handler.77313.B77313.17609039093462 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17609039093462
          (code B ref 77313); Sun, 19 Oct 2025 19:59:02 +0000
Received: (at 77313) by debbugs.gnu.org; 19 Oct 2025 19:58:29 +0000
Received: from localhost ([127.0.0.1]:38786 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAZXx-0000tl-3y
	for submit <at> debbugs.gnu.org; Sun, 19 Oct 2025 15:58:29 -0400
Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:56822)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1vAZXu-0000tH-F2
 for 77313 <at> debbugs.gnu.org; Sun, 19 Oct 2025 15:58:27 -0400
Received: by mail-wm1-x330.google.com with SMTP id
 5b1f17b1804b1-471075c0a18so38715525e9.1
 for <77313 <at> debbugs.gnu.org>; Sun, 19 Oct 2025 12:58:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760903900; x=1761508700; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=4gqc5ZkoSqJHrAWAUj3/6bjiLRR27aLspc33o8UL0QU=;
 b=Dc1qGhflwOEaQLZ5Dv+ClGVhMe03m9ZENH9aWxrpdvbV7tWSOaEsWAdXp3u+vlbQDZ
 NeitjadgUCe81gLeT9ZUzylav3VjVrDL2/ui1h425XK5Oq4dt/8iV7py342wOI0gnJrz
 gQGVdeTsdBFAlSKuyhXh/+BaCs4QiLXDpd0wzrtYudIaoOgzZuGCSabQ6Sc7SE6FArTc
 ubBv7oLU6TZ+QSHJCwhMbF8TrWHthOH5XWzNtGyauX/n1VC5mx2kV6X7J9B1WVwCvrU+
 oMXElisPdwcMkXRg9xwD0go238plH4TMk+ZEFcp3mfBaBkEdfgic5BaI19ox7qtc+nJl
 bvJw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760903900; x=1761508700;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=4gqc5ZkoSqJHrAWAUj3/6bjiLRR27aLspc33o8UL0QU=;
 b=etZoOJH0COb+S1bEfp2+YsbdKPZZu0nqP1f8gBOUsDVC9kbz7f46ibsx839dbAS3a6
 IVIGWWtyGhYvSnCMnsPY5tCxpktgYaH2wQ/LXde64gqWeu4AVQs3L7JF2otMhvLyS9dA
 qhzqW/k55O1C9mqF/2PIY4bKuBzAImSGrc/ddZD3IPz6SmAgGGQQ0nTuTmr5cy1vmXW8
 Fkjzv8hZEEmagHndSAJE2IT0pYPc6NsN/E3XFCjalDPmqevKqNEOKmpQKhYHojYYSMVT
 8U91H87PU7ASWhLALIv5/dYNW8rtsOzn9uM8xn8cw3QCJn8hwbadydUtIxxASQXpMV84
 icUA==
X-Forwarded-Encrypted: i=1;
 AJvYcCUdVOcNOz93jHsJiv7xKDClacT7e/TS+ftpEoBjV0y5Hlk7MSN82e/9jIy6juqJcJCEUwa/ew==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YynufrexkrGEr43JLQe8YLRTmG0LH//2gAbqW3cNUZl8s+IZzlF
 jVY03wrFcMJE8hjggMvVj3G4BH1ATDhHYvukLiN0/s5lFRcpmzBpl5kn9Clbkg==
X-Gm-Gg: ASbGnctts24N251fR1PGxZfmVG334q1KC0Wz0SWkEyWtr7kgIdxncMHERZmVmfUmRDL
 R4K+6v32T5EtCcXGsivc2Ztlqx+auTPrtcAvi7rFK84H/dnp/oQpLYmH555qelecIChnlRwRtBv
 5bVPbD7UcwdBF16qcfjEO7wjF9E7hwoaAsiWjLgFn17kEgMTs+o44Nqt3u+NLzpTrORqaQ0j+Ls
 PeGb3Hhcc9PXhQTdaaqMKymGHUvnQHGO9seQrLth1Wli7d/k1jUZoPT5I7IzWk0T6imI951aN41
 vV0m0VkHcM/SGwteUIjeX9LjCw6yEfA3EiTgkY0cCjBiz3/js32MWIhi69QbhtDEuK8BKqmRoKN
 8MeqQd4ylGqdSCwR4jsKgneupgbWxdMoBncWDKk0yd7Z9nmVS7QJ/G0g9TgVKhZvjOMDMOYkrHd
 GTkmujazLO6wDO8zAzKw==
X-Google-Smtp-Source: AGHT+IE8XmjTLbT3c5HaJB/Km3ZzHyOqiejYUHVBMFOGJx/hrfkDNdC+rbd0/GhWjTBHV/eMtnbn6w==
X-Received: by 2002:a05:600c:8b78:b0:471:989:9d7b with SMTP id
 5b1f17b1804b1-471179068e9mr73484095e9.21.1760903899774; 
 Sun, 19 Oct 2025 12:58:19 -0700 (PDT)
Received: from krug (87-196-72-166.net.novis.pt. [87.196.72.166])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-4710ed317c0sm97802995e9.3.2025.10.19.12.58.18
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 19 Oct 2025 12:58:19 -0700 (PDT)
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
In-Reply-To: <87qzuy94bz.fsf@HIDDEN>
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <CALDnm53W-jq-=joaBM6fpB82a1uLE6uDcFPdDi43Zz25icATeg@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN> <871pn2itfv.fsf@HIDDEN>
 <ier7bwuiq8q.fsf@HIDDEN> <87v7ke1sv6.fsf@HIDDEN>
 <87qzuy94bz.fsf@HIDDEN>
Date: Sun, 19 Oct 2025 20:59:42 +0100
Message-ID: <87tszu64sx.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

>> Otherwise it looks like a perfectly valid idea to do it there, and I
>> encourage you to push it.  Maybe I'll try my hand at tweaking it.
>
> Ok, the minimal patch that supports all 4 cases is pushed now.

I've tested this version: one of the test cases is still problematic.
Test case 1 fails: it shows the indicator but in the margins, not in the
fringes.

To understand what I mean by test case 1, let's review.  This assumes
you're on something similar to an GNU/Linux machine (like ArchLinux),
but you can craft equivalent test steps for other systems.

- test case 1

  kill any emacs daemons

    pkill -f 'emacs.*daemon=3Dtest'

  start a new daemon

    emacs -Q --daemon=3Dtest e--eval '(setq trusted-content :all)' --eval '=
(insert "\nboo!")' -f flymake-mode

  follow up with

    emacsclient -c -s /var/run/user/1000/emacs/test .

  After switching to the *scratch* buffer, you should see an error
  indicator in the fringe and no margins.

- test case 2

  kill any emacs daemons

    pkill -f 'emacs.*daemon=3Dtest'

  start a new daemon

    emacs -Q --daemon=3Dtest e--eval '(setq trusted-content :all)' --eval '=
(insert "\nboo!")' -f flymake-mode

  followed by

    emacsclient -tty -s /var/run/user/1000/emacs/test .

  After switching to the *scratch* buffer, you should see an error
  indicator in the margin (and no fringes, because TTY)

- test case 3

    emacs -Q --eval '(setq trusted-content :all)' --eval '(insert "\nboo!")=
' -f flymake-mode

  Should show a graphical frame with an error indicator in the fringe
  (and no margins)

- test case 4

    emacs -Q -nw --eval '(setq trusted-content :all)' --eval '(insert "\nbo=
o!")' -f flymake-mode

  Should show a graphical frame with an error indicator in the margin
  (and no fringes)

> But the hook 'window-buffer-change-functions' was added in Emacs 27,
> so let's add it with compatibility shims later, after implementing a new
> hook 'window-margin-functions' that will also require compatibility
> shims.

This is not a problem if Spencer is OK with bumping Package-Requires to
27.1.  I am.  And Eglot's Package-Requires must also be bumped.  And
etc/EGLOT-NEWS must be changed to reflect that.  Another thing to do is
to review after this bump if there are any useless compatibility shims
left after that bump.

Jo=C3=A3o




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 19 Oct 2025 23:12:01 +0000
Resent-Message-ID: <handler.77313.B77313.17609154817777 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.17609154817777
          (code B ref 77313); Sun, 19 Oct 2025 23:12:01 +0000
Received: (at 77313) by debbugs.gnu.org; 19 Oct 2025 23:11:21 +0000
Received: from localhost ([127.0.0.1]:41338 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAcYa-00021L-UJ
	for submit <at> debbugs.gnu.org; Sun, 19 Oct 2025 19:11:21 -0400
Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:59559)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1vAcYZ-00020S-3s
 for 77313 <at> debbugs.gnu.org; Sun, 19 Oct 2025 19:11:19 -0400
Received: by mail-wm1-x32c.google.com with SMTP id
 5b1f17b1804b1-46fcf9f63b6so19239215e9.2
 for <77313 <at> debbugs.gnu.org>; Sun, 19 Oct 2025 16:11:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760915473; x=1761520273; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=SoogoatgyvQKrEk7FgiIsQLm2ttoTCxuwqGLioB67z8=;
 b=G7L+DtyCyskS0cB1GerjOCSfGP2xIsXK+CC1NQdAxhMA1q30gYTGYIPNwuy99hYpTB
 o3Fc2CKqu9tRblEE78cDcW41brXTvrEOk42TquRx1291kYfXJUi9LF/3gDT6jArn6uEo
 TcbvsRdVsjEYzGLsokEtTfBERHeBL3F3cN61LX7rj+81ObVKIyi5MGJVpp323lIrJ5cq
 ItV+oMBTw8vwnJTd3zXCmB07NW2zWlXLvrPi6/ryRwmW+bugvAAFTj6JLqK9ipWvp/vO
 YVLPDJSLb/auJOYDh8lXPeVUJpc+TSmms7eVa4vrPY58W1RtfJqyh4j2VL5FTxqhvpyd
 WZrA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760915473; x=1761520273;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=SoogoatgyvQKrEk7FgiIsQLm2ttoTCxuwqGLioB67z8=;
 b=eGIutiFaoXnVuwE5x+Mx+EjuPA5qcKPjKO3CvCShjBl2/F4XML0Sy5Ug13PgqIBtNQ
 i3+3QSU54YYHW8xN6VZvHDkFkAOU5LCyVTiBu4IucgjY8fdh000G2j+CC04x2CBBshXQ
 kPjcy36Zt8zg+vN34lkzUas2vVljtkVCO8eRDCdXFz69/RgoriFo02cLPi7cUBrw9aam
 dyh9/uTex1lYtxUyk7Ftkaz85q4zYLDl0OoA3w3yYHIo1m145UVq66Bcs5lzvxydnK3S
 cwl0ZFvLKl2tbJGl95Xv6z+IIf8R/cJ97txe3dMFemgH7hXt4+ynuuoNv55AI9oszFEp
 1/PQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCVBOqL1EF3/M1hLpREs2K5O78HWuEG4kU4/IWiQaRzvv/UrSC/OFf5XUmWFM5QNnq3Ug7UIcg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YzgMJHN9GyYFx1/YAfCp8Pbo2lZ+MOQ1cFeF5IZRtG0IWi22Yh1
 SRQEgdecg/5VcAeDZyF4+HiLrLf0btRciKvamhBC2mvEZvqqOKwXMkkS6E4weQ==
X-Gm-Gg: ASbGnct4N3Y0frHrk03pS8JHjNgqARQpZrTQnUH8gZRVCLRzgBGEOZRL4bg1eCJde77
 pHgySjofEkcVr0c1/EkhjMpymaHqRy61YfZ815qBBPNZgoUvOfxWZaiM+ljkoNe7lnWuh0uloO+
 HEDTFIK3Q44qE53ZYiDH3QxqNHwjY0O0DB0NhvxHbVO6FofFepBR2kUqqD2vr4u232Me/Ppl2ph
 va9delmzswyBuAz4WhBjP7RBUiDun12OfkWEPc6VmhCqkix17jqa0kM9KGkw6Yq498bjwmNN0ZS
 O2Cjwl0ePrUAD8xbbwgjiV4AYSORU196VDtZ6TRQfIGmYvPxfxPKyKg6cf8MVLgflzzGLRS3EEx
 9L08YDKC8hVa9SW9fYxd98+v2PwNIO7TxPNgSfRYcK+3PKMoCEv+w7HvA40u107QO2/H4dW5tcY
 BteXgUvSGJxhy08TneHw==
X-Google-Smtp-Source: AGHT+IEYGfRX0HRpeIlUrWEfB3LUpVzeoWgcCOR5VMvhLCrcR3FZkdIN1SU9SEYQHkCDi4Jq06Qx4A==
X-Received: by 2002:a05:600c:5298:b0:46d:996b:826a with SMTP id
 5b1f17b1804b1-4711791d69fmr75016965e9.36.1760915472588; 
 Sun, 19 Oct 2025 16:11:12 -0700 (PDT)
Received: from krug (87-196-72-166.net.novis.pt. [87.196.72.166])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-4714fb1b668sm131036545e9.0.2025.10.19.16.11.10
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 19 Oct 2025 16:11:11 -0700 (PDT)
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
In-Reply-To: <87tszu64sx.fsf@HIDDEN>
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN> <871pn2itfv.fsf@HIDDEN>
 <ier7bwuiq8q.fsf@HIDDEN> <87v7ke1sv6.fsf@HIDDEN>
 <87qzuy94bz.fsf@HIDDEN> <87tszu64sx.fsf@HIDDEN>
Date: Mon, 20 Oct 2025 00:12:35 +0100
Message-ID: <87ikga5vvg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes:

> Juri Linkov <juri@HIDDEN> writes:
>
>>> Otherwise it looks like a perfectly valid idea to do it there, and I
>>> encourage you to push it.  Maybe I'll try my hand at tweaking it.
>>
>> Ok, the minimal patch that supports all 4 cases is pushed now.
>
> I've tested this version: one of the test cases is still problematic.
> Test case 1 fails: it shows the indicator but in the margins, not in the
> fringes.

Hi Juri.  I fixed this and reworked your code.  It keeps the same ideas
but you'll find it easier to read (there's a net loss of some 9 loc).

The only functional difference is the fix, which was done -- as I had
explained earlier -- by leveraging the only mechanism supported by Emacs
26 and flymake.el to take action when the buffer is known to be
displayed.  The mechanism is window-configuration-change-hook and the
action -- in this case -- is to auto-show the margins.  If you're unsure
how this works visit the commit 11b37b4a9f3a032 of October 2017.

I also cut down on code duplication (see new helpers flymake--bs-display
and flymake--suitably-fringed-p) and fixed a non-related visibility bug
related to daemons (if the daemon-loaded config visits many flymake-able
buffers using desktop-mode, it would probably lead to trouble).

If you still want to iterate new ideas on this, go ahead, but remember
the "Package-Requires" caveats I explained before.  It could be wise to
ask on emacs-devel if it's OK to break flymake.el ELPA for Emacs 26.

Jo=C3=A3o




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 20 Oct 2025 06:34:02 +0000
Resent-Message-ID: <handler.77313.B77313.176094198913757 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176094198913757
          (code B ref 77313); Mon, 20 Oct 2025 06:34:02 +0000
Received: (at 77313) by debbugs.gnu.org; 20 Oct 2025 06:33:09 +0000
Received: from localhost ([127.0.0.1]:43177 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAjS8-0003Zo-Pd
	for submit <at> debbugs.gnu.org; Mon, 20 Oct 2025 02:33:09 -0400
Received: from mout-p-102.mailbox.org ([2001:67c:2050:0:465::102]:39986)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1vAjS5-0003Yp-NL
 for 77313 <at> debbugs.gnu.org; Mon, 20 Oct 2025 02:33:06 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4cqlwm6WKzz9t46;
 Mon, 20 Oct 2025 08:32:56 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760941976;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=RUejjw84kTPNtDmQ21KHPfTqqsui4fNEpuxF2uy7G/A=;
 b=GlvQ2HivL09v5FDnpqK12OChngsVS2vywZv34l6nIoqu88allj7Xqe6s5Vo9xwlNo9623A
 GMlq/B5VHdzrzhKgLFtSGJJ1gfTM+WRTP4Mf5P9s4C+5vn6cVkEdYoYZUY2ghu1vU3OcnP
 wwk/qTOKamvL7z3anDaH1yiY7ecFaiI5IYVe58SWzNvJHUGRpQxBxkQzK/J10nE8KyiWRs
 498uW2MPlrZTI/LGMICOzWDIIhFV84PfxB/siB3rjPy6EzZTPklphqdLBpba8WSwtxXh62
 oT9yZZjGUU6ldWRsrnL/7pByzYqt9cM7slGKX1x39J7NLUjHyFU/p9Agm6OstA==
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87ikga5vvg.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <87cy6ppdbj.fsf@HIDDEN> <ier5xchjq4u.fsf@HIDDEN>
 <878qhcjeua.fsf@HIDDEN> <iery0pchwel.fsf@HIDDEN>
 <87ldlcggvo.fsf@HIDDEN> <86frbkc6lo.fsf@HIDDEN>
 <iersefkhr1h.fsf@HIDDEN> <86a51rcur5.fsf@HIDDEN>
 <87ecr3ib8g.fsf@HIDDEN> <86planb7u3.fsf@HIDDEN>
 <87qzv2oor1.fsf@HIDDEN> <ierfrbiix4k.fsf@HIDDEN>
 <87wm4uivro.fsf@HIDDEN> <iercy6mitzk.fsf@HIDDEN>
 <871pn2itfv.fsf@HIDDEN> <ier7bwuiq8q.fsf@HIDDEN>
 <87v7ke1sv6.fsf@HIDDEN> <87qzuy94bz.fsf@HIDDEN>
 <87tszu64sx.fsf@HIDDEN> <87ikga5vvg.fsf@HIDDEN>
Date: Mon, 20 Oct 2025 09:31:53 +0300
Message-ID: <87qzuyqe5u.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> I've tested this version: one of the test cases is still problematic.
>> Test case 1 fails: it shows the indicator but in the margins, not in the
>> fringes.

This is expected since we can't use 'window-buffer-change-functions'
added in Emacs 27.

> I fixed this and reworked your code.  It keeps the same ideas
> but you'll find it easier to read (there's a net loss of some 9 loc).
>
> The only functional difference is the fix, which was done -- as I had
> explained earlier -- by leveraging the only mechanism supported by Emacs
> 26 and flymake.el to take action when the buffer is known to be
> displayed.  The mechanism is window-configuration-change-hook and the
> action -- in this case -- is to auto-show the margins.

Thanks, it's nice that you made it work even for Emacs 26.

> I also cut down on code duplication (see new helpers flymake--bs-display
> and flymake--suitably-fringed-p) and fixed a non-related visibility bug
> related to daemons (if the daemon-loaded config visits many flymake-able
> buffers using desktop-mode, it would probably lead to trouble).

I wonder why you removed the optimization that avoided 'cl-case' in the
display spec?  Couldn't we assume that 'flymake-fringe-indicator-position'
is constant during one flymake session?

> If you still want to iterate new ideas on this, go ahead, but remember
> the "Package-Requires" caveats I explained before.  It could be wise to
> ask on emacs-devel if it's OK to break flymake.el ELPA for Emacs 26.

We are going to add a new hook 'window-margin-functions', so the only
additional change we will need to do in Flymake is to set up this hook
to support sharing the margins between different packages in Emacs 31
and later versions.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 20 Oct 2025 08:47:02 +0000
Resent-Message-ID: <handler.77313.B77313.176094997821831 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: Spencer Baugh <sbaugh@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176094997821831
          (code B ref 77313); Mon, 20 Oct 2025 08:47:02 +0000
Received: (at 77313) by debbugs.gnu.org; 20 Oct 2025 08:46:18 +0000
Received: from localhost ([127.0.0.1]:43588 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAlWz-0005g1-UB
	for submit <at> debbugs.gnu.org; Mon, 20 Oct 2025 04:46:18 -0400
Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:52592)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1vAlWw-0005fF-CB
 for 77313 <at> debbugs.gnu.org; Mon, 20 Oct 2025 04:46:15 -0400
Received: by mail-wm1-x336.google.com with SMTP id
 5b1f17b1804b1-47100eae3e5so37971725e9.1
 for <77313 <at> debbugs.gnu.org>; Mon, 20 Oct 2025 01:46:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760949968; x=1761554768; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=MoBgcZh+sZknQxTQWmqyOCCJChARLbedKXISTkcHCqU=;
 b=Thbk6NSi5sF4+bum0sZU7uV4mhpNNYxsurFCvPUarvnbZMd9GyHkIelJDxpz1PEm7M
 p2D8p8X/3ixqGMAZ4uhNpO1i8KiS14sAVZv3mwc/apE1KzQ5kiAgw1GAOF5cRLK3fvbs
 7ZMECIUcRV1qd/rM1Y8nNh0lUTU3nFvZhnuTv44ViBCE9vhB+5bhRAm54OgSUWU0WKzx
 W3TAyzA16N/nB3I5rhB01VyFv5MtW1uxy6MPuaZZuWrjQzSFQPe+SzwDyAKKe+7LHXCB
 siptv9UqNfKd68JKMgK4ZLGTj8tZBEYVS3Q+4Kipu+rGBZmm04op+hqpZ2xsZxySHmxI
 38rA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760949968; x=1761554768;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=MoBgcZh+sZknQxTQWmqyOCCJChARLbedKXISTkcHCqU=;
 b=EClCLsWEpUnGEQAOr9UA6/iSzyBucahelcWufExn4eBtygr1feDCtlQCdrmm8KdB5e
 wWH42g/Y5Q4AQNsIfBL1jBIkPW9Iirle2GNHpUgZ1mtGIWIOlBk0049yBvCTuY0obXCJ
 49bpyetnYQscsFNCCtqMkOo8IniYc9ZF7E92U1RA+ZGmqlJESZketjvWftwwRTo/Y5vo
 dsMyL1F6xGqkhG9u4a9z24YOA52qk2AMy4yymOizhkPlljJSga8Z8VGmg54knKeXDXvd
 wIjasq1a5db8jnlWsAHdzZXeqldnTHk/zkCyO2gnvyqMWC3UcYEgLFOnsYYhGjlooaSy
 eTPg==
X-Forwarded-Encrypted: i=1;
 AJvYcCUnjxoQ/Uv0iCj4n8a2SrkQy15WkHOvx+VxCa7tAloJW3EX/0L2rVKEM67xiF4h1DghN4VIfw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YwaOvvf/ke4wBheU6THBEVD4jxrkhLKpOWgAUCAz1Ef1N3yCjZt
 TnuitVFbwmllxJkmx8+VF1gqjjPyx1roIwbcpRe2/rUEBlVP/QtXgymN96WmcQ==
X-Gm-Gg: ASbGnctfA1tvyj4juXF3aXTBOww8se57XjvNZE7fJjvpTn90DASxhN4wH8JwEwXoqP5
 dte9AYN8t45Ypdj3Fl9k7yFly5MqqX4tv26l6dNcwG2EUeXN5DWcEy0aY4ZY2qneazb5LFMzbzt
 guJJASxl9ayFVhDDNi/RpAyHQVSUP24/IYxAzmt2tVXETxs0f0OXE3Q4errZn8cTr4ZATFtCDtr
 8Sqsa4pdpAZiWW1TQUn9LaM/ihxeCwSk/aDuBAoTk1bhEJP+UaC2KxycrqCbVWrmVCl3aWKi44x
 2NJWQQONjoB3PUi0ZmJtjcV1c/GhEOjFQeJefCXUUd7uPq1LsHz5uneEjoWFyy1CFOQR9t5MhUq
 VGiCkooC2otiJrdZhHJ+2rrzmF+iAxb9CZTnaeK1MxCaDo0+FaQ5C1mVLEUCLxdfYYPTXKXf4DC
 C2Hy79Hohj6CGoGuLjzg==
X-Google-Smtp-Source: AGHT+IETk9SWATpzB+/OzluwQwV4k1JhDVlCni41DwEKqfZmP+23LsWVsuZWBHoHmmaPrH1k0iwsEg==
X-Received: by 2002:a05:600c:4eca:b0:45d:f83b:96aa with SMTP id
 5b1f17b1804b1-4711786c6f0mr97793445e9.7.1760949967414; 
 Mon, 20 Oct 2025 01:46:07 -0700 (PDT)
Received: from krug (87-196-72-166.net.novis.pt. [87.196.72.166])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-4711442dbaesm220837935e9.8.2025.10.20.01.46.06
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 20 Oct 2025 01:46:06 -0700 (PDT)
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
In-Reply-To: <87qzuyqe5u.fsf@HIDDEN>
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN> <871pn2itfv.fsf@HIDDEN>
 <ier7bwuiq8q.fsf@HIDDEN> <87v7ke1sv6.fsf@HIDDEN>
 <87qzuy94bz.fsf@HIDDEN> <87tszu64sx.fsf@HIDDEN>
 <87ikga5vvg.fsf@HIDDEN> <87qzuyqe5u.fsf@HIDDEN>
Date: Mon, 20 Oct 2025 09:47:30 +0100
Message-ID: <87ecqy5599.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

> This is expected since we can't use 'window-buffer-change-functions'
> added in Emacs 27.

Ah.

> Thanks, it's nice that you made it work even for Emacs 26.

Yes.

>> I also cut down on code duplication (see new helpers flymake--bs-display
>> and flymake--suitably-fringed-p) and fixed a non-related visibility bug
>> related to daemons (if the daemon-loaded config visits many flymake-able
>> buffers using desktop-mode, it would probably lead to trouble).
>
> I wonder why you removed the optimization that avoided 'cl-case' in the
> display spec?  Couldn't we assume that 'flymake-fringe-indicator-position'
> is constant during one flymake session?

We don't even have to assume that, it just has to be constant across one
`flymake-start' cycle.  So no problem there.

I just didn't realize it was an optimization.  We can restore it, but I
tend to think having the code refactored in `suitably-fringed-p` is
better. Not sure saving a `cl-case` will make a tremendous difference.
If it does, we might as well also store in some buffer
`flymake--fringe-index`

What _would_ probably make a difference is to avoid the '(when CONDITION
. DISPLAY)' altogether and record in a variable the decision to use or
not use fringes in 'flymake-start' invocation (which is where the
suitability of fringes is first evaluated).  Earlier patches did that
and it's trivial to do now, if we want.

What would be lost?  In my testing and opinion, not much.  The current
scheme only has any effect when two frames, one tty and one graphical
have windows showing the same buffer, started in this order.  Then, the
graphical window will show both fringes and margins. If, like me you
have X-windows "mouse focus" then, depending on which frame has focus
from the OS, the indicator will appear and disappear from the tty
frame. :-) In the graphical frame it will hop from fringe to margin as
you give it focus and take it away.

>> If you still want to iterate new ideas on this, go ahead, but remember
>> the "Package-Requires" caveats I explained before.  It could be wise to
>> ask on emacs-devel if it's OK to break flymake.el ELPA for Emacs 26.
>
> We are going to add a new hook 'window-margin-functions', so the only
> additional change we will need to do in Flymake is to set up this hook
> to support sharing the margins between different packages in Emacs 31
> and later versions.

That's fine as long as you special case it.  Though if you're going to
do that, I tend to think Eli's idea of a new spec that will choose
between fringes and margins in the display code (and even potentially
make space like display-line-numbers-mode) is better and more elegant.

Jo=C3=A3o




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 20 Oct 2025 17:49:02 +0000
Resent-Message-ID: <handler.77313.B77313.176098253714302 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176098253714302
          (code B ref 77313); Mon, 20 Oct 2025 17:49:02 +0000
Received: (at 77313) by debbugs.gnu.org; 20 Oct 2025 17:48:57 +0000
Received: from localhost ([127.0.0.1]:47175 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAu09-0003ib-4p
	for submit <at> debbugs.gnu.org; Mon, 20 Oct 2025 13:48:57 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:32779)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1vAu05-0003i8-VF
 for 77313 <at> debbugs.gnu.org; Mon, 20 Oct 2025 13:48:54 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <87cy6i942y.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 19 Oct 2025 20:47:01 +0300")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <ier8qheka2m.fsf@HIDDEN> <87cy6ppdbj.fsf@HIDDEN>
 <ier5xchjq4u.fsf@HIDDEN> <878qhcjeua.fsf@HIDDEN>
 <iery0pchwel.fsf@HIDDEN> <87ldlcggvo.fsf@HIDDEN>
 <86frbkc6lo.fsf@HIDDEN> <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN> <87qzv2oor1.fsf@HIDDEN>
 <ierfrbiix4k.fsf@HIDDEN> <87wm4uivro.fsf@HIDDEN>
 <iercy6mitzk.fsf@HIDDEN> <871pn2itfv.fsf@HIDDEN>
 <ier7bwuiq8q.fsf@HIDDEN> <874iryc9jc.fsf@HIDDEN>
 <ierms5pu12w.fsf@HIDDEN> <87cy6i942y.fsf@HIDDEN>
Date: Mon, 20 Oct 2025 13:48:48 -0400
Message-ID: <ierbjm1v4zj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760982528;
 bh=Uk45F/JuHHeo+sOv7eU6B3y/YkryWU5Q2948QYMOjOg=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=PY3DFZNF3sHwUyKS/igd+FfFy8zdXY6nKf2EFcOApb4tLcicc+p99Rs5nF7NKMm24
 mG5/OuUkPa3rDBNKoOYA6foCQVXgaDPtpH8b4MNtu4agul5/CuRhPzTadrHpJQp5yX
 +p5IZuIF1yZENiVpiU1jXxPaC8OFSdQXFucjP1WYnhHkH6lhLqsjvBdQkPT9iMkl8S
 SXZu/PCWf+lOaCCHALOhRsRtwpRt1i7rCv67GyeeV+QzxUIVVSS9VyhlB+7sKcnT9Y
 6YO+lVCeEbdGiArJK9yxQnEMiOEej/5IlmQarqDiUd3EC5RPqc7lbXMNRpmKJYVx6d
 rgaP63msn7R1w==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

>>>>> So we need to design a new feature.  For example, we could add
>>>>> a new hook-like variable that contains a list of functions added
>>>>> by different packages.  Each function returns the margin width required
>>>>> by each package.  Then their sum is set as the window margin width.
>>>>
>>>> Yes, I was thinking we might want something like that.  Maybe called
>>>> window-margin-functions.
>>>>
>>>> That design sounds good to me, but maybe others have objections.
>>>>
>>>> How would {left,right}-margin-width be incorporated into
>>>> window-margin-functions?  Perhaps window-margin-functions could have a
>>>> default value of '(buffer-margin-width), where buffer-margin-width is a
>>>> function which returns (cons left-margin-width right-margin-width).
>>>
>>> I now think that a new function update-window-margins that will call
>>> the hook window-margin-functions should update the value of
>>> left-margin-width and right-margin-width, and then just do
>>>
>>>   (set-window-margins nil left-margin-width right-margin-width)
>>>
>>> with updated values.
>>
>> But setting left-margin-width means the margins will be the same in all
>> windows.  We want margins to be different between graphical and TTY
>> windows.
>
> I thought that maybe we should have two hooks: one for packages that
> set only the variable left-margin-width and don't need to fall back
> from fringes to margins, and another hook for packages that need
> to update window margins dynamically depending on the presence
> of fringes.

Would that just be for the sake of compatibility?  The first hook would
just be used on Emacs <31?

Because otherwise I don't understand why we'd have two hooks, the second
hook seems strictly more powerful while being not much harder to use.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 20 Oct 2025 17:55:02 +0000
Resent-Message-ID: <handler.77313.B77313.176098287816226 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176098287816226
          (code B ref 77313); Mon, 20 Oct 2025 17:55:02 +0000
Received: (at 77313) by debbugs.gnu.org; 20 Oct 2025 17:54:38 +0000
Received: from localhost ([127.0.0.1]:47200 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAu5d-0004Da-Kl
	for submit <at> debbugs.gnu.org; Mon, 20 Oct 2025 13:54:38 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:52501)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1vAu5a-0004Cp-KD
 for 77313 <at> debbugs.gnu.org; Mon, 20 Oct 2025 13:54:35 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <87ecqy5599.fsf@HIDDEN> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Mon, 20 Oct 2025 09:47:30 +0100")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <878qhcjeua.fsf@HIDDEN> <iery0pchwel.fsf@HIDDEN>
 <87ldlcggvo.fsf@HIDDEN> <86frbkc6lo.fsf@HIDDEN>
 <iersefkhr1h.fsf@HIDDEN> <86a51rcur5.fsf@HIDDEN>
 <87ecr3ib8g.fsf@HIDDEN> <86planb7u3.fsf@HIDDEN>
 <87qzv2oor1.fsf@HIDDEN> <ierfrbiix4k.fsf@HIDDEN>
 <87wm4uivro.fsf@HIDDEN> <iercy6mitzk.fsf@HIDDEN>
 <871pn2itfv.fsf@HIDDEN> <ier7bwuiq8q.fsf@HIDDEN>
 <87v7ke1sv6.fsf@HIDDEN> <87qzuy94bz.fsf@HIDDEN>
 <87tszu64sx.fsf@HIDDEN> <87ikga5vvg.fsf@HIDDEN>
 <87qzuyqe5u.fsf@HIDDEN> <87ecqy5599.fsf@HIDDEN>
Date: Mon, 20 Oct 2025 13:54:29 -0400
Message-ID: <ier8qh5v4q2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760982869;
 bh=4VjRXDXP659R2wOB3Wf43ktgg1wkCxu/YJxOUQXj/u8=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=NK+MNPZhfZkBf6N2T32TJ1eHQ1BCsA5ZUYS3Vx0fBYDnladrqMZuugXYYmYuL8XEg
 ns2baF0eGbAsg7QYw4XcSKefNwN8IAr308zQU2tioPpJPZ+cHr72V+6WrNIMTXvpVF
 ESE5WgJZ+KElyfq4tVa5LRnk4cAA2anc4g5YOyfU0tvfT42/8VW6VIJy44nk8ACyuN
 3MYgPv0RT71Bo8xvRrTWD7Q+uaJ6zN1NMGqk05qeImBFtzIFFn1gftcypUTAbX0jNK
 HHDCDhF1bto4rtqxOyMD5TgM6pOeHM/awSoiaOZJBmUba1wx5mQgYRAS24ILWLWoTW
 KuwdBgm7Ovkyw==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)



Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes:
> Juri Linkov <juri@HIDDEN> writes:
>
>> This is expected since we can't use 'window-buffer-change-functions'
>> added in Emacs 27.
>
> Ah.
>
>> Thanks, it's nice that you made it work even for Emacs 26.
>
> Yes.
>
>>> I also cut down on code duplication (see new helpers flymake--bs-display
>>> and flymake--suitably-fringed-p) and fixed a non-related visibility bug
>>> related to daemons (if the daemon-loaded config visits many flymake-able
>>> buffers using desktop-mode, it would probably lead to trouble).
>>
>> I wonder why you removed the optimization that avoided 'cl-case' in the
>> display spec?  Couldn't we assume that 'flymake-fringe-indicator-positio=
n'
>> is constant during one flymake session?
>
> We don't even have to assume that, it just has to be constant across one
> `flymake-start' cycle.  So no problem there.
>
> I just didn't realize it was an optimization.  We can restore it, but I
> tend to think having the code refactored in `suitably-fringed-p` is
> better. Not sure saving a `cl-case` will make a tremendous difference.
> If it does, we might as well also store in some buffer
> `flymake--fringe-index`
>
> What _would_ probably make a difference is to avoid the '(when CONDITION
> . DISPLAY)' altogether and record in a variable the decision to use or
> not use fringes in 'flymake-start' invocation (which is where the
> suitability of fringes is first evaluated).  Earlier patches did that
> and it's trivial to do now, if we want.
>
> What would be lost?  In my testing and opinion, not much.  The current
> scheme only has any effect when two frames, one tty and one graphical
> have windows showing the same buffer, started in this order.  Then, the
> graphical window will show both fringes and margins. If, like me you
> have X-windows "mouse focus" then, depending on which frame has focus
> from the OS, the indicator will appear and disappear from the tty
> frame. :-) In the graphical frame it will hop from fringe to margin as
> you give it focus and take it away.
>
>>> If you still want to iterate new ideas on this, go ahead, but remember
>>> the "Package-Requires" caveats I explained before.  It could be wise to
>>> ask on emacs-devel if it's OK to break flymake.el ELPA for Emacs 26.
>>
>> We are going to add a new hook 'window-margin-functions', so the only
>> additional change we will need to do in Flymake is to set up this hook
>> to support sharing the margins between different packages in Emacs 31
>> and later versions.
>
> That's fine as long as you special case it.  Though if you're going to
> do that, I tend to think Eli's idea of a new spec that will choose
> between fringes and margins in the display code (and even potentially
> make space like display-line-numbers-mode) is better and more elegant.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 20 Oct 2025 17:58:02 +0000
Resent-Message-ID: <handler.77313.B77313.176098305817375 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176098305817375
          (code B ref 77313); Mon, 20 Oct 2025 17:58:02 +0000
Received: (at 77313) by debbugs.gnu.org; 20 Oct 2025 17:57:38 +0000
Received: from localhost ([127.0.0.1]:47215 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAu8X-0004W7-Qg
	for submit <at> debbugs.gnu.org; Mon, 20 Oct 2025 13:57:38 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:52521)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1vAu8V-0004Vi-Az
 for 77313 <at> debbugs.gnu.org; Mon, 20 Oct 2025 13:57:35 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <87ecqy5599.fsf@HIDDEN> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Mon, 20 Oct 2025 09:47:30 +0100")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <878qhcjeua.fsf@HIDDEN> <iery0pchwel.fsf@HIDDEN>
 <87ldlcggvo.fsf@HIDDEN> <86frbkc6lo.fsf@HIDDEN>
 <iersefkhr1h.fsf@HIDDEN> <86a51rcur5.fsf@HIDDEN>
 <87ecr3ib8g.fsf@HIDDEN> <86planb7u3.fsf@HIDDEN>
 <87qzv2oor1.fsf@HIDDEN> <ierfrbiix4k.fsf@HIDDEN>
 <87wm4uivro.fsf@HIDDEN> <iercy6mitzk.fsf@HIDDEN>
 <871pn2itfv.fsf@HIDDEN> <ier7bwuiq8q.fsf@HIDDEN>
 <87v7ke1sv6.fsf@HIDDEN> <87qzuy94bz.fsf@HIDDEN>
 <87tszu64sx.fsf@HIDDEN> <87ikga5vvg.fsf@HIDDEN>
 <87qzuyqe5u.fsf@HIDDEN> <87ecqy5599.fsf@HIDDEN>
Date: Mon, 20 Oct 2025 13:57:29 -0400
Message-ID: <ier5xc9v4l2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760983049;
 bh=123eXkqvGVWszgHtwgzyRQLMFgIcfK/iCfbQfPU8g5M=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=dA+pKkArIf3b0BT3b8vfccdmApfeWX+8YZlpl8QpqsfQ+ecw2IJ+FU80BHWf+CRlE
 5IstwRaReF03HtpajNG7jxDLr6qR0ZSTVqO+MZIK0Hfrc84C+N4eDxY6+DlhwxtbzD
 obmfeoE9Kmy0G/zHWe3rb7ccy5OMAS+uaWVkqcZAaDAQJoIwhK8K2/2WwHVraJIZZb
 doTCyByLP8JPH1i+FVhH4tifFnsMGG1JBbVHwjvoYTRbHsps/a5rif2tHCfN+I91gn
 7MlCeSWF8hhPyFQM4Qmn3I3/waX8NW8PYvYBXloX2mTbYCC5GV6bOSN2Es6DZEeXrL
 DIk8YQBZYb/1Q==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes:
>>> I also cut down on code duplication (see new helpers flymake--bs-display
>>> and flymake--suitably-fringed-p) and fixed a non-related visibility bug
>>> related to daemons (if the daemon-loaded config visits many flymake-able
>>> buffers using desktop-mode, it would probably lead to trouble).
>>
>> I wonder why you removed the optimization that avoided 'cl-case' in the
>> display spec?  Couldn't we assume that 'flymake-fringe-indicator-positio=
n'
>> is constant during one flymake session?
>
> We don't even have to assume that, it just has to be constant across one
> `flymake-start' cycle.  So no problem there.
>
> I just didn't realize it was an optimization.  We can restore it, but I
> tend to think having the code refactored in `suitably-fringed-p` is
> better. Not sure saving a `cl-case` will make a tremendous difference.
> If it does, we might as well also store in some buffer
> `flymake--fringe-index`
>
> What _would_ probably make a difference is to avoid the '(when CONDITION
> . DISPLAY)' altogether and record in a variable the decision to use or
> not use fringes in 'flymake-start' invocation (which is where the
> suitability of fringes is first evaluated).  Earlier patches did that
> and it's trivial to do now, if we want.

Would making that decision at the time flymake-start is called, work for
buffers that are created or reverted while not displayed in a window?  I
don't think it would.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 20 Oct 2025 18:07:02 +0000
Resent-Message-ID: <handler.77313.B77313.176098361120608 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176098361120608
          (code B ref 77313); Mon, 20 Oct 2025 18:07:02 +0000
Received: (at 77313) by debbugs.gnu.org; 20 Oct 2025 18:06:51 +0000
Received: from localhost ([127.0.0.1]:47262 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAuHS-0005ME-K6
	for submit <at> debbugs.gnu.org; Mon, 20 Oct 2025 14:06:51 -0400
Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]:43383)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1vAuHP-0005LD-Ew
 for 77313 <at> debbugs.gnu.org; Mon, 20 Oct 2025 14:06:48 -0400
Received: by mail-ot1-x32e.google.com with SMTP id
 46e09a7af769-7c2804d48caso2467687a34.1
 for <77313 <at> debbugs.gnu.org>; Mon, 20 Oct 2025 11:06:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760983601; x=1761588401; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=FRbGLazR/IatknJ3falrjdJTNOiBLHcDc3VDDqYO9HU=;
 b=QNUm1yrgpps1cNM06SbK50WkiaQhHFb2p0I4uJNCUfyhx5XyC450b4RkCtK8wDjdnq
 2crurBtsmobWvw9CuLWKRiaOkCYlgtcJqRYSM+ZagFhlyX3fKRi9WbsFUORUeNt9xt48
 IzkHoHc6PFFyrh8vvrq6p2HkA/PkC0zmgXyPWB2w7Y5wSUrHVITQ6KFKxQPgYb7Rtruf
 7EqgxaHwjklI0SchphhYL1mmoRyMHAyE/lb0qnbHz7zCj5Dd3MbBs8/MUduV0p2YeSpx
 083AqVGNKTNBPYEJP1rlXrhBAIfmbJcwDOT9vQAdtx5xUkYcbKVW0D+c1JkcoDITLbfv
 8ekQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760983601; x=1761588401;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=FRbGLazR/IatknJ3falrjdJTNOiBLHcDc3VDDqYO9HU=;
 b=EmRuE/KhR3m5hBYLwVnYW2ufC8XfzcXhYVlM6njkhagZPCf3azbt9CKZla+wJTZvMi
 4av+dOtlGMAwsyf/2CaWkytVl5R6k3/9k38cmWJUYGVgaKWdbMzlL9I7ej5a5p9UgkT8
 yg0HCOB08m9CK3V6PFXrCK5bB95VnZteYdAV29g9fd3f1BHhkZ7rBHY7s2poGflvAVxh
 91nouMKDilRpqdPxJZSN6xy42hnv1DbjiUUVl7lRuq8lZ1NUZad7A5oTjuDvqxJfF9ty
 h5oslTHU1/H/oP9hacJfR49xRAZo4o+4zuyOXjoNZkuUWFRnJ3U7o9t0K/ZurH3feikU
 l7jg==
X-Forwarded-Encrypted: i=1;
 AJvYcCW38tWUCtRCJ5Ezz7wcWvia5UWw9ERqhCGi6leVIsGEFjaEBdOyhO1tUNTcnlQTGvJud6zdtw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yzo5eokUe6zE6MQvRpkqu5IKPmygxGOUEIOd+58/HNajGzGYxr8
 0XwcGACZxi0kp4XNefiqGogLtigl5NlFWb/ZYaJh9s/VSEEqrm9TcN9PzjLDNXqdwcvFVOB1S/M
 6wFXn0rpYH77WNWUCMoff9SYgGeq3z8c=
X-Gm-Gg: ASbGncupKOA/i9ujbKJTwmyly4jTJmzuCn8qjf3xod13VKHY020Z0OUaO3arIZpvuXe
 qgtT3alD37R1NThg4AG2toULLrza12iS4Sn5xpNtgW08fOtfLjKLjgImIHlNcHryEDtSxQeztQ8
 O2Lr8hFiiiotswpEZIWxXPT+F1i8nNmVypImIu6pKiH3EserjfF9eri5OTqcHp7ohKOsAcSMVNf
 aQ+6IZUDV7lorRn40Di22ABLzqbFUZpN8hUr0OV1njI2k/l9tBkqiniiUY1
X-Google-Smtp-Source: AGHT+IHUW1Td9yBkkqUQKPYh1yfDpqHhY1SYnXOIoCmeYVyNeCjbcP7E+07/4ghPqchP/Y6+PcDMIjpufX9bhfbYzTQ=
X-Received: by 2002:a05:6808:4489:b0:438:273f:d09f with SMTP id
 5614622812f47-443a192f62emr7353656b6e.5.1760983601354; Mon, 20 Oct 2025
 11:06:41 -0700 (PDT)
MIME-Version: 1.0
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <878qhcjeua.fsf@HIDDEN> <iery0pchwel.fsf@HIDDEN>
 <87ldlcggvo.fsf@HIDDEN> <86frbkc6lo.fsf@HIDDEN>
 <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN>
 <87qzv2oor1.fsf@HIDDEN> <ierfrbiix4k.fsf@HIDDEN>
 <87wm4uivro.fsf@HIDDEN> <iercy6mitzk.fsf@HIDDEN>
 <871pn2itfv.fsf@HIDDEN> <ier7bwuiq8q.fsf@HIDDEN>
 <87v7ke1sv6.fsf@HIDDEN> <87qzuy94bz.fsf@HIDDEN>
 <87tszu64sx.fsf@HIDDEN> <87ikga5vvg.fsf@HIDDEN>
 <87qzuyqe5u.fsf@HIDDEN>
 <87ecqy5599.fsf@HIDDEN> <ier5xc9v4l2.fsf@HIDDEN>
In-Reply-To: <ier5xc9v4l2.fsf@HIDDEN>
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Date: Mon, 20 Oct 2025 19:07:54 +0100
X-Gm-Features: AS18NWBYJEJ3SFEkSifWFy6LBCi3Niezq4dJCmEZ45CW7xHwOuw8--KPtOl9bxE
Message-ID: <CALDnm53HRHmVMunoxcK9t=3ERweQ=O-93BaUKZ4QaA576bXXEQ@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000039dce06419af2b9"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000039dce06419af2b9
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Oct 20, 2025 at 6:57=E2=80=AFPM Spencer Baugh <sbaugh@HIDDEN=
m> wrote:

>
> > What _would_ probably make a difference is to avoid the '(when CONDITIO=
N
> > . DISPLAY)' altogether and record in a variable the decision to use or
> > not use fringes in 'flymake-start' invocation (which is where the
> > suitability of fringes is first evaluated).  Earlier patches did that
> > and it's trivial to do now, if we want.
>
> Would making that decision at the time flymake-start is called, work for
> buffers that are created or reverted while not displayed in a window?  I
> don't think it would.
>

Can you describe a case of such a creation (or reversion) that I can
follow along and experiment with?  I don't understand what use case
you are referring to.

I think that is best, but I can add that the idea of flymake-start (which
goes back to a very early bug report around 2017) is that when called
on a buffer that is *not* displayed, it doesn't do anything except arrange
for a future asynchronous call to itself to happen later on at a time that
the buffer *is* displayed. This has worked fine for many years. Interactive
calls always happen with a displayed buffer.  Non-interactive calls to
flymake-start are controlled by Flymake itself, which doesn't mind the
deferral
(Flymake is primarily async anyway).

There might be edge cases, of course, and some of them can be fixed
(support for daemon-loaded buffers was missing, for example).

Jo=C3=A3o

--000000000000039dce06419af2b9
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">On Mon, Oct 20, 2025 at 6:57=E2=80=AFPM S=
pencer Baugh &lt;<a href=3D"mailto:sbaugh@HIDDEN">sbaugh@janestreet=
.com</a>&gt; wrote:</div><div class=3D"gmail_quote gmail_quote_container"><=
blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l=
eft:1px solid rgb(204,204,204);padding-left:1ex"><br>
&gt; What _would_ probably make a difference is to avoid the &#39;(when CON=
DITION<br>
&gt; . DISPLAY)&#39; altogether and record in a variable the decision to us=
e or<br>
&gt; not use fringes in &#39;flymake-start&#39; invocation (which is where =
the<br>
&gt; suitability of fringes is first evaluated).=C2=A0 Earlier patches did =
that<br>
&gt; and it&#39;s trivial to do now, if we want.<br>
<br>
Would making that decision at the time flymake-start is called, work for<br=
>
buffers that are created or reverted while not displayed in a window?=C2=A0=
 I<br>
don&#39;t think it would.<br>
</blockquote></div><div><br></div><div>Can you describe a case of such a cr=
eation (or reversion) that I can</div><div>follow along and experiment with=
?=C2=A0 I don&#39;t understand what use case</div><div>you are referring to=
.</div><div><br></div><div>I think that is best, but I can add that the ide=
a of flymake-start (which</div><div>goes back to a very early bug report ar=
ound 2017) is that when called</div><div>on a buffer that is *not* displaye=
d, it doesn&#39;t do anything except arrange</div><div>for a future asynchr=
onous call to itself to happen later on at a time that</div><div>the buffer=
 *is* displayed. This has worked fine for many years. Interactive=C2=A0</di=
v><div>calls always happen with a displayed buffer.=C2=A0 Non-interactive c=
alls to=C2=A0</div><div>flymake-start are controlled by Flymake itself, whi=
ch doesn&#39;t mind the deferral</div><div>(Flymake is primarily async anyw=
ay).</div><div><br></div><div>There might be edge cases, of course, and som=
e of them can be fixed</div><div>(support for daemon-loaded buffers was mis=
sing, for example).</div><div><br></div><div>Jo=C3=A3o</div></div>

--000000000000039dce06419af2b9--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 20 Oct 2025 18:11:02 +0000
Resent-Message-ID: <handler.77313.B77313.176098383021927 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, joaotavora@HIDDEN, 77313 <at> debbugs.gnu.org
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176098383021927
          (code B ref 77313); Mon, 20 Oct 2025 18:11:02 +0000
Received: (at 77313) by debbugs.gnu.org; 20 Oct 2025 18:10:30 +0000
Received: from localhost ([127.0.0.1]:47284 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAuKz-0005hY-Kt
	for submit <at> debbugs.gnu.org; Mon, 20 Oct 2025 14:10:30 -0400
Received: from mout-p-103.mailbox.org ([80.241.56.161]:50074)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1vAuKw-0005gj-UJ
 for 77313 <at> debbugs.gnu.org; Mon, 20 Oct 2025 14:10:27 -0400
Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4cr3PR0p1pz9srv;
 Mon, 20 Oct 2025 20:10:19 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1760983819;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=O4HewrZG2Wry4Jav5J0hIvGplOsaYEbPGxjYIPla0Ac=;
 b=Zg/3ReRbVHPjamx/oYEkIGcdiVvUh+zagkacHCG8N9p928agAUNr7k470xxseK7P+Z6hmG
 wwNb7gbuBnQVAFeLtd/Ns+LPLTrzNnwx+pjAref7Z95Ksgh2iAvfuwxadupPhOQwMVJkva
 PDUrBtYZ+YS3PgHc/L1+7Xt8sOIIZjsvWpXuM/ctV71KWOFmylWOBZeHzkfMhDwITIbuzB
 xxubamBEwtiJvo5fugI/f0oIPeQNz6Nntbp2ctN5zo2XleT11/uEWpePnMfFiKVi7Jer2g
 dfkbpFiFerxb9SYaYexKA1TwmfwONugOFJIpw8wGEtADML2JBcwHuvn1GUehAA==
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <ierbjm1v4zj.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <87cy6ppdbj.fsf@HIDDEN> <ier5xchjq4u.fsf@HIDDEN>
 <878qhcjeua.fsf@HIDDEN> <iery0pchwel.fsf@HIDDEN>
 <87ldlcggvo.fsf@HIDDEN> <86frbkc6lo.fsf@HIDDEN>
 <iersefkhr1h.fsf@HIDDEN> <86a51rcur5.fsf@HIDDEN>
 <87ecr3ib8g.fsf@HIDDEN> <86planb7u3.fsf@HIDDEN>
 <87qzv2oor1.fsf@HIDDEN> <ierfrbiix4k.fsf@HIDDEN>
 <87wm4uivro.fsf@HIDDEN> <iercy6mitzk.fsf@HIDDEN>
 <871pn2itfv.fsf@HIDDEN> <ier7bwuiq8q.fsf@HIDDEN>
 <874iryc9jc.fsf@HIDDEN> <ierms5pu12w.fsf@HIDDEN>
 <87cy6i942y.fsf@HIDDEN> <ierbjm1v4zj.fsf@HIDDEN>
Date: Mon, 20 Oct 2025 21:09:08 +0300
Message-ID: <87tszt8myj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>>>>> So we need to design a new feature.  For example, we could add
>>>>>> a new hook-like variable that contains a list of functions added
>>>>>> by different packages.  Each function returns the margin width required
>>>>>> by each package.  Then their sum is set as the window margin width.
>>>>>
>>>>> Yes, I was thinking we might want something like that.  Maybe called
>>>>> window-margin-functions.
>>>>>
>>>>> That design sounds good to me, but maybe others have objections.
>>>>>
>>>>> How would {left,right}-margin-width be incorporated into
>>>>> window-margin-functions?  Perhaps window-margin-functions could have a
>>>>> default value of '(buffer-margin-width), where buffer-margin-width is a
>>>>> function which returns (cons left-margin-width right-margin-width).
>>>>
>>>> I now think that a new function update-window-margins that will call
>>>> the hook window-margin-functions should update the value of
>>>> left-margin-width and right-margin-width, and then just do
>>>>
>>>>   (set-window-margins nil left-margin-width right-margin-width)
>>>>
>>>> with updated values.
>>>
>>> But setting left-margin-width means the margins will be the same in all
>>> windows.  We want margins to be different between graphical and TTY
>>> windows.
>>
>> I thought that maybe we should have two hooks: one for packages that
>> set only the variable left-margin-width and don't need to fall back
>> from fringes to margins, and another hook for packages that need
>> to update window margins dynamically depending on the presence
>> of fringes.
>
> Would that just be for the sake of compatibility?  The first hook would
> just be used on Emacs <31?
>
> Because otherwise I don't understand why we'd have two hooks, the second
> hook seems strictly more powerful while being not much harder to use.

On emacs-devel I posted a patch that implements a single hook
'window-margin-functions' that consistently incorporates
'left-margin-width' and 'right-margin-width'.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 20 Oct 2025 19:38:01 +0000
Resent-Message-ID: <handler.77313.B77313.176098906418154 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176098906418154
          (code B ref 77313); Mon, 20 Oct 2025 19:38:01 +0000
Received: (at 77313) by debbugs.gnu.org; 20 Oct 2025 19:37:44 +0000
Received: from localhost ([127.0.0.1]:47617 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAvhQ-0004ik-Bq
	for submit <at> debbugs.gnu.org; Mon, 20 Oct 2025 15:37:44 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:34743)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1vAvhN-0004hx-D4
 for 77313 <at> debbugs.gnu.org; Mon, 20 Oct 2025 15:37:42 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <CALDnm53HRHmVMunoxcK9t=3ERweQ=O-93BaUKZ4QaA576bXXEQ@HIDDEN>
 ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Mon, 20 Oct 2025
 19:07:54 +0100")
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <87ldlcggvo.fsf@HIDDEN> <86frbkc6lo.fsf@HIDDEN>
 <iersefkhr1h.fsf@HIDDEN> <86a51rcur5.fsf@HIDDEN>
 <87ecr3ib8g.fsf@HIDDEN> <86planb7u3.fsf@HIDDEN>
 <87qzv2oor1.fsf@HIDDEN> <ierfrbiix4k.fsf@HIDDEN>
 <87wm4uivro.fsf@HIDDEN> <iercy6mitzk.fsf@HIDDEN>
 <871pn2itfv.fsf@HIDDEN> <ier7bwuiq8q.fsf@HIDDEN>
 <87v7ke1sv6.fsf@HIDDEN> <87qzuy94bz.fsf@HIDDEN>
 <87tszu64sx.fsf@HIDDEN> <87ikga5vvg.fsf@HIDDEN>
 <87qzuyqe5u.fsf@HIDDEN> <87ecqy5599.fsf@HIDDEN>
 <ier5xc9v4l2.fsf@HIDDEN>
 <CALDnm53HRHmVMunoxcK9t=3ERweQ=O-93BaUKZ4QaA576bXXEQ@HIDDEN>
Date: Mon, 20 Oct 2025 15:37:36 -0400
Message-ID: <ierzf9ltldr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1760989056;
 bh=ygW7SZUTg9fatUzhETtXzyalpAZqEC57dCyb2hQMB9k=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=1t8CRkugQSS9ffdezeKhrV1zI7i1AXPzT5bXW9F9e9+Jhl2rZREBWRNs1EGntqcb+
 hBDik3E9ofTVryN9Ij7wr1LybxqfjRv7ZTm54TlPznWgfTBy53ajm7BgfPctBlzKaU
 Y1OhcOTGyDwrAn8SAbFsiljlHXg0AR89/A3HiLFm27AkLyAZDrR3Y84ZudgMBYwbYj
 aBCRePhtatl3SznS5e0UrSUaG4Tmnp+Ch/Vsrjz+YQwvV/heNJCiV2tGYiaTLR/Ghy
 /IUf+i7s/tuUlDLKW20m+XSIkTNtGo3RrhgoTGzQi179c0b2zYQoVafIX4kZOXBL/T
 C8ISOblw1Db/Q==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes:

> On Mon, Oct 20, 2025 at 6:57=E2=80=AFPM Spencer Baugh <sbaugh@janestreet.=
com> wrote:
>
>  > What _would_ probably make a difference is to avoid the '(when CONDITI=
ON
>  > . DISPLAY)' altogether and record in a variable the decision to use or
>  > not use fringes in 'flymake-start' invocation (which is where the
>  > suitability of fringes is first evaluated).  Earlier patches did that
>  > and it's trivial to do now, if we want.
>
>  Would making that decision at the time flymake-start is called, work for
>  buffers that are created or reverted while not displayed in a window?  I
>  don't think it would.
>
> Can you describe a case of such a creation (or reversion) that I can
> follow along and experiment with?  I don't understand what use case
> you are referring to.
>
> I think that is best, but I can add that the idea of flymake-start (which
> goes back to a very early bug report around 2017) is that when called
> on a buffer that is *not* displayed, it doesn't do anything except arrange
> for a future asynchronous call to itself to happen later on at a time that
> the buffer *is* displayed. This has worked fine for many years. Interacti=
ve=20
> calls always happen with a displayed buffer.  Non-interactive calls to=20
> flymake-start are controlled by Flymake itself, which doesn't mind the de=
ferral
> (Flymake is primarily async anyway).
>
> There might be edge cases, of course, and some of them can be fixed
> (support for daemon-loaded buffers was missing, for example).

Ah, I think you're right, with your recent changes indeed such buffers
should work fine.

(It would be nice if we had tests for these things...)




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77313: 30.1.50; Regression: flymake indicators are erroneously using margins
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 20 Oct 2025 20:31:02 +0000
Resent-Message-ID: <handler.77313.B77313.176099223029254 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77313
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 77313 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 77313-submit <at> debbugs.gnu.org id=B77313.176099223029254
          (code B ref 77313); Mon, 20 Oct 2025 20:31:02 +0000
Received: (at 77313) by debbugs.gnu.org; 20 Oct 2025 20:30:30 +0000
Received: from localhost ([127.0.0.1]:47676 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAwWT-0007bl-UG
	for submit <at> debbugs.gnu.org; Mon, 20 Oct 2025 16:30:30 -0400
Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]:53610)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1vAwWQ-0007Xt-Pr
 for 77313 <at> debbugs.gnu.org; Mon, 20 Oct 2025 16:30:27 -0400
Received: by mail-oi1-x22b.google.com with SMTP id
 5614622812f47-4439fc3abfeso1889442b6e.3
 for <77313 <at> debbugs.gnu.org>; Mon, 20 Oct 2025 13:30:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760992221; x=1761597021; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=og68lKmQUUv/PmLkflD5AWdTFL60gKfLRhq5LuV7iZ4=;
 b=K7866yw/rhHnaYIOS3uot/G41JHCGQpqLVIoCOoayn3brlAOBDDb044vGSnqRqQ1Vz
 kMK44EgMrfmVrBRVWPCK8MVWW3B4Qp8dym9RNOUIOSgd9jrsQRWeKKeMBuwaL4BOXppw
 0kFZs+N3WEsEF4TfofFzlM7BeBrFShdAvSiyUljapa2FMUWgwinH4lAjQ4NbAjIm0udd
 tGtgNnOJ8pY3iXB9iVOhjh+lLdDarjY6b13UPodZQi/DGbpxdciB3VRoVUEs9YFp97rS
 t1+i3aezHGPbY0yzzIixa63MvtSAYO9Qch7OQ/C3GmDsIM1UWbWTcxUlgYdZ1zkNhEas
 DaXg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760992221; x=1761597021;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=og68lKmQUUv/PmLkflD5AWdTFL60gKfLRhq5LuV7iZ4=;
 b=lkyleYYXB2ubcvEXXbZFkoi9y1khKpFDemt8pNGzi1IzdkRu+jliubk5Jug39DdzqL
 wnTzKpNkrtiR58DXqSR5nWha2UGL+TxFZyPdthDHW1gp7iKLP2N32NrbFN5eTT64vNlm
 4pEb40CaYTyVqXYEKrxP33am6ReRFrrMwdYUK+q0suoqmlkQuhuh1r2bITkCqO5MGFlT
 fzmIeJehVLDnSMvXXRl7XBXTtHWpTOrl/LTKJL2fo4U9a+92Q2dkdsUCGs3MdLVmFWBE
 dQ1JFFGVQirtDfJzAeI20NwIWywA/pt0Glw00S49fes78WhV7QOAfJ1lAPfeuMz4mfnu
 r/nA==
X-Forwarded-Encrypted: i=1;
 AJvYcCWZaT0E4QXBEQvWu/FkEYx+FVMeHAXRpvdWfb6qiI9v7CdD5qwtbgaEAm2NQDBI+kjF3wfv4Q==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YxlvsG3ukYXchhVKOqfTXXidpym8BnIqdmOreuWkXPyoX9oRecY
 k76vNLVl4OI3H5iQIXqso5QTffGZn/ehp9mk50qRyPhmW/8pJexdva4AGq6kJ+S3RbMAhTe1vg2
 t4OAnMzBExAt7IAOGQwXpQUHTSlFG1AI=
X-Gm-Gg: ASbGncs8v66FqVm1owmVShkNtypsKHKDgNu5OEM1jOGp0OlXXBikfVtELvI4GpA0ryU
 i1kPQGodxeGAyPIYsYVZcEFux4O0ENYfAXEccXCejQLOvcgtlZYdcd6jU8rGuazLa6GMXiSLpUG
 QcUjBOErgTbURMmugkXJa7TAMO7k/T/r3v9ci6NslyWzjI6qWOKtz/MX2ZY8jIQZq6kvqjOG49C
 Ox809S7AKTT0njpSKI2e60B7QATYfawII9e5mCtuaL91vA5PLkRZNrqkqqbtrM5U3awabs=
X-Google-Smtp-Source: AGHT+IEs4iX0pibDNf0FekzscweWB6sxxO/Q+jF58msQ9G7tf7V3jq/QucopkCMdqcy0IdyeS5NuuRjmj5TVg5v25tQ=
X-Received: by 2002:a05:6808:320a:b0:441:8f74:f1d with SMTP id
 5614622812f47-443a31624a4mr6991188b6e.55.1760992220634; Mon, 20 Oct 2025
 13:30:20 -0700 (PDT)
MIME-Version: 1.0
References: <CALDnm52wZ5W-7QfnWv9OuRAjsoeGHiMoDLQv9Ymd-7oL2ag1nA@HIDDEN>
 <87ldlcggvo.fsf@HIDDEN> <86frbkc6lo.fsf@HIDDEN>
 <iersefkhr1h.fsf@HIDDEN>
 <86a51rcur5.fsf@HIDDEN> <87ecr3ib8g.fsf@HIDDEN>
 <86planb7u3.fsf@HIDDEN>
 <87qzv2oor1.fsf@HIDDEN> <ierfrbiix4k.fsf@HIDDEN>
 <87wm4uivro.fsf@HIDDEN> <iercy6mitzk.fsf@HIDDEN>
 <871pn2itfv.fsf@HIDDEN> <ier7bwuiq8q.fsf@HIDDEN>
 <87v7ke1sv6.fsf@HIDDEN> <87qzuy94bz.fsf@HIDDEN>
 <87tszu64sx.fsf@HIDDEN> <87ikga5vvg.fsf@HIDDEN>
 <87qzuyqe5u.fsf@HIDDEN>
 <87ecqy5599.fsf@HIDDEN> <ier5xc9v4l2.fsf@HIDDEN>
 <CALDnm53HRHmVMunoxcK9t=3ERweQ=O-93BaUKZ4QaA576bXXEQ@HIDDEN>
 <ierzf9ltldr.fsf@HIDDEN>
In-Reply-To: <ierzf9ltldr.fsf@HIDDEN>
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Date: Mon, 20 Oct 2025 21:31:33 +0100
X-Gm-Features: AS18NWA_gTi0jqd3hjQO3SjGr9bLoIJyMPkR3Y_8z1onkcAVijqU8i8ywql6dqg
Message-ID: <CALDnm501mGa=iub6OMqYD22ePB0L-zwKa3dvm72UHw231FrhPQ@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000c3638006419cf321"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000c3638006419cf321
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Oct 20, 2025 at 8:37=E2=80=AFPM Spencer Baugh <sbaugh@HIDDEN=
m> wrote:

>
> Ah, I think you're right, with your recent changes indeed such buffers
> should work fine.
>

Great.

(It would be nice if we had tests for these things...)
>

Robustly testing async code with display effects in non-interactive
settings is very hard to do, if not impossible, last I checked. JS-based
web development faced similar difficulties in the past, though
nowadays there are things like Puppeteer or Playwright based on headless
browsers to plug that gap.  Not  sure something like that exists for Emacs.
Best we can do is write down the Emacs -Q steps that a human can reliably
and efficiently follow, likeI did some messages ago.

Jo=C3=A3o

--000000000000c3638006419cf321
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">On Mon, Oct 20, 2025 at 8:37=E2=80=AFPM S=
pencer Baugh &lt;<a href=3D"mailto:sbaugh@HIDDEN">sbaugh@janestreet=
.com</a>&gt; wrote:</div><div class=3D"gmail_quote gmail_quote_container"><=
blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l=
eft:1px solid rgb(204,204,204);padding-left:1ex"><br>
Ah, I think you&#39;re right, with your recent changes indeed such buffers<=
br>
should work fine.<br></blockquote><div><br></div><div>Great.=C2=A0</div><di=
v><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
(It would be nice if we had tests for these things...)<br></blockquote><div=
><br></div><div>Robustly testing async code with display effects in non-int=
eractive=C2=A0</div><div>settings is very hard to do, if not impossible, la=
st I checked. JS-based</div><div>web development faced similar difficulties=
 in the past, though</div><div>nowadays there are things like Puppeteer or =
Playwright based on headless=C2=A0</div><div>browsers to plug that gap.=C2=
=A0 Not=C2=A0 sure something like that exists for Emacs.=C2=A0</div><div>Be=
st we=C2=A0can do is write down the Emacs -Q steps that a human can reliabl=
y=C2=A0</div><div>and efficiently follow,=C2=A0likeI did some messages ago.=
</div><br></div><div dir=3D"ltr" class=3D"gmail_signature">Jo=C3=A3o</div><=
/div>

--000000000000c3638006419cf321--





Last modified: Mon, 20 Oct 2025 20:45:01 UTC

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