[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tramp and cygwin-mount
From: |
Kai Großjohann |
Subject: |
Re: tramp and cygwin-mount |
Date: |
Thu, 05 Dec 2002 10:29:09 +0100 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) |
Jason Dufair <address@hidden> writes:
> I've decided to try and get my NTEmacs working nicely once and for
> all. This includes, amongst other things, getting tramp and
> cygwin-mount to play nicely together. Currently, when tramp connects
> to the remote host (via sshx in my case), it tries to test for the
> existence of several paths/files, but somehow, the paths/files end up
> getting expanded by the cygwin-mount package and try to test for local
> cygwin dirs on the remote host.
>
> I've figured out how to get the emacs debugger working and think I've
> found where the two get entangled. About 10 lines into
> tramp-handle-expand-file-name, there is a call to
> (tramp-run-real-handler 'expand-file-name (list name nil)). In the
> debugger, it shows that expand-file-name has a hook which calls
> cygwin-mount-name-hook-function which then bungles up the file name
> (i.e. ~ expands to my home directory on the local machine even though
> tramp is ssh'ed into a remote machine and is sending commands over
> there).
>
> This is where the limits of my understanding of tramp and emacs and
> lisp hit the wall. Is there any way to allow tramp to make the call
> to expand-file-name without the cygwin hook?
IMHO, cygwin-mount should abstain from handling these files. But
maybe it is easier to include a simple workaround for this in Tramp;
then we don't have to wait for cygwin-mount to be fixed.
What's the value of file-name-handler-alist? Then I will extend
tramp-run-real-handler to remove the cygwin-mount entry.
Hm. I've now looked at the cygwin-mount source code, and maybe the
following patch does something useful? Please try it and tell me
what you see.
cvs server: Diffing .
cvs server: Diffing contrib
cvs server: Diffing lisp
Index: lisp/ChangeLog
===================================================================
RCS file: /cvsroot/tramp/tramp/lisp/ChangeLog,v
retrieving revision 2.260
diff -u -r2.260 ChangeLog
--- lisp/ChangeLog 5 Dec 2002 09:21:05 -0000 2.260
+++ lisp/ChangeLog 5 Dec 2002 09:28:27 -0000
@@ -1,5 +1,11 @@
2002-12-05 Kai Großjohann <address@hidden>
+ * tramp.el (tramp-run-real-handler)
+ (tramp-completion-run-real-handler): Disable cygwin-mount, too.
+ All files handled by Tramp are on Unix systems, where
+ cygwin-mount is not useful. (Ie, remote Cygwin systems are not
+ supported.)
+
* tramp-vc.el (tramp-vc-do-command): Ensure that `okstatus' is an
integer before using `<' on it.
(tramp-vc-do-command-new): Pass relative filename as arg to remote
Index: lisp/tramp.el
===================================================================
RCS file: /cvsroot/tramp/tramp/lisp/tramp.el,v
retrieving revision 2.258
diff -u -r2.258 tramp.el
--- lisp/tramp.el 30 Nov 2002 22:33:34 -0000 2.258
+++ lisp/tramp.el 5 Dec 2002 09:28:39 -0000
@@ -3282,10 +3282,13 @@
First arg specifies the OPERATION, second arg is a list of arguments to
pass to the OPERATION."
(let* ((inhibit-file-name-handlers
- (cons 'tramp-file-name-handler
- (cons 'tramp-completion-file-name-handler
- (and (eq inhibit-file-name-operation operation)
- inhibit-file-name-handlers))))
+ `(tramp-file-name-handler
+ tramp-completion-file-name-handler
+ cygwin-mount-name-hook-function
+ cygwin-mount-map-drive-hook-function
+ .
+ ,(and (eq inhibit-file-name-operation operation)
+ inhibit-file-name-handlers)))
(inhibit-file-name-operation operation))
(apply operation args)))
@@ -3298,9 +3301,12 @@
First arg specifies the OPERATION, second arg is a list of arguments to
pass to the OPERATION."
(let* ((inhibit-file-name-handlers
- (cons 'tramp-completion-file-name-handler
- (and (eq inhibit-file-name-operation operation)
- inhibit-file-name-handlers)))
+ `(tramp-completion-file-name-handler
+ cygwin-mount-name-hook-function
+ cygwin-mount-map-drive-hook-function
+ .
+ ,(and (eq inhibit-file-name-operation operation)
+ inhibit-file-name-handlers)))
(inhibit-file-name-operation operation))
(apply operation args)))
cvs server: Diffing test
cvs server: Diffing texi
cvs server: Diffing tramp2
--
~/.signature is: umop ap!sdn (Frank Nobis)