GNU bug report logs - #52169
28.0.60; "Args out of range" when completing shell command

Previous Next

Package: emacs;

Reported by: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>

Date: Sun, 28 Nov 2021 21:39:01 UTC

Severity: normal

Found in version 28.0.60

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52169 <at> debbugs.gnu.org,
 Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Subject: Re: bug#52169: 28.0.60; "Args out of range" when completing shell
 command
Date: Sat, 04 Dec 2021 00:09:09 -0500
>> $ emacs -Q
>> M-! ./nosuchcommand C-b TAB
>>
>> - In Emacs 27.1, this simply says "[No match]".
>> - In Emacs 28.0.60, this errors out:
>>
>> > completion--some: Args out of range: "./nosuchcomma", 0, 14

Yuck!

This is one of those cases where the mismatch between the assumptions of
pcomplete and the featureset of minibuffer.el clash: `pcomplete-stub`
tells us we're completing "./nosuchcommand" but without telling us where
that string comes from in the buffer, so we fail to find
"./nosuchcommand" just before point (because the "d" is *after* point)
and thus fall back on the worst-case handler which doesn't behave well
at all here.

I pushed to `master` a fix for the immediate cause of the `Args out of
range` error, which seems to brings us back to Emacs-27's poor behavior.

Maybe it's good enough for `emacs-28` as well, but I have to think about
this problem a bit more.


        Stefan





This bug report was last modified 3 years and 165 days ago.

Previous Next


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