bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#71049: async-shell-command ends with "Process *Async Shell Command*


From: Dmitry Gutov
Subject: bug#71049: async-shell-command ends with "Process *Async Shell Command* finished" when remote "direct-async-process"
Date: Wed, 29 May 2024 23:40:28 +0300
User-agent: Mozilla Thunderbird

On 29/05/2024 21:38, Michael Albinus wrote:
Dmitry Gutov<dmitry@gutov.dev>  writes:

On 29/05/2024 20:42, Michael Albinus wrote:
I made also the proposal to suppress reading
the remote history file for shell-command by default (performance!)
How is that going to look, code-wise?
Not tested yet:


diff --git a/lisp/tramp.el b/lisp/tramp.el
index b2442f45..ba852cf6 100644
--- a/lisp/tramp.el
+++ b/lisp/tramp.el
@@ -5260,7 +5260,17 @@ support symbolic links."
              (with-current-buffer output-buffer
                (setq mode-line-process '(":%s"))
                (unless (eq major-mode 'shell-mode)
-                 (shell-mode))
+                 ;; We set `tramp-histfile-override' to t in order to
+                 ;; suppress reading the remote history file by
+                 ;; default.  Could be overridden by the user with a
+                 ;; connection-local setting.
+                 (let ((tramp-histfile-override t))
+                   ;; `with-connection-local-application-variables'
+                   ;; exists since Emacs 29.  Older Emacsen will use
+                   ;; default application `tramp'.
+                   (tramp-compat-with-connection-local-application-variables
+                       'shell-command
+                     (shell-mode))))
                (set-process-filter p #'comint-output-filter)
                (set-process-sentinel p #'shell-command-sentinel)
                (when error-file

Thank you. I haven't tested this personally either, but it seems like this is the behavior we will want by default.

So the proposed solution should include it, I think.





reply via email to

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