aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2019-04-14 19:52:12 +0200
committerMichael Albinus2019-04-14 19:52:12 +0200
commitdcfe1c4aba3f54cdd0295e0e21db86143f7cb705 (patch)
treee2a845bff1ac74ec8567af1af69f3e22f00d6b47
parente233dedde2e79b72ce158e087f29fb6d2ac8453a (diff)
downloademacs-dcfe1c4aba3f54cdd0295e0e21db86143f7cb705.tar.gz
emacs-dcfe1c4aba3f54cdd0295e0e21db86143f7cb705.zip
Fix Bug#35055
* lisp/net/tramp.el (tramp-handle-shell-command): Handle `shell-command-width'. (Bug#35055)
-rw-r--r--lisp/net/tramp.el29
1 files changed, 18 insertions, 11 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 32963ac5432..2e1a0960d7d 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3638,17 +3638,24 @@ support symbolic links."
3638 (erase-buffer))) 3638 (erase-buffer)))
3639 3639
3640 (if (and (not current-buffer-p) (integerp asynchronous)) 3640 (if (and (not current-buffer-p) (integerp asynchronous))
3641 (prog1 3641 (let ((tramp-remote-process-environment
3642 ;; Run the process. 3642 ;; `shell-command-width' has been introduced with Emacs 27.1.
3643 (setq p (start-file-process-shell-command 3643 (if (natnump (bound-and-true-p shell-command-width))
3644 (buffer-name output-buffer) buffer command)) 3644 (cons (format "COLUMNS=%d"
3645 ;; Display output. 3645 (bound-and-true-p shell-command-width))
3646 (with-current-buffer output-buffer 3646 tramp-remote-process-environment)
3647 (display-buffer output-buffer '(nil (allow-no-window . t))) 3647 tramp-remote-process-environment)))
3648 (setq mode-line-process '(":%s")) 3648 (prog1
3649 (shell-mode) 3649 ;; Run the process.
3650 (set-process-sentinel p #'shell-command-sentinel) 3650 (setq p (start-file-process-shell-command
3651 (set-process-filter p #'comint-output-filter))) 3651 (buffer-name output-buffer) buffer command))
3652 ;; Display output.
3653 (with-current-buffer output-buffer
3654 (display-buffer output-buffer '(nil (allow-no-window . t)))
3655 (setq mode-line-process '(":%s"))
3656 (shell-mode)
3657 (set-process-sentinel p #'shell-command-sentinel)
3658 (set-process-filter p #'comint-output-filter))))
3652 3659
3653 (prog1 3660 (prog1
3654 ;; Run the process. 3661 ;; Run the process.