GNU bug report logs -
#9923
24.0.91; `where-is' does not find recentf menu items (cmds, not files)
Previous Next
Full log
View this message in rfc822 format
Lars Ingebrigtsen [2021-08-25 14:18:31] wrote:
> Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:
>>> The bug is not about the file-name entries in the `Open Recent' menu,
>>> but the menu items that represent commands should show up as bindings
>>> for `C-h w', no? If not, why not?
>>
>> Indeed, where-is won't find bindings in menus defined with easy-menu and
>> using the :filter thingy. Hmm...
>
> This problem is still present in Emacs 28. I tried briefly following
> the logic in where_is_internal and friends, but...
>
> I guess we'd have to check for :filter here, evaluate the filter
> function, and then look up the command in the resulting ... menu
> entries? Uhm.
Indeed, and evaluating the :filter may not necessarily return the
"right" result (when that result depends on specific conditions of the
time or context when it is run).
So IIRC `where-is` instead uses the "unfiltered" binding. So you can
often get what you want by being careful about the BINDING you put into
`(menu-item "foo" BINDING :filter ...).
Stefan
This bug report was last modified 91 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.