@cindex method @option{davs}
@cindex @option{dav} method
@cindex @option{davs} method
-@cindex method @option{media}
-@cindex @option{media} method
+@cindex method @option{mtp}
+@cindex @option{mtp} method
On systems, which have installed @acronym{GVFS, the GNOME Virtual File
System}, its offered methods could be used by @value{tramp}. Examples
@file{@trampfn{afp,user@@host,/path/to/file}} (accessing Apple's AFP
file system), @file{@trampfn{dav,user@@host,/path/to/file}},
@file{@trampfn{davs,user@@host,/path/to/file}} (for WebDAV shares) and
-@file{@trampfn{media,device,/path/to/file}} (for media devices).
+@file{@trampfn{mtp,device,/path/to/file}} (for media devices).
@anchor{Quick Start Guide: GNOME Online Accounts based methods}
could produce unexpected behavior in case two files in the same
directory have the same @code{display-name}, such a situation must be avoided.
-@item @option{media}
-@cindex method @option{media}
-@cindex @option{media} method
+@item @option{mtp}
+@cindex method @option{mtp}
+@cindex @option{mtp} method
@cindex media
Media devices, like cell phones, tablets, cameras, can be accessed via
-the @option{media} method. Just the device name is needed in order to
+the @option{mtp} method. Just the device name is needed in order to
specify the host in the file name. However, the device must already
be connected via USB, before accessing it. Possible device names are
visible via host name completion, @ref{File name completion}.
@value{tramp} does not require a host name as part of the remote file
name when a single media device is connected. @value{tramp} instead
-uses @file{@trampfn{media,,}} as the default name.
+uses @file{@trampfn{mtp,,}} as the default name.
@item @option{nextcloud}
@cindex method @option{nextcloud}
@defopt tramp-gvfs-methods
This user option is a list of external methods for @acronym{GVFS}@.
By default, this list includes @option{afp}, @option{dav},
-@option{davs}, @option{gdrive}, @option{media}, @option{nextcloud} and
+@option{davs}, @option{gdrive}, @option{mtp}, @option{nextcloud} and
@option{sftp}. Other methods to include are @option{ftp},
@option{http}, @option{https} and @option{smb}. These methods are not
intended to be used directly as @acronym{GVFS}-based method. Instead,
the mouse pointer is in the tab line by scrolling left or right.
---
-*** New tab-line faces and options
+*** New tab-line faces and options.
The face 'tab-line-tab-special' is used for tabs whose buffers are
special, i.e. not file-backed. The face
'tab-line-tab-inactive-alternate' is used to display inactive tabs
** Tramp
+++
-*** New connection method "media", which allows accessing media devices
+*** New connection method "mtp", which allows accessing media devices
like cell phones, tablets or cameras.
+++
---
*** New user option 'authinfo-hide-elements'.
-This can be set to nil to inhibit hiding passwords in .authinfo files.
+This can be set to nil to inhibit hiding passwords in ".authinfo" files.
+++
*** A number of new string manipulation functions have been added.
+++
** 'truncate-string-ellipsis' now uses '…' by default.
Modes that use 'truncate-string-to-width' with non-nil, non-string
-argument 'ellipsis', will now indicate truncation using '…' when
+argument ELLIPSIS, will now indicate truncation using '…' when
the selected frame can display it, and using "..." otherwise.
+++
+++
** New utility function 'directory-empty-p'.
-This predicate tests whether a given filename is an accessible
+This predicate tests whether a given file name is an accessible
directory and whether it contains no other directories or files.
+++
+++
** Buffers can now be created with certain hooks disabled.
The functions 'get-buffer-create' and 'generate-new-buffer' accept a
-new optional argument 'inhibit-buffer-hooks'. If non-nil, the new
+new optional argument INHIBIT-BUFFER-HOOKS. If non-nil, the new
buffer does not run the hooks 'kill-buffer-hook',
'kill-buffer-query-functions', and 'buffer-list-update-hook'. This
avoids slowing down internal or temporary buffers that are never
** 'start-process-shell-command' and 'start-file-process-shell-command'
do not support the old calling conventions any longer.
-** Functions operating on local filenames now check that the filenames
+** Functions operating on local file names now check that the file names
don't contain any NUL bytes. This avoids subtle bugs caused by
-silently using only the part of the filename until the first NUL byte.
+silently using only the part of the file name until the first NUL byte.
** New coding-systems for EBCDIC variants.
New coding-systems 'ibm256', 'ibm273', 'ibm274', 'ibm277', 'ibm278',
;; The user option `tramp-gvfs-methods' contains the list of supported
;; connection methods. Per default, these are "afp", "dav", "davs",
-;; "gdrive", "media", "nextcloud" and "sftp".
+;; "gdrive", "mtp", "nextcloud" and "sftp".
;; "gdrive" and "nextcloud" connection methods require a respective
;; account in GNOME Online Accounts, with enabled "Files" service.
-;; The "media" connection method is responsible for media devices,
+;; The "mtp" connection method is responsible for media devices,
;; like cell phones, tablets, cameras etc. The device must already be
;; connected via USB, before accessing it.
;;;###tramp-autoload
(defcustom tramp-gvfs-methods
- '("afp" "dav" "davs" "gdrive" "media" "nextcloud" "sftp")
+ '("afp" "dav" "davs" "gdrive" "mtp" "nextcloud" "sftp")
"List of methods for remote files, accessed with GVFS."
:group 'tramp
:version "28.1"
(const "gdrive")
(const "http")
(const "https")
- (const "media")
+ (const "mtp")
(const "nextcloud")
(const "sftp")
(const "smb"))))
;;;###tramp-autoload
(defvar tramp-media-methods '("afc" "gphoto2" "mtp")
- "List of GVFS methods which are covered by the \"media\" method.
+ "List of GVFS methods which are covered by the \"mtp\" method.
They are checked during start up via
`tramp-gvfs-interface-remotevolumemonitor'.")
(if (tramp-tramp-file-p filename)
(with-parsed-tramp-file-name filename nil
;; Ensure that media devices are cached.
- (when (string-equal method "media")
+ (when (string-equal method "mtp")
(tramp-get-media-device v))
(with-tramp-connection-property v "activation-uri"
(setq localname "/")
(setq method "davs"
localname
(concat (tramp-gvfs-get-remote-prefix v) localname)))
- (when (string-equal "media" method)
+ (when (string-equal "mtp" method)
(when-let
((media (tramp-get-connection-property v "media-device" nil)))
(setq method (tramp-media-device-method media)
(uri (url-generic-parse-url (nth 5 volume)))
(method (url-type uri))
(vec (make-tramp-file-name
- :method "media"
+ :method "mtp"
;; A host name cannot contain spaces.
:host (tramp-compat-string-replace " " "_" (nth 1 volume))))
(media (make-tramp-media-device
tramp-gvfs-interface-remotevolumemonitor "List")))
(let* ((uri (url-generic-parse-url (nth 5 volume)))
(vec (make-tramp-file-name
- :method "media"
+ :method "mtp"
;; A host name cannot contain spaces.
:host (tramp-compat-string-replace " " "_" (nth 1 volume))))
(media (make-tramp-media-device
(tramp-set-connection-property vec "media-device" media)
(tramp-set-connection-property media "vector" vec))))
- ;; Adapt default host name, supporting /media:: when possible.
+ ;; Adapt default host name, supporting /mtp:: when possible.
(setq tramp-default-host-alist
(append
- `(("media" nil ,(if (= (length devices) 1) (car devices) "")))
+ `(("mtp" nil ,(if (= (length devices) 1) (car devices) "")))
(delete
- (assoc "media" tramp-default-host-alist)
+ (assoc "mtp" tramp-default-host-alist)
tramp-default-host-alist)))))
(defun tramp-parse-media-names (service)
;; Add completion functions for media devices.
(tramp-get-media-devices nil)
(tramp-set-completion-function
- "media"
+ "mtp"
(mapcar
(lambda (method) `(tramp-parse-media-names ,(format "_%s._tcp" method)))
tramp-media-methods))))