Subject: 27.0.90; icomplete vs recursive prompts

From: Kévin Le Gouguec <[email-masked]>
Date: Fri, 20 Mar 2020 19:21:01 +0100

Hello,

There seems to be some interference between icomplete-mode and some
prompting functions such as xref-find-definitions.  From emacs -Q, after
M-x icomplete-mode:

- "Synthetic" reproduction recipe:
    - (completing-read "Foo? " (tags-lazy-completion-table))

- With actual user commands:
    - C-x b foo RET
      - or any non-Lisp buffer, so that xref picks the etags backend
    - M-.

>From there:

- Try to input a character.
    - The identifier prompt is interrupted by the etags prompt ("Visit
      tags table").
- Try to input a character.
    - The etags prompt disappears and we're back to the identifier
      prompt.

The identifier prompt is replaced with the etags prompt as soon as a
single character is typed.  While in the etags prompt, one can use
icomplete commands (e.g. TAB, C-.) as well as C-q CHAR to input
characters one-by-one.

This seems to be reproducible as far back as version 25.3 (couldn't get
any 24.x version to compile).

(ISTR another instance of this bug where TRAMP and EPG would fight each
other when using the sudo or sudoedit methods (the former asking for the
root password, the latter for the ~/.authinfo.gpg key), but I can't seem
to reproduce it.)

Let me know if this report needs more details.  Thank you for your time.

In GNU Emacs 28.0.50 (build 9, x86_64-pc-linux-gnu, GTK+ Version 3.24.14, cairo version 1.16.0)
 of 2020-03-18 built on my-little-tumbleweed
Repository revision: 64d9b4cd762cd39749b899343cb4878e5998a170
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12007000
System Description: openSUSE Tumbleweed

Configured using:
 'configure --with-xwidgets --with-cairo'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS JSON
PDUMPER LCMS2 GMP

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix