aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2016-09-19 14:21:35 +0200
committerMichael Albinus2016-09-19 14:21:35 +0200
commit83fbb3a6dd75e01a768cb6b3348b7c947711ee46 (patch)
tree3501f12ebd934874c98c82e08bf03488387b4471
parent7fa96cb5ef8c8464496688e88c1b97211a820d79 (diff)
downloademacs-83fbb3a6dd75e01a768cb6b3348b7c947711ee46.tar.gz
emacs-83fbb3a6dd75e01a768cb6b3348b7c947711ee46.zip
Fix a problem with Tramp when the temporary dir isn't C:/Temp on w32
* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name): Don't use `tramp-drop-volume-letter' any longer, it causes collateral damages. Reported by Chris Zheng <chriszheng99@gmail.com>.
-rw-r--r--lisp/net/tramp-sh.el45
1 files changed, 43 insertions, 2 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index b6aa3a7c619..a7ac060f5be 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2809,8 +2809,7 @@ the result will be a local, non-Tramp, file name."
2809 (setq name (concat (file-name-as-directory dir) name))) 2809 (setq name (concat (file-name-as-directory dir) name)))
2810 ;; If connection is not established yet, run the real handler. 2810 ;; If connection is not established yet, run the real handler.
2811 (if (not (tramp-connectable-p name)) 2811 (if (not (tramp-connectable-p name))
2812 (tramp-drop-volume-letter 2812 (tramp-run-real-handler 'expand-file-name (list name nil))
2813 (tramp-run-real-handler 'expand-file-name (list name nil)))
2814 ;; Dissect NAME. 2813 ;; Dissect NAME.
2815 (with-parsed-tramp-file-name name nil 2814 (with-parsed-tramp-file-name name nil
2816 (unless (tramp-run-real-handler 'file-name-absolute-p (list localname)) 2815 (unless (tramp-run-real-handler 'file-name-absolute-p (list localname))
@@ -5727,14 +5726,18 @@ function cell is returned to be applied on a buffer."
5727;; * Don't use globbing for directories with many files, as this is 5726;; * Don't use globbing for directories with many files, as this is
5728;; likely to produce long command lines, and some shells choke on 5727;; likely to produce long command lines, and some shells choke on
5729;; long command lines. 5728;; long command lines.
5729;;
5730;; * Don't search for perl5 and perl. Instead, only search for perl and 5730;; * Don't search for perl5 and perl. Instead, only search for perl and
5731;; then look if it's the right version (with `perl -v'). 5731;; then look if it's the right version (with `perl -v').
5732;;
5732;; * When editing a remote CVS controlled file as a different user, VC 5733;; * When editing a remote CVS controlled file as a different user, VC
5733;; gets confused about the file locking status. Try to find out why 5734;; gets confused about the file locking status. Try to find out why
5734;; the workaround doesn't work. 5735;; the workaround doesn't work.
5736;;
5735;; * Allow out-of-band methods as _last_ multi-hop. Open a connection 5737;; * Allow out-of-band methods as _last_ multi-hop. Open a connection
5736;; until the last but one hop via `start-file-process'. Apply it 5738;; until the last but one hop via `start-file-process'. Apply it
5737;; also for ftp and smb. 5739;; also for ftp and smb.
5740;;
5738;; * WIBNI if we had a command "trampclient"? If I was editing in 5741;; * WIBNI if we had a command "trampclient"? If I was editing in
5739;; some shell with root privileges, it would be nice if I could 5742;; some shell with root privileges, it would be nice if I could
5740;; just call 5743;; just call
@@ -5756,22 +5759,60 @@ function cell is returned to be applied on a buffer."
5756;; reasonably unproblematic. And maybe trampclient should have some 5759;; reasonably unproblematic. And maybe trampclient should have some
5757;; way of passing credentials, like by using an SSL socket or 5760;; way of passing credentials, like by using an SSL socket or
5758;; something. (David Kastrup) 5761;; something. (David Kastrup)
5762;;
5759;; * Reconnect directly to a compliant shell without first going 5763;; * Reconnect directly to a compliant shell without first going
5760;; through the user's default shell. (Pete Forman) 5764;; through the user's default shell. (Pete Forman)
5765;;
5761;; * How can I interrupt the remote process with a signal 5766;; * How can I interrupt the remote process with a signal
5762;; (interrupt-process seems not to work)? (Markus Triska) 5767;; (interrupt-process seems not to work)? (Markus Triska)
5768;;
5763;; * Avoid the local shell entirely for starting remote processes. If 5769;; * Avoid the local shell entirely for starting remote processes. If
5764;; so, I think even a signal, when delivered directly to the local 5770;; so, I think even a signal, when delivered directly to the local
5765;; SSH instance, would correctly be propagated to the remote process 5771;; SSH instance, would correctly be propagated to the remote process
5766;; automatically; possibly SSH would have to be started with 5772;; automatically; possibly SSH would have to be started with
5767;; "-t". (Markus Triska) 5773;; "-t". (Markus Triska)
5774;;
5768;; * It makes me wonder if tramp couldn't fall back to ssh when scp 5775;; * It makes me wonder if tramp couldn't fall back to ssh when scp
5769;; isn't on the remote host. (Mark A. Hershberger) 5776;; isn't on the remote host. (Mark A. Hershberger)
5777;;
5770;; * Use lsh instead of ssh. (Alfred M. Szmidt) 5778;; * Use lsh instead of ssh. (Alfred M. Szmidt)
5779;;
5771;; * Optimize out-of-band copying when both methods are scp-like (not 5780;; * Optimize out-of-band copying when both methods are scp-like (not
5772;; rsync). 5781;; rsync).
5782;;
5773;; * Keep a second connection open for out-of-band methods like scp or 5783;; * Keep a second connection open for out-of-band methods like scp or
5774;; rsync. 5784;; rsync.
5785;;
5775;; * Implement completion for "/method:user@host:~<abc> TAB". 5786;; * Implement completion for "/method:user@host:~<abc> TAB".
5787;;
5788;; * I think you could get the best of both worlds by using an
5789;; approach similar to Tramp but running a little tramp-daemon on
5790;; the other end, such that we can use a more efficient
5791;; communication protocol (e.g. when saving a file we could locally
5792;; diff it against the last version (of which the remote daemon
5793;; would also keep a copy), and then only send the diff).
5794;;
5795;; This said, even using such a daemon it might be difficult to get
5796;; good performance: part of the problem is the number of
5797;; round-trips. E.g. when saving a file we have to check if the
5798;; file was modified in the mean time and whether saving into a new
5799;; inode would change the owner (etc...), which each require a
5800;; round-trip. To get rid of these round-trips, we'd have to
5801;; shortcut this code and delegate the higher-level "save file"
5802;; operation to the remote server, which then has to perform those
5803;; tasks but still obeying the locally set customizations about how
5804;; to do each one of those tasks.
5805;;
5806;; We could either put higher-level ops in there (like
5807;; `save-buffer'), which implies replicating the whole `save-buffer'
5808;; behavior, which is a lot of work and likely to be not 100%
5809;; faithful.
5810;;
5811;; Or we could introduce new low-level ops that are asynchronous,
5812;; and then rewrite save-buffer to use them. IOW save-buffer would
5813;; start with a bunch of calls like `start-getting-file-attributes'
5814;; which could immediately be passed on to the remote side, and
5815;; later on checks the return value of those calls as and when
5816;; needed. (Stefan Monnier)
5776 5817
5777;;; tramp-sh.el ends here 5818;;; tramp-sh.el ends here