From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#42708: Let users copy "*Char Help*" buffer Date: Tue, 10 Nov 2020 21:51:07 +0200 Organization: LINKOV.NET Message-ID: <878sb9j7l0.fsf@mail.linkov.net> References: <87r1smy1du.5.fsf@jidanni.org> <877duerlw2.fsf@mail.linkov.net> <87h7the985.fsf@gnus.org> <87a6z8pr7f.fsf@mail.linkov.net> <87bljogscr.fsf@gnus.org> <87r1q27rvz.fsf@gnus.org> <87pn4u1fxq.fsf@mail.linkov.net> <87tutymyyb.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2758"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 42708@debbugs.gnu.org, rms@gnu.org, =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 10 21:13:22 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kca14-0000at-8P for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Nov 2020 21:13:22 +0100 Original-Received: from localhost ([::1]:33310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kca13-0001Kv-8f for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Nov 2020 15:13:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kca0n-0001KH-NA for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2020 15:13:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55680) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kca0k-0005ka-LN for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2020 15:13:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kca0k-0002ZZ-GV for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2020 15:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Nov 2020 20:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42708 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 42708-submit@debbugs.gnu.org id=B42708.16050391709872 (code B ref 42708); Tue, 10 Nov 2020 20:13:02 +0000 Original-Received: (at 42708) by debbugs.gnu.org; 10 Nov 2020 20:12:50 +0000 Original-Received: from localhost ([127.0.0.1]:38993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kca0Y-0002Z9-HY for submit@debbugs.gnu.org; Tue, 10 Nov 2020 15:12:50 -0500 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:34853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kca0X-0002Yv-09 for 42708@debbugs.gnu.org; Tue, 10 Nov 2020 15:12:49 -0500 X-Originating-IP: 91.129.97.46 Original-Received: from mail.gandi.net (m91-129-97-46.cust.tele2.ee [91.129.97.46]) (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 6DD93FF806; Tue, 10 Nov 2020 20:12:40 +0000 (UTC) In-Reply-To: <87tutymyyb.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 09 Nov 2020 14:39:24 +0100") 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:193053 Archived-At: >> I tried to reproduce the original test case. i.e. to type 'C' >> (dired-do-copy) and select the "*Char Help*" buffer with C-x o. >> The result is weird: the cursor in displayed in the minibuffer, >> but the selected window is "*Char Help*". Here's a patch to fix this: > > [...] > >> - (let ((cursor-in-echo-area t) >> - (executing-kbd-macro executing-kbd-macro) >> + (let ((executing-kbd-macro executing-kbd-macro) > > I haven't tried the patch -- does this have any other effect than fixing > the problem with the cursor in the wrong buffer? I'm not quite clear on > what the effects of cursor-in-echo-area are... No other effect, cursor-in-echo-area was necessary when 'read-char-choice' relied on 'read-key'. >> After looking more at 'read-char-choice', it seems that special handling >> of 'inhibit-keyboard-quit' and 'executing-kbd-macro' is not needed >> anymore? And maybe also adding the 'minibuffer-prompt' face is not >> needed too. Then what remains to do in 'read-char-choice' is to call >> 'read-char-from-minibuffer' and to show 'help-form-show' for 'help-char' key? > > Sounds reasonable (without having looked at the code more than > cursorily). Then what remains in 'read-char-choice' after this clean-up, is just a call to 'read-char-from-minibuffer' and handling 'help-char' by calling 'help-form-show'. OTOH, 'help-form-show' can be simply bound to 'help-char' in 'read-char-from-minibuffer-map'. So I'm lost what would be better to do. I see 2 variants: 1. Declare 'read-char-choice' as an equivalent of 'read-char-from-minibuffer', but with additional handling of 'help-char'; 2. Add handling of 'help-char' to 'read-char-from-minibuffer', and leave 'read-char-choice' unchanged, then replace all calls of 'read-char-choice' with 'read-char-from-minibuffer' calls in the Emacs source tree.