>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)srce.hr> writes:
Hrvoje>
Hrvoje> greg(a)alphatech.com (Greg Klanderman) writes:
>>
>>>> "Hrvoje" ==
Hrvoje Niksic <hniksic(a)srce.hr> writes:
Hrvoje>
Hrvoje> greg(a)alphatech.com (Greg Klanderman) writes:
> >> It'd be really nice if C-x C-f etc would do ~user
completion.
> >> Tcsh and most other shells have had this forever. If you send
> >> me the /etc/passwd code I can look into it if there's interest.
Hrvoje>
Hrvoje> Coding it is likely easy enough. The tricky thing is to find the
Hrvoje> right place to hook it in. I think it should be somewhere in
Hrvoje> complete-file-name.
>
> Where? I don't see that function.
Hrvoje>
Hrvoje> Sorry, I meant file_name_completion() in dired.c.
Given the recent changes to expand-file-name I assumed we were trying
to keep this kind of stuff out of the low level file primitives. It
seemed to make more sense at the point where environment variables are
expanded. Or would /etc/passwd only be consulted if the directory arg
were empty and the file arg started with '~'. Still it imposes a
restriction and seems hackish.
citing 20.3 NEWS:
> ** File-access primitive functions no longer discard an extra
redundant
> directory name from the beginning of the file name. In other words,
> they no longer do anything special with // or /~. The same goes for
> `expand-file-name'. That conversion is now done only in
> `substitute-in-file-name'.
>
> This makes it possible for a Lisp program to open a file whose name
> begins with ~.
greg