From: Michael Albinus Date: Thu, 26 Jul 2018 09:54:33 +0000 (+0200) Subject: Copyedits in tramp.texi, improved example with bash's readline X-Git-Tag: emacs-26.1.90~240 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5cfb7a3;p=emacs.git Copyedits in tramp.texi, improved example with bash's readline * doc/misc/tramp.texi (all): Unify some wordings. (Frequently Asked Questions): Update example with bash's readline. --- diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index f05da84745a..222f6c86b9e 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -1239,7 +1239,7 @@ improvement is not always true. @cindex default user @defopt tramp-default-user -@value{tramp} file name can omit the user name part since +A @value{tramp} file name can omit the user name part since @value{tramp} substitutes the currently logged-in user name. However this substitution can be overridden with @code{tramp-default-user}. For example: @@ -1452,7 +1452,7 @@ support this command. @subsection Tunneling with ssh -With ssh, you could use the @code{ProxyCommand} entry in the +With ssh, you could use the @code{ProxyCommand} entry in @file{~/.ssh/config}: @example @@ -1588,12 +1588,12 @@ A function dedicated to @file{/etc/hosts} for host names. @item @code{tramp-parse-passwd} @findex tramp-parse-passwd -A function which parses @file{/etc/passwd} files for user names. +A function which parses @file{/etc/passwd} for user names. @item @code{tramp-parse-etc-group} @findex tramp-parse-etc-group -A function which parses @file{/etc/group} files for group names. +A function which parses @file{/etc/group} for group names. @item @code{tramp-parse-netrc} @findex tramp-parse-netrc @@ -2186,7 +2186,7 @@ of the secretfile is now owned by the user logged in from When @code{backup-directory-alist} is @code{nil} (the default), such problems do not occur. -To ``turn off'' the backup feature for @value{tramp} files and stop +To ``turn off'' the backup feature for remote files and stop @value{tramp} from saving to the backup directory, use this: @lisp @@ -2248,12 +2248,11 @@ The backup file name of @vindex auto-save-file-name-transforms Just as for backup files, similar issues of file naming affect -auto-saving @value{tramp} files. Auto-saved files are saved in the -directory specified by the user option -@code{auto-save-file-name-transforms}. By default this is set to -the local temporary directory. But in some versions of Debian -GNU/Linux, this points to the source directory where the Emacs was -compiled. Reset such values to a valid directory. +auto-saving remote files. Auto-saved files are saved in the directory +specified by the user option @code{auto-save-file-name-transforms}. +By default this is set to the local temporary directory. But in some +versions of Debian GNU/Linux, this points to the source directory +where the Emacs was compiled. Reset such values to a valid directory. Set @code{auto-save-file-name-transforms} to @code{nil} to save auto-saved files to the same directory as the original file. @@ -2756,8 +2755,8 @@ hard-coded, fixed name. Note that using @code{:0} for X11 display name here will not work as expected. An alternate approach is specify @code{ForwardX11 yes} or -@code{ForwardX11Trusted yes} in the file @file{~/.ssh/config} on the -local host. +@code{ForwardX11Trusted yes} in @file{~/.ssh/config} on the local +host. @subsection Running @code{shell} on a remote host @@ -3199,12 +3198,17 @@ source "$@{HOME@}/.iterm2_shell_integration.bash" @end group @end example -And finally, bash's readline shall not use key bindings like -@samp{C-j} to commands. Disable reading the readline initialization -file: +And finally, bash's readline should not use key bindings like +@samp{C-j} to commands. Disable this in your @file{~/.inputrc}: @example -[ $TERM = "dumb" ] && INPUTRC=/dev/null +@group +$if term=dumb +# Don't bind Control-J or it messes up @value{tramp}. +$else +"\C-j": next-history +$endif +@end group @end example @item @@ -3333,13 +3337,13 @@ When testing, ensure the remote shell is the same shell How to get notified after @value{tramp} completes file transfers? Make Emacs beep after reading from or writing to the remote host with -the following code in @file{~/.emacs} file. +the following code in @file{~/.emacs}. @lisp @group (defadvice tramp-handle-write-region (after tramp-write-beep-advice activate) - "Make tramp beep after writing a file." + "Make @value{tramp} beep after writing a file." (interactive) (beep)) @end group @@ -3347,7 +3351,7 @@ the following code in @file{~/.emacs} file. @group (defadvice tramp-handle-do-copy-or-rename-file (after tramp-copy-beep-advice activate) - "Make tramp beep after copying a file." + "Make @value{tramp} beep after copying a file." (interactive) (beep)) @end group @@ -3355,7 +3359,7 @@ the following code in @file{~/.emacs} file. @group (defadvice tramp-handle-insert-file-contents (after tramp-insert-beep-advice activate) - "Make tramp beep after inserting a file." + "Make @value{tramp} beep after inserting a file." (interactive) (beep)) @end group @@ -3393,7 +3397,7 @@ then set them with a hook as follows: @item -Why is @file{~/.sh_history} file on the remote host growing? +Why is @file{~/.sh_history} on the remote host growing? @vindex tramp-histfile-override @vindex HISTFILE@r{, environment variable} @@ -3414,7 +3418,7 @@ undesired results when using @command{bash} as remote shell. Another approach is to disable @value{tramp}'s handling of the @env{HISTFILE} at all by setting @code{tramp-histfile-override} to @code{nil}. In this case, saving history could be turned off by -putting this shell code in the @file{.bashrc} or @file{.kshrc} file: +putting this shell code in @file{.bashrc} or @file{.kshrc}: @example @group @@ -3431,7 +3435,7 @@ fi @end example For @option{ssh}-based method, add the following line to your -@file{~/.ssh/environment} file: +@file{~/.ssh/environment}: @example HISTFILE=/dev/null