GNU bug report logs - #79481
global-hl-line buffers

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 21 Sep 2025 17:08:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: eg642616 <at> gmail.com, 79481 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: bug#79481: global-hl-line buffers
Date: Mon, 22 Sep 2025 16:45:19 -0400
>> One possibility is to add a new keyword like e.g. ':filter'
>>
>>   (define-globalized-minor-mode global-tab-line-mode
>>     tab-line-mode tab-line-mode--turn-on
>>     :filter 'tab-line-exclude-buffers
>> 
>> that will enable buffer-local mode selectively
>> according to the filter option.

We don't need yet-another-keyword for that, we can do the filtering
inside `tab-line-mode--turn-on` (that's why we have two arguments,
`tab-line-mode` and `tab-line-mode--turn-on`).

If that kind of need is very frequent for globalized minor modes, we
could consider adding such a feature directly in the macro, of course,
but it's a bit delicate since it would tend to "fight" with the
filtering done within the TURN-ON function: we'd probably need to
provide both a way to exclude some buffers and a way to
include buffers (which TURN-ON would otherwise skip).

So, I hope "YAGNI" does the trick here.


        Stefan





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.