GNU bug report logs - #59956
29.0.60: Failure when completing arguments in Eshell after variable interpolation

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Sun, 11 Dec 2022 01:27: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 #44 received at 59956 <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: Gregory Heytings <gregory <at> heytings.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: John Wiegley <johnw <at> newartisans.com>, Eli Zaretskii <eliz <at> gnu.org>,
 arstoffel <at> gmail.com, 59956 <at> debbugs.gnu.org
Subject: Re: bug#59956: 29.0.60: Failure when completing arguments in Eshell
 after variable interpolation
Date: Sun, 18 Dec 2022 18:15:48 -0800
On 12/18/2022 5:19 PM, Gregory Heytings wrote:
> Hmmm...  So I guess it would be better, instead of replacing lists (and 
> in general non-strings) by their string representation, and instead of 
> always looking at an unexpanded argument, to look at the unexpanded 
> argument only when the expanded argument is not a string?  E.g. if $foo 
> is "-u" we would use "-u", but if $foo is (b a r) we would use "$foo".

For external commands called from Eshell, the most-correct thing to do 
would be to take the list of all arguments, flatten it, and convert 
every element in the flattened list to a string. That's how Eshell will 
ultimately call the program.

The tricky bit in my mind is how to do that automatically for external 
commands, but to still allow a Pcomplete function for an Eshell command 
(i.e. a function named 'eshell/FOO') to have access to the "raw"[1] 
expanded form, even if it contains sublists, numbers, other objects, 
etc. Maybe we could just do the first thing above, and then think about 
adding a new API to Pcomplete that gets the "raw" expanded form for later...

[1] Is it really "raw" if variables have been expanded? Probably not. I 
can't think of a better name at the moment though.




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

Previous Next


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