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 09:21:05 -0400 Message-ID: References: <3ed97a9c53e0a5d4fef8@heytings.org> <87fszrz21d.fsf@mail.linkov.net> <3ed97a9c530093aca93d@heytings.org> <7dee3f4235d331cab291@heytings.org> <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="36413"; 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 15:22:19 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 1lZvlD-0009CX-K4 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Apr 2021 15:22:19 +0200 Original-Received: from localhost ([::1]:56486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZvlC-0004xg-Ki for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Apr 2021 09:22:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZvkv-0004wZ-Vn for bug-gnu-emacs@gnu.org; Fri, 23 Apr 2021 09:22:01 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53133) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZvkv-0004Ao-N5 for bug-gnu-emacs@gnu.org; Fri, 23 Apr 2021 09:22:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lZvkv-0004qy-Jr for bug-gnu-emacs@gnu.org; Fri, 23 Apr 2021 09:22: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 13:22: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.161918407418592 (code B ref 45474); Fri, 23 Apr 2021 13:22:01 +0000 Original-Received: (at 45474) by debbugs.gnu.org; 23 Apr 2021 13:21:14 +0000 Original-Received: from localhost ([127.0.0.1]:36442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZvkA-0004po-5p for submit@debbugs.gnu.org; Fri, 23 Apr 2021 09:21:14 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:34799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZvk9-0004pb-6t for 45474@debbugs.gnu.org; Fri, 23 Apr 2021 09:21:13 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 96C8580BBA; Fri, 23 Apr 2021 09:21:07 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2EE2780A9C; Fri, 23 Apr 2021 09:21:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1619184066; bh=TmzkOYVU16Tfq1zizXqblHR/NPZGVtXmSrOZhtdR0Kw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=D6GchzBxil8i5dZSMQ38zrn+uxnqU1Nys4bwiz6U1RRc9qIcMf/s5MWgpSFmmfKCs RAHb7f6u3+XjuYTT001sKM35HlEjnzb9JH/LRh1mQFfhnZQKRsh1IKNzJvgZC74GeL Jalrf679NgoX0H+0bM6juKYCBBzbdw/p9pzCSArGjvcrdwVJzu6Z6zylJIcjGJmyYO JeHTAvDZkssfTaSBGKX/fASZ0obY4IYQLZAaUoEY5a2zESwn7Yt0RwIdbYxNf0d9ks dMMgcJ1xSX8EvLiCvuwhoUrti2HV1qy77i67HXmwbfpHhLs1bTjvSkW0JNQOlSB1Ja T3UREgGggrThA== Original-Received: from alfajor (104-222-126-84.cpe.teksavvy.com [104.222.126.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C7B0012017B; Fri, 23 Apr 2021 09:21:05 -0400 (EDT) In-Reply-To: (Gregory Heytings's message of "Fri, 23 Apr 2021 06:59:09 +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:204740 Archived-At: > It seems to me that my proposal is better, and here's why. The right thing > to do in this case is not to install a local fix in completing-read-default, > because completing-read-default is not where the root cause of the current > problem lies. Hmm... that's odd: the problem has to do with values of `minibuffer-completion-*` appearing where they shouldn't, and those values are set by `completing-read-default`, so I think it's clearly the culprit. AFAIK The patch I'm proposing is (in the long term) doing The Right Thing (tho not quite in The Right Way since it still uses `minibuffer-with-setup-hook`, but that's an internal detail that can be fixed in the future by changing `read-from-minibuffer` to offer some other way to run code in the new minibuffer). > The right thing to do is to change the semantics of > read-from-minibuffer (while preserving backward compatibility for > a limited amount of time), in such a way it receives some of its > arguments through its environment. The core problem is the fact that dynamic scoping leaks: the parameters passed to `read-from-minibuffer` via dynamic scoping and up being passed to all other uses of `read-from-minibuffer` which happen to take place within the same dynamic extent. I can't see how "The right thing to do" can be compatible with "receives some of its arguments through its environment". [ Note that I'm not saying that doing it is necessarily wrong for a short term fix, tho. ] Stefan