* Windows Emacs doesn't understand UNIX symbolic link? @ 2008-04-01 4:01 Yang 2008-04-01 15:02 ` William Xu [not found] ` <mailman.9785.1207062149.18990.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 17+ messages in thread From: Yang @ 2008-04-01 4:01 UTC (permalink / raw) To: help-gnu-emacs Hi all, I recently installed emacs on 32bit Windows Vista home premium. I mainly use it to access/edit source code on a remote UNIX machine (through the tramp 2.1.9 package). However one thing that bothers me is that the windows emacs does not seem to undertand UNIX symbolic link. For example, on the remote Unix machine, I have "a.cc", which is a normal file; and also "asl.cc", which is a symbolic link to "a.cc", thus "asl.cc -> a.cc". If I use my windows emacs to access "asl.cc", it can read it correctly. However once you made any changes and save it, things became messed up. "a.cc" didn't get updated, instead you have this: "asl.cc" becomes a normal file and no longer points to "a.cc" "asl.cc~" now is a symbolic link and points to "a.cc" "a.cc" is not changed. The current available versions of precompiled windows emacs at: ftp://ftp.gnu.org/gnu/emacs/windows/ all seem to have this problem. Anyone know what was going on and how to fix this? or could this be a problem with the tramp package? Thanks a lot!! --Yang ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Windows Emacs doesn't understand UNIX symbolic link? 2008-04-01 4:01 Windows Emacs doesn't understand UNIX symbolic link? Yang @ 2008-04-01 15:02 ` William Xu [not found] ` <mailman.9785.1207062149.18990.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 17+ messages in thread From: William Xu @ 2008-04-01 15:02 UTC (permalink / raw) To: help-gnu-emacs Yang <fz15@HPC.MsState.Edu> writes: > Anyone know what was going on and how to fix this? I've never used Windows Vista, so the following is my experience on Windows XP, which probably also applies to Windows Vista. On Windows XP, if you try to access some shared files/directories from a *nix machine, since Windows XP doesn't understand *nix symbolic links, all symbolic links will simply become a copy of the original file, nothing more. My advice is: never edit *nix symbolic links on Windows XP. -- William http://williamxu.net9.org ^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <mailman.9785.1207062149.18990.help-gnu-emacs@gnu.org>]
* Re: Windows Emacs doesn't understand UNIX symbolic link? [not found] ` <mailman.9785.1207062149.18990.help-gnu-emacs@gnu.org> @ 2008-04-01 16:54 ` Yang 2008-04-01 18:57 ` Eli Zaretskii ` (3 more replies) 0 siblings, 4 replies; 17+ messages in thread From: Yang @ 2008-04-01 16:54 UTC (permalink / raw) To: help-gnu-emacs Thanks for sharing the experience. That is a sad news if this is true. I used to use carbon emacs on a mac and that works fine with UNIX file systems. I like the looks and fonts of the carbon emacs. Now I also like the emacs looks and font rendering on vista. Is there any patch around to let the windows emacs understand UNIX symbolic links? I know there used to be a package for emacs to understand windows file shortcuts. On Wed, 2 Apr 2008, William Xu wrote: > Yang <fz15@HPC.MsState.Edu> writes: > >> Anyone know what was going on and how to fix this? > > I've never used Windows Vista, so the following is my experience on > Windows XP, which probably also applies to Windows Vista. > > On Windows XP, if you try to access some shared files/directories from a > *nix machine, since Windows XP doesn't understand *nix symbolic links, > all symbolic links will simply become a copy of the original file, > nothing more. My advice is: never edit *nix symbolic links on Windows > XP. > > -- > William > > http://williamxu.net9.org > > > > ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Windows Emacs doesn't understand UNIX symbolic link? 2008-04-01 16:54 ` Yang @ 2008-04-01 18:57 ` Eli Zaretskii 2008-04-02 2:09 ` William Xu ` (2 subsequent siblings) 3 siblings, 0 replies; 17+ messages in thread From: Eli Zaretskii @ 2008-04-01 18:57 UTC (permalink / raw) To: help-gnu-emacs > 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. It is true that Vista introduced some kind of native symlinks, but from what I hear, their semantics is quite different from Posix symlinks, and in any case, the OS layer that mounts the Unix volume should map Unix symlinks to Vista symlinks before Emacs could make use of them. > I know there used to be a package for emacs to understand windows > file shortcuts. Windows shortcuts are native Windows feature, which is different. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Windows Emacs doesn't understand UNIX symbolic link? 2008-04-01 16:54 ` Yang 2008-04-01 18:57 ` Eli Zaretskii @ 2008-04-02 2:09 ` William Xu [not found] ` <mailman.9816.1207102163.18990.help-gnu-emacs@gnu.org> [not found] ` <mailman.9824.1207116435.18990.help-gnu-emacs@gnu.org> 3 siblings, 0 replies; 17+ messages in thread From: William Xu @ 2008-04-02 2:09 UTC (permalink / raw) To: help-gnu-emacs Yang <fz15@HPC.MsState.Edu> writes: > Thanks for sharing the experience. That is a sad news if this is > true. I used to suffer a lot sharing a svn repo containing symbolic links. > I used to use carbon emacs on a mac and that works fine with UNIX file > systems. Yes, Mac OS X supports symbolic links well. > I like the looks and fonts of the carbon emacs. Now I also like > the emacs looks and font rendering on vista. Is there any patch around > to let the windows emacs understand UNIX symbolic links? It sounds more like a system level problem to me, not specific to emacs. I did a google and find this: http://www.pearlmagik.com/winbolic/ I've not tried it myself, but maybe helpful for you. -- William http://williamxu.net9.org ^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <mailman.9816.1207102163.18990.help-gnu-emacs@gnu.org>]
* Re: Windows Emacs doesn't understand UNIX symbolic link? [not found] ` <mailman.9816.1207102163.18990.help-gnu-emacs@gnu.org> @ 2008-04-02 5:06 ` Yang 0 siblings, 0 replies; 17+ messages in thread From: Yang @ 2008-04-02 5:06 UTC (permalink / raw) To: help-gnu-emacs Thanks very much for your help. I bookmarked that link and would take a look later. I also did fair amount of search on google, looks like it is very difficult for Windows to follow Unix symbolic links (for various reasons). I guess at the mean time I'll just stick with the current emacs on vista and avoid opening any symbolic links on the remote unix machine. On Wed, 2 Apr 2008, William Xu wrote: > Yang <fz15@HPC.MsState.Edu> writes: > >> Thanks for sharing the experience. That is a sad news if this is >> true. > > I used to suffer a lot sharing a svn repo containing symbolic links. > >> I used to use carbon emacs on a mac and that works fine with UNIX file >> systems. > > Yes, Mac OS X supports symbolic links well. > >> I like the looks and fonts of the carbon emacs. Now I also like >> the emacs looks and font rendering on vista. Is there any patch around >> to let the windows emacs understand UNIX symbolic links? > > It sounds more like a system level problem to me, not specific to emacs. > I did a google and find this: > > http://www.pearlmagik.com/winbolic/ > > I've not tried it myself, but maybe helpful for you. > > -- > William > > http://williamxu.net9.org > > > > ^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <mailman.9824.1207116435.18990.help-gnu-emacs@gnu.org>]
* Re: Windows Emacs doesn't understand UNIX symbolic link? [not found] ` <mailman.9824.1207116435.18990.help-gnu-emacs@gnu.org> @ 2008-04-02 6:33 ` Barry Margolin 2008-04-02 7:50 ` Michael Albinus 2008-04-02 17:09 ` Eli Zaretskii 0 siblings, 2 replies; 17+ messages in thread From: Barry Margolin @ 2008-04-02 6:33 UTC (permalink / raw) To: help-gnu-emacs 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? -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group *** ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Windows Emacs doesn't understand UNIX symbolic link? 2008-04-02 6:33 ` Barry Margolin @ 2008-04-02 7:50 ` Michael Albinus 2008-04-02 17:11 ` Eli Zaretskii 2008-04-02 17:09 ` Eli Zaretskii 1 sibling, 1 reply; 17+ messages in thread From: Michael Albinus @ 2008-04-02 7:50 UTC (permalink / raw) To: help-gnu-emacs 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. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Windows Emacs doesn't understand UNIX symbolic link? 2008-04-02 7:50 ` Michael Albinus @ 2008-04-02 17:11 ` Eli Zaretskii 2008-04-03 19:45 ` Michael Albinus 0 siblings, 1 reply; 17+ messages in thread From: Eli Zaretskii @ 2008-04-02 17:11 UTC (permalink / raw) To: help-gnu-emacs > From: Michael Albinus <michael.albinus@gmx.de> > Date: Wed, 02 Apr 2008 09:50:43 +0200 > > 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. Yes, that's what we need: to change make-symbolic-link so that only its native part is ifdef'ed away on systems without S_IFLNK, and the file-handler part is available on all systems. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Windows Emacs doesn't understand UNIX symbolic link? 2008-04-02 17:11 ` Eli Zaretskii @ 2008-04-03 19:45 ` Michael Albinus 0 siblings, 0 replies; 17+ messages in thread From: Michael Albinus @ 2008-04-03 19:45 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 387 bytes --] Eli Zaretskii <eliz@gnu.org> writes: > Yes, that's what we need: to change make-symbolic-link so that only > its native part is ifdef'ed away on systems without S_IFLNK, and the > file-handler part is available on all systems. The appended patch (towards the trunk) shall do the job. I have no build environment for W32; could somebody, please, test it there? Best regards, Michael. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: Type: text/x-patch, Size: 1328 bytes --] *** fileio.c.~1.609.~ 2008-03-29 20:27:38.000000000 +0100 --- fileio.c 2008-04-03 21:37:26.000000000 +0200 *************** *** 2878,2884 **** return Qnil; } - #ifdef S_IFLNK DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3, "FMake symbolic link to file: \nGMake symbolic link to file %s: \np", doc: /* Make a symbolic link to FILENAME, named LINKNAME. --- 2878,2883 ---- *************** *** 2923,2928 **** --- 2922,2928 ---- RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename, linkname, ok_if_already_exists)); + #ifdef S_IFLNK encoded_filename = ENCODE_FILE (filename); encoded_linkname = ENCODE_FILE (linkname); *************** *** 2949,2956 **** } UNGCPRO; return Qnil; ! } #endif /* S_IFLNK */ #ifdef VMS --- 2949,2961 ---- } UNGCPRO; return Qnil; ! ! #else ! UNGCPRO; ! xsignal1 (Qfile_error, build_string ("Symbolic links are not supported")); ! #endif /* S_IFLNK */ + } #ifdef VMS *************** *** 6766,6774 **** defsubr (&Sdelete_file); defsubr (&Srename_file); defsubr (&Sadd_name_to_file); - #ifdef S_IFLNK defsubr (&Smake_symbolic_link); - #endif /* S_IFLNK */ #ifdef VMS defsubr (&Sdefine_logical_name); #endif /* VMS */ --- 6771,6777 ---- ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Windows Emacs doesn't understand UNIX symbolic link? 2008-04-02 6:33 ` Barry Margolin 2008-04-02 7:50 ` Michael Albinus @ 2008-04-02 17:09 ` Eli Zaretskii 2008-04-02 17:27 ` Peter Dyballa [not found] ` <mailman.9884.1207157251.18990.help-gnu-emacs@gnu.org> 1 sibling, 2 replies; 17+ messages in thread From: Eli Zaretskii @ 2008-04-02 17:09 UTC (permalink / raw) To: help-gnu-emacs > From: Barry Margolin <barmar@alum.mit.edu> > Date: Wed, 02 Apr 2008 02:33:44 -0400 > > Did you forget that he said he's using TRAMP, not the Windows filesystem > API? Yes, I failed to notice that, sorry. In that case, I guess a bug report or a feature request to the Tramp maintainer would be in order. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Windows Emacs doesn't understand UNIX symbolic link? 2008-04-02 17:09 ` Eli Zaretskii @ 2008-04-02 17:27 ` Peter Dyballa 2008-04-02 17:54 ` Eli Zaretskii 2008-04-02 18:15 ` Michael Albinus [not found] ` <mailman.9884.1207157251.18990.help-gnu-emacs@gnu.org> 1 sibling, 2 replies; 17+ messages in thread From: Peter Dyballa @ 2008-04-02 17:27 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs Am 02.04.2008 um 19:09 schrieb Eli Zaretskii: >> From: Barry Margolin >> Date: Wed, 02 Apr 2008 02:33:44 -0400 >> >> Did you forget that he said he's using TRAMP, not the Windows >> filesystem >> API? > > Yes, I failed to notice that, sorry. > Why should that make a difference? Although TRAMP sees on the remote UNIX host a sym-link it can present to MS Losedos nothing but some kind of file. -- Greetings Pete Give a man a fish, and you've fed him for a day. Teach him to fish, and you've depleted the lake. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Windows Emacs doesn't understand UNIX symbolic link? 2008-04-02 17:27 ` Peter Dyballa @ 2008-04-02 17:54 ` Eli Zaretskii 2008-04-02 22:12 ` Peter Dyballa 2008-04-02 18:15 ` Michael Albinus 1 sibling, 1 reply; 17+ messages in thread From: Eli Zaretskii @ 2008-04-02 17:54 UTC (permalink / raw) To: help-gnu-emacs > Cc: help-gnu-emacs@gnu.org > From: Peter Dyballa <Peter_Dyballa@Web.DE> > Date: Wed, 2 Apr 2008 19:27:18 +0200 > > > >> Did you forget that he said he's using TRAMP, not the Windows > >> filesystem > >> API? > > > > Yes, I failed to notice that, sorry. > > > > > Why should that make a difference? Although TRAMP sees on the remote > UNIX host a sym-link it can present to MS Losedos nothing but some > kind of file. And what does Tramp present to Emacs on a Unix system? isn't that ``some kind of file'' as well? ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Windows Emacs doesn't understand UNIX symbolic link? 2008-04-02 17:54 ` Eli Zaretskii @ 2008-04-02 22:12 ` Peter Dyballa 2008-04-03 3:12 ` Eli Zaretskii 0 siblings, 1 reply; 17+ messages in thread From: Peter Dyballa @ 2008-04-02 22:12 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs Am 02.04.2008 um 19:54 schrieb Eli Zaretskii: >> Why should that make a difference? Although TRAMP sees on the remote >> UNIX host a sym-link it can present to MS Losedos nothing but some >> kind of file. > > And what does Tramp present to Emacs on a Unix system? isn't that > ``some kind of file'' as well? A file with the character of a sym-link – and UNIX can handle that. On a system that can't distinguish a file from a sym-link it will ask to save the file's original contents it has read via the sym-link as <sym-link>~ and will then ask to save the changed contents under the name of <sym-link>. A system able to handle sym-links won't send such requests to TRAMP, so TRAMP won't do the nonsense described. -- Greetings Pete From error to error, one discovers the entire truth. - Sigmund Freud ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Windows Emacs doesn't understand UNIX symbolic link? 2008-04-02 22:12 ` Peter Dyballa @ 2008-04-03 3:12 ` Eli Zaretskii 0 siblings, 0 replies; 17+ messages in thread From: Eli Zaretskii @ 2008-04-03 3:12 UTC (permalink / raw) To: help-gnu-emacs > Cc: help-gnu-emacs@gnu.org > From: Peter Dyballa <Peter_Dyballa@Web.DE> > Date: Thu, 3 Apr 2008 00:12:39 +0200 > > > Am 02.04.2008 um 19:54 schrieb Eli Zaretskii: > >> Why should that make a difference? Although TRAMP sees on the remote > >> UNIX host a sym-link it can present to MS Losedos nothing but some > >> kind of file. > > > > And what does Tramp present to Emacs on a Unix system? isn't that > > ``some kind of file'' as well? > > > A file with the character of a sym-link – and UNIX can handle that. For remote files, Tramp handles that, not the local OS. If the remote file is a symlink, I'd expect Tramp to resolve it and bring to Emacs the contents of the target of the link. > On a system that can't distinguish a file from a sym-link For a remote file, it's Tramp that needs to distinguish between them. The file-symlink-p primitive should hand the file name to Tramp, for that to happen, as it probably does on Unix. > A system able to handle sym-links won't send such requests to TRAMP, > so TRAMP won't do the nonsense described. Are you sure that Tramp does such nonsense on Unix? ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Windows Emacs doesn't understand UNIX symbolic link? 2008-04-02 17:27 ` Peter Dyballa 2008-04-02 17:54 ` Eli Zaretskii @ 2008-04-02 18:15 ` Michael Albinus 1 sibling, 0 replies; 17+ messages in thread From: Michael Albinus @ 2008-04-02 18:15 UTC (permalink / raw) To: Peter Dyballa; +Cc: help-gnu-emacs Peter Dyballa <Peter_Dyballa@Web.DE> writes: > Why should that make a difference? Although TRAMP sees on the remote > UNIX host a sym-link it can present to MS Losedos nothing but some > kind of file. Tramp is able to create symlinks, and to follow symlinks on remote UNIX filesystems. I've checked it with the workaround I've mentioned the other message, on a W32 machine. > Greetings > > Pete Best regards, Michael. ^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <mailman.9884.1207157251.18990.help-gnu-emacs@gnu.org>]
* Re: Windows Emacs doesn't understand UNIX symbolic link? [not found] ` <mailman.9884.1207157251.18990.help-gnu-emacs@gnu.org> @ 2008-04-02 23:28 ` Jason Rumney 0 siblings, 0 replies; 17+ messages in thread From: Jason Rumney @ 2008-04-02 23:28 UTC (permalink / raw) To: help-gnu-emacs > Why should that make a difference? Although TRAMP sees on the remote > UNIX host a sym-link it can present to MS Losedos nothing but some > kind of file. Tramp doesn't present anything to Windows. It presents things directly to Emacs. ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2008-04-03 19:45 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-04-01 4:01 Windows Emacs doesn't understand UNIX symbolic link? Yang 2008-04-01 15:02 ` William Xu [not found] ` <mailman.9785.1207062149.18990.help-gnu-emacs@gnu.org> 2008-04-01 16:54 ` Yang 2008-04-01 18:57 ` Eli Zaretskii 2008-04-02 2:09 ` William Xu [not found] ` <mailman.9816.1207102163.18990.help-gnu-emacs@gnu.org> 2008-04-02 5:06 ` Yang [not found] ` <mailman.9824.1207116435.18990.help-gnu-emacs@gnu.org> 2008-04-02 6:33 ` Barry Margolin 2008-04-02 7:50 ` Michael Albinus 2008-04-02 17:11 ` Eli Zaretskii 2008-04-03 19:45 ` Michael Albinus 2008-04-02 17:09 ` Eli Zaretskii 2008-04-02 17:27 ` Peter Dyballa 2008-04-02 17:54 ` Eli Zaretskii 2008-04-02 22:12 ` Peter Dyballa 2008-04-03 3:12 ` Eli Zaretskii 2008-04-02 18:15 ` Michael Albinus [not found] ` <mailman.9884.1207157251.18990.help-gnu-emacs@gnu.org> 2008-04-02 23:28 ` Jason Rumney
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.