[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make file-expand-wildcards a filename handler operation?
From: |
Kai Großjohann |
Subject: |
make file-expand-wildcards a filename handler operation? |
Date: |
Fri, 02 Nov 2001 18:07:59 +0100 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i686-pc-linux-gnu) |
Do you think it's a good idea to make file-expand-wildcards a
filename handler operation?
Imagine the user types C-x C-f /tmp/foo.tar/[abc].c RET and there is
a `tar' filename handler which matches all *.tar files. Clearly, the
default function wouldn't do anything useful in this case, but the
filename handler might.
I currently see this because Tramp uses filenames like this:
/address@hidden/path/to/file
The "/[" and "]" are literally part of the filename.
Now you could tell me that this was a bad choice for a filename
format for remote files, but even if I change this, that doesn't help
with the `tar' example I gave above.
In Emacs 21, it works anyway because find-file-noselect looks if
file-expand-wildcards returns nil and then does as if
find-file-wildcards was nil.
But in Emacs 20, the current Tramp filename format doesn't work right.
I have now installed a kludge in Tramp which looks if it is running on
Emacs 20. And if so, it uses defadvice to make file-expand-wildcards
always return at least one filename -- the argument if no expansion
could be found.
Thoughts?
kai
--
Lisp is kinda like tpircstsoP
- make file-expand-wildcards a filename handler operation?,
Kai Großjohann <=