aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2006-04-13 19:51:04 +0000
committerMichael Albinus2006-04-13 19:51:04 +0000
commit32f9593c7c9103b02ac41cd671f02ba541fba48a (patch)
tree2f2db437058a586d5f6494221af21dd50d2c1d66
parentbb1d56c87cb096fbe6930569e6a0542a2857af85 (diff)
downloademacs-32f9593c7c9103b02ac41cd671f02ba541fba48a.tar.gz
emacs-32f9593c7c9103b02ac41cd671f02ba541fba48a.zip
* net/tramp.el (tramp-display-shell-command-buffer): New defvar.
(tramp-handle-shell-command): Display output buffer only when `tramp-display-shell-command-buffer' is true. (tramp-handle-process-file): Set `tramp-display-shell-command-buffer'.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/net/tramp.el16
2 files changed, 17 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b73aec79444..b2948a5cecc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12006-04-13 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-display-shell-command-buffer): New defvar.
4 (tramp-handle-shell-command): Display output buffer only when
5 `tramp-display-shell-command-buffer' is true.
6 (tramp-handle-process-file): Set `tramp-display-shell-command-buffer'.
7
12006-04-13 Carsten Dominik <dominik@science.uva.nl> 82006-04-13 Carsten Dominik <dominik@science.uva.nl>
2 9
3 * textmodes/org.el (org-set-autofill-regexps): Set only the local 10 * textmodes/org.el (org-set-autofill-regexps): Set only the local
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 58f74133cd5..5abd3dd36e4 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3584,6 +3584,10 @@ the result will be a local, non-Tramp, filename."
3584 "Global variable keeping asynchronous process object. 3584 "Global variable keeping asynchronous process object.
3585Used in `tramp-handle-shell-command'") 3585Used in `tramp-handle-shell-command'")
3586 3586
3587(defvar tramp-display-shell-command-buffer t
3588 "Whether to display output buffer of `shell-command'.
3589This is necessary for handling DISPLAY of `process-file'.")
3590
3587(defun tramp-handle-shell-command (command &optional output-buffer error-buffer) 3591(defun tramp-handle-shell-command (command &optional output-buffer error-buffer)
3588 "Like `shell-command' for tramp files. 3592 "Like `shell-command' for tramp files.
3589This will break if COMMAND prints a newline, followed by the value of 3593This will break if COMMAND prints a newline, followed by the value of
@@ -3692,7 +3696,8 @@ This will break if COMMAND prints a newline, followed by the value of
3692 (skip-chars-forward "^ ") 3696 (skip-chars-forward "^ ")
3693 (setq status (read (current-buffer))))) 3697 (setq status (read (current-buffer)))))
3694 (unless (zerop (buffer-size)) 3698 (unless (zerop (buffer-size))
3695 (display-buffer output-buffer)) 3699 (when tramp-display-shell-command-buffer
3700 (display-buffer output-buffer)))
3696 status)) 3701 status))
3697 ;; The following is only executed if something strange was 3702 ;; The following is only executed if something strange was
3698 ;; happening. Emit a helpful message and do it anyway. 3703 ;; happening. Emit a helpful message and do it anyway.
@@ -3707,11 +3712,10 @@ This will break if COMMAND prints a newline, followed by the value of
3707 (when (and (numberp buffer) (zerop buffer)) 3712 (when (and (numberp buffer) (zerop buffer))
3708 (error "Implementation does not handle immediate return")) 3713 (error "Implementation does not handle immediate return"))
3709 (when (consp buffer) (error "Implementation does not handle error files")) 3714 (when (consp buffer) (error "Implementation does not handle error files"))
3710 (shell-command 3715 (let ((tramp-display-shell-command-buffer display))
3711 (mapconcat 'tramp-shell-quote-argument 3716 (shell-command
3712 (cons program args) 3717 (mapconcat 'tramp-shell-quote-argument (cons program args) " ")
3713 " ") 3718 buffer)))
3714 buffer))
3715 3719
3716;; File Editing. 3720;; File Editing.
3717 3721