diff options
| author | Jim Porter | 2021-10-30 17:40:18 +0200 |
|---|---|---|
| committer | Michael Albinus | 2021-10-30 17:40:18 +0200 |
| commit | a0fb3939ab44800bb26cea6ea4c5451eb4934e8d (patch) | |
| tree | e0824a4c4bb232c84ee20a5b9c2385f945a0dbee | |
| parent | eb07b3d9b3e05b6863fa61ea3b022f2184ec5c82 (diff) | |
| download | emacs-a0fb3939ab44800bb26cea6ea4c5451eb4934e8d.tar.gz emacs-a0fb3939ab44800bb26cea6ea4c5451eb4934e8d.zip | |
Expand connection-local variables example in doc/emacs/custom.texi
* doc/emacs/custom.texi (Per-Connection Local Variables): Expand the
example to include setting 'system-uses-terminfo'.
| -rw-r--r-- | doc/emacs/custom.texi | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index eb30a6acc53..d9d6a680057 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -1474,9 +1474,10 @@ as Dired buffers (@pxref{Dired}). | |||
| 1474 | 1474 | ||
| 1475 | Most of the variables reflect the situation on the local machine. | 1475 | Most of the variables reflect the situation on the local machine. |
| 1476 | Often, they must use a different value when you operate in buffers | 1476 | Often, they must use a different value when you operate in buffers |
| 1477 | with a remote default directory. Think about the shell to be applied | 1477 | with a remote default directory. Think about the behavior when |
| 1478 | when calling @code{shell} -- it might be @file{/bin/bash} on your | 1478 | calling @code{shell} -- on your local machine, you might use |
| 1479 | local machine, and @file{/bin/ksh} on a remote machine. | 1479 | @file{/bin/bash} and rely on termcap, but on a remote machine, it may |
| 1480 | be @file{/bin/ksh} and terminfo. | ||
| 1480 | 1481 | ||
| 1481 | This can be accomplished with @dfn{connection-local variables}. | 1482 | This can be accomplished with @dfn{connection-local variables}. |
| 1482 | Directory and file local variables override connection-local | 1483 | Directory and file local variables override connection-local |
| @@ -1492,6 +1493,10 @@ variables/value pairs in a @dfn{profile}, using the | |||
| 1492 | criteria, identifying a remote machine: | 1493 | criteria, identifying a remote machine: |
| 1493 | 1494 | ||
| 1494 | @example | 1495 | @example |
| 1496 | (connection-local-set-profile-variables 'remote-terminfo | ||
| 1497 | '((system-uses-terminfo . t) | ||
| 1498 | (comint-terminfo-terminal . "dumb-emacs-ansi"))) | ||
| 1499 | |||
| 1495 | (connection-local-set-profile-variables 'remote-ksh | 1500 | (connection-local-set-profile-variables 'remote-ksh |
| 1496 | '((shell-file-name . "/bin/ksh") | 1501 | '((shell-file-name . "/bin/ksh") |
| 1497 | (shell-command-switch . "-c"))) | 1502 | (shell-command-switch . "-c"))) |
| @@ -1501,13 +1506,15 @@ criteria, identifying a remote machine: | |||
| 1501 | (shell-command-switch . "-c"))) | 1506 | (shell-command-switch . "-c"))) |
| 1502 | 1507 | ||
| 1503 | (connection-local-set-profiles | 1508 | (connection-local-set-profiles |
| 1504 | '(:application tramp :machine "remotemachine") 'remote-ksh) | 1509 | '(:application tramp :machine "remotemachine") |
| 1510 | 'remote-terminfo 'remote-ksh) | ||
| 1505 | @end example | 1511 | @end example |
| 1506 | 1512 | ||
| 1507 | This code declares two different profiles, @code{remote-ksh} and | 1513 | This code declares three different profiles, @code{remote-terminfo}, |
| 1508 | @code{remote-bash}. The profile @code{remote-ksh} is applied to all | 1514 | @code{remote-ksh}, and @code{remote-bash}. The profiles |
| 1515 | @code{remote-terminfo} and @code{remote-ksh} are applied to all | ||
| 1509 | buffers which have a remote default directory matching the regexp | 1516 | buffers which have a remote default directory matching the regexp |
| 1510 | @code{"remotemachine} as host name. Such a criteria can also | 1517 | @code{"remotemachine"} as host name. Such a criteria can also |
| 1511 | discriminate for the properties @code{:protocol} (this is the Tramp | 1518 | discriminate for the properties @code{:protocol} (this is the Tramp |
| 1512 | method) or @code{:user} (a remote user name). The @code{nil} criteria | 1519 | method) or @code{:user} (a remote user name). The @code{nil} criteria |
| 1513 | matches all buffers with a remote default directory. | 1520 | matches all buffers with a remote default directory. |