From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#59956: 29.0.60: Failure when completing arguments in Eshell after variable interpolation Date: Wed, 21 Dec 2022 09:28:43 +0000 Message-ID: References: <83iliiv0yv.fsf@gnu.org> <765547c0-b2a5-b054-a29d-b27002b7442c@gmail.com> <07bcf6a532d0428b9f53@heytings.org> <0d1eac42-1ea4-46d5-6236-eebfa75618ec@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14367"; mail-complaints-to="usenet@ciao.gmane.io" Cc: John Wiegley , Eli Zaretskii , arstoffel@gmail.com, Stefan Monnier , 59956@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 21 10:29:27 2022 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 1p7vPj-0003Z3-B9 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Dec 2022 10:29:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7vPL-0005iQ-92; Wed, 21 Dec 2022 04:29:03 -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 1p7vPK-0005iG-55 for bug-gnu-emacs@gnu.org; Wed, 21 Dec 2022 04:29:02 -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 1p7vPJ-0004gg-QQ for bug-gnu-emacs@gnu.org; Wed, 21 Dec 2022 04:29:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7vPJ-0004Qh-Lh for bug-gnu-emacs@gnu.org; Wed, 21 Dec 2022 04:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Dec 2022 09:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59956 X-GNU-PR-Package: emacs Original-Received: via spool by 59956-submit@debbugs.gnu.org id=B59956.167161492717019 (code B ref 59956); Wed, 21 Dec 2022 09:29:01 +0000 Original-Received: (at 59956) by debbugs.gnu.org; 21 Dec 2022 09:28:47 +0000 Original-Received: from localhost ([127.0.0.1]:50612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7vP5-0004QR-Ak for submit@debbugs.gnu.org; Wed, 21 Dec 2022 04:28:47 -0500 Original-Received: from heytings.org ([95.142.160.155]:39466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7vP3-0004QL-GF for 59956@debbugs.gnu.org; Wed, 21 Dec 2022 04:28:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1671614924; bh=AnaEvanWQb6iX3dHQOHt7O4+k9OikfAYpi1xHWcE+kk=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=EB0r++Za3/Gdn90zLPceW0Taca1eMeGgmmkReMrlR0PWbRRRzXR1YVHjgBM5zPjky raWG+MPRfJshMcmdwxI4/gcn8ny9S9m3TBYV8/aBsAJzXVyCCHRD1XkILhinO9KDuF uPsll+LUN6WMzXPVdUAVqEZXwHqyshvOOL2ViO39e+awR5eChZC7WudrYz6UkYmnMp /YYghJKEwfJ8/uhZv8M/dOKKn8WJtwpInxv1KWNITgwg8l6vaW3jsQo316g0OUXsmT FXYWRqHkaPVB+lm2s8aKKx+xWaREpLuKxTpnUFwKnXIRptOl4BFO0Jp+Hz9QwQ1Ucw npJHxZdS2iWvQ== In-Reply-To: <0d1eac42-1ea4-46d5-6236-eebfa75618ec@gmail.com> 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:251579 Archived-At: >> Augusto and Jim, can you please try the attached patch and tell us if >> it fixes the issue without introducing regressions? > > It works for me after a bit of testing, thanks. I don't see any > regressions on the Eshell side of things, at least. > Thanks for your feedback! > > While it would be nice to have a way for Eshell to provide multiple > forms of its arguments for completion (one for external commands that > expect a flat list of strings, and another for Eshell commands), that > seems like a lot more work that would probably be better spent > elsewhere. (And a change like that would be too big for the release > branch anyway.) > Indeed. There are two levels involved here: the pcomplete one and the eshell one. The patch makes the pcomplete level more robust by ensuring that, even if pcomplete-parse-arguments-function does not return strings (which was an implicit assumption), pcomplete will continue to work. On the eshell level, it would probably be better add a companion function to eshell-complete-parse-arguments (which is used for pcomplete-parse-arguments-function) that would return a proper string representation of the expanded arguments, and to use it for pcomplete-parse-arguments-function, instead of eshell-complete-parse-arguments.