From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 52169@debbugs.gnu.org, "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
Subject: bug#52169: 28.0.60; "Args out of range" when completing shell command
Date: Sun, 05 Dec 2021 23:24:13 -0500 [thread overview]
Message-ID: <jwvr1aq2wti.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87czmcguil.fsf@gmail.com> ("Kévin Le Gouguec"'s message of "Sat, 04 Dec 2021 18:16:50 +0100")
Kévin Le Gouguec [2021-12-04 18:16:50] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> 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.
> Can confirm, thanks!
Thanks.
>> Maybe it's good enough for `emacs-28` as well, but I have to think about
>> this problem a bit more.
> OK; leaving this open for the time being then.
Hmm, I can't think of a good way to make it work correctly without
significant changes to `pcomplete.el` and its API.
For `emacs-28`, I propose the patch below, which is a slightly improved
version of the patch currently on `master`. As before, it won't fix the
real problem, but will avoid "Args out of range" and revert to the
behavior we had in Emacs-27 (which was/is broken, but tends
to be milder for the user).
Any objection?
Stefan
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index ca82b4a9e60..21d610fdf44 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -283,8 +283,9 @@ completion-table-subvert
((eq (car-safe action) 'boundaries)
(let ((beg (or (and (eq (car-safe res) 'boundaries) (cadr res)) 0)))
`(boundaries
- ,(max (length s1)
- (+ beg (- (length s1) (length s2))))
+ ,(min (length string)
+ (max (length s1)
+ (+ beg (- (length s1) (length s2)))))
. ,(and (eq (car-safe res) 'boundaries) (cddr res)))))
((stringp res)
(if (string-prefix-p s2 res completion-ignore-case)
next prev parent reply other threads:[~2021-12-06 4:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-28 21:38 bug#52169: 28.0.60; "Args out of range" when completing shell command Kévin Le Gouguec
2021-11-29 15:26 ` Lars Ingebrigtsen
2021-11-30 17:10 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-04 5:09 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-04 17:16 ` Kévin Le Gouguec
2021-12-06 4:24 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-12-06 5:15 ` Lars Ingebrigtsen
2021-12-06 12:56 ` Eli Zaretskii
2021-12-06 14:45 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-29 22:56 ` Kévin Le Gouguec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvr1aq2wti.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=52169@debbugs.gnu.org \
--cc=kevin.legouguec@gmail.com \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.