Variable: tramp-default-rename-alist

tramp-default-rename-alist is a customizable variable defined in tramp-cmds.el.gz.

Value

nil

Documentation

Default target for renaming remote buffer file names.

This is an alist of cons cells (SOURCE . TARGET). The first matching item specifies the target to be applied for renaming buffer file names from source via tramp-rename-files. SOURCE is a regular expressions, which matches a remote file name. TARGET must be a directory name, which could be remote (including remote directories Tramp infers by default, such as
"/method:user@host:").

TARGET can contain the patterns %m, %u or %h, which are replaced by the method name, user name or host name of SOURCE when calling tramp-rename-files.

SOURCE could also be a Lisp form, which will be evaluated. The result must be a string or nil, which is interpreted as a regular expression which always matches.

This variable was added, or its default value changed, in Emacs 27.1.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-cmds.el.gz
;;; Rename

(defcustom tramp-default-rename-alist nil
  "Default target for renaming remote buffer file names.
This is an alist of cons cells (SOURCE . TARGET).  The first
matching item specifies the target to be applied for renaming
buffer file names from source via `tramp-rename-files'.  SOURCE
is a regular expressions, which matches a remote file name.
TARGET must be a directory name, which could be remote (including
remote directories Tramp infers by default, such as
\"/method:user@host:\").

TARGET can contain the patterns %m, %u or %h, which are replaced
by the method name, user name or host name of SOURCE when calling
`tramp-rename-files'.

SOURCE could also be a Lisp form, which will be evaluated.  The
result must be a string or nil, which is interpreted as a regular
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))))
  :link '(info-link :tag "Tramp manual" "(tramp) Renaming remote files"))