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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Cc: 52169 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#52169: 28.0.60; "Args out of range" when completing shell
 command
Date: Mon, 29 Nov 2021 16:26:05 +0100
Kévin Le Gouguec <kevin.legouguec <at> gmail.com> writes:

> $ 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

As far as I can tell, this comes from:

(defun completion-basic-try-completion (string table pred point)

[...]

      (let* ((suffix (substring afterpoint (cdr bounds)))
             (prefix (substring beforepoint 0 (car bounds)))

But the length of beforepoint (i.e., "./nosuchcomma") is 13, while (car
bounds) is 14.

I'm not sure how this all connects up, so I've added Stefan to the CCs.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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

Previous Next


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