emacs-diffs
[Top][All Lists]
Advanced

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

master 2e2f539: Fix window position in Tramp's shell-command


From: Michael Albinus
Subject: master 2e2f539: Fix window position in Tramp's shell-command
Date: Mon, 10 Feb 2020 13:59:58 -0500 (EST)

branch: master
commit 2e2f53907103d801fb57dc0eef55906cdf4d791b
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Fix window position in Tramp's shell-command
    
    * lisp/net/tramp.el (tramp-handle-shell-command): Fix `window-start'
    in output buffer.  (Bug#39171)
---
 lisp/net/tramp.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 19d36c3..0e44656 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3721,9 +3721,9 @@ support symbolic links."
            (if (process-live-p p)
              ;; Display output.
              (with-current-buffer output-buffer
-               (display-buffer output-buffer '(nil (allow-no-window . t)))
                (setq mode-line-process '(":%s"))
-               (shell-mode)
+               (unless (eq major-mode 'shell-mode)
+                 (shell-mode))
                (set-process-filter p #'comint-output-filter)
                (set-process-sentinel p #'shell-command-sentinel)
                (when error-file
@@ -3733,7 +3733,8 @@ support symbolic links."
                     (with-current-buffer error-buffer
                       (insert-file-contents-literally
                        error-file nil nil nil 'replace))
-                    (delete-file error-file)))))
+                    (delete-file error-file))))
+               (display-buffer output-buffer '(nil (allow-no-window . t))))
 
              (when error-file
                (delete-file error-file)))))



reply via email to

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