GNU bug report logs - #60021
29.0.60; Eshell completion errors in the presence of buffer redirects

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Mon, 12 Dec 2022 21:25:02 UTC

Severity: normal

Found in version 29.0.60

Done: Gregory Heytings <gregory <at> heytings.org>

Bug is archived. No further changes may be made.

Full log


Message #41 received at 60021 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Daniel Mendler <mail <at> daniel-mendler.de>
Cc: 60021 <at> debbugs.gnu.org
Subject: Re: bug#60021: 29.0.60; Eshell completion errors in the presence of
 buffer redirects
Date: Tue, 20 Dec 2022 08:55:13 +0000
>> 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.





This bug report was last modified 2 years and 141 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.