From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 13 07:53:41 2021 Received: (at submit) by debbugs.gnu.org; 13 Aug 2021 11:53:41 +0000 Received: from localhost ([127.0.0.1]:40663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEVkr-0007JG-6l for submit@debbugs.gnu.org; Fri, 13 Aug 2021 07:53:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:49614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEVkm-0007J4-8T for submit@debbugs.gnu.org; Fri, 13 Aug 2021 07:53:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEVkl-0007v4-W9 for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2021 07:53:36 -0400 Received: from s30.dg.net.uk ([91.224.108.30]:42502) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEVkj-0006A5-Gp for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2021 07:53:35 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:39480) by s30.dg.net.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1mEVjv-00076E-UV for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2021 12:52:43 +0100 Received: by mail-wr1-f50.google.com with SMTP id q6so1398935wrv.6 for ; Fri, 13 Aug 2021 04:52:43 -0700 (PDT) X-Gm-Message-State: AOAM531rJAXov3lf9upCPmTo2TcyKj3oK9sc1cszcujFbuf7+oGaD+Pz grmBeQix37J8LOeQsCV8OlQ+hzH43+nobqrb4mY= X-Google-Smtp-Source: ABdhPJzPTVJhC/kgj9/DtHb2JUB2ghcEvquyctPXyd5rBajh0fo8GtcP8fa0gc5L8aP9yHcJ0Zh5z0vwq89wCw3HTKw= X-Received: by 2002:adf:fc50:: with SMTP id e16mr2731013wrs.382.1628855563491; Fri, 13 Aug 2021 04:52:43 -0700 (PDT) MIME-Version: 1.0 From: Simon Katz Date: Fri, 13 Aug 2021 12:52:32 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: 26.3; Post-command hooks slow with M-x commands To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000409e1e05c96f7d8d" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s30.dg.net.uk X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nomistech.com X-Get-Message-Sender-Via: s30.dg.net.uk: authenticated_id: non-junk@nomistech.com X-Authenticated-Sender: s30.dg.net.uk: non-junk@nomistech.com Received-SPF: pass client-ip=91.224.108.30; envelope-from=sk@nomistech.com; helo=s30.dg.net.uk X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) 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: , Reply-To: sk@nomistech.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --000000000000409e1e05c96f7d8d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Post-command hooks are slow to run for commands invoked using `M-x ...`. I'm using Emacs 26.3 (which produced this bug report), but I've checked with 27.2.2 and I get the same behaviour. Here's a startup file that can be used to show this (also at https://github.com/simon-katz/demo-post-command-hook-slow-with-m-x-commands= .el/blob/8e7b96fc322f6372fb1531f04ab6008d59ab9b9e/demo-post-command-hook-sl= ow-with-m-x-commands.el#L1 ). ;;; demo-post-command-hook-slow-with-m-x-commands.el --- Demo that post-sommand hooks are slow with M-x commands -*- lexical-binding: t; -*- ;; This demonstrates an issue with `(add-hook 'post-command-hook ...)`. ;; To reproduce the problem: ;; - Run `emacs -q -l demo-post-command-hook-slow-with-m-x-commands.el` (that's ;; this file). ;; - Enter `M-x next-line`. ;; - Observe that the message displayed by the `say-something` function ;; takes a while to appear. ;; - Contrast with hitting the down-arrow key, when the message appears ;; immediately. ;;; Code: (require 'package) (setq debug-on-error t no-byte-compile t package-archives '(("melpa" . "https://melpa.org/packages/") ("gnu" . "https://elpa.gnu.org/packages/")) package-user-dir (expand-file-name (make-temp-name "flycheck-tmp-elpa") user-emacs-directory) custom-file (expand-file-name "custom.el" package-user-dir)) (defun say-something () (let ((inhibit-message t)) (message "With `M-x next-line` (for example), this message is slow to appear"))= ) (add-hook 'post-command-hook 'say-something) (display-buffer "*Messages*") (provide 'demo-post-command-hook-slow-with-m-x-commands) ;;; demo-post-command-hook-slow-with-m-x-commands.el ends here In GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109)) of 2019-09-02 built on builder10-14.porkrind.org Windowing system distributor 'Apple', version 10.3.1894 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. With =E2=80=98M-x next-line=E2=80=98 (for example), this message is slow to= appear [13 times] You can run the command =E2=80=98next-line=E2=80=99 with C-n With =E2=80=98M-x next-line=E2=80=98 (for example), this message is slow to= appear [10 times] Quit With =E2=80=98M-x next-line=E2=80=98 (for example), this message is slow to= appear [7 times] Making completion list... With =E2=80=98M-x next-line=E2=80=98 (for example), this message is slow to= appear [6 times] Configured using: 'configure --with-ns '--enable-locallisppath=3D/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: tooltip-mode: t global-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 blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort map mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg 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 demo-post-command-hook-slow-with-m-x-commands package easymenu epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib elec-pair time-date tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame 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 minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 213714 7973) (symbols 48 21049 1) (miscs 40 83 191) (strings 32 31839 1672) (string-bytes 1 863206) (vectors 16 36747) (vector-slots 8 745240 8812) (floats 8 57 65) (intervals 56 214 0) (buffers 992 13)) --000000000000409e1e05c96f7d8d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Post-command hooks are slow to run for commands invoked us= ing `M-x ...`.

I'm using Emacs 26.3 (which produced this bug rep= ort), but I've checked with 27.2.2 and I get the same behaviour.

Here's a startup file that can be used to show this (also at https://github.com/simon-katz/demo-post-= command-hook-slow-with-m-x-commands.el/blob/8e7b96fc322f6372fb1531f04ab6008= d59ab9b9e/demo-post-command-hook-slow-with-m-x-commands.el#L1).

= ;;; demo-post-command-hook-slow-with-m-x-commands.el --- Demo that post-som= mand hooks are slow with M-x commands =C2=A0 =C2=A0 =C2=A0-*- lexical-bindi= ng: t; -*-

;; This demonstrates an issue with `(add-hook 'post-c= ommand-hook ...)`.

;; To reproduce the problem:
;; - Run `emacs -= q -l demo-post-command-hook-slow-with-m-x-commands.el` (that's
;; = =C2=A0 this file).
;; - Enter `M-x next-line`.
;; - Observe that the = message displayed by the `say-something` function
;; =C2=A0 takes a whil= e to appear.
;; - Contrast with hitting the down-arrow key, when the mes= sage appears
;; =C2=A0 immediately.

;;; Code:

(require = 9;package)

(setq debug-on-error t
=C2=A0 =C2=A0 =C2=A0 no-byte-co= mpile t
=C2=A0 =C2=A0 =C2=A0 package-archives '(("melpa" .= "https://melpa.org/packages/<= /a>")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("gnu" . "
https://elpa.gnu.org/packages/"))
=C2= =A0 =C2=A0 =C2=A0 package-user-dir (expand-file-name (make-temp-name "= flycheck-tmp-elpa")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0user-emacs-directory)
=C2=A0 =C2=A0 =C2=A0 cu= stom-file (expand-file-name "custom.el" package-user-dir))
(defun say-something ()
=C2=A0 (let ((inhibit-message t))
=C2=A0 =C2= =A0 (message
=C2=A0 =C2=A0 =C2=A0"With `M-x next-line` (for example= ), this message is slow to appear")))

(add-hook 'post-comma= nd-hook 'say-something)

(display-buffer "*Messages*")<= br>
(provide 'demo-post-command-hook-slow-with-m-x-commands)
;;; = demo-post-command-hook-slow-with-m-x-commands.el ends here



<= br>

In GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit= -1671.20 Version 10.14.3 (Build 18D109))
=C2=A0of 2019-09-02 built on builder10-14.porkrind.orgWindowing system distributor 'Apple', version 10.3.1894
Recent = messages:
For information about GNU Emacs and the GNU system, type C-h C= -a.
With =E2=80=98M-x next-line=E2=80=98 (for example), this message is = slow to appear [13 times]
You can run the command =E2=80=98next-line=E2= =80=99 with C-n
With =E2=80=98M-x next-line=E2=80=98 (for example), this= message is slow to appear [10 times]
Quit
With =E2=80=98M-x next-lin= e=E2=80=98 (for example), this message is slow to appear [7 times]
Makin= g completion list...
With =E2=80=98M-x next-line=E2=80=98 (for example),= this message is slow to appear [6 times]

Configured using:
=C2= =A0'configure --with-ns '--enable-locallisppath=3D/Library/Applicat= ion
=C2=A0Support/Emacs/${version}/site-lisp:/Library/Application
=C2= =A0Support/Emacs/site-lisp' --with-modules'

Configured featu= res:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREA= DS

Important settings:
=C2=A0 value of $LANG: en_GB.UTF-8
=C2= =A0 locale-coding-system: utf-8-unix

Major mode: Fundamental

= Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mod= e: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2= =A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-= mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 blink-cursor-mode: t=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2= =A0 auto-compression-mode: t
=C2=A0 buffer-read-only: t
=C2=A0 line-n= umber-mode: t
=C2=A0 transient-mark-mode: t

Load-path shadows:None found.

Features:
(shadow sort map mail-extr emacsbug messag= e rmc puny dired
dired-loaddefs format-spec rfc822 mml mml-sec epa deriv= ed epg 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
demo-post-command-hook-slow-= with-m-x-commands package easymenu
epg-config url-handlers url-parse aut= h-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache u= rl-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib e= lec-pair time-date tooltip eldoc
electric uniquify ediff-hook vc-hooks l= isp-float-type mwheel term/ns-win
ns-win ucs-normalize mule-util term/co= mmon-win tool-bar dnd fontset
image regexp-opt fringe tabulated-list rep= lace newcomment text-mode
elisp-mode lisp-mode prog-mode register page m= enu-bar rfn-eshadow
isearch timer select scroll-bar mouse jit-lock font-= lock syntax facemenu
font-core term/tty-colors frame cl-generic cham geo= rgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean j= apanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european eth= iopic indian
cyrillic chinese composite charscript charprop case-table e= pa-hook
jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded= nadvice
loaddefs button faces cus-face macroexp files text-properties o= verlay
sha1 md5 base64 format env code-pages mule custom widget
hasht= able-print-readable backquote threads kqueue cocoa ns multi-tty
make-net= work-process emacs)

Memory information:
((conses 16 213714 7973)<= br>=C2=A0(symbols 48 21049 1)
=C2=A0(miscs 40 83 191)
=C2=A0(strings = 32 31839 1672)
=C2=A0(string-bytes 1 863206)
=C2=A0(vectors 16 36747)=
=C2=A0(vector-slots 8 745240 8812)
=C2=A0(floats 8 57 65)
=C2=A0(= intervals 56 214 0)
=C2=A0(buffers 992 13))
--000000000000409e1e05c96f7d8d-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 13 08:27:58 2021 Received: (at 50042) by debbugs.gnu.org; 13 Aug 2021 12:27:58 +0000 Received: from localhost ([127.0.0.1]:40712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEWI2-0008By-4s for submit@debbugs.gnu.org; Fri, 13 Aug 2021 08:27:58 -0400 Received: from quimby.gnus.org ([95.216.78.240]:50792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEWHy-0008Bh-C7 for 50042@debbugs.gnu.org; Fri, 13 Aug 2021 08:27:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=aoJHdi++Xgybmtb575P/LXnLnC06Dg29H4E0D+YyLJY=; b=UUBnqAyfptVlGmrtrZm34VBwBh mKogMyIPcAy35DgSY/N3d8w4N0+XqhQQTxU8RPkf8wPfb14VqLPPP2CF1FjVFHfIOAzAZ+4rVNv4R E5fB9Se/aKGKNdSkTnrgF3N/1KSc2LHXESNYcUyOxDelzzHpuBjFGuKNv4wdwAQyt/Vk=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mEWHn-0003XW-5e; Fri, 13 Aug 2021 14:27:47 +0200 From: Lars Ingebrigtsen To: Simon Katz Subject: Re: bug#50042: 26.3; Post-command hooks slow with M-x commands References: Date: Fri, 13 Aug 2021 14:27:42 +0200 In-Reply-To: (Simon Katz's message of "Fri, 13 Aug 2021 12:52:32 +0100") Message-ID: <87lf55edhd.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; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Simon Katz writes: > Here's a startup file that can be used to show this (also at Simpler repro: 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: -2.3 (--) X-Debbugs-Envelope-To: 50042 Cc: 50042@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 (---) Simon Katz writes: > Here's a startup file that can be used to show this (also at Simpler repro: (add-hook 'post-command-hook (lambda () (let ((inhibit-message t)) (message "foo: %s" this-command)))) (display-buffer "*Messages*") M-x previous-line I think this has something to do with the You can run the command =E2=80=98previous-line=E2=80=99 with C-p stuff -- if the `M-x' command in question isn't bound to anything, `post-command-hook' is run immediately instead of after a two-second timeout. Hm... yup: `execute-extended-command' ends with (when binding (with-temp-message (format-message "You can run the command `%s' with %s" function (if (stringp binding) (concat "M-x " binding " RET") (key-description binding))) (sit-for (if (numberp suggest-key-bindings) suggest-key-bindings 2)))))))) So presumably `post-command-hook' isn't run after that timeout has completed. Uhm... anybody got any ideas how to fix this? I mean, in one way it's behaving as it's supposed to -- the command really isn't finished after this sit-for has finished. On the other hand, it's pretty awkward. Could we yank this out of the flow and run it from a timer (fired immediately) instead? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 13 08:41:14 2021 Received: (at 50042) by debbugs.gnu.org; 13 Aug 2021 12:41:14 +0000 Received: from localhost ([127.0.0.1]:40793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEWUs-0000CT-6w for submit@debbugs.gnu.org; Fri, 13 Aug 2021 08:41:14 -0400 Received: from s30.dg.net.uk ([91.224.108.30]:40164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEWUp-0000CE-1u for 50042@debbugs.gnu.org; Fri, 13 Aug 2021 08:41:12 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:46998) by s30.dg.net.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1mEWUh-0002MX-81 for 50042@debbugs.gnu.org; Fri, 13 Aug 2021 13:41:03 +0100 Received: by mail-wm1-f50.google.com with SMTP id h24-20020a1ccc180000b029022e0571d1a0so6819108wmb.5 for <50042@debbugs.gnu.org>; Fri, 13 Aug 2021 05:41:02 -0700 (PDT) X-Gm-Message-State: AOAM531ZR9i5j9Lpg16LqJvObqG5pSIo+Q6oNVPelLbba+i7DUpwIw/w wAtrV8ViEwDJ5ExO9OglPZvMml1c2k3Z+al5qZI= X-Google-Smtp-Source: ABdhPJwsvJJkU5hwqOjyqn7dcKWZVBXR7btmHdXeR2aEYpl5fuJUXBTDJf5HtQ5FHNVuUg4fdMB4fBpGVWTE5hIWAmQ= X-Received: by 2002:a05:600c:b52:: with SMTP id k18mr2496749wmr.46.1628858462767; Fri, 13 Aug 2021 05:41:02 -0700 (PDT) MIME-Version: 1.0 References: <87lf55edhd.fsf@gnus.org> In-Reply-To: <87lf55edhd.fsf@gnus.org> From: Simon Katz Date: Fri, 13 Aug 2021 13:40:51 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: bug#50042: 26.3; Post-command hooks slow with M-x commands To: Lars Ingebrigtsen Content-Type: multipart/alternative; boundary="000000000000100f3805c9702a10" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s30.dg.net.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nomistech.com X-Get-Message-Sender-Via: s30.dg.net.uk: authenticated_id: non-junk@nomistech.com X-Authenticated-Sender: s30.dg.net.uk: non-junk@nomistech.com X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50042 Cc: 50042@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: , Reply-To: sk@nomistech.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --000000000000100f3805c9702a10 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable It's probably worth me giving a bit more context=E2=80=A6 I'm using `lsp-ui`, and that's using post-command hooks to update the UI. If I use `M-x flycheck-next-error` (for example), it takes time for the UI to update. See https://github.com/emacs-lsp/lsp-ui/issues/647 --000000000000100f3805c9702a10 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It's probably worth me giving a bit more context=E2=80= =A6

I'm using `lsp-ui`, and that's using post-co= mmand hooks to update the UI.

If I use `M-x flyche= ck-next-error` (for example), it takes time for the UI to update.
=

<= br>

--000000000000100f3805c9702a10-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 14 12:36:45 2021 Received: (at 50042) by debbugs.gnu.org; 14 Aug 2021 16:36:46 +0000 Received: from localhost ([127.0.0.1]:45321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEweH-0006Ax-K5 for submit@debbugs.gnu.org; Sat, 14 Aug 2021 12:36:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEweB-0006Ab-Le for 50042@debbugs.gnu.org; Sat, 14 Aug 2021 12:36:40 -0400 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=VGy67w8oht9X0fp7wg0veD/nnUPyNYxCiyOcQKuxMCU=; b=G96ZO+6NMdCeKM/3/c+vhG5+5v w/HWvIXZyWUE/24WZeE1wC5CdU61XahqqS3GKmXOChhGRihY1CWFbAe4B8nTELk+gKgrr3zEcJywd eTqNQ1CTbcKiamTCyMf4tHtUAhlyjWXranoIULhxDR6FowQojOw7+V2/anE9FuxuktX0=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mEwdz-0003GV-K4; Sat, 14 Aug 2021 18:36:28 +0200 From: Lars Ingebrigtsen To: Simon Katz Subject: Re: bug#50042: 26.3; Post-command hooks slow with M-x commands References: <87lf55edhd.fsf@gnus.org> Date: Sat, 14 Aug 2021 18:36:21 +0200 In-Reply-To: <87lf55edhd.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 13 Aug 2021 14:27:42 +0200") Message-ID: <87tujsq8ze.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: Lars Ingebrigtsen writes: > Simpler repro: > > (add-hook 'post-command-hook > (lambda () > (let ((inhibit-message t)) > (message "foo: %s" this-command)))) > (display-buffer "*Messages*") > > M-x previous-line 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: -2.3 (--) X-Debbugs-Envelope-To: 50042 Cc: 50042@debbugs.gnu.org, Stefan Monnier 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 (---) Lars Ingebrigtsen writes: > Simpler repro: > > (add-hook 'post-command-hook > (lambda () > (let ((inhibit-message t)) > (message "foo: %s" this-command)))) > (display-buffer "*Messages*") > > M-x previous-line [...] > `execute-extended-command' ends with > > (when binding > (with-temp-message > (format-message "You can run the command `%s' with %s" > function > (if (stringp binding) > (concat "M-x " binding " RET") > (key-description binding))) > (sit-for (if (numberp suggest-key-bindings) > suggest-key-bindings > 2)))))))) > > So presumably `post-command-hook' isn't run after that timeout has > completed. [...] > Could we yank this out of the flow and run it from a timer (fired > immediately) instead? Stefan, I forgot to put you on the CCs here -- I wondered whether you had any ideas here. I think lifting this out of `execute-extended-command' should be possible -- either by doing something a la (run-at-time 0 nil (lambda () (with-temp-message "The binding is foo" (sit-for 1)))) or making `execute-extended-command' set a variable and do the messaging from the "command loop" after running post-command-hook. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 14 16:52:45 2021 Received: (at 50042) by debbugs.gnu.org; 14 Aug 2021 20:52:45 +0000 Received: from localhost ([127.0.0.1]:45471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mF0e1-0007Wu-PF for submit@debbugs.gnu.org; Sat, 14 Aug 2021 16:52:45 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:2357) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mF0dw-0007WZ-IS for 50042@debbugs.gnu.org; Sat, 14 Aug 2021 16:52:40 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 921B9440BEC; Sat, 14 Aug 2021 16:52:30 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D97ED440BE5; Sat, 14 Aug 2021 16:52:28 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1628974348; bh=3OD6wXuFmPZsXenajJhcktnTdD9IYrtB33a2FZ7t4LE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Ctfml4AaHa1WDeY/NyW1HqnvzmxrY/jIP3m+JA05xLRJkdCKrR2ZpCwkvqpl8Adgr j0K1gzQV0RLA576TxJTVD/ZmkyqzEsD5CLkpugr4+Taf6knwbMovm2OXtMzxDrkAxr h5TQX1J5hdY9IrshUezRkQGI5zbh/n6+6JecG80Is8DqfoF3CTlS8YLGdQ0QuaQKkm wrptsI85sCiQDMCvMFo7mbbj1ZW3JSiJsZX2LHeL/z2bimODd1krrkYiBO3oZjg9tv 9RpZ0V7ncxs5JqisiZmh8wODqI6JCpvf+SNhxvyfUojsODZVw4DQi7utCQ3m2P4h22 y+EOhr91I5lPw== Received: from alfajor (unknown [104.247.244.135]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 973F612041B; Sat, 14 Aug 2021 16:52:28 -0400 (EDT) From: Stefan Monnier To: Lars Ingebrigtsen Subject: Re: bug#50042: 26.3; Post-command hooks slow with M-x commands Message-ID: References: <87lf55edhd.fsf@gnus.org> <87tujsq8ze.fsf@gnus.org> Date: Sat, 14 Aug 2021 16:52:27 -0400 In-Reply-To: <87tujsq8ze.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 14 Aug 2021 18:36:21 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.146 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50042 Cc: 50042@debbugs.gnu.org, Simon Katz 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 (---) >> `execute-extended-command' ends with >> >> (when binding >> (with-temp-message >> (format-message "You can run the command `%s' with %s" >> function >> (if (stringp binding) >> (concat "M-x " binding " RET") >> (key-description binding))) >> (sit-for (if (numberp suggest-key-bindings) >> suggest-key-bindings >> 2)))))))) Indeed this `sit-for` is a problem because it delays running the `post-command-hook`. [ We have a few other such problems, tho I sadly didn't bother to keep track of them. ] > Stefan, I forgot to put you on the CCs here -- I wondered whether you > had any ideas here. I think lifting this out of > `execute-extended-command' should be possible -- either by doing > something a la > > (run-at-time 0 nil (lambda () > (with-temp-message "The binding is foo" > (sit-for 1)))) > > or making `execute-extended-command' set a variable and do the messaging > from the "command loop" after running post-command-hook. Using a timer might be a good option, indeed. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 15 07:39:05 2021 Received: (at 50042) by debbugs.gnu.org; 15 Aug 2021 11:39:05 +0000 Received: from localhost ([127.0.0.1]:45899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFETk-0005r2-Sf for submit@debbugs.gnu.org; Sun, 15 Aug 2021 07:39:05 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFETe-0005qk-Bu for 50042@debbugs.gnu.org; Sun, 15 Aug 2021 07:38:58 -0400 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=L07Zz6V1B6rKTBM0AniCtgVkf8HNn/K9il/BA9xBx28=; b=dhgXJBDKnhkKsIHdyqrKS5fL1p u092f00K8fUPsxd3yzysmpNe73gRQ917ibw7TnLXUx73mBkOkvHv1xf0aMRUsXyCkJrcey2ymd7go PkQin2PHoszTSiyVBQJrrK4wm/X4qhrF1u80hf3xp7WXDR0tfPImInHgBY+73UOM+pE4=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFETS-000898-Gd; Sun, 15 Aug 2021 13:38:46 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#50042: 26.3; Post-command hooks slow with M-x commands References: <87lf55edhd.fsf@gnus.org> <87tujsq8ze.fsf@gnus.org> Date: Sun, 15 Aug 2021 13:38:41 +0200 In-Reply-To: (Stefan Monnier's message of "Sat, 14 Aug 2021 16:52:27 -0400") Message-ID: <87a6ljos3i.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: Stefan Monnier writes: > Using a timer might be a good option, indeed. OK; I've now implemented a solution based on `run-at-time', and after using it for a bit, I'm not seeing any glitches usage-wise, so I'm pushing it. But I realise that there might be some peculiaritie [...] 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: -2.3 (--) X-Debbugs-Envelope-To: 50042 Cc: 50042@debbugs.gnu.org, Simon Katz 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 (---) Stefan Monnier writes: > Using a timer might be a good option, indeed. OK; I've now implemented a solution based on `run-at-time', and after using it for a bit, I'm not seeing any glitches usage-wise, so I'm pushing it. But I realise that there might be some peculiarities in this area, so we'll see... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 15 07:39:09 2021 Received: (at control) by debbugs.gnu.org; 15 Aug 2021 11:39:09 +0000 Received: from localhost ([127.0.0.1]:45901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFETp-0005rV-AY for submit@debbugs.gnu.org; Sun, 15 Aug 2021 07:39:09 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFETi-0005qp-9U for control@debbugs.gnu.org; Sun, 15 Aug 2021 07:39:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=0+J6FlNCuwdCRm1fmNzNaE2UxALdgEXGacs3CYnwHeI=; b=f9bJwhZ++kXOM2sSTkngBPZLYz 43VJZiSztkMplTl53Ad4uGU4Lic6Vlh+05GmTpTWcmwpEh83HmFKwMXLaCj3mNfUppmF2U4kH/g2X 48bc3ETAkshNP5cPbJJlyiOJ1z8PtACStzHIDHHR8Af8HPva/w+1NL0QauL2FhTyQEcI=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFETa-00089F-E4 for control@debbugs.gnu.org; Sun, 15 Aug 2021 13:38:52 +0200 Date: Sun, 15 Aug 2021 13:38:49 +0200 Message-Id: <878s13os3a.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #50042 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: close 50042 28.1 quit 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: -2.3 (--) X-Debbugs-Envelope-To: control 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 (---) close 50042 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 16 20:41:28 2021 Received: (at 50042) by debbugs.gnu.org; 17 Aug 2021 00:41:28 +0000 Received: from localhost ([127.0.0.1]:51173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFnAV-0003vK-TZ for submit@debbugs.gnu.org; Mon, 16 Aug 2021 20:41:28 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:35800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFnAR-0003v3-KR for 50042@debbugs.gnu.org; Mon, 16 Aug 2021 20:41:26 -0400 Received: by mail-wr1-f52.google.com with SMTP id q10so26077293wro.2 for <50042@debbugs.gnu.org>; Mon, 16 Aug 2021 17:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=1mjFTbXml7e08C8fCeJkwxWZvNQzZ32aXk0FYIwedIE=; b=SIwBCdMA+HOm++eVNFBb82Oo28fLbco/fX9Wn7gRrQpmYmlHi5dTfL3BAM9S/Mav9s yYiWLLCfPUPK7yWb7MKzO56c4MOkR/xotL4Vu1S2/zjGzhuE456qrDo+APspRaCxFlPF lV4NLZRcealhvqUXnZgVCQ6JahcELKnbvagfh8ErpvDHAE0iwXiGa2IyHwyc/9QUT5f1 +FgxSf+v9OELeR9h4xbrRAwacDCgQ+N1yxhOFxFAoXFAwiZY7qRLlk7On+tTkEiWSRRk vY4ZiEMswvKMPye6gAVmn3KNRw57yPpVUZ7kJYf8qL5hIH/Jpg5Amp9OVv5JcjmBeuCe 9FFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1mjFTbXml7e08C8fCeJkwxWZvNQzZ32aXk0FYIwedIE=; b=clc+OwDS+RyleP2mvwLL8ipXawy3+QMmGTRGbQePYh9+um+lRnQlX2wb+58pEqmSB5 CM5Bx8FFj1WQR1yqKMlmqQxP65r2yrIgu4rcwyb62dWgbdDPlR1ONvp+ykrgWDsmJjNQ TEHkpprcnDr0yh2YeDMFNOfQ1XGIk87i7801yOYUBJrMY5W39FkYJStIIBTdOqKFEL5L fSZaUZtGLbN2rPtgiiOYzqkc0kMVNGAVqBf2rfAlJZJ5g2ddKwwVWRK7GUcKZe2EHu4+ wMj2I5Bu7LUXBnN+IQHDRo39m2dMnWTde/s3gaBSea0k9LFhSeGlv8mIuYtAotqpbqlk +Q5w== X-Gm-Message-State: AOAM530ZBbu2ldkhBcPT+rvP+x3wft5Qug6+6Bs66e/PXxj5x1Ss7z3P +Gb1HvG5hTWdrhlRTKVryFY= X-Google-Smtp-Source: ABdhPJw+WzQWRM1sHahchIgE0cVnGU1yTBnUy+YfTzuHsH2jTM/9IMuh0W2Qxef7dpuOq1VH+z0LCA== X-Received: by 2002:adf:f741:: with SMTP id z1mr690097wrp.201.1629160877420; Mon, 16 Aug 2021 17:41:17 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id t1sm338317wma.25.2021.08.16.17.41.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Aug 2021 17:41:17 -0700 (PDT) Subject: Re: bug#50042: 26.3; Post-command hooks slow with M-x commands To: Lars Ingebrigtsen , Stefan Monnier References: <87lf55edhd.fsf@gnus.org> <87tujsq8ze.fsf@gnus.org> <87a6ljos3i.fsf@gnus.org> From: Dmitry Gutov Message-ID: <87452e34-4574-4387-2776-c0e73aef0f79@yandex.ru> Date: Tue, 17 Aug 2021 03:41:15 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87a6ljos3i.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50042 Cc: 50042@debbugs.gnu.org, Simon Katz 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: -0.6 (/) On 15.08.2021 14:38, Lars Ingebrigtsen wrote: > OK; I've now implemented a solution based on `run-at-time', and after > using it for a bit, I'm not seeing any glitches usage-wise, so I'm > pushing it. Thanks for this change, it's been a long time coming. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 11:27:47 2021 Received: (at 50042) by debbugs.gnu.org; 18 Aug 2021 15:27:47 +0000 Received: from localhost ([127.0.0.1]:57302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGNTm-0008P3-Up for submit@debbugs.gnu.org; Wed, 18 Aug 2021 11:27:47 -0400 Received: from s30.dg.net.uk ([91.224.108.30]:36956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGNTh-0008Oh-CN for 50042@debbugs.gnu.org; Wed, 18 Aug 2021 11:27:45 -0400 Received: from mail-wm1-f54.google.com ([209.85.128.54]:55913) by s30.dg.net.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1mGNTZ-0001s8-A1 for 50042@debbugs.gnu.org; Wed, 18 Aug 2021 16:27:33 +0100 Received: by mail-wm1-f54.google.com with SMTP id w24so1871903wmi.5 for <50042@debbugs.gnu.org>; Wed, 18 Aug 2021 08:27:32 -0700 (PDT) X-Gm-Message-State: AOAM533mSY/8P8h3mXqB3HJD1+Qm0OOx3g5EFocHjAnE5HbdwbcorjxL UbCpiLsmKcVa89BJauUr4wQhbVnWBxyCL1HOK0U= X-Google-Smtp-Source: ABdhPJxWvXJqLjxJ0JLuBaPdvW5/7i6zllVOgLBwyf8+AneIj3X+x0XTWzuFm+G4pe7B+GFbNWmpInOqXgcxz2tY/uM= X-Received: by 2002:a1c:2283:: with SMTP id i125mr9018074wmi.41.1629300452711; Wed, 18 Aug 2021 08:27:32 -0700 (PDT) MIME-Version: 1.0 References: <878s13os3a.fsf@gnus.org> In-Reply-To: From: Simon Katz Date: Wed, 18 Aug 2021 16:27:21 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: bug#50042 acknowledged by developer (control message for bug #50042) To: 50042@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s30.dg.net.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nomistech.com X-Get-Message-Sender-Via: s30.dg.net.uk: authenticated_id: non-junk@nomistech.com X-Authenticated-Sender: s30.dg.net.uk: non-junk@nomistech.com X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50042 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: , Reply-To: sk@nomistech.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Lars, Thanks for fixing the bug I reported. You mentioned that there might be some peculiarities in this area, and indeed that seems to be the case. I still have a problem. If you are interested in what I am trying to fix, see https://github.com/emacs-lsp/lsp-ui/issues/647 Note that everything is fine if I set `suggest-key-bindings` to `nil`. The problems seem to be with commands that both (a) write messages to the echo area, and (b) have key bindings. The code below reproduces the problem. See the comments at the beginning for instructions. ---------------------------------------------------------------------------= ----- ;;; demo-post-command-hook-slow-with-m-x-commands-v2.el --- Demo that post-command hooks are slow with M-x commands -*- lexical-binding: t; -*- ;; This demonstrates an issue with: ;; `(add-hook 'post-command-hook ...)`. ;; It's a follow-up to an already-reported and partially-fixed problem -- s= ee ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D50042 ;; To reproduce the problem: ;; ;; - Run `emacs -q -l ` ;; ;; - Enter `M-x **-msg-cmd-without-key-binding`. ;; - Observe that it takes many seconds (~15 for me) to produce output to t= he ;; "my-output" buffer, and that the "*Messages*" buffer has the message: ;; You can run the command =E2=80=98**-msg-cmd-without-key-binding=E2= =80=99 with M-x -witho RET ;; ;; - Enter `M-x **-msg-cmd-without-key-binding` again. ;; - Observe that both the "*Messages*" buffer and the "my-output" buffer u= pdate ;; immediately. ;; - Repeatedly enter `M-x **-msg-cmd-without-key-binding` and observe the = same ;; - result. ;; ;; - Enter `M-x **-msg-cmd-with-key-binding`. ;; - Observe that it takes 2 seconds for output to appear in the "my-output= " ;; buffer. ;; - Observe that the behaviour is the same if the command is repeated. ;; ;; - Use the `C-c C-c` key binding, to invoke `**-msg-cmd-with-key-binding`= . ;; - Observe that there are no delays. ;; Emacs displays the "*GNU Emacs*" buffer after loading this file, so use ;; `run-at-time` to delay setting up which buffers are displayed. (run-at-time 1 nil (lambda () (switch-to-buffer "*Messages*" nil t) (display-buffer (generate-new-buffer "my-output")) ;; Arrange things so that we see the output as it appears: (select-window (get-buffer-window "my-output")))) (defun date-time () (format-time-string "%Y-%m-%d %H:%M:%S")) (defun post-command-message () (when (member this-command '(**-msg-cmd-with-key-binding **-msg-cmd-without-key-binding)) (with-current-buffer "my-output" (goto-char (point-max)) (insert (date-time) " The command `" (format "%s" this-command) "` was executed\n") (goto-char (point-max))))) (add-hook 'post-command-hook 'post-command-message) (defun **-msg-cmd-without-key-binding () (interactive) (message "%s Hello from `**-msg-cmd-without-key-binding`" (date-time))) (defun **-msg-cmd-with-key-binding () (interactive) (message "%s Hello from `**-msg-cmd-with-key-binding`" (date-time))) (define-key global-map (kbd "C-c C-c") '**-msg-cmd-with-key-binding) (setq suggest-key-bindings nil) (when t ; Whether to load the changes in Emacs commit 42a98feb5b (defvar execute-extended-command--binding-timer nil) (defun execute-extended-command (prefixarg &optional command-name typed) ;; Based on Fexecute_extended_command in keyboard.c of Emacs. ;; Aaron S. Hawley 2009-08-24 "Read a command name, then read the arguments and call the command. To pass a prefix argument to the command you are invoking, give a prefix argument to `execute-extended-command'." (declare (interactive-only command-execute)) ;; FIXME: Remember the actual text typed by the user before completion, ;; so that we don't later on suggest the same shortening. (interactive (let ((execute-extended-command--last-typed nil)) (list current-prefix-arg (read-extended-command) execute-extended-command--last-typed))) ;; Emacs<24 calling-convention was with a single `prefixarg' argument. (unless command-name (let ((current-prefix-arg prefixarg) ; for prompt (execute-extended-command--last-typed nil)) (setq command-name (read-extended-command)) (setq typed execute-extended-command--last-typed))) (let* ((function (and (stringp command-name) (intern-soft command-name)= )) (binding (and suggest-key-bindings (not executing-kbd-macro) (where-is-internal function overriding-local-map t= )))) (unless (commandp function) (error "`%s' is not a valid command name" command-name)) ;; Some features, such as novice.el, rely on this-command-keys ;; including M-x COMMAND-NAME RET. (set--this-command-keys (concat "\M-x" (symbol-name function) "\r")) (setq this-command function) ;; Normally `real-this-command' should never be changed, but here we really ;; want to pretend that M-x RET is nothing more than a "key ;; binding" for , so the command the user really wanted to run i= s ;; `function' and not `execute-extended-command'. The difference is ;; visible in cases such as M-x RET and then C-x z (bug#11506). (setq real-this-command function) (let ((prefix-arg prefixarg)) (command-execute function 'record)) ;; If enabled, show which key runs this command. ;; But first wait, and skip the message if there is input. (let* ((waited ;; If this command displayed something in the echo area; ;; wait a few seconds, then display our suggestion message. ;; FIXME: Wait *after* running post-command-hook! ;; FIXME: If execute-extended-command--shorter were ;; faster, we could compute the result here first too. (when (and suggest-key-bindings (or binding (and extended-command-suggest-shorter typed))) (sit-for (cond ((zerop (length (current-message))) 0) ((numberp suggest-key-bindings) suggest-key-bindi= ngs) (t 2)))))) (when (and waited (not (consp unread-command-events))) (unless (or (not extended-command-suggest-shorter) binding executing-kbd-macro (not (symbolp function)) (<=3D (length (symbol-name function)) 2)) ;; There's no binding for CMD. Let's try and find the shortest ;; string to use in M-x. ;; FIXME: Can be slow. Cache it maybe? (while-no-input (setq binding (execute-extended-command--shorter (symbol-name function) typed)))) (when binding ;; This is normally not necessary -- the timer should run ;; immediately, but be defensive and ensure that we never ;; have two of these timers in flight. (when execute-extended-command--binding-timer (cancel-timer execute-extended-command--binding-timer)) (setq execute-extended-command--binding-timer (run-at-time 0 nil (lambda () (with-temp-message (format-message "You can run the command `%s' with= %s" function (if (stringp binding) (concat "M-x " binding " RET") (key-description binding))) (sit-for (if (numberp suggest-key-bindings) suggest-key-bindings 2)))))))))))) (provide 'demo-post-command-hook-slow-with-m-x-commands-v2) ;;; demo-post-command-hook-slow-with-m-x-commands-v2.el ends here ---------------------------------------------------------------------------= ----- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 11:33:38 2021 Received: (at 50042) by debbugs.gnu.org; 18 Aug 2021 15:33:39 +0000 Received: from localhost ([127.0.0.1]:57319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGNZF-0000AD-Cx for submit@debbugs.gnu.org; Wed, 18 Aug 2021 11:33:38 -0400 Received: from s30.dg.net.uk ([91.224.108.30]:37316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGNZA-00009q-89 for 50042@debbugs.gnu.org; Wed, 18 Aug 2021 11:33:24 -0400 Received: from mail-wr1-f54.google.com ([209.85.221.54]:42624) by s30.dg.net.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1mGNZ4-0002Jk-OY for 50042@debbugs.gnu.org; Wed, 18 Aug 2021 16:33:14 +0100 Received: by mail-wr1-f54.google.com with SMTP id q11so4158666wrr.9 for <50042@debbugs.gnu.org>; Wed, 18 Aug 2021 08:33:14 -0700 (PDT) X-Gm-Message-State: AOAM530bc0dv0eXnbFfhsdtJGwA2kHJBxo4jE4x3nXURKO2tKAH2F4e+ jK/YSALBBJjQmLpLyXTU+VmGxsTAb3TqWrlsurQ= X-Google-Smtp-Source: ABdhPJyrw0p2VUejtkWh82G0C9quznIUozUgyS+XeOeTNJKk+XJKUGckNZA+0rhBOGL5QowpRTqoHu5lbLQlY9OYU6o= X-Received: by 2002:adf:e845:: with SMTP id d5mr11725194wrn.228.1629300794279; Wed, 18 Aug 2021 08:33:14 -0700 (PDT) MIME-Version: 1.0 References: <878s13os3a.fsf@gnus.org> In-Reply-To: From: Simon Katz Date: Wed, 18 Aug 2021 16:33:03 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: bug#50042 acknowledged by developer (control message for bug #50042) To: 50042@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s30.dg.net.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nomistech.com X-Get-Message-Sender-Via: s30.dg.net.uk: authenticated_id: non-junk@nomistech.com X-Authenticated-Sender: s30.dg.net.uk: non-junk@nomistech.com X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50042 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: , Reply-To: sk@nomistech.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Oh, I'm really sorry=E2=80=A6 I was playing around and I accidentally left in the `(setq suggest-key-bindings nil)` form. Please remove that in order to reproduce the problem! On Wed, 18 Aug 2021 at 16:27, Simon Katz wrote: > > Hi Lars, > > Thanks for fixing the bug I reported. > > You mentioned that there might be some peculiarities in this > area, and indeed that seems to be the case. > > I still have a problem. If you are interested in what I am trying > to fix, see https://github.com/emacs-lsp/lsp-ui/issues/647 > > Note that everything is fine if I set `suggest-key-bindings` to > `nil`. > > The problems seem to be with commands that both (a) write > messages to the echo area, and (b) have key bindings. > > The code below reproduces the problem. See the comments at the > beginning for instructions. > > > -------------------------------------------------------------------------= ------- > > ;;; demo-post-command-hook-slow-with-m-x-commands-v2.el --- Demo that > post-command hooks are slow with M-x commands -*- > lexical-binding: t; -*- > > ;; This demonstrates an issue with: > ;; `(add-hook 'post-command-hook ...)`. > ;; It's a follow-up to an already-reported and partially-fixed problem --= see > ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D50042 > > ;; To reproduce the problem: > ;; > ;; - Run `emacs -q -l ` > ;; > ;; - Enter `M-x **-msg-cmd-without-key-binding`. > ;; - Observe that it takes many seconds (~15 for me) to produce output to= the > ;; "my-output" buffer, and that the "*Messages*" buffer has the message= : > ;; You can run the command =E2=80=98**-msg-cmd-without-key-binding=E2= =80=99 with > M-x -witho RET > ;; > ;; - Enter `M-x **-msg-cmd-without-key-binding` again. > ;; - Observe that both the "*Messages*" buffer and the "my-output" buffer= update > ;; immediately. > ;; - Repeatedly enter `M-x **-msg-cmd-without-key-binding` and observe th= e same > ;; - result. > ;; > ;; - Enter `M-x **-msg-cmd-with-key-binding`. > ;; - Observe that it takes 2 seconds for output to appear in the "my-outp= ut" > ;; buffer. > ;; - Observe that the behaviour is the same if the command is repeated. > ;; > ;; - Use the `C-c C-c` key binding, to invoke `**-msg-cmd-with-key-bindin= g`. > ;; - Observe that there are no delays. > > > ;; Emacs displays the "*GNU Emacs*" buffer after loading this file, so us= e > ;; `run-at-time` to delay setting up which buffers are displayed. > (run-at-time 1 > nil > (lambda () > (switch-to-buffer "*Messages*" nil t) > (display-buffer (generate-new-buffer "my-output")) > ;; Arrange things so that we see the output as it appears: > (select-window (get-buffer-window "my-output")))) > > (defun date-time () > (format-time-string "%Y-%m-%d %H:%M:%S")) > > (defun post-command-message () > (when (member this-command > '(**-msg-cmd-with-key-binding > **-msg-cmd-without-key-binding)) > (with-current-buffer "my-output" > (goto-char (point-max)) > (insert (date-time) > " The command `" > (format "%s" this-command) > "` was executed\n") > (goto-char (point-max))))) > > (add-hook 'post-command-hook 'post-command-message) > > (defun **-msg-cmd-without-key-binding () > (interactive) > (message "%s Hello from `**-msg-cmd-without-key-binding`" > (date-time))) > > (defun **-msg-cmd-with-key-binding () > (interactive) > (message "%s Hello from `**-msg-cmd-with-key-binding`" > (date-time))) > > (define-key global-map (kbd "C-c C-c") '**-msg-cmd-with-key-binding) > > (setq suggest-key-bindings nil) > > (when t ; Whether to load the changes in Emacs commit 42a98feb5b > > (defvar execute-extended-command--binding-timer nil) > > (defun execute-extended-command (prefixarg &optional command-name typed= ) > ;; Based on Fexecute_extended_command in keyboard.c of Emacs. > ;; Aaron S. Hawley 2009-08-24 > "Read a command name, then read the arguments and call the command. > To pass a prefix argument to the command you are > invoking, give a prefix argument to `execute-extended-command'." > (declare (interactive-only command-execute)) > ;; FIXME: Remember the actual text typed by the user before completio= n, > ;; so that we don't later on suggest the same shortening. > (interactive > (let ((execute-extended-command--last-typed nil)) > (list current-prefix-arg > (read-extended-command) > execute-extended-command--last-typed))) > ;; Emacs<24 calling-convention was with a single `prefixarg' argument= . > (unless command-name > (let ((current-prefix-arg prefixarg) ; for prompt > (execute-extended-command--last-typed nil)) > (setq command-name (read-extended-command)) > (setq typed execute-extended-command--last-typed))) > (let* ((function (and (stringp command-name) (intern-soft command-nam= e))) > (binding (and suggest-key-bindings > (not executing-kbd-macro) > (where-is-internal function overriding-local-map= t)))) > (unless (commandp function) > (error "`%s' is not a valid command name" command-name)) > ;; Some features, such as novice.el, rely on this-command-keys > ;; including M-x COMMAND-NAME RET. > (set--this-command-keys (concat "\M-x" (symbol-name function) "\r")= ) > (setq this-command function) > ;; Normally `real-this-command' should never be changed, but > here we really > ;; want to pretend that M-x RET is nothing more than a "key > ;; binding" for , so the command the user really wanted to run= is > ;; `function' and not `execute-extended-command'. The difference i= s > ;; visible in cases such as M-x RET and then C-x z (bug#11506= ). > (setq real-this-command function) > (let ((prefix-arg prefixarg)) > (command-execute function 'record)) > ;; If enabled, show which key runs this command. > ;; But first wait, and skip the message if there is input. > (let* ((waited > ;; If this command displayed something in the echo area; > ;; wait a few seconds, then display our suggestion message. > ;; FIXME: Wait *after* running post-command-hook! > ;; FIXME: If execute-extended-command--shorter were > ;; faster, we could compute the result here first too. > (when (and suggest-key-bindings > (or binding > (and extended-command-suggest-shorter typed)= )) > (sit-for (cond > ((zerop (length (current-message))) 0) > ((numberp suggest-key-bindings) suggest-key-bin= dings) > (t 2)))))) > (when (and waited (not (consp unread-command-events))) > (unless (or (not extended-command-suggest-shorter) > binding executing-kbd-macro (not (symbolp function)= ) > (<=3D (length (symbol-name function)) 2)) > ;; There's no binding for CMD. Let's try and find the shorte= st > ;; string to use in M-x. > ;; FIXME: Can be slow. Cache it maybe? > (while-no-input > (setq binding (execute-extended-command--shorter > (symbol-name function) typed)))) > (when binding > ;; This is normally not necessary -- the timer should run > ;; immediately, but be defensive and ensure that we never > ;; have two of these timers in flight. > (when execute-extended-command--binding-timer > (cancel-timer execute-extended-command--binding-timer)) > (setq execute-extended-command--binding-timer > (run-at-time > 0 nil > (lambda () > (with-temp-message > (format-message "You can run the command `%s' wi= th %s" > function > (if (stringp binding) > (concat "M-x " binding " RET= ") > (key-description binding))) > (sit-for (if (numberp suggest-key-bindings) > suggest-key-bindings > 2)))))))))))) > > (provide 'demo-post-command-hook-slow-with-m-x-commands-v2) > ;;; demo-post-command-hook-slow-with-m-x-commands-v2.el ends here > > -------------------------------------------------------------------------= ------- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 11:38:02 2021 Received: (at 50042) by debbugs.gnu.org; 18 Aug 2021 15:38:02 +0000 Received: from localhost ([127.0.0.1]:57340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGNdi-0000J9-As for submit@debbugs.gnu.org; Wed, 18 Aug 2021 11:38:02 -0400 Received: from s30.dg.net.uk ([91.224.108.30]:37678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGNdf-0000IX-Kb for 50042@debbugs.gnu.org; Wed, 18 Aug 2021 11:38:00 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:33288) by s30.dg.net.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1mGNda-0002ds-I5 for 50042@debbugs.gnu.org; Wed, 18 Aug 2021 16:37:54 +0100 Received: by mail-wm1-f44.google.com with SMTP id a201-20020a1c7fd2000000b002e6d33447f9so3777929wmd.0 for <50042@debbugs.gnu.org>; Wed, 18 Aug 2021 08:37:54 -0700 (PDT) X-Gm-Message-State: AOAM5304cQpxkPHyMDKsNbb+mpTnqXxo6WdTdi2MA9agpFwTEJxDefii djo20fQCPYflV79RicJWGWHQ2h6xnNcKbghcMbE= X-Google-Smtp-Source: ABdhPJyp7t4wjCh0JREtLQ7Mn+Q6xc5v0+y/PSDLfKdu0YuO13yZ0XQ8V2g6Pz903aZ2SpGdd27KhQCAR1IdHyFEJT0= X-Received: by 2002:a05:600c:1ca7:: with SMTP id k39mr9497894wms.115.1629301074078; Wed, 18 Aug 2021 08:37:54 -0700 (PDT) MIME-Version: 1.0 References: <878s13os3a.fsf@gnus.org> In-Reply-To: From: Simon Katz Date: Wed, 18 Aug 2021 16:37:43 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: bug#50042 acknowledged by developer (control message for bug #50042) To: 50042@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s30.dg.net.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nomistech.com X-Get-Message-Sender-Via: s30.dg.net.uk: authenticated_id: non-junk@nomistech.com X-Authenticated-Sender: s30.dg.net.uk: non-junk@nomistech.com X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50042 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: , Reply-To: sk@nomistech.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) (Just so that you see the new part of the previous message -- apologies for my cack-handedness at driving Gmail with plain text!) Oh, I'm really sorry=E2=80=A6 I was playing around and I accidentally left in the `(setq suggest-key-bindings nil)` form. Please remove that in order to reproduce the problem! From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 09:08:17 2021 Received: (at 50042) by debbugs.gnu.org; 19 Aug 2021 13:08:17 +0000 Received: from localhost ([127.0.0.1]:58799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGhmK-0005vc-7W for submit@debbugs.gnu.org; Thu, 19 Aug 2021 09:08:17 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGhm2-0005up-Oe for 50042@debbugs.gnu.org; Thu, 19 Aug 2021 09:08:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=MkAts4odWnXm2Ki9R7nHYg1XeA+iaWisDaabAPUZrI0=; b=Fr7UW/E0y/RDHn0HuHITt1AN0v yWS2AWfdImNheeGvHTqttDnolWWI7UBXwC2qoWYWkaUXlDOF351/nveZg91yQ4fX6l1di36unUoWQ zr45/mcrZcbgh2b8wSI1KyHAAS/lEIIANowOW4ZI/SdpFG1PnAFGxmB69HZKxBl+jn5o=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mGhls-00066m-8T; Thu, 19 Aug 2021 15:07:52 +0200 From: Lars Ingebrigtsen To: Simon Katz Subject: Re: bug#50042: acknowledged by developer (control message for bug #50042) References: <878s13os3a.fsf@gnus.org> Date: Thu, 19 Aug 2021 15:07:47 +0200 In-Reply-To: (Simon Katz's message of "Wed, 18 Aug 2021 16:37:43 +0100") Message-ID: <87lf4x8twc.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; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Simon Katz writes: > (Just so that you see the new part of the previous > message -- apologies for my cack-handedness at > driving Gmail with plain text!) > > Oh, I'm really sorry… > > I was playing around and I accid [...] 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: 50042 Cc: 50042@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 (---) Simon Katz writes: > (Just so that you see the new part of the previous > message -- apologies for my cack-handedness at > driving Gmail with plain text!) > > Oh, I'm really sorry=E2=80=A6 > > I was playing around and I accidentally left in the > `(setq suggest-key-bindings nil)` form. > > Please remove that in order to reproduce the problem! The file for reproducing the problem was apparently mangled during transmission, too. Can you re-send the file as an attachment? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 10:56:20 2021 Received: (at 50042) by debbugs.gnu.org; 19 Aug 2021 14:56:20 +0000 Received: from localhost ([127.0.0.1]:60612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGjSu-0002sw-4K for submit@debbugs.gnu.org; Thu, 19 Aug 2021 10:56:20 -0400 Received: from s30.dg.net.uk ([91.224.108.30]:57734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGjSs-0002sg-A3 for 50042@debbugs.gnu.org; Thu, 19 Aug 2021 10:56:18 -0400 Received: from mail-wm1-f51.google.com ([209.85.128.51]:55839) by s30.dg.net.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1mGjSk-0002u7-GH for 50042@debbugs.gnu.org; Thu, 19 Aug 2021 15:56:10 +0100 Received: by mail-wm1-f51.google.com with SMTP id w24so3995764wmi.5 for <50042@debbugs.gnu.org>; Thu, 19 Aug 2021 07:56:09 -0700 (PDT) X-Gm-Message-State: AOAM530QCxJvZgLlQLA2K+PEhPlOcMLgYArK6PptLuquWZEPybXG6Z0Y iKkcDQMzKuXAyDzyQGfDmRY5Xq/Q9acOhrdUVSQ= X-Google-Smtp-Source: ABdhPJw2GOosMghxbPkLHOzn1Yk9+Tyd5r29LPkmYbhNFUtis1swxKZwXBXi+e9knfRgsCT6/uTHXYzMJMi1HhgHKtU= X-Received: by 2002:a05:600c:b52:: with SMTP id k18mr14107887wmr.46.1629384969798; Thu, 19 Aug 2021 07:56:09 -0700 (PDT) MIME-Version: 1.0 References: <878s13os3a.fsf@gnus.org> <87lf4x8twc.fsf@gnus.org> In-Reply-To: <87lf4x8twc.fsf@gnus.org> From: Simon Katz Date: Thu, 19 Aug 2021 15:55:58 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: bug#50042: acknowledged by developer (control message for bug #50042) To: Lars Ingebrigtsen Content-Type: multipart/mixed; boundary="00000000000054a18105c9eac01b" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s30.dg.net.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nomistech.com X-Get-Message-Sender-Via: s30.dg.net.uk: authenticated_id: non-junk@nomistech.com X-Authenticated-Sender: s30.dg.net.uk: non-junk@nomistech.com X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50042 Cc: 50042@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: , Reply-To: sk@nomistech.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --00000000000054a18105c9eac01b Content-Type: text/plain; charset="UTF-8" > The file for reproducing the problem was apparently mangled during > transmission, too. Can you re-send the file as an attachment? Sure. Please find it attached. --00000000000054a18105c9eac01b Content-Type: application/octet-stream; name="demo-post-command-hook-slow-with-m-x-commands-v2.el" Content-Disposition: attachment; filename="demo-post-command-hook-slow-with-m-x-commands-v2.el" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_ksj1qe8m0 Ozs7IGRlbW8tcG9zdC1jb21tYW5kLWhvb2stc2xvdy13aXRoLW0teC1jb21tYW5kcy12Mi5lbCAt LS0gRGVtbyB0aGF0IHBvc3QtY29tbWFuZCBob29rcyBhcmUgc2xvdyB3aXRoIE0teCBjb21tYW5k cyAgICAgIC0qLSBsZXhpY2FsLWJpbmRpbmc6IHQ7IC0qLQoKOzsgVGhpcyBkZW1vbnN0cmF0ZXMg YW4gaXNzdWUgd2l0aDoKOzsgICBgKGFkZC1ob29rICdwb3N0LWNvbW1hbmQtaG9vayAuLi4pYC4K OzsgSXQncyBhIGZvbGxvdy11cCB0byBhbiBhbHJlYWR5LXJlcG9ydGVkIGFuZCBwYXJ0aWFsbHkt Zml4ZWQgcHJvYmxlbSAtLSBzZWUKOzsgaHR0cHM6Ly9kZWJidWdzLmdudS5vcmcvY2dpL2J1Z3Jl cG9ydC5jZ2k/YnVnPTUwMDQyCgo7OyBUbyByZXByb2R1Y2UgdGhlIHByb2JsZW06Cjs7Cjs7IC0g UnVuIGBlbWFjcyAtcSAtbCA8dGhpcy1maWxlPmAKOzsKOzsgLSBFbnRlciBgTS14ICoqLW1zZy1j bWQtd2l0aG91dC1rZXktYmluZGluZ2AuCjs7IC0gT2JzZXJ2ZSB0aGF0IGl0IHRha2VzIG1hbnkg c2Vjb25kcyAofjE1IGZvciBtZSkgdG8gcHJvZHVjZSBvdXRwdXQgdG8gdGhlCjs7ICAgIm15LW91 dHB1dCIgYnVmZmVyLCBhbmQgdGhhdCB0aGUgIipNZXNz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LWF0LXRpbWVgIHRvIGRlbGF5IHNldHRpbmcgdXAgd2hpY2ggYnVm ZmVycyBhcmUgZGlzcGxheWVkLgoocnVuLWF0LXRpbWUgMQogICAgICAgICAgICAgbmlsCiAgICAg ICAgICAgICAobGFtYmRhICgpCiAgICAgICAgICAgICAgIChzd2l0Y2gtdG8tYnVmZmVyICIqTWVz c2FnZXMqIiBuaWwgdCkKICAgICAgICAgICAgICAgKGRpc3BsYXktYnVmZmVyIChnZW5lcmF0ZS1u ZXctYnVmZmVyICJteS1vdXRwdXQiKSkKICAgICAgICAgICAgICAgOzsgQXJyYW5nZSB0aGluZ3Mg c28gdGhhdCB3ZSBzZWUgdGhlIG91dHB1dCBhcyBpdCBhcHBlYXJzOgogICAgICAgICAgICAgICAo c2VsZWN0LXdpbmRvdyAoZ2V0LWJ1ZmZlci13aW5kb3cgIm15LW91dHB1dCIpKSkpCgooZGVmdW4g ZGF0ZS10aW1lICgpCiAgKGZvcm1hdC10aW1lLXN0cmluZyAiJVktJW0tJWQgJUg6JU06JVMiKSkK CihkZWZ1biBwb3N0LWNvbW1hbmQtbWVzc2FnZSAoKQogICh3aGVuIChtZW1iZXIgdGhpcy1jb21t YW5kCiAgICAgICAgICAgICAgICAnKCoqLW1zZy1jbWQtd2l0aC1rZXktYmluZGluZwogICAgICAg ICAgICAgICAgICAqKi1tc2ctY21kLXdpdGhvdXQta2V5LWJpbmRpbmcpKQogICAgKHdpdGgtY3Vy cmVudC1idWZmZXIgIm15LW91dHB1dCIKICAgICAgKGdvdG8tY2hhciAocG9pbnQtbWF4KSkKICAg ICAgKGluc2VydCAoZGF0ZS10aW1lKQogICAgICAgICAgICAgICIgVGhlIGNvbW1hbmQgYCIKICAg ICAgICAgICAgICAoZm9ybWF0ICIlcyIgdGhpcy1jb21tYW5kKQogICAgICAgICAgICAgICJgIHdh cyBleGVjdXRlZFxuIikKICAgICAgKGdvdG8tY2hhciAocG9pbnQtbWF4KSkpKSkKCihhZGQtaG9v ayAncG9zd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WQtY29tbWFu ZC1zdWdnZXN0LXNob3J0ZXIgdHlwZWQpKSkKICAgICAgICAgICAgICAgIChzaXQtZm9yIChjb25k CiAgICAgICAgICAgICAgICAgICAgICAgICAgKCh6ZXJvcCAobGVuZ3RoIChjdXJyZW50LW1lc3Nh Z2UpKSkgMCkKICAgICAgICAgICAgICAgICAgICAgICAgICAoKG51bWJlcnAgc3VnZ2VzdC1rZXkt YmluZGluZ3MpIHN1Z2dlc3Qta2V5LWJpbmRpbmdzKQogICAgICAgICAgICAgICAgICAgICAgICAg ICh0IDIpKSkpKSkKICAgICAgICAod2hlbiAoYW5kIHdhaXRlZCAobm90IChjb25zcCB1bnJlYWQt Y29tbWFuZC1ldmVudHMpKSkKICAgICAgICAgICh1bmxlc3MgKG9yIChub3QgZXh0ZW5kZWQtY29t bWFuZC1zdWdnZXN0LXNob3J0ZXIpCiAgICAgICAgICAgICAgICAgICAgICBiaW5kaW5nIGV4ZWN1 dGluZy1rYmQtbWFjcm8gKG5vdCAoc3ltYm9scCBmdW5jdGlvbikpCiAgICAgICAgICAgICAgICAg ICAgICAoPD0gKGxlbmd0aCAoc3ltYm9sLW5hbWUgZnVuY3Rpb24pKSAyKSkKICAgICAgICAgICAg OzsgVGhlcmUncyBubyBiaW5kaW5nIGZvciBDTUQuICBMZXQncyB0cnkgYW5kIGZpbmQgdGhlIHNo b3J0ZXN0CiAgICAgICAgICAgIDs7IHN0cmluZyB0byB1c2UgaW4gTS14LgogICAgICAgICAgICA7 OyBGSVhNRTogQ2FuIGJlIHNsb3cuICBDYWNoZSBpdCBtYXliZT8KICAgICAgICAgICAgKHdoaWxl LW5vLWlucHV0CiAgICAgICAgICAgICAgKHNldHEgYmluZGluZyAoZXhlY3V0ZS1leHRlbmRlZC1j b21tYW5kLS1zaG9ydGVyCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHN5bWJvbC1uYW1l IGZ1bmN0aW9uKSB0eXBlZCkpKSkKICAgICAgICAgICh3aGVuIGJpbmRpbmcKICAgICAgICAgICAg OzsgVGhpcyBpcyBub3JtYWxseSBub3QgbmVjZXNzYXJ5IC0tIHRoZSB0aW1lciBzaG91bGQgcnVu CiAgICAgICAgICAgIDs7IGltbWVkaWF0ZWx5LCBidXQgYmUgZGVmZW5zaXZlIGFuZCBlbnN1cmUg dGhhdCB3ZSBuZXZlcgogICAgICAgICAgICA7OyBoYXZlIHR3byBvZiB0aGVzZSB0aW1lcnMgaW4g ZmxpZ2h0LgogICAgICAgICAgICAod2hlbiBleGVjdXRlLWV4dGVuZGVkLWNvbW1hbmQtLWJpbmRp bmctdGltZXIKICAgICAgICAgICAgICAoY2FuY2VsLXRpbWVyIGV4ZWN1dGUtZXh0ZW5kZWQtY29t bWFuZC0tYmluZGluZy10aW1lcikpCiAgICAgICAgICAgIChzZXRxIGV4ZWN1dGUtZXh0ZW5kZWQt Y29tbWFuZC0tYmluZGluZy10aW1lcgogICAgICAgICAgICAgICAgICAocnVuLWF0LXRpbWUKICAg ICAgICAgICAgICAgICAgIDAgbmlsCiAgICAgICAgICAgICAgICAgICAobGFtYmRhICgpCiAgICAg ICAgICAgICAgICAgICAgICh3aXRoLXRlbXAtbWVzc2FnZQogICAgICAgICAgICAgICAgICAgICAg ICAgKGZvcm1hdC1tZXNzYWdlICJZb3UgY2FuIHJ1biB0aGUgY29tbWFuZCBgJXMnIHdpdGggJXMi CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24KICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaWYgKHN0cmluZ3AgYmluZGluZykK ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNvbmNhdCAiTS14 ICIgYmluZGluZyAiIFJFVCIpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAoa2V5LWRlc2NyaXB0aW9uIGJpbmRpbmcpKSkKICAgICAgICAgICAgICAgICAgICAgICAo c2l0LWZvciAoaWYgKG51bWJlcnAgc3VnZ2VzdC1rZXktYmluZGluZ3MpCiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHN1Z2dlc3Qta2V5LWJpbmRpbmdzCiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAyKSkpKSkpKSkpKSkpCgoocHJvdmlkZSAnZGVtby1wb3N0LWNv bW1hbmQtaG9vay1zbG93LXdpdGgtbS14LWNvbW1hbmRzLXYyKQo7OzsgZGVtby1wb3N0LWNvbW1h bmQtaG9vay1zbG93LXdpdGgtbS14LWNvbW1hbmRzLXYyLmVsIGVuZHMgaGVyZQo= --00000000000054a18105c9eac01b-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 09:10:09 2021 Received: (at 50042) by debbugs.gnu.org; 20 Aug 2021 13:10:09 +0000 Received: from localhost ([127.0.0.1]:33243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH4Hg-00039J-Hf for submit@debbugs.gnu.org; Fri, 20 Aug 2021 09:10:08 -0400 Received: from quimby.gnus.org ([95.216.78.240]:59970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH4He-00038f-L8 for 50042@debbugs.gnu.org; Fri, 20 Aug 2021 09:10:07 -0400 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:Date:References: In-Reply-To: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=JKSfeyzgqOGQBcYZJGACkFyWzLGFNXvoN+2za6u/drw=; b=Ttnw/ykwKZyXbucg3tdKT+WvVO ry8iF+JprrCIgQ/4Xx0etFMronskQajBLHJuG8wlAZ7sLNf5Tw/a+22B8GdPukvP/M0q1L0b8RFC6 bxr2fKgtZUcKq0PBQKeT+nQnK5aQ0V5g18PBHmL6S96kb/lP//aS5EhIwleiI0VaeGsY=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mH4HT-0004G4-Bc; Fri, 20 Aug 2021 15:09:59 +0200 From: Lars Ingebrigtsen To: Simon Katz Subject: Re: bug#50042: acknowledged by developer (control message for bug #50042) In-Reply-To: (Simon Katz's message of "Thu, 19 Aug 2021 15:55:58 +0100") References: <878s13os3a.fsf@gnus.org> <87lf4x8twc.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Fri, 20 Aug 2021 15:09:53 +0200 Message-ID: <87mtpc8dpa.fsf@gnus.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: Simon Katz writes: >> The file for reproducing the problem was apparently mangled during >> transmission, too. Can you re-send the file as an attachment? > > Sure. Please find it attached. 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: -2.3 (--) X-Debbugs-Envelope-To: 50042 Cc: 50042@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 (---) --=-=-= Content-Type: text/plain Simon Katz writes: >> The file for reproducing the problem was apparently mangled during >> transmission, too. Can you re-send the file as an attachment? > > Sure. Please find it attached. Thanks. When I hoisted the final waiting from the command, I totally didn't notice that there was even more waiting there (in the case of a command that had displayed a message). I've now tweaked this further, and it now seems to work correctly in all the message/no keybinding/keybinding cases, I think... Can you test this, too, to see if I got all the cases right? That is, it shouldn't display anything if you do anything else before the suggestion triggers, and it shouldn't inhibit entering other commands, and... er... no other peculiarities. One thing that is peculiar, but no more than before, is this bit: ;; FIXME: Can be slow. Cache it maybe? (setq binding (execute-extended-command--shorter (symbol-name function) typed)))) It takes five seconds on my laptop, which means that these suggestion arrive five seconds after I did the `M-x'. But that hasn't changed since before these patches. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=demo-post-command-hook-slow-with-m-x-commands-v2.el Content-Transfer-Encoding: quoted-printable (run-at-time 1 nil (lambda () (switch-to-buffer "*Messages*" nil t) (display-buffer (generate-new-buffer "my-output")) ;; Arrange things so that we see the output as it appears: (select-window (get-buffer-window "my-output")))) (defun date-time () (format-time-string "%Y-%m-%d %H:%M:%S")) (defun post-command-message () (when (member this-command '(**-msg-cmd-with-key-binding **-msg-cmd-without-key-binding **-msg-cmd-with-no-message)) (with-current-buffer "my-output" (goto-char (point-max)) (insert (date-time) " The command `" (format "%s" this-command) "` was executed\n") (goto-char (point-max))))) (add-hook 'post-command-hook 'post-command-message) (defun **-msg-cmd-without-key-binding () (interactive) (message "%s Hello from `**-msg-cmd-without-key-binding`" (date-time))) (defun **-msg-cmd-with-key-binding () (interactive) (message "%s Hello from `**-msg-cmd-with-key-binding`" (date-time))) (define-key global-map (kbd "C-c C-c") '**-msg-cmd-with-key-binding) (defun **-msg-cmd-with-no-message () (interactive)) (define-key global-map (kbd "C-c C-c") '**-msg-cmd-with-key-binding) (define-key global-map (kbd "C-c C-d") '**-msg-cmd-with-no-message) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 12:14:57 2021 Received: (at 50042) by debbugs.gnu.org; 20 Aug 2021 16:14:57 +0000 Received: from localhost ([127.0.0.1]:35422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH7AX-0000Cg-CX for submit@debbugs.gnu.org; Fri, 20 Aug 2021 12:14:57 -0400 Received: from s30.dg.net.uk ([91.224.108.30]:57992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH7AV-0000CS-Qy for 50042@debbugs.gnu.org; Fri, 20 Aug 2021 12:14:56 -0400 Received: from mail-wm1-f41.google.com ([209.85.128.41]:42707) by s30.dg.net.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1mH7AO-0003G9-HL for 50042@debbugs.gnu.org; Fri, 20 Aug 2021 17:14:48 +0100 Received: by mail-wm1-f41.google.com with SMTP id w21-20020a7bc1150000b02902e69ba66ce6so6431427wmi.1 for <50042@debbugs.gnu.org>; Fri, 20 Aug 2021 09:14:47 -0700 (PDT) X-Gm-Message-State: AOAM531uwCjAWCtcJc5Vy3pEaFg3bkmkLkIIrD6cjU6IcqAC1/QV93mr 1XkE98/Eqxzo2TVvKdKaN2lGOhMUrTV1HyCTTP8= X-Google-Smtp-Source: ABdhPJwnp8YfGzJp9l2CXJNMJYR0cDKyZp3yXeRPs1wXMSm4yB1/24SMsUf1vFo5wQ5QzRE8iR29+9bnAiS+xyDRV/A= X-Received: by 2002:a05:600c:2f90:: with SMTP id t16mr871184wmn.136.1629476087363; Fri, 20 Aug 2021 09:14:47 -0700 (PDT) MIME-Version: 1.0 References: <878s13os3a.fsf@gnus.org> <87lf4x8twc.fsf@gnus.org> <87mtpc8dpa.fsf@gnus.org> In-Reply-To: <87mtpc8dpa.fsf@gnus.org> From: Simon Katz Date: Fri, 20 Aug 2021 17:14:36 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: bug#50042: acknowledged by developer (control message for bug #50042) To: Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s30.dg.net.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nomistech.com X-Get-Message-Sender-Via: s30.dg.net.uk: authenticated_id: non-junk@nomistech.com X-Authenticated-Sender: s30.dg.net.uk: non-junk@nomistech.com X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50042 Cc: 50042@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: , Reply-To: sk@nomistech.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Lars Ingebrigtsen gnus.org> writes: > Can you test this, too, to see if I got all the cases right? That is, > it shouldn't display anything if you do anything else before the > suggestion triggers, and it shouldn't inhibit entering other commands, > and... er... no other peculiarities. I'm using the version of `execute-extended-command` in commit 00a9c50ad7, and everything is behaving as I would expect. Thanks! > One thing that is peculiar, but no more than before, is this bit: > > ;; FIXME: Can be slow. Cache it maybe? > (setq binding (execute-extended-command--shorter > (symbol-name function) typed)))) > > It takes five seconds on my laptop, which means that these suggestion > arrive five seconds after I did the `M-x'. But that hasn't changed > since before these patches. FWIW, I haven't looked at this -- I'm not sure when it comes into play. But I guess it's a separate issue. Thanks again. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 21 08:55:22 2021 Received: (at 50042) by debbugs.gnu.org; 21 Aug 2021 12:55:22 +0000 Received: from localhost ([127.0.0.1]:36006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHQWv-0000hE-T4 for submit@debbugs.gnu.org; Sat, 21 Aug 2021 08:55:22 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHQWt-0000gy-SH for 50042@debbugs.gnu.org; Sat, 21 Aug 2021 08:55:20 -0400 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=SYuP7sp3vKnNKGeJw6M21fBbOyKstMxRhKgzn5Wm108=; b=MI1sYRPq3/DgyxZ15vHr9Fr26L Qz1AIN/xB/Lh6HXFvYTskV9SsludCa6oPj0BU6ud9Vx5J3Y2+hDD09A5JNvREt857UNf6snS+atHj zLvR29T2EZ/INTNUQQBlBv8+UsSJDLY/jxwaZZJWu67mH/b5/c3XV9eGlhBodzKjOKnw=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mHQWi-0001CJ-Lt; Sat, 21 Aug 2021 14:55:13 +0200 From: Lars Ingebrigtsen To: Simon Katz Subject: Re: bug#50042: acknowledged by developer (control message for bug #50042) References: <878s13os3a.fsf@gnus.org> <87lf4x8twc.fsf@gnus.org> <87mtpc8dpa.fsf@gnus.org> Date: Sat, 21 Aug 2021 14:55:07 +0200 In-Reply-To: (Simon Katz's message of "Fri, 20 Aug 2021 17:14:36 +0100") Message-ID: <87a6lb3ql0.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: Simon Katz writes: > Lars Ingebrigtsen gnus.org> writes: > >> Can you test this, too, to see if I got all the cases right? That is, >> it shouldn't display anything if you do anything else before the >> sugg [...] 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: -2.3 (--) X-Debbugs-Envelope-To: 50042 Cc: 50042@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 (---) Simon Katz writes: > Lars Ingebrigtsen gnus.org> writes: > >> Can you test this, too, to see if I got all the cases right? That is, >> it shouldn't display anything if you do anything else before the >> suggestion triggers, and it shouldn't inhibit entering other commands, >> and... er... no other peculiarities. > > I'm using the version of `execute-extended-command` in commit > 00a9c50ad7, and everything is behaving as I would expect. Thanks for checking. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Aug 16 16:54:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 19 Sep 2021 11:24:05 +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