From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.bugs Subject: bug#6299: In read-file-name: (args-out-of-range "c:" 0 3) Date: Sun, 30 May 2010 00:07:16 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1275172235 28610 80.91.229.12 (29 May 2010 22:30:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 May 2010 22:30:35 +0000 (UTC) Cc: 6299@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 30 00:30:33 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OIUY3-0002Qi-CO for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 May 2010 00:30:32 +0200 Original-Received: from localhost ([127.0.0.1]:49708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIUXx-0007EG-1Z for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 May 2010 18:30:25 -0400 Original-Received: from [140.186.70.92] (port=59281 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIUXr-00076q-SY for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 18:30:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OIUVL-0007wn-NF for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 18:27:44 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60621) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIUVL-0007wj-JY for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 18:27:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OIUCI-00059g-8J; Sat, 29 May 2010 18:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lennart Borgman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 May 2010 22:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6299 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6299-submit@debbugs.gnu.org id=B6299.127517086319808 (code B ref 6299); Sat, 29 May 2010 22:08:02 +0000 Original-Received: (at 6299) by debbugs.gnu.org; 29 May 2010 22:07:43 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIUBz-00059R-C2 for submit@debbugs.gnu.org; Sat, 29 May 2010 18:07:43 -0400 Original-Received: from mail-yw0-f183.google.com ([209.85.211.183]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIUBw-00059M-MD for 6299@debbugs.gnu.org; Sat, 29 May 2010 18:07:41 -0400 Original-Received: by ywh13 with SMTP id 13so1549903ywh.8 for <6299@debbugs.gnu.org>; Sat, 29 May 2010 15:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=tSNsC87MNy6yxxNWgbrewjE99M43hR2qlHyHpuBhAus=; b=GYiBQie2SqQ4Z+y37riJTlvZ7ahXy4VOKCLfh9Eq/HpL06k1uQ0ApYOTAIKh8NPrNL JQsB5l8/2vJDTm+F0Yys/wgsgzY91xNJAepje89g6FVH2cEPVchFZOcaeawjG1rdtbF8 XxlKbfDov9eDS1ZD/MiPeIB/hKAW2eFDGkk4k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=ew97J5tGJ5E9aV4wvhIbeCiP6mYywM6Td5zmdvGnkiYBMpQRPBq2rtR9Vbui46jdBF hXDYOMO1AygSMoDB+3ZySa1AWAZbaJwHXFzMiwOdvaAtP9+TWLr1lSH5mdyCKWUdyHOb 0nyYQRpybHyatC/9XxlNv06FRQKMrcdMPX40k= Original-Received: by 10.101.151.26 with SMTP id d26mr2617924ano.190.1275170856115; Sat, 29 May 2010 15:07:36 -0700 (PDT) Original-Received: by 10.100.44.20 with HTTP; Sat, 29 May 2010 15:07:16 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 29 May 2010 18:08:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37399 Archived-At: On Sat, May 29, 2010 at 11:24 PM, Lennart Borgman wrote: > On Sat, May 29, 2010 at 11:18 PM, Stefan Monnier > wrote: >>> Debugger entered--Lisp error: (args-out-of-range "c:" 0 3) >>> =C2=A0 signal(args-out-of-range ("c:" 0 3)) >>> =C2=A0 completion--some(#[(style) " =C2=A0 =C2=A0 =C2=A0 =C2=A0\236A@\n= \f >>> $\207" [style completion-styles-alist string table pred point] 5] >>> (basic partial-completion emacs22)) >> >> First thing: edit completion--some o as to replace condition-case with >> condition-case-no-debug. =C2=A0This way the error won't be delayed and y= ou'll >> get a more precise backtrace. eval-buffer in minibuffer.el made it more understandable. Here it is (but I do not know the cause of it): * I added a little trace here (defun completion-pcm--find-all-completions (string table pred point &optional filter) "Find all completions for STRING at POINT in TABLE, satisfying PRED. POINT is a position inside STRING. FILTER is a function applied to the return value, that can be used, e.g. to filter out additional entries (because TABLE migth not obey PRED)." (unless filter (setq filter 'identity)) (message "FIND: filter=3D%S" filter) (let* ((beforepoint (substring string 0 point)) (afterpoint (substring string point)) (bounds (completion-boundaries beforepoint table pred afterpoint)) (dummy (message "FIND: string=3D%S bounds=3D%S, beforepoint=3D%S afterpoint=3D%S" string bounds beforepoint afterpoint)) (prefix (substring beforepoint 0 (car bounds))) (suffix (substring afterpoint (cdr bounds))) firsterror) and in (defun completion-boundaries (string table pred suffix) "Return the boundaries of the completions returned by TABLE for STRING. STRING is the string on which completion will be performed. SUFFIX is the string after point. The result is of the form (START . END) where START is the position in STRING of the beginning of the completion field and END is the position in SUFFIX of the end of the completion field. E.g. for simple completion tables, the result is always (0 . (length SUFFIX= )) and for file names the result is the positions delimited by the closest directory separators." (message "BOUNDARIES string=3D%S table=3D%s pred=3D%s suffix=3D%S" string table pred suffix) (let ((boundaries (if (functionp table) (funcall table string pred (cons 'boundaries suffix= ))))) (message "BOUNDARIES boundaries=3D%S" boundaries) (if (not (eq (car-safe boundaries) 'boundaries)) (setq boundaries nil)) (cons (or (cadr boundaries) 0) (or (cddr boundaries) (length suffix))))) and got BOUNDARIES string=3D"c:/ema" table=3Dread-file-name-internal pred=3Dfile-exists-p suffix=3D"" BOUNDARIES boundaries=3D(boundaries 3) FIND: filter=3Dcompletion-pcm--filename-try-filter BOUNDARIES string=3D"c:/ema" table=3Dread-file-name-internal pred=3Dfile-exists-p suffix=3D"" BOUNDARIES boundaries=3D(boundaries 3) FIND: string=3D"c:/ema" bounds=3D(3 . 0), beforepoint=3D"c:/ema" afterpoint= =3D"" FIND: prefix=3D"c:/" FIND: substring=3D"c:" FIND: filter=3Dcompletion-pcm--filename-try-filter BOUNDARIES string=3D"c:" table=3Dread-file-name-internal pred=3Dfile-exists-p suffix=3D"" BOUNDARIES boundaries=3D(boundaries 3) FIND: string=3D"c:" bounds=3D(3 . 0), beforepoint=3D"c:" afterpoint=3D"" Entering debugger... It looks like perhaps read-file-name-internal gives the wrong information. PS: There is an advice on read-file-name is Around-advice `viper-suffix-advice': Tell `exit-minibuffer' to run `viper-file-add-suffix' as a hook. which does not seem to be involved (I unadvised read-file-name).