diff options
| author | Michael Albinus | 2017-04-02 11:02:54 +0200 |
|---|---|---|
| committer | Michael Albinus | 2017-04-02 11:02:54 +0200 |
| commit | 59191cd0cbe8463f9095a71cb4048bb138d6e446 (patch) | |
| tree | ea0e063deb25c07c6e315b02d3db427e25e917b8 /doc/misc | |
| parent | 21918f4e1c5939038c7e8d0b8b8e8a647c086796 (diff) | |
| download | emacs-59191cd0cbe8463f9095a71cb4048bb138d6e446.tar.gz emacs-59191cd0cbe8463f9095a71cb4048bb138d6e446.zip | |
Apply connecion-local variables for shells
* doc/misc/tramp.texi (Remote processes): Show use of connection-local
variables. Don't mention Emacs 23 anymore.
(Frequently Asked Questions): Precise Emacs and MS Windows version.
* lisp/files-x.el (connection-local-normalize-criteria):
Suppress nil properties.
(connection-local-set-profiles, with-connection-local-profiles):
Adapt docstring.
* lisp/shell.el (shell): Apply connecion-local variables.
Diffstat (limited to 'doc/misc')
| -rw-r--r-- | doc/misc/tramp.texi | 50 |
1 files changed, 43 insertions, 7 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index e1d84457ff9..8e04d69c199 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -2499,6 +2499,42 @@ Starting with Emacs 24, when @option{explicit-shell-file-name} is | |||
| 2499 | equal to @code{nil}, calling @code{shell} interactively will prompt | 2499 | equal to @code{nil}, calling @code{shell} interactively will prompt |
| 2500 | for a shell name. | 2500 | for a shell name. |
| 2501 | 2501 | ||
| 2502 | Starting with Emacs 26, you could use connection-local variables for | ||
| 2503 | setting different values of @option{explicit-shell-file-name} for | ||
| 2504 | different remote hosts. | ||
| 2505 | @ifinfo | ||
| 2506 | @pxref{Connection Local Variables, , , elisp} | ||
| 2507 | @end ifinfo | ||
| 2508 | |||
| 2509 | @lisp | ||
| 2510 | @group | ||
| 2511 | (connection-local-set-profile-variables | ||
| 2512 | 'remote-bash | ||
| 2513 | '((explicit-shell-file-name . "/bin/bash") | ||
| 2514 | (explicit-bash-args . ("-i")))) | ||
| 2515 | @end group | ||
| 2516 | |||
| 2517 | @group | ||
| 2518 | (connection-local-set-profile-variables | ||
| 2519 | 'remote-ksh | ||
| 2520 | '((explicit-shell-file-name . "/bin/ksh") | ||
| 2521 | (explicit-ksh-args . ("-i")))) | ||
| 2522 | @end group | ||
| 2523 | |||
| 2524 | @group | ||
| 2525 | (connection-local-set-profiles | ||
| 2526 | '(:application 'tramp :protocol "ssh" :machine "localhost") | ||
| 2527 | 'remote-bash) | ||
| 2528 | @end group | ||
| 2529 | |||
| 2530 | @group | ||
| 2531 | (connection-local-set-profiles | ||
| 2532 | `(:application 'tramp :protocol "sudo" | ||
| 2533 | :user "root" :machine ,(system-name)) | ||
| 2534 | 'remote-ksh) | ||
| 2535 | @end group | ||
| 2536 | @end lisp | ||
| 2537 | |||
| 2502 | 2538 | ||
| 2503 | @subsection Running @code{shell-command} on a remote host | 2539 | @subsection Running @code{shell-command} on a remote host |
| 2504 | @cindex shell-command | 2540 | @cindex shell-command |
| @@ -2542,11 +2578,10 @@ uid=0(root) gid=0(root) groups=0(root) | |||
| 2542 | @end group | 2578 | @end group |
| 2543 | @end example | 2579 | @end example |
| 2544 | 2580 | ||
| 2545 | @code{eshell} in Emacs 23.2 added custom @code{su} and @code{sudo} | 2581 | @code{eshell} added custom @code{su} and @code{sudo} commands that set |
| 2546 | commands that set the default directory correctly for the | 2582 | the default directory correctly for the @file{*eshell*} buffer. |
| 2547 | @file{*eshell*} buffer. @value{tramp} silently updates | 2583 | @value{tramp} silently updates @option{tramp-default-proxies-alist} |
| 2548 | @option{tramp-default-proxies-alist} with an entry for this directory | 2584 | with an entry for this directory (@pxref{Multi-hops}): |
| 2549 | (@pxref{Multi-hops}): | ||
| 2550 | 2585 | ||
| 2551 | @example | 2586 | @example |
| 2552 | @group | 2587 | @group |
| @@ -2763,11 +2798,12 @@ Where is the latest @value{tramp}? | |||
| 2763 | @item | 2798 | @item |
| 2764 | Which systems does it work on? | 2799 | Which systems does it work on? |
| 2765 | 2800 | ||
| 2766 | The package works successfully on Emacs 23, Emacs 24, and Emacs 25. | 2801 | The package works successfully on Emacs 23, Emacs 24, Emacs 25, and |
| 2802 | Emacs 26. | ||
| 2767 | 2803 | ||
| 2768 | While Unix and Unix-like systems are the primary remote targets, | 2804 | While Unix and Unix-like systems are the primary remote targets, |
| 2769 | @value{tramp} has equal success connecting to other platforms, such as | 2805 | @value{tramp} has equal success connecting to other platforms, such as |
| 2770 | MS Windows XP/Vista/7. | 2806 | MS Windows 7/8/10. |
| 2771 | 2807 | ||
| 2772 | 2808 | ||
| 2773 | @item | 2809 | @item |