[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Stefan Monnier
Subject: bug#6299: In read-file-name: (args-out-of-range "c:" 0 3)
Date: Sat, 29 May 2010 19:29:45 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> 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 :-(


reply via email to

[Prev in Thread] Current Thread [Next in Thread]