summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2022-03-18 12:25:32 +0100
committerMichael Albinus <michael.albinus@gmx.de>2022-03-18 12:25:32 +0100
commit499f2085fa6fce6c7a2868c8d27d465f43d53f0f (patch)
treec5a77d92b9933a5c9ee38cb6fa2f3d5b97aebaa7 /doc
parentce26657b5d7e77d851ed9267d554f4f48e43a0b6 (diff)
downloademacs-499f2085fa6fce6c7a2868c8d27d465f43d53f0f.tar.gz
Make application configurable in 'with-connection-local-variables'
* doc/lispref/variables.texi (Connection Local Variables): Explain 'connection-local-default-application'. * etc/NEWS: Mention 'connection-local-default-application'. * lisp/files-x.el (connection-local-default-application): New variable. (connection-local-criteria-for-default-directory): Use it. (Bug#54405) * test/lisp/files-x-tests.el (files-x-test-with-connection-local-variables): Extend test.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/variables.texi31
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index d991ae9e277..cd39e6b6470 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -2418,6 +2418,37 @@ are unwound. Example:
@end example
@end defmac
+@defvar connection-local-default-application
+The default application, a symbol, to be applied in
+@code{with-connection-local-variables}. It defaults to @code{tramp},
+but in case you want to overwrite Tramp's settings temporarily, you
+could let-bind it like
+
+@example
+@group
+(connection-local-set-profile-variables
+ 'my-remote-perl
+ '((perl-command-name . "/usr/local/bin/perl5")
+ (perl-command-switch . "-e %s")))
+@end group
+
+@group
+(connection-local-set-profiles
+ '(:application 'my-app :protocol "ssh" :machine "remotehost")
+ 'my-remote-perl)
+@end group
+
+@group
+(let ((default-directory "/ssh:remotehost:/working/dir/")
+ (connection-local-default-application 'my-app))
+ (with-connection-local-variables
+ do something useful))
+@end group
+@end example
+
+This variable must not be changed globally.
+@end defvar
+
@defvar enable-connection-local-variables
If @code{nil}, connection-local variables are ignored. This variable
shall be changed temporarily only in special modes.