>>>>> In <[EMAIL PROTECTED]> >>>>> Stefan Monnier <[EMAIL PROTECTED]> wrote:
> I've just installed a patch which should fix it. Does it work for you? Thanks! It works fine, but I prefer the second patch... > Although the patch works (it fixes the symlink-following code), in reality, > I see no reason why we should follow symlinks at all. The normal code for > insert-directory doesn't follow symlinks, so why should the ange-ftp > version of it do it? It seems to be asking for trouble, especially in the > present case: what if dired wants to refresh a single line that contains > a symlink? > The change to follow symlinks has sadly no explanation: > revision 1.20 > date: 2001/12/29 02:50:34; author: rms; state: Exp; lines: +12 -6 > (ange-ftp-insert-directory): Explicitly follow symlinks. > In the ChangeLog file, we get a tiny bit more info: > * net/ange-ftp.el (ange-ftp-allow-child-lookup): Always return nil. > This fixes a bug that treated all files as directories. > (ange-ftp-insert-directory): Explicitly follow symlinks. > But it's still not clear why we'd want to follow symlinks. My suspicion is > that at that time, it was necessary to follow symlinks in order for the > ange-ftp-ls command to give us a listing of a directory rather than just the > single-line listing of a symlink. In that case, this is not a problem any > more since ange-ftp-ls now does "cd foo; ls" rather than "ls foo". So I'd > be happy to install the second patch. I tried the second patch. I think it is much better, and I can agree that to follow symlinks there is meaningless. > To see one of the problems with the idea of following symlinks, try > something like > (insert-directory "/[EMAIL PROTECTED]:/pub" "-lFd") > Of course, there's also the problem where the symlink points to itself. > And also the problem that > (insert-directory "/[EMAIL PROTECTED]:/pub/gnu/winboard" "-lFd") > will not list > lrwxrwxrwx 1 0 0 15 Nov 21 2003 winboard -> > xboard/winboard > but > drwxrwxr-x 2 0 1003 4096 Nov 29 2003 winboard/ > Contrary to what it would have done if we were working locally. > Stefan I think concealing of file's identity is needless and unhelpful. > --- ange-ftp.el 02 oct 2005 11:37:24 -0400 1.74 > +++ ange-ftp.el 02 oct 2005 11:38:44 -0400 > @@ -4481,14 +4481,6 @@ > (defun ange-ftp-insert-directory (file switches &optional wildcard full) > (if (not (ange-ftp-ftp-name (expand-file-name file))) > (ange-ftp-real-insert-directory file switches wildcard full) > - ;; Follow symlinks. > - (let (tem) > - (while (and (not wildcard) > - (stringp (setq tem (file-symlink-p > - (directory-file-name file))))) > - (setq file > - (ange-ftp-expand-symlink > - tem (file-name-directory (directory-file-name file)))))) > (insert > (cond > (wildcard _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel