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: Fri, 23 Apr 2021 19:36:16 +0300 Organization: LINKOV.NET Message-ID: <87bla5gdtj.fsf@mail.linkov.net> References: <87r1jatd34.fsf@mail.linkov.net> <7dee3f423551aaf318cb@heytings.org> <87im4kzlfm.fsf@mail.linkov.net> <1869622e16546eafd9df@heytings.org> <871rb6np5j.fsf@mail.linkov.net> <87lf9cepqw.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29334"; 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 Fri Apr 23 18:39:24 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 1lZypw-0007MV-8U for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Apr 2021 18:39:24 +0200 Original-Received: from localhost ([::1]:59332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZypv-0004PH-Ax for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Apr 2021 12:39:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZypb-0004Ng-9T for bug-gnu-emacs@gnu.org; Fri, 23 Apr 2021 12:39:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55371) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZypa-000628-OO for bug-gnu-emacs@gnu.org; Fri, 23 Apr 2021 12:39:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lZypa-0001sL-MM for bug-gnu-emacs@gnu.org; Fri, 23 Apr 2021 12:39: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: Fri, 23 Apr 2021 16:39: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.16191959267168 (code B ref 45474); Fri, 23 Apr 2021 16:39:02 +0000 Original-Received: (at 45474) by debbugs.gnu.org; 23 Apr 2021 16:38:46 +0000 Original-Received: from localhost ([127.0.0.1]:38682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZypK-0001rY-5i for submit@debbugs.gnu.org; Fri, 23 Apr 2021 12:38:46 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:10791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZypI-0001r7-1J for 45474@debbugs.gnu.org; Fri, 23 Apr 2021 12:38:44 -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 F0C58240004; Fri, 23 Apr 2021 16:38:35 +0000 (UTC) In-Reply-To: (Gregory Heytings's message of "Fri, 23 Apr 2021 15:58:51 +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:204748 Archived-At: >>> If not, it means that your patch will fix the problem for >>> completing-read-default, but not for other completion backends, who will >>> have to resort on a similar trick to get the same effect. >> >> I think they'd need to make similar changes to fix the problem under >> discussion in this longish thread, but they can keep using their old way >> of working and the consequence will just be that they will keep suffering >> from the old problem. > > With my patch all they have to do is to add (minibuffer-local-completion t) > before calling read-from-minibuffer. Since other completion backends need to add (minibuffer-local-completion t) anyway, the safest and most backward-compatible solution is to set this new variable buffer-local in completing-read-default with (minibuffer-with-setup-hook (lambda () (setq-local minibuffer-local-completion t)) (read-from-minibuffer prompt initial-input keymap nil hist def inherit-input-method)))) Then modes like icomplete interested in knowing whether the minibuffer was created for completions, can check for the buffer-local value of minibuffer-local-completion.