Subject: Re: bug#10945: Can't search through help menu.

From: Stefan Kangas <[email-masked]>
Date: Fri, 22 Oct 2021 20:49:04 -0700

Juri Linkov <[email-masked]> writes:

>>> >> emacs -Q
>>> >> C-h ?       ; brings up the help menu
>>
>>> >> I now want to search through this menu for "ChangeLog":
>>
>>> >> C-x         ; intending C-x o
>>
>>> >> The menu disappears.  This isn't friendly.
>>
>>> > We can now search that window using `C-h ? C-s', and it switches to
>>> > the *Metahelp* window.  This functionality was added in this comit:
>>
>>> > 956c39d11d 2018-04-02 Make help-for-help window searchable (Bug#19655)
>>
>>> > `C-h C-x o' still doesn't work, though.
>>
>>> > Is that good enough here?
>>
>>> Maybe help-for-help should use the minibuffer for reading commands
>>> instead of using explicit read-key-sequence?  This would allow
>>> switching to the *Metahelp* window with 'C-x o'.
>>
>> This sounds like an excellent idea.
>
> I tried, but the major problem is how to create a wrapper around
> commands in 'help-map' to exit the minibuffer before running them.
> For example, evaluating:
>
> (read-from-minibuffer "C-h (Type ? for further options)- " nil help-map)
>
> then typing one of the help character, doesn't exit the minibuffer.
> Some additional layer of indirection could exit the minibuffer
> before running the command, but currently I have no idea how to do this.
>
> PS: Also isearch-help-for-help can't use the minibuffer to read help keys
> while isearch-mode is enabled, but this is a minor obstacle.

Thanks for looking into that.  The issue seems orthogonal to this bug
report though, so I will close this for now.  Feel free to open a new
bug report if you think we should continue looking into that part.

One observation is that you can now land in the " *Metahelp*" buffer by
saying "C-h C-h C-s emacs RET", which lands point in it.