[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#70959: Tramp connection property can interact weirdly with cache
From: |
Dmitry Gutov |
Subject: |
bug#70959: Tramp connection property can interact weirdly with cache |
Date: |
Sat, 25 May 2024 17:36:23 +0300 |
User-agent: |
Mozilla Thunderbird |
Hi Michael,
On 18/05/2024 21:43, Michael Albinus wrote:
Try the following patch and the config as shown above.
diff --git a/lisp/tramp.el b/lisp/tramp.el
index f024ebec..814d33e6 100644
--- a/lisp/tramp.el
+++ b/lisp/tramp.el
@@ -4847,6 +4847,8 @@ a connection-local variable."
(when (process-command proc)
(tramp-message vec 6 "%s" (string-join (process-command proc) " "))))
+(defvar tramp-direct-async-process nil)
+
(defun tramp-direct-async-process-p (&rest args)
"Whether direct async `make-process' can be called."
(let ((v (tramp-dissect-file-name default-directory))
@@ -4855,7 +4857,7 @@ a connection-local variable."
(and ;; The method supports it.
(tramp-get-method-parameter v 'tramp-direct-async)
;; It has been indicated.
- (tramp-get-connection-property v "direct-async-process")
+ (connection-local-value tramp-direct-async-process)
Do you think we could also make it so
(setq tramp-direct-async-process t)
in the user config also works? Affecting all connections, naturally.
Not sure if we'll want to advertise it as a proper way to apply this
config, but I'd probably use this shortcut myself, and especially during
testing.
E.g. the change below (or equivalent):
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 18116229337..1864ef6541d 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4878,9 +4878,7 @@ tramp-direct-async-process-p
(tramp-get-method-parameter v 'tramp-direct-async)
;; It has been indicated. We don't use the global value of
;; `tramp-direct-async-process'.
- (or (and (tramp-compat-connection-local-p tramp-direct-async-process)
- (tramp-compat-connection-local-value
- tramp-direct-async-process))
+ (or (with-connection-local-variables tramp-direct-async-process)
;; Deprecated setting.
(tramp-get-connection-property v "direct-async-process"))
;; There's no multi-hop.
- bug#70959: Tramp connection property can interact weirdly with cache, (continued)
- bug#70959: Tramp connection property can interact weirdly with cache, Michael Albinus, 2024/05/16
- bug#70959: Tramp connection property can interact weirdly with cache, Dmitry Gutov, 2024/05/16
- bug#70959: Tramp connection property can interact weirdly with cache, Michael Albinus, 2024/05/17
- bug#70959: Tramp connection property can interact weirdly with cache, Dmitry Gutov, 2024/05/17
- bug#70959: Tramp connection property can interact weirdly with cache, Michael Albinus, 2024/05/18
- bug#70959: Tramp connection property can interact weirdly with cache, Dmitry Gutov, 2024/05/18
- bug#70959: Tramp connection property can interact weirdly with cache, Michael Albinus, 2024/05/18
- bug#70959: Tramp connection property can interact weirdly with cache, Dmitry Gutov, 2024/05/18
- bug#70959: Tramp connection property can interact weirdly with cache, Michael Albinus, 2024/05/19
- bug#70959: Tramp connection property can interact weirdly with cache, Dmitry Gutov, 2024/05/19
- bug#70959: Tramp connection property can interact weirdly with cache,
Dmitry Gutov <=
- bug#70959: Tramp connection property can interact weirdly with cache, Michael Albinus, 2024/05/25
- bug#70959: Tramp connection property can interact weirdly with cache, Dmitry Gutov, 2024/05/25