GNU bug report logs - #6299
In read-file-name: (args-out-of-range "c:" 0 3)

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Sat, 29 May 2010 01:36:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 6299 <at> debbugs.gnu.org
Subject: bug#6299: In read-file-name: (args-out-of-range "c:" 0 3)
Date: Sat, 29 May 2010 19:29:45 -0400
> 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




This bug report was last modified 15 years and 53 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.