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

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

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


From: Basil L. Contovounesios
Subject: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only
Date: Sat, 14 Nov 2020 12:26:28 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: "Basil L. Contovounesios" <contovob@tcd.ie>
>> Date: Sat, 14 Nov 2020 11:15:48 +0000
>> Cc: João Távora <joaotavora@gmail.com>
>> 
>> "Basil L. Contovounesios" <contovob@tcd.ie> writes:
>> 
>> > Perhaps Eglot could/should bind view-inhibit-help-message around
>> > gfm-view-mode?  Any other ideas?
>> 
>> I tried advising eglot--format-markup to bind view-inhibit-help-message,
>> which gets rid of the most annoying messages, but some still seem to
>> emanate from jsonrpc, which calls read-only-mode in
>> jsonrpc-events-buffer and initialize-instance.  I'd rather not have to
>> rely on advising internal functions, but maybe I can't have my cake and
>> eat it, too.  ;)
>
> Can what you want be achieved by setting set-message-function to
> something suitable?

I don't have a preference for one or the other approach, but I'm not
sure how that would be much different to binding
view-inhibit-help-message.  The problem in both cases is that eglot and
jsonrpc internally make calls, either directly or indirectly, to
read-only-mode, which can be noisy.

I'd like read-only-mode to remain noisy (via view-read-only) in all
other cases, if possible, such as when visiting a read-only file.  How
can the use of set-message-function distinguish between calls to
read-only-mode from internal Eglot plumbing, vs those from
e.g. find-file?

The only clean approaches off the top of my head are:

a) inhibit these messages in one way or another around calls to
   gfm-view-mode/read-only-mode in eglot/jsonrpc;
b) disable view-read-only and/or enable view-inhibit-help-message
   in my configuration.

-- 
Basil





reply via email to

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