From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 14 05:58:23 2020 Received: (at submit) by debbugs.gnu.org; 14 Nov 2020 10:58:23 +0000 Received: from localhost ([127.0.0.1]:49857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdtGB-000778-CA for submit@debbugs.gnu.org; Sat, 14 Nov 2020 05:58:23 -0500 Received: from lists.gnu.org ([209.51.188.17]:37252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdtGA-000770-0n for submit@debbugs.gnu.org; Sat, 14 Nov 2020 05:58:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdtG9-00079W-Nd for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 05:58:21 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:43353) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdtG7-00007I-0z for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 05:58:21 -0500 Received: by mail-wr1-x430.google.com with SMTP id s8so13110259wrw.10 for ; Sat, 14 Nov 2020 02:58:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=R8wz++uCWD5PS5o2ynxSA+r3iCuin29pqRsUt6YXwbo=; b=y/EotiPrgWunyEn6/0fCgmNr+0e/vYmBmDjU73YhntBIb6yuBXn51LFDTHcksf4Hkc 8i2lSyMysBxofNlAciRf39oj4XUkw8qoxsbL3pKzgg5vYGdWh8ujWSrpnhPj5wqGBGpe ZCh6ETIsoj1fcgUI7/HQbL5AKrOKqTJfw1CP6AKk+IeRCm1fi3BmYFj//rxFC/M9azoD aktiw8073OraTwolezOxvwpKydtW/92eBq9xPYMjDQfbnbq9+Hagh3zxCwGsvQoaHrxt x5M/lQkjJO1ZY0jxXzKkbBuWOh/gV4U8/k7Yf0XtP+jT5KMnDCnEx5Ptq/aJNXfIn3At eRFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=R8wz++uCWD5PS5o2ynxSA+r3iCuin29pqRsUt6YXwbo=; b=Z8E1BBbTpSVTL2H5ryGgb8J6Oh4y+M9W8F3WwRP2fTQp5lOOY+UcPU1507pMRB6v3F EOy16goMC0fMT4vBm/Mo+ksUmi97WLjUh5oOglpgjzHGZp8tE1d+ongAeM0da+Jb14aV 3oH1vfSArCJzzZzwV3FbqP4fKMk+zbN13wFPHajuQlzm1DtpU+AD7VAkSbVIqfdAjyt+ s9vS0688JFuE637+gx+UW4gd4iOCSwtfcrLJpAMpFlaCbksoQ/5X5cPUfSUPqCI8hXTu kUo2Mm/OWOkpyxrws5i5RkHWb2Qb3BSLYKwRPymaCPSyx/Td3NTbxYrVv/YEJxxZE82c nA/g== X-Gm-Message-State: AOAM5317H1FSXOKWLsA9tfhGSAjMOLeY9cwwh7IEuOg6QR2TCT1BTgVE M4j+yyOawZbmHtVsldukHgWQH5spInpn0w== X-Google-Smtp-Source: ABdhPJyqQn/ifV01VtepBRDCd2GZSW9SeDnKbztol+geDwsX8Y/iXefz7iBMk5IONItFB6ZRok7mEw== X-Received: by 2002:adf:9d49:: with SMTP id o9mr9048167wre.413.1605351495501; Sat, 14 Nov 2020 02:58:15 -0800 (PST) Received: from localhost ([2a02:8084:20e2:c380:fef1:a98a:87ca:e0e6]) by smtp.gmail.com with ESMTPSA id a17sm15594985wra.61.2020.11.14.02.58.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Nov 2020 02:58:14 -0800 (PST) From: "Basil L. Contovounesios" To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only Date: Sat, 14 Nov 2020 10:58:04 +0000 Message-ID: <875z68p5mr.fsf@tcd.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: none client-ip=2a00:1450:4864:20::430; envelope-from=contovob@tcd.ie; helo=mail-wr1-x430.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) X-Debbugs-Cc: "Jo=C3=A3o T=C3=A1vora" Severity: minor With Eglot, gfm-view-mode, and non-nil view-read-only, the echo area becomes quite congested. Here's an example that assumes you have previously installed the eglot (GNU ELPA) and markdown-mode (MELPA) packages using a vanilla package.el configuration, as well as pyls, the default Python language server that Eglot expects: 0. emacs -Q 1. (setq view-read-only t) C-j 2. M-x package-initialize RET 3. C-x C-f /tmp/foo.py RET 4. Enter the following Python: def foo(): bar =3D 1 5. M-x eglot RET (and wait for things to settle down) 6. M-x flymake-goto-next-error RET (and wait for things to settle down) The echo area is now taken over by the view-mode-enter message "View mode: type C-h for help, h for commands, q to quit." This message also appears at various other stages of editing, but when hovering over variables or flymake errors it seems to be the last one standing in the echo area. This happens because eglot--format-markup calls gfm-view-mode, which in turn enables read-only-mode, which in turn calls view-mode-enter. I can't disable this by setting view-read-only or view-inhibit-help-message locally, since Eglot does its doc processing in a different buffer. Perhaps Eglot could/should bind view-inhibit-help-message around gfm-view-mode? Any other ideas? Thanks, --=20 Basil In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo versio= n 1.16.0, Xaw3d scroll bars) of 2020-11-11 built on thunk Repository revision: e7b4f465e8b2ec1c8d54a611db7eca44ae350711 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Debian GNU/Linux bullseye/sid Configured using: 'configure 'CC=3Dccache gcc' 'CFLAGS=3D-O2 -march=3Dnative' --config-cache --prefix=3D/home/blc/.local --with-x-toolkit=3Dlucid --with-file-notification=3Dyes --with-x' Configured features: XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 Important settings: value of $LANG: en_IE.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: Python Minor modes in effect: eglot--managed-mode: t flymake-mode: t shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils markdown-mode color noutline outline cl-extra view vc-mtn vc-hg vc-git diff-mode easy-mmode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher eglot array filenotify jsonrpc ert pp ewoc debug backtrace help-mode find-func xref flymake-proc flymake thingatpt warnings compile text-property-search pcase project imenu python tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete parse-time iso8601 time-date ls-lisp format-spec comint ring ansi-color finder-inf tex-site debian-el edmacro kmacro rx w3m-load info package easymenu browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo x-toolkit x multi-tty make-network-process emacs) From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 14 06:16:00 2020 Received: (at 44629) by debbugs.gnu.org; 14 Nov 2020 11:16:00 +0000 Received: from localhost ([127.0.0.1]:49865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdtXE-0007Xn-4P for submit@debbugs.gnu.org; Sat, 14 Nov 2020 06:16:00 -0500 Received: from mail-wr1-f54.google.com ([209.85.221.54]:46084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdtXA-0007XW-If for 44629@debbugs.gnu.org; Sat, 14 Nov 2020 06:15:58 -0500 Received: by mail-wr1-f54.google.com with SMTP id d12so13128383wrr.13 for <44629@debbugs.gnu.org>; Sat, 14 Nov 2020 03:15:56 -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; bh=hF1mVhg6PyzH88DHQ85G57pMVbZNA1T+eackuMy7Eqc=; b=BRL7uQFBHBj4+L7RQBUcHHw/2Pm7sbvj2wBV75o0+IZmV0SOvNtaIu1/TMweh7ieWL MPpknKU9uL/38Df+8S3dIEgnZMEwKNjsMt9t+hQRRS/9MQu54Vz9KMwIQIbcJOSokyom F98fufCgQb5Y6yI6r71cASUeWyxmVDwxP9a0CGVPV5quBxpPZ4Ddq+W0jrqj6J56Dz/b 6o/WuU33zMj2pl2U/U04l10hsSZy7elcjTY2qVMvCJCWwRr0sj63dacOfM47lIB6Cstw hAuKFVUYUmnfNmOh672e974a/8+doNZ4z7EtowWSjMnpslY6MH+gWjO0gj11ok54dzPb jg9A== 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; bh=hF1mVhg6PyzH88DHQ85G57pMVbZNA1T+eackuMy7Eqc=; b=SVD1SqxO81vStzWgojR3nkpNwZpwW9/aReXW5l760/zFue+rD8X5kINrELsmOYlvRD GTq8Lbl/GqfeNAEj9Qn39l3AueEMUgtT2fS/xFc30p8Q4xvmOSJ876PA93Lnf0AgaxI/ D1Jw6Rf6AyToYZMtb0xO22GxsqMe8x8dVEkyOL7tPToWDlUXtkwoCr7RlBm3vBmh2bUo Pcdu4WsZ/vgIPWRdaRD/GA8xXkmRkj1ZL/uWOqnaMdibZy3JUNPLxGsn746eGmKkmxAG wofADEZa7NYkUo3v5tBwI5vxSXxxaZZ7RY/epqQCO4C3Td5SDjqZsvv3PuaEPEdaGdL/ FPLQ== X-Gm-Message-State: AOAM530+mpdEVr4kow3QnGdjfhDx7bIMhRLiK5nIiakb87R1BWJlti9p VZ8/HwWEaw6CPH1BSUC2lnosR9QMJMBDxg== X-Google-Smtp-Source: ABdhPJzDl22BzbXfE0o7liuB/J22jD/NB0rug1HkuLml7zIFSrGai2KtgJhZiYtt/aPHOG2aUO/7EA== X-Received: by 2002:a05:6000:1050:: with SMTP id c16mr9401227wrx.400.1605352550540; Sat, 14 Nov 2020 03:15:50 -0800 (PST) Received: from localhost ([2a02:8084:20e2:c380:fef1:a98a:87ca:e0e6]) by smtp.gmail.com with ESMTPSA id p12sm14462742wrw.28.2020.11.14.03.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Nov 2020 03:15:49 -0800 (PST) From: "Basil L. Contovounesios" To: 44629@debbugs.gnu.org Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only References: <875z68p5mr.fsf@tcd.ie> Date: Sat, 14 Nov 2020 11:15:48 +0000 In-Reply-To: <875z68p5mr.fsf@tcd.ie> (Basil L. Contovounesios's message of "Sat, 14 Nov 2020 10:58:04 +0000") Message-ID: <87v9e8i3yz.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Basil L. Contovounesios" writes: > The echo area is now taken over by the view-mode-enter message > "View mode: type C-h for help, h for commands, q to quit." > > This message also appears at various other stages of editing, but when > hovering over variables or flymake errors it seems to be the last one > standing in the echo area. > > This happens because eglot--format-markup calls gfm-view-mode, which in > turn enables read-only-mode, which in turn calls view-mode-enter. > > I can't disable this by setting view-read-only or > view-inhibit-help-message locally, since Eglot does its doc processing > in a different buffer. > > 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. ;) -- Basil From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 14 07:02:33 2020 Received: (at 44629) by debbugs.gnu.org; 14 Nov 2020 12:02:33 +0000 Received: from localhost ([127.0.0.1]:49913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kduGH-0000M8-KU for submit@debbugs.gnu.org; Sat, 14 Nov 2020 07:02:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kduGF-0000Lu-VK for 44629@debbugs.gnu.org; Sat, 14 Nov 2020 07:02:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53464) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kduGA-00069S-Bp; Sat, 14 Nov 2020 07:02:26 -0500 Received: from [176.228.60.248] (port=4847 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kduG4-0002kK-UD; Sat, 14 Nov 2020 07:02:25 -0500 Date: Sat, 14 Nov 2020 14:02:08 +0200 Message-Id: <838sb4w3i7.fsf@gnu.org> From: Eli Zaretskii To: "Basil L. Contovounesios" In-Reply-To: <87v9e8i3yz.fsf@tcd.ie> (contovob@tcd.ie) Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only References: <875z68p5mr.fsf@tcd.ie> <87v9e8i3yz.fsf@tcd.ie> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44629 Cc: joaotavora@gmail.com, 44629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Basil L. Contovounesios" > Date: Sat, 14 Nov 2020 11:15:48 +0000 > Cc: João Távora > > "Basil L. Contovounesios" 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? From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 14 07:26:39 2020 Received: (at 44629) by debbugs.gnu.org; 14 Nov 2020 12:26:39 +0000 Received: from localhost ([127.0.0.1]:49980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kduda-0000y1-SN for submit@debbugs.gnu.org; Sat, 14 Nov 2020 07:26:39 -0500 Received: from mail-wm1-f51.google.com ([209.85.128.51]:34969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdudY-0000xo-OA for 44629@debbugs.gnu.org; Sat, 14 Nov 2020 07:26:37 -0500 Received: by mail-wm1-f51.google.com with SMTP id w24so18346878wmi.0 for <44629@debbugs.gnu.org>; Sat, 14 Nov 2020 04:26:36 -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=alPV1KhhPWZw5MIJV4Lbh/w4EKW/W6YLfrzX8Xd76MU=; b=FmQ5CfzPo2/84SjkHm/U6X6fCEWloUHT1zdzZJmWure2aq6pc+0TWGrfsQUfyMq6ZS fe+GjKLcZD/MmUXgyHguawq4w9Ic/Mz6v6wJBdgUlZo1YUfhFWYaGrjOnEepUCXzYnZL F7/m35NLKbSRpeWQ6lsTB7V7PXyVc2x+XS7qc+xNOcQrUd2vtqI3BHpfm1af5eJHSkb6 0SWywkHVjSVpkxR8ikgHfRUIGgOWc2Ktg2b8yDJhQZej0qnIbS/e2z3NtrKZOeMxfoTP nGAj4ZC7gQn3oJCYWYQRbFGJITG+gHsOkR50ZTeCNBEFJlMsvGSCEOczuzY+kAxAEHYt xKag== 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=alPV1KhhPWZw5MIJV4Lbh/w4EKW/W6YLfrzX8Xd76MU=; b=NXFnst5ZLJYbse+OttePNGhyRLMwGcZuuhb0eP1mOLktEiH6Yu/Ar3NXSQYkOdole/ En/5GblH7b8qSUuee3S87hhPOW+u1EmyJhZw7D5hicy3SS0Smvjq8Z0fSMrgIb5qkstr nScbtr9DvtYbPUsq+HyrDBsWgwuDhkjMPySB0n9zoKaU76+4XvEzFr3kU9oZtzBYjJn8 ViX3fTSyI0a3njzebP/+7ytyOCXWUyV49nWj9xrZIlO3W6/d6mJM9LEgHNyLLSV1QWPW 44MTOpeODl4Y8XPU3nsRbLcbdHX6Ldqyd1xHzzMYUk1ciNXhyZJqsa/9CdztkGcKeOI1 og+w== X-Gm-Message-State: AOAM533csqriC1wWYa3yigGhFdB8uQD+ZCovC7/ch25V3LsFDqEYT8n9 zYVL79YpykifJIWwPLfGCRLXsw== X-Google-Smtp-Source: ABdhPJzGLNVL822R+BqYHw4xcYGOJIViOcbM+AVyex9ZdXtgMMJCj/g16xQyolQlrrtVGo6K2M3sJw== X-Received: by 2002:a1c:3803:: with SMTP id f3mr6661094wma.14.1605356790742; Sat, 14 Nov 2020 04:26:30 -0800 (PST) Received: from localhost ([2a02:8084:20e2:c380:fef1:a98a:87ca:e0e6]) by smtp.gmail.com with ESMTPSA id e5sm13381800wrs.84.2020.11.14.04.26.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Nov 2020 04:26:30 -0800 (PST) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only References: <875z68p5mr.fsf@tcd.ie> <87v9e8i3yz.fsf@tcd.ie> <838sb4w3i7.fsf@gnu.org> Date: Sat, 14 Nov 2020 12:26:28 +0000 In-Reply-To: <838sb4w3i7.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 14 Nov 2020 14:02:08 +0200") Message-ID: <87ft5cunt7.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: joaotavora@gmail.com, 44629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: "Basil L. Contovounesios" >> Date: Sat, 14 Nov 2020 11:15:48 +0000 >> Cc: Jo=C3=A3o T=C3=A1vora >>=20 >> "Basil L. Contovounesios" writes: >>=20 >> > Perhaps Eglot could/should bind view-inhibit-help-message around >> > gfm-view-mode? Any other ideas? >>=20 >> 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. --=20 Basil From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 14 08:48:05 2020 Received: (at 44629) by debbugs.gnu.org; 14 Nov 2020 13:48:05 +0000 Received: from localhost ([127.0.0.1]:50118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdvuP-00056U-CG for submit@debbugs.gnu.org; Sat, 14 Nov 2020 08:48:05 -0500 Received: from mail-wr1-f43.google.com ([209.85.221.43]:36518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdvuN-00055x-LQ for 44629@debbugs.gnu.org; Sat, 14 Nov 2020 08:48:04 -0500 Received: by mail-wr1-f43.google.com with SMTP id j7so13435974wrp.3 for <44629@debbugs.gnu.org>; Sat, 14 Nov 2020 05:48:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=3tyhiwsGDq7bHE6n1QlWrF7ql0IuhP6opSX+4/r5p6I=; b=R7FS7KlyioXVYDBJPhoULYqRaax8368FNYcCsgN28qPbf4P5XujuWTz2RZ8CzCx6kR nl349WrSukPf5ml1wlr/0lKsrUh28nbk9QPUH2EPVgMNCTf6Se9rcwLgafsU64Iy1oIn BjGi0hGwSqoTjdwfQizpQ46CiUnrcadmL2nmMizvhYa9p6xdpjfn/ssW8aqJtR88MX77 VDZQSFEh7R2ltfS9CPhINroaMUVEmn6CS5LBrVYvlpSNJYnqJJ7d7Q7/Qv3Vvoc/eOvQ peiGWETd0yoRWXCuHv5cEr6gEuY2sT8vlwLeAjz0kbvRkMCmCFRSMcy3FXlXWauK+aPg Hqiw== 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=3tyhiwsGDq7bHE6n1QlWrF7ql0IuhP6opSX+4/r5p6I=; b=kQYKEhU/irGb2PlPcvL8j1u3wcHOcowlSziimy3tEz1woa1vZCYFB8lemBzSPhIycI hModq7acvOKF9rurR8QwVmyeIVPF9vGoQCWtbSuoCIEKPksUpLCxgrwOyPzZRO1WVp43 izCHwSL5+r4nWiqxiO+/rx1mnocuWy/teP+ScujoieFieG33QBp8X26+4ki5C4LdMMBo H/h13DZ4g0Odje6xgLEdHaUXLTIfwn5SjLwH6LjMggUjLALPuPa/pLbEmscR5FMHQKMU aYlnNe6mwRhICuqvcyfjW4MDAz9gwNkT0LUzxkfsVC/uE71oNNPB6syotuVcJf+Y2xnw STwA== X-Gm-Message-State: AOAM530dgjJ7EHUF8r9S9NkiZumgSqJdfJaw3cV1hAPrkxtTmYaY2fjQ 1HrJM5EEPrG/C5VLK+qvsrrNSqFYvPo= X-Google-Smtp-Source: ABdhPJz32G28W08V6gauqs2vqbVu89mR7VUnf9BJMqU1ArjBoSn/3GZxO23SOTi/MPH2BgCPMuLGtg== X-Received: by 2002:adf:f146:: with SMTP id y6mr9693603wro.298.1605361677536; Sat, 14 Nov 2020 05:47:57 -0800 (PST) Received: from krug ([89.180.145.0]) by smtp.gmail.com with ESMTPSA id w15sm15400967wrp.52.2020.11.14.05.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Nov 2020 05:47:56 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: "Basil L. Contovounesios" Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only References: <875z68p5mr.fsf@tcd.ie> Date: Sat, 14 Nov 2020 13:47:55 +0000 In-Reply-To: <875z68p5mr.fsf@tcd.ie> (Basil L. Contovounesios's message of "Sat, 14 Nov 2020 10:58:04 +0000") Message-ID: <87wnyokq2c.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: 44629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Basil L. Contovounesios" writes: > X-Debbugs-Cc: "Jo=C3=A3o T=C3=A1vora" > Severity: minor Hi Basil, and thanks for X-Debbugs-CC'ing me in this message. This is indeed the way I hope to handle Eglot bugs in the future: via email and the Emacs bug tracker. > Perhaps Eglot could/should bind view-inhibit-help-message around > gfm-view-mode? Any other ideas? I'd have no problem with that, but as you've noted, it doesn't work when other modes also use `read-only-mode`. I think this is more of an Emacs echo-area congestion problem than an Eglot one. view-read-only seems a bit akward, I'd say, but it's been around such a long time that I won't argue for changing it. 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: ... Do not call this from a Lisp program unless you really intend to do the same thing as the C-x C-q command, including possibly enabling or disabling View mode.=20 ... I wasn't aware of caveat until just now. 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 fact, the docstring of called-interactively-p seems to indicate its main use is to cover these use cases. ... The only known proper use of `interactive' for KIND is in deciding whether to display a helpful message, or how to display it. ... 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 (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 comma= nds, \\[View-quit] to quit."))))) Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 14 09:47:00 2020 Received: (at 44629) by debbugs.gnu.org; 14 Nov 2020 14:47:00 +0000 Received: from localhost ([127.0.0.1]:50206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdwpP-00089Q-Tk for submit@debbugs.gnu.org; Sat, 14 Nov 2020 09:47:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdwpO-00084Q-Js for 44629@debbugs.gnu.org; Sat, 14 Nov 2020 09:46:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55384) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdwpI-0004vB-Ae; Sat, 14 Nov 2020 09:46:52 -0500 Received: from [176.228.60.248] (port=3136 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kdwpH-00065r-M4; Sat, 14 Nov 2020 09:46:52 -0500 Date: Sat, 14 Nov 2020 16:46:40 +0200 Message-Id: <83lff4uhbj.fsf@gnu.org> From: Eli Zaretskii To: "Basil L. Contovounesios" In-Reply-To: <87ft5cunt7.fsf@tcd.ie> (contovob@tcd.ie) Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only References: <875z68p5mr.fsf@tcd.ie> <87v9e8i3yz.fsf@tcd.ie> <838sb4w3i7.fsf@gnu.org> <87ft5cunt7.fsf@tcd.ie> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44629 Cc: joaotavora@gmail.com, 44629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Basil L. Contovounesios" > Cc: 44629@debbugs.gnu.org, joaotavora@gmail.com > Date: Sat, 14 Nov 2020 12:26:28 +0000 > > 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; Bind inhibit-message to non-nil around the calls to these? From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 14 10:13:43 2020 Received: (at 44629) by debbugs.gnu.org; 14 Nov 2020 15:13:43 +0000 Received: from localhost ([127.0.0.1]:51497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdxFH-0001Bj-KM for submit@debbugs.gnu.org; Sat, 14 Nov 2020 10:13:43 -0500 Received: from mail-il1-f182.google.com ([209.85.166.182]:34892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdxFF-0001BV-Hy for 44629@debbugs.gnu.org; Sat, 14 Nov 2020 10:13:42 -0500 Received: by mail-il1-f182.google.com with SMTP id t13so11191321ilp.2 for <44629@debbugs.gnu.org>; Sat, 14 Nov 2020 07:13:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fZ8BMABLaRTH4BWp5dxZtlz0UjOfsSd5itbdFMxcHA8=; b=Deo5Lm+BFqY8J+iMsXJ0xABS/e3F0b2taHufGfSKdb22GD79fX5LSeP01rneGwm7ry kwHlsuhjCxWDHqww0qm7UQAj1WeQq1Y+YsR6jYKFRyJJohzEaIm2VMGrwTh68984G4an RpYiuB+TLR660wOFbynu3uwCaG6IXmmZ3zTRPuWS9uIBG5O30cEfS5OqPx2GEtw/GFBd /ind1ch6ib4fO8jrZIGi5hGAgDWdpF326ypNaYAroieD+sFDGElKirfZDnGhVRflPH2+ ws4cIiYkwm+Kx5Bu6HwxFPArOkWXw8yIFVhmHV50RaZkBdYZbJ8yNTvqaSfT0mpayNzH Ty6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fZ8BMABLaRTH4BWp5dxZtlz0UjOfsSd5itbdFMxcHA8=; b=PrEa+n8jhKkkYGPNg/TFmk2xfl394d16sFC9zk28qgLJ9pYAiEBx18n5Di1w2lBpge ghXFzSC8MTBoQZNxGdH8ztAGf8x6j3C9alwSRZ5MFBlUVnQgXnAqYUyVjIZmlmA8nQeW CzmZFzYgDEO7JTzmSZKmRhtRqif+K7+temxX/2xZ6cUThBnCGt5nULWc2xR+/mChwr28 PG1JPDDQmJAIl3+ZATqk/4QZN/biIU9KwOecrhJsPekyfEOfQ7xbrlfI1QpqMRb26taz XQj1RfsVIp2jq5XAJbvKnIh1UZW6XJIo6iX2vEeeWua/YSKSHcBuTMterqipnjLgtUCT MdxA== X-Gm-Message-State: AOAM530Pzox773C9yoHhz8O43cCBqo+GuYFv9hOnS93JMnprpYphal1v T3q1N/4eQSlpbc6ku2+FDbIDYfdFDM8PNxp+Nn4= X-Google-Smtp-Source: ABdhPJz9HTJhVnvw3tsXEWmiVsJ9XoRXUm8RN52wNUT0z1d8q+d6ubvQuaepdyMhNjKG7+sJINg7CwBCv+Y0Dy1v91c= X-Received: by 2002:a05:6e02:120f:: with SMTP id a15mr3026769ilq.97.1605366816019; Sat, 14 Nov 2020 07:13:36 -0800 (PST) MIME-Version: 1.0 References: <875z68p5mr.fsf@tcd.ie> <87v9e8i3yz.fsf@tcd.ie> <838sb4w3i7.fsf@gnu.org> <87ft5cunt7.fsf@tcd.ie> <83lff4uhbj.fsf@gnu.org> In-Reply-To: <83lff4uhbj.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Sat, 14 Nov 2020 15:13:24 +0000 Message-ID: Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000cd9bcb05b4129637" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: "Basil L. Contovounesios" , 44629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000cd9bcb05b4129637 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Maybe, for gfm-view-mode, but in general I think I should just stop using read-only-mode, and set buffer-read-only instead. Jo=C3=A3o On Sat, Nov 14, 2020 at 2:46 PM Eli Zaretskii wrote: > > From: "Basil L. Contovounesios" > > Cc: 44629@debbugs.gnu.org, joaotavora@gmail.com > > Date: Sat, 14 Nov 2020 12:26:28 +0000 > > > > 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; > > Bind inhibit-message to non-nil around the calls to these? > --=20 Jo=C3=A3o T=C3=A1vora --000000000000cd9bcb05b4129637 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Maybe, for gfm-view-mode, but in general I think I sh= ould just stop
using read-only-mode, and set buffer-read-only ins= tead.

Jo=C3=A3o

On Sat, Nov 14, 2020 at 2= :46 PM Eli Zaretskii <eliz@gnu.org&g= t; wrote:
> F= rom: "Basil L. Contovounesios" <contovob@tcd.ie>
> Cc: 44629@d= ebbugs.gnu.org,=C2=A0 joaotavora@gmail.com
> Date: Sat, 14 Nov 2020 12:26:28 +0000
>
> The only clean approaches off the top of my head are:
>
> a) inhibit these messages in one way or another around calls to
>=C2=A0 =C2=A0 gfm-view-mode/read-only-mode in eglot/jsonrpc;

Bind inhibit-message to non-nil around the calls to these?


--
Jo=C3=A3o T=C3=A1vora
--000000000000cd9bcb05b4129637-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 14 12:14:03 2020 Received: (at 44629) by debbugs.gnu.org; 14 Nov 2020 17:14:03 +0000 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 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 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) 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) From: "Basil L. Contovounesios" To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only References: <875z68p5mr.fsf@tcd.ie> <87wnyokq2c.fsf@gmail.com> Date: Sat, 14 Nov 2020 17:13:53 +0000 In-Reply-To: <87wnyokq2c.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Sat, 14 Nov 2020 13:47:55 +0000") Message-ID: <871rgvj1ym.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: 44629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 15 04:55:50 2020 Received: (at 44629) by debbugs.gnu.org; 15 Nov 2020 09:55:50 +0000 Received: from localhost ([127.0.0.1]:52492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keElB-0003hv-Qf for submit@debbugs.gnu.org; Sun, 15 Nov 2020 04:55:50 -0500 Received: from mail-wr1-f51.google.com ([209.85.221.51]:41543) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keElA-0003hi-Mi for 44629@debbugs.gnu.org; Sun, 15 Nov 2020 04:55:49 -0500 Received: by mail-wr1-f51.google.com with SMTP id 23so15373670wrc.8 for <44629@debbugs.gnu.org>; Sun, 15 Nov 2020 01:55:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=cupPibu+xkvyKse2dzBbFA7nSR5317c0/t8WrmVRmo4=; b=tRSbZVZ4Rrjh+WaiuGWnep3vubCLr1Q3OD2XpruQUM9JnsfkMB9AocCWSOmWh2TdVc 0rHcwGi8s7ULQ33aQUf93GiY0Pr8TNuEXSe2+aeZDGRNujovA/RcyUV7Vqaq6nTCEHie NqHTycotLFfRijRcOhDtbL9ysBeRuV4d68UCg+TzMCn8jVC7QLnS0kTxKWXE90ydWMxo WVr0KIY4qf90M2DNQkIFTj+hQhiDBUDP5NTMYFFhD7zutlLGg2ZnyM38PlyYrjobkDJM Cf95/EhQjqy8bxoeqU2mM1WDWDyXss6fj2OaS4JFvikl4Pl/LWJfKZvXIUtrryj535HX +H1w== 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=cupPibu+xkvyKse2dzBbFA7nSR5317c0/t8WrmVRmo4=; b=oN41pM6ccnNUMVbETVdVniOpCffvLrqx+SazGymYfLZdyzdf2js0zKoZinHLSq4BHb 9reEgCsvK4kRtzTDOUt7jF8Xzip8QeQu21MLH8SuZVid7EBZ7zdHnKG1tuWhFNWQR+mD QAMF495sBa5/Cy8nA1P6y/xSgw8sgstnlHt7DexEo/u1AF5ZSAS5Jp/2pB6kUaagyZi7 seWJ9VmR/4x04AyipKjhh02eRxJRekZgSHbxuO0B0PlBAboRdas1Rfr4YzvBEW8LF8Hq qD7R+Ry88HGiw0+UOtPQSOjdW74IgQVQDxGo34focd4+eVLaPOUz4VcA8FWi/tv7Obq8 KnPQ== X-Gm-Message-State: AOAM532vH0bLVcofflaB7xMbmvy3G/TT0f2x2By5G5aAPojtXIQ426hY oHP02Wc5Bea4K/Fy2PuXY69CBXK3e/c= X-Google-Smtp-Source: ABdhPJyAoHDMKqFnA/ZIO3KfEHG+3w6pbTXy5sNGZ9odGQcsHXZ6BvCiVxeHTsDj3LnLUPykd3dg0A== X-Received: by 2002:a05:6000:1:: with SMTP id h1mr13245272wrx.127.1605434142403; Sun, 15 Nov 2020 01:55:42 -0800 (PST) Received: from krug ([89.180.145.127]) by smtp.gmail.com with ESMTPSA id 36sm1499045wrf.94.2020.11.15.01.55.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Nov 2020 01:55:41 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: "Basil L. Contovounesios" Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only References: <875z68p5mr.fsf@tcd.ie> <87wnyokq2c.fsf@gmail.com> <871rgvj1ym.fsf@tcd.ie> Date: Sun, 15 Nov 2020 09:55:39 +0000 In-Reply-To: <871rgvj1ym.fsf@tcd.ie> (Basil L. Contovounesios's message of "Sat, 14 Nov 2020 17:13:53 +0000") Message-ID: <87blfzkkpw.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: 44629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Basil L. Contovounesios" writes: > 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 co= mmands, \\[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. You're of course right. This is for the immediately "containing function", not for the "current stack". But 'this-command' could do the trick; diff --git a/lisp/view.el b/lisp/view.el index 204e28c2a2..2a0fc85cb8 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 this-command)) (message "%s" (substitute-command-keys "\ View mode: type \\[help-command] for help, \\[describe-mode] for comm= ands, \\[View-quit] to quit."))))) When I have this, and view-read-only set to t, C-x C-f'ing to /etc/fstab gets me the message but this: (run-with-timer 1 nil (lambda () (find-file "/etc/fstab"))) does not. Anyway, feel free to beat me to the patches to jsonrpc.el and Eglot (the former you can do directly on the tree, the latter can be done via GitHub, or just send me the patch here). Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 15 15:29:02 2020 Received: (at 44629) by debbugs.gnu.org; 15 Nov 2020 20:29:02 +0000 Received: from localhost ([127.0.0.1]:54254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keOdy-0004jb-4e for submit@debbugs.gnu.org; Sun, 15 Nov 2020 15:29:02 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:61189) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keOdv-0004iv-26 for 44629@debbugs.gnu.org; Sun, 15 Nov 2020 15:28:59 -0500 X-Originating-IP: 91.129.97.46 Received: from mail.gandi.net (m91-129-97-46.cust.tele2.ee [91.129.97.46]) (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 42B10240002; Sun, 15 Nov 2020 20:28:50 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only Organization: LINKOV.NET References: <875z68p5mr.fsf@tcd.ie> <87v9e8i3yz.fsf@tcd.ie> <838sb4w3i7.fsf@gnu.org> Date: Sun, 15 Nov 2020 22:27:21 +0200 In-Reply-To: <838sb4w3i7.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 14 Nov 2020 14:02:08 +0200") Message-ID: <87zh3ifjrq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: "Basil L. Contovounesios" , joaotavora@gmail.com, 44629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > 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) From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 15 16:52:35 2020 Received: (at 44629) by debbugs.gnu.org; 15 Nov 2020 21:52:35 +0000 Received: from localhost ([127.0.0.1]:54427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kePwp-0006yH-0C for submit@debbugs.gnu.org; Sun, 15 Nov 2020 16:52:35 -0500 Received: from mail-wm1-f51.google.com ([209.85.128.51]:54876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kePwm-0006y1-ML for 44629@debbugs.gnu.org; Sun, 15 Nov 2020 16:52:33 -0500 Received: by mail-wm1-f51.google.com with SMTP id d142so22091209wmd.4 for <44629@debbugs.gnu.org>; Sun, 15 Nov 2020 13:52:32 -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; bh=7oep/EZCoMS4hYsazQwHt0SPgOzjK2tJeLrq+Qg3nI4=; b=FCkS/XPalfg25q3NEdNfYp3Pjqm2x4urWiQ4gs3gtmM2H/cwsXINda4Bkc4YVSoSXu Ag2fpl4Wb/n+OvBrMlL3iij0d4UnH4vIv/QQfeUizI+oPyTej0xE7wOtPgeneuiUBdwB O2SW1VVa5KZkYW4rZnulLASqCu2u0Rs9kZwsI1Dvc9TtcMTWLh/CjUQepMdtLkXDzrRW bS/03zf8DVnX1GrMDIW9Z6tLtYFwKvQtWLNz6e683BSsGRPDeOKASCa+IP3UH5mtEtu+ xzo8FGd81+X/r++3wtIKbBsDwN3JMo5OL3MP7dcUimY5Et5G3cUOiVocuXaPk19FOm/k AYTQ== 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; bh=7oep/EZCoMS4hYsazQwHt0SPgOzjK2tJeLrq+Qg3nI4=; b=gvyXsGICyPropO6UiGhLcV62KiAUKiJO1liYmXWlpL4t7VvUcBVtT+0yaFQmRKDmQu u6W4HcKQCqQxs6qjXNaV0UNJZqUUfI6QelH7DQDRFWh80DsgRGs/eX63BRJOBjqofOJn TRkZwuZ6pDX1aAYW9+km6/n0+JiibmmzJ1RfljkHOyKtkvldAptVC0cuAzYCWGYQfDCM WkqKvr74BFVspyGAF2xJJWgrDFStrgdpX+ep0B9ubN4s5v3GVFr2k3mYXt3/64R0jMFm rg5AGoOe2pditNfNP7y0OVKsoj1lGnNGShLk23dHHGYY2ZTzmboCBE54c6Vl/2ok5sC7 2+mQ== X-Gm-Message-State: AOAM533grrmekKARITNLomS1SZkHxtGQID4TXKr9WknXtBJuPmjdP6RM fMQ9gFfQQuDnFWnH74y9Fm0Uxg== X-Google-Smtp-Source: ABdhPJy6GVbtzlYZ6mHCakmaEfAT0vN4GpSZ0qzmz0sIlTRfVurxSKYsFeLWqtonYl+uhUT3Xz7zlg== X-Received: by 2002:a1c:2d47:: with SMTP id t68mr12578053wmt.148.1605477146724; Sun, 15 Nov 2020 13:52:26 -0800 (PST) Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id w11sm18110038wmg.36.2020.11.15.13.52.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Nov 2020 13:52:26 -0800 (PST) From: "Basil L. Contovounesios" To: Juri Linkov Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only References: <875z68p5mr.fsf@tcd.ie> <87v9e8i3yz.fsf@tcd.ie> <838sb4w3i7.fsf@gnu.org> <87zh3ifjrq.fsf@mail.linkov.net> Date: Sun, 15 Nov 2020 21:52:24 +0000 In-Reply-To: <87zh3ifjrq.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 15 Nov 2020 22:27:21 +0200") Message-ID: <87tutqi8yv.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: Eli Zaretskii , joaotavora@gmail.com, 44629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 15 18:14:38 2020 Received: (at 44629) by debbugs.gnu.org; 15 Nov 2020 23:14:38 +0000 Received: from localhost ([127.0.0.1]:54547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keRED-0002hs-UN for submit@debbugs.gnu.org; Sun, 15 Nov 2020 18:14:38 -0500 Received: from mail-il1-f181.google.com ([209.85.166.181]:35470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keREB-0002he-Me for 44629@debbugs.gnu.org; Sun, 15 Nov 2020 18:14:36 -0500 Received: by mail-il1-f181.google.com with SMTP id t13so13479853ilp.2 for <44629@debbugs.gnu.org>; Sun, 15 Nov 2020 15:14:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=J4008AVUbaiVoNveJ4mc6FIjGAU4P4WuL9rAu6bMSkA=; b=BcLID8bNsAbCedcI4SuP9if3Ke4xm2J6wO44sWYtyJpyCAYBTmfPhFoZZuyYYTyQli mPoK5eLmM3ATY85oWXwknSLeWUmpsCAopTXz2GKe/3jhsYTeCkUF7Svs3iXFJ26lJe+u YLUNLjRxDb8HC99m02uuswYw+vEqlbONIj2x6SyMeln8qjjQX8ZS+egt+QeE0nxPWmML ICdl542AahZ6bJ10l5IoPbMFP2SB1tf90UCsB+9ZK3P6gps/py08Ft/8jfi+lgHMtbSP wdAv5H0pU8p9hFoRVsA6/3JX82AGZMCKRUPumKkxo9ASlpKpupvfDSAHRXfYmAfKWYT3 WpPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=J4008AVUbaiVoNveJ4mc6FIjGAU4P4WuL9rAu6bMSkA=; b=D7gB2Ybv2okTsyMQ7uIPI53sFzdeD+Nf5mzN64HSdGMFHE3wNshSdPTlCHBV+8rGTM rH8V5DANFii5s2IggTIekMIXZpmCl+yghWoCQjdadk3DtMjVuK9ENEzm/8Gg7ebtvt3m K1WcyUf8jC79Y/HiuQxygIcoOt2arAVdT4Kf6w0tRAc0Nsg5T2B7n1JIFMwPYE50nnXi 8E4yKWBA/anUrKRW4Mj0+0L8ml4a4woVPQSCWwI++s0sCIbQP8n1/oKXOW8Wbnet2Nyy F5Zac4aYmf+KyVtNfjxIZL4l5SsV3EBn/GFmuhX+Amxhnxcy8jTzt76tWShBcu8isrJL jWtg== X-Gm-Message-State: AOAM5312W2x2FQesN1odCoBaWULPbAszwsVyppYnFVObcMZ++wFWocDT Q5Yc8NydGppZMW8RXBGGSVUHol11e8cJbX03SqE= X-Google-Smtp-Source: ABdhPJxRrL3iHKJecVt04FQ8rlGR2zSxHN4OGzokBrbVu1P/Ogk8V1IPPdVZ2WTUM7523fcGc9uMAVebTRQZ+x+fuIw= X-Received: by 2002:a92:2c06:: with SMTP id t6mr6338172ile.125.1605482070261; Sun, 15 Nov 2020 15:14:30 -0800 (PST) MIME-Version: 1.0 References: <875z68p5mr.fsf@tcd.ie> <87v9e8i3yz.fsf@tcd.ie> <838sb4w3i7.fsf@gnu.org> <87zh3ifjrq.fsf@mail.linkov.net> <87tutqi8yv.fsf@tcd.ie> In-Reply-To: <87tutqi8yv.fsf@tcd.ie> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Sun, 15 Nov 2020 23:14:19 +0000 Message-ID: Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only To: "Basil L. Contovounesios" Content-Type: multipart/alternative; boundary="0000000000007dc51205b42d6c92" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: Eli Zaretskii , 44629@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000007dc51205b42d6c92 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Nov 15, 2020 at 9:52 PM Basil L. Contovounesios 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 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. Jo=C3=A3o --0000000000007dc51205b42d6c92 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Nov 15, 2020 at 9:52 PM Basil L. Contovounesios &l= t;contovob@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 bac= kground processing.

Exactly.=C2=A0 Or any type of = background processing, for that matter.=C2=A0
So, if this is= a principle, the check for `this-command`, as I proposed
it in a= patch,should suffice

This doesn't change the = fact that jsonrpc.el's use of `read-only-mode`
should pr= obably be replaced by a simple setting of buffer-read-only,
but i= t could avoid the change to eglot when it calls `gfm-view-mode`.
= Though maybe that change could be there, too.

= Jo=C3=A3o
--0000000000007dc51205b42d6c92-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 16 04:37:28 2020 Received: (at 44629) by debbugs.gnu.org; 16 Nov 2020 09:37:28 +0000 Received: from localhost ([127.0.0.1]:55106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keawy-0001wG-Cq for submit@debbugs.gnu.org; Mon, 16 Nov 2020 04:37:28 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:33711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keawv-0001vq-An for 44629@debbugs.gnu.org; Mon, 16 Nov 2020 04:37:27 -0500 X-Originating-IP: 91.129.97.46 Received: from mail.gandi.net (m91-129-97-46.cust.tele2.ee [91.129.97.46]) (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id CC50E1C000D; Mon, 16 Nov 2020 09:37:17 +0000 (UTC) From: Juri Linkov To: "Basil L. Contovounesios" Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only Organization: LINKOV.NET References: <875z68p5mr.fsf@tcd.ie> <87v9e8i3yz.fsf@tcd.ie> <838sb4w3i7.fsf@gnu.org> <87zh3ifjrq.fsf@mail.linkov.net> <87tutqi8yv.fsf@tcd.ie> Date: Mon, 16 Nov 2020 11:14:56 +0200 In-Reply-To: <87tutqi8yv.fsf@tcd.ie> (Basil L. Contovounesios's message of "Sun, 15 Nov 2020 21:52:24 +0000") Message-ID: <87ft59fyc7.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: Eli Zaretskii , joaotavora@gmail.com, 44629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Inhibiting messages selectively was discussed in bug#42865 >> >> (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 agree - the primary intention was to use this for user customization in bug#42865. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 17 15:16:05 2020 Received: (at 44629) by debbugs.gnu.org; 17 Nov 2020 20:16:05 +0000 Received: from localhost ([127.0.0.1]:33023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf7OX-00053E-8U for submit@debbugs.gnu.org; Tue, 17 Nov 2020 15:16:05 -0500 Received: from mail-wr1-f42.google.com ([209.85.221.42]:41424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf7OV-00052c-6G for 44629@debbugs.gnu.org; Tue, 17 Nov 2020 15:16:04 -0500 Received: by mail-wr1-f42.google.com with SMTP id 23so24616409wrc.8 for <44629@debbugs.gnu.org>; Tue, 17 Nov 2020 12:16:03 -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; bh=BCDNgUfS/qLzOGUaFRbl0RmGhbHn/9E8hHkfW0I9ClU=; b=RzBSh9u/KlHrExZoYID6a46LFlh1T/+tKK7moKLXONgcVx7BqINxos+yNjb9+N88da 0x4I12rZU2q7lccPd8KBBQeoICDpt5GnyNo2m8MY+rAuaQgBhQlNQumqpmQ8m5GtyZ1n hm42L8KJquSAAW7Ty+euYRp4hS5jxYKx2cfbzp4xiP0aO1Px49u1CFzwjxJp1xVZd/JU kIbkU/dcIr28/pd0pLm43WtChVT6iwCGUd5op5UG5H8bYnB1cwOEsuMU0nNUd90qXQ9U PvbPaR3VT89tOwqpL2MWMbMvHhpBOFhwVIwMzPcx1uQfcj62225mtka79Ezf6KEzNZwH dBBw== 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; bh=BCDNgUfS/qLzOGUaFRbl0RmGhbHn/9E8hHkfW0I9ClU=; b=QsH28/i+4kqXDcQ1+I6nTE18m2eDX/anC95Ftgd+PSyUUSzYT+aq1FMVT5yZfUeQAG yRz45HGItMRyHc961qn9vh/IVBsVJuJkmWty1KuScFglvTUrybkQcxySv/LCZL7g7ECY a2rlgAL2flWNirVzQzimSrqAYzae28GJrAP4f12RZzr6aztmxKD14tp2FEilKR2pv2An l13D4BemshnpZYq/jkaQiB4a958bzqPtJC2XYT48LpHI8nyuh+oZ0LkIJ040Nam54W+C JHpBXvWk7i4paSyQjHl36Twxy/PNIT3jilrUjPL7rKm1u0Tf1EBnZ4TyvqM4lASQ7bN6 4xdg== X-Gm-Message-State: AOAM533ZOZPeJmnD/3c1GNPrF0U7ywqmZGETaaeyfmUg9wutdAJL3GUD QLlwQWL4QK20W6jeD0uYAPvTDg== X-Google-Smtp-Source: ABdhPJz7ewALLX6mBWPtkaA2uyBGWNiqW9fFHegDVuthdZTGjQTZgGguyAMs7iQUzy57DcPEJGhOAw== X-Received: by 2002:adf:e5cb:: with SMTP id a11mr1261792wrn.15.1605644157293; Tue, 17 Nov 2020 12:15:57 -0800 (PST) Received: from localhost ([2a02:8084:20e2:c380:92bd:1bfd:38fc:fae2]) by smtp.gmail.com with ESMTPSA id l24sm5261089wmi.7.2020.11.17.12.15.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 12:15:56 -0800 (PST) From: "Basil L. Contovounesios" To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only References: <875z68p5mr.fsf@tcd.ie> <87v9e8i3yz.fsf@tcd.ie> <838sb4w3i7.fsf@gnu.org> <87zh3ifjrq.fsf@mail.linkov.net> <87tutqi8yv.fsf@tcd.ie> Date: Tue, 17 Nov 2020 20:15:54 +0000 In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Sun, 15 Nov 2020 23:14:19 +0000") Message-ID: <87pn4b68p1.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: Eli Zaretskii , 44629@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable tags 44629 + patch quit Jo=C3=A3o T=C3=A1vora writes: > On Sun, Nov 15, 2020 at 9:52 PM Basil L. Contovounesios = 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.=20=20 > 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`=20 > 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, --=20 Basil --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0001-Avoid-spamming-view-mode-enter-help-message.patch Content-Transfer-Encoding: quoted-printable >From ea8079ee38f752c412d700a7675d8937466c2b14 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Mon, 16 Nov 2020 14:40:57 +0000 Subject: [PATCH] Avoid spamming view-mode-enter help message MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit By default, entering view-mode echoes a usage message. This is particularly helpful with non-nil view-read-only, to notify the user that view-mode has been enabled. It is less useful and more spammy, however, if view-mode is (possibly inadvertently) entered from some non-interactive code running in the background, such as when a major mode is enabled in a temporary buffer for text formatting purposes (bug#44629). * lisp/jsonrpc.el (jsonrpc-events-buffer, initialize-instance): Use buffer-read-only in place of read-only-mode for non-interactive use. * lisp/view.el (view-mode-enter): Inhibit help message if either view-inhibit-help-message is non-nil, or view-mode-enter was called from an interactive command. Suggested by Jo=C3=A3o T=C3=A1vora . --- lisp/jsonrpc.el | 27 +++++++++++++-------------- lisp/view.el | 9 +++++++-- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el index 7de6baeb00..e1b832c407 100644 --- a/lisp/jsonrpc.el +++ b/lisp/jsonrpc.el @@ -138,18 +138,15 @@ jsonrpc-lambda =20 (defun jsonrpc-events-buffer (connection) "Get or create JSONRPC events buffer for CONNECTION." - (let* ((probe (jsonrpc--events-buffer connection)) - (buffer (or (and (buffer-live-p probe) - probe) - (let ((buffer (get-buffer-create - (format "*%s events*" - (jsonrpc-name connection))))) - (with-current-buffer buffer - (buffer-disable-undo) - (read-only-mode t) - (setf (jsonrpc--events-buffer connection) buffer)) - buffer)))) - buffer)) + (let ((probe (jsonrpc--events-buffer connection))) + (if (buffer-live-p probe) + probe + (with-current-buffer + (get-buffer-create (format "*%s events*" (jsonrpc-name connectio= n))) + (buffer-disable-undo) + (setq buffer-read-only t) + (setf (jsonrpc--events-buffer connection) + (current-buffer)))))) =20 (defun jsonrpc-forget-pending-continuations (connection) "Stop waiting for responses from the current JSONRPC CONNECTION." @@ -404,7 +401,7 @@ initialize-instance (ignore-errors (kill-buffer hidden-name)) (rename-buffer hidden-name) (process-put proc 'jsonrpc-stderr (current-buffer)) - (read-only-mode t)))) + (setq buffer-read-only t)))) (setf (jsonrpc--process conn) proc) (set-process-buffer proc (get-buffer-create (format " *%s output*" nam= e))) (set-process-filter proc #'jsonrpc--process-filter) @@ -412,7 +409,9 @@ initialize-instance (with-current-buffer (process-buffer proc) (buffer-disable-undo) (set-marker (process-mark proc) (point-min)) - (let ((inhibit-read-only t)) (erase-buffer) (read-only-mode t))) + (let ((inhibit-read-only t)) + (erase-buffer)) + (setq buffer-read-only t)) (process-put proc 'jsonrpc-connection conn))) =20 (cl-defmethod jsonrpc-connection-send ((connection jsonrpc-process-connect= ion) diff --git a/lisp/view.el b/lisp/view.el index 204e28c2a2..6f576f8c04 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -88,7 +88,9 @@ view-exits-all-viewing-windows :group 'view) =20 (defcustom view-inhibit-help-message nil - "Non-nil inhibits the help message shown upon entering View mode." + "Non-nil inhibits the help message shown upon entering View mode. +This setting takes effect only when View mode is entered via an +interactive command; otherwise the help message is not shown." :type 'boolean :group 'view :version "22.1") @@ -559,7 +561,10 @@ view-mode-enter =20 (unless view-mode (view-mode 1) - (unless view-inhibit-help-message + (when (and (not view-inhibit-help-message) + ;; Avoid spamming the echo area if `view-mode' is entered + ;; non-interactively, e.g., in a temporary buffer (bug#4462= 9). + this-command) (message "%s" (substitute-command-keys "\ View mode: type \\[help-command] for help, \\[describe-mode] for commands,= \\[View-quit] to quit."))))) --=20 2.29.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 17 15:21:58 2020 Received: (at 44629) by debbugs.gnu.org; 17 Nov 2020 20:21:58 +0000 Received: from localhost ([127.0.0.1]:33043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf7UE-0005Cz-AU for submit@debbugs.gnu.org; Tue, 17 Nov 2020 15:21:58 -0500 Received: from mail-wm1-f50.google.com ([209.85.128.50]:33928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf7U9-0005CX-8k for 44629@debbugs.gnu.org; Tue, 17 Nov 2020 15:21:54 -0500 Received: by mail-wm1-f50.google.com with SMTP id 23so2762710wmg.1 for <44629@debbugs.gnu.org>; Tue, 17 Nov 2020 12:21:53 -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; bh=LCZKcTgWlsogkpfbAPddDMgjTAJEKT9CpKfIoJBlvs8=; b=iSyKOrFXQ9BazAnyPJgmndRcos4IOHeXB3qUjaD57lmIxJJx7Je6ipi0DV3Fn+rE9+ tpM1htNfFgYpSIErnLv/mfCdDQwoPKz3S5Ylzreo1IgUaxurFXA4oSTwkOyfhg2KqP3k Jicv6OTUZbJxmbRJvx9VIQVU8w23fOUYV3rkLinrE0pB7XvIa0oxb5E5uQfvw6LaFrAF N0w65KBZUcVAgTqn0eCMHSsNnuoBHHiIWFKZ+SkCZvqdRxFSXii+d1wrkZL1NvoGC77A /wtZX6eNAd7bzV3dScd+IMLhkx/E+2SdKlSKVuSHIyV6ke+rRqLCaAXR64itNnupcjB8 sKYQ== 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; bh=LCZKcTgWlsogkpfbAPddDMgjTAJEKT9CpKfIoJBlvs8=; b=afD/9mC7b6OzobNoORUypR8Cf/EY1Qxf7AwMUFIjCvYJuLWPZ+OPE51oEJ0sbd/BwX AF9TaT4ZBwLaZC08XSiLfdy9someK0Eq+AEYcE5aLFxk+YCeKnys1kkaJxYkfpWNw7MI 48e8AYE3p/7VShyVORtxt+8bG+/jfhR6hl5uQDN7PFWsAUXFrVehjTTd8r8ruARspEtj 1GGnxetj9ui2NsMVrJPwwvXOz6Gq7s2IgI4wQSbadsYE9mB21t0vTnkAcM7YFVIl7Bvp VJEb204sXeODgUWMrZjl1GPIDMPhI9L7DtDNCT10Z0hu2nxj8b2vytVbAi7NrkydPKvA tL5Q== X-Gm-Message-State: AOAM530LY8+kMr7zEu3izB/f2R13q28pc9Na+6AbYAiI6U0p2f9Gw7zd pPz5d9ED5cwihl0Wmcyz850fwg== X-Google-Smtp-Source: ABdhPJzTSYj4ivTXROWEZtRs8+3m+ZNnsU5nO2IwW5NkXtNQO5phpg8uPYoySpOF/xyc9hzG9Tf8aA== X-Received: by 2002:a1c:4d03:: with SMTP id o3mr870125wmh.150.1605644507406; Tue, 17 Nov 2020 12:21:47 -0800 (PST) Received: from localhost ([2a02:8084:20e2:c380:92bd:1bfd:38fc:fae2]) by smtp.gmail.com with ESMTPSA id u81sm6047279wmb.27.2020.11.17.12.21.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 12:21:46 -0800 (PST) From: "Basil L. Contovounesios" To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only References: <875z68p5mr.fsf@tcd.ie> <87v9e8i3yz.fsf@tcd.ie> <838sb4w3i7.fsf@gnu.org> <87zh3ifjrq.fsf@mail.linkov.net> <87tutqi8yv.fsf@tcd.ie> <87pn4b68p1.fsf@tcd.ie> Date: Tue, 17 Nov 2020 20:21:45 +0000 In-Reply-To: <87pn4b68p1.fsf@tcd.ie> (Basil L. Contovounesios's message of "Tue, 17 Nov 2020 20:15:54 +0000") Message-ID: <87k0uj68fa.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: Eli Zaretskii , 44629@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Basil L. Contovounesios" writes: > How's the attached patch for view.el and jsonrpc.el? I forgot to ask - if this goes in, does it need calling out in etc/NEWS? I wouldn't have thought so, but I'm not against it, either. -- Basil From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 17 17:56:02 2020 Received: (at 44629) by debbugs.gnu.org; 17 Nov 2020 22:56:02 +0000 Received: from localhost ([127.0.0.1]:33330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf9tJ-0004qB-Tk for submit@debbugs.gnu.org; Tue, 17 Nov 2020 17:56:02 -0500 Received: from mail-wm1-f53.google.com ([209.85.128.53]:54957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf9tH-0004po-MS for 44629@debbugs.gnu.org; Tue, 17 Nov 2020 17:56:01 -0500 Received: by mail-wm1-f53.google.com with SMTP id d142so396290wmd.4 for <44629@debbugs.gnu.org>; Tue, 17 Nov 2020 14:55:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=XL2o2VESXESstBrdleiTz9DraB2Nfl4rFgsSszNfGl0=; b=N59lZ9zBsF6o3Ed0wMKf9cQc3EThmgnAMvTuOpjLgRuv5cMRL7jUB8mq8IvNpz4oUV P/SwehemNxbuf9jubBWh5lDBz4fxVIycD8p7D6MYK1YQCU1tmzU/4YqVa9RaToCFH7H1 3sAQYHmYW0AV5IQdPesGefKgxh1hSqf5/wM+8v0sUAUP1tORR5ui85WYq/1iHkgdtW03 t0qrBBWaqJu3T6GRc5CrRlXEI0OGxGW2Q92AUvMg8IRW58X8yJs10DcaArDfrqMl52ZS dXAYVOzOdUcjvDqY3Kx+voY9G4/pGzx6Yg96n6lJZMBBwA8vddroINRZ/+YFJ6UJby0d m4KA== 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=XL2o2VESXESstBrdleiTz9DraB2Nfl4rFgsSszNfGl0=; b=RsoVWkjsIcNYBEaQTl/ih2HnAYSc7ZXisdPMJ4xWFsRabq36NyEXx9wYLyJ8DbXv0o 1xZAsJDYo5Jvm2EumpPu88jMPYxarnhCVJMCaZ6DRxzVH+b8CW9mL4txs3T0u5mQ6m2d cU/7WzZ8inKEQGMQjPD398uyr5mWIczOUMBzIV32fc4KqKAnuDv7c0H214OmVsc+aZPj vpvn1nb8bP7ROu45bkj94/9v1e6OOXN1rs262wc8UG0WtkEiDFhRZPNBX1okAglnh/kW XxMBBxTsvnr7j2MCN+yHkyMG6b3aNGPR8MnJgaE3pGUfeFKmPimy3MdxJs1/ruIPQGT/ 5VCg== X-Gm-Message-State: AOAM533Rxpfxv9FlAVf7LXsydNqwj9LdG8/AW7YJaQHbcxdtgAT4JkGS /6iL3uuayqBJ/PnEED7rmzHZJdu1jvY= X-Google-Smtp-Source: ABdhPJznaqGOnOfIiH5BPoarEiHKAOP1kWBfMDXP37q9u4POY0//7EArwFrHfd+COz74TJXdVyWdtg== X-Received: by 2002:a7b:c391:: with SMTP id s17mr1353387wmj.66.1605653753162; Tue, 17 Nov 2020 14:55:53 -0800 (PST) Received: from krug ([89.180.145.179]) by smtp.gmail.com with ESMTPSA id i6sm275847wma.42.2020.11.17.14.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 14:55:52 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: "Basil L. Contovounesios" Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only References: <875z68p5mr.fsf@tcd.ie> <87v9e8i3yz.fsf@tcd.ie> <838sb4w3i7.fsf@gnu.org> <87zh3ifjrq.fsf@mail.linkov.net> <87tutqi8yv.fsf@tcd.ie> <87pn4b68p1.fsf@tcd.ie> Date: Tue, 17 Nov 2020 22:55:50 +0000 In-Reply-To: <87pn4b68p1.fsf@tcd.ie> (Basil L. Contovounesios's message of "Tue, 17 Nov 2020 20:15:54 +0000") Message-ID: <87h7pnk2yx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: Eli Zaretskii , 44629@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Basil L. Contovounesios" writes: >> This doesn't change the fact that jsonrpc.el's use of `read-only-mode`=20 >> 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. They make sense. > How's the attached patch for view.el and jsonrpc.el? Looks good, and the mini-refactoring in jsonrpc.el is also welcome. IMO, this doesn't need to be called out in NEWS. But let's hear from Lars. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 28 16:27:57 2020 Received: (at 44629) by debbugs.gnu.org; 28 Nov 2020 21:27:57 +0000 Received: from localhost ([127.0.0.1]:49234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kj7l6-0004Q5-RX for submit@debbugs.gnu.org; Sat, 28 Nov 2020 16:27:57 -0500 Received: from mail-wm1-f49.google.com ([209.85.128.49]:39527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kj7l5-0004Ps-25 for 44629@debbugs.gnu.org; Sat, 28 Nov 2020 16:27:56 -0500 Received: by mail-wm1-f49.google.com with SMTP id 3so7614307wmg.4 for <44629@debbugs.gnu.org>; Sat, 28 Nov 2020 13:27:55 -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=vfTTuOfqJlZ6A54Cn17JoZWsSNsVersL2ah2vGTTdpA=; b=2UIX3He2mNl/aAI3JWcuJ8N/eLcxwhsj5LI7fotM+MXWhjvVoeZdeRZsOHw4Zswz2x KdJ2+3QmkjZ9brAshlapVETjeNdYefYxaOthbnk2/TBBcuhkn9zA9Jmp1blFX2d0gQ2h X1LOwe7BPTZIZGRsEZxPQfD03LA30h/U7dkNyuGRMMFBmK7+MsXxPVJIC4pqiMA/t857 xOAAn2KQLG+8OiE1f1lweejVwC61shhwL8rkCHoMATpeweplckyhKupsFxZwu/UlmOxc qcHsfVF6hdSeF7MoaHtQevOdRHFYZZROrD2ncqTClXtpqdCEAmbNd+82IkQRuAxVl1vR 4WJw== 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=vfTTuOfqJlZ6A54Cn17JoZWsSNsVersL2ah2vGTTdpA=; b=WdKUC5xTRkkPMyYpPhvJ2RkPzwALlvlaD0H0L0y+ny+O0H3srtWeSJc5TKTynizbiw zsfFlH8RQnEJ1lDfpZ9qzfXJQ0YTQqeW3hQ7TrZvSEchy52XyMobFTJ8Xf6KqlpmEsdU +xo7Sg7qvACt2q0zo7BwfHgSklDEbEFL3XloS4VNt2AVKO8ZP0csRoqAX7LQmHcQlnZL XIiL6D53OJSBN/pLfTv0pUk3ruTPANRQu6PWO6VzgnYyacYvYzCC489ilWkxhYpxVSAt lxT2nc3X+I1EScdyx/q2SK0mcT/hSGkHMyoQuaxyJadf5ar+mzWtTD8yN0L5vygDT5EH ESOg== X-Gm-Message-State: AOAM530jxfyLYHaPcSsEGiRQUss8Upn04E7qXeGhS4Cs1/pm380A6AFT SEXQ9spJzSZ8g+RPO7jQ+jlA8g== X-Google-Smtp-Source: ABdhPJypgAMHTlgVS26hMWU09szzFOujPqlscOrmedhhL4aKUu7T++uMntllU/UVZyNWV0+wyft5gQ== X-Received: by 2002:a1c:cc0a:: with SMTP id h10mr16020128wmb.24.1606598869212; Sat, 28 Nov 2020 13:27:49 -0800 (PST) Received: from localhost ([2a02:8084:20e2:c380:92bd:1bfd:38fc:fae2]) by smtp.gmail.com with ESMTPSA id j13sm15088951wrp.70.2020.11.28.13.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Nov 2020 13:27:48 -0800 (PST) From: "Basil L. Contovounesios" To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only References: <875z68p5mr.fsf@tcd.ie> <87v9e8i3yz.fsf@tcd.ie> <838sb4w3i7.fsf@gnu.org> <87zh3ifjrq.fsf@mail.linkov.net> <87tutqi8yv.fsf@tcd.ie> <87pn4b68p1.fsf@tcd.ie> <87h7pnk2yx.fsf@gmail.com> Date: Sat, 28 Nov 2020 21:27:47 +0000 In-Reply-To: <87h7pnk2yx.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Tue, 17 Nov 2020 22:55:50 +0000") Message-ID: <87pn3xyxws.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: Eli Zaretskii , 44629@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora writes: > "Basil L. Contovounesios" writes: > >> How's the attached patch for view.el and jsonrpc.el? > > Looks good, and the mini-refactoring in jsonrpc.el is also welcome. > > IMO, this doesn't need to be called out in NEWS. But let's hear from > Lars. I'll wait a few more days for comments/objections before pushing. Thanks, --=20 Basil From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 29 05:36:44 2020 Received: (at 44629) by debbugs.gnu.org; 29 Nov 2020 10:36:44 +0000 Received: from localhost ([127.0.0.1]:49802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjK4S-0003K9-9g for submit@debbugs.gnu.org; Sun, 29 Nov 2020 05:36:44 -0500 Received: from quimby.gnus.org ([95.216.78.240]:52088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjK4Q-0003Js-NW for 44629@debbugs.gnu.org; Sun, 29 Nov 2020 05:36:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=461SkOHzPQoL8yspjq+IjPF9RWkKwCOi1ykP+i21Pm8=; b=uFf+Bg6X9ofjMVsl0KMl38QRMI vDOzJliryfeRhCTRyK7EeSphe8qemZR2l3wGKglT6Sp/JOZ7+Bzxn0QZkU8QdOYOhbPTegJroiFtC L0LyUZNIDgbKMNK7fapcNzrMkI2B/Hpqx6PBLxJp8EE+63ttc1sgzZwwA8vjzye+qZLE=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kjK4H-0004TC-Sy; Sun, 29 Nov 2020 11:36:36 +0100 From: Lars Ingebrigtsen To: "Basil L. Contovounesios" Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only References: <875z68p5mr.fsf@tcd.ie> <87v9e8i3yz.fsf@tcd.ie> <838sb4w3i7.fsf@gnu.org> <87zh3ifjrq.fsf@mail.linkov.net> <87tutqi8yv.fsf@tcd.ie> <87pn4b68p1.fsf@tcd.ie> X-Now-Playing: M.A. Jaiyesimi & His Crescent Bros. Band's _Nigeria 70 (No Wahala: Highlife, Afro-Funk & Juju 1973-1987)_: "Mundiya Loju" Date: Sun, 29 Nov 2020 11:36:32 +0100 In-Reply-To: <87pn4b68p1.fsf@tcd.ie> (Basil L. Contovounesios's message of "Tue, 17 Nov 2020 20:15:54 +0000") Message-ID: <871rgch2kv.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: "Basil L. Contovounesios" writes: > How's the attached patch for view.el and jsonrpc.el? [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44629 Cc: Eli Zaretskii , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , 44629@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Basil L. Contovounesios" writes: > How's the attached patch for view.el and jsonrpc.el? [...] > By default, entering view-mode echoes a usage message. This is > particularly helpful with non-nil view-read-only, to notify the user > that view-mode has been enabled. It is less useful and more spammy, > however, if view-mode is (possibly inadvertently) entered from some > non-interactive code running in the background, such as when a major > mode is enabled in a temporary buffer for text formatting > purposes (bug#44629). I've only skimmed the code, but this makes sense to me. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 03 10:26:34 2020 Received: (at control) by debbugs.gnu.org; 3 Dec 2020 15:26:34 +0000 Received: from localhost ([127.0.0.1]:41407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkqV8-0004aF-1i for submit@debbugs.gnu.org; Thu, 03 Dec 2020 10:26:34 -0500 Received: from mail-wr1-f44.google.com ([209.85.221.44]:34147) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkqV5-0004Zl-SR for control@debbugs.gnu.org; Thu, 03 Dec 2020 10:26:32 -0500 Received: by mail-wr1-f44.google.com with SMTP id k14so2285699wrn.1 for ; Thu, 03 Dec 2020 07:26:31 -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; bh=/CwBqbAyngRywQrmqeZ6kl5Juu2jGeDT9aEQZUTOAs4=; b=Jmt6CjcilboC3firHrfUqojhdCJYhnU4X4JZMaA7UH6g83bg5o+CbybLYyQMjcFqby 0l/lI98FDnIt0a85HdWp1WD49WKV1Zuw8rrnIN+8NxanTI23opmOWNMNfvmSDnuwgs9b Crcue4ZomeRwURA7IDcS/Vui8c900Ev06t+mN+xnp/k4zZjt+fGsAdQpi1Dskg8xjrnW SdwYUI0ar4M03wJL8bACUiuxNEorW4xiT/nekmuu3A4oTF/JcCF5Gz3wG8KgsssxtD4A 6HNdpQ7Oq36f+6ZNDFNwT2NV34tza1a1YovB3my8euNWc0zuG1eHpJFl03Nddyoznf7A EF1A== 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; bh=/CwBqbAyngRywQrmqeZ6kl5Juu2jGeDT9aEQZUTOAs4=; b=ofRVwYnrrTtKPQiJ+6z2B/bscvNjxyUjlTiILhnqqh3P4bpuQjnL1ePBzpdul/aOLt X/jGFZk6fJAHiPbQAcapW4CP5FDZE4+HZdl5Xzo2F/CQI4CbgvgfMgino/lN0mBl5sHR SMmEagX1RGWFeL7lEKUpvPSsJ/eg05SQa8bI07jFwlQIiRPzfF9C3J9IcenUpa+/ehEi FxXCTvlgJrFgcOXKo4BF8sF4D617gTeToclBq57T5SrC4ISUNWo0b5ZgEENPZWONBscO yoeWouTaB12HiiYRIQwBIPoYQlIiA18lR5sLtMX7iGDT0suqfWMje8WypFVu6qAwfWzW 2yHg== X-Gm-Message-State: AOAM5310CoRrfrZtqF9oMfqZ6p+Gbhc0jREJpCto7aB9UoD+QArgrPU9 L6KNmTrlZATJO86/vB1Kot4rGw== X-Google-Smtp-Source: ABdhPJznVvAcAgdTjrWiSSixryl/5qlYus/2sMH/AF+9C+hDqQ0bXHBR7yd8JiSa0Yysmxct/zN3ng== X-Received: by 2002:adf:f110:: with SMTP id r16mr4323232wro.350.1607009185910; Thu, 03 Dec 2020 07:26:25 -0800 (PST) Received: from localhost ([51.37.121.192]) by smtp.gmail.com with ESMTPSA id g78sm1871403wme.33.2020.12.03.07.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2020 07:26:24 -0800 (PST) From: "Basil L. Contovounesios" To: Lars Ingebrigtsen Subject: Re: bug#44629: 28.0.50; Eglot noisy with gfm-view-mode and view-read-only References: <875z68p5mr.fsf@tcd.ie> <87v9e8i3yz.fsf@tcd.ie> <838sb4w3i7.fsf@gnu.org> <87zh3ifjrq.fsf@mail.linkov.net> <87tutqi8yv.fsf@tcd.ie> <87pn4b68p1.fsf@tcd.ie> <871rgch2kv.fsf@gnus.org> Date: Thu, 03 Dec 2020 15:26:23 +0000 In-Reply-To: <871rgch2kv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 29 Nov 2020 11:36:32 +0100") Message-ID: <878saeq5b4.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: Eli Zaretskii , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , 44629-done@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 44629 fixed close 44629 28.1 quit Lars Ingebrigtsen writes: > "Basil L. Contovounesios" writes: > >> How's the attached patch for view.el and jsonrpc.el? > > [...] > >> By default, entering view-mode echoes a usage message. This is >> particularly helpful with non-nil view-read-only, to notify the user >> that view-mode has been enabled. It is less useful and more spammy, >> however, if view-mode is (possibly inadvertently) entered from some >> non-interactive code running in the background, such as when a major >> mode is enabled in a temporary buffer for text formatting >> purposes (bug#44629). > > I've only skimmed the code, but this makes sense to me. Thanks, now pushed to master. Avoid spamming view-mode-enter help message 805d82197f 2020-12-03 15:22:00 +0000 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=805d82197f050d1aba8fb796e604c55ce3d6333a -- Basil From unknown Sun Aug 17 04:18:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 01 Jan 2021 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator