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

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

remote vs local symlinking


From: Tom_Roche
Subject: remote vs local symlinking
Date: Tue, 20 Mar 2001 13:47:04 -0500

Eli Zaretskii <address@hidden> Mon, 19 Mar 2001 09:27:53 +0200
>>> Windows isn't Unix, even if tramp wants us to believe it is ;-)

On Mon, 19 Mar 2001 address@hidden wrote:
>> But the point of tramp is to make the 'platform' (the local host)
>> less relevant (if not irrelevant). Why should it matter what
>> Windows can or can't do, as long as it can run a session on a
>> remote host?

Eli Zaretskii <address@hidden> Tue, 20 Mar 2001 11:18:21 +0200
> I'm not against the change in principle. What I'm saying is that
> such a change should consider all the possible uses of
> make-symbolic-link, and address them.

I can agree with that. Perhaps you can agree that it's a bit
"simple-minded" to seek to test whether a remote OS can perform an
operation by testing whether the local client (or its OS) can perform
that operation? or to constrain a remote session based on local
capabilities?

> I tried to explain why: making a simple-minded change might break
> Emacs elsewhere.

Innes' suggestion (allowing the capability, but throwing an error if
it can't complete) seems more sophisticated than the status quo, or
what I understand to be your alternative. Is Emacs so brittle that
throwing an error would break it?

And, in case I haven't mentioned it here: his code works, for me,
within a tramp session. Indentation reduced for mail:

; Andrew Innes <address@hidden> 18 Mar 2001 15:30:12 +0000

(if (not (fboundp 'make-symbolic-link))
(defun make-symbolic-link
  (filename linkname &optional ok-if-already-exists)

  "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."

(interactive 
  "FMake symbolic link to file: \nFMake symbolic link to file %s: \np")
(let ((handler (find-file-name-handler filename 'make-symbolic-link)))
   (if handler
       (funcall handler 'make-symbolic-link
                filename linkname ok-if-already-exists)
       (error "Cannot make symbolic link")))))

YMMV, address@hidden



reply via email to

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