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 #38 received at 59956 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: Jim Porter <jporterbugs <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>,
 arstoffel <at> gmail.com, 59956 <at> debbugs.gnu.org,
 John Wiegley <johnw <at> newartisans.com>
Subject: Re: bug#59956: 29.0.60: Failure when completing arguments in Eshell
 after variable interpolation
Date: Sun, 18 Dec 2022 19:54:44 -0500
>> A "general" solution might be the one below
> Why not (format "%s" (nth (+ (pcase ...))))?

Because I prefer to confine the workaround to those rare cases where we
actually need it.

>> tho it looks more like a general workaround, I think.
> Indeed, I think it would be better if pcomplete could see the
> unexpanded argument instead of its expansion.

There's a tension here: we want the completion to operate on the actual
buffer text obviously, so in some places we definitely want to see the
"unexpanded argument" [1], but when it comes to looking at other arguments
to decide which completion table to use at point, it's often more useful
to see the expanded arguments (i.e. the thing that the command will
actually see).  E.g. if the previous arg is `$foo` which expands to `-u`
we'd probably prefer to see `-u` in order to know we should complete
against user names.


        Stefan


[1] And we have an "API bug" in this area where Pcomplete can't reliably
    figure out what the to-be-completed text actually is, BTW.





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.