[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42708: Let users copy "*Char Help*" buffer

From: Juri Linkov
Subject: bug#42708: Let users copy "*Char Help*" buffer
Date: Tue, 10 Nov 2020 21:51:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]