From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier 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 17:54:30 -0400 Message-ID: References: <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="22510"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Dario Gjorgjevski , 45474@debbugs.gnu.org, Juri Linkov To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 23 23:55:22 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 1la3lh-0005l5-LB for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Apr 2021 23:55:21 +0200 Original-Received: from localhost ([::1]:56576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1la3lg-00034w-OV for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Apr 2021 17:55:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la3lS-000344-4V for bug-gnu-emacs@gnu.org; Fri, 23 Apr 2021 17:55:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1la3lN-0002g2-VU for bug-gnu-emacs@gnu.org; Fri, 23 Apr 2021 17:55:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1la3lN-0001ED-U1 for bug-gnu-emacs@gnu.org; Fri, 23 Apr 2021 17:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Apr 2021 21:55:01 +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.16192148834687 (code B ref 45474); Fri, 23 Apr 2021 21:55:01 +0000 Original-Received: (at 45474) by debbugs.gnu.org; 23 Apr 2021 21:54:43 +0000 Original-Received: from localhost ([127.0.0.1]:39094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1la3l4-0001DX-QP for submit@debbugs.gnu.org; Fri, 23 Apr 2021 17:54:43 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:9679) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1la3l2-0001DK-PV for 45474@debbugs.gnu.org; Fri, 23 Apr 2021 17:54:41 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id DD7AC1001FE; Fri, 23 Apr 2021 17:54:34 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2D57510006B; Fri, 23 Apr 2021 17:54:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1619214873; bh=V6XesJc2WasywuCzMPODNBVUctu40eUyyRiR5z5ZY4g=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=EcLYcitFtjpI2PECJ4U/Vi9nfYRKxQQLXPwUG1ek3JMD2u4dJRFcfeg8PRfzciPSx kqqMEsFpL2YjnVFFiaH+3jizpYhlt71Vf1cB1x+Nl8esaV5LbyhPo6pTsPkV7CsVOM 5ZJvBL4xzaZgxmJpxH75/ZpMNLqrHSmOJ62U1/u4PieLiQL1d09SPWkpXIK+cSn0Mh +Yd1oSie7j38/zk8kyw7vc6o7uG+9Cl52LML6a7I3r0zg6MeekTpCCqWeZpqDK27cf L6EAJpklgTQnLzvSO8zSdgUPIaKhKbRHu3fcJ3RQ8XvoEL6aCWfDUD7xQKSe/NpD5F TfponaVwcZ92w== Original-Received: from alfajor (104-222-126-84.cpe.teksavvy.com [104.222.126.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D3E5D1201C9; Fri, 23 Apr 2021 17:54:32 -0400 (EDT) In-Reply-To: (Gregory Heytings's message of "Fri, 23 Apr 2021 21:36:31 +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:204764 Archived-At: >>> Indeed, but... it doesn't help/incite them to move forward in the "right" >>> direction, to finally have what has been on wishlist for quite a long >>> time: to have buffer-local minibuffer-completion-* elements... >> It helps by showing how to do it. I haven't seen any proposal here which >> helps further than that (except maybe for some proposals which might break >> such code, thus inciting them to use a better approach ;-). > I believe that creating an optional behavior that is easy to use, and > stating that that behavior will become mandatory in the next major Emacs > release, is a stronger incentive. We could add some "break old code" option, indeed. I think we can do that with pretty much all the proposed patches. We could also add a "warn when detecting old code" option; again I suspect that this can be done with most of the proposed patches so far. So, it's rather orthogonal to the choice of which approach is preferable. >>> But when the let-bindings are in a macro the caller doesn't have to care >>> with them, and they are indeed happening as close as possible to >>> internal-read-from-minibuffer. >> AFAICT you're talking about the let-bindings of `minibuffer-local-*` >> whereas the problematic let-bindings are those of >> `minibuffer-completion-*` and those are outside of `read-from-minibuffer`. > Aren't these problems orthogonal to the problem at hand? It seems to me > that this is not different from the traditional way of passing arguments to > a function; of course something unexpected can happen when they are > evaluated, before the function is entered, but that's something outside the > responsibility of the function. No, the problem is not "can someone change `minibuffer-completion-table` before we get to its intended consumer" but "will the let-binding of `minibuffer-completion-table` also affect code which was not the intended consumer". This problem does not exist with traditional/explicit argument passing. > My aim here was to (help to) fix the nine years old "FIXME: > `minibuffer-completion-table' should be buffer-local instead." What would > you do to fix it, in an ideal world in which backward compatibility is not > an issue? The patch I sent does just that. Stefan