GNU bug report logs - #77313
30.1.50; Regression: flymake indicators are erroneously using margins

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Spencer Baugh <sbaugh@HIDDEN>; dated Thu, 27 Mar 2025 15:14:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 77313) by debbugs.gnu.org; 12 Apr 2025 12:50:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 12 08:50:26 2025
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>
To: Spencer Baugh <sbaugh@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)
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 77313 <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>
> 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.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 12 Apr 2025 11:43:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 12 07:43:33 2025
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>
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000006970bc06329353ec"
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77313
Cc: 77313 <at> debbugs.gnu.org, Juri Linkov <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 (---)

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 12 Apr 2025 11:13:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 12 07:13:14 2025
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>
To: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <iermscqqq4x.fsf@HIDDEN> (message from Spencer Baugh on
 Tue, 08 Apr 2025 17:50:38 -0400)
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 77313 <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: 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 8 Apr 2025 21:50:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 08 17:50:55 2025
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>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 77313 <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 (---)

--=-=-=
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


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 8 Apr 2025 15:54:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 08 11:54:56 2025
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>
To: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <ier4iyyzoq3.fsf@HIDDEN> (message from Spencer Baugh on
 Tue, 08 Apr 2025 10:56:20 -0400)
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 77313 <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: 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 8 Apr 2025 14:56:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 08 10:56:28 2025
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>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 77313 <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 (---)

--=-=-=
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


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 8 Apr 2025 14:30:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 08 10:30:16 2025
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>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 77313 <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 (---)

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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 8 Apr 2025 14:16:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 08 10:16:23 2025
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>
To: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <iera58qzuqu.fsf@HIDDEN> (message from Spencer Baugh on
 Tue, 08 Apr 2025 08:46:17 -0400)
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 77313 <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: 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 8 Apr 2025 12:46:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 08 08:46:26 2025
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>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 77313 <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 (---)

--=-=-=
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


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 2 Apr 2025 13:05:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 02 09:05:11 2025
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>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 77313 <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 (---)

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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 2 Apr 2025 11:53:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 02 07:53:29 2025
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>
To: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <ierr02btte5.fsf@HIDDEN> (message from Spencer Baugh on
 Tue, 01 Apr 2025 18:21:38 -0400)
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 77313 <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: 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 1 Apr 2025 22:21:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 01 18:21:47 2025
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>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 77313 <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 (---)

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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 29 Mar 2025 07:05:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 29 03:05:41 2025
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>
To: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <ier1puhf66g.fsf@HIDDEN> (message from Spencer Baugh on
 Fri, 28 Mar 2025 12:53:11 -0400)
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 77313 <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: 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 28 Mar 2025 16:53:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 28 12:53:20 2025
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>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 77313 <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 (---)

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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 28 Mar 2025 07:12:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 28 03:12:06 2025
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>
To: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <ier7c4afc1j.fsf@HIDDEN> (message from Spencer Baugh on
 Thu, 27 Mar 2025 16:34:16 -0400)
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 77313 <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: 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 27 Mar 2025 20:34:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 27 16:34:26 2025
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>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: Eli Zaretskii <eliz@HIDDEN>, 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: -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


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 27 Mar 2025 18:23:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 27 14:23:09 2025
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>
To: Spencer Baugh <sbaugh@HIDDEN>
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: Eli Zaretskii <eliz@HIDDEN>, 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.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).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 27 Mar 2025 17:42:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 27 13:42:24 2025
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>
To: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <iera596fm2r.fsf@HIDDEN> (message from Spencer Baugh on
 Thu, 27 Mar 2025 12:57:32 -0400)
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN> <86r02ibeld.fsf@HIDDEN>
 <iera596fm2r.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77313
Cc: 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: -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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 27 Mar 2025 16:57:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 27 12:57:41 2025
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>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 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: -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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 27 Mar 2025 16:53:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 27 12:53:00 2025
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>
To: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <iercye2fnew.fsf@HIDDEN> (message from Spencer Baugh on
 Thu, 27 Mar 2025 12:28:39 -0400)
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
References: <ierbjtmsdzr.fsf@HIDDEN> <86wmcabgd8.fsf@HIDDEN>
 <iercye2fnew.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77313
Cc: 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: -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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 27 Mar 2025 16:28:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 27 12:28:49 2025
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>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77313: 30.1.50; Regression: flymake indicators are
 erroneously using margins
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-Debbugs-Envelope-To: 77313
Cc: 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: -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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at 77313) by debbugs.gnu.org; 27 Mar 2025 16:14:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 27 12:14:41 2025
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>
To: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <ierbjtmsdzr.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#77313: 30.1.50;
 Regression: flymake indicators are erroneously using margins
References: <ierbjtmsdzr.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77313
Cc: 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: -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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 27 Mar 2025 15:14:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 27 11:14:01 2025
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


--=-=-=--




Acknowledgement sent to Spencer Baugh <sbaugh@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#77313; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 12 Apr 2025 13:00:04 UTC

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