[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52169: 28.0.60; "Args out of range" when completing shell command
From: |
Lars Ingebrigtsen |
Subject: |
bug#52169: 28.0.60; "Args out of range" when completing shell command |
Date: |
Mon, 29 Nov 2021 16:26:05 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Kévin Le Gouguec <kevin.legouguec@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