From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#45474: Icomplete exhibiting in recursive minibuffer when it =?UTF-8?Q?shouldn=E2=80=99t?= Date: Sat, 17 Apr 2021 23:49:01 +0300 Organization: LINKOV.NET Message-ID: <87im4kzlfm.fsf@mail.linkov.net> References: <3ed97a9c53e0a5d4fef8@heytings.org> <87fszrz21d.fsf@mail.linkov.net> <3ed97a9c530093aca93d@heytings.org> <7dee3f4235d331cab291@heytings.org> <87r1jatd34.fsf@mail.linkov.net> <7dee3f423551aaf318cb@heytings.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13850"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Dario Gjorgjevski , Stefan Monnier , 45474@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 17 22:54:13 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 1lXrxE-0003Vm-TJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Apr 2021 22:54:12 +0200 Original-Received: from localhost ([::1]:43590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXrxD-0004NX-NI for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Apr 2021 16:54:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXrx4-0004N7-FU for bug-gnu-emacs@gnu.org; Sat, 17 Apr 2021 16:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33223) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXrx4-0008Tg-8H for bug-gnu-emacs@gnu.org; Sat, 17 Apr 2021 16:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lXrx4-0004yk-5A for bug-gnu-emacs@gnu.org; Sat, 17 Apr 2021 16:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Apr 2021 20:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45474 X-GNU-PR-Package: emacs Original-Received: via spool by 45474-submit@debbugs.gnu.org id=B45474.161869279519084 (code B ref 45474); Sat, 17 Apr 2021 20:54:02 +0000 Original-Received: (at 45474) by debbugs.gnu.org; 17 Apr 2021 20:53:15 +0000 Original-Received: from localhost ([127.0.0.1]:44769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXrwJ-0004xj-CD for submit@debbugs.gnu.org; Sat, 17 Apr 2021 16:53:15 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:5427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXrwH-0004xT-5q for 45474@debbugs.gnu.org; Sat, 17 Apr 2021 16:53:14 -0400 X-Originating-IP: 91.129.102.166 Original-Received: from mail.gandi.net (m91-129-102-166.cust.tele2.ee [91.129.102.166]) (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id F18D4240006; Sat, 17 Apr 2021 20:53:04 +0000 (UTC) In-Reply-To: <7dee3f423551aaf318cb@heytings.org> (Gregory Heytings's message of "Fri, 16 Apr 2021 16:55:56 +0000") 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:204266 Archived-At: >> Or maybe simply disable previous icomplete when recursive minibuffer >> doesn't use completions. > > And how would you detect whether a recursive minibuffer expects completions > or not? Oh, I see it's a more fundamental problem: 1. completing-read-default let-binds minibuffer-completion-table to a collection before calling read-from-minibuffer; 2. any nested call to read-from-minibuffer reuses the same value of minibuffer-completion-table, even if it doesn't use completion; 3. icomplete checks for minibuffer-completion-table to decide whether to activate icomplete completions in the minibuffer. This is how non-completion minibuffers get non-nil minibuffer-completion-table. 'read-string' solves this problem by let-binding minibuffer-completion-table to nil before calling read-from-minibuffer. 'read-number' could do the same. But what about all other calls of 'read-from-minibuffer'? They all can't be replaced with a new function that will let-bind minibuffer-completion-table to nil. I have no idea how to fix this. Maybe Stefan could help (Cc:ed).