GNU bug report logs - #59803
completion-at-point in shell buffer ignores some files

Previous Next

Package: emacs;

Reported by: Nicolas Graner <nicolas <at> graner.name>

Date: Sat, 3 Dec 2022 11:02:01 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59803 in the body.
You can then email your comments to 59803 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#59803; Package emacs. (Sat, 03 Dec 2022 11:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Graner <nicolas <at> graner.name>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 03 Dec 2022 11:02:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Graner <nicolas <at> graner.name>
To: bug-gnu-emacs <at> gnu.org
Subject: completion-at-point in shell buffer ignores some files
Date: Sat, 03 Dec 2022 12:01:16 +0100
In a *Shell* buffer, file name completion ignores file names already
present on the current line. For example, if you have a file named `foo'
and no other file starting with an f, when you type:

$ cp f<TAB> f<TAB>

the first <TAB> completes `f' to `foo', but the second <TAB> gives a `No
match' error.

Similarly, if you have files named foo1, foo2, foo3 and foo4, then:

$ mv foo1 foo2 f<TAB>

shows only foo3 and foo4 in the completions buffer.

Happens in emacs 29 but not in 28.

Nicolas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59803; Package emacs. (Sun, 04 Dec 2022 10:00:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Nicolas Graner <nicolas <at> graner.name>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 59803 <at> debbugs.gnu.org
Subject: Re: bug#59803: completion-at-point in shell buffer ignores some files
Date: Sun, 04 Dec 2022 11:58:43 +0200
> From: Nicolas Graner <nicolas <at> graner.name>
> Date: Sat, 03 Dec 2022 12:01:16 +0100
> 
> In a *Shell* buffer, file name completion ignores file names already
> present on the current line. For example, if you have a file named `foo'
> and no other file starting with an f, when you type:
> 
> $ cp f<TAB> f<TAB>
> 
> the first <TAB> completes `f' to `foo', but the second <TAB> gives a `No
> match' error.
> 
> Similarly, if you have files named foo1, foo2, foo3 and foo4, then:
> 
> $ mv foo1 foo2 f<TAB>
> 
> shows only foo3 and foo4 in the completions buffer.
> 
> Happens in emacs 29 but not in 28.

This seems to be due to some changes in pcomplete.el since Emacs 28, because
if you remove pcomplete-completions-at-point from the value of
shell-dynamic-complete-functions, the problem goes away.

Stefan, can you help here?  It sounds like the culprit is some of the
changes in commit 0a36671f41 and/or 88b025f815, but I'm not sure.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59803; Package emacs. (Sat, 10 Dec 2022 12:53:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 59803 <at> debbugs.gnu.org, nicolas <at> graner.name
Subject: Re: bug#59803: completion-at-point in shell buffer ignores some files
Date: Sat, 10 Dec 2022 14:51:59 +0200
Ping!  Stefan, any suggestions or ideas?

> Cc: 59803 <at> debbugs.gnu.org
> Date: Sun, 04 Dec 2022 11:58:43 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > From: Nicolas Graner <nicolas <at> graner.name>
> > Date: Sat, 03 Dec 2022 12:01:16 +0100
> > 
> > In a *Shell* buffer, file name completion ignores file names already
> > present on the current line. For example, if you have a file named `foo'
> > and no other file starting with an f, when you type:
> > 
> > $ cp f<TAB> f<TAB>
> > 
> > the first <TAB> completes `f' to `foo', but the second <TAB> gives a `No
> > match' error.
> > 
> > Similarly, if you have files named foo1, foo2, foo3 and foo4, then:
> > 
> > $ mv foo1 foo2 f<TAB>
> > 
> > shows only foo3 and foo4 in the completions buffer.
> > 
> > Happens in emacs 29 but not in 28.
> 
> This seems to be due to some changes in pcomplete.el since Emacs 28, because
> if you remove pcomplete-completions-at-point from the value of
> shell-dynamic-complete-functions, the problem goes away.
> 
> Stefan, can you help here?  It sounds like the culprit is some of the
> changes in commit 0a36671f41 and/or 88b025f815, but I'm not sure.
> 
> Thanks.
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59803; Package emacs. (Sat, 10 Dec 2022 21:44:02 GMT) Full text and rfc822 format available.

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

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 59803 <at> debbugs.gnu.org,
 nicolas <at> graner.name
Subject: Re: bug#59803: completion-at-point in shell buffer ignores some files
Date: Sat, 10 Dec 2022 21:43:09 +0000
[Message part 1 (text/plain, inline)]
I'm not Stefan (alas 😉), but the culprit is a994126968, and here's the 
fix (a single character change!).

>
> Ping!  Stefan, any suggestions or ideas?
>
[Do-not-pare-arguments-unnecessarily.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59803; Package emacs. (Sun, 11 Dec 2022 15:07:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, nicolas <at> graner.name, 59803 <at> debbugs.gnu.org
Subject: Re: bug#59803: completion-at-point in shell buffer ignores some files
Date: Sun, 11 Dec 2022 10:06:21 -0500
> I'm not Stefan (alas 😉), but the culprit is a994126968, and here's the fix
> (a single character change!).

Not sure how I failed to see your message, but I just tracked the
problem to the same source.  Thanks, the patch looks just right.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59803; Package emacs. (Sun, 11 Dec 2022 15:16:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: gregory <at> heytings.org, nicolas <at> graner.name, 59803 <at> debbugs.gnu.org
Subject: Re: bug#59803: completion-at-point in shell buffer ignores some files
Date: Sun, 11 Dec 2022 17:15:06 +0200
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  59803 <at> debbugs.gnu.org,  nicolas <at> graner.name
> Date: Sun, 11 Dec 2022 10:06:21 -0500
> 
> > I'm not Stefan (alas 😉), but the culprit is a994126968, and here's the fix
> > (a single character change!).
> 
> Not sure how I failed to see your message, but I just tracked the
> problem to the same source.  Thanks, the patch looks just right.

Gregory, please install on the release branch, and thanks (to both of
you).




Reply sent to Gregory Heytings <gregory <at> heytings.org>:
You have taken responsibility. (Mon, 12 Dec 2022 01:05:01 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Graner <nicolas <at> graner.name>:
bug acknowledged by developer. (Mon, 12 Dec 2022 01:05:02 GMT) Full text and rfc822 format available.

Message #25 received at 59803-done <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, nicolas <at> graner.name,
 59803-done <at> debbugs.gnu.org
Subject: Re: bug#59803: completion-at-point in shell buffer ignores some files
Date: Mon, 12 Dec 2022 01:04:43 +0000
>
> Gregory, please install on the release branch, and thanks (to both of 
> you).
>

Done (24c8c28ae6), and closing.






bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 09 Jan 2023 12:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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