unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* (fboundp 'make-symbolic-link) on w32
@ 2008-07-17 23:21 Lennart Borgman (gmail)
  2008-07-18  2:17 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Lennart Borgman (gmail) @ 2008-07-17 23:21 UTC (permalink / raw)
  To: Emacs Devel

returns t, but when I just tried to use it on Windows XP it gives me

   File error: "Symbolic links are not supported"

That seems a bit inconvenient to me. Should it really be this way?




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (fboundp 'make-symbolic-link) on w32
  2008-07-17 23:21 (fboundp 'make-symbolic-link) on w32 Lennart Borgman (gmail)
@ 2008-07-18  2:17 ` Stefan Monnier
  2008-07-18  8:12   ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2008-07-18  2:17 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

> returns t, but when I just tried to use it on Windows XP it gives me
>   File error: "Symbolic links are not supported"
> That seems a bit inconvenient to me. Should it really be this way?

Yes: make-symbolic-link will work for some files, just not all.
E.g. it may work for files accessed via Tramp.  So the only way to
figure out if it works is by trying it.


        Stefan




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (fboundp 'make-symbolic-link) on w32
  2008-07-18  2:17 ` Stefan Monnier
@ 2008-07-18  8:12   ` Lennart Borgman (gmail)
  2008-07-18 19:37     ` Michael Albinus
  2008-07-20 15:40     ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Lennart Borgman (gmail) @ 2008-07-18  8:12 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs Devel

Stefan Monnier wrote:
>> returns t, but when I just tried to use it on Windows XP it gives me
>>   File error: "Symbolic links are not supported"
>> That seems a bit inconvenient to me. Should it really be this way?
> 
> Yes: make-symbolic-link will work for some files, just not all.
> E.g. it may work for files accessed via Tramp.  So the only way to
> figure out if it works is by trying it.

Thanks, I see. Then I suggest adding a comment about this to the doc 
string, something like:


Make a symbolic link to filename, named linkname.
Both args must be strings.
Signals a `file-already-exists' error if a file linkname already exists
unless optional third argument ok-if-already-exists is non-nil.
A number as third arg means request confirmation if linkname already exists.
Confirmation is also requested for interactive use with M-x.

Note that symbolic link does not exist on all platform even though this 
function still exist for use via Tramp.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (fboundp 'make-symbolic-link) on w32
  2008-07-18  8:12   ` Lennart Borgman (gmail)
@ 2008-07-18 19:37     ` Michael Albinus
  2008-07-20 15:40     ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Albinus @ 2008-07-18 19:37 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Stefan Monnier, Emacs Devel

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> Note that symbolic link does not exist on all platform even though
> this function still exist for use via Tramp.
                                    ^^^^^^^^^
                                    of remote files.

Btw, there is even the reverse case: `make-symbolic-link' works for
local files, but it doesn't work for remote files (for example, when smb
access has been used).

Best regards, Michael.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (fboundp 'make-symbolic-link) on w32
  2008-07-18  8:12   ` Lennart Borgman (gmail)
  2008-07-18 19:37     ` Michael Albinus
@ 2008-07-20 15:40     ` Eli Zaretskii
  2008-07-20 16:05       ` Lennart Borgman (gmail)
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2008-07-20 15:40 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: monnier, emacs-devel

> Date: Fri, 18 Jul 2008 10:12:36 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> Cc: Emacs Devel <emacs-devel@gnu.org>
> 
> Note that symbolic link does not exist on all platform even though this 
> function still exist for use via Tramp.

That's something for the manual, not for a doc string.

Besides, Windows Vista introduced support for symlinks, so if someone
volunteers to code that in Emacs, w32 will have it as well.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (fboundp 'make-symbolic-link) on w32
  2008-07-20 15:40     ` Eli Zaretskii
@ 2008-07-20 16:05       ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 6+ messages in thread
From: Lennart Borgman (gmail) @ 2008-07-20 16:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, emacs-devel

Eli Zaretskii wrote:
>> Date: Fri, 18 Jul 2008 10:12:36 +0200
>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> Cc: Emacs Devel <emacs-devel@gnu.org>
>>
>> Note that symbolic link does not exist on all platform even though this 
>> function still exist for use via Tramp.
> 
> That's something for the manual, not for a doc string.

Why not in the doc string? The problem here is that the function exists 
on all platform which leads those who just read the doc string into 
coding things like

   (when (fboundp 'make-symbolic-link)
      (make-symbolic-link ...))

which makes the call to make-symbolic-link on all platforms. In the code 
where I saw this there were no error checking around this.

> Besides, Windows Vista introduced support for symlinks, so if someone
> volunteers to code that in Emacs, w32 will have it as well.

Is there any Emacs user that runs Vista ;-)

(Ah, yes I know.)




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-20 16:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-17 23:21 (fboundp 'make-symbolic-link) on w32 Lennart Borgman (gmail)
2008-07-18  2:17 ` Stefan Monnier
2008-07-18  8:12   ` Lennart Borgman (gmail)
2008-07-18 19:37     ` Michael Albinus
2008-07-20 15:40     ` Eli Zaretskii
2008-07-20 16:05       ` Lennart Borgman (gmail)

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).