diff options
| author | Michael Albinus | 2011-07-01 11:14:31 +0200 |
|---|---|---|
| committer | Michael Albinus | 2011-07-01 11:14:31 +0200 |
| commit | 36b148cf16f468ffb7731c0f1e0c49ceb8a7deb0 (patch) | |
| tree | 5c6c15a274c78433afee5fa9b95ad84f41e6fbd5 | |
| parent | f3078a00412e29aac774f9a6780963313d4aebc9 (diff) | |
| download | emacs-36b148cf16f468ffb7731c0f1e0c49ceb8a7deb0.tar.gz emacs-36b148cf16f468ffb7731c0f1e0c49ceb8a7deb0.zip | |
* net/tramp.el (tramp-encoding-command-interactive): New defcustom.
* net/tramp-sh.el (tramp-maybe-open-connection): Use it.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 8 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 10 |
3 files changed, 22 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ea317a1d72e..4740b9ff3dc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-07-01 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp.el (tramp-encoding-command-interactive): New defcustom. | ||
| 4 | |||
| 5 | * net/tramp-sh.el (tramp-maybe-open-connection): Use it. | ||
| 6 | |||
| 1 | 2011-07-01 Martin Rudalics <rudalics@gmx.at> | 7 | 2011-07-01 Martin Rudalics <rudalics@gmx.at> |
| 2 | 8 | ||
| 3 | * window.el (same-window-buffer-names, same-window-regexps) | 9 | * window.el (same-window-buffer-names, same-window-regexps) |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index e340ddc6cb0..acba48b8374 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -4291,10 +4291,14 @@ connection if a previous connection has died for some reason." | |||
| 4291 | ;; This must be done in order to avoid our file name handler. | 4291 | ;; This must be done in order to avoid our file name handler. |
| 4292 | (p (let ((default-directory | 4292 | (p (let ((default-directory |
| 4293 | (tramp-compat-temporary-file-directory))) | 4293 | (tramp-compat-temporary-file-directory))) |
| 4294 | (start-process | 4294 | (apply |
| 4295 | 'start-process | ||
| 4295 | (tramp-get-connection-name vec) | 4296 | (tramp-get-connection-name vec) |
| 4296 | (tramp-get-connection-buffer vec) | 4297 | (tramp-get-connection-buffer vec) |
| 4297 | tramp-encoding-shell)))) | 4298 | (if tramp-encoding-command-interactive |
| 4299 | (list tramp-encoding-shell | ||
| 4300 | tramp-encoding-command-interactive) | ||
| 4301 | (list tramp-encoding-shell)))))) | ||
| 4298 | 4302 | ||
| 4299 | (tramp-message | 4303 | (tramp-message |
| 4300 | vec 6 "%s" (mapconcat 'identity (process-command p) " ")) | 4304 | vec 6 "%s" (mapconcat 'identity (process-command p) " ")) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 9aff06031fc..82d878a6fa8 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -159,6 +159,9 @@ For encoding and deocding, commands like the following are executed: | |||
| 159 | This variable can be used to change the \"/bin/sh\" part. See the | 159 | This variable can be used to change the \"/bin/sh\" part. See the |
| 160 | variable `tramp-encoding-command-switch' for the \"-c\" part. | 160 | variable `tramp-encoding-command-switch' for the \"-c\" part. |
| 161 | 161 | ||
| 162 | If the shell must be forced to be interactive, see | ||
| 163 | `tramp-encoding-command-interactive'. | ||
| 164 | |||
| 162 | Note that this variable is not used for remote commands. There are | 165 | Note that this variable is not used for remote commands. There are |
| 163 | mechanisms in tramp.el which automatically determine the right shell to | 166 | mechanisms in tramp.el which automatically determine the right shell to |
| 164 | use for the remote host." | 167 | use for the remote host." |
| @@ -174,6 +177,13 @@ See the variable `tramp-encoding-shell' for more information." | |||
| 174 | :group 'tramp | 177 | :group 'tramp |
| 175 | :type 'string) | 178 | :type 'string) |
| 176 | 179 | ||
| 180 | (defcustom tramp-encoding-command-interactive | ||
| 181 | (unless (string-match "cmd\\.exe" tramp-encoding-shell) "-i") | ||
| 182 | "*Use this switch together with `tramp-encoding-shell' for interactive shells. | ||
| 183 | See the variable `tramp-encoding-shell' for more information." | ||
| 184 | :group 'tramp | ||
| 185 | :type '(choice (const nil) string)) | ||
| 186 | |||
| 177 | ;;;###tramp-autoload | 187 | ;;;###tramp-autoload |
| 178 | (defvar tramp-methods nil | 188 | (defvar tramp-methods nil |
| 179 | "*Alist of methods for remote files. | 189 | "*Alist of methods for remote files. |