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: Thu, 22 Apr 2021 09:54:48 -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="6738"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Gregory Heytings , Dario Gjorgjevski , 45474@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 22 15:55:25 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 1lZZng-0001cX-Dy for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Apr 2021 15:55:24 +0200 Original-Received: from localhost ([::1]:43792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZZnf-0002ht-GP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Apr 2021 09:55:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZZnK-0002hS-Mm for bug-gnu-emacs@gnu.org; Thu, 22 Apr 2021 09:55:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49925) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZZnK-00058S-FP for bug-gnu-emacs@gnu.org; Thu, 22 Apr 2021 09:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lZZnK-00019v-E3 for bug-gnu-emacs@gnu.org; Thu, 22 Apr 2021 09:55: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: Thu, 22 Apr 2021 13:55: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.16190997004440 (code B ref 45474); Thu, 22 Apr 2021 13:55:02 +0000 Original-Received: (at 45474) by debbugs.gnu.org; 22 Apr 2021 13:55:00 +0000 Original-Received: from localhost ([127.0.0.1]:33237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZZnI-00019X-6V for submit@debbugs.gnu.org; Thu, 22 Apr 2021 09:55:00 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:3393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZZnF-00019J-96 for 45474@debbugs.gnu.org; Thu, 22 Apr 2021 09:54:58 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8C5BF100525; Thu, 22 Apr 2021 09:54:51 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 278101000C9; Thu, 22 Apr 2021 09:54:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1619099690; bh=Q/4r7sP78nRtV1v4qmJ8YRtDbCoQFXsZkLtKLUvIS5Y=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=n/pAxY5fRekXe+eLbng5paKw63WsXvuI9tjuLFF/56ZID4cCt0ywuZh+BdEmdvaYZ vGCHd30JtesjDo1rn2kiVK9e23L5kDYa7ghRsKXpzcPB5KpE3IS6/Paau6UwX4C8WO mNXkMFGT1HTuyy2bjE5XHx8UPJRNRTG5/epsAtKbnXm4Boxr01A6zy2HZ2pheJRsJl NoDkrWJUMrqgF0LbSKfHzjAtw3Tt9Nt8dJFZLbq70F5uLhbrndfkXjABPW2XJGFyOz XZH1EWOaJOzsQpB7F02XfqkBH59EsPvQNOwQOH4nUP6bw6NFWxi3f6d8egwX/0zGfv 6OFJMey/SZ98A== Original-Received: from alfajor (104-222-126-84.cpe.teksavvy.com [104.222.126.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C22F31201C8; Thu, 22 Apr 2021 09:54:49 -0400 (EDT) In-Reply-To: <87lf9cepqw.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 20 Apr 2021 22:01:31 +0300") 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:204685 Archived-At: > I tested your patch and discovered that it fails when two nested > minibuffers both use completion, e.g. C-x C-f C-h v raises the error: > > Error in post-command-hook (icomplete-post-command-hook): (wrong-type-argument symbolp Indeed, it's nasty: - In the first step, we - let-bind (globally) m-c-table to read-file-name-internal - go to minibuf-1 - make it buffer-local in minibuf-1 - everything's dandy - In the second step, things get ugly - we're in minibuf-1 - we let-bind m-c-table to help--symbol-completion-table which only works buffer-locally in minibuf-1 (thus temporarily overriding the value set just before). - we go to minibuf-2 which still has no buffer-local setting so it sees the global value that's still read-file-name-internal (because of the very first part of the first step) - we make it buffer-local but to this wrong value So in the end we get a wrong m-c-table in both buffers (the values are reversed!). Stefan