I'm still generally unable to use ediff with tramp file specs (I asked back
in July about it) I believe because ediff doesn't realize filenames like
"/r:dolphin.mojam.com:.emacs") are remote files and attempts to pass them
directly to diff without first copying the file to local temp storage.
I found the place in ediff to hook into tramp, but don't know what to call
to reliably determine if a file is a remote tramp file. In ediff-init.el
ediff-file-remote-p is defined as
(or (fboundp 'ediff-file-remote-p) ; user supplied his own function: use it
(defun ediff-file-remote-p (file-name)
(car (cond ((featurep 'efs-auto) (efs-ftp-path file-name))
((fboundp 'file-remote-p) (file-remote-p file-name))
(t (require 'ange-ftp)
;; Can happen only in Emacs, since XEmacs has file-remote-p
(ange-ftp-ftp-name file-name))))))
I overrode the above defun in ~/.emacs with
(defun ediff-file-remote-p (file-name)
(or (equal "/r:" (substring file-name 0 3))
(equal "/r@" (substring file-name 0 3))))
which seems to work in the one case I tried. Ideally, I'd like to simply
update ediff-file-remote-p with something like
((featurep 'tramp) (cons (not (not (tramp-tramp-file-p file-name))) nil)
and submit a patch to the ediff maintainers but tramp-tramp-file-p doesn't
seem to work correctly. It returns 0 for both of the following cases:
(tramp-tramp-file-p "/r:dolphin.mojam.com:delq.mc")
(tramp-tramp-file-p "/r@scp:dolphin.mojam.com:delq.mc")
which seemed pretty odd to me. Any clues about what the real solution
should be?
--
Skip Montanaro ([EMAIL PROTECTED])
Support the Mojam.com Affiliates Program: http://www.mojam.com/affl/
(847)971-7098