Remix.run Logo
perihelions 7 months ago

- "Having observed beginners [sic] struggle with C-g not closing the open minibuffer, I know that the following is a quality-of-life refinement:"

Oh wow does this one make me feel stupid. I've spent eons doing a C-x o C-x o C-x o... dance every time there's some bugging-out minibuffer prompt. It *never once* occurred to me to reflect on that as a "I'm doing it wrong!" issue.

TeMPOraL 7 months ago | parent | next [-]

That one was tricky to figure out for me, too. I had a colleague ready to give up on Emacs because of that very issue.

Myself, I also haven't thought about fixing `C-g`. I ended up settling on a compromise solution - I have `winum` package configured so that pressing `M-0` focuses minibuffer, if open, so closing defocused minibuffer is just `M-0 C-g` for me. The keys `M-1` through `M-9` focus the windows 1 through 9, as usual.

I use a config similar to this explicit one with sparse keymap: https://github.com/deb0ch/emacs-winum?tab=readme-ov-file#key...

As long as `winum-auto-assign-0-to-minibuffer` user option is `t`, which it is by default, `M-0` does what I described above.

Having a single key to "focus minibuffer" is also useful with recursive minibuffers, on which I rely increasingly often.

Munksgaard 7 months ago | parent | prev [-]

I had the same reaction. But now I'm wondering, what is the intended way to close the minibuffer in these cases?