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

From: Stefan Monnier <[email-masked]>
Date: Sun, 30 May 2010 10:05:49 -0400

> I am looking around at the code a bit. I do not understand the comment
> in completion--file-name-table:

>   (cond
>    ((eq (car-safe action) 'boundaries)
>     ;; For the boundaries, we can't really delegate to
>     ;; completion-file-name-table and then fix them up, because it
>     ;; would require us to track the relationship between `str' and
>     ;; `string', which is difficult.  And in any case, if
>     ;; substitute-in-file-name turns "fo-$TO-ba" into "fo-o/b-ba", there's
>     ;; no way for us to return proper boundaries info, because the
>     ;; boundary is not (yet) in `string'.

> AFAICS it is doing exactly the same as completion-file-name-table
> here. What am I missing?

You're missing that "delegate to completion-file-name-table" means
calling substitute-in-file-name first and then
completion-file-name-table, so it wouldn't do the same.  But yes, we
could call completion-file-name-table directly without going through
substitute-in-file-name.  The reason why I don't do that is mostly
historical (I first started to do something more clever which didn't
work).

> BTW the doc string for action in completing read etc should be fixed.

I don't know what you mean here.

        Stefan