unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 42708@debbugs.gnu.org, rms@gnu.org,
	"積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Subject: bug#42708: Let users copy "*Char Help*" buffer
Date: Tue, 03 Nov 2020 20:57:37 +0200	[thread overview]
Message-ID: <87pn4u1fxq.fsf@mail.linkov.net> (raw)
In-Reply-To: <87r1q27rvz.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 13 Oct 2020 04:59:28 +0200")

>>> Oh, I noticed it doesn't support 'C-h' that should pop up the buffer "
>>> *Char Help*" from the dynamic variable 'help-form'.
>>>
>>> Then maybe we should rewrite read-char-choice to use
>>> read-char-from-minibuffer?
>>
>> Yes, that's even better -- then all the callers to read-char-choice
>> would no longer be as modal as they are now.
>
> I've now done this on the trunk.

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:

diff --git a/lisp/subr.el b/lisp/subr.el
index 286851dfc8..606ce004d5 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2610,8 +2610,7 @@ read-char-choice
   (unless (consp chars)
     (error "Called `read-char-choice' without valid char choices"))
   (let (char done show-help (helpbuf " *Char Help*"))
-    (let ((cursor-in-echo-area t)
-          (executing-kbd-macro executing-kbd-macro)
+    (let ((executing-kbd-macro executing-kbd-macro)
 	  (esc-flag nil))
       (save-window-excursion	      ; in case we call help-form-show
 	(while (not done)

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?





  parent reply	other threads:[~2020-11-03 18:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04 13:41 bug#42708: Let users copy "*Char Help*" buffer 積丹尼 Dan Jacobson
2020-08-04 23:42 ` Juri Linkov
2020-08-05  9:24   ` Lars Ingebrigtsen
2020-08-05 23:52     ` Juri Linkov
2020-08-06  7:12       ` Lars Ingebrigtsen
2020-10-13  2:59         ` Lars Ingebrigtsen
2020-10-13 15:27           ` Drew Adams
2020-11-03 18:57           ` Juri Linkov [this message]
2020-11-09 13:39             ` Lars Ingebrigtsen
2020-11-10 19:51               ` Juri Linkov
2020-11-10 20:26                 ` Drew Adams
2020-11-11  5:40                   ` Richard Stallman
2020-11-11  8:09                   ` Juri Linkov
2020-11-11 19:41                     ` Drew Adams
2020-11-11 20:07                       ` Juri Linkov
2020-11-11 21:24                         ` Drew Adams
2020-11-12  7:32                           ` Juri Linkov
2020-11-12 18:09                             ` Drew Adams
2020-11-11 10:28                 ` Lars Ingebrigtsen
2020-11-11 19:19                   ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pn4u1fxq.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=42708@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    --cc=larsi@gnus.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).