|--==> "KG" == Kai Gro <[EMAIL PROTECTED]> writes:
KG> Steve Youngs <[EMAIL PROTECTED]> writes:
>>No, not at all. I want...
>>
>>C-x C-f /[jrl@frumple] (to get a dired listing of jrl's $HOME on frumple)
>>M-x eshell
>>(make-symbolic-link "/path/to/file1" "/path/to/file2")
>>
>>Where "file1" and "file2" are _both_ on frumple.
KG> I see. Now I understand your request. But I don't like it :-)
KG> That would mean that the behavior of make-symbolic-link should depend
KG> on the variable default-directory. No, this is not a good idea, I
KG> think.
KG> My suggestion is to interpret the source of the link (ie, LINKNAME,
KG> the second arg of make-symbolic-link) as a filename and to interpret
KG> the target of the link (ie, FILENAME, the first arg) as a string.
Hey, whoa, that's not right, you've got the args the wrong way
around...
,----[ C-h f make-symbolic-link RET ]
| `make-symbolic-link' is an interactive built-in function
| (make-symbolic-link FILENAME LINKNAME &optional OK-IF-ALREADY-EXISTS)
|
| Documentation:
| Make a symbolic link to FILENAME, named LINKNAME. Both args 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.
| This happens for interactive use with M-x.
`----
KG> This way, you can say (make-symbolic-link "xyzzy"
KG> "/[user@host]/path/to/file") and it will always create a symlink
KG> on host, regardless of default-directory.
So this should be...
(make-symbolic-link "/[user@host]/path/to/file" "xyzzy")
And default-directory _should_ play a part for at least two reasons:
1) Making a "relative" symbolic link.
2) A symlink should _never_ span different hosts.
IMO, what should happen in the above example is:
Tramp should connect to host if not already connected, setting
default-directory to '/[user@host]/path/to/' if not connected,
or './' if already connected. Then test to see if the OS on
host supports symlinks (signalling the appropriate error if
not). Do the normal 'make-symbolic-link' checks. Strip off
any Tramp filename parts (the "/[...]" bit) and write the
symlink to disc.
So that would make the correct syntax:
(make-symbolic-link "/[method/user@host]/path/to/filename"
"/path/to/symlink-name")
And I'd be very happy with that. :-)
--
|---<Steve Youngs>---------------<GnuPG KeyID: 10D5C9C5>---|
| XEmacs - It's not just an editor. |
| It's a way of life. |
|------------------------------------<[EMAIL PROTECTED]>---|
_______________________________________________
Tramp-devel mailing list
[EMAIL PROTECTED]
http://mail.freesoftware.fsf.org/mailman/listinfo/tramp-devel