[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
File name handlers and local files.
From: |
Michaël Cadilhac |
Subject: |
File name handlers and local files. |
Date: |
Tue, 28 Nov 2006 14:13:42 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.90 (gnu/linux) |
address@hidden (Kim F. Storm) writes:
>> BTW, something tickles me about all that: why functions like
>> file-exists-p & co doesn't check if the file is not an actual
>> stat(2)-able file before getting any fanciness with file name
>> handlers ?
>
> Yes, I've been hit by this many times while working on ido.
It's probably worth the ask in another thread.
Let's suppose my sysadmin is a weird guy. Very weird. And he decided
that a common NFS data directory will be created on the / with the
name 'data:', because he had a difficult childhood and loves The
Windows Way.
When I try to edit a file in that directory, I use : C-x C-f /data:/test
Oh, weirder! Even if a `data:' directory exists, it just tries to use
tramp !
Okey, this is a hard case, because the `test' file doesn't exist, and
it may exist on the distant host `data'.
But simpler: let's just try (file-exists-p "/data:"). The file name
handler having the precedence on local files, it tries to ssh to
`data:'. Isn't that a pity?
--
/!\ My mail address has changed, please update your files accordingly.
| Michaël `Micha' Cadilhac | «Tu aimeras ton prochain.» |
| Epita/LRDE Promo 2007 | D'abord, Dieu ou pas, |
| http://michael.cadilhac.name | j'ai horreur qu'on me tutoie. |
`-- - JID: address@hidden --' -- P. Desproges - --'
pgpbt4jbgTioA.pgp
Description: PGP signature