From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61221: 30.0.50; [PATCH] Support completion of quoted variable refs in Eshell Date: Thu, 23 Feb 2023 17:39:02 -0500 Message-ID: References: <0e3cf425-be9d-4759-d024-ac07ccecba9c@gmail.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27250"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 61221-done@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 23 23:40:29 2023 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 1pVKGK-0006t2-0i for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Feb 2023 23:40:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVKG0-0004kv-ON; Thu, 23 Feb 2023 17:40:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVKFv-0004kI-TE for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 17:40:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVKFu-0004O6-A7 for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 17:40:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVKFu-0005ro-64 for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 17:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Feb 2023 22:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61221 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 61221-done@debbugs.gnu.org id=D61221.167719195222446 (code D ref 61221); Thu, 23 Feb 2023 22:40:02 +0000 Original-Received: (at 61221-done) by debbugs.gnu.org; 23 Feb 2023 22:39:12 +0000 Original-Received: from localhost ([127.0.0.1]:35532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVKF6-0005py-41 for submit@debbugs.gnu.org; Thu, 23 Feb 2023 17:39:12 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:60647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVKF4-0005pj-Q2 for 61221-done@debbugs.gnu.org; Thu, 23 Feb 2023 17:39:11 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id E87891000C4; Thu, 23 Feb 2023 17:39:04 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 5F59F1000BE; Thu, 23 Feb 2023 17:39:03 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1677191943; bh=6otv6AJUx1BoMoOeiNb5x3o3rOaD1POt4gimIvY5W48=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=PSoGQXGBgajDZKsn2ErPej0XsINTAgqkgSDvinJqKTvKBiyQLnDMhYo2eo6/UOvm/ FI1++G8BnA+AcHSZjelib9LxhvuZXY1BC8eQxWNApxpgRjIexhYgL4eG/4HJqiI7xk 57jmpvypCa/T5TTIEPCn+X0aes+L4GSDVQEvQ+NigAga+f8a1/Z21jsz5F+fL6/omt Dkgf779oh902vBm2+sZSRigB43rlBVd433HKwlFFh5huHFWfIx30knCRYXmV39YWB4 zB3TAIz8RN31AMbqRdhiqvAHd/3wJtvyMM5diU1Rrab3lqcfaLalFxgc+sJYjgzz2K tAFT9ikjZxG2Q== Original-Received: from pastel (unknown [216.154.34.24]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 32352123236; Thu, 23 Feb 2023 17:39:03 -0500 (EST) In-Reply-To: (Jim Porter's message of "Thu, 23 Feb 2023 14:11:54 -0800") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:256532 Archived-At: >>> + ('lambda ; test-completion >>> + (let ((result (test-completion string names pred))) >>> + (if (eq result t) string result))) >> Hmm... why not just always return `result`? > > As I understand it, returning 't' means "there is just one matching > completion, and the match is exact"[1], but in this case, that's not really > true: after completing "~user/" there are still more matching completions > (the contents of the user's home directory). What you describe is for `try-completion`, not `test-completion`. > This is really just trying to match what happens when calling > 'completion-file-name-table': > > (completion-file-name-table "~user/" nil nil) > => "~user/" > > (try-completion "~user/" '("~user/") nil) > => t The `action` arg is not `lambda` is these examples. Stefan