tramp-devel
[Top][All Lists]
Advanced

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

Submitted for approval: new option: tramp-shell-output-noswitch


From: Francis Litterio
Subject: Submitted for approval: new option: tramp-shell-output-noswitch
Date: Thu, 10 Oct 2002 16:06:34 -0400
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-msvc-nt5.0.2195)

Submitted for your approval ...  This patch (against r2.240 of tramp.el)
introduces a user option named tramp-shell-output-noswitch.  If this
option is non-nil, the *Shell Command Output* buffer is displayed but
not selected after a remote command executes.  This makes shell-command
in a TRAMP buffer behave a bit more like it does in a non-TRAMP buffer.

Naturally, the default value is to preserve the existing behavior.
--
Francis Litterio
address@hidden
http://world.std.com/~franl/
GPG and PGP public keys available on keyservers.


diff -u -r2.240 tramp.el
--- tramp.el    6 Oct 2002 19:03:20 -0000       2.240
+++ tramp.el    10 Oct 2002 20:12:28 -0000
@@ -145,6 +145,14 @@
   :type '(choice (const nil)
                  string))
 
+(defcustom tramp-shell-output-noswitch nil
+  "*If this option is non-nil, the *Shell Command Output* buffer is displayed
+but not selected after a remote command executes.  This makes shell-command in 
a
+TRAMP buffer behave a bit more like it does in a non-TRAMP buffer.  Default
+value is nil."
+  :group 'tramp
+  :type 'boolean)
+
 (defcustom tramp-encoding-shell
   (if (memq system-type '(windows-nt))
       (getenv "COMSPEC")
@@ -2979,7 +2987,9 @@
            (skip-chars-forward "^ ")
            (setq status (read (current-buffer))))
          (unless (zerop (buffer-size))
-           (pop-to-buffer output-buffer))
+           (if tramp-shell-output-noswitch
+               (display-buffer output-buffer)
+             (pop-to-buffer output-buffer)))
          status))
     ;; The following is only executed if something strange was
     ;; happening.  Emit a helpful message and do it anyway.





reply via email to

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