From f67dec1442bde8822878ea0e3d20a0d4adbfae7f Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 26 Aug 2024 18:48:53 +0200 Subject: [PATCH] Add convenience to Tramp * doc/misc/tramp.texi (Inline methods): Add tramp-docker-program, tramp-podman-program, tramp-kubernetes-program, tramp-toolbox-program, tramp-distrobox-program, tramp-flatpak-program, tramp-apptainer-program, and tramp-nspawn-program. (Remote shell setup): Rearrange indices. (Ssh setup): Say "user option" when needed. (Keeping files encrypted): Add tramp-crypt-encfs-program. (Frequently Asked Questions): Rearrange indices. Remove duplicate text. Add tramp-mode. * lisp/net/tramp.el (tramp-active-command-completion-p): New defun. * lisp/net/tramp-cmds.el (tramp-cleanup-connection) (tramp-cleanup-all-connections, tramp-cleanup-some-buffers) (tramp-cleanup-all-buffers, tramp-rename-files): * lisp/net/tramp-message.el (tramp-setup-debug-buffer): Declare `completion'. * lisp/net/tramp-integration.el (tramp-info-link): New widget. (tramp-widget-info-link-action): New defun. * lisp/net/tramp.el (tramp, tramp-mode, tramp-backup-directory-alist) (tramp-auto-save-directory, tramp-encoding-shell) (tramp-encoding-command-switch) (tramp-encoding-command-interactive, tramp-default-method) (tramp-default-method-alist, tramp-default-user) (tramp-default-user-alist, tramp-default-host) (tramp-default-host-alist, tramp-default-proxies-alist) (tramp-save-ad-hoc-proxies, tramp-show-ad-hoc-proxies) (tramp-restricted-shell-hosts-alist, tramp-local-host-regexp) (tramp-shell-prompt-pattern, tramp-password-prompt-regexp) (tramp-otp-password-prompt-regexp, tramp-wrong-passwd-regexp) (tramp-terminal-type, tramp-syntax) (tramp-ignored-file-name-regexp, tramp-chunksize) (tramp-process-connection-type, tramp-remote-path) (tramp-remote-process-environment) (tramp-completion-multi-hop-methods) (tramp-completion-use-auth-sources, tramp-use-file-attributes) (tramp-inhibit-errors-if-setting-file-attributes-fail) (tramp-allow-unsafe-temporary-files): * lisp/net/tramp-adb.el (tramp-adb-program) (tramp-adb-connect-if-not-connected): * lisp/net/tramp-cache.el (tramp-connection-properties) (tramp-persistency-file-name, tramp-completion-use-cache): * lisp/net/tramp-cmds.el (tramp-cleanup-some-buffers-hook) (tramp-default-rename-alist, tramp-confirm-rename-file-names) (tramp-file-name-with-method): * lisp/net/tramp-container.el (tramp-docker-program) (tramp-podman-program, tramp-kubernetes-program) (tramp-kubernetes-context, tramp-kubernetes-namespace) (tramp-toolbox-program, tramp-distrobox-program) (tramp-flatpak-program, tramp-apptainer-program) (tramp-nspawn-program): * lisp/net/tramp-crypt.el (tramp-crypt-encfs-program) (tramp-crypt-encfsctl-program, tramp-crypt-encfs-option) (tramp-crypt-save-encfs-config-remote): * lisp/net/tramp-fuse.el (tramp-fuse-unmount-on-cleanup): * lisp/net/tramp-gvfs.el (tramp-gvfs-methods): * lisp/net/tramp-message.el (tramp-verbose, tramp-debug-to-file) (tramp-debug-command-messages): * lisp/net/tramp-rclone.el (tramp-rclone-program): * lisp/net/tramp-sh.el (tramp-inline-compress-start-size) (tramp-copy-size-limit, tramp-histfile-override) (tramp-use-connection-share) (tramp-use-scp-direct-remote-copying, tramp-sh-extra-args): * lisp/net/tramp-sshfs.el (tramp-sshfs-program): Add `:link' key. * lisp/net/tramp.el (tramp-enable-method): Move function ... * lisp/net/tramp-cmds.el (tramp-enable-method): ... here. (cherry picked from commit 7e17a1fff401e7cb98a9b140d791957ae3af2451) --- doc/misc/tramp.texi | 94 +++++++++++++++------- lisp/net/tramp-adb.el | 8 +- lisp/net/tramp-cache.el | 10 ++- lisp/net/tramp-cmds.el | 45 ++++++++++- lisp/net/tramp-container.el | 30 ++++--- lisp/net/tramp-crypt.el | 12 ++- lisp/net/tramp-fuse.el | 3 +- lisp/net/tramp-gvfs.el | 3 +- lisp/net/tramp-integration.el | 27 +++++++ lisp/net/tramp-message.el | 18 ++--- lisp/net/tramp-rclone.el | 3 +- lisp/net/tramp-sh.el | 19 +++-- lisp/net/tramp-sshfs.el | 3 +- lisp/net/tramp.el | 147 ++++++++++++++++++++-------------- 14 files changed, 290 insertions(+), 132 deletions(-) diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 774711567c7..1547344f3ff 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -858,6 +858,7 @@ the host returned by the function @command{(system-name)}. See @item @option{androidsu} @cindex method @option{androidsu} @cindex @option{androidsu} method + Because the default implementation of the @option{su} method and other shell-based methods conflict with non-standard @command{su} implementations popular among Android users and the restricted @@ -987,6 +988,11 @@ ways: Integration for Docker containers. The host name may be either a running container's name or ID, as returned by @samp{docker ps}. +@vindex tramp-docker-program +If the @command{docker} program isn't found in your @env{PATH} +environment variable, you can tell @value{tramp} its absolute path via +the user option @code{tramp-docker-program}. + @item @option{podman} @cindex method @option{podman} @cindex @option{podman} method @@ -994,6 +1000,11 @@ running container's name or ID, as returned by @samp{docker ps}. Podman is an alternative to @option{docker} which may be run rootless, if desired. +@vindex tramp-podman-program +If the @command{podman} program isn't found in your @env{PATH} +environment variable, you can tell @value{tramp} its absolute path via +the user option @code{tramp-podman-program}. + @item @option{kubernetes} @cindex method @option{kubernetes} @cindex @option{kubernetes} method @@ -1005,6 +1016,12 @@ is used. @samp{@var{pod}%@var{namespace}} as host name allows to use another namespace but the default one. This can also be combined with the @samp{@var{container}.} prefix. +@vindex tramp-kubernetes-program +Internally, @value{tramp} uses the @command{kubectl} program. If this +program isn't found in your @env{PATH} environment variable, you can +tell @value{tramp} its absolute path via the user option +@code{tramp-kubernetes-program}. + This method does not support user names. @item @option{toolbox} @@ -1023,6 +1040,13 @@ such default for Distrobox. Contrary to the other container-based methods, these two methods start a created container, if it isn't running yet. +@vindex tramp-toolbox-program +@vindex tramp-distrobox-program +If the @command{toolbox} or @command{distrobox} program isn't found in +your @env{PATH} environment variable, you can tell @value{tramp} its +absolute path via the user option @code{tramp-toolbox-program} or +@code{tramp-distrobox-program}, respectively. + These are optional methods, @pxref{Optional methods}. They do not support user names. @@ -1034,6 +1058,11 @@ Integration of Flatpak sandboxes. The host name may be either an application ID, a sandbox instance ID, or a PID, as returned by @samp{flatpak ps}. +@vindex tramp-flatpak-program +If the @command{flatpak} program isn't found in your @env{PATH} +environment variable, you can tell @value{tramp} its absolute path via +the user option @code{tramp-flatpak-program}. + This is an optional method, @pxref{Optional methods}. It does not support user names. @@ -1044,6 +1073,11 @@ support user names. Integration of Apptainer instances. The host name is the instance name, as returned by @samp{apptainer instance list}. +@vindex tramp-apptainer-program +If the @command{apptainer} program isn't found in your @env{PATH} +environment variable, you can tell @value{tramp} its absolute path via +the user option @code{tramp-apptainer-program}. + This is an optional method, @pxref{Optional methods}. It does not support user names. @@ -1054,6 +1088,12 @@ support user names. Integration of @code{systemd-nspawn} instances. The host name is the instance name, as returned by @samp{machinectl list --all}. +@vindex tramp-nspawn-program +Internally, @value{tramp} uses the @command{machinectl} program. If this +program isn't found in your @env{PATH} environment variable, you can +tell @value{tramp} its absolute path via the user option +@code{tramp-nspawn-program}. + This is an optional method, @pxref{Optional methods}. @end table @@ -2533,20 +2573,20 @@ login security, especially not the exotic ones. However, @value{tramp} provides a few tweaks to address the most common ones. @table @asis -@item @code{tramp-shell-prompt-pattern} @vindex tramp-shell-prompt-pattern +@item @code{tramp-shell-prompt-pattern} @code{tramp-shell-prompt-pattern} is for remote login shell prompt, which may not be the same as the local login shell prompt, @code{shell-prompt-pattern}. Since most hosts use identical prompts, @value{tramp} sets a similar default value for both prompts. -@item @code{tramp-password-prompt-regexp} -@item @code{tramp-otp-password-prompt-regexp} -@item @code{tramp-wrong-passwd-regexp} @vindex tramp-password-prompt-regexp @vindex tramp-otp-password-prompt-regexp @vindex tramp-wrong-passwd-regexp +@item @code{tramp-password-prompt-regexp} +@item @code{tramp-otp-password-prompt-regexp} +@item @code{tramp-wrong-passwd-regexp} @value{tramp} uses @code{tramp-password-prompt-regexp} to distinguish between prompts for passwords and prompts for passphrases. @@ -2586,9 +2626,9 @@ by @value{tramp} for reuse. Similar localization may be necessary for handling wrong password prompts, for which @value{tramp} uses @code{tramp-wrong-passwd-regexp}. -@item @code{tramp-terminal-type} @vindex tramp-terminal-type @vindex TERM@r{, environment variable} +@item @code{tramp-terminal-type} @value{tramp} uses the user option @code{tramp-terminal-type} to set the remote environment variable @env{TERM} for the shells it runs. @@ -2606,9 +2646,9 @@ require a different setting. This could be achieved by tweaking the @end group @end lisp -@item Determining a @value{tramp} session @vindex TERM@r{, environment variable} @vindex INSIDE_EMACS@r{, environment variable} +@item Determining a @value{tramp} session Sometimes, it is needed to identify whether a shell runs under @value{tramp} control. The setting of environment variable @env{TERM} @@ -2721,11 +2761,11 @@ To accommodate using non-Bourne shells on that remote, use other shell-specific config files. For example, bash can use @file{~/.bash_profile} and ignore @file{.profile}. -@item Interactive shell prompt - @vindex INSIDE_EMACS@r{, environment variable} @vindex SHELLNAME@r{, environment variable} @vindex ESHELL@r{, environment variable} +@item Interactive shell prompt + @value{tramp} redefines the remote shell prompt internally for robust parsing. This redefinition affects the looks of a prompt in an interactive remote shell through commands, such as @kbd{M-x shell @@ -2956,7 +2996,7 @@ hosts @samp{source} and @samp{target}, and @itemize @minus @item -Variable @code{tramp-use-scp-direct-remote-copying} is non-@code{nil}, +User option @code{tramp-use-scp-direct-remote-copying} is non-@code{nil}, @item Remote host @samp{source} doesn't use the @option{RemoteCommand} @@ -3420,6 +3460,12 @@ encrypted before copying to, and decrypted after copying from that directory. File and directory names will be also encrypted. @end deffn +@defopt tramp-crypt-encfs-program +This is the name of the @command{encfsctl} program. If it isn't in +your @env{PATH} environment variable, you can set the absolute path +here. +@end defopt + @defopt tramp-crypt-encfs-option If a remote directory is marked for encryption, it is initialized via @command{encfs} the very first time a file in this directory is @@ -5210,14 +5256,14 @@ about, for example: (setq vc-handled-backends '(SVN Git)) @end lisp -@item @vindex remote-file-name-inhibit-locks +@item Disable file locks. Set @code{remote-file-name-inhibit-locks} to @code{t} if you know that different Emacs sessions are not modifying the same remote file. -@item @vindex remote-file-name-inhibit-auto-save +@item Keep auto-save files local. This is already the default configuration in Emacs, don't change it. If you want to disable auto-saving for remote files at all, set @code{remote-file-name-inhibit-auto-save} to @@ -5356,6 +5402,7 @@ characters. Using @option{sshx} or @option{scpx} methods can avoid this problem because they allocate a pseudo tty. @xref{Inline methods}. +@vindex tramp-chunksize @item @value{tramp} stops transferring strings longer than 500 characters @@ -6052,17 +6099,6 @@ If these errors can be ignored, set user option non-@code{nil} value. This transforms the error into a warning. -@item -How to ignore errors when changing file attributes? - -@vindex tramp-inhibit-errors-if-setting-file-attributes-fail -Sometimes, for example while saving remote files, errors appear when -changing file attributes like permissions, time stamps, or ownership. -If these errors can be ignored, set user option -@code{tramp-inhibit-errors-if-setting-file-attributes-fail} to a -non-@code{nil} value. This transforms the error into a warning. - - @item How to disable other packages from calling @value{tramp}? @@ -6111,8 +6147,8 @@ If you want to enable Ange FTP's syntax, add the following form: (tramp-change-syntax 'simplified) @end lisp -@item @vindex tramp-ignored-file-name-regexp +@item To deactivate @value{tramp} for some look-alike remote file names, set @code{tramp-ignored-file-name-regexp} to a proper regexp in @file{.emacs}. @strong{Note}, that we don't use @@ -6126,8 +6162,8 @@ To deactivate @value{tramp} for some look-alike remote file names, set This is needed, if you mount for example a virtual file system on your local host's root directory as @file{/ssh:example.com:}. -@item @findex inhibit-remote-files +@item To disable both @value{tramp} (and Ange FTP), type @kbd{M-x inhibit-remote-files @key{RET}}. You can also add this to your @file{.emacs}. @@ -6136,8 +6172,11 @@ inhibit-remote-files @key{RET}}. You can also add this to your (inhibit-remote-files) @end lisp -@item +@vindex tramp-mode +This command sets the user option @code{tramp-mode} to @code{nil}. + @findex without-remote-files +@item If you write code, which is intended to run only for local files, you can use the @code{without-remote-files} macro. @@ -6146,10 +6185,11 @@ can use the @code{without-remote-files} macro. @end lisp This improves performance, because many primitive file name operations -don't check any longer for @value{tramp} file name regexps then. +don't check any longer for @value{tramp} file name regexps then. The +macro binds the user option @code{tramp-mode} to @code{nil}. -@item @findex tramp-unload-tramp +@item To unload @value{tramp}, type @kbd{M-x tramp-unload-tramp @key{RET}}. Unloading @value{tramp} resets Ange FTP plugins also. @end itemize diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index e8bb8ec3184..4fba731509b 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -43,14 +43,18 @@ "Name of the Android Debug Bridge program." :group 'tramp :version "24.4" - :type 'string) + :type '(choice (const "adb") + (string)) + :link '(tramp-info-link :tag "Tramp manual" tramp-adb-program)) (defcustom tramp-adb-connect-if-not-connected nil "Try to run `adb connect' if provided device is not connected currently. It is used for TCP/IP devices." :group 'tramp :version "25.1" - :type 'boolean) + :type 'boolean + :link '(tramp-info-link :tag "Tramp manual" + tramp-adb-connect-if-not-connected)) ;;;###tramp-autoload (defconst tramp-adb-method "adb" diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index c50fbdad5f1..2d9d58b51ac 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el @@ -103,13 +103,16 @@ details see the info pages." :version "24.4" :type '(repeat (list (choice :tag "File Name regexp" regexp (const nil)) (choice :tag " Property" string) - (choice :tag " Value" sexp)))) + (choice :tag " Value" sexp))) + :link '(info-link :tag "Tramp manual" + "(tramp) Predefined connection information")) ;;;###tramp-autoload (defcustom tramp-persistency-file-name (locate-user-emacs-file "tramp") "File which keeps connection history for Tramp connections." :group 'tramp - :type 'file) + :type 'file + :link '(info-link :tag "Tramp manual" "(tramp) Connection caching")) ;;;###tramp-autoload (defconst tramp-cache-version (make-tramp-file-name :method "cache") @@ -608,7 +611,8 @@ example if the host configuration changes often, or if you plug your laptop to different networks frequently." :group 'tramp :version "29.1" - :type 'boolean) + :type 'boolean + :link '(tramp-info-link :tag "Tramp manual" tramp-completion-use-cache)) ;;;###tramp-autoload (defun tramp-parse-connection-properties (method) diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index 3cc8704aaba..dc3df09ec3b 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el @@ -56,6 +56,34 @@ SYNTAX can be one of the symbols `default' (default), (when syntax (customize-set-variable 'tramp-syntax syntax))) +;;;###tramp-autoload +(defun tramp-enable-method (method) + "Enable optional METHOD if possible." + (interactive + (list + (let ((methods nil)) + (mapatoms (lambda (sym) + (when-let ((fboundp sym) + (name (symbol-name sym)) + ;; It must match `tramp-enable-METHOD-method'. + ((string-match + (rx "tramp-enable-" + (group (regexp tramp-method-regexp)) + "-method") + name)) + (method (match-string 1 name))) + (push method methods)))) + (completing-read "Enable Tramp method: " methods + (lambda (method) + (not (assoc method tramp-methods))))))) + (when-let (((not (assoc method tramp-methods))) + (fn (intern (format "tramp-enable-%s-method" method))) + ((functionp fn))) + (funcall fn) + (message "Tramp method \"%s\" enabled" method))) + +(put 'tramp-enable-method 'minibuffer-action "enable") + ;; Use `match-buffers' starting with Emacs 29.1. ;;;###tramp-autoload (defun tramp-list-tramp-buffers () @@ -93,6 +121,7 @@ buffers, processes. KEEP-DEBUG non-nil preserves the debug buffer. KEEP-PASSWORD non-nil preserves the password cache. KEEP-PROCESSES non-nil preserves the asynchronous processes. When called interactively, a Tramp connection has to be selected." + (declare (completion tramp-active-command-completion-p)) (interactive ;; When interactive, select the Tramp remote identification. ;; Return nil when there is no Tramp connection. @@ -171,6 +200,7 @@ When called interactively, a Tramp connection has to be selected." (defun tramp-cleanup-all-connections () "Flush all Tramp internal objects. This includes password cache, file cache, connection cache, buffers." + (declare (completion tramp-active-command-completion-p)) (interactive) ;; Flush password cache. @@ -214,7 +244,8 @@ happens when at least one of the functions returns non-nil. The functions are called with `current-buffer' set." :group 'tramp :version "30.1" - :type 'hook) + :type 'hook + :link '(info-link :tag "Tramp manual" "(tramp) Cleanup remote connections")) (add-hook 'tramp-cleanup-some-buffers-hook #'buffer-file-name) @@ -267,6 +298,7 @@ functions are called with `current-buffer' set." A buffer is killed when it has a remote `default-directory', and one of the functions in `tramp-cleanup-some-buffers-hook' returns non-nil." + (declare (completion tramp-active-command-completion-p)) (interactive) ;; Remove all Tramp related connections. @@ -282,6 +314,7 @@ non-nil." ;;;###tramp-autoload (defun tramp-cleanup-all-buffers () "Kill all remote buffers." + (declare (completion tramp-active-command-completion-p)) (interactive) (let ((tramp-cleanup-some-buffers-hook '(always))) (tramp-cleanup-some-buffers))) @@ -308,13 +341,15 @@ expression which always matches." :group 'tramp :version "27.1" :type '(repeat (cons (choice :tag "Source regexp" regexp sexp) - (choice :tag "Target name" string (const nil))))) + (choice :tag "Target name" string (const nil)))) + :link '(info-link :tag "Tramp manual" "(tramp) Renaming remote files")) (defcustom tramp-confirm-rename-file-names t "Whether renaming a buffer file name must be confirmed." :group 'tramp :version "27.1" - :type 'boolean) + :type 'boolean + :link '(info-link :tag "Tramp manual" "(tramp) Renaming remote files")) (defun tramp-default-rename-file (string) "Determine default file name for renaming according to STRING. @@ -378,6 +413,7 @@ without confirmation if the prefix argument is non-nil. The remote connection identified by SOURCE is flushed by `tramp-cleanup-connection'." + (declare (completion tramp-active-command-completion-p)) (interactive (let ((connections (mapcar #'tramp-make-tramp-file-name (tramp-list-connections))) @@ -556,7 +592,8 @@ For details, see `tramp-rename-files'." (const "sudo") (const "doas") (const "run0") - (const "ksu"))) + (const "ksu")) + :link '(tramp-info-link :tag "Tramp manual" tramp-file-name-with-method)) (defun tramp-file-name-with-sudo (filename) "Convert FILENAME into a multi-hop file name with \"sudo\". diff --git a/lisp/net/tramp-container.el b/lisp/net/tramp-container.el index fd82e4516b8..62b49445da4 100644 --- a/lisp/net/tramp-container.el +++ b/lisp/net/tramp-container.el @@ -121,7 +121,8 @@ :group 'tramp :version "29.1" :type '(choice (const "docker") - (string))) + (string)) + :link '(tramp-info-link :tag "Tramp manual" tramp-docker-program)) ;;;###tramp-autoload (defcustom tramp-podman-program "podman" @@ -129,7 +130,8 @@ :group 'tramp :version "29.1" :type '(choice (const "podman") - (string))) + (string)) + :link '(tramp-info-link :tag "Tramp manual" tramp-podman-program)) ;;;###tramp-autoload (defcustom tramp-kubernetes-program "kubectl" @@ -137,7 +139,8 @@ :group 'tramp :version "29.1" :type '(choice (const "kubectl") - (string))) + (string)) + :link '(tramp-info-link :tag "Tramp manual" tramp-kubernetes-program)) (defcustom tramp-kubernetes-context nil "Context of Kubernetes. @@ -145,7 +148,8 @@ If it is nil, the default context will be used." :group 'tramp :version "30.1" :type '(choice (const :tag "Use default" nil) - (string))) + (string)) + :link '(info-link :tag "Tramp manual" "(tramp) Kubernetes setup")) (defcustom tramp-kubernetes-namespace nil "Namespace of Kubernetes. @@ -154,7 +158,8 @@ in the remote file name host part will override it." :group 'tramp :version "31.1" :type '(choice (const :tag "Use default" nil) - (string))) + (string)) + :link '(info-link :tag "Tramp manual" "(tramp) Kubernetes setup")) ;;;###tramp-autoload (defcustom tramp-toolbox-program "toolbox" @@ -162,7 +167,8 @@ in the remote file name host part will override it." :group 'tramp :version "30.1" :type '(choice (const "toolbox") - (string))) + (string)) + :link '(tramp-info-link :tag "Tramp manual" tramp-toolbox-program)) ;;;###tramp-autoload (defcustom tramp-distrobox-program "distrobox" @@ -170,7 +176,8 @@ in the remote file name host part will override it." :group 'tramp :version "30.1" :type '(choice (const "distrobox") - (string))) + (string)) + :link '(tramp-info-link :tag "Tramp manual" tramp-distrobox-program)) ;;;###tramp-autoload (defcustom tramp-flatpak-program "flatpak" @@ -178,7 +185,8 @@ in the remote file name host part will override it." :group 'tramp :version "30.1" :type '(choice (const "flatpak") - (string))) + (string)) + :link '(tramp-info-link :tag "Tramp manual" tramp-flatpak-program)) ;;;###tramp-autoload (defcustom tramp-apptainer-program "apptainer" @@ -186,14 +194,16 @@ in the remote file name host part will override it." :group 'tramp :version "30.1" :type '(choice (const "apptainer") - (string))) + (string)) + :link '(tramp-info-link :tag "Tramp manual" tramp-apptainer-program)) (defcustom tramp-nspawn-program "machinectl" "Name of the machinectl program." :group 'tramp :version "30.1" :type '(choice (const "machinectl") - (string))) + (string)) + :link '(tramp-info-link :tag "Tramp manual" tramp-nspawn-program)) ;;;###tramp-autoload (defconst tramp-docker-method "docker" diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el index c990d68bdf6..8954d06b9b5 100644 --- a/lisp/net/tramp-crypt.el +++ b/lisp/net/tramp-crypt.el @@ -84,13 +84,15 @@ "Name of the encfs program." :group 'tramp :version "28.1" - :type 'string) + :type 'string + :link '(info-link :tag "Tramp manual" "(tramp) Keeping files encrypted")) (defcustom tramp-crypt-encfsctl-program "encfsctl" "Name of the encfsctl program." :group 'tramp :version "28.1" - :type 'string) + :type 'string + :link '(info-link :tag "Tramp manual" "(tramp) Keeping files encrypted")) (defcustom tramp-crypt-encfs-option "--standard" "Configuration option for encfs. @@ -100,7 +102,8 @@ initializing a new encrypted remote directory." :group 'tramp :version "28.1" :type '(choice (const "--standard") - (const "--paranoia"))) + (const "--paranoia")) + :link '(info-link :tag "Tramp manual" "(tramp) Keeping files encrypted")) ;; We check only for encfs, assuming that encfsctl will be available ;; as well. The autoloaded value is nil, the check will run when @@ -131,7 +134,8 @@ They are completed by `M-x TAB' only when encryption support is enabled." "Whether to keep the encfs configuration file in the encrypted remote directory." :group 'tramp :version "28.1" - :type 'boolean) + :type 'boolean + :link '(info-link :tag "Tramp manual" "(tramp) Keeping files encrypted")) ;;;###tramp-autoload (defvar tramp-crypt-directories nil diff --git a/lisp/net/tramp-fuse.el b/lisp/net/tramp-fuse.el index 127303dfae1..7054a7691b2 100644 --- a/lisp/net/tramp-fuse.el +++ b/lisp/net/tramp-fuse.el @@ -233,7 +233,8 @@ It has the same meaning as `remote-file-name-inhibit-cache'.") "Whether fuse volumes shall be unmounted on cleanup." :group 'tramp :version "28.1" - :type 'boolean) + :type 'boolean + :link '(info-link :tag "Tramp manual" "(tramp) FUSE setup")) (defun tramp-fuse-cleanup (vec) "Cleanup fuse volume determined by VEC." diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 71d4f41cc5c..7b85ecc1192 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -142,7 +142,8 @@ (const "mtp") (const "nextcloud") (const "sftp") - (const "smb")))) + (const "smb"))) + :link '(tramp-info-link :tag "Tramp manual" tramp-gvfs-methods)) ;;;###tramp-autoload (defconst tramp-goa-methods '("gdrive" "nextcloud") diff --git a/lisp/net/tramp-integration.el b/lisp/net/tramp-integration.el index 8d039c25eae..af48714980f 100644 --- a/lisp/net/tramp-integration.el +++ b/lisp/net/tramp-integration.el @@ -272,6 +272,33 @@ NAME must be equal to `tramp-current-connection'." (delete (info-lookup->mode-cache 'symbol ',mode) (info-lookup->topic-cache 'symbol)))))))) +;;; Integration of new `:link' type in `defcustom': + +(define-widget 'tramp-info-link 'link + "A link to the Tramp info file." + :action 'tramp-widget-info-link-action) + +(defun tramp-widget-info-link-action (widget &optional _event) + "Open the info node specified by WIDGET. +It's value must be a Tramp user option, indexed in the Tramp manual via +`@vindex'." + (let* ((topic (widget-value widget)) + (pattern + (rx "\n*" (1+ " ") (0+ nonl) + (literal (if (stringp topic) topic (symbol-name topic))) + (0+ nonl) ":" (1+ (any "\t ")) + (group (0+ nonl)) + "." (0+ (any "\t\n ")) "(line" (1+ " ") + (group (1+ digit)) + ")"))) + (info "(tramp) Variable Index") + (goto-char (point-min)) + (when (re-search-forward pattern nil t) + (let ((nodename (concat "(tramp) " (match-string-no-properties 1))) + (line (string-to-number (match-string 2)))) + (info nodename) + (forward-line (- line 2)))))) + ;;; Integration of shortdoc.el: (tramp--with-startup diff --git a/lisp/net/tramp-message.el b/lisp/net/tramp-message.el index 06be96c3504..788c569327e 100644 --- a/lisp/net/tramp-message.el +++ b/lisp/net/tramp-message.el @@ -74,7 +74,8 @@ Any level x includes messages for all levels 1 .. x-1. The levels are 10 traces (huge) 11 call traces (maintainer only)." :group 'tramp - :type 'integer) + :type 'integer + :link '(info-link :tag "Tramp manual" "(tramp) Traces and Profiles")) (defcustom tramp-debug-to-file nil "Whether Tramp debug messages shall be saved to file. @@ -82,14 +83,16 @@ The debug file has the same name as the debug buffer, written to `tramp-compat-temporary-file-directory'." :group 'tramp :version "28.1" - :type 'boolean) + :type 'boolean + :link '(info-link :tag "Tramp manual" "(tramp) Traces and Profiles")) (defcustom tramp-debug-command-messages nil "Whether to write only command messages to the debug buffer. This increases `tramp-verbose' to 6 if necessary." :group 'tramp :version "30.1" - :type 'boolean) + :type 'boolean + :link '(info-link :tag "Tramp manual" "(tramp) Traces and Profiles")) (defconst tramp-debug-outline-regexp (rx ;; Timestamp. @@ -137,9 +140,8 @@ They are completed by `M-x TAB' only in Tramp debug buffers." (defun tramp-setup-debug-buffer () "Function to setup debug buffers." - (declare (tramp-suppress-trace t)) - ;; (declare (completion tramp-debug-buffer-command-completion-p) - ;; (tramp-suppress-trace t)) + (declare (completion tramp-debug-buffer-command-completion-p) + (tramp-suppress-trace t)) (interactive) (set-buffer-file-coding-system 'utf-8) (setq buffer-undo-list t) @@ -165,10 +167,6 @@ They are completed by `M-x TAB' only in Tramp debug buffers." (local-set-key "\M-n" 'clone-buffer) (add-hook 'clone-buffer-hook #'tramp-setup-debug-buffer nil 'local)) -(function-put - #'tramp-setup-debug-buffer 'completion-predicate - #'tramp-debug-buffer-command-completion-p) - (defun tramp-debug-buffer-name (vec) "A name for the debug buffer of VEC." (declare (tramp-suppress-trace t)) diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el index 03b0dedbb70..951a2a41817 100644 --- a/lisp/net/tramp-rclone.el +++ b/lisp/net/tramp-rclone.el @@ -46,7 +46,8 @@ "Name of the rclone program." :group 'tramp :version "27.1" - :type 'string) + :type 'string + :link '(info-link :tag "Tramp manual" "(tramp) Setup of rclone method")) ;;;###tramp-autoload (tramp--with-startup diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 61092ed8067..f04e74db89c 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -53,13 +53,15 @@ size is this value or above (up to `tramp-copy-size-limit' for out-of-band methods). If it is nil, no compression at all will be applied." :group 'tramp - :type '(choice (const nil) integer)) + :type '(choice (const nil) integer) + :link '(info-link :tag "Tramp manual" "(tramp) Inline methods")) (defcustom tramp-copy-size-limit 10240 "Maximum file size where inline copying is preferred to an out-of-the-band copy. If it is nil, out-of-the-band copy will be used without a check." :group 'tramp - :type '(choice (const nil) integer)) + :type '(choice (const nil) integer) + :link '(info-link :tag "Tramp manual" "(tramp) External methods")) ;;;###tramp-autoload (defcustom tramp-histfile-override "~/.tramp_history" @@ -76,7 +78,8 @@ the default storage location, e.g. \"$HOME/.sh_history\"." :version "25.2" :type '(choice (const :tag "Do not override HISTFILE" nil) (const :tag "Unset HISTFILE" t) - (string :tag "Redirect to a file"))) + (string :tag "Redirect to a file")) + :link '(info-link :tag "Tramp manual" "(tramp) Managing remote shell history")) (put 'tramp-histfile-override 'permanent-local t) @@ -116,7 +119,8 @@ Set it to `suppress' if you want to disable settings in your (const :tag "Don't set ControlMaster" nil) (const :tag "Suppress ControlMaster" suppress)) ;; Check with (safe-local-variable-p 'tramp-use-connection-share 'suppress) - :safe (lambda (val) (and (memq val '(t nil suppress)) t))) + :safe (lambda (val) (and (memq val '(t nil suppress)) t)) + :link '(info-link :tag "Tramp manual" "(tramp) Using ssh connection sharing")) (defvar tramp-ssh-controlmaster-options nil "Which ssh Control* arguments to use. @@ -154,7 +158,9 @@ The string is used in `tramp-methods'.") "Whether to use direct copying between two remote hosts." :group 'tramp :version "29.1" - :type 'boolean) + :type 'boolean + :link '(tramp-info-link :tag "Tramp manual" + tramp-use-scp-direct-remote-copying)) ;; Initialize `tramp-methods' with the supported methods. ;;;###tramp-autoload @@ -587,7 +593,8 @@ for tilde expansion. The extra arguments should typically prevent the shell from reading its init file." :group 'tramp :version "30.1" - :type '(alist :key-type regexp :value-type string)) + :type '(alist :key-type regexp :value-type string) + :link '(info-link :tag "Tramp manual" "(tramp) Remote shell setup")) ;;;###tramp-autoload (defconst tramp-actions-before-shell diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el index d9667ebfa5a..33b0543a8f5 100644 --- a/lisp/net/tramp-sshfs.el +++ b/lisp/net/tramp-sshfs.el @@ -44,7 +44,8 @@ "The sshfs mount command." :group 'tramp :version "28.1" - :type 'string) + :type 'string + :link '(info-link :tag "Tramp manual" "(tramp) Setup of sshfs method")) ;;;###tramp-autoload (defvar tramp-default-remote-shell) ;; Silence byte compiler. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index cdff2cf1ae8..a87dc149849 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -118,14 +118,19 @@ :group 'files :group 'comm :version "22.1" - :link '(custom-manual "(tramp)Top")) + :link '(info-link :tag "Tramp manual" "(tramp) Top")) ;; Maybe we need once a real Tramp mode, with key bindings etc. ;;;###autoload (defcustom tramp-mode t "Whether Tramp is enabled. -If it is set to nil, all remote file names are used literally." - :type 'boolean) +If it is set to nil, all remote file names are used literally. Don't +set it manually, use `inhibit-remote-files' or `without-remote-files' +instead." + :type 'boolean + :link '(tramp-info-link :tag "Tramp manual" tramp-mode) + :link '(info-link :tag "Emacs manual" "(emacs) Remote Files") + :link '(info-link :tag "Elisp manual" "(elisp) Magic File Names")) (defcustom tramp-backup-directory-alist nil "Alist of filename patterns and backup directory names. @@ -139,14 +144,16 @@ name prefix \(method, user, host) of file. gives the same backup policy for Tramp files on their hosts like the policy for local files." :type '(repeat (cons (regexp :tag "Regexp matching filename") - (directory :tag "Backup directory name")))) + (directory :tag "Backup directory name"))) + :link '(tramp-info-link :tag "Tramp manual" tramp-backup-directory-alist)) (defcustom tramp-auto-save-directory nil "Put auto-save files in this directory, if set. The idea is to use a local directory so that auto-saving is faster. This setting has precedence over `auto-save-file-name-transforms'." :type '(choice (const :tag "Use default" nil) - (directory :tag "Auto save directory name"))) + (directory :tag "Auto save directory name")) + :link '(tramp-info-link :tag "Tramp manual" tramp-auto-save-directory)) ;; Suppress `shell-file-name' for w32 systems. (defcustom tramp-encoding-shell @@ -176,7 +183,8 @@ If the shell must be forced to be interactive, see Note that this variable is not used for remote commands. There are mechanisms in tramp.el which automatically determine the right shell to use for the remote host." - :type '(file :must-match t)) + :type '(file :must-match t) + :link '(info-link :tag "Tramp manual" "(tramp) Remote shell setup")) ;; Suppress `shell-file-name' for w32 systems. (defcustom tramp-encoding-command-switch @@ -184,7 +192,8 @@ use for the remote host." (if (tramp-compat-funcall 'w32-shell-dos-semantics) "/c" "-c")) "Use this switch together with `tramp-encoding-shell' for local commands. See the variable `tramp-encoding-shell' for more information." - :type 'string) + :type 'string + :link '(info-link :tag "Tramp manual" "(tramp) Remote shell setup")) ;; Suppress `shell-file-name' for w32 systems. (defcustom tramp-encoding-command-interactive @@ -193,7 +202,8 @@ See the variable `tramp-encoding-shell' for more information." "Use this switch together with `tramp-encoding-shell' for interactive shells. See the variable `tramp-encoding-shell' for more information." :version "24.1" - :type '(choice (const nil) string)) + :type '(choice (const nil) string) + :link '(info-link :tag "Tramp manual" "(tramp) Remote shell setup")) ;; Since Emacs 26.1, `system-name' can return nil at build time if ;; Emacs is compiled with "--no-build-details". We do expect it to be @@ -429,7 +439,8 @@ Another host name is useful only in combination with "Default method to use for transferring files. See `tramp-methods' for possibilities. Also see `tramp-default-method-alist'." - :type 'string) + :type 'string + :link '(info-link :tag "Tramp manual" "(tramp) Default Method")) ;;;###tramp-autoload (defcustom tramp-default-method-alist nil @@ -448,7 +459,8 @@ empty string for the user name. See `tramp-methods' for a list of possibilities for METHOD." :type '(repeat (list (choice :tag "Host regexp" regexp sexp) (choice :tag "User regexp" regexp sexp) - (choice :tag "Method name" string (const nil))))) + (choice :tag "Method name" string (const nil)))) + :link '(info-link :tag "Tramp manual" "(tramp) Default Method")) (defconst tramp-default-method-marker "-" "Marker for default method in remote file names.") @@ -459,7 +471,8 @@ See `tramp-methods' for a list of possibilities for METHOD." "Default user to use for transferring files. It is nil by default; otherwise settings in configuration files like \"~/.ssh/config\" would be overwritten. Also see `tramp-default-user-alist'." - :type '(choice (const nil) string)) + :type '(choice (const nil) string) + :link '(info-link :tag "Tramp manual" "(tramp) Default User")) ;;;###tramp-autoload (defcustom tramp-default-user-alist nil @@ -476,12 +489,14 @@ If the file name does not specify the method, lookup is done using the empty string for the method name." :type '(repeat (list (choice :tag "Method regexp" regexp sexp) (choice :tag " Host regexp" regexp sexp) - (choice :tag " User name" string (const nil))))) + (choice :tag " User name" string (const nil)))) + :link '(info-link :tag "Tramp manual" "(tramp) Default User")) (defcustom tramp-default-host tramp-system-name "Default host to use for transferring files. Useful for su and sudo methods mostly." - :type 'string) + :type 'string + :link '(info-link :tag "Tramp manual" "(tramp) Default Host")) ;;;###tramp-autoload (defcustom tramp-default-host-alist nil @@ -499,7 +514,8 @@ empty string for the method name." :version "24.4" :type '(repeat (list (choice :tag "Method regexp" regexp sexp) (choice :tag " User regexp" regexp sexp) - (choice :tag " Host name" string (const nil))))) + (choice :tag " Host name" string (const nil)))) + :link '(info-link :tag "Tramp manual" "(tramp) Default Host")) (defcustom tramp-default-proxies-alist nil ;; FIXME: This is not an "alist", because its elements are not of @@ -525,17 +541,20 @@ evaluated. The result must be a string or nil, which is interpreted as a regular expression which always matches." :type '(repeat (list (choice :tag "Host regexp" regexp sexp) (choice :tag "User regexp" regexp sexp) - (choice :tag " Proxy name" string (const nil))))) + (choice :tag " Proxy name" string (const nil)))) + :link '(info-link :tag "Tramp manual" "(tramp) Multi-hops")) (defcustom tramp-save-ad-hoc-proxies nil "Whether to save ad-hoc proxies persistently." :version "24.3" - :type 'boolean) + :type 'boolean + :link '(info-link :tag "Tramp manual" "(tramp) Ad-hoc multi-hops")) (defcustom tramp-show-ad-hoc-proxies nil "Whether to show ad-hoc proxies in file names." :version "29.2" - :type 'boolean) + :type 'boolean + :link '(info-link :tag "Tramp manual" "(tramp) Ad-hoc multi-hops")) ;; For some obscure technical reasons, `system-name' on w32 returns ;; either lower case or upper case letters. See @@ -553,7 +572,8 @@ a restricted shell like \"rbash\". Those hosts can be used as proxies only, see `tramp-default-proxies-alist'. If the local host runs a restricted shell, it shall be added to this list, too." :version "27.1" - :type '(repeat (regexp :tag "Host regexp"))) + :type '(repeat (regexp :tag "Host regexp")) + :link '(info-link :tag "Tramp manual" "(tramp) Multi-hops")) ;;;###tramp-autoload (defcustom tramp-local-host-regexp @@ -571,7 +591,8 @@ host runs a restricted shell, it shall be added to this list, too." If the local host runs a chrooted environment, set this to nil." :version "30.1" :type '(choice (const :tag "Chrooted environment" nil) - (regexp :tag "Host regexp"))) + (regexp :tag "Host regexp")) + :link '(tramp-info-link :tag "Tramp manual" tramp-local-host-regexp)) (defvar tramp-completion-function-alist nil "Alist of methods for remote files. @@ -658,7 +679,8 @@ which should work well in many cases. This regexp must match both `tramp-initial-end-of-output' and `tramp-end-of-output'." - :type 'regexp) + :type 'regexp + :link '(tramp-info-link :tag "Tramp manual" tramp-shell-prompt-pattern)) (defcustom tramp-password-prompt-regexp (rx-to-string @@ -676,7 +698,8 @@ instead of altering this variable. The `sudo' program appears to insert a `^@' character into the prompt." :version "29.1" - :type 'regexp) + :type 'regexp + :link '(tramp-info-link :tag "Tramp manual" tramp-password-prompt-regexp)) (defcustom tramp-otp-password-prompt-regexp (rx-to-string @@ -687,7 +710,8 @@ The `sudo' program appears to insert a `^@' character into the prompt." "Regexp matching one-time password prompts. The regexp should match at end of buffer." :version "29.2" - :type 'regexp) + :type 'regexp + :link '(tramp-info-link :tag "Tramp manual" tramp-otp-password-prompt-regexp)) (defcustom tramp-wrong-passwd-regexp (rx bol (* nonl) @@ -704,7 +728,8 @@ The regexp should match at end of buffer." (* nonl)) "Regexp matching a `login failed' message. The regexp should match at end of buffer." - :type 'regexp) + :type 'regexp + :link '(tramp-info-link :tag "Tramp manual" tramp-wrong-passwd-regexp)) (defcustom tramp-yesno-prompt-regexp (rx "Are you sure you want to continue connecting (yes/no" @@ -733,7 +758,8 @@ Because Tramp wants to parse the output of the remote shell, it is easily confused by ANSI control escape sequences and suchlike. Often, shell init files conditionalize this setup based on the TERM environment variable." :group 'tramp - :type 'string) + :type 'string + :link '(tramp-info-link :tag "Tramp manual" tramp-terminal-type)) (defcustom tramp-terminal-prompt-regexp (rx (| (: "TERM = (" (* nonl) ")") @@ -853,7 +879,8 @@ Customize. See also `tramp-change-syntax'." (const :tag "XEmacs" separate)) :require 'tramp :initialize #'custom-initialize-default - :set #'tramp-set-syntax) + :set #'tramp-set-syntax + :link '(info-link :tag "Tramp manual" "(tramp) Change file name syntax")) (defun tramp-set-syntax (symbol value) "Set SYMBOL to value VALUE. @@ -1199,7 +1226,8 @@ initial value is overwritten by the car of `tramp-file-name-structure'.") (defcustom tramp-ignored-file-name-regexp nil "Regular expression matching file names that are not under Tramp's control." :version "27.1" - :type '(choice (const nil) regexp)) + :type '(choice (const nil) regexp) + :link '(tramp-info-link :tag "Tramp manual" tramp-ignored-file-name-regexp)) (defconst tramp-volume-letter-regexp (if (eq system-type 'windows-nt) @@ -1330,7 +1358,8 @@ in the third line of the code. Please raise a bug report via \\[tramp-bug] if your system needs this variable to be set as well." - :type '(choice (const nil) integer)) + :type '(choice (const nil) integer) + :link '(tramp-info-link :tag "Tramp manual" tramp-chunksize)) ;; Logging in to a remote host normally requires obtaining a pty. But ;; Emacs on macOS has `process-connection-type' set to nil by default, @@ -1340,7 +1369,8 @@ this variable to be set as well." "Overrides `process-connection-type' for connections from Tramp. Tramp binds `process-connection-type' to the value given here before opening a connection to a remote host." - :type '(choice (const nil) (const t) (const pipe) (const pty))) + :type '(choice (const nil) (const t) (const pipe) (const pty)) + :link '(tramp-info-link :tag "Tramp manual" tramp-process-connection-type)) (defcustom tramp-connection-timeout 60 "Defines the max time to wait for establishing a connection (in seconds). @@ -1404,7 +1434,8 @@ For a full discussion, see Info node `(tramp) Remote programs'." :type '(repeat (choice (const :tag "Default Directories" tramp-default-remote-path) (const :tag "Private Directories" tramp-own-remote-path) - (string :tag "Directory")))) + (string :tag "Directory"))) + :link '(info-link :tag "Tramp manual" "(tramp) Remote programs")) (defcustom tramp-remote-process-environment '("ENV=''" "TMOUT=0" "LC_CTYPE=''" @@ -1426,7 +1457,8 @@ The TERM environment variable should be set via `tramp-terminal-type'. The INSIDE_EMACS environment variable will automatically be set based on the Tramp and Emacs versions, and should not be set here." :version "26.1" - :type '(repeat string)) + :type '(repeat string) + :link '(info-link :tag "Tramp manual" "(tramp) Remote processes")) ;;; Internal Variables: @@ -1471,33 +1503,6 @@ calling HANDLER.") ;;; Internal functions which must come first: -(defun tramp-enable-method (method) - "Enable optional METHOD if possible." - (interactive - (list - (let ((methods nil)) - (mapatoms (lambda (sym) - (when-let ((fboundp sym) - (name (symbol-name sym)) - ;; It must match `tramp-enable-METHOD-method'. - ((string-match - (rx "tramp-enable-" - (group (regexp tramp-method-regexp)) - "-method") - name)) - (method (match-string 1 name))) - (push method methods)))) - (completing-read "Enable Tramp method: " methods - (lambda (method) - (not (assoc method tramp-methods))))))) - (when-let (((not (assoc method tramp-methods))) - (fn (intern (format "tramp-enable-%s-method" method))) - ((functionp fn))) - (funcall fn) - (message "Tramp method \"%s\" enabled" method))) - -(put 'tramp-enable-method 'minibuffer-action "enable") - ;; Conversion functions between external representation and ;; internal data structure. Convenience functions for internal ;; data structure. @@ -2706,6 +2711,17 @@ Run BODY." They are completed by `M-x TAB' only if the current buffer is remote." (tramp-tramp-file-p (tramp-get-default-directory buffer))) +;; This function takes action, when `read-extended-command-predicate' +;; is set to `command-completion-default-include-p'. +;;;###tramp-autoload +(defun tramp-active-command-completion-p (_symbol _buffer) + "A predicate for Tramp interactive commands. +They are completed by `M-x TAB' only if there's an active connection or buffer." + (declare (tramp-suppress-trace t)) + (or (and (hash-table-p tramp-cache-data) + (not (zerop (hash-table-count tramp-cache-data)))) + (tramp-list-remote-buffers))) + (defun tramp-connectable-p (vec-or-filename) "Check if it is possible to connect the remote host without side-effects. This is true, if either the remote host is already connected, or if we are @@ -3113,14 +3129,16 @@ for all methods. Resulting data are derived from default settings." (defcustom tramp-completion-multi-hop-methods nil "Methods for which to provide completions over multi-hop connections." :version "30.1" - :type '(repeat (string :tag "Method name"))) + :type '(repeat (string :tag "Method name")) + :link '(info-link :tag "Tramp manual" "(tramp) Ad-hoc multi-hops")) (defcustom tramp-completion-use-auth-sources auth-source-do-cache "Whether to use `auth-source-search' for completion of user and host names. This could be disturbing, if it requires a password / passphrase, as for \"~/.authinfo.gpg\"." :version "27.1" - :type 'boolean) + :type 'boolean + :link '(info-link :tag "Tramp manual" "(tramp) File name completion")) (defun tramp-parse-auth-sources (method) "Return a list of (user host) tuples allowed to access for METHOD. @@ -3457,7 +3475,8 @@ systems using NFS4_ACL, the permission string as returned from `stat' or `ls', is not sufficient to provide more fine-grained information. This variable is intended as connection-local variable." :version "30.1" - :type 'boolean) + :type 'boolean + :link '(tramp-info-link :tag "Tramp manual" tramp-use-file-attributes)) (defsubst tramp-use-file-attributes (vec) "Whether to use \"file-attributes\" file property for check." @@ -3732,7 +3751,9 @@ BODY is the backend specific code." (defcustom tramp-inhibit-errors-if-setting-file-attributes-fail nil "Whether to warn only if `tramp-*-set-file-{modes,times,uid-gid}' fails." :version "30.1" - :type 'boolean) + :type 'boolean + :link '(tramp-info-link :tag "Tramp manual" + tramp-inhibit-errors-if-setting-file-attributes-fail)) (defmacro tramp-skeleton-set-file-modes-times-uid-gid (filename &rest body) @@ -4367,7 +4388,9 @@ existing) are returned." (defcustom tramp-allow-unsafe-temporary-files nil "Whether root-owned auto-save, backup or lock files can be written to \"/tmp\"." :version "28.1" - :type 'boolean) + :type 'boolean + :link '(tramp-info-link :tag "Tramp manual" + tramp-allow-unsafe-temporary-files)) (defun tramp-handle-find-backup-file-name (filename) "Like `find-backup-file-name' for Tramp files." -- 2.39.5