Subject: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only

From: "Basil L. Contovounesios" <[email-masked]>
Date: Sun, 15 Nov 2020 21:52:24 +0000

Juri Linkov <[email-masked]> writes:

>> Can what you want be achieved by setting set-message-function to
>> something suitable?
>
> Inhibiting messages selectively was discussed in bug#42865
> where I forgot that this is indeed easily implementable
> with the help of set-message-function, e.g.:
>
>   (defcustom inhibit-message-regexp "^View mode: type"
>     "Regexp to inhibit messages."
>     :type 'regexp)
>
>   (defun inhibit-message-function (message)
>     (string-match-p inhibit-message-regexp message))
>
>   (setq set-message-function 'inhibit-message-function)

The selectivity is that I want the "View mode: ..." message to appear
most of the time, except not when Eglot is doing background processing.

I therefore don't see how this set-message-function is any different to
the other ways of silencing the message that were already mentioned in
this thread.  There are many ways of silencing the message, but they
have to be installed somewhere non-globally.

I'll try to write a patch for that tomorrow if no-one else beats me to
it.

Thanks,

-- 
Basil