From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6299: In read-file-name: (args-out-of-range "c:" 0 3) Date: Sat, 29 May 2010 19:29:45 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1275177467 7813 80.91.229.12 (29 May 2010 23:57:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 May 2010 23:57:47 +0000 (UTC) Cc: 6299@debbugs.gnu.org To: Lennart Borgman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 30 01:57:45 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 1OIVuR-0006x0-8M for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 May 2010 01:57:43 +0200 Original-Received: from localhost ([127.0.0.1]:33389 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIVuQ-0008Qz-G9 for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 May 2010 19:57:42 -0400 Original-Received: from [140.186.70.92] (port=35111 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIVuK-0008PU-Ea for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 19:57:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OIVuJ-0003WB-Hd for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 19:57:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52764) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIVuJ-0003Vo-Bj for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 19:57:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OIVTf-0005iP-Ne; Sat, 29 May 2010 19:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier 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 23:30:03 +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.127517579321947 (code B ref 6299); Sat, 29 May 2010 23:30:03 +0000 Original-Received: (at 6299) by debbugs.gnu.org; 29 May 2010 23:29:53 +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 1OIVTU-0005hw-Kl for submit@debbugs.gnu.org; Sat, 29 May 2010 19:29:52 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIVTR-0005hr-Vx for 6299@debbugs.gnu.org; Sat, 29 May 2010 19:29:50 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAJJAAUxMCpdY/2dsb2JhbACeO3K8KYUWBIxM X-IronPort-AV: E=Sophos;i="4.53,324,1272859200"; d="scan'208";a="65993571" Original-Received: from 76-10-151-88.dsl.teksavvy.com (HELO pastel.home) ([76.10.151.88]) by ironport2-out.pppoe.ca with ESMTP; 29 May 2010 19:29:45 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 2206681F8; Sat, 29 May 2010 19:29:45 -0400 (EDT) In-Reply-To: (Lennart Borgman's message of "Sun, 30 May 2010 00:07:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 29 May 2010 19:30:03 -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:37404 Archived-At: > BOUNDARIES string="c:" table=read-file-name-internal pred=file-exists-p suffix="" > BOUNDARIES boundaries=(boundaries 3) This appears to be the problem. (read-file-name-internal "c:" nil '(boundaries . "")) seems to return (boundaries 3 . 0). Since the code that does that is most likely the one in completion--file-name-table which does: (let ((start (length (file-name-directory string))) (end (string-match-p "/" (cdr action)))) (list* 'boundaries start end))) my guess is that (file-name-directory "c:") return "c:/". I guess we should just use (or (string-match "[^/]*\\'" string) 0) instead of (length (file-name-directory string)) but it has N^2 complexity :-( Stefan