summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2026-05-13 18:39:04 +0200
committerMichael Albinus <michael.albinus@gmx.de>2026-05-13 18:39:04 +0200
commit2e71d2c709f003cd33597d106e8a483500ec99c9 (patch)
tree71b8fc79e150fa99db45cf170fe4902802f44a04 /test
parentff96db93f23d17a1dcdc12aec4067007b5a4e18e (diff)
Propagate EMACSCLIENT_TRAMP to remote hosts with Tramp
* doc/misc/tramp.texi (Remote processes): Explain `tramp-propagate-emacsclient-tramp'. * lisp/net/tramp.el (tramp-remote-process-environment): Adapt docstring. (tramp-propagate-emacsclient-tramp): New defcustom. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-sh-handle-make-process) (tramp-sh-handle-process-file): Use it. * test/lisp/net/tramp-tests.el (tramp-test33-environment-variables): Adapt test.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/net/tramp-tests.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index c76d6d54c3d..d6eb782df3d 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -6555,6 +6555,21 @@ INPUT, if non-nil, is a string sent to the process."
(funcall
this-shell-command-to-string "echo \"${INSIDE_EMACS:-bla}\""))))
+ ;; Check EMACSCLIENT_TRAMP.
+ (setenv "EMACSCLIENT_TRAMP")
+ (let ((tramp-propagate-emacsclient-tramp t))
+ (should
+ (string-equal
+ (format "%s\n" (tramp-make-tramp-file-name tramp-test-vec 'noloc))
+ (funcall
+ this-shell-command-to-string "echo \"${EMACSCLIENT_TRAMP:-bla}\""))))
+ (let (tramp-propagate-emacsclient-tramp)
+ (should
+ (string-equal
+ "bla\n"
+ (funcall
+ this-shell-command-to-string "echo \"${EMACSCLIENT_TRAMP:-bla}\""))))
+
;; Set a value.
(let ((process-environment
(cons (concat envvar "=foo") process-environment)))