From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only Date: Sat, 14 Nov 2020 17:13:53 +0000 Message-ID: <871rgvj1ym.fsf@tcd.ie> References: <875z68p5mr.fsf@tcd.ie> <87wnyokq2c.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15870"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 44629@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 14 18:15:22 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdz8z-0003zo-SV for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Nov 2020 18:15:21 +0100 Original-Received: from localhost ([::1]:60612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdz8y-0006lk-Oc for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Nov 2020 12:15:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdz8h-0006jB-2Z for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 12:15:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40346) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdz8g-0008JJ-Nu for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 12:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kdz8g-0004R0-G6 for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 12:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Nov 2020 17:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44629 X-GNU-PR-Package: emacs Original-Received: via spool by 44629-submit@debbugs.gnu.org id=B44629.160537404316963 (code B ref 44629); Sat, 14 Nov 2020 17:15:02 +0000 Original-Received: (at 44629) by debbugs.gnu.org; 14 Nov 2020 17:14:03 +0000 Original-Received: from localhost ([127.0.0.1]:51890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdz7j-0004PX-5x for submit@debbugs.gnu.org; Sat, 14 Nov 2020 12:14:03 -0500 Original-Received: from mail-wr1-f45.google.com ([209.85.221.45]:34058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdz7h-0004Ov-CM for 44629@debbugs.gnu.org; Sat, 14 Nov 2020 12:14:01 -0500 Original-Received: by mail-wr1-f45.google.com with SMTP id r17so13845441wrw.1 for <44629@debbugs.gnu.org>; Sat, 14 Nov 2020 09:14:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=1VNusSqW5LdyaGAF4KHcpGBF0RISFlRH1qNosxHCbqU=; b=FPZtEoCd781NTXmy+y9/twPaIMVCCiCw7EaNsp7WtCMiAYNKSY/u0sqclpj7qZhWFB gEF5SSV65ybYMoCPpvywbvzqcraTunNDyBhh8KMTo/InI0Nf8q5KZR41UPEa6XSzZTMi 1MLeb4ilG1hcaRKg391roF1nvW0MpxbLNr2d7fjkP3uud1r9kbpfYTovNa+io2J1HirN c7J8lHOprveg7NFR3l1YdNnlQQ9BFM0ImRGvh6Wv/cFHXOedyZ+z77S9iZ5qo682kNiQ u8hF5QG2P8myj+GQkATgw1qKbGyxtoo8VcWuFQLyeuwWeamyC0/phP/st63Eh7cTPxjW jybA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=1VNusSqW5LdyaGAF4KHcpGBF0RISFlRH1qNosxHCbqU=; b=b5fa0OMJytDhMH1tyBs+LQwDWf9h503LuH7V8lUXB0RWSPaRj2OXxSUSn8sw85gnwu U8C/nHIHsA0z8hkKoD8l1gEdBAEVQ7AWMZTBF/Ryx90uz1G2HyaZSWYLXSnB33zE3vlv B8P0X19UWK5fxmfeObRDHLpt9ALN3LoZbeI9a3Q7u75Sv2O1ikP/YFCh8314n4WiiJVp XmuIX6YZ3U550UmveivJn0A1WnHsLFRMtZz+7dCTLuy3N3CgkSWFignFR3dYb240O5CL Dh/De2u5Kx10rSImbDHzbhE1ofZFXMa0G8R4A4QY+MweHHJCFarfSy7jviSwPY+GS+L1 2aqg== X-Gm-Message-State: AOAM532fApmcR2NQJbbAl5gaaROAL79BEw3vdbBQ/mT9iSp3gDx+l0KZ mcLKoCw5SIHtq+R5Yh8hdkjX1Q== X-Google-Smtp-Source: ABdhPJyFgpYO3sr8XtRoZV6EE8tHjurxSJ9jRs4HBx+8QAj35CryjktrUSEP8Y02QCKJJS6+vyMN3A== X-Received: by 2002:adf:e789:: with SMTP id n9mr10283348wrm.211.1605374035735; Sat, 14 Nov 2020 09:13:55 -0800 (PST) Original-Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id a144sm14798wmd.47.2020.11.14.09.13.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Nov 2020 09:13:55 -0800 (PST) In-Reply-To: <87wnyokq2c.fsf@gmail.com> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Sat, 14 Nov 2020 13:47:55 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193312 Archived-At: Jo=C3=A3o T=C3=A1vora writes: [...] > I'd say the fix here is for Eglot, jsonrpc.el and all all other code > that needs to set a buffer read only for implementation purposes just > sets the variable buffer-read-only. In fact, the docstring of > read-only-mode hints at this: [...] > Alternatively, and very cautiously, we could also say that the echo area > message issued by view-mode should only be displayed to the user if it's > running interactively, i.e. if it's a direct synchronous consequence of > an interactive command. That would exclude elisp code running > asynchronously like jsonrpc.el's updating of the events buffer, and > probably also the use that ElDoc clients make of `read-only-mode`. [...] > In that spirit, maybe this could fix it? > > diff --git a/lisp/view.el b/lisp/view.el > index 204e28c2a2..6233f3ba7d 100644 > --- a/lisp/view.el > +++ b/lisp/view.el > @@ -559,7 +559,8 @@ view-mode-enter >=20=20=20=20=20=20 > (unless view-mode > (view-mode 1) > - (unless view-inhibit-help-message > + (unless (or view-inhibit-help-message > + (not (called-interactively-p 'interactive))) > (message "%s" > (substitute-command-keys "\ > View mode: type \\[help-command] for help, \\[describe-mode] for com= mands, \\[View-quit] to quit."))))) I don't think so, at least not in that exact manifestation, because view-mode-enter is seldom, if ever, called interactively. I.e. this will suppress the help message even when you visit a read-only file. So it's sounding like replacing read-only-mode with buffer-read-only, and an inhibit-message around gfm-view-mode, is indeed the way to go. Thanks, --=20 Basil