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: Sat, 01 May 2021 15:34:44 -0400 Message-ID: References: <87lf9cepqw.fsf@mail.linkov.net> <7ee648e8400708d266ed@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="24265"; 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 Sat May 01 21:35:09 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 1lcvOP-0006Cj-BE for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 May 2021 21:35:09 +0200 Original-Received: from localhost ([::1]:52870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcvOO-0003Ay-Dn for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 May 2021 15:35:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcvOI-0003Ar-Ey for bug-gnu-emacs@gnu.org; Sat, 01 May 2021 15:35:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcvOI-0002Ez-7r for bug-gnu-emacs@gnu.org; Sat, 01 May 2021 15:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lcvOI-0004qm-44 for bug-gnu-emacs@gnu.org; Sat, 01 May 2021 15:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 May 2021 19:35: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.161989769418632 (code B ref 45474); Sat, 01 May 2021 19:35:02 +0000 Original-Received: (at 45474) by debbugs.gnu.org; 1 May 2021 19:34:54 +0000 Original-Received: from localhost ([127.0.0.1]:38014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcvOA-0004qS-5C for submit@debbugs.gnu.org; Sat, 01 May 2021 15:34:54 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:6808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcvO8-0004qM-TO for 45474@debbugs.gnu.org; Sat, 01 May 2021 15:34:53 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 39D9C440794; Sat, 1 May 2021 15:34:47 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B9265440717; Sat, 1 May 2021 15:34:45 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1619897685; bh=JQchzvIMSyDOj0Ah3GinrijJGXP8Bc8apapyu+R4/Hg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Jn241qJFAmmxMftSCvNhrTwOtQDs0Nx22Ei7DvzoyM648kYqPyRpFu5P0sglyk4P7 0spRjHeHrZjyPATqc4OyyL2j6vOI49J1igjVC5IRTVMqevIn/42LN7zU0fnbeWJXHp jJ9Rzpojkl643sYqhX6/wSWmgncQwcjBEJ2Q4L3w9te5rQTavwgxx/eK+wR0oI9HpM QtzLQrZ/oR1m+kdkbh5YhzW1YGMGnG3nSeVz5Q+mbzDzZAVgVRnulBRtOEbyFAOcqg nr+wJUa2Q/NcZMIDDaQZxte81/pTVSzSP+WAo77t1PIkv9UPvH+b57t31G2eeK+Rp3 EZusQioOMzpHg== Original-Received: from alfajor (unknown [108.161.125.61]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6DBB3120262; Sat, 1 May 2021 15:34:45 -0400 (EDT) In-Reply-To: <7ee648e8400708d266ed@heytings.org> (Gregory Heytings's message of "Sat, 24 Apr 2021 08:44:38 +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:205365 Archived-At: OK, seeing how noone reported problems with my patch, I pushed it to `master`. In case someone later reports a problem, we may "revert" to your approach if its slightly better compatibility proves useful. Stefan Gregory Heytings [2021-04-24 08:44:38] wrote: >>> 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. >> > > Again, it seems to me that this problem is not directly related to the > problem at hand. If the caller of read-from-minibuffer is not careful > enough and binds minibuffer-completion-* too far from the call, in such > a way that other code is unexpectedly affected (or could unexpectedly be > affected) by this binding, it's the responsibility of that caller to fix > that problem. > > Anyway, I attach a last version of my patch, in which all the dancing > happens at the C level. It is probably also possible to finally get rid of > the 15 lines with the minibuffer-completing-file-name = Qlambda hack in > read_minibuf().