5.2 Alternative file name syntax

The syntax described in TRAMP file name conventions is the default syntax, which is active after Emacs startup. However, this can be changed.

Command: tramp-change-syntax syntax

This command changes the syntax TRAMP uses for remote file names. Beside the default value, syntax can be

  • simplified

    This remote file name syntax is similar to the syntax used by Ange FTP. A remote file name has the form /user@host:path/to/file. The user@ part is optional, and the method is determined by Selecting a default method.

  • separate

    This remote file name syntax originated in the XEmacs text editor. A remote file name has the form /[method/user@host]path/to/file. The method and user@ parts are optional.

Variable: tramp-file-name-regexp

This variable keeps a regexp which matches the selected remote file name syntax. Its value changes after every call of tramp-change-syntax. However, it is not recommended to use this variable in external packages, a call of file-remote-p is much more appropriate.