unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: p.stephani2@gmail.com
Cc: 30668@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#30668: 27.0.50; Error in `completing-read'
Date: Fri, 25 Jun 2021 16:51:33 +0200	[thread overview]
Message-ID: <87pmwac80a.fsf@gnus.org> (raw)
In-Reply-To: <wvr47eqv3ba8.fsf@a.muc.corp.google.com> (p.'s message of "Thu, 01 Mar 2018 19:23:27 +0100")

p.stephani2@gmail.com writes:

> emacs -Q --eval='(completing-read "p: " nil)'
>
> Hit <left> <SPC>.  An error will be signaled:
>
> completion--some: Args out of range: "", 0, -1
>
> Backtrace is
>
> Debugger entered--Lisp error: (args-out-of-range "" 0 -1)
>   completion-basic-try-completion("" nil nil -1)
>   #f(compiled-function (style) #<bytecode 0x3aabd9>)(basic)
>   completion--some(#f(compiled-function (style) #<bytecode 0x3aabd9>)
>   (basic partial-completion emacs22))
>   completion--nth-completion(1 "" nil nil -1 (metadata))
>   completion-try-completion("" nil nil -1 (metadata))
>   completion--try-word-completion("" nil nil -1 (metadata))
>   completion--do-completion(4 4 completion--try-word-completion)

This problem is still present in Emacs 28.  I'm not quite sure what the
correct fix is -- just change `completion--do-completion' to not do
completion if `(- (point) beg)' is negative?

Perhaps Stefan has an opinion here; added to the CCs.

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





  parent reply	other threads:[~2021-06-25 14:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01 18:23 bug#30668: 27.0.50; Error in `completing-read' p.stephani2
2018-03-01 18:39 ` Drew Adams
2021-06-25 14:51 ` Lars Ingebrigtsen [this message]
2021-06-26 13:38   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-26 13:55     ` Eli Zaretskii
2021-06-26 16:22       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-26 13:59     ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmwac80a.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=30668@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=p.stephani2@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).