GNU bug report logs - #60845
30.0.50; [PATCH] Add tests for Eshell interactive completion (and fix a bug in it)

Previous Next

Package: emacs;

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

Date: Mon, 16 Jan 2023 01:51:02 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Porter <jporterbugs <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 60845 <at> debbugs.gnu.org, Daniel Mendler <mail <at> daniel-mendler.de>, Gregory Heytings <gregory <at> heytings.org>, arstoffel <at> gmail.com, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#60845: 30.0.50; [PATCH] Add tests for Eshell interactive completion (and fix a bug in it)
Date: Tue, 5 Sep 2023 18:37:47 -0700
[Message part 1 (text/plain, inline)]
On 9/5/2023 5:47 PM, Jim Porter wrote:
> On 9/5/2023 4:36 PM, Stefan Kangas wrote:
>> Jim Porter <jporterbugs <at> gmail.com> writes:
>>
>>> On 1/30/2023 6:54 AM, Stefan Monnier via Bug reports for GNU Emacs, 
>>> the Swiss
>>> army knife of text editors wrote:
>>>> It sounds good to me, but I'm definitely not well versed in this aspect
>>>> of the interaction between Eshell and Pcomplete (more specifically,
>>>> this is a part of their interaction which I find quite tricky), so it's
>>>> good that you add corresponding regression tests.
>>>
>>> Thanks for taking a look. I've merged my patches as e7d0aa248e. We 
>>> can leave
>>> this open though to discuss what to do about the Pcomplete side of 
>>> things. I
>>> think we can remove the workaround for Emacs 29, but maybe we want some
>>> additional changes.
>>
>> That was 9 months ago.  Is it still relevant to keep this bug open?
> 
> Yes, I believe so. I was planning to wait until Emacs 29.1 was released 
> before pinging people on this, but then forgot all about it. We should 
> probably use this time to fix the FIXME in 'pcomplete-arg', since (I 
> think) the current behavior in Eshell no longer requires the FIXME bit:
> 
>              ;; FIXME: 'last' is handled specially in Emacs 29, because
>              ;; 'pcomplete-parse-arguments' accepts a list of strings
>              ;; (which are completion candidates) as return value for
>              ;; (pcomplete-arg 'last).  See below: "it means it's a
>              ;; list of completions computed during parsing,
>              ;; e.g. Eshell uses that to turn globs into lists of
>              ;; completions".  This special case will be dealt with
>              ;; differently in Emacs 30: the pcomplete-arg-value
>              ;; property will be used by 'pcomplete-parse-arguments'.

Attached is a patch to revert the Emacs 29 workarounds. I *believe* I've 
fixed this on the Eshell side by always providing Pcomplete with the 
arguments in their string form. Could everyone try the patch out to make 
sure things still work?

In particular, see the cases in the following bugs: bug#60464, 
bug#60021, and bug#59956.
[0001-Revert-commits-dafa6d6badd6-and-72c45fa9109a.patch (text/plain, attachment)]

This bug report was last modified 1 year and 218 days ago.

Previous Next


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