help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows Emacs doesn't understand UNIX symbolic link?


From: Michael Albinus
Subject: Re: Windows Emacs doesn't understand UNIX symbolic link?
Date: Wed, 02 Apr 2008 09:50:43 +0200
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (hpux)

Barry Margolin <barmar@alum.mit.edu> writes:

> In article <mailman.9824.1207116435.18990.help-gnu-emacs@gnu.org>,
>  Eli Zaretskii <eliz@gnu.org> wrote:
>
>> > From: Yang <fz15@HPC.MsState.Edu>
>> > Date: Tue, 1 Apr 2008 11:54:35 -0500
>> > 
>> > Is there any patch around to let the windows emacs understand UNIX
>> > symbolic links?
>> 
>> Not that I know of, and neither can I imagine how an Emacs patch could
>> cure a malady of the operating system: for symlinks to work on
>> Windows, the Windows filesystem needs to do something sensible with
>> symlinks, because even if the symlink is on a Unix disk, Emacs
>> accesses it through Windows file I/O APIs, and those simply don't
>> support symlinks.
>
> Did you forget that he said he's using TRAMP, not the Windows filesystem 
> API?

The problem is not Tramp in this case. If I try to create a symbolic
link in a remote directory, I get the error

(void-function make-symbolic-link)

And indeed, this function does not exist for W32 systems; see the
check in fileio.c:

#ifdef S_IFLNK
DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3,
...

Eli: do you see a chance to enable that function for W32 systems? It
should first check for a file name handler (as it does now), and
_then_ check whether the native functionality can be used.

A rude workaround would be

(defalias 'make-symbolic-link 'tramp-handle-make-symbolic-link)

But it is dangerous; because it fails on non-remote directories.

Best regards, Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]