From unknown Fri Sep 05 10:04:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79244: [PATCH] flymake: stop trying to automatically fall back to margins Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Aug 2025 14:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 79244 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 79244@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.175526724810728 (code B ref -1); Fri, 15 Aug 2025 14:15:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Aug 2025 14:14:08 +0000 Received: from localhost ([127.0.0.1]:39101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1umvC3-0002mu-O6 for submit@debbugs.gnu.org; Fri, 15 Aug 2025 10:14:08 -0400 Received: from lists.gnu.org ([2001:470:142::17]:60720) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1umvBx-0002m5-El for submit@debbugs.gnu.org; Fri, 15 Aug 2025 10:14:05 -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 ) id 1umvBr-0000VQ-4Z for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2025 10:13:55 -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 ) id 1umvBn-0002ZC-TT for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2025 10:13:54 -0400 From: Spencer Baugh Date: Fri, 15 Aug 2025 10:13:49 -0400 Message-ID: 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=1755267230; bh=MIQluyD7jfxlGyFgTJ1qeSkf7RrV0bFALyyWXmDkwLY=; h=From:To:Subject:Date; b=DSSKpYt6d329V6zlKz8jJZRRtdt6yx4ISYnWqbaD61zyk3u2RCaFg0avZTTSJbJS1 HvrlV4wGVRvAaTAulZmaHW2Rp/R4pwJ2b6quVREwd4QoA656innd43ApQjbCvsyyaf LujJg9Sb7QrSzScGVNYSTCLXk3KN/lzpL6mu/UmSUlPKveK6XNu++WKCMtn1m/njZD 1iBMOnFC9a0+7RSM12/ki2cbHO/OnGwBg9VoNOgW93Osp3/JBIJSTJ5SVBXWumdQMK XWUe1YJpRxcxqqD6TWXwswo7LphZ8E2Y0GvKOTQFGTNiLJArUu9Pfs/sska3nIZUMh n8jzC7G/kXuag== Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@janestreet.com; 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain 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/' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-flymake-stop-trying-to-automatically-fall-back-to-ma.patch >From 83ab8e5a114d4cb724afbe11e695fd5ee1dae8ab Mon Sep 17 00:00:00 2001 From: Spencer Baugh 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 | 3 --- etc/NEWS | 5 ----- lisp/progmodes/flymake.el | 9 --------- 3 files changed, 17 deletions(-) diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index d6c8778d785..ea4339c83fa 100644 --- 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. @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 --=-=-=-- From unknown Fri Sep 05 10:04:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79244: [PATCH] flymake: stop trying to automatically fall back to margins Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Aug 2025 15:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79244 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Spencer Baugh Cc: 79244@debbugs.gnu.org Received: via spool by 79244-submit@debbugs.gnu.org id=B79244.175527012320270 (code B ref 79244); Fri, 15 Aug 2025 15:03:02 +0000 Received: (at 79244) by debbugs.gnu.org; 15 Aug 2025 15:02:03 +0000 Received: from localhost ([127.0.0.1]:39234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1umvwR-0005Gr-4h for submit@debbugs.gnu.org; Fri, 15 Aug 2025 11:02:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33402) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1umvwN-0005GK-V4 for 79244@debbugs.gnu.org; Fri, 15 Aug 2025 11:02:01 -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 ) id 1umvwI-0008L0-Dc; Fri, 15 Aug 2025 11:01:54 -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=GF4Ka5D5xz/70HRKwM8IhQtPsR1pKMy0ziOnWPG7MG8=; b=eOr6uIVSt5qs fMX5Sq4/URcF2s6R7MZhCXqc4HPbnLnUL/+ViswAHg5Bs06xQyASzLJVz6Fg+Oa5kwWakFa7qH3bD D2Fz/N2jF+eezGiYAxiNJXEK7QAVJTnLCE5W7PZQk0fAkL0d4QhYDiOB59QEg+xm9T56knMDQ/FW3 4prBx8+mENkXixgfdL82wZviDGG4EDfvhjxYUC726eXEq/VixEKoQQZRuQI+SdYPXcri9/kbSsK9w oSJBwf5q7Cw5WbsXkAnH0DR8bp2z+JqKMqMPee3DeAeidivuBh64Shg+cUE7LohhQCdbNo7eRrd9F QXQsmdfgMESU/zXfH6AJwQ==; Date: Fri, 15 Aug 2025 18:01:49 +0300 Message-Id: <86wm74ljc2.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (bug-gnu-emacs@gnu.org) References: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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" > > 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. From unknown Fri Sep 05 10:04:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79244: [PATCH] flymake: stop trying to automatically fall back to margins Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Aug 2025 17:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79244 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 79244@debbugs.gnu.org Received: via spool by 79244-submit@debbugs.gnu.org id=B79244.175528036121414 (code B ref 79244); Fri, 15 Aug 2025 17:53:02 +0000 Received: (at 79244) by debbugs.gnu.org; 15 Aug 2025 17:52:41 +0000 Received: from localhost ([127.0.0.1]:39602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1umybY-0005ZJ-TN for submit@debbugs.gnu.org; Fri, 15 Aug 2025 13:52:41 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:50159) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1umybU-0005Yz-Kf for 79244@debbugs.gnu.org; Fri, 15 Aug 2025 13:52:39 -0400 From: Spencer Baugh In-Reply-To: <86wm74ljc2.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 15 Aug 2025 18:01:49 +0300") References: <86wm74ljc2.fsf@gnu.org> Date: Fri, 15 Aug 2025 13:52:31 -0400 Message-ID: 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=1755280351; bh=TH2uqvvpQ66kGbnFIkPrKExFQWHHXjdP28pEPePG8UQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=0reosgTxB/lR7eHdtl1BMZ3xRPP1zgWCy8CVfZuuic/S+na4slfkzfzBtQobjRqVI La5no+bFTK+Iac9ADtCoasgzAXvCqiq4AqYKBnfAhNDvwKLOpNDFRViY0tMNxftOqn 8LzoqDCm9HLYc76TuFGF+qha4WN86dGudHxfpvwu+6QzD188Us2Hp/K+1N0MPY2HCr eC5tx628dMspLUJQIQczwo870gytn4Q2jVSuA90A5pcntf8iZu/GN6Fde/fbnqxf0W yaohMMSHf6prBcdjjQwpVh7hGKdAJvs/oKqjWsgxwQx0uJK9eYRAr8k3V4FxIm+gd5 rygrpIoqFsrHw== X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Eli Zaretskii 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" >> >> 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-flymake-stop-trying-to-automatically-fall-back-to-ma.patch >From 8abc91b5f7ae3eeb675f3f041d20fce943184f34 Mon Sep 17 00:00:00 2001 From: Spencer Baugh 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 --=-=-=-- From unknown Fri Sep 05 10:04:51 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Spencer Baugh Subject: bug#79244: closed (Re: bug#79244: [PATCH] flymake: stop trying to automatically fall back to margins) Message-ID: References: <86frdib6rs.fsf@gnu.org> X-Gnu-PR-Message: they-closed 79244 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 79244@debbugs.gnu.org Date: Sat, 23 Aug 2025 11:47:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1755949623-12068-1" This is a multi-part message in MIME format... ------------=_1755949623-12068-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #79244: [PATCH] flymake: stop trying to automatically fall back to margins which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 79244@debbugs.gnu.org. --=20 79244: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D79244 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1755949623-12068-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 79244-done) by debbugs.gnu.org; 23 Aug 2025 11:46:17 +0000 Received: from localhost ([127.0.0.1]:38908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1upmhM-00037Q-Pw for submit@debbugs.gnu.org; Sat, 23 Aug 2025 07:46:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47958) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1upmhD-00036u-Iv for 79244-done@debbugs.gnu.org; Sat, 23 Aug 2025 07:46:13 -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 ) id 1upmh7-00049N-NC; Sat, 23 Aug 2025 07:46:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=TAiPFzd2ik+p6Ve7r/9KagVIFrjVIwk2BrycDQfsDBE=; b=dPL6IqX2GeZK ozvgOKz+X9Skgts4Y84yW/f72zWvq1PWPwgegKM+4A+B8kdVjhFu5Xx6Ey/9aJ7pmuhnLelJ+XoJN qHTBui4RgYhXgJxkGKaLOnJxzebujIJAZmuibYO+25DE91SyxRDCIY1AoVZS5K3FjrPfqoApssob5 QZnd3l48f1XcSyllDW8uGda10PbsFytoyLBm5nalV59YMxjCfSIfm37Hurdin9y+FQEswWy+S5c+3 wIe7knN4vBiEaJ7UEI0Bl6vOMyFSl52kZ0xL4YUjFvhQgEE7CJr2Ay8UX9jMNCMpdjQAbVgXyk9dI 4xyrqKwhElikgLqdZvjaPQ==; Date: Sat, 23 Aug 2025 14:45:59 +0300 Message-Id: <86frdib6rs.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Fri, 15 Aug 2025 13:52:31 -0400) Subject: Re: bug#79244: [PATCH] flymake: stop trying to automatically fall back to margins References: <86wm74ljc2.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79244-done Cc: 79244-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Spencer Baugh > Cc: 79244@debbugs.gnu.org > Date: Fri, 15 Aug 2025 13:52:31 -0400 > > Eli Zaretskii 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" > >> > >> 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. Now installed on the master branch, and closing the bug. ------------=_1755949623-12068-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Aug 2025 14:14:08 +0000 Received: from localhost ([127.0.0.1]:39101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1umvC3-0002mu-O6 for submit@debbugs.gnu.org; Fri, 15 Aug 2025 10:14:08 -0400 Received: from lists.gnu.org ([2001:470:142::17]:60720) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1umvBx-0002m5-El for submit@debbugs.gnu.org; Fri, 15 Aug 2025 10:14:05 -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 ) id 1umvBr-0000VQ-4Z for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2025 10:13:55 -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 ) id 1umvBn-0002ZC-TT for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2025 10:13:54 -0400 From: Spencer Baugh To: bug-gnu-emacs@gnu.org Subject: [PATCH] flymake: stop trying to automatically fall back to margins Date: Fri, 15 Aug 2025 10:13:49 -0400 Message-ID: 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=1755267230; bh=MIQluyD7jfxlGyFgTJ1qeSkf7RrV0bFALyyWXmDkwLY=; h=From:To:Subject:Date; b=DSSKpYt6d329V6zlKz8jJZRRtdt6yx4ISYnWqbaD61zyk3u2RCaFg0avZTTSJbJS1 HvrlV4wGVRvAaTAulZmaHW2Rp/R4pwJ2b6quVREwd4QoA656innd43ApQjbCvsyyaf LujJg9Sb7QrSzScGVNYSTCLXk3KN/lzpL6mu/UmSUlPKveK6XNu++WKCMtn1m/njZD 1iBMOnFC9a0+7RSM12/ki2cbHO/OnGwBg9VoNOgW93Osp3/JBIJSTJ5SVBXWumdQMK XWUe1YJpRxcxqqD6TWXwswo7LphZ8E2Y0GvKOTQFGTNiLJArUu9Pfs/sska3nIZUMh n8jzC7G/kXuag== Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@janestreet.com; 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_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@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain 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/' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-flymake-stop-trying-to-automatically-fall-back-to-ma.patch >From 83ab8e5a114d4cb724afbe11e695fd5ee1dae8ab Mon Sep 17 00:00:00 2001 From: Spencer Baugh 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 | 3 --- etc/NEWS | 5 ----- lisp/progmodes/flymake.el | 9 --------- 3 files changed, 17 deletions(-) diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index d6c8778d785..ea4339c83fa 100644 --- 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. @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 --=-=-=-- ------------=_1755949623-12068-1--