Mercurial > emacs
comparison lisp/net/tramp-gw.el @ 111788:8e746f396237
* net/tramp.el (tramp-local-host-regexp): Add "localhost6".
(tramp-file-name-port): Check also for `tramp-default-port'.
(tramp-get-connection-name): New defun.
(tramp-get-connection-process): Use it.
(tramp-debug-message): Extend function exclude list.
(tramp-drop-volume-letter): Fix doc string.
* net/tramp-cmds.el: Remove solved todo item.
* net/tramp-efs.el:
* net/tramp-ftp.el:
* net/tramp-gvfs.el:
* net/tramp-gw.el:
* net/tramp-imap.el:
* net/tramp-smb.el: Fix regexps added to `tramp-default-method-alist'
and `tramp-default-user-alist', respectively.
* net/tramp-gw.el (tramp-gw-open-connection): Use
`tramp-get-connection-name' and `tramp-get-connection-buffer'.
* net/tramp-imap.el (tramp-imap-make-iht): Use just
`tramp-file-name-port'.
* net/tramp-sh.el (tramp-methods): Add recursive options to "pscp"
and "psftp". Exchange "%k" marker with options.
(tramp-do-copy-or-rename-file, tramp-sh-handle-file-local-copy):
Compute size of link target.
(tramp-do-copy-or-rename-file-out-of-band). Move setting of
`tramp-current-*' up due to gateway methods. Optimze computing of
copy arguments. Use `tramp-get-connection-name' and
`tramp-get-connection-buffer'. Improve debug messages.
(tramp-compute-multi-hops): Remove port determination.
(tramp-maybe-open-connection): Use `tramp-get-connection-name'.
* net/trampver.el: Update release number.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Thu, 02 Dec 2010 20:34:31 +0100 |
parents | 073caec7510f |
children | 209df3f0dcc6 |
comparison
equal
deleted
inserted
replaced
111787:4ba82556d7dd | 111788:8e746f396237 |
---|---|
42 ;; Currently, XEmacs supports this. | 42 ;; Currently, XEmacs supports this. |
43 (eval-when-compile | 43 (eval-when-compile |
44 (when (featurep 'xemacs) | 44 (when (featurep 'xemacs) |
45 (byte-compiler-options (warnings (- unused-vars))))) | 45 (byte-compiler-options (warnings (- unused-vars))))) |
46 | 46 |
47 ;; We don't add the following methods to `tramp-methods', in order to | |
48 ;; exclude them from file name completion. | |
49 | |
47 ;; Define HTTP tunnel method ... | 50 ;; Define HTTP tunnel method ... |
48 ;;;###tramp-autoload | 51 ;;;###tramp-autoload |
49 (defconst tramp-gw-tunnel-method "tunnel" | 52 (defconst tramp-gw-tunnel-method "tunnel" |
50 "*Method to connect HTTP gateways.") | 53 "*Method to connect HTTP gateways.") |
51 | 54 |
67 (defvar socks-username (user-login-name)) | 70 (defvar socks-username (user-login-name)) |
68 (defvar socks-server | 71 (defvar socks-server |
69 (list "Default server" "socks" tramp-gw-default-socks-port 5)) | 72 (list "Default server" "socks" tramp-gw-default-socks-port 5)) |
70 | 73 |
71 ;; Add a default for `tramp-default-user-alist'. Default is the local user. | 74 ;; Add a default for `tramp-default-user-alist'. Default is the local user. |
72 (add-to-list 'tramp-default-user-alist | 75 (add-to-list |
73 `(,tramp-gw-tunnel-method nil ,(user-login-name))) | 76 'tramp-default-user-alist |
74 (add-to-list 'tramp-default-user-alist | 77 (list (concat "\\`" |
75 `(,tramp-gw-socks-method nil ,(user-login-name))) | 78 (regexp-opt (list tramp-gw-tunnel-method tramp-gw-socks-method)) |
79 "\\'") | |
80 nil (user-login-name))) | |
76 | 81 |
77 ;; Internal file name functions and variables. | 82 ;; Internal file name functions and variables. |
78 | 83 |
79 (defvar tramp-gw-vector nil | 84 (defvar tramp-gw-vector nil |
80 "Keeps the remote host identification. Needed for Tramp messages.") | 85 "Keeps the remote host identification. Needed for Tramp messages.") |
192 | 197 |
193 ;; Open SOCKS process. | 198 ;; Open SOCKS process. |
194 (setq tramp-gw-gw-proc | 199 (setq tramp-gw-gw-proc |
195 (funcall | 200 (funcall |
196 socks-function | 201 socks-function |
197 (tramp-buffer-name gw-vec) | 202 (tramp-get-connection-name gw-vec) |
198 (tramp-get-buffer gw-vec) | 203 (tramp-get-connection-buffer gw-vec) |
199 (tramp-file-name-real-host target-vec) | 204 (tramp-file-name-real-host target-vec) |
200 (tramp-file-name-port target-vec))) | 205 (tramp-file-name-port target-vec))) |
201 (set-process-sentinel tramp-gw-gw-proc 'tramp-gw-gw-proc-sentinel) | 206 (set-process-sentinel tramp-gw-gw-proc 'tramp-gw-gw-proc-sentinel) |
202 (tramp-compat-set-process-query-on-exit-flag tramp-gw-gw-proc nil) | 207 (tramp-compat-set-process-query-on-exit-flag tramp-gw-gw-proc nil) |
203 (tramp-message | 208 (tramp-message |
322 ;;; TODO: | 327 ;;; TODO: |
323 | 328 |
324 ;; * Provide descriptive Commentary. | 329 ;; * Provide descriptive Commentary. |
325 ;; * Enable it for several gateway processes in parallel. | 330 ;; * Enable it for several gateway processes in parallel. |
326 | 331 |
327 ;; arch-tag: 277e3a81-fdee-40cf-9e6b-59626292a5e0 | |
328 ;;; tramp-gw.el ends here | 332 ;;; tramp-gw.el ends here |