From 0f8fb0b98a85cf0dcf266b3963c20363fb3e1955 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 28 Aug 2014 21:31:11 +0200 Subject: [PATCH] * net/tramp.el (tramp-handle-shell-command): Use `display-buffer'. Fixes: debbugs:18326 --- lisp/ChangeLog | 5 +++++ lisp/net/tramp.el | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a8e6eb80f5d..c6a3f5d7282 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-08-28 Michael Albinus + + * net/tramp.el (tramp-handle-shell-command): Use `display-buffer'. + (Bug#18326) + 2014-08-28 Martin Rudalics * scroll-bar.el (scroll-bar-horizontal-drag-1): Handle new diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 17259c69159..5968a331b68 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3289,11 +3289,12 @@ User is always nil." ;; Run the process. (setq p (apply 'start-file-process "*Async Shell*" buffer args)) ;; Display output. - (pop-to-buffer output-buffer) - (setq mode-line-process '(":%s")) - (shell-mode) - (set-process-sentinel p 'shell-command-sentinel) - (set-process-filter p 'comint-output-filter)) + (with-current-buffer output-buffer + (display-buffer output-buffer '(nil (allow-no-window . t))) + (setq mode-line-process '(":%s")) + (shell-mode) + (set-process-sentinel p 'shell-command-sentinel) + (set-process-filter p 'comint-output-filter))) (prog1 ;; Run the process. -- 2.39.5