From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Newsgroups: gmane.emacs.bugs Subject: bug#40152: 27.0.90; icomplete vs recursive prompts Date: Thu, 04 Feb 2021 19:39:41 +0100 Message-ID: <87pn1f1xua.fsf@gmail.com> References: <87wo7ex4z6.fsf@gmail.com> <87sgbulznk.fsf@gmail.com> <875z3m74s0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16627"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Monnier , =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: 40152@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 04 20:20:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l7kAr-0004E3-Jl for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Feb 2021 20:20:17 +0100 Original-Received: from localhost ([::1]:56942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7kAq-0005Kc-Jt for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Feb 2021 14:20:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7jXu-0005sM-KJ for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2021 13:40:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58907) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7jXu-00069a-Bb for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2021 13:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l7jXu-0007Ry-7q for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2021 13:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Feb 2021 18:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40152 X-GNU-PR-Package: emacs Original-Received: via spool by 40152-submit@debbugs.gnu.org id=B40152.161246399228618 (code B ref 40152); Thu, 04 Feb 2021 18:40:02 +0000 Original-Received: (at 40152) by debbugs.gnu.org; 4 Feb 2021 18:39:52 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: <875z3m74s0.fsf@gmail.com> ("=?UTF-8?Q?K=C3=A9vin?= Le Gouguec"'s message of "Sun, 24 Jan 2021 16:06:55 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199324 Archived-At: 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.)