From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Katsumi Yamaoka Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 13 Oct 2021 01:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: 51173@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163408716223004 (code B ref -1); Wed, 13 Oct 2021 01:07:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Oct 2021 01:06:02 +0000 Received: from localhost ([127.0.0.1]:56473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maSiX-0005yv-Pm for submit@debbugs.gnu.org; Tue, 12 Oct 2021 21:06:02 -0400 Received: from lists.gnu.org ([209.51.188.17]:52180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maSiV-0005yg-SZ for submit@debbugs.gnu.org; Tue, 12 Oct 2021 21:06:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maSiV-0005qy-O7 for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 21:05:59 -0400 Received: from bumble.maple.relay.mailchannels.net ([23.83.214.25]:54263) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maSiT-0006tv-VO for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 21:05:59 -0400 X-Sender-Id: tih5qno0ow|x-authuser|yamaoka@cloud1.hostforweb.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 274A43624EE; Wed, 13 Oct 2021 01:05:55 +0000 (UTC) Received: from cloud1.hostforweb.net (100-96-16-65.trex.outbound.svc.cluster.local [100.96.16.65]) (Authenticated sender: tih5qno0ow) by relay.mailchannels.net (Postfix) with ESMTPA id 6B15D361DEB; Wed, 13 Oct 2021 01:05:54 +0000 (UTC) X-Sender-Id: tih5qno0ow|x-authuser|yamaoka@cloud1.hostforweb.net Received: from cloud1.hostforweb.net (cloud1.hostforweb.net [154.16.119.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.16.65 (trex/6.4.3); Wed, 13 Oct 2021 01:05:54 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: tih5qno0ow|x-authuser|yamaoka@cloud1.hostforweb.net X-MailChannels-Auth-Id: tih5qno0ow X-Little-Absorbed: 5fa7b8071f62714a_1634087154828_4009521334 X-MC-Loop-Signature: 1634087154828:1237495975 X-MC-Ingress-Time: 1634087154828 Received: from [157.205.200.190] (port=64231 helo=localhost) by cloud1.hostforweb.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1maSiO-005iIr-Mz; Tue, 12 Oct 2021 21:05:53 -0400 Date: Wed, 13 Oct 2021 10:05:48 +0900 Message-ID: From: Katsumi Yamaoka Organization: Emacsen advocacy group X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (x86_64-pc-cygwin) Cancel-Lock: sha1:wABadqWskSMbrocvm+POLBvPFlc= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-AuthUser: yamaoka@cloud1.hostforweb.net Received-SPF: pass client-ip=23.83.214.25; envelope-from=yamaoka@jpl.org; helo=bumble.maple.relay.mailchannels.net 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_TVD_MIME_NO_HEADERS=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) 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: -2.4 (--) --=-=-= Hi, The following example program returns `sh-case' on Emacs 27 and olders, however to make it work on Emacs 28 and 29 the third line has to be uncommented. So does `describe-key' case. (with-temp-buffer (sh-mode) ;;(set-window-buffer nil (current-buffer)) (describe-key-briefly "\C-c\C-c")) I don't know when/why those commands were changed to require the buffer (where the keymap is) to be visited in the selected window, but now `gnus-article-describe-key\(-briefly\)?' doesn't work because of this. A patch to gnus-art.el is attached, though the one that should be fixed might be help.el. Thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- gnus-art.el~ 2021-10-06 01:11:50.777999500 +0000 +++ gnus-art.el 2021-10-13 01:04:18.073219200 +0000 @@ -6854,19 +6854,24 @@ (read-key-sequence "Describe key: "))) gnus-article-mode) (gnus-article-check-buffer) - (if (memq (key-binding key t) '(gnus-article-read-summary-keys - gnus-article-read-summary-send-keys)) - (with-current-buffer gnus-article-current-summary - (setq unread-command-events - (nconc - (mapcar (lambda (x) (if (and (integerp x) (>= x 128)) - (list 'meta (- x 128)) - x)) - key) - unread-command-events)) - (let ((cursor-in-echo-area t) - gnus-pick-mode) - (describe-key (read-key-sequence nil t)))) + (if (and (memq (key-binding key t) '(gnus-article-read-summary-keys + gnus-article-read-summary-send-keys)) + (buffer-live-p gnus-article-current-summary)) + (let ((artbuf (current-buffer))) + (unwind-protect + (progn + (set-window-buffer nil gnus-article-current-summary) + (setq unread-command-events + (nconc + (mapcar (lambda (x) (if (and (integerp x) (>= x 128)) + (list 'meta (- x 128)) + x)) + key) + unread-command-events)) + (let ((cursor-in-echo-area t) + gnus-pick-mode) + (describe-key (read-key-sequence nil t)))) + (set-window-buffer nil artbuf))) (describe-key key))) (defun gnus-article-describe-key-briefly (key &optional insert) @@ -6877,19 +6882,24 @@ current-prefix-arg) gnus-article-mode) (gnus-article-check-buffer) - (if (memq (key-binding key t) '(gnus-article-read-summary-keys - gnus-article-read-summary-send-keys)) - (with-current-buffer gnus-article-current-summary - (setq unread-command-events - (nconc - (mapcar (lambda (x) (if (and (integerp x) (>= x 128)) - (list 'meta (- x 128)) - x)) - key) - unread-command-events)) - (let ((cursor-in-echo-area t) - gnus-pick-mode) - (describe-key-briefly (read-key-sequence nil t) insert))) + (if (and (memq (key-binding key t) '(gnus-article-read-summary-keys + gnus-article-read-summary-send-keys)) + (buffer-live-p gnus-article-current-summary)) + (let ((artbuf (current-buffer))) + (unwind-protect + (progn + (set-window-buffer nil gnus-article-current-summary) + (setq unread-command-events + (nconc + (mapcar (lambda (x) (if (and (integerp x) (>= x 128)) + (list 'meta (- x 128)) + x)) + key) + unread-command-events)) + (let ((cursor-in-echo-area t) + gnus-pick-mode) + (describe-key-briefly (read-key-sequence nil t) insert))) + (set-window-buffer nil artbuf))) (describe-key-briefly key insert))) ;;`gnus-agent-mode' in gnus-agent.el will define it. --=-=-=-- From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 13 Oct 2021 12:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Katsumi Yamaoka Cc: Stefan Monnier , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163412639327312 (code B ref 51173); Wed, 13 Oct 2021 12:00:03 +0000 Received: (at 51173) by debbugs.gnu.org; 13 Oct 2021 11:59:53 +0000 Received: from localhost ([127.0.0.1]:58752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1macvI-00076R-MZ for submit@debbugs.gnu.org; Wed, 13 Oct 2021 07:59:52 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1macvG-000767-B3 for 51173@debbugs.gnu.org; Wed, 13 Oct 2021 07:59:50 -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=F4fGlABfiTeTLO9P85XoLX/NbRlif5RKR7Kzc7yJIKA=; b=p8VNUvgj6sEOm+rrqALx9uSwpc uRbcNCNxJiODJAnN9aU7Elsl6OouMecIsGEFOybcz9aV3q48+1rkhaapGp7c//wwYR8OZFMUbMxmO mYIjZ8wzrVK8F9VL91ENHpo9WsPSg2coPZjsUxnKYW2iiOwbVmA273M6q+N/1lY+H6NE=; 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 1macv5-0007sd-Iv; Wed, 13 Oct 2021 13:59:42 +0200 From: Lars Ingebrigtsen References: X-Now-Playing: Sylvester's _Sylvester-Step II_: "I Took My Strength From You" Date: Wed, 13 Oct 2021 13:59:39 +0200 In-Reply-To: (Katsumi Yamaoka's message of "Wed, 13 Oct 2021 10:05:48 +0900") Message-ID: <87h7dl6spg.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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: Katsumi Yamaoka writes: > The following example program returns `sh-case' on Emacs 27 and > olders, however to make it work on Emacs 28 and 29 the third > line has to be uncommented. So does `describe-key' case. > > (with-te [...] 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-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 (---) Katsumi Yamaoka writes: > The following example program returns `sh-case' on Emacs 27 and > olders, however to make it work on Emacs 28 and 29 the third > line has to be uncommented. So does `describe-key' case. > > (with-temp-buffer > (sh-mode) > ;;(set-window-buffer nil (current-buffer)) > (describe-key-briefly "\C-c\C-c")) > > I don't know when/why those commands were changed to require the > buffer (where the keymap is) to be visited in the selected window, > but now `gnus-article-describe-key\(-briefly\)?' doesn't work > because of this. A patch to gnus-art.el is attached, though the > one that should be fixed might be help.el. I think this sounds like a bug in describe-key*, so perhaps it should be fixed there? Looking at the history, I'm not at all sure what caused this regression, but perhaps it's: commit 9d4af3e6bdfac374f6c9591566c010e6a1514751 Author: Stefan Monnier AuthorDate: Tue Jan 30 11:57:40 2018 -0500 I've added Stefan to the CCs. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 13 Oct 2021 16:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: Katsumi Yamaoka , Stefan Monnier , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163414294624284 (code B ref 51173); Wed, 13 Oct 2021 16:36:02 +0000 Received: (at 51173) by debbugs.gnu.org; 13 Oct 2021 16:35:46 +0000 Received: from localhost ([127.0.0.1]:33188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mahEI-0006Jc-I0 for submit@debbugs.gnu.org; Wed, 13 Oct 2021 12:35:46 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:44037) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mahEG-0006JC-8e for 51173@debbugs.gnu.org; Wed, 13 Oct 2021 12:35:44 -0400 Received: (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 63AB3C0008; Wed, 13 Oct 2021 16:35:34 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87h7dl6spg.fsf@gnus.org> Date: Wed, 13 Oct 2021 19:33:30 +0300 In-Reply-To: <87h7dl6spg.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 13 Oct 2021 13:59:39 +0200") Message-ID: <87r1cox4th.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) >> The following example program returns `sh-case' on Emacs 27 and >> olders, however to make it work on Emacs 28 and 29 the third >> line has to be uncommented. So does `describe-key' case. >> >> (with-temp-buffer >> (sh-mode) >> ;;(set-window-buffer nil (current-buffer)) >> (describe-key-briefly "\C-c\C-c")) >> >> I don't know when/why those commands were changed to require the >> buffer (where the keymap is) to be visited in the selected window, >> but now `gnus-article-describe-key\(-briefly\)?' doesn't work >> because of this. A patch to gnus-art.el is attached, though the >> one that should be fixed might be help.el. > > I think this sounds like a bug in describe-key*, so perhaps it should be > fixed there? Looking at the history, I'm not at all sure what caused > this regression, but perhaps it's: > > commit 9d4af3e6bdfac374f6c9591566c010e6a1514751 > Author: Stefan Monnier > AuthorDate: Tue Jan 30 11:57:40 2018 -0500 > > I've added Stefan to the CCs. I think this is mea culpa - commit 2d1564103e. It was changed to handle context menu clicks in the displayed window. From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 13 Oct 2021 17:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: Katsumi Yamaoka , Stefan Monnier , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.16341463966413 (code B ref 51173); Wed, 13 Oct 2021 17:34:02 +0000 Received: (at 51173) by debbugs.gnu.org; 13 Oct 2021 17:33:16 +0000 Received: from localhost ([127.0.0.1]:33303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mai7w-0001fN-EA for submit@debbugs.gnu.org; Wed, 13 Oct 2021 13:33:16 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:57019) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mai7u-0001ev-Cr for 51173@debbugs.gnu.org; Wed, 13 Oct 2021 13:33:15 -0400 Received: (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id E530324000A; Wed, 13 Oct 2021 17:33:04 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> Date: Wed, 13 Oct 2021 20:24:42 +0300 In-Reply-To: <87r1cox4th.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 13 Oct 2021 19:33:30 +0300") Message-ID: <87h7dkx2g5.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) > I think this is mea culpa - commit 2d1564103e. > It was changed to handle context menu clicks > in the displayed window. This patch should handle only mouse events specially: diff --git a/lisp/help.el b/lisp/help.el index fa4eaee417..956a3d0d32 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -699,7 +699,10 @@ help--analyze-key ;; is selected from the context menu that should describe KEY ;; at the position of mouse click that opened the context menu. ;; When no mouse was involved, it defaults to window-point. - (defn (save-excursion (mouse-set-point event) (key-binding key t)))) + (defn (if (consp event) + (save-excursion + (mouse-set-point event) (key-binding key t)) + (key-binding key t)))) ;; Handle the case where we faked an entry in "Select and Paste" menu. (when (and (eq defn nil) (stringp (aref key (1- (length key)))) -- From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 13 Oct 2021 18:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Juri Linkov Cc: Katsumi Yamaoka , Stefan Monnier , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163415098225608 (code B ref 51173); Wed, 13 Oct 2021 18:50:01 +0000 Received: (at 51173) by debbugs.gnu.org; 13 Oct 2021 18:49:42 +0000 Received: from localhost ([127.0.0.1]:33425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1majJu-0006ey-4M for submit@debbugs.gnu.org; Wed, 13 Oct 2021 14:49:42 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1majJr-0006eV-FE for 51173@debbugs.gnu.org; Wed, 13 Oct 2021 14:49: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=+qYEyko8pVELG7Nir+tXGlEO6c3zQ1fbeYw94IrzWzk=; b=lABkUEtqHaRStw7oUl09KCIlLG 9PtYCZqPlmFsmmH2ta1+yImaIm8XuuPuBrjfJpOrkQjtnuOwS4MURBVDLIEadzWwt7VjZ0bZAjWRv g0dR/uRF46xkYwxBfmMfPjdQEuXSMpX8feBTYKpOAy/xc9geH50EDhy7tqIPnPpwZ9lU=; 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 1majJf-0002Sp-OI; Wed, 13 Oct 2021 20:49:30 +0200 From: Lars Ingebrigtsen References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> X-Now-Playing: Dntel's _Away_: "Fleeting Feeling" Date: Wed, 13 Oct 2021 20:49:26 +0200 In-Reply-To: <87h7dkx2g5.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 13 Oct 2021 20:24:42 +0300") Message-ID: <87k0ig3gll.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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: Juri Linkov writes: > This patch should handle only mouse events specially: The patch makes both the with-temp-buffer test case as well as `C-h k' work in Gnus article buffers, so it seems to fix the problem. 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-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 (---) Juri Linkov writes: > This patch should handle only mouse events specially: The patch makes both the with-temp-buffer test case as well as `C-h k' work in Gnus article buffers, so it seems to fix the problem. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 13 Oct 2021 19:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: Katsumi Yamaoka , Stefan Monnier , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163415276030744 (code B ref 51173); Wed, 13 Oct 2021 19:20:02 +0000 Received: (at 51173) by debbugs.gnu.org; 13 Oct 2021 19:19:20 +0000 Received: from localhost ([127.0.0.1]:33485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1majma-0007zn-3t for submit@debbugs.gnu.org; Wed, 13 Oct 2021 15:19:20 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:45391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1majmX-0007zL-KL; Wed, 13 Oct 2021 15:19:18 -0400 Received: (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 0508F100002; Wed, 13 Oct 2021 19:19:08 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87k0ig3gll.fsf@gnus.org> Date: Wed, 13 Oct 2021 22:18:01 +0300 In-Reply-To: <87k0ig3gll.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 13 Oct 2021 20:49:26 +0200") Message-ID: <87ee8o91jq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) close 51173 28.0.60 quit >> This patch should handle only mouse events specially: > > The patch makes both the with-temp-buffer test case as well as `C-h k' > work in Gnus article buffers, so it seems to fix the problem. So now pushed to emacs-28. From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 13 Oct 2021 20:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Juri Linkov Cc: Lars Ingebrigtsen , Katsumi Yamaoka , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163415532414193 (code B ref 51173); Wed, 13 Oct 2021 20:03:02 +0000 Received: (at 51173) by debbugs.gnu.org; 13 Oct 2021 20:02:04 +0000 Received: from localhost ([127.0.0.1]:33634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1makRv-0003gm-DS for submit@debbugs.gnu.org; Wed, 13 Oct 2021 16:02:03 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:40490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1makRs-0003fr-GT for 51173@debbugs.gnu.org; Wed, 13 Oct 2021 16:02:02 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7D68B80303; Wed, 13 Oct 2021 16:01:54 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 22E9A80084; Wed, 13 Oct 2021 16:01:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1634155313; bh=t6yXDhzybtpvQYJsQOkiQORE2F9kUd2ySKxVjrNL9xE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=S3bgyw83vwzkRJMIvgxPfWjW5fEEpCtSBML9lCWHZxwNJtaQR+JThd+Ji2aG5/ylB NQC0fvo2Zs+QH3Mpv1YyKHl/0SUK8YYspkJyLtZcU8zWQrcXSS+F/o7+YC2rjIgTaU x0erMQAV9uGLamhtA5+d6JcvQqKjZBd9CbMmVuDrHhBl9s/bSnqzCNoo41TyszwR9c nOH2xS+YuabtkweTGI2YB/XrxJVtxRDn1ZpKo6j0dmV9vGYFy9zpav7JFXepAkzhnZ hATEsUMrdMmWH0HbxaXhPlzgsVL0LKUVFWu3UROY6DOUM2tGd4BjL16BcSPi8l73rn UfudhtOJOztLw== Received: from pastel (unknown [45.72.241.23]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9BEBA1203B5; Wed, 13 Oct 2021 16:01:52 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> Date: Wed, 13 Oct 2021 16:01:51 -0400 In-Reply-To: <87h7dkx2g5.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 13 Oct 2021 20:24:42 +0300") 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.066 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-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 (---) >> I think this is mea culpa - commit 2d1564103e. >> It was changed to handle context menu clicks >> in the displayed window. > > This patch should handle only mouse events specially: > > diff --git a/lisp/help.el b/lisp/help.el > index fa4eaee417..956a3d0d32 100644 > --- a/lisp/help.el > +++ b/lisp/help.el > @@ -699,7 +699,10 @@ help--analyze-key > ;; is selected from the context menu that should describe KEY > ;; at the position of mouse click that opened the context menu. > ;; When no mouse was involved, it defaults to window-point. > - (defn (save-excursion (mouse-set-point event) (key-binding key t)))) > + (defn (if (consp event) > + (save-excursion > + (mouse-set-point event) (key-binding key t)) > + (key-binding key t)))) > ;; Handle the case where we faked an entry in "Select and Paste" menu. > (when (and (eq defn nil) > (stringp (aref key (1- (length key)))) But this will still use "the wrong buffer" for mouse clicks, no? BTW, maybe a cleaner fix would be as follows: - Add a `buffer` argument to `describe-key(-briefly)`. - Pass that argument from `gnus-article-describe-key`. And to get the behavior that Juri just pushed that `buffer` argument would default to (if (consp event) (window-buffer (posn-window (event-start event))) (current-buffere)). Stefan From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Thu, 14 Oct 2021 16:18:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Stefan Monnier Cc: Lars Ingebrigtsen , Katsumi Yamaoka , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163422826319088 (code B ref 51173); Thu, 14 Oct 2021 16:18:03 +0000 Received: (at 51173) by debbugs.gnu.org; 14 Oct 2021 16:17:43 +0000 Received: from localhost ([127.0.0.1]:36936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mb3QN-0004xo-9l for submit@debbugs.gnu.org; Thu, 14 Oct 2021 12:17:43 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:40295) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mb3QM-0004xa-71 for 51173@debbugs.gnu.org; Thu, 14 Oct 2021 12:17:42 -0400 Received: (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id E47511BF205; Thu, 14 Oct 2021 16:17:33 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> Date: Thu, 14 Oct 2021 19:16:40 +0300 In-Reply-To: (Stefan Monnier's message of "Wed, 13 Oct 2021 16:01:51 -0400") Message-ID: <87r1cnio3j.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) >> + (defn (if (consp event) >> + (save-excursion >> + (mouse-set-point event) (key-binding key t)) >> + (key-binding key t)))) >> ;; Handle the case where we faked an entry in "Select and Paste" menu. >> (when (and (eq defn nil) >> (stringp (aref key (1- (length key)))) > > But this will still use "the wrong buffer" for mouse clicks, no? It seems all mouse clicks expect the buffer where they were clicked to be displayed in a window. I can't imagine how a mouse click could originate from a hidden buffer. > BTW, maybe a cleaner fix would be as follows: > - Add a `buffer` argument to `describe-key(-briefly)`. > - Pass that argument from `gnus-article-describe-key`. > And to get the behavior that Juri just pushed that `buffer` argument > would default to (if (consp event) (window-buffer (posn-window > (event-start event))) (current-buffere)). I don't know. All reported cases work now after Eli fixed mouse-minibuffer-check not to raise an error when called from mouse-set-point, so now it's safe to use it in help--analyze-key. From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Thu, 14 Oct 2021 18:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Juri Linkov Cc: Lars Ingebrigtsen , Katsumi Yamaoka , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.16342369711011 (code B ref 51173); Thu, 14 Oct 2021 18:43:02 +0000 Received: (at 51173) by debbugs.gnu.org; 14 Oct 2021 18:42:51 +0000 Received: from localhost ([127.0.0.1]:37101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mb5go-0000GD-UZ for submit@debbugs.gnu.org; Thu, 14 Oct 2021 14:42:51 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:25881) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mb5gl-0000Fz-JQ for 51173@debbugs.gnu.org; Thu, 14 Oct 2021 14:42:50 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id AF5E280658; Thu, 14 Oct 2021 14:42:41 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 24CAF803D6; Thu, 14 Oct 2021 14:42:40 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1634236960; bh=puqe/5SIOTJV0ZRCIASPyiPi6lTYCdWrJFYxiNinQQ4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=DaDBACSQeURpMCuAsIELNcJ9LGWbErUZB/j9jCaC67WzkeBW3tXZHm4A9V9FwdFZH CIK09TKzYZ2OFXFKVJGc62bd7v3DUJ0wKWMHin01S78maYuKH0F82sJ6ZtOAV2+gPc nguiz2nLdmMqtvTo6+sXwOonVwa7hvpqKKd12JeffvQkAJHYBllV23ywhjBJLAtYVh vvTkCjM+KqeW3Mrr1irYOc1RlZ1M0Xp0I/dCsik0cLGOa60uxNK5YYPP92GzTXgvGN MW5sQQgrv8WsEFocBchVMAENvkB0nCPIBnGBInu0yK8JIgEVqMHQtppFiVYL2+J1gX TBQsC80ZRUMWg== Received: from alfajor (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0C4C6120210; Thu, 14 Oct 2021 14:42:40 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87r1cnio3j.fsf@mail.linkov.net> Date: Thu, 14 Oct 2021 14:41:40 -0400 In-Reply-To: <87r1cnio3j.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 14 Oct 2021 19:16:40 +0300") 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.155 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-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 (---) >>> + (defn (if (consp event) >>> + (save-excursion >>> + (mouse-set-point event) (key-binding key t)) >>> + (key-binding key t)))) >>> ;; Handle the case where we faked an entry in "Select and Paste" menu. >>> (when (and (eq defn nil) >>> (stringp (aref key (1- (length key)))) >> >> But this will still use "the wrong buffer" for mouse clicks, no? > > It seems all mouse clicks expect the buffer where they were clicked > to be displayed in a window. I can't imagine how a mouse click > could originate from a hidden buffer. `gnus-article-describe-key` is used for those keybindings which Gnus redirects from the buffer in which they occurred to some other buffer. So if you use such a redirection for mouse-clicks, `gnus-article-describe-key` would also want to look them up in the other buffer. Stefan From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Fri, 15 Oct 2021 07:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Stefan Monnier Cc: Lars Ingebrigtsen , Katsumi Yamaoka , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163428136930576 (code B ref 51173); Fri, 15 Oct 2021 07:03:02 +0000 Received: (at 51173) by debbugs.gnu.org; 15 Oct 2021 07:02:49 +0000 Received: from localhost ([127.0.0.1]:37896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbHEv-0007x5-EL for submit@debbugs.gnu.org; Fri, 15 Oct 2021 03:02:49 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:32771) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbHEt-0007wm-Ek for 51173@debbugs.gnu.org; Fri, 15 Oct 2021 03:02:48 -0400 Received: (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 3A993FF818; Fri, 15 Oct 2021 07:02:38 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> Date: Fri, 15 Oct 2021 09:49:32 +0300 In-Reply-To: (Stefan Monnier's message of "Wed, 13 Oct 2021 16:01:51 -0400") Message-ID: <87r1cm3hqb.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) 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.7 (-) --=-=-= Content-Type: text/plain > But this will still use "the wrong buffer" for mouse clicks, no? > > BTW, maybe a cleaner fix would be as follows: > - Add a `buffer` argument to `describe-key(-briefly)`. > - Pass that argument from `gnus-article-describe-key`. > And to get the behavior that Juri just pushed that `buffer` argument > would default to (if (consp event) (window-buffer (posn-window > (event-start event))) (current-buffere)). Maybe something like this (but currently I have no idea how to test all cases): --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=gnus-article-describe-key.patch diff --git a/lisp/help.el b/lisp/help.el index 9666ef9805..08a293c3dc 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -731,7 +731,7 @@ help--filter-info-list ;; If nothing left, then keep one (the last one). (last info-list))) -(defun describe-key-briefly (&optional key-list insert untranslated) +(defun describe-key-briefly (&optional key-list insert buffer) "Print the name of the functions KEY-LIST invokes. KEY-LIST is a list of pairs (SEQ . RAW-SEQ) of key sequences, where RAW-SEQ is the untranslated form of the key sequence SEQ. @@ -739,8 +739,10 @@ describe-key-briefly While reading KEY-LIST interactively, this command temporarily enables menu items or tool-bar buttons that are disabled to allow getting help -on them." - (declare (advertised-calling-convention (key-list &optional insert) "27.1")) +on them. + +BUFFER is the buffer in which to lookup those keys; it defaults to the +current buffer." (interactive ;; Ignore mouse movement events because it's too easy to miss the ;; message while moving the mouse. @@ -748,15 +750,13 @@ describe-key-briefly `(,key-list ,current-prefix-arg))) (when (arrayp key-list) ;; Old calling convention, changed - (setq key-list (list (cons key-list - (if (numberp untranslated) - (this-single-command-raw-keys) - untranslated))))) - (let* ((info-list (mapcar (lambda (kr) - (help--analyze-key (car kr) (cdr kr))) - key-list)) - (msg (mapconcat #'car (help--filter-info-list info-list 1) "\n"))) - (if insert (insert msg) (message "%s" msg)))) + (setq key-list (list (cons key-list nil)))) + (with-current-buffer (or buffer (current-buffer)) + (let* ((info-list (mapcar (lambda (kr) + (help--analyze-key (car kr) (cdr kr))) + key-list)) + (msg (mapconcat #'car (help--filter-info-list info-list 1) "\n"))) + (if insert (insert msg) (message "%s" msg))))) (defun help--key-binding-keymap (key &optional accept-default no-remap position) "Return a keymap holding a binding for KEY within current keymaps. diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index bb466b9400..bbb452279a 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -6865,8 +6865,14 @@ gnus-article-describe-key unread-command-events)) (let ((cursor-in-echo-area t) gnus-pick-mode) - (describe-key (read-key-sequence nil t)))) - (describe-key key))) + (let* ((key (read-key-sequence nil t)) + (buffer (if (consp key) + (window-buffer (posn-window (event-start key))) + (current-buffer)))) + (describe-key key buffer)))) + (describe-key key (if (consp key) + (window-buffer (posn-window (event-start key))) + (current-buffer))))) (defun gnus-article-describe-key-briefly (key &optional insert) "Display documentation of the function invoked by KEY. @@ -6888,8 +6894,15 @@ gnus-article-describe-key-briefly unread-command-events)) (let ((cursor-in-echo-area t) gnus-pick-mode) - (describe-key-briefly (read-key-sequence nil t) insert))) - (describe-key-briefly key insert))) + (let ((key (read-key-sequence nil t)) + (buffer (if (consp key) + (window-buffer (posn-window (event-start key))) + (current-buffer)))) + (describe-key-briefly key insert buffer)))) + (describe-key-briefly key insert + (if (consp key) + (window-buffer (posn-window (event-start key))) + (current-buffer))))) ;;`gnus-agent-mode' in gnus-agent.el will define it. (defvar gnus-agent-summary-mode) --=-=-=-- From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Fri, 15 Oct 2021 18:34:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Juri Linkov Cc: Lars Ingebrigtsen , Katsumi Yamaoka , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163432279131607 (code B ref 51173); Fri, 15 Oct 2021 18:34:03 +0000 Received: (at 51173) by debbugs.gnu.org; 15 Oct 2021 18:33:11 +0000 Received: from localhost ([127.0.0.1]:40388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbS10-0008Dj-P8 for submit@debbugs.gnu.org; Fri, 15 Oct 2021 14:33:10 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:39310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbS0w-0008DC-Fo for 51173@debbugs.gnu.org; Fri, 15 Oct 2021 14:33:09 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 55B66440C27; Fri, 15 Oct 2021 14:33:00 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5178B440C16; Fri, 15 Oct 2021 14:32:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1634322778; bh=I/AjK3WCbSrcscDnHN4eW7axzrZYiUzciXkQc6rNy0c=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Anc8T9y+P67msHm5yo0J10BvNen/zgqECxJn/sjsY2W/rGfA6UeouslaXiZxfAYMi 0nDYSywVrmjvUu2WSBQG0NjEVWDNdEom3UtkBUTR3KQjeq31/5/BH7KibyvBRjcvZm +ZGnBUwliEPrjet+9/pxMstvwVkqWzAKAcweUR+yiwODivTs45o9nxJvpcN5KRfhXn gEyGH78Ha4Q0etcOYC9SMBMprfBUrkIUjtMHmVVA1AJ8AjBfnHo/u9QsWgWt9I7Jna pJVZ1xGAI+cDAuslHPPL8RbYID6UCFLs1wWF94tFU0RNovZ+hIix0chxhnY0byzSFO /bLfa/LTXxBGA== Received: from ceviche (modemcable004.216-203-24.mc.videotron.ca [24.203.216.4]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DEA61120445; Fri, 15 Oct 2021 14:32:57 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87r1cm3hqb.fsf@mail.linkov.net> Date: Fri, 15 Oct 2021 14:32:56 -0400 In-Reply-To: <87r1cm3hqb.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 15 Oct 2021 09:49:32 +0300") 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.127 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-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 (---) > + (let* ((key (read-key-sequence nil t)) > + (buffer (if (consp key) > + (window-buffer (posn-window (event-start key))) > + (current-buffer)))) > + (describe-key key buffer)))) > + (describe-key key (if (consp key) > + (window-buffer (posn-window (event-start key))) > + (current-buffer))))) I think the first `describe-key` above should always use `current-buffer` (that's the whole point of the function: to lookup the keybinding in that other buffer). And for the second, it's supposed to be a fallback that does whatever `describe-key` does normally, so I don't see why we'd need/want this (if ...) construction. OTOH we should probably try and change the `key` arg to use the new key-list format expected by `describe-key` (i.e. a list of (SEQ . RAW-SEQ) pairs). > + (let ((key (read-key-sequence nil t)) > + (buffer (if (consp key) > + (window-buffer (posn-window (event-start key))) > + (current-buffer)))) > + (describe-key-briefly key insert buffer)))) > + (describe-key-briefly key insert > + (if (consp key) > + (window-buffer (posn-window (event-start key))) > + (current-buffer))))) Same here. Stefan From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Sat, 16 Oct 2021 18:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Stefan Monnier Cc: Lars Ingebrigtsen , Katsumi Yamaoka , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163440725215041 (code B ref 51173); Sat, 16 Oct 2021 18:01:02 +0000 Received: (at 51173) by debbugs.gnu.org; 16 Oct 2021 18:00:52 +0000 Received: from localhost ([127.0.0.1]:43017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbnzI-0003uW-B2 for submit@debbugs.gnu.org; Sat, 16 Oct 2021 14:00:52 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:57431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbnzG-0003uH-40 for 51173@debbugs.gnu.org; Sat, 16 Oct 2021 14:00:51 -0400 Received: (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id CEFCBE0007; Sat, 16 Oct 2021 18:00:41 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87r1cm3hqb.fsf@mail.linkov.net> Date: Sat, 16 Oct 2021 20:55:51 +0300 In-Reply-To: (Stefan Monnier's message of "Fri, 15 Oct 2021 14:32:56 -0400") Message-ID: <87h7dgg8go.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) >> + (let* ((key (read-key-sequence nil t)) >> + (buffer (if (consp key) >> + (window-buffer (posn-window (event-start key))) >> + (current-buffer)))) >> + (describe-key key buffer)))) > > I think the first `describe-key` above should always use > `current-buffer` (that's the whole point of the function: to lookup the > keybinding in that other buffer). There is still something missing: `gnus-article-describe-key` already selects the required buffer with `with-current-buffer`. Then why should it provide the same buffer as an argument to `describe-key` to select it again in `describe-key`? Maybe you intended to add a new argument `buffer` to pass it down to `help--analyze-key` that could use it somehow in this condition: (defn (if (consp event) (save-excursion (mouse-set-point event) (key-binding key t)) (key-binding key t))) But I have no idea how. Maybe not to set point (that also selects another window) when the `buffer` arg is provided? E.g. (defn (if (not buffer) (save-excursion (mouse-set-point event) (key-binding key t)) (key-binding key t))) IOW, the semantics of `buffer` is not clear here. > OTOH we should probably try and change the `key` arg to use the new > key-list format expected by `describe-key` (i.e. a list of (SEQ > . RAW-SEQ) pairs). `gnus-article-describe-key` just passes down the value that `read-key-sequence` returns. From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Sat, 16 Oct 2021 19:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Juri Linkov Cc: Lars Ingebrigtsen , Katsumi Yamaoka , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163441399525594 (code B ref 51173); Sat, 16 Oct 2021 19:54:01 +0000 Received: (at 51173) by debbugs.gnu.org; 16 Oct 2021 19:53:15 +0000 Received: from localhost ([127.0.0.1]:43124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbpk2-0006ek-Sb for submit@debbugs.gnu.org; Sat, 16 Oct 2021 15:53:15 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:28671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbpk0-0006eV-Q4 for 51173@debbugs.gnu.org; Sat, 16 Oct 2021 15:53:13 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4D7A1440BDB; Sat, 16 Oct 2021 15:53:06 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BD6E94409E2; Sat, 16 Oct 2021 15:53:04 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1634413984; bh=mDOBHq6YI3hM9Af3ceNZQXzg/6BiGwmLnO1HSu2oWEk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=GPk5+0f14dcM3MQUjcICKCxieQAE6mwKlgUrepCAvJqGc980wahghbpLHPZpRLehD I7dx61XBr/v8wArZVkS0EIEwvQKW1VgDebHNuU8BfI4PyKqPJikOgtoMEgtVLxlXwL aGKYD1UuUxI0yuCw3LIrNfAlcc9RvPzEA3bhYvd9RcNFbsuf0st+Pdpna/lUpcLTd1 3KGOC3t7I6v7+5paE5aiqaBguA3rPxveSMIX/wtG4blUOrE4o/8IWP07qg6NZvGJ1q tc8IDe1GoNvKpjnIkKiETYJLnMgf9fNrQ+f/AGm1C5/CsC2I6s2XIgCN1iXsp75C0u ctRgO8fh5vEvw== Received: from pastel (unknown [45.72.241.23]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 83843120384; Sat, 16 Oct 2021 15:53:04 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87r1cm3hqb.fsf@mail.linkov.net> <87h7dgg8go.fsf@mail.linkov.net> Date: Sat, 16 Oct 2021 15:53:03 -0400 In-Reply-To: <87h7dgg8go.fsf@mail.linkov.net> (Juri Linkov's message of "Sat, 16 Oct 2021 20:55:51 +0300") 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.033 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-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 (---) >>> + (let* ((key (read-key-sequence nil t)) >>> + (buffer (if (consp key) >>> + (window-buffer (posn-window (event-start key))) >>> + (current-buffer)))) >>> + (describe-key key buffer)))) >> >> I think the first `describe-key` above should always use >> `current-buffer` (that's the whole point of the function: to lookup the >> keybinding in that other buffer). > > There is still something missing: `gnus-article-describe-key` > already selects the required buffer with `with-current-buffer`. > Then why should it provide the same buffer as an argument > to `describe-key` to select it again in `describe-key`? Because `describe-key` otherwise uses the buffer of the window associated with the event (this is in done in `help--analyse-key` where we currently use `mouse-set-point`). So we need to pass an explicit buffer to tell `describe-key` to ignore the event's window (and we need to change this part of `describe-key/help--analyse-key` to obey such a buffer argument). > Maybe you intended to add a new argument `buffer` to pass it down > to `help--analyze-key` that could use it somehow in this condition: > > (defn (if (consp event) > (save-excursion (mouse-set-point event) (key-binding key t)) > (key-binding key t))) Yes. > But I have no idea how. Maybe not to set point (that also selects > another window) when the `buffer` arg is provided? Exactly. > (defn (if (not buffer) > (save-excursion (mouse-set-point event) (key-binding key t)) > (key-binding key t))) > > IOW, the semantics of `buffer` is not clear here. If nil it means "defaults to the (window-buffer (posn-window (event-end event)))" >> OTOH we should probably try and change the `key` arg to use the new >> key-list format expected by `describe-key` (i.e. a list of (SEQ >> . RAW-SEQ) pairs). > > `gnus-article-describe-key` just passes down the value > that `read-key-sequence` returns. I know. This is the old calling convention of `describe-key`; we should move to the new one. Stefan From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Mon, 18 Oct 2021 16:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Stefan Monnier Cc: Lars Ingebrigtsen , Katsumi Yamaoka , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.16345741025240 (code B ref 51173); Mon, 18 Oct 2021 16:22:02 +0000 Received: (at 51173) by debbugs.gnu.org; 18 Oct 2021 16:21:42 +0000 Received: from localhost ([127.0.0.1]:48359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcVOP-0001MR-PN for submit@debbugs.gnu.org; Mon, 18 Oct 2021 12:21:42 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:43599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcVOK-0001Lq-Cl for 51173@debbugs.gnu.org; Mon, 18 Oct 2021 12:21:37 -0400 Received: (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id D5F6E40006; Mon, 18 Oct 2021 16:21:27 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87r1cm3hqb.fsf@mail.linkov.net> <87h7dgg8go.fsf@mail.linkov.net> Date: Mon, 18 Oct 2021 19:20:00 +0300 In-Reply-To: (Stefan Monnier's message of "Sat, 16 Oct 2021 15:53:03 -0400") Message-ID: <87ilxumi07.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) 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.7 (-) --=-=-= Content-Type: text/plain >> There is still something missing: `gnus-article-describe-key` >> already selects the required buffer with `with-current-buffer`. >> Then why should it provide the same buffer as an argument >> to `describe-key` to select it again in `describe-key`? > > Because `describe-key` otherwise uses the buffer of the window > associated with the event (this is in done in `help--analyse-key` where > we currently use `mouse-set-point`). So we need to pass an explicit > buffer to tell `describe-key` to ignore the event's window (and we need > to change this part of `describe-key/help--analyse-key` to obey such a > buffer argument). > >> (defn (if (not buffer) >> (save-excursion (mouse-set-point event) (key-binding key t)) >> (key-binding key t))) >> >> IOW, the semantics of `buffer` is not clear here. > > If nil it means "defaults to the (window-buffer (posn-window (event-end event)))" > >>> OTOH we should probably try and change the `key` arg to use the new >>> key-list format expected by `describe-key` (i.e. a list of (SEQ >>> . RAW-SEQ) pairs). >> >> `gnus-article-describe-key` just passes down the value >> that `read-key-sequence` returns. > > I know. This is the old calling convention of `describe-key`; we > should move to the new one. Is seems everything is covered by this patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=help--analyze-key.patch diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index bb466b9400..930c739a73 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -6865,7 +6865,9 @@ gnus-article-describe-key unread-command-events)) (let ((cursor-in-echo-area t) gnus-pick-mode) - (describe-key (read-key-sequence nil t)))) + (describe-key (cons (read-key-sequence nil t) + (this-single-command-raw-keys)) + (current-buffer)))) (describe-key key))) (defun gnus-article-describe-key-briefly (key &optional insert) @@ -6888,7 +6890,9 @@ gnus-article-describe-key-briefly unread-command-events)) (let ((cursor-in-echo-area t) gnus-pick-mode) - (describe-key-briefly (read-key-sequence nil t) insert))) + (describe-key-briefly (cons (read-key-sequence nil t) + (this-single-command-raw-keys)) + insert (current-buffer)))) (describe-key-briefly key insert))) ;;`gnus-agent-mode' in gnus-agent.el will define it. diff --git a/lisp/help.el b/lisp/help.el index 9666ef9805..a7084d29ce 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -677,9 +677,11 @@ help-key-description (defun help--binding-undefined-p (defn) (or (null defn) (integerp defn) (equal defn 'undefined))) -(defun help--analyze-key (key untranslated) +(defun help--analyze-key (key untranslated &optional buffer) "Get information about KEY its corresponding UNTRANSLATED events. -Returns a list of the form (BRIEF-DESC DEFN EVENT MOUSE-MSG)." +Returns a list of the form (BRIEF-DESC DEFN EVENT MOUSE-MSG). +When BUFFER is nil, it defaults to the +`(window-buffer (posn-window (event-end event)))'." (if (numberp untranslated) (error "Missing `untranslated'!")) (let* ((event (when (> (length key) 0) @@ -699,9 +701,8 @@ help--analyze-key ;; is selected from the context menu that should describe KEY ;; at the position of mouse click that opened the context menu. ;; When no mouse was involved, don't use `mouse-set-point'. - (defn (if (consp event) - (save-excursion (mouse-set-point event) (key-binding key t)) - (key-binding key t)))) + (defn (if buffer (key-binding key t) + (save-excursion (mouse-set-point event) (key-binding key t))))) ;; Handle the case where we faked an entry in "Select and Paste" menu. (when (and (eq defn nil) (stringp (aref key (1- (length key)))) @@ -731,7 +732,7 @@ help--filter-info-list ;; If nothing left, then keep one (the last one). (last info-list))) -(defun describe-key-briefly (&optional key-list insert untranslated) +(defun describe-key-briefly (&optional key-list insert buffer) "Print the name of the functions KEY-LIST invokes. KEY-LIST is a list of pairs (SEQ . RAW-SEQ) of key sequences, where RAW-SEQ is the untranslated form of the key sequence SEQ. @@ -739,8 +740,10 @@ describe-key-briefly While reading KEY-LIST interactively, this command temporarily enables menu items or tool-bar buttons that are disabled to allow getting help -on them." - (declare (advertised-calling-convention (key-list &optional insert) "27.1")) +on them. + +BUFFER is the buffer in which to lookup those keys; it defaults to the +current buffer." (interactive ;; Ignore mouse movement events because it's too easy to miss the ;; message while moving the mouse. @@ -748,15 +751,13 @@ describe-key-briefly `(,key-list ,current-prefix-arg))) (when (arrayp key-list) ;; Old calling convention, changed - (setq key-list (list (cons key-list - (if (numberp untranslated) - (this-single-command-raw-keys) - untranslated))))) - (let* ((info-list (mapcar (lambda (kr) - (help--analyze-key (car kr) (cdr kr))) - key-list)) - (msg (mapconcat #'car (help--filter-info-list info-list 1) "\n"))) - (if insert (insert msg) (message "%s" msg)))) + (setq key-list (list (cons key-list nil)))) + (with-current-buffer (if (buffer-live-p buffer) buffer (current-buffer)) + (let* ((info-list (mapcar (lambda (kr) + (help--analyze-key (car kr) (cdr kr) buffer)) + key-list)) + (msg (mapconcat #'car (help--filter-info-list info-list 1) "\n"))) + (if insert (insert msg) (message "%s" msg))))) (defun help--key-binding-keymap (key &optional accept-default no-remap position) "Return a keymap holding a binding for KEY within current keymaps. @@ -916,7 +917,7 @@ describe-key (mapcar (lambda (x) (pcase-let* ((`(,seq . ,raw-seq) x) (`(,brief-desc ,defn ,event ,_mouse-msg) - (help--analyze-key seq raw-seq)) + (help--analyze-key seq raw-seq buffer)) (locus (help--binding-locus seq (event-start event)))) --=-=-=-- From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 20 Oct 2021 17:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Stefan Monnier Cc: Lars Ingebrigtsen , Katsumi Yamaoka , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163475255910303 (code B ref 51173); Wed, 20 Oct 2021 17:56:01 +0000 Received: (at 51173) by debbugs.gnu.org; 20 Oct 2021 17:55:59 +0000 Received: from localhost ([127.0.0.1]:55389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdFol-0002g7-HS for submit@debbugs.gnu.org; Wed, 20 Oct 2021 13:55:59 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:45339) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdFoj-0002ft-Gq for 51173@debbugs.gnu.org; Wed, 20 Oct 2021 13:55:58 -0400 Received: (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id D7722E0008; Wed, 20 Oct 2021 17:55:48 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87r1cm3hqb.fsf@mail.linkov.net> <87h7dgg8go.fsf@mail.linkov.net> <87ilxumi07.fsf@mail.linkov.net> Date: Wed, 20 Oct 2021 20:55:38 +0300 In-Reply-To: <87ilxumi07.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 18 Oct 2021 19:20:00 +0300") Message-ID: <87sfwvy411.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) >>>> OTOH we should probably try and change the `key` arg to use the new >>>> key-list format expected by `describe-key` (i.e. a list of (SEQ >>>> . RAW-SEQ) pairs). >>> >>> `gnus-article-describe-key` just passes down the value >>> that `read-key-sequence` returns. >> >> I know. This is the old calling convention of `describe-key`; we >> should move to the new one. > > Is seems everything is covered by this patch: So this is pushed now. From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Thu, 21 Oct 2021 16:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Juri Linkov Cc: Lars Ingebrigtsen , Katsumi Yamaoka , 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163483460923290 (code B ref 51173); Thu, 21 Oct 2021 16:44:01 +0000 Received: (at 51173) by debbugs.gnu.org; 21 Oct 2021 16:43:29 +0000 Received: from localhost ([127.0.0.1]:58413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdbA8-00063Z-SD for submit@debbugs.gnu.org; Thu, 21 Oct 2021 12:43:29 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:26384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdbA6-00063I-F0 for 51173@debbugs.gnu.org; Thu, 21 Oct 2021 12:43:27 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 22DEA8072A; Thu, 21 Oct 2021 12:43:20 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C4447804E6; Thu, 21 Oct 2021 12:43:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1634834598; bh=ytxsOkVracnHkN6WE6nUCqmwh1Z3lgUUnq09F4bmYt0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=eQVUd3U503Q39Q+gIu5VzaiD8+Q1UK20s52EcdkftM6xxd83w/m79zlmXmS1XpN+p OMNOPQyfw5lHJph3474NQEQ0WPB6OZRSB0Su8Z/I/cxKbntRaJFAiQ9I3BBKK/FDhl es6YP5qiFArXQwW5BZQfYCoqqV/Liwk6EEfZvjlLW7J7r630SPoTVW5l0MXcSENHOr 9D5wxXyTX3oezdbfKKy/O7Urw0Gz+FanCfcB//NcRalQHLa1MJRTGzHMlE3rRB2fzN 55h3YyZ0ZoJuLfkevSrn0GG1v6HjC4kawWStzSl0fVpldftne9vQQzjfFcZDNpZmNI D+gIVOjgG28YA== Received: from milanesa (unknown [45.72.241.23]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8CBA2120218; Thu, 21 Oct 2021 12:43:18 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87r1cm3hqb.fsf@mail.linkov.net> <87h7dgg8go.fsf@mail.linkov.net> <87ilxumi07.fsf@mail.linkov.net> <87sfwvy411.fsf@mail.linkov.net> Date: Thu, 21 Oct 2021 12:43:10 -0400 In-Reply-To: <87sfwvy411.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 20 Oct 2021 20:55:38 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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.067 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-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 (---) >>>>> OTOH we should probably try and change the `key` arg to use the new >>>>> key-list format expected by `describe-key` (i.e. a list of (SEQ >>>>> . RAW-SEQ) pairs). >>>> >>>> `gnus-article-describe-key` just passes down the value >>>> that `read-key-sequence` returns. >>> >>> I know. This is the old calling convention of `describe-key`; we >>> should move to the new one. >> >> Is seems everything is covered by this patch: > > So this is pushed now. Thanks, and sorry I didn't get to it earlier. FWIW, it does look good, Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 29 13:24:45 2021 Received: (at control) by debbugs.gnu.org; 29 Nov 2021 18:24:45 +0000 Received: from localhost ([127.0.0.1]:39335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mrlKX-0005Zw-EE for submit@debbugs.gnu.org; Mon, 29 Nov 2021 13:24:45 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:44499) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mrlKV-0005Zd-MC for control@debbugs.gnu.org; Mon, 29 Nov 2021 13:24:44 -0500 Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id C5A396000E for ; Mon, 29 Nov 2021 18:24:36 +0000 (UTC) From: Juri Linkov To: control@debbugs.gnu.org Subject: Re: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Organization: LINKOV.NET References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87r1cm3hqb.fsf@mail.linkov.net> <87h7dgg8go.fsf@mail.linkov.net> <87ilxumi07.fsf@mail.linkov.net> <87sfwvy411.fsf@mail.linkov.net> Date: Mon, 29 Nov 2021 20:24:24 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 21 Oct 2021 12:43:10 -0400") Message-ID: <86o862u8fb.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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: -1.7 (-) unarchive 51173 quit From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Mon, 29 Nov 2021 19:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Stefan Monnier Cc: 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.16382123431011 (code B ref 51173); Mon, 29 Nov 2021 19:00:02 +0000 Received: (at 51173) by debbugs.gnu.org; 29 Nov 2021 18:59:03 +0000 Received: from localhost ([127.0.0.1]:39393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mrlrf-0000Fv-UO for submit@debbugs.gnu.org; Mon, 29 Nov 2021 13:59:03 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:47115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mrlrd-0000Ff-BX for 51173@debbugs.gnu.org; Mon, 29 Nov 2021 13:58:58 -0500 Received: (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 57C36240005; Mon, 29 Nov 2021 18:58:47 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87r1cm3hqb.fsf@mail.linkov.net> <87h7dgg8go.fsf@mail.linkov.net> <87ilxumi07.fsf@mail.linkov.net> <87sfwvy411.fsf@mail.linkov.net> Date: Mon, 29 Nov 2021 20:49:12 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 21 Oct 2021 12:43:10 -0400") Message-ID: <86o862re53.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) 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.7 (-) --=-=-= Content-Type: text/plain >>>>>> OTOH we should probably try and change the `key` arg to use the new >>>>>> key-list format expected by `describe-key` (i.e. a list of (SEQ >>>>>> . RAW-SEQ) pairs). >>>>> >>>>> `gnus-article-describe-key` just passes down the value >>>>> that `read-key-sequence` returns. >>>> >>>> I know. This is the old calling convention of `describe-key`; we >>>> should move to the new one. >>> >>> Is seems everything is covered by this patch: >> >> So this is pushed now. > > Thanks, and sorry I didn't get to it earlier. FWIW, it does look good, Oh, another regression: C-s ;; isearch-forward C-h k ;; isearch-describe-key then typing any key to describe in isearch-mode leaves isearch in a broken state: it displays the search prompt, but no isearch indicator on the mode-line. So something exits isearch. Adding a breakpoint in isearch-done reveals this backtrace: isearch-done() isearch-mouse-leave-buffer() mouse-minibuffer-check(19) mouse-set-point(19) help--analyze-key("\23" [19] nil) describe-key((("\23" . [19]))) funcall-interactively(describe-key (("\23" . [19]))) isearch-describe-key() funcall-interactively(isearch-describe-key) command-execute(isearch-describe-key) I don't know if more functions using describe-key are broken, but copying the same code from gnus-article-describe-key that gives the buffer argument to describe-key fixes this. I have no idea for a better way to avoid such problems. More precautions are added to this patch: when isearch-mouse-commands contains isearch-describe-key, isearch-mouse-leave-buffer won't leave isearch-mode. Also to avoid a broken state, isearch-update should be used only when isearch-mode is active: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=isearch-describe-key.patch diff --git a/lisp/isearch.el b/lisp/isearch.el index 0a041b7a1e..043d2c016e 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -525,15 +525,17 @@ isearch-describe-key "Display documentation of the function invoked by isearch key." (interactive) (let ((display-buffer-overriding-action isearch--display-help-action)) - (call-interactively 'describe-key)) - (isearch-update)) + (describe-key (list (cons (read-key-sequence nil t) + (this-single-command-raw-keys))) + (current-buffer))) + (when isearch-mode (isearch-update))) (defun isearch-describe-mode () "Display documentation of Isearch mode." (interactive) (let ((display-buffer-overriding-action isearch--display-help-action)) (describe-function 'isearch-forward)) - (isearch-update)) + (when isearch-mode (isearch-update))) (defalias 'isearch-mode-help 'isearch-describe-mode) @@ -1498,7 +1500,7 @@ isearch-done (and (not edit) isearch-recursive-edit (exit-recursive-edit))) -(defvar isearch-mouse-commands '(mouse-minor-mode-menu) +(defvar isearch-mouse-commands '(mouse-minor-mode-menu isearch-describe-key) "List of mouse commands that are allowed during Isearch.") (defun isearch-mouse-leave-buffer () --=-=-=-- From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Mon, 29 Nov 2021 20:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Juri Linkov Cc: 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.16382194825741 (code B ref 51173); Mon, 29 Nov 2021 20:59:02 +0000 Received: (at 51173) by debbugs.gnu.org; 29 Nov 2021 20:58:02 +0000 Received: from localhost ([127.0.0.1]:39597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mrnis-0001UX-GT for submit@debbugs.gnu.org; Mon, 29 Nov 2021 15:58:02 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:23415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mrniq-0001U2-Jq for 51173@debbugs.gnu.org; Mon, 29 Nov 2021 15:58:01 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6D05444106B; Mon, 29 Nov 2021 15:57:54 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0CFA3441069; Mon, 29 Nov 2021 15:57:53 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1638219473; bh=I/RnE+mSiHOnH8KI1Cmr5nIy+TVXgIBgoHcOlnHdKfc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=IqxZbcmjf8aL0ezx4i8xOq/e0Euc1RjFZwQDXCaWNAridTVqF0dMUoHJGjM+ytVVD c2AN4gC86qL2ZnTHE2wpu6MCBc9wbEqoINAZ6sKmil2wUkckbAP9PBjaRZ9IBs85Ca 2iLtTjMRbu3A6dHuHnaJ8V78XJrrj7QxSlTxW9d8eLQFMdUcZOo3soC0n+r7+bN3Vf /GBGhb1YCqJDFYEGB2d/mSsjqWj0P8UMa17NIVy/7JjSoTA/5jO3t9+CKDOW14lCqJ KxnRdwXjYgvHnJy0PThnSAefFq3uFsGwbs4dPck4OXDSFjWv3KUp8akKZUkNpxZziK nN+gqeIOJg+EQ== Received: from milanesa (unknown [24.48.75.95]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id CCE70120797; Mon, 29 Nov 2021 15:57:52 -0500 (EST) From: Stefan Monnier Message-ID: References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87r1cm3hqb.fsf@mail.linkov.net> <87h7dgg8go.fsf@mail.linkov.net> <87ilxumi07.fsf@mail.linkov.net> <87sfwvy411.fsf@mail.linkov.net> <86o862re53.fsf@mail.linkov.net> Date: Mon, 29 Nov 2021 15:57:51 -0500 In-Reply-To: <86o862re53.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 29 Nov 2021 20:49:12 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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 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-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 (---) > mouse-minibuffer-check(19) > mouse-set-point(19) > help--analyze-key("\23" [19] nil) Hpw 'bout the patch below? Or maybe the use of `mouse-minibuffer-check` in `mouse-set-point` should be moved to its interactive spec? Stefan diff --git a/lisp/help.el b/lisp/help.el index 1917ef425d..e175421d02 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -715,7 +715,8 @@ help--analyze-key (and (not (windowp (posn-window (event-start event)))) (not (framep (posn-window (event-start event)))))) (key-binding key t) - (save-excursion (mouse-set-point event) (key-binding key t))))) + (save-excursion (posn-set-point (event-end event)) + (key-binding key t))))) ;; Handle the case where we faked an entry in "Select and Paste" menu. (when (and (eq defn nil) (stringp (aref key (1- (length key)))) From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Tue, 30 Nov 2021 03:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Stefan Monnier Cc: 51173@debbugs.gnu.org, juri@linkov.net Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163824280410332 (code B ref 51173); Tue, 30 Nov 2021 03:27:02 +0000 Received: (at 51173) by debbugs.gnu.org; 30 Nov 2021 03:26:44 +0000 Received: from localhost ([127.0.0.1]:39955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mrtn1-0002gZ-Kc for submit@debbugs.gnu.org; Mon, 29 Nov 2021 22:26:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mrtmz-0002gF-Pw for 51173@debbugs.gnu.org; Mon, 29 Nov 2021 22:26:42 -0500 Received: from [2001:470:142:3::e] (port=47196 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrtmt-0008WU-KJ; Mon, 29 Nov 2021 22:26:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pYDPJwRgFhWIcMmhZ1geszFBRrYsF2cHJpwkxXhc4oQ=; b=Jro7ZoYKHywp JzF9t50k4bT0O6ro3V74UTzKWve4E1fQTQnjFx/0fmGsRqxpgBCNCMnc4AWRSs2+/kmmQjy0o8w3T YPG6wedusEE6b5VQXhW9w74/yXuBQ6+hYBZ9gXaSCNkSW4rAVEAhTtBJ5I37D2pvjatqKIWolN8Zv llV+XFFU2BPYj3rOqw5esKWFUxnm65tZvTEMBYKPNVSxDmROujEY0AJ0yFBIGLT3MAas7mFXem9Zd tDhHskN9CaxJMQLYXkZxQrs8riQq7ou9gIw2vFUIcWH+8Ugfh9NxLYmJZEHD33ajhcukuVNYdIkjV bMRoE02ePZubUrpqHzMLqA==; Received: from [87.69.77.57] (port=4467 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrtmt-0006tp-8I; Mon, 29 Nov 2021 22:26:35 -0500 Date: Tue, 30 Nov 2021 05:26:49 +0200 Message-Id: <831r2yuxvq.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (bug-gnu-emacs@gnu.org) References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87r1cm3hqb.fsf@mail.linkov.net> <87h7dgg8go.fsf@mail.linkov.net> <87ilxumi07.fsf@mail.linkov.net> <87sfwvy411.fsf@mail.linkov.net> <86o862re53.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) 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 (---) > Cc: 51173@debbugs.gnu.org > Date: Mon, 29 Nov 2021 15:57:51 -0500 > From: Stefan Monnier via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > > mouse-minibuffer-check(19) > > mouse-set-point(19) > > help--analyze-key("\23" [19] nil) > > Hpw 'bout the patch below? > > Or maybe the use of `mouse-minibuffer-check` in `mouse-set-point` should > be moved to its interactive spec? If you want this fixed on the release branch, I'd prefer a localized change in Gnus (with a more thorough change on master). Thanks. From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Tue, 30 Nov 2021 09:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Stefan Monnier Cc: 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163826376819520 (code B ref 51173); Tue, 30 Nov 2021 09:17:01 +0000 Received: (at 51173) by debbugs.gnu.org; 30 Nov 2021 09:16:08 +0000 Received: from localhost ([127.0.0.1]:40188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mrzFA-00054m-L3 for submit@debbugs.gnu.org; Tue, 30 Nov 2021 04:16:08 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:43919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mrzF4-00053w-7h for 51173@debbugs.gnu.org; Tue, 30 Nov 2021 04:16:06 -0500 Received: (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id B81DC240005; Tue, 30 Nov 2021 09:15:54 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87r1cm3hqb.fsf@mail.linkov.net> <87h7dgg8go.fsf@mail.linkov.net> <87ilxumi07.fsf@mail.linkov.net> <87sfwvy411.fsf@mail.linkov.net> <86o862re53.fsf@mail.linkov.net> Date: Tue, 30 Nov 2021 10:54:27 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 29 Nov 2021 15:57:51 -0500") Message-ID: <86bl22f1jg.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) >> mouse-minibuffer-check(19) >> mouse-set-point(19) >> help--analyze-key("\23" [19] nil) > > Hpw 'bout the patch below? I confirm that the patch fixes this regression, while not breaking other cases. Maybe this patch also obsoletes this code in the same place: ;; Clicks on the menu bar produce "event" that ;; is just '(menu-bar)', for which ;; `mouse-set-point' is not useful. (and (not (windowp (posn-window (event-start event)))) (not (framep (posn-window (event-start event))))) While testing with this code removed, clicks on the menu bar still work without errors. > Or maybe the use of `mouse-minibuffer-check` in `mouse-set-point` should > be moved to its interactive spec? I agree with Eli that more cardinal changes could be tried only in master. From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Tue, 30 Nov 2021 13:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 51173@debbugs.gnu.org, juri@linkov.net Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.163827761719033 (code B ref 51173); Tue, 30 Nov 2021 13:07:01 +0000 Received: (at 51173) by debbugs.gnu.org; 30 Nov 2021 13:06:57 +0000 Received: from localhost ([127.0.0.1]:40368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ms2qX-0004wv-1L for submit@debbugs.gnu.org; Tue, 30 Nov 2021 08:06:57 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:45509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ms2qV-0004wi-9g for 51173@debbugs.gnu.org; Tue, 30 Nov 2021 08:06:55 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 699CE100164; Tue, 30 Nov 2021 08:06:49 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 891BB10000D; Tue, 30 Nov 2021 08:06:47 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1638277607; bh=u5Hpcq/UdpaQL0YsRbWOaU/vX+qn4xVLED+aym4CeRY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=R10405gqa/BqcQz/lyEE0lv7pVF97tAOy+BNSiV9c9WXBErpzL9rRk/nY6H7CZrMz 0o4syNxzMtMhYu4jEKCKCNMyBbnxc05vL/gapg6M5CLKK/MGb84xTUSFMCh/AJAbsQ 534ka7oThoAkLwQcI5bTynh3eK2brxSA0GGGLpmac6h2+4ow5MBMmp2+s9/MCGlB3h q5IF0YiHjuoVzGJpf7uLlAYM/Z0lsmjQBylK0ivcVnIC5KHbllhv8rCuMjyTwhtGuk 2+0TcphHQZyORz6GKpCoo+7v9SCHzUNsgBK7Xs7wxbKn85RsP6r88dKPUo7hwTkxVr 4sEzlRWPr1rTA== Received: from pastel (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3120D120815; Tue, 30 Nov 2021 08:06:47 -0500 (EST) From: Stefan Monnier Message-ID: References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87r1cm3hqb.fsf@mail.linkov.net> <87h7dgg8go.fsf@mail.linkov.net> <87ilxumi07.fsf@mail.linkov.net> <87sfwvy411.fsf@mail.linkov.net> <86o862re53.fsf@mail.linkov.net> <831r2yuxvq.fsf@gnu.org> Date: Tue, 30 Nov 2021 08:06:39 -0500 In-Reply-To: <831r2yuxvq.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 30 Nov 2021 05:26:49 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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.094 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-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 (---) >> > mouse-minibuffer-check(19) >> > mouse-set-point(19) >> > help--analyze-key("\23" [19] nil) >> >> Hpw 'bout the patch below? >> >> Or maybe the use of `mouse-minibuffer-check` in `mouse-set-point` should >> be moved to its interactive spec? > > If you want this fixed on the release branch, I'd prefer a localized > change in Gnus (with a more thorough change on master). Indeed my patch is not intended for `master` (nor is my suggestion to move the `mouse-minibuffer-check` call to the interactive spec of `mouse-set-point`). Stefan From unknown Fri Sep 05 08:41:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 01 Dec 2021 17:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51173 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Stefan Monnier Cc: 51173@debbugs.gnu.org Received: via spool by 51173-submit@debbugs.gnu.org id=B51173.16383802197056 (code B ref 51173); Wed, 01 Dec 2021 17:37:01 +0000 Received: (at 51173) by debbugs.gnu.org; 1 Dec 2021 17:36:59 +0000 Received: from localhost ([127.0.0.1]:45499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msTXP-0001pk-7j for submit@debbugs.gnu.org; Wed, 01 Dec 2021 12:36:59 -0500 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:41121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msTXN-0001pV-5c for 51173@debbugs.gnu.org; Wed, 01 Dec 2021 12:36:58 -0500 Received: (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 7CA8AFF810; Wed, 1 Dec 2021 17:36:49 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87h7dl6spg.fsf@gnus.org> <87r1cox4th.fsf@mail.linkov.net> <87h7dkx2g5.fsf@mail.linkov.net> <87r1cm3hqb.fsf@mail.linkov.net> <87h7dgg8go.fsf@mail.linkov.net> <87ilxumi07.fsf@mail.linkov.net> <87sfwvy411.fsf@mail.linkov.net> <86o862re53.fsf@mail.linkov.net> <86bl22f1jg.fsf@mail.linkov.net> Date: Wed, 01 Dec 2021 19:36:30 +0200 In-Reply-To: <86bl22f1jg.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 30 Nov 2021 10:54:27 +0200") Message-ID: <861r2w9qht.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) >> Hpw 'bout the patch below? > > I confirm that the patch fixes this regression, > while not breaking other cases. > > Maybe this patch also obsoletes this code in the same place: > > ;; Clicks on the menu bar produce "event" that > ;; is just '(menu-bar)', for which > ;; `mouse-set-point' is not useful. > (and (not (windowp (posn-window (event-start event)))) > (not (framep (posn-window (event-start event))))) > > While testing with this code removed, clicks on the menu bar still work > without errors. Now the fix was pushed to emacs-28.