Dmitry Gutov writes: > On 18.06.2020 00:05, Juri Linkov wrote: >>>> I tried implementig it, and it seems to work. The patch below isn't a >>>> full commit, since I changed the structure of project-switch-commands >>>> (it's now mapping command to description), but didn't update the >>>> docstring. >>> >>> This is looking pretty good. >> >> I agree. >> >>> It's a backward incompatibility, though. >> >> Not a problem since it was added recently. > > Here's another concern: right now, if the user types some other > character by accident, the command will keep showing the prompt until > the user hits one of the chars corresponding to the displayed options. > > If we just look in the (bigger) project keymap, in some cases we would > call commands that are not shown at the screen as a result of accidental > presses. And that's a negative. > > Perhaps we could add a user option that would default to the current > behavior? But then the implementation couldn't use the transient map, > though. The patch below fixes that, but allows changing if you only want the listed keys to be valid (the default) or every key in project-prefix-map. It turned out that the transiment map approach didn't work, as it ignored the value in default-directory, thus running all commands in whatever the current project was. -- Philip K.