GNU bug report logs -
#79244
[PATCH] flymake: stop trying to automatically fall back to margins
Previous Next
To reply to this bug, email your comments to 79244 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79244
; Package
emacs
.
(Fri, 15 Aug 2025 14:15:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Spencer Baugh <sbaugh <at> janestreet.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 15 Aug 2025 14:15:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tags: patch
The code to automatically fallback to margins is not correct: it
relies implicitly on the buffer being displayed in a window
while flymake-mode is running. If the buffer is created while
not displayed, we will always automatically fallback to margins,
which is incorrect.
Avoid the regression by simply disabling this code. I'll try
again to fall back automatically in the future.
In GNU Emacs 30.1.90 (build 9, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.15.12, Xaw scroll bars) of 2025-08-14 built on
igm-qws-u22796a
Repository revision: 6adc26ffa74aedbd1cfa9a1ee72073ebccea2b96
Repository branch: emacs-30
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Rocky Linux 8.10 (Green Obsidian)
Configured using:
'configure --with-x-toolkit=lucid --without-gpm --without-gconf
--without-selinux --without-imagemagick --with-modules --with-gif=no
--with-cairo --with-rsvg --without-compress-install --with-tree-sitter
--with-native-compilation=aot
PKG_CONFIG_PATH=/usr/local/home/garnish/libtree-sitter/0.22.6-1/lib/pkgconfig/'
[0001-flymake-stop-trying-to-automatically-fall-back-to-ma.patch (text/patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79244
; Package
emacs
.
(Fri, 15 Aug 2025 15:03:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 79244 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 15 Aug 2025 10:13:49 -0400
> From: Spencer Baugh via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> The code to automatically fallback to margins is not correct: it
> relies implicitly on the buffer being displayed in a window
> while flymake-mode is running. If the buffer is created while
> not displayed, we will always automatically fallback to margins,
> which is incorrect.
>
> Avoid the regression by simply disabling this code. I'll try
> again to fall back automatically in the future.
Thanks.
> --- a/doc/misc/flymake.texi
> +++ b/doc/misc/flymake.texi
> @@ -317,9 +317,6 @@ 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.
Text-mode terminals default to margins, so I think the above text
should mention that.
Otherwise, no comments.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79244
; Package
emacs
.
(Fri, 15 Aug 2025 17:53:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 79244 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Fri, 15 Aug 2025 10:13:49 -0400
>> From: Spencer Baugh via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>> The code to automatically fallback to margins is not correct: it
>> relies implicitly on the buffer being displayed in a window
>> while flymake-mode is running. If the buffer is created while
>> not displayed, we will always automatically fallback to margins,
>> which is incorrect.
>>
>> Avoid the regression by simply disabling this code. I'll try
>> again to fall back automatically in the future.
>
> Thanks.
>
>> --- a/doc/misc/flymake.texi
>> +++ b/doc/misc/flymake.texi
>> @@ -317,9 +317,6 @@ 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.
>
> Text-mode terminals default to margins, so I think the above text
> should mention that.
>
> Otherwise, no comments.
Sure, fixed.
[0001-flymake-stop-trying-to-automatically-fall-back-to-ma.patch (text/x-patch, inline)]
From 8abc91b5f7ae3eeb675f3f041d20fce943184f34 Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh <at> janestreet.com>
Date: Fri, 15 Aug 2025 10:13:16 -0400
Subject: [PATCH] flymake: stop trying to automatically fall back to margins
The code to automatically fallback to margins is not correct: it
relies implicitly on the buffer being displayed in a window
while flymake-mode is running. If the buffer is created while
not displayed, we will always automatically fallback to margins,
which is incorrect.
Avoid the regression by simply disabling this code. I'll try
again to fall back automatically in the future.
* doc/misc/flymake.texi (Customizable variables): Remove section
about automatic fallback to margins.
* etc/NEWS: Un-announce removed feature.
* lisp/progmodes/flymake.el (flymake-indicator-type)
(flymake-mode): Stop automatically falling back to
margins. (bug#77313)
---
doc/misc/flymake.texi | 6 ++----
etc/NEWS | 5 -----
lisp/progmodes/flymake.el | 9 ---------
3 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index d6c8778d785..cc364813f8b 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -316,10 +316,8 @@ Customizable variables
The indicator type which Flymake should use to indicate lines with
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.
+@code{margins} for indicating errors. On text terminals, only
+@code{margins} is available.
@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 374fee4b770..881f4f4f09a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2481,11 +2481,6 @@ file names in above buffers. The default is nil.
---
** 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 on a text terminal.
-
*** Enhanced 'flymake-show-diagnostics-at-end-of-line'
The new value 'fancy' allowed for this user option will attempt to
layout diagnostics below the affected line using unicode graphics to
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index e911faf603d..95d5c0f5624 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -195,8 +195,6 @@ flymake-indicator-type
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 "31.1"
@@ -1485,13 +1483,6 @@ 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
This bug report was last modified 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.