From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.bugs Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work Date: Wed, 13 Oct 2021 10:05:48 +0900 Organization: Emacsen advocacy group Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21160"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (x86_64-pc-cygwin) To: 51173@debbugs.gnu.org Cancel-Lock: sha1:wABadqWskSMbrocvm+POLBvPFlc= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 13 03:07:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1maSjh-0005Ng-KZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Oct 2021 03:07:13 +0200 Original-Received: from localhost ([::1]:50212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maSjf-0006xT-Vg for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 21:07:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maSjX-0006uK-24 for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 21:07:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44928) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maSjW-0007dY-Q7 for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 21:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1maSjW-00060U-IO; Tue, 12 Oct 2021 21:07:02 -0400 X-Loop: help-debbugs@gnu.org 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-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.163408716223004 (code B ref -1); Wed, 13 Oct 2021 01:07:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Oct 2021 01:06:02 +0000 Original-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 Original-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 Original-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 Original-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 Original-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) Original-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 Original-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 Original-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 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&( 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217085 Archived-At: --=-=-= 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. --=-=-=--