From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#30668: 27.0.50; Error in `completing-read' Date: Fri, 25 Jun 2021 16:51:33 +0200 Message-ID: <87pmwac80a.fsf@gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8943"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 30668@debbugs.gnu.org, Stefan Monnier To: p.stephani2@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 25 16:55:41 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwnF7-00025T-AF for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Jun 2021 16:55:41 +0200 Original-Received: from localhost ([::1]:34076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwnF6-0007Va-Al for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Jun 2021 10:55:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwnBZ-0003xT-TU for bug-gnu-emacs@gnu.org; Fri, 25 Jun 2021 10:52:01 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35065) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwnBZ-0004vu-MB for bug-gnu-emacs@gnu.org; Fri, 25 Jun 2021 10:52:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lwnBZ-0004kB-JK for bug-gnu-emacs@gnu.org; Fri, 25 Jun 2021 10:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Jun 2021 14:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30668 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 30668-submit@debbugs.gnu.org id=B30668.162463270618213 (code B ref 30668); Fri, 25 Jun 2021 14:52:01 +0000 Original-Received: (at 30668) by debbugs.gnu.org; 25 Jun 2021 14:51:46 +0000 Original-Received: from localhost ([127.0.0.1]:46611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwnBK-0004jh-FU for submit@debbugs.gnu.org; Fri, 25 Jun 2021 10:51:46 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:45570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwnBH-0004jT-W4 for 30668@debbugs.gnu.org; Fri, 25 Jun 2021 10:51:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=UzXUIhavGeAwyP1zxlSNvP78yWFUmUNXbShRhaef2Kc=; b=Y4RxKGhfyT2UXQrmNj42fFQfUJ L+ZrwY0b2ZPzgrcktLzN6YmNGgHzNx4TsQ1/nXD1Ch0W1FNXvNL85IC8acv/tlN27dAc80ydmJlra noprv3qiaRn4EVNX4KGTZMdZQxDFnzHSida6WPjAqshbpQrod9IrEUvclypxlBwntFUQ=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwnB8-000760-9F; Fri, 25 Jun 2021 16:51:36 +0200 X-Now-Playing: David Bowie's _The Width of a Circle (1)_: "Karma Man" In-Reply-To: (p.'s message of "Thu, 01 Mar 2018 19:23:27 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209001 Archived-At: p.stephani2@gmail.com writes: > emacs -Q --eval='(completing-read "p: " nil)' > > Hit . 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) #)(basic) > completion--some(#f(compiled-function (style) #) > (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