GNU bug report logs - #42865
28.0.50; Add new 'copy-region-quietly' defcustom

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Fri, 14 Aug 2020 17:39:01 UTC

Severity: normal

Tags: patch

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #86 received at 42865 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 42865 <at> debbugs.gnu.org,
 Sean Whitton <spwhitton <at> spwhitton.name>
Subject: Re: bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom
Date: Sun, 15 Nov 2020 22:40:20 +0200
>> 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.
>
> I think you convinced me, thanks.  I still think people will shoot
> themselves in the foot, but OTOH we are hardly strangers to that.

In bug#44629 Eli reminded about set-message-function, and indeed
it's possible to make it safer by checking both the command name
and message regexp.  For example:

  (put 'kill-ring-save 'inhibit-message "^Copied text ")
  (put 'save-buffer 'inhibit-message "^Wrote ")
  (put 'read-only-mode 'inhibit-message "^View mode: type ")

  (defun inhibit-message-function (message)
    (and this-command
         (get this-command 'inhibit-message)
         (string-match-p (get this-command 'inhibit-message) message)))

  (setq set-message-function 'inhibit-message-function)




This bug report was last modified 3 years and 329 days ago.

Previous Next


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