Subject: Re: 26.0.50; Problematic transient map in minibuffer-force-complete

From: Stefan Monnier <[email-masked]>
Date: Tue, 07 Feb 2017 11:23:43 -0500

> (define-key icomplete-minibuffer-map [return]
>             #'icomplete-force-complete-and-exit)

FWIW, I think this should be

   (define-key icomplete-minibuffer-map [?\r]
               #'icomplete-force-complete-and-exit)
aka
   (define-key icomplete-minibuffer-map (kbd "RET")
               #'icomplete-force-complete-and-exit)

> M-x epatch
> - Answer y to the question whether the patch is in a buffer
> - Hit RET to confirm the suggested default
> Note that nothing happens, or you get a `ding'.  The second RET works
> OTOH.  Without the "Setup" part it works as expected however.
> I debugged a bit and found that in the first place, the transient map
> installed by minibuffer-force-complete shadows the (my) binding of RET.
> Someone with insight into that code (Stefan, probably): am I'm doing
> something forbidden, or should we improve that code?

I can't see anything in your Setup code which justifies the behavior
you're seeing, so it seems like a bug somewhere.  Probably in the
case of force-complete-and-exit, we should prevent/disable the transient-map.

BTW, if you do

    M-x epatch
    - Answer y to the question whether the patch is in a buffer
    - C-h k RET

what does it say?

        Stefan