Subject: bug#13649: boobytrapped dired-do-async-shell-command question

From: Juri Linkov <[email-masked]>
Date: Mon, 09 May 2022 21:47:19 +0300

>> Actually, `C-h' is useful in `y-or-n-p' as well for the same reasons.
>> For example, `C-h b' in a `y-or-n-p' prompt shows:
>>
>>   Key             Binding
>>   y               act
>>   n               skip
>>   C-l             recenter
>>   ...
>
> Hm...  Here it brings up the help-for-help?  Which doesn't seem right at
> all.

Strange, I see the same that `C-h' brings up the help-for-help,
but then typing also `b' brings up keybindings.

>> BTW, (info "(emacs) Yes or No Prompts") says:
>>
>>      With both types of yes-or-no query the minibuffer behaves as
>>   described in the previous sections; you can recenter the selected window
>>   with ‘C-l’, scroll that window (‘C-v’ or ‘PageDown’ scrolls forward,
>>   ‘M-v’ or ‘PageUp’ scrolls backward)
>>
>> But in fact ‘C-l’ doesn't scroll the window, ‘C-v’ and ‘PageDown’ don't
>> scroll forward, and ‘M-v’ and ‘PageUp’ don't scroll backward.  Should they?
>
> Yeah, all those commands just work on the minibuffer here with
> yes-or-no-p, which seems like a bug (probably).

y-or-n-p has special handling for these keys:

    (define-key map [remap recenter] #'minibuffer-recenter-top-bottom)
    (define-key map [remap scroll-up] #'minibuffer-scroll-up-command)
    (define-key map [remap scroll-down] #'minibuffer-scroll-down-command)
    (define-key map [remap scroll-other-window] #'minibuffer-scroll-other-window)
    (define-key map [remap scroll-other-window-down] #'minibuffer-scroll-other-window-down)

but yes-or-no-p doesn't.