bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom


From: Juri Linkov
Subject: bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
Date: Tue, 25 Aug 2020 21:40:15 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> IOW, I still prefer the simplicity of such regexps as
>>
>>   (add-to-list 'inhibit-message "^Saved text until")
>>
>> and can't imagine a situation why I'd want to inhibit such message
>> for one command but not for another.
>
> One package says: "Saved text until end"
>
> Another one says: "Saved text until end... failed, retry to avoid data
> loss"

Then it could match the whole message with $ at the end.

  (add-to-list 'inhibit-message "^Saved text until end$")

> And then you have the joy when the message text changes...

The message text changes not often.  But the symbol approach is much worse
because it takes the freedom from users - in case of symbols the developers
decide whether to allow the users to inhibit messages or not.  When developers
allow to inhibit some messages by adding a new symbol to the message function,
then it takes many years until the users can start using new symbols to
inhibit messages after the next release.

OTOH, in case of regexps, the users decide what text they want to inhibit
without waiting for developers adding new symbols.

For example, in https://debbugs.gnu.org/21893#23
I needed to inhibit the message from view-end-message.
With a regexp this would be very easy:

  (add-to-list 'inhibit-message "^End of buffer")

But currently I use such complicated advice:

  (advice-add 'view-end-message :around
              (lambda (orig-fun &rest args)
                (let ((inhibit-message t))
                  (apply orig-fun args)))
              '((name . non-verbose-view-end-message)))

Also using regexps will obsolete many such ad-hoc options as
'view-inhibit-help-message'.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]