embark icon indicating copy to clipboard operation
embark copied to clipboard

embark-prefix-help-command terminates transient maps

Open minad opened this issue 3 years ago • 1 comments

Maybe it is possible to restore them afterwards? This would help if one uses the Emacs 28 repeat-mode. cc @karthink @zetagon

minad avatar Feb 07 '22 19:02 minad

I have some code in my package el-secretario that ensures that a completing-read call "pauses" the last used hercules map (which is basically a transient map with which-key integration + some other stuff) and then when the completing read is done it resumes the hercules map. Here's the beginning of that code: https://git.sr.ht/~zetagon/el-secretario/tree/melpa/item/el-secretario.el#L197

It was a while ago I wrote that, but the gist is that whenever the minibuffer is used when hercules is up it adds a temporary hook (i.e. it removes itself when called) on minibuffer-exit-hook that calls hercules with the same keymap.

Since embark-prefix-help-command uses completing-read porting this code should solve this problem as a special case. I'm not sure if this generality is desirable though.

Zetagon avatar Feb 07 '22 19:02 Zetagon