emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104836: * net/tramp.el (tramp-encodi


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104836: * net/tramp.el (tramp-encoding-command-interactive): New defcustom.
Date: Fri, 01 Jul 2011 11:14:31 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104836
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Fri 2011-07-01 11:14:31 +0200
message:
  * net/tramp.el (tramp-encoding-command-interactive): New defcustom.
  
  * net/tramp-sh.el (tramp-maybe-open-connection): Use it.
modified:
  lisp/ChangeLog
  lisp/net/tramp-sh.el
  lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-07-01 06:24:00 +0000
+++ b/lisp/ChangeLog    2011-07-01 09:14:31 +0000
@@ -1,3 +1,9 @@
+2011-07-01  Michael Albinus  <address@hidden>
+
+       * net/tramp.el (tramp-encoding-command-interactive): New defcustom.
+
+       * net/tramp-sh.el (tramp-maybe-open-connection): Use it.
+
 2011-07-01  Martin Rudalics  <address@hidden>
 
        * window.el (same-window-buffer-names, same-window-regexps)

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2011-06-23 13:03:04 +0000
+++ b/lisp/net/tramp-sh.el      2011-07-01 09:14:31 +0000
@@ -4291,10 +4291,14 @@
                 ;; This must be done in order to avoid our file name handler.
                 (p (let ((default-directory
                            (tramp-compat-temporary-file-directory)))
-                     (start-process
+                     (apply
+                      'start-process
                       (tramp-get-connection-name vec)
                       (tramp-get-connection-buffer vec)
-                      tramp-encoding-shell))))
+                      (if tramp-encoding-command-interactive
+                          (list tramp-encoding-shell
+                                tramp-encoding-command-interactive)
+                        (list tramp-encoding-shell))))))
 
            (tramp-message
             vec 6 "%s" (mapconcat 'identity (process-command p) " "))

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2011-06-11 18:30:43 +0000
+++ b/lisp/net/tramp.el 2011-07-01 09:14:31 +0000
@@ -159,6 +159,9 @@
 This variable can be used to change the \"/bin/sh\" part.  See the
 variable `tramp-encoding-command-switch' for the \"-c\" part.
 
+If the shell must be forced to be interactive, see
+`tramp-encoding-command-interactive'.
+
 Note that this variable is not used for remote commands.  There are
 mechanisms in tramp.el which automatically determine the right shell to
 use for the remote host."
@@ -174,6 +177,13 @@
   :group 'tramp
   :type 'string)
 
+(defcustom tramp-encoding-command-interactive
+  (unless (string-match "cmd\\.exe" tramp-encoding-shell) "-i")
+  "*Use this switch together with `tramp-encoding-shell' for interactive 
shells.
+See the variable `tramp-encoding-shell' for more information."
+  :group 'tramp
+  :type '(choice (const nil) string))
+
 ;;;###tramp-autoload
 (defvar tramp-methods nil
   "*Alist of methods for remote files.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]