GNU bug report logs -
#44629
28.0.50; Eglot noisy with gfm-view-mode and view-read-only
Previous Next
Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Date: Sat, 14 Nov 2020 10:59:02 UTC
Severity: minor
Tags: fixed, patch
Found in version 28.0.50
Fixed in version 28.1
Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
Message #46 received at control <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tags 44629 + patch
quit
João Távora <joaotavora <at> gmail.com> writes:
> On Sun, Nov 15, 2020 at 9:52 PM Basil L. Contovounesios <contovob <at> tcd.ie> wrote:
>
>> The selectivity is that I want the "View mode: ..." message to appear
>> most of the time, except not when Eglot is doing background processing.
>
> Exactly. Or any type of background processing, for that matter.
> So, if this is a principle, the check for `this-command`, as I proposed
> it in a patch,should suffice
This initially felt a bit heavy-handed (since view-mode-enter is called
in various places), so I was hesitant to go with it, but upon further
consideration I couldn't think of a better way.
For example, binding inhibit-message or set-message-function in
eglot--format-markup may avoid spamming the echo area, but it may also
inadvertently clear the echo area of other messages during Eglot usage,
and still spams *Messages*.
The point is that view-mode-enter shouldn't call message under all
circumstances, and this-command seems like an accurate enough condition.
> This doesn't change the fact that jsonrpc.el's use of `read-only-mode`
> should probably be replaced by a simple setting of buffer-read-only,
> but it could avoid the change to eglot when it calls `gfm-view-mode`.
> Though maybe that change could be there, too.
See my thoughts above on why Eglot needn't be changed in this regard.
How's the attached patch for view.el and jsonrpc.el?
Thanks,
--
Basil
[0001-Avoid-spamming-view-mode-enter-help-message.patch (text/x-diff, attachment)]
This bug report was last modified 4 years and 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.