From unknown Wed Jun 18 23:05:36 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#40152 <40152@debbugs.gnu.org> To: bug#40152 <40152@debbugs.gnu.org> Subject: Status: 27.0.90; icomplete vs recursive prompts Reply-To: bug#40152 <40152@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:05:36 +0000 retitle 40152 27.0.90; icomplete vs recursive prompts reassign 40152 emacs submitter 40152 K=C3=A9vin Le Gouguec severity 40152 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 20 14:21:14 2020 Received: (at submit) by debbugs.gnu.org; 20 Mar 2020 18:21:14 +0000 Received: from localhost ([127.0.0.1]:45589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFMGf-0003Us-Ps for submit@debbugs.gnu.org; Fri, 20 Mar 2020 14:21:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:47067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFMGc-0003Ug-90 for submit@debbugs.gnu.org; Fri, 20 Mar 2020 14:21:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42910) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFMGY-0004pU-Tk for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2020 14:21:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFMGX-0003XQ-Rn for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2020 14:21:06 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:50927) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jFMGX-0003Ug-9q for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2020 14:21:05 -0400 Received: by mail-wm1-x344.google.com with SMTP id d198so1843287wmd.0 for ; Fri, 20 Mar 2020 11:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=lY4qPr993pgfdQT1xERI72cFU53YnnImrUoWXwizcrE=; b=b7xeZcIu2PGC8NqBRS4luWVW/qklvKanSjmK3Q3bF8xZW7pEQ/To7imZKC/CFj64aA 04deb/7Wp+GreoaOmgOL9jO88/7SYHfIG1Uusvo7JafM23BPna8CJgtXGctQ4Yvf4ivW 6izBcs1JOA1FlR0TIYpcQu3WCzL3LaarewselKlt8+0tSp49R3kalQppsSFQI6mGAQ4L G7yWpKKauUy0lcO8QZ8dbMaXFkxytBxrM8WG3on36vhkxsEV2i4Ryqy4SBvjSkrSTU0v Z2SXP3gacVGiCOlOyBb3lYswUZ6I29W+kzq7xXFBTC+G4PPq87NkkWWdksT1OSMRxh2s 5xYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=lY4qPr993pgfdQT1xERI72cFU53YnnImrUoWXwizcrE=; b=E+EjoZXftj6epyc0Vy4naHlvKuYtsGfnrXo3f/hi97UrgqVo1jCCgdY72sqzW/R1IY FSBU/EGSjqLJOK5vHzq3M6rD4fEZim2A3YqC8+EYn5yNfLBx0LauFWJ8micA6/xF3WS1 E86+1j92exmF7sne6GaHbXC0GuA31b3b1sL4fKFI4VDOu7Y5BujdGOLh//HC9Zf7AUgY 7rv7SKRKe4yt86AwgeBnlBlgbsqocA4wu6MJM3nLfCJj/fjUUbm68WShtAkYBLekqFWp xHDYoBaGEoeGMakS2xPH4VohTS4ujXex1eOlanDrW97tH9bmfwUfWU4Lw7ow+WcQCxHI UJvA== X-Gm-Message-State: ANhLgQ2Lrlj0SGjlTJ1wkG4A2Ja1q4uQo7RVaP+2vEfUaMkGd2ilWaxO dlJin4toE1JkU56czkJclXzSSAWP X-Google-Smtp-Source: ADFU+vv/PtRp3Br491MkHVLaPe7tr1Y8ktJcru5gob0B9V6cr51VadjqVSeaAvmDxxrMcU1YNAr11A== X-Received: by 2002:a1c:2c85:: with SMTP id s127mr11754001wms.18.1584728462729; Fri, 20 Mar 2020 11:21:02 -0700 (PDT) Received: from my-little-tumbleweed (200.143.13.109.rev.sfr.net. [109.13.143.200]) by smtp.gmail.com with ESMTPSA id h26sm6493661wmb.19.2020.03.20.11.21.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Mar 2020 11:21:01 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: bug-gnu-emacs@gnu.org Subject: 27.0.90; icomplete vs recursive prompts Date: Fri, 20 Mar 2020 19:21:01 +0100 Message-ID: <87wo7ex4z6.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 21 03:27:52 2020 Received: (at 40152) by debbugs.gnu.org; 21 Mar 2020 07:27:52 +0000 Received: from localhost ([127.0.0.1]:45881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFYXw-0003Kj-Gk for submit@debbugs.gnu.org; Sat, 21 Mar 2020 03:27:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFYXv-0003KX-Fm for 40152@debbugs.gnu.org; Sat, 21 Mar 2020 03:27:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jFYXq-0004hH-BD; Sat, 21 Mar 2020 03:27:46 -0400 Received: from [176.228.60.248] (port=1166 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jFYXp-0005Bq-5m; Sat, 21 Mar 2020 03:27:45 -0400 Date: Sat, 21 Mar 2020 09:27:44 +0200 Message-Id: <83k13edv67.fsf@gnu.org> From: Eli Zaretskii To: =?iso-8859-1?Q?K=E9vin?= Le Gouguec In-Reply-To: <87wo7ex4z6.fsf@gmail.com> (message from =?iso-8859-1?Q?K=E9v?= =?iso-8859-1?Q?in?= Le Gouguec on Fri, 20 Mar 2020 19:21:01 +0100) Subject: Re: bug#40152: 27.0.90; icomplete vs recursive prompts References: <87wo7ex4z6.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40152 Cc: 40152@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Kévin Le Gouguec > Date: Fri, 20 Mar 2020 19:21:01 +0100 > > - "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. What would you like to happen instead? From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 21 08:21:37 2020 Received: (at 40152) by debbugs.gnu.org; 21 Mar 2020 12:21:37 +0000 Received: from localhost ([127.0.0.1]:46086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFd8C-0004uK-UM for submit@debbugs.gnu.org; Sat, 21 Mar 2020 08:21:37 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:53688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFd8A-0004u4-QR for 40152@debbugs.gnu.org; Sat, 21 Mar 2020 08:21:35 -0400 Received: by mail-wm1-f50.google.com with SMTP id 25so9257208wmk.3 for <40152@debbugs.gnu.org>; Sat, 21 Mar 2020 05:21:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=O/S8VtERhfs2DXZANKIhxs4bMaXYuVI/Ry9uCkkDaOY=; b=FHwCbAuW/JZAkVP3//itLS4IpQMx+aO0RPNa3wWUEU4CTWa3kbFpTqc08/nLsWUZ2o aNVwSxOIlIpDBkiY+5ra5hAI112oq0u3S68wU0oDwO21PF9uRFgAtnARcDWmLyo+T9Pj 5rMk1rq+oFdC3oo6Bq0EVyWkmMfePdsE/7pltk2kZZlTw8YZO/4Dgov9PFe6U1LhsCsb JavHfrZeT/XAdxf1zxY8gD8B322R0OwcqXRhSJdcjeH2t1vsg9enFVFayqbT4wA+J6lP 44qE4TGBvT3S7UZY3pEBl6as60FHi5/8jddmBODHwjLV6ndhyEnOuT0SuStQQRjBVERq TgaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=O/S8VtERhfs2DXZANKIhxs4bMaXYuVI/Ry9uCkkDaOY=; b=l1i1IBLo//fN3iikvIh+OAUNC3JvR/1VoEsfbVtTLyJbqIMzlNLU7NRDxjyexIVCBt ZzAtZDIPclShx+kOEq/jArUkKSLxd94IPjS65LKdOqhpqi6gEBlQMbCcRPFyiUu6VLqL oUFPudvedM/eAU2NsTbg7oL/YNnVTNKg28bHke1tMJk7dMSEI9zyl+nJ70N5OKK9/uau WNjSeDY42shbhdXciao32WeYDT8AVObNMxYxaURf0nXTeHqs+b0UOQEoylQQQe8eIOMo IfVch8bYhhv8BUUwBdi0Sy4SO+aRLSff1R+2cumdMdSbDMAUMOmZbX/RJ0hiVu5rkrni 8SLA== X-Gm-Message-State: ANhLgQ2JNr6zeO77zEY2C9S+ogLh9WJyYeYkb07ZeIfe6rwDlRoW2QKY 0nMDg0SBjnuaEdLILTM5asA6wSrk X-Google-Smtp-Source: ADFU+vuaBijBXWGNcBt6EZubMMFsZc2ZVInr+B7DPoZG33oyRwZ3eeO2n5uAEynvFwmdSgyp3KXuzA== X-Received: by 2002:a1c:ed1a:: with SMTP id l26mr8749584wmh.175.1584793288605; Sat, 21 Mar 2020 05:21:28 -0700 (PDT) Received: from my-little-tumbleweed (200.143.13.109.rev.sfr.net. [109.13.143.200]) by smtp.gmail.com with ESMTPSA id d18sm13012764wrq.22.2020.03.21.05.21.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 05:21:27 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Eli Zaretskii Subject: Re: bug#40152: 27.0.90; icomplete vs recursive prompts References: <87wo7ex4z6.fsf@gmail.com> <83k13edv67.fsf@gnu.org> Date: Sat, 21 Mar 2020 13:21:27 +0100 In-Reply-To: <83k13edv67.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 21 Mar 2020 09:27:44 +0200") Message-ID: <87v9mxsxtk.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40152 Cc: 40152@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: K=C3=A9vin Le Gouguec >> Date: Fri, 20 Mar 2020 19:21:01 +0100 >>=20 >> - "Synthetic" reproduction recipe: >> - (completing-read "Foo? " (tags-lazy-completion-table)) >>=20 >> - With actual user commands: >> - C-x b foo RET >> - or any non-Lisp buffer, so that xref picks the etags backend >> - M-. >>=20 >> From there: >>=20 >> - 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. >>=20 >> 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. > > What would you like to happen instead? When the etags prompt interrupts the xref prompt, I'd like the etags prompt to remain uninterrupted until I exit it (with e.g. RET/C-j). In particular, self-inserting characters do not cause the xref prompt to come back. For example, if I'm in a buffer whose default-directory is the root of the Emacs source repository (e.g. in a Dired buffer, visiting the Makefile=E2=80=A6) and I hit C-. (and point is not on something that looks = like an identifier), here's what happens: 1. the "Find definitions of" prompt appears, 2. I start typing an identifier, 3. the "Visit tags table" prompt interrupts, 4. I'd like to input "src/ C-j", but every self-inserting character makes the prompt go back-and-forth between "Find definitions of" and "Visit tags table". Worse, when the prompt comes back to "Visit tags table", any character I had previously input has disappeared. I just found out that there is a workaround: in step 2, if I hit TAB (minibuffer-complete) instead of typing an identifier, the "Visit tags table" prompt comes up *and stays until I exit it*. The back-and-forth only starts if 1. I input a self-inserting char during the first prompt, or 2. if icomplete-show-matches-on-no-input is t. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 21 09:36:44 2020 Received: (at 40152) by debbugs.gnu.org; 21 Mar 2020 13:36:44 +0000 Received: from localhost ([127.0.0.1]:46128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFeIu-0007Be-0z for submit@debbugs.gnu.org; Sat, 21 Mar 2020 09:36:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35153) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFeIs-0007BQ-08 for 40152@debbugs.gnu.org; Sat, 21 Mar 2020 09:36:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45205) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jFeIm-0005Q6-R3; Sat, 21 Mar 2020 09:36:36 -0400 Received: from [176.228.60.248] (port=4703 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jFeIm-0007Z9-24; Sat, 21 Mar 2020 09:36:36 -0400 Date: Sat, 21 Mar 2020 15:36:35 +0200 Message-Id: <837dzdesnw.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec In-Reply-To: <87v9mxsxtk.fsf@gmail.com> (message from =?utf-8?Q?K=C3=A9vin?= Le Gouguec on Sat, 21 Mar 2020 13:21:27 +0100) Subject: Re: bug#40152: 27.0.90; icomplete vs recursive prompts References: <87wo7ex4z6.fsf@gmail.com> <83k13edv67.fsf@gnu.org> <87v9mxsxtk.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40152 Cc: 40152@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: KĂ©vin Le Gouguec > Cc: 40152@debbugs.gnu.org > Date: Sat, 21 Mar 2020 13:21:27 +0100 > > >> 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. > > > > What would you like to happen instead? > > When the etags prompt interrupts the xref prompt, I'd like the etags > prompt to remain uninterrupted until I exit it (with e.g. RET/C-j). In > particular, self-inserting characters do not cause the xref prompt to > come back. > > For example, if I'm in a buffer whose default-directory is the root of > the Emacs source repository (e.g. in a Dired buffer, visiting the > Makefile…) and I hit C-. You mean, M-., right? >(and point is not on something that looks like an identifier), How do you do that? If I type M-. in *scratch*, Emacs doesn't ask me whether to visit a tags table (because the major mode is emacs-lisp). I need to visit a C file in src/ or lib-src/, but then all I need to type at the prompt is RET, nothing else. And if I do the above from a Dired buffer which shows the Emacs's root directory, then I get the prompt about visiting the tags table without any "Find definitions" prompt, and the problem doesn't happen. So please show the exact recipe for how to reproduce the problem you see. > here's what happens: > > 1. the "Find definitions of" prompt appears, > 2. I start typing an identifier, > 3. the "Visit tags table" prompt interrupts, > 4. I'd like to input "src/ C-j", but every self-inserting character > makes the prompt go back-and-forth between "Find definitions of" and > "Visit tags table". Worse, when the prompt comes back to "Visit tags > table", any character I had previously input has disappeared. So the problem happens _after_ the prompt, not _with_ the prompt. That wasn't quite clear, at least to me, from your original report: there was no sign in it what was the actual problem and what was the expected and result. Now I think it's becoming clearer, thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 21 16:03:48 2020 Received: (at 40152) by debbugs.gnu.org; 21 Mar 2020 20:03:48 +0000 Received: from localhost ([127.0.0.1]:48145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFkLU-0002Ja-DC for submit@debbugs.gnu.org; Sat, 21 Mar 2020 16:03:48 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:37088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFkLS-0002JF-QB for 40152@debbugs.gnu.org; Sat, 21 Mar 2020 16:03:47 -0400 Received: by mail-wr1-f44.google.com with SMTP id w10so11711017wrm.4 for <40152@debbugs.gnu.org>; Sat, 21 Mar 2020 13:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=oubLIGbh6p3YVzLG2l7NXo6+S9ihFZEzBgqgi1ypbH8=; b=relDrULNTraWDpPDna1kvlepTPyganRbuD0e1uoHHku44uy+IDHGKodTMy5xraaI9Q /gWhC8RRH9n1faThk7dyn/ZmvGBDWAhoxzHOG9uyP6UjbK5USbRCj4sOq1Iribn7xklB OUOmnCYg/W/tBKYUJD3b3zzPcJlY5SunYjx7C57R+SYeojd0jU7F/kzkky6Cjd2170mi 2kwEI//CE1Y8ItWp8GhoEeEAlEiKZu8t2eayu/F6h8WYHqyt8iR2aBWi81N9sWgKFYzG U8HaK3xDkJDmNAnLQNL+j+3AEeKeGgL1aoBhIFlaLabLGfTb5gTponQEi2J8WofhvFrK qnfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=oubLIGbh6p3YVzLG2l7NXo6+S9ihFZEzBgqgi1ypbH8=; b=B5Bjj6JkTlEaZ409ytKpG3tbvU2isC+W7SfHA4uhnMO+jylcjjXSjQyCB+f9qqpSIh 62UReMgmxVmN+4JqsZdZHtLk9eps0J1hXzVVQFRH+3VDKCXIde8FvMIsShkzhg/audIY chxNjjGTiURmbjLOMWtmcPYdLY+Jas9+LLYGKJHyThFUZnk5QfNzyck2FCPQcoGzrQKe WCCLehpfvxBI4D/WCB39BTYHTYxnTfCtpMMVmZMQ6OMod4hCkEtJoYzCrJtp/3QBpdCo GfgfupLxxyTB7o4MeIm/Pex1fk9MyqnZFWfj+FIRQWEBImoXsIj9wSI5simTl6kmmPly VIEA== X-Gm-Message-State: ANhLgQ1uCFVAMi9Y2rMKoeLWEPiyaDXFvgFSXHRXs/3Jn/gQCRfQ3c8c 3ksYWXQriEj0InO05V0BczQyrXXE X-Google-Smtp-Source: ADFU+vvzbnCG6l1GtWPmHhXCjbFE9NgfKwSdpd3UEDK4GfRIe4qd2+ZO6kro6Kdjn215oGQVmUJYdQ== X-Received: by 2002:a5d:69cb:: with SMTP id s11mr18565378wrw.47.1584821020608; Sat, 21 Mar 2020 13:03:40 -0700 (PDT) Received: from my-little-tumbleweed (200.143.13.109.rev.sfr.net. [109.13.143.200]) by smtp.gmail.com with ESMTPSA id e1sm15447497wrx.90.2020.03.21.13.03.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 13:03:39 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Eli Zaretskii Subject: Re: bug#40152: 27.0.90; icomplete vs recursive prompts References: <87wo7ex4z6.fsf@gmail.com> <83k13edv67.fsf@gnu.org> <87v9mxsxtk.fsf@gmail.com> <837dzdesnw.fsf@gnu.org> Date: Sat, 21 Mar 2020 21:03:39 +0100 In-Reply-To: <837dzdesnw.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 21 Mar 2020 15:36:35 +0200") Message-ID: <87fte13278.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40152 Cc: 40152@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> For example, if I'm in a buffer whose default-directory is the root of >> the Emacs source repository (e.g. in a Dired buffer, visiting the >> Makefile=E2=80=A6) and I hit C-. > > You mean, M-., right? Right =F0=9F=A4=A6. >>(and point is not on something that looks like an identifier), > > How do you do that? If I type M-. in *scratch*, Emacs doesn't ask me > whether to visit a tags table (because the major mode is emacs-lisp). > I need to visit a C file in src/ or lib-src/, but then all I need to > type at the prompt is RET, nothing else. And if I do the above from a > Dired buffer which shows the Emacs's root directory, then I get the > prompt about visiting the tags table without any "Find definitions" > prompt, and the problem doesn't happen. > > So please show the exact recipe for how to reproduce the problem you > see. > >> here's what happens: >>=20 >> 1. the "Find definitions of" prompt appears, >> 2. I start typing an identifier, >> 3. the "Visit tags table" prompt interrupts, >> 4. I'd like to input "src/ C-j", but every self-inserting character >> makes the prompt go back-and-forth between "Find definitions of" and >> "Visit tags table". Worse, when the prompt comes back to "Visit tags >> table", any character I had previously input has disappeared. > > So the problem happens _after_ the prompt, not _with_ the prompt. > That wasn't quite clear, at least to me, from your original report: > there was no sign in it what was the actual problem and what was the > expected and result. Now I think it's becoming clearer, thanks. My apologies for being unclear. Do those 4 steps you quoted (preceded by M-x icomplete-mode) demonstrate the problem well enough then, or is there anything I should add? To recap: - The problem only happens - with icomplete-mode, - with the etags backend, - when there is no "identifier-like" symbol under point, - when either - the user starts typing self-inserting characters when the xref identifier prompt shows up, or - icomplete-show-matches-on-no-input is t. - The problem is that one cannot fill in the tags table prompt easily: self-inserting characters cause the minibuffer to move back-and-forth between the tags table prompt and the xref identifier prompt. The tags table prompt interrupting the xref prompt is not an issue (to me, at least); what I would like is being able to complete the tags table prompt, then go back to the xref prompt. - A workaround consists in calling minibuffer-complete (TAB) immediately when the xref prompt shows up; this brings up a functional tags table prompt. (This workaround cannot work when icomplete-show-matches-on-no-input is t.) Let me know if I managed to muddy things up further. Thank you for your patience. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 07 05:11:37 2020 Received: (at 40152) by debbugs.gnu.org; 7 Sep 2020 09:11:37 +0000 Received: from localhost ([127.0.0.1]:48080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFDBY-00063c-VF for submit@debbugs.gnu.org; Mon, 07 Sep 2020 05:11:37 -0400 Received: from mail-wm1-f45.google.com ([209.85.128.45]:52907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFDBX-00063Q-Bg for 40152@debbugs.gnu.org; Mon, 07 Sep 2020 05:11:35 -0400 Received: by mail-wm1-f45.google.com with SMTP id q9so13640153wmj.2 for <40152@debbugs.gnu.org>; Mon, 07 Sep 2020 02:11:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-transfer-encoding; bh=4ZAlwRJ75PPVdo6oYYbmjU82VoEfSql2nItaZhQZHlI=; b=DztfxoLrIb/xnh8xLPanHlRcei1o0xhur6n1/cV1k9/sPd1VIQ/rhZx+EI3xcuDmbY zACey7mULUjKqGqC92A1H/qg7tUwdDmrlEsNCoUJv1K+L3/o+TdzE7mYoJEbq3LSMEgY HBIaDgadYZ+wKtC5XP8akT1B/zqfHC7L0xvjkerhJS9FHqqiLEBYXkObEHKio6+zlte0 ZlhB2YZnV9CY8fls3jRnsCbgzdB1+UwoFECbSlGyDr6515c4kFECcma7VCk925My2uYO MRv31lQtMBirikt97YTz+09g4dDLju0K7mMsyELevsBjDfR1snr+NlePBXa9QD3aMdHO H6/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=4ZAlwRJ75PPVdo6oYYbmjU82VoEfSql2nItaZhQZHlI=; b=hUrPRqyxDFto6hYiXajSDjXy3HNnBKfbzklywaHG0bbNsNqbEgNwq4lLhJdHiOkNTU Sv9JFUGCfPv+7u8nrg7m2DSW1TmzfZTC8lF0bqT4ZvjHWMDg5lE7b6GM86f7EUVw2g1U W9dei68hsIRzYIYCUnYVg7xv/r7o34hgOYt9zcRR/SU2rkmJYGCsXmYALw4W3oHTbHks 2fbS80XVZFRqE7O5OxC3LkOwql/KOmK5YV8l5AnR1wF8Wr/o6e+gf17vId2NcN77FH7e LHzndV7QTExBf6kj1nweu0bl4bpkhrB3CO7y9dQGVg/hKRd3yO4SQEneDcS/0Igid50I 7sOg== X-Gm-Message-State: AOAM532Dz3ZHeCq0ZlC/+Vuqdla7W+EZhBM/YZamNFNY1gH6G2ojlFt8 0RoyX4V5n03P2F1eMyBIJE7+BxDQ5CM= X-Google-Smtp-Source: ABdhPJyNLBJA+EDcoz5SlcXuUcaWjp0auzYF1/VxjGvDVDQi8El/HaqWNISytu6tibQKxJnhj6zs3g== X-Received: by 2002:a1c:3284:: with SMTP id y126mr19843859wmy.146.1599469889128; Mon, 07 Sep 2020 02:11:29 -0700 (PDT) Received: from klegouguec-HP-ProBook-450-G1 ([2a01:e0a:20e:d340:2c3b:9883:b167:692]) by smtp.gmail.com with ESMTPSA id p3sm6657801wmm.40.2020.09.07.02.11.27 for <40152@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Sep 2020 02:11:28 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: 40152@debbugs.gnu.org Subject: Re: bug#40152: 27.0.90; icomplete vs recursive prompts References: <87wo7ex4z6.fsf@gmail.com> Date: Mon, 07 Sep 2020 11:11:27 +0200 In-Reply-To: <87wo7ex4z6.fsf@gmail.com> (=?utf-8?Q?=22K=C3=A9vin?= Le Gouguec"'s message of "Fri, 20 Mar 2020 19:21:01 +0100") Message-ID: <87sgbulznk.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40152 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) K=C3=A9vin Le Gouguec writes: > (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.) Found a recipe, with the SSH method: 1. create an ~/.authinfo.gpg file with the EasyPG assistant[1] 2. pkill -HUP gpg-agent 2. emacs -Q 3. (progn (setq epg-pinentry-mode 'loopback) (icomplete-mode)) 5. C-x C-f /ssh: This brings up epa.el's "Passphrase for symmetric encryption" prompt to unlock ~/.authinfo.gpg. The prompt cannot be completed, because any self-inserting character brings the "Find file" prompt back up, and from *there*, typing any character brings the "Passphrase for symmetric encryption" prompt back again. I don't mind icomplete proactively trying to open authinfo.gpg to find candidates for hostnames[2]; unfortunately as things stand I have to hit C-g a bunch, disable icomplete, do whatever I was trying to do, then enable icomplete back. [1] I.e. visit ~/.authinfo.gpg, and save it with a password when prompted. The content doesn't matter, but it has to be properly encrypted, otherwise GPG will recognize the file is malformed and abort before EPA can prompt for a password. [2] Or a TAGS file to find candidates for identifiers, as seen in the initial report. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 24 10:07:11 2021 Received: (at 40152) by debbugs.gnu.org; 24 Jan 2021 15:07:11 +0000 Received: from localhost ([127.0.0.1]:36983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3gys-0000Hu-TX for submit@debbugs.gnu.org; Sun, 24 Jan 2021 10:07:11 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:35724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3gyr-0000Hd-87 for 40152@debbugs.gnu.org; Sun, 24 Jan 2021 10:07:10 -0500 Received: by mail-wr1-f49.google.com with SMTP id l12so9755552wry.2 for <40152@debbugs.gnu.org>; Sun, 24 Jan 2021 07:07:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=gZx/Bpd2Ihxhkb6T62D4lJbpeF/hZ1DyldJj/sAQoPw=; b=OdPZI/8/9oR9sMo2Z6CArQEZFWMWZg8HgRwdFA/gsPe4K/uvgkkFk2fTCLKaF54/R/ uqUvfh+NsnTV/nh3Pgw4iiPjSI+AjWZkwZMjd+4O7nO2srQLcaYS2jje/M55vfY46Pkl CPaMxiAEra/AAJ43O5W39EUQGhh3DaiC23Tmw9OlvAliLNSty28yDwulPE+lJqJGjOKv aEipO7GZpCiyjZbT+WscbEOz5xTyf4fTvRfThanNzEqHI5jwg1U3+8jJC5bIKsDfLiod cDJuuPzJ/SKmuSADT7q7FiaItJlL1iMbliAF3rhTZnz6Ndv0m51ogvIZrSMdxuMCL45X Mhlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=gZx/Bpd2Ihxhkb6T62D4lJbpeF/hZ1DyldJj/sAQoPw=; b=e2Xiw/X8WBlzVDwSDToXikLdjWU+VcNsGPLb5gBYErSDBCVxPBkSfrVy/IM3uF0APV Yxzj0jWr2jizgzbRns9HWju2g3+XFqh1J4iiNAEC9TYVdKONu0PUa6bV2pxQqxA7nHA8 1jhys4b4Bkzhww7xsd74eVuzBeazZJUS3ZoMLjF6T59N+ujZiRlntmU3p4K71BQSLFjM UltG3bbe9ZMmAxIl+s9mNMcjdegvBHG5XY6jJKntL/Jqn1sazH0NfgpntE29kV/Kr+iv vrla98oSwtY+CL5GGvAO50scAs4//W4HSfV8VzZ16JHvMXBqV2jrNDpr4mTauQsxgxvx 65fg== X-Gm-Message-State: AOAM530R5xNQxDo5fAP6eTMcYMqwHpS15R9hkncyIE+ackgERELmJpDD 2opdcDkmXCUGdhDE7A2LtV7CHLPBYt2Kbw== X-Google-Smtp-Source: ABdhPJyLbQ2dAik3evZmv4ajscj8Dg3GaciRR0HypNdUHorIEh5+kLuSnxMQgi3L3xa9S8Xrn6dooA== X-Received: by 2002:adf:ab1d:: with SMTP id q29mr12782586wrc.415.1611500823066; Sun, 24 Jan 2021 07:07:03 -0800 (PST) Received: from my-little-tumbleweed ([2a01:e0a:20e:d340:922b:34ff:fe95:9aed]) by smtp.gmail.com with ESMTPSA id b12sm12554930wrr.35.2021.01.24.07.07.01 for <40152@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jan 2021 07:07:01 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: 40152@debbugs.gnu.org Subject: Re: bug#40152: 27.0.90; icomplete vs recursive prompts References: <87wo7ex4z6.fsf@gmail.com> <87sgbulznk.fsf@gmail.com> Date: Sun, 24 Jan 2021 16:06:55 +0100 In-Reply-To: <87sgbulznk.fsf@gmail.com> (=?utf-8?Q?=22K=C3=A9vin?= Le Gouguec"'s message of "Mon, 07 Sep 2020 11:11:27 +0200") Message-ID: <875z3m74s0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40152 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable K=C3=A9vin Le Gouguec writes: > 1. create an ~/.authinfo.gpg file with the EasyPG assistant[1] > 2. pkill -HUP gpg-agent > 2. emacs -Q > 3. (progn > (setq epg-pinentry-mode 'loopback) > (icomplete-mode)) > 5. C-x C-f /ssh: > > This brings up epa.el's "Passphrase for symmetric encryption" prompt to > unlock ~/.authinfo.gpg. The prompt cannot be completed, because any > self-inserting character brings the "Find file" prompt back up, and from > *there*, typing any character brings the "Passphrase for symmetric > encryption" prompt back again. Still getting bitten by this, just about every time I start Emacs and open a remote file. I've tried to debug this repeatedly, but I'm obviously doing it wrong since no amount of debugging-on-entry or tweaking {pre,post}-command-hook amounted to anything. FWIW I've dumped backtraces of both the TRAMP recipe and the etags recipe. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=tramp Content-Transfer-Encoding: quoted-printable Debugger entered--entering a function: * read-file-name("Visit tags table (default TAGS): " "/usr/local/share/emac= s/28.0.50/lisp/" "TAGS" t) visit-tags-table-buffer() #f(compiled-function (string pred action) #)= ("f" nil metadata) completion-metadata("f" #f(compiled-function (string pred action) #) nil) completion--field-metadata(22) icomplete-completions("f" #f(compiled-function (string pred action) #) nil nil) icomplete-exhibit() (let ((non-essential t)) (icomplete-exhibit)) icomplete-post-command-hook() read-from-minibuffer("Find definitions of: " nil (keymap (menu-bar keymap= (minibuf "Minibuf" keymap (tab menu-item "Complete" minibuffer-complete :h= elp "Complete as far as possible") (space menu-item "Complete Word" minibuf= fer-complete-word :help "Complete at most one word") (63 menu-item "List Co= mpletions" minibuffer-completion-help :help "Display all possible completio= ns") "Minibuf")) (27 keymap (118 . switch-to-completions)) (prior . switch-= to-completions) (63 . minibuffer-completion-help) (32 . minibuffer-complete= -word) (9 . minibuffer-complete) keymap (menu-bar keymap (minibuf "Minibuf"= keymap (previous menu-item "Previous History Item" previous-history-elemen= t :help "Put previous minibuffer history element in the min...") (next menu= -item "Next History Item" next-history-element :help "Put next minibuffer h= istory element in the minibuf...") (isearch-backward menu-item "Isearch His= tory Backward" isearch-backward :help "Incrementally search minibuffer hist= ory backward") (isearch-forward menu-item "Isearch History Forward" isearch= -forward :help "Incrementally search minibuffer history forward") (return m= enu-item "Enter" exit-minibuffer :key-sequence "\15" :help "Terminate input= and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "A= bort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . e= xit-minibuffer) (7 . minibuffer-keyboard-quit) (C-tab . file-cache-minibuff= er-complete) (9 . self-insert-command) (XF86Back . previous-history-element= ) (up . previous-line-or-history-element) (prior . previous-history-element= ) (XF86Forward . next-history-element) (down . next-line-or-history-element= ) (next . next-history-element) (27 keymap (60 . minibuffer-beginning-of-bu= ffer) (114 . previous-matching-history-element) (115 . next-matching-histor= y-element) (112 . previous-history-element) (110 . next-history-element))) = nil xref--read-identifier-history nil nil) completing-read-default("Find definitions of: " #f(compiled-function (str= ing pred action) #) nil nil nil xref--read-ide= ntifier-history nil nil) completing-read("Find definitions of: " #f(compiled-function (string pred= action) #) nil nil nil xref--read-identifier-= history nil) xref--read-identifier("Find definitions of: ") byte-code("\300\301!C\207" [xref--read-identifier "Find definitions of: "= ] 2) call-interactively(xref-find-definitions nil nil) command-execute(xref-find-definitions) --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=etags Content-Transfer-Encoding: quoted-printable Debugger entered--entering a function: * read-passwd("Passphrase for symmetric encryption for /home/peni..." nil) epa-passphrase-callback-function(#s(epg-context :protocol OpenPGP :progra= m "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :include-cer= ts nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil = :passphrase-callback (epa-file-passphrase-callback-function . "/home/penibl= ec/.authinfo.gpg") :progress-callback (epa-progress-callback-function . "De= crypting /home/peniblec/.authinfo.gpg") :edit-callback nil :signers nil :se= nder nil :sig-notations nil :process # :output-file "/tmp/epg-= outputxgqCot" :result nil :operation decrypt :pinentry-mode loopback :error= -output "" :error-buffer #) SYM "/home/peniblec/.authi= nfo.gpg") epa-file-passphrase-callback-function(#s(epg-context :protocol OpenPGP :p= rogram "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :includ= e-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm= nil :passphrase-callback (epa-file-passphrase-callback-function . "/home/p= eniblec/.authinfo.gpg") :progress-callback (epa-progress-callback-function = . "Decrypting /home/peniblec/.authinfo.gpg") :edit-callback nil :signers ni= l :sender nil :sig-notations nil :process # :output-file "/tmp= /epg-outputxgqCot" :result nil :operation decrypt :pinentry-mode loopback := error-output "" :error-buffer #) SYM "/home/peniblec/.= authinfo.gpg") epg--status-GET_HIDDEN(#s(epg-context :protocol OpenPGP :program "/usr/bi= n/gpg2" :home-directory nil :armor nil :textmode nil :include-certs nil :ci= pher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphras= e-callback (epa-file-passphrase-callback-function . "/home/peniblec/.authin= fo.gpg") :progress-callback (epa-progress-callback-function . "Decrypting /= home/peniblec/.authinfo.gpg") :edit-callback nil :signers nil :sender nil := sig-notations nil :process # :output-file "/tmp/epg-outputxgqC= ot" :result nil :operation decrypt :pinentry-mode loopback :error-output ""= :error-buffer #) "passphrase.enter") epg--process-filter(# "[GNUPG:] INQUIRE_MAXLEN 100\n[GNUPG:]= GET_HIDDEN pa...") accept-process-output(# 1) epg-wait-for-status(#s(epg-context :protocol OpenPGP :program "/usr/bin/g= pg2" :home-directory nil :armor nil :textmode nil :include-certs nil :ciphe= r-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-c= allback (epa-file-passphrase-callback-function . "/home/peniblec/.authinfo.= gpg") :progress-callback (epa-progress-callback-function . "Decrypting /hom= e/peniblec/.authinfo.gpg") :edit-callback nil :signers nil :sender nil :sig= -notations nil :process # :output-file "/tmp/epg-outputxgqCot"= :result nil :operation decrypt :pinentry-mode loopback :error-output "" :e= rror-buffer #) ("BEGIN_DECRYPTION")) epg-start-decrypt(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg= 2" :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-= algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-cal= lback (epa-file-passphrase-callback-function . "/home/peniblec/.authinfo.gp= g") :progress-callback (epa-progress-callback-function . "Decrypting /home/= peniblec/.authinfo.gpg") :edit-callback nil :signers nil :sender nil :sig-n= otations nil :process # :output-file "/tmp/epg-outputxgqCot" := result nil :operation decrypt :pinentry-mode loopback :error-output "" :err= or-buffer #) #s(epg-data :file "/home/peniblec/.authin= fo.gpg" :string nil)) epg-decrypt-file(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg2= " :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-a= lgorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-call= back (epa-file-passphrase-callback-function . "/home/peniblec/.authinfo.gpg= ") :progress-callback (epa-progress-callback-function . "Decrypting /home/p= eniblec/.authinfo.gpg") :edit-callback nil :signers nil :sender nil :sig-no= tations nil :process # :output-file "/tmp/epg-outputxgqCot" :r= esult nil :operation decrypt :pinentry-mode loopback :error-output "" :erro= r-buffer #) "/home/peniblec/.authinfo.gpg" nil) epa-file-insert-file-contents("/home/peniblec/.authinfo.gpg" nil nil nil = nil) apply(epa-file-insert-file-contents ("/home/peniblec/.authinfo.gpg" nil n= il nil nil)) epa-file-handler(insert-file-contents "/home/peniblec/.authinfo.gpg" nil = nil nil nil) insert-file-contents("~/.authinfo.gpg") auth-source-netrc-parse(:max 2305843009213693951 :require (:port) :file "= ~/.authinfo.gpg" :host t :user t :port "ssh") auth-source-netrc-search(:backend # :type netrc :max 2305843009213693951 :require (:port) :create n= il :delete nil :port "ssh" :require (:port) :max 2305843009213693951) apply(auth-source-netrc-search :backend # :type netrc :max 2305843009213693951 :require (:port) :cr= eate nil :delete nil (:port "ssh" :require (:port) :max 2305843009213693951= )) auth-source-search-backends((# # #) (:port "ssh" :require (:port) :max 23058= 43009213693951) 2305843009213693951 nil nil (:port)) auth-source-search(:port "ssh" :require (:port) :max 2305843009213693951) tramp-parse-auth-sources("ssh") #f(compiled-function (x) #)((tramp-parse-aut= h-sources "ssh")) mapc(#f(compiled-function (x) #) ((tramp-par= se-default-user-host "ssh") (tramp-parse-auth-sources "ssh") (tramp-parse-c= onnection-properties "ssh") (tramp-parse-rhosts "/etc/hosts.equiv") (tramp-= parse-shosts "~/.ssh/known_hosts") (tramp-parse-sconfig "~/.ssh/config"))) tramp-completion-handle-file-name-all-completions("ssh:" "/") apply(tramp-completion-handle-file-name-all-completions ("ssh:" "/")) tramp-completion-file-name-handler(file-name-all-completions "ssh:" "/") file-name-all-completions("ssh:" "/") completion-file-name-table("/ssh:" #f(compiled-function (cand) #) t) all-completions("/ssh:" completion-file-name-table #f(compiled-function (= cand) #)) completion-pcm--all-completions("/" ("ssh:" point) completion-file-name-t= able #f(compiled-function (cand) #)) completion-basic-all-completions("/ssh:" completion-file-name-table #f(co= mpiled-function (cand) #) 5) #f(compiled-function (style) #)(basic) completion--some(#f(compiled-function (style) #) (basic partial-completion emacs22)) completion--nth-completion(2 "/usr/local/share/emacs/28.0.50/lisp//ssh:" = read-file-name-internal #f(compiled-function (cand) #) 41 (metadata (category . file) (completion--unquote-requote . t))) completion-all-completions("/usr/local/share/emacs/28.0.50/lisp//ssh:" re= ad-file-name-internal #f(compiled-function (cand) #) 41 (metadata (category . file) (completion--unquote-requote . t))) completion-all-sorted-completions(12 53) icomplete--sorted-completions() icomplete-completions("/usr/local/share/emacs/28.0.50/lisp//ssh:" read-fi= le-name-internal file-exists-p nil) icomplete-exhibit() (let ((non-essential t)) (icomplete-exhibit)) icomplete-post-command-hook() read-from-minibuffer("Find file: " "/usr/local/share/emacs/28.0.50/lisp/"= (keymap (keymap (32)) keymap (10 . minibuffer-complete-and-exit) (13 . min= ibuffer-complete-and-exit) keymap (menu-bar keymap (minibuf "Minibuf" keyma= p (tab menu-item "Complete" minibuffer-complete :help "Complete as far as p= ossible") (space menu-item "Complete Word" minibuffer-complete-word :help "= Complete at most one word") (63 menu-item "List Completions" minibuffer-com= pletion-help :help "Display all possible completions") "Minibuf")) (27 keym= ap (118 . switch-to-completions)) (prior . switch-to-completions) (63 . min= ibuffer-completion-help) (32 . minibuffer-complete-word) (9 . minibuffer-co= mplete) keymap (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-it= em "Previous History Item" previous-history-element :help "Put previous min= ibuffer history element in the min...") (next menu-item "Next History Item"= next-history-element :help "Put next minibuffer history element in the min= ibuf...") (isearch-backward menu-item "Isearch History Backward" isearch-ba= ckward :help "Incrementally search minibuffer history backward") (isearch-f= orward menu-item "Isearch History Forward" isearch-forward :help "Increment= ally search minibuffer history forward") (return menu-item "Enter" exit-min= ibuffer :key-sequence "\15" :help "Terminate input and exit minibuffer") (q= uit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minib= uffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . mini= buffer-keyboard-quit) (C-tab . file-cache-minibuffer-complete) (9 . self-in= sert-command) (XF86Back . previous-history-element) (up . previous-line-or-= history-element) (prior . previous-history-element) (XF86Forward . next-his= tory-element) (down . next-line-or-history-element) (next . next-history-el= ement) (27 keymap (60 . minibuffer-beginning-of-buffer) (114 . previous-mat= ching-history-element) (115 . next-matching-history-element) (112 . previou= s-history-element) (110 . next-history-element))) nil file-name-history "/u= sr/local/share/emacs/28.0.50/lisp/" nil) completing-read-default("Find file: " read-file-name-internal file-exists= -p confirm-after-completion "/usr/local/share/emacs/28.0.50/lisp/" file-nam= e-history "/usr/local/share/emacs/28.0.50/lisp/" nil) completing-read("Find file: " read-file-name-internal file-exists-p confi= rm-after-completion "/usr/local/share/emacs/28.0.50/lisp/" file-name-histor= y "/usr/local/share/emacs/28.0.50/lisp/") read-file-name-default("Find file: " nil "/usr/local/share/emacs/28.0.50/= lisp/" confirm-after-completion nil nil) read-file-name("Find file: " nil "/usr/local/share/emacs/28.0.50/lisp/" c= onfirm-after-completion) find-file-read-args("Find file: " confirm-after-completion) byte-code("\300\301\302 \"\207" [find-file-read-args "Find file: " confir= m-nonexistent-file-or-buffer] 3) call-interactively(find-file nil nil) command-execute(find-file) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I am mildly intrigued by this comment in icomplete-post-command-hook: (defun icomplete-post-command-hook () (let ((non-essential t)) ;E.g. don't prompt for password! (icomplete-exhibit))) As can be seen in the backtraces, prompts are definitely happening while calling icomplete-exhibit; I have no idea whether this is suspicious, or if that comment is a red herring=E2=80=A6 My hunch is that icomplete sets up *something* that is not cleared and keeps being triggered when the second prompt shows up; I haven't been able to pinpoint what yet. If any completion wizard out here has advice on how to debug this further, I'm all ears! --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 04 13:39:52 2021 Received: (at 40152) by debbugs.gnu.org; 4 Feb 2021 18:39:52 +0000 Received: from localhost ([127.0.0.1]:42220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7jXj-0007RV-Gv for submit@debbugs.gnu.org; Thu, 04 Feb 2021 13:39:52 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:38432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7jXh-0007RI-8N for 40152@debbugs.gnu.org; Thu, 04 Feb 2021 13:39:50 -0500 Received: by mail-wr1-f49.google.com with SMTP id b3so4755869wrj.5 for <40152@debbugs.gnu.org>; Thu, 04 Feb 2021 10:39:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=psLzsbbfyk5vnAMnS3ncmRUhpv4kfweIMt9zwSRhnDw=; b=BWf8xjMAOAxTWNJz7KyAtOLTrAiELnKkrP41VUWeen0MbTyCcaYGuyj/ksqEpAM84n L9+Nar1f0L6t9uB4HOCG1ljrEwFOwD12TCsAqX2bt9GDVzT1n2mcTihPJbCe1u2RU+kl 15s8DddPiuBZ+3D/pPq1RwoC3NzHX0ZP2tFr7vnAUIgdmw4UaU4O+XhZye7Q3ORaMnpD gfhyuMQMvr7iSWlr00yV6wziIxgqMZnChjLAiKvD81kbAntsWTWFGZ1LoOe6j8QglL6O OM7Uc8MLvVJV5CXZIAoSC+EbC/XBiH2/l34LQo9hj0mbF5RU6SXUT15ITbwj1BUoknLu dVLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=psLzsbbfyk5vnAMnS3ncmRUhpv4kfweIMt9zwSRhnDw=; b=QHSe/Vb74TRWFpfLlZvnYdy6GZ13H7A2gaTQVAAxesNV3v+fk8MBxrKvOFZhDDQzs/ 1YP3q8/yixcfPbqkCWz/Y2NJG4eidryA7XzS2GIW/WItWvnjwnY9kQ3TbGk6JE6uGean Cvh229jEg32Pi90T663/dxs8MRVPEK5d+u14kc/gjOwuL2wROuVB8ScAn3vmDBQNGpfC YmA28EYIfrhE2rJmcZCsfAhLfX0kkXS+Q6Jule/LeV7znOxCg5/OoiPj7uUyf5K+3Fdn a6cuCPcLdV9HjCTJmYspwvTjK8yNbYy1YE1fB2ZVAtoxy5xlmD+P9OhlU7JMLfUU0KB7 Kwgg== X-Gm-Message-State: AOAM532hOiyNwlxOJmm30OrglGDBMCkhwYHQ9upSgTJLiHbRACeW4UqK U9s+cF2bTU2RcGyGssUiv0Q= X-Google-Smtp-Source: ABdhPJxo4Xw63JDnSYWfd/LXuM2AIxamE7A4jU3s5J4gQ2IaNgtDsZj18v4niZMO9/7wtqfln5ArCw== X-Received: by 2002:adf:dd81:: with SMTP id x1mr744594wrl.249.1612463983277; Thu, 04 Feb 2021 10:39:43 -0800 (PST) Received: from my-little-tumbleweed ([2a01:e0a:20e:d340:922b:34ff:fe95:9aed]) by smtp.gmail.com with ESMTPSA id a17sm9740508wrx.63.2021.02.04.10.39.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 10:39:42 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: 40152@debbugs.gnu.org Subject: Re: 27.0.90; icomplete vs recursive prompts References: <87wo7ex4z6.fsf@gmail.com> <87sgbulznk.fsf@gmail.com> <875z3m74s0.fsf@gmail.com> Date: Thu, 04 Feb 2021 19:39:41 +0100 In-Reply-To: <875z3m74s0.fsf@gmail.com> (=?utf-8?Q?=22K=C3=A9vin?= Le Gouguec"'s message of "Sun, 24 Jan 2021 16:06:55 +0100") Message-ID: <87pn1f1xua.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40152 Cc: Stefan Monnier , =?utf-8?B?Sm/Do28gVMOhdm9y?= =?utf-8?B?YQ==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) OK, I think I have a simpler reproducer. >From emacs -Q: #+begin_src elisp (icomplete-mode) (setq enable-recursive-minibuffers t) (completing-read "Prompt #1? " (lambda (&rest _args) (read-string "Prompt #2? ") (list "foo" "bar" "baz"))) #+end_src Current result: 1. prompt #1 appears, 2. I type in a letter, say "x", 3. prompt #2 immediately appears, hijacking prompt #1, 4. I type in another letter, say "y", 5. prompt #1 returns, hijacking prompt #2; the "x" I typed is there, 6. I type in another letter, say "z", 7. prompt #2 returns, hijacking prompt #1; the "y" I typed is not there. Expected result: 1. prompt #1 appears, 2. I type in a letter, say "x", 3. prompt #2 immediately appears, hijacking prompt #1, 4. I type in another letter, say "y", 5. *PROMPT #2 REMAINS* until I hit RET/C-j/C-g=E2=80=A6 6. prompt #1 returns; the "x" I typed is there. (If icomplete-show-matches-on-no-input is set, I guess I'd expect Emacs to go straight to step 3, with prompt #1 empty on step 6.) To summarize my previous messages: - In addition to this synthetic recipe, I have two fairly annoying reproducers: 1. xref-find-definitions bounces back between the identifier prompt and the TAGS table prompt (when there are no tags at point and xref falls back to the etags backend). 2. TRAMP bounces back between the filename prompt and the .authinfo.gpg passphrase prompt. - Even after hours of debugging, I still feel out of my depth with the completion code; I'd really appreciate some help. I don't mind debugging some more, but at this point I'd need a clue where to look. (Since I feel like my synthetic reproducer is small enough, I'm boldly CC'ing folks I imagine to be the most familiar with the completion framework and/or icomplete; I apologize for the forwardness.) From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 18:06:11 2021 Received: (at 40152) by debbugs.gnu.org; 19 Aug 2021 22:06:11 +0000 Received: from localhost ([127.0.0.1]:60884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGqAt-0007cj-78 for submit@debbugs.gnu.org; Thu, 19 Aug 2021 18:06:11 -0400 Received: from mail-pg1-f169.google.com ([209.85.215.169]:43720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGqAr-0007cX-G2 for 40152@debbugs.gnu.org; Thu, 19 Aug 2021 18:06:09 -0400 Received: by mail-pg1-f169.google.com with SMTP id r2so7214427pgl.10 for <40152@debbugs.gnu.org>; Thu, 19 Aug 2021 15:06:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=d35tBMikaSlY/R8H13D1DavC5ghNfzXnwkafFh+BPqA=; b=cKvv5V8r2bkoViQmwm/E9pnjKdJaAbCiWySMT6cA2rX0LieshcxvJA1aVZ+hUET2nL f3J24ADjFHOM+UaKPQdSwtGE0lX/LLLyUXDnbqExgg/V6VBYjK+C7nN9PG1GL10nyqj5 YqWb5UViziDW2aYFzDg70NsAFQq9ZJeYmBvyxevbVaVMjre47/sUEQlwQxFqVPDgSF0x b04BB9WSrSHz+6pA4MdFZaEpQ5C8IbrGAJZP/Sls4xaUdnQPfnw13D57OWCmst/lJ3vE r/BbUUwH3tmRWvmileETNl0f8UsphuvFHjV/2FUGZUwUVKvUFhdGN7pXA+ahM1a881xO kKlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=d35tBMikaSlY/R8H13D1DavC5ghNfzXnwkafFh+BPqA=; b=rH1AgEwiV0E2h6HOvX/nea7uGrHjxEUpuxDpSezK60EUMNumYmciahhd/q0/5hVtLV p/kzwB20irVoNHkNCjvh6cnEDQCwlzASS7U0ZHUQKZz95ThbhJvag96zWd/zF1jgEUqd Jo/t6ATW4MF4EJpzXGLXDvq10iN+eMP9HAxT3J7f9zSNUIJlxRYDspOSpk2CFgsicCQm FMvg7ehXFps2mYQ8fAVj0ExRPNm8XBx+6q8zsbKXuBkVj2raQlmKW3YDstLfiTmlNIYI 4FrGgzKuMp11koCMQk/G3mBylJ6tc2zUTXknuCQPmzag8dH/erSQNmHQlaAYhZp2Gkuk rLxA== X-Gm-Message-State: AOAM532oST52OPS/NIW5uwhGw8MjAgm8frHHwXX2hvw19u1+fFCklz/2 5/4V2TWtWTXW/x8K62a6HHF0YVuEW46zIsG5g9k= X-Google-Smtp-Source: ABdhPJz+8D2ds9a2uO1OYsJJzxqmBG7lQxYl3iVtWB8JUvyEw3jbzx3aFMzI0RR//oQeumUCM6lvNvrjwzXUqCCYJFc= X-Received: by 2002:a63:c0a:: with SMTP id b10mr15735583pgl.447.1629410763587; Thu, 19 Aug 2021 15:06:03 -0700 (PDT) MIME-Version: 1.0 References: <87wo7ex4z6.fsf@gmail.com> <87sgbulznk.fsf@gmail.com> <875z3m74s0.fsf@gmail.com> <87pn1f1xua.fsf@gmail.com> In-Reply-To: <87pn1f1xua.fsf@gmail.com> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Thu, 19 Aug 2021 23:05:51 +0100 Message-ID: Subject: Re: bug#40152: 27.0.90; icomplete vs recursive prompts To: =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= Content-Type: multipart/alternative; boundary="000000000000c1c3d205c9f0c1d3" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 40152 Cc: 40152@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000c1c3d205c9f0c1d3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sorry K=C3=A9vin, for having mostly ignored this back in February somehow. = I'm back on the icomplete subject for a while, maybe I'll can look at this. I think I understand the problem from you clear recipes. Jo=C3=A3o On Thu, Feb 4, 2021, 19:20 K=C3=A9vin Le Gouguec wrote: > OK, I think I have a simpler reproducer. > > From emacs -Q: > > #+begin_src elisp > (icomplete-mode) > (setq enable-recursive-minibuffers t) > (completing-read > "Prompt #1? " > (lambda (&rest _args) > (read-string "Prompt #2? ") > (list "foo" "bar" "baz"))) > #+end_src > > Current result: > 1. prompt #1 appears, > 2. I type in a letter, say "x", > 3. prompt #2 immediately appears, hijacking prompt #1, > 4. I type in another letter, say "y", > 5. prompt #1 returns, hijacking prompt #2; the "x" I typed is there, > 6. I type in another letter, say "z", > 7. prompt #2 returns, hijacking prompt #1; the "y" I typed is not there. > > Expected result: > 1. prompt #1 appears, > 2. I type in a letter, say "x", > 3. prompt #2 immediately appears, hijacking prompt #1, > 4. I type in another letter, say "y", > 5. *PROMPT #2 REMAINS* until I hit RET/C-j/C-g=E2=80=A6 > 6. prompt #1 returns; the "x" I typed is there. > > (If icomplete-show-matches-on-no-input is set, I guess I'd expect Emacs > to go straight to step 3, with prompt #1 empty on step 6.) > > To summarize my previous messages: > > - In addition to this synthetic recipe, I have two fairly annoying > reproducers: > > 1. xref-find-definitions bounces back between the identifier prompt > and the TAGS table prompt (when there are no tags at point and > xref falls back to the etags backend). > > 2. TRAMP bounces back between the filename prompt and the > .authinfo.gpg passphrase prompt. > > - Even after hours of debugging, I still feel out of my depth with the > completion code; I'd really appreciate some help. I don't mind > debugging some more, but at this point I'd need a clue where to look. > > (Since I feel like my synthetic reproducer is small enough, I'm boldly > CC'ing folks I imagine to be the most familiar with the completion > framework and/or icomplete; I apologize for the forwardness.) > > > > --000000000000c1c3d205c9f0c1d3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sorry K=C3=A9vin, for having mostly ignored this bac= k in February somehow. I'm back on the icomplete subject for a while, m= aybe I'll can look at this. I think I understand the problem from you c= lear recipes.

Jo=C3=A3o<= br>
On Thu, Feb 4, 2021, 19:20 K=C3=A9vin Le Gouguec <kevin.legouguec@gmail.com> wrote:
OK, I think I have a simpler reprodu= cer.

>From emacs -Q:

#+begin_src elisp
(icomplete-mode)
(setq enable-recursive-minibuffers t)
(completing-read
=C2=A0"Prompt #1? "
=C2=A0(lambda (&rest _args)
=C2=A0 =C2=A0(read-string "Prompt #2? ")
=C2=A0 =C2=A0(list "foo" "bar" "baz")))
#+end_src

Current result:
1. prompt #1 appears,
2. I type in a letter, say "x",
3. prompt #2 immediately appears, hijacking prompt #1,
4. I type in another letter, say "y",
5. prompt #1 returns, hijacking prompt #2; the "x" I typed is the= re,
6. I type in another letter, say "z",
7. prompt #2 returns, hijacking prompt #1; the "y" I typed is not= there.

Expected result:
1. prompt #1 appears,
2. I type in a letter, say "x",
3. prompt #2 immediately appears, hijacking prompt #1,
4. I type in another letter, say "y",
5. *PROMPT #2 REMAINS* until I hit RET/C-j/C-g=E2=80=A6
6. prompt #1 returns; the "x" I typed is there.

(If icomplete-show-matches-on-no-input is set, I guess I'd expect Emacs=
to go straight to step 3, with prompt #1 empty on step 6.)

To summarize my previous messages:

- In addition to this synthetic recipe, I have two fairly annoying
=C2=A0 reproducers:

=C2=A0 =C2=A0 1. xref-find-definitions bounces back between the identifier = prompt
=C2=A0 =C2=A0 =C2=A0 =C2=A0and the TAGS table prompt (when there are no tag= s at point and
=C2=A0 =C2=A0 =C2=A0 =C2=A0xref falls back to the etags backend).

=C2=A0 =C2=A0 2. TRAMP bounces back between the filename prompt and the
=C2=A0 =C2=A0 =C2=A0 =C2=A0.authinfo.gpg passphrase prompt.

- Even after hours of debugging, I still feel out of my depth with the
=C2=A0 completion code; I'd really appreciate some help.=C2=A0 I don= 9;t mind
=C2=A0 debugging some more, but at this point I'd need a clue where to = look.

(Since I feel like my synthetic reproducer is small enough, I'm boldly<= br> CC'ing folks I imagine to be the most familiar with the completion
framework and/or icomplete; I apologize for the forwardness.)



--000000000000c1c3d205c9f0c1d3--