Subject: Re: bug#19064: bug#17272: bug#19064: bug#17272: bug#19064: 25.0.50; `message' overwrites `y-or-n-p' prompt, so user misses it

From: João Távora <[email-masked]>
Date: Tue, 19 Nov 2019 23:38:20 +0000

On Tue, Nov 19, 2019 at 11:20 PM Juri Linkov <[email-masked]> wrote:
>
> > I can't confirm 100% if this is the right bug to report this to, but
> > the recent changes by Juri, which make yes-or-no-p use the minibuffer
> > for reading, break fido-mode's icomplete-magic-kill command
> > (apologies if that's not the exact name).
>
> Please provide step-by-step recipe, it's hard to see what is wrong.
> I tried everything, and don't see anything unusual.

Sorry Juri, I was reporting from my mobile phone.

An easy recipe:

Emacs -Q
M-x fido-mode
(defalias 'yes-or-no-p 'y-or-n-p) ;; a common custmization
C-x b
C-k ;; to kill the Messages buffer

Before your changes to `y-or-n-p` this worked well, afterwards
I get the "Attempt to use minibuffer inside minibuffer" error.

Bear in mind that fido-mode is very new. Also bear in mind
that the problem is already present when yes-or-no-p is used.

I think a good fix is for icomplete to do this (and for
you to do nothing :-) )

diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 8410ca5c3e..bf1d69a4c5 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -241,6 +241,8 @@ icomplete-fido-kill
              (category (alist-get 'category (cdr md)))
              (all (completion-all-sorted-completions))
              (thing (car all))
+             (enable-recursive-minibuffers t)
+             (icomplete-mode nil)
              (action
               (pcase category
                 (`buffer

WDYT?
João