GNU bug report logs - #73986
31.0.50; Allow suppressing message passed to set-transient-map

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Thu, 24 Oct 2024 14:08:01 UTC

Severity: normal

Found in version 31.0.50

Done: Stephen Berman <stephen.berman <at> gmx.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Juri Linkov <juri <at> linkov.net>
Cc: 73986 <at> debbugs.gnu.org
Subject: bug#73986: 31.0.50; Allow suppressing message passed to set-transient-map
Date: Thu, 24 Oct 2024 20:12:06 +0200
On Thu, 24 Oct 2024 20:12:20 +0300 Juri Linkov <juri <at> linkov.net> wrote:

>> If a caller of set-transient-map passes a suitable format string, this
>> is displayed as a message on activating the transient map.  An example
>> is text-scale-adjust, which displays the message "Use +, =, -, 0, C-+,
>> C-=, C--, C-0 for further adjustment".  So if after typing `C-x C-+' you
>> immediately type `+ + + - - -', the text size increases three times and
>> then decreases three times.  But on each key press the message is
>> redisplayed, which is slighty annoying (it actually looks like it stays
>> in the echo area but there is a brief flicker on each key press); the
>> message is helpful the first time, if you're unfamiliar with the
>> command, but on repeated uses, it becomes visual noise.  So I propose a
>> user option to suppress the message, as in the attached patch.
>
> Instead of adding a myriad of user options for every command
> that displays a message, we decided to create a single point
> of customization, so you could just set these options:
>
>   (add-to-list 'set-message-functions 'inhibit-message)
>   (add-to-list 'inhibit-message-regexps "for further adjustment")

Ah, thanks, I now vaguely recall seeing these but forgot about them.
They indeed do work just as well as my proposed change to
set-transient-map for text-scale-adjust as well as two private functions
I use that pass a message string matching the same regexp, so that
satisfies my immediate wish.  Still, there could be any number of
callers of set-transient-map that pass message strings users may want to
suppress but that require a different regexp, in which case the burden
on the user is more than with my patch.  But since that's AFAIK
currently only a theoretical possibility, I won't pursue the proposal.
I'll wait a few days in case someone does chime in favor of my patch,
but otherwise I'll then close the bug.

Steve Berman




This bug report was last modified 259 days ago.

Previous Next


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