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#60021: 29.0.60; Eshell completion errors in the presence of buffer redirects Date: Tue, 20 Dec 2022 08:55:13 +0000 Message-ID: References: <87pmconwnw.fsf@daniel-mendler.de> <17d95c0d-e0c5-b99d-c831-d9b815cbb25d@daniel-mendler.de> <12e425eb-1fdc-a014-cf9c-e3ccb026f3b0@daniel-mendler.de> <9d2a08cf-888a-d939-4df4-d86af3bb6902@daniel-mendler.de> <017a4928-bec0-68a8-82ea-ea8c305b32c4@daniel-mendler.de> 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="32366"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60021@debbugs.gnu.org To: Daniel Mendler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 20 09:56:15 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 1p7YQ3-0008Fg-EH for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Dec 2022 09:56:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7YPt-0006sx-BU; Tue, 20 Dec 2022 03:56:05 -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 1p7YPr-0006sg-A2 for bug-gnu-emacs@gnu.org; Tue, 20 Dec 2022 03:56:03 -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 1p7YPq-0004Kv-QW for bug-gnu-emacs@gnu.org; Tue, 20 Dec 2022 03:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7YPq-0000Ww-Ht for bug-gnu-emacs@gnu.org; Tue, 20 Dec 2022 03:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Dec 2022 08:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60021 X-GNU-PR-Package: emacs Original-Received: via spool by 60021-submit@debbugs.gnu.org id=B60021.16715265162017 (code B ref 60021); Tue, 20 Dec 2022 08:56:02 +0000 Original-Received: (at 60021) by debbugs.gnu.org; 20 Dec 2022 08:55:16 +0000 Original-Received: from localhost ([127.0.0.1]:43502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7YP6-0000WT-BJ for submit@debbugs.gnu.org; Tue, 20 Dec 2022 03:55:16 -0500 Original-Received: from heytings.org ([95.142.160.155]:38000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7YP5-0000WN-7C for 60021@debbugs.gnu.org; Tue, 20 Dec 2022 03:55:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1671526513; bh=IohstmJ0N5wAlcgB8k2FOPZYb7L/fDf7a42ny94JYdo=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=oP063ZXOOgxcU1nSubCtT7ce8tE9sd8vpc0ixCjT2vsERHVLrEYLHvbb1QtLr6f2I CTEQYawdrFDg3g1eYpBEk9WRQSmEUdDqg3vAWucXhm3cPceKb9j0aWS+hqOlnAAacM puQjaLcXDAo11CEhHYyGKlNfljmc/vetlyos+ORMQeb9+xAGp9StSuilQuz5DMzJ1Z g4Fibg/g5F1tqmcjIEOdwbCeC0r4ZXpc3cM1re8Xmh3hhNTyk3bVrZTb9kZGmf4JZz Rt6CPHNPK/Nfca1AiNfReY+gQhbyrnhDIwL3KJlTkzL0suSTYUPjuJwhT4v6hc07ZS 7rhF4ngI3ebOg== In-Reply-To: <017a4928-bec0-68a8-82ea-ea8c305b32c4@daniel-mendler.de> 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:251501 Archived-At: >> Daniel, can you please try the attached patch and tell us if it fixes >> the issue without introducing regressions? > > Thanks for looking into this! > Thanks for your reply! > > I inspected the patch and it seems like a reasonable fix for the > problem. I wonder about the introduction of the `pcomplete-arg-value' > string property. Is the introduction of this property necessary? Do you > have a use case for this right now? > Not right now, no. It's a kind of compromise. Previously pcomplete-args (and pcomplete.el in general) assumed that pcomplete-parse-argument-function would return strings, and only strings. When that's not the case, such as in eshell, it fails. For example, with your recipe, when '#<*scratch*>' is parsed, a buffer object is returned. That value could have been transformed into a string with 'format', but that would mean that the original value has been lost (from the point of view of pcomplete). The solution we found is to wrap that value in a string, the textual representation of the argument, namely the string "#<*scratch*>" in your recipe. With that solution it becomes possible to design other pcomplete functions that would use that value. > > If the recipes of #59956 and #60021 are fixed by this on your setup, I > trust it will work properly on my setup. No reason for additional > testing on my side. > They are fixed, but I don't use eshell (and neither does Stefan M IIUC), so I may very well have missed some important other cases in which that fix would introduce a regression.