>> Currently I'm developing a patch (attached below) that allows to type >> ‘M-0 RET’ on a completion to insert it to the minibuffer, and quit the window >> without exiting the minibuffer. > > Below is a better patch. It binds C-RET to insert the completion to the minibuffer. > > Regarding whether to quit the window or not, this question is currently > discussed on emacs-devel. This is a copy of the patch from emacs-devel. It adds two new arguments to 'choose-completion': 'no-exit' that doesn't exit the minibuffer and 'no-quit' that doesn't quit the completions window.