aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2020-12-26 12:39:10 +0100
committerMichael Albinus2020-12-26 12:39:10 +0100
commitfd658b810056d41fad9edeba8bdba0594fc87867 (patch)
tree6534d79f932ab9795985018be4cecada94df72dc
parentf9264a3878ba6366aacdf80e3ebba3ba799415a6 (diff)
downloademacs-fd658b810056d41fad9edeba8bdba0594fc87867.tar.gz
emacs-fd658b810056d41fad9edeba8bdba0594fc87867.zip
Rename Tramp method "media" to "mtp" (Bug#45402)
* doc/misc/tramp.texi (Quick Start Guide, GVFS-based methods): Rename "media" to "mtp". (Bug#45402) * etc/NEWS: Rename Tramp method "media" to "mtp". Fix typos. * lisp/net/tramp-gvfs.el (tramp-gvfs-methods, tramp-media-methods) (tramp-gvfs-activation-uri) (tramp-gvfs-handler-volumeadded-volumeremoved) (tramp-get-media-devices, top): Rename "media" to "mtp". (Bug#45402)
-rw-r--r--doc/misc/tramp.texi18
-rw-r--r--etc/NEWS16
-rw-r--r--lisp/net/tramp-gvfs.el26
3 files changed, 30 insertions, 30 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index dd350f10c0b..2133dfec35a 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -558,8 +558,8 @@ of the local file name is the share exported by the remote host,
558@cindex method @option{davs} 558@cindex method @option{davs}
559@cindex @option{dav} method 559@cindex @option{dav} method
560@cindex @option{davs} method 560@cindex @option{davs} method
561@cindex method @option{media} 561@cindex method @option{mtp}
562@cindex @option{media} method 562@cindex @option{mtp} method
563 563
564On systems, which have installed @acronym{GVFS, the GNOME Virtual File 564On systems, which have installed @acronym{GVFS, the GNOME Virtual File
565System}, its offered methods could be used by @value{tramp}. Examples 565System}, its offered methods could be used by @value{tramp}. Examples
@@ -567,7 +567,7 @@ are @file{@trampfn{sftp,user@@host,/path/to/file}},
567@file{@trampfn{afp,user@@host,/path/to/file}} (accessing Apple's AFP 567@file{@trampfn{afp,user@@host,/path/to/file}} (accessing Apple's AFP
568file system), @file{@trampfn{dav,user@@host,/path/to/file}}, 568file system), @file{@trampfn{dav,user@@host,/path/to/file}},
569@file{@trampfn{davs,user@@host,/path/to/file}} (for WebDAV shares) and 569@file{@trampfn{davs,user@@host,/path/to/file}} (for WebDAV shares) and
570@file{@trampfn{media,device,/path/to/file}} (for media devices). 570@file{@trampfn{mtp,device,/path/to/file}} (for media devices).
571 571
572 572
573@anchor{Quick Start Guide: GNOME Online Accounts based methods} 573@anchor{Quick Start Guide: GNOME Online Accounts based methods}
@@ -1246,13 +1246,13 @@ Since Google Drive uses cryptic blob file names internally,
1246could produce unexpected behavior in case two files in the same 1246could produce unexpected behavior in case two files in the same
1247directory have the same @code{display-name}, such a situation must be avoided. 1247directory have the same @code{display-name}, such a situation must be avoided.
1248 1248
1249@item @option{media} 1249@item @option{mtp}
1250@cindex method @option{media} 1250@cindex method @option{mtp}
1251@cindex @option{media} method 1251@cindex @option{mtp} method
1252@cindex media 1252@cindex media
1253 1253
1254Media devices, like cell phones, tablets, cameras, can be accessed via 1254Media devices, like cell phones, tablets, cameras, can be accessed via
1255the @option{media} method. Just the device name is needed in order to 1255the @option{mtp} method. Just the device name is needed in order to
1256specify the host in the file name. However, the device must already 1256specify the host in the file name. However, the device must already
1257be connected via USB, before accessing it. Possible device names are 1257be connected via USB, before accessing it. Possible device names are
1258visible via host name completion, @ref{File name completion}. 1258visible via host name completion, @ref{File name completion}.
@@ -1263,7 +1263,7 @@ different parts of their file system.
1263 1263
1264@value{tramp} does not require a host name as part of the remote file 1264@value{tramp} does not require a host name as part of the remote file
1265name when a single media device is connected. @value{tramp} instead 1265name when a single media device is connected. @value{tramp} instead
1266uses @file{@trampfn{media,,}} as the default name. 1266uses @file{@trampfn{mtp,,}} as the default name.
1267 1267
1268@item @option{nextcloud} 1268@item @option{nextcloud}
1269@cindex method @option{nextcloud} 1269@cindex method @option{nextcloud}
@@ -1289,7 +1289,7 @@ that for security reasons refuse @command{ssh} connections.
1289@defopt tramp-gvfs-methods 1289@defopt tramp-gvfs-methods
1290This user option is a list of external methods for @acronym{GVFS}@. 1290This user option is a list of external methods for @acronym{GVFS}@.
1291By default, this list includes @option{afp}, @option{dav}, 1291By default, this list includes @option{afp}, @option{dav},
1292@option{davs}, @option{gdrive}, @option{media}, @option{nextcloud} and 1292@option{davs}, @option{gdrive}, @option{mtp}, @option{nextcloud} and
1293@option{sftp}. Other methods to include are @option{ftp}, 1293@option{sftp}. Other methods to include are @option{ftp},
1294@option{http}, @option{https} and @option{smb}. These methods are not 1294@option{http}, @option{https} and @option{smb}. These methods are not
1295intended to be used directly as @acronym{GVFS}-based method. Instead, 1295intended to be used directly as @acronym{GVFS}-based method. Instead,
diff --git a/etc/NEWS b/etc/NEWS
index a320acb5faf..d24d8b1f0a2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -384,7 +384,7 @@ If your mouse or trackpad supports it, you can now scroll tabs when
384the mouse pointer is in the tab line by scrolling left or right. 384the mouse pointer is in the tab line by scrolling left or right.
385 385
386--- 386---
387*** New tab-line faces and options 387*** New tab-line faces and options.
388The face 'tab-line-tab-special' is used for tabs whose buffers are 388The face 'tab-line-tab-special' is used for tabs whose buffers are
389special, i.e. not file-backed. The face 389special, i.e. not file-backed. The face
390'tab-line-tab-inactive-alternate' is used to display inactive tabs 390'tab-line-tab-inactive-alternate' is used to display inactive tabs
@@ -890,7 +890,7 @@ preferred over the eudcb-mab.el backend.
890** Tramp 890** Tramp
891 891
892+++ 892+++
893*** New connection method "media", which allows accessing media devices 893*** New connection method "mtp", which allows accessing media devices
894like cell phones, tablets or cameras. 894like cell phones, tablets or cameras.
895 895
896+++ 896+++
@@ -1465,7 +1465,7 @@ that makes it a valid button.
1465 1465
1466--- 1466---
1467*** New user option 'authinfo-hide-elements'. 1467*** New user option 'authinfo-hide-elements'.
1468This can be set to nil to inhibit hiding passwords in .authinfo files. 1468This can be set to nil to inhibit hiding passwords in ".authinfo" files.
1469 1469
1470+++ 1470+++
1471*** A number of new string manipulation functions have been added. 1471*** A number of new string manipulation functions have been added.
@@ -2009,7 +2009,7 @@ used in.
2009+++ 2009+++
2010** 'truncate-string-ellipsis' now uses '…' by default. 2010** 'truncate-string-ellipsis' now uses '…' by default.
2011Modes that use 'truncate-string-to-width' with non-nil, non-string 2011Modes that use 'truncate-string-to-width' with non-nil, non-string
2012argument 'ellipsis', will now indicate truncation using '…' when 2012argument ELLIPSIS, will now indicate truncation using '…' when
2013the selected frame can display it, and using "..." otherwise. 2013the selected frame can display it, and using "..." otherwise.
2014 2014
2015+++ 2015+++
@@ -2046,7 +2046,7 @@ of its file argument.
2046 2046
2047+++ 2047+++
2048** New utility function 'directory-empty-p'. 2048** New utility function 'directory-empty-p'.
2049This predicate tests whether a given filename is an accessible 2049This predicate tests whether a given file name is an accessible
2050directory and whether it contains no other directories or files. 2050directory and whether it contains no other directories or files.
2051 2051
2052+++ 2052+++
@@ -2221,7 +2221,7 @@ Until it is solved you could ignore such errors by performing
2221+++ 2221+++
2222** Buffers can now be created with certain hooks disabled. 2222** Buffers can now be created with certain hooks disabled.
2223The functions 'get-buffer-create' and 'generate-new-buffer' accept a 2223The functions 'get-buffer-create' and 'generate-new-buffer' accept a
2224new optional argument 'inhibit-buffer-hooks'. If non-nil, the new 2224new optional argument INHIBIT-BUFFER-HOOKS. If non-nil, the new
2225buffer does not run the hooks 'kill-buffer-hook', 2225buffer does not run the hooks 'kill-buffer-hook',
2226'kill-buffer-query-functions', and 'buffer-list-update-hook'. This 2226'kill-buffer-query-functions', and 'buffer-list-update-hook'. This
2227avoids slowing down internal or temporary buffers that are never 2227avoids slowing down internal or temporary buffers that are never
@@ -2231,9 +2231,9 @@ presented to users or passed on to other applications.
2231** 'start-process-shell-command' and 'start-file-process-shell-command' 2231** 'start-process-shell-command' and 'start-file-process-shell-command'
2232do not support the old calling conventions any longer. 2232do not support the old calling conventions any longer.
2233 2233
2234** Functions operating on local filenames now check that the filenames 2234** Functions operating on local file names now check that the file names
2235don't contain any NUL bytes. This avoids subtle bugs caused by 2235don't contain any NUL bytes. This avoids subtle bugs caused by
2236silently using only the part of the filename until the first NUL byte. 2236silently using only the part of the file name until the first NUL byte.
2237 2237
2238** New coding-systems for EBCDIC variants. 2238** New coding-systems for EBCDIC variants.
2239New coding-systems 'ibm256', 'ibm273', 'ibm274', 'ibm277', 'ibm278', 2239New coding-systems 'ibm256', 'ibm273', 'ibm274', 'ibm277', 'ibm278',
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 1722c53be05..fa1a90bc844 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -49,12 +49,12 @@
49 49
50;; The user option `tramp-gvfs-methods' contains the list of supported 50;; The user option `tramp-gvfs-methods' contains the list of supported
51;; connection methods. Per default, these are "afp", "dav", "davs", 51;; connection methods. Per default, these are "afp", "dav", "davs",
52;; "gdrive", "media", "nextcloud" and "sftp". 52;; "gdrive", "mtp", "nextcloud" and "sftp".
53 53
54;; "gdrive" and "nextcloud" connection methods require a respective 54;; "gdrive" and "nextcloud" connection methods require a respective
55;; account in GNOME Online Accounts, with enabled "Files" service. 55;; account in GNOME Online Accounts, with enabled "Files" service.
56 56
57;; The "media" connection method is responsible for media devices, 57;; The "mtp" connection method is responsible for media devices,
58;; like cell phones, tablets, cameras etc. The device must already be 58;; like cell phones, tablets, cameras etc. The device must already be
59;; connected via USB, before accessing it. 59;; connected via USB, before accessing it.
60 60
@@ -131,7 +131,7 @@
131 131
132;;;###tramp-autoload 132;;;###tramp-autoload
133(defcustom tramp-gvfs-methods 133(defcustom tramp-gvfs-methods
134 '("afp" "dav" "davs" "gdrive" "media" "nextcloud" "sftp") 134 '("afp" "dav" "davs" "gdrive" "mtp" "nextcloud" "sftp")
135 "List of methods for remote files, accessed with GVFS." 135 "List of methods for remote files, accessed with GVFS."
136 :group 'tramp 136 :group 'tramp
137 :version "28.1" 137 :version "28.1"
@@ -142,7 +142,7 @@
142 (const "gdrive") 142 (const "gdrive")
143 (const "http") 143 (const "http")
144 (const "https") 144 (const "https")
145 (const "media") 145 (const "mtp")
146 (const "nextcloud") 146 (const "nextcloud")
147 (const "sftp") 147 (const "sftp")
148 (const "smb")))) 148 (const "smb"))))
@@ -159,7 +159,7 @@
159 159
160;;;###tramp-autoload 160;;;###tramp-autoload
161(defvar tramp-media-methods '("afc" "gphoto2" "mtp") 161(defvar tramp-media-methods '("afc" "gphoto2" "mtp")
162 "List of GVFS methods which are covered by the \"media\" method. 162 "List of GVFS methods which are covered by the \"mtp\" method.
163They are checked during start up via 163They are checked during start up via
164`tramp-gvfs-interface-remotevolumemonitor'.") 164`tramp-gvfs-interface-remotevolumemonitor'.")
165 165
@@ -1639,7 +1639,7 @@ ID-FORMAT valid values are `string' and `integer'."
1639 (if (tramp-tramp-file-p filename) 1639 (if (tramp-tramp-file-p filename)
1640 (with-parsed-tramp-file-name filename nil 1640 (with-parsed-tramp-file-name filename nil
1641 ;; Ensure that media devices are cached. 1641 ;; Ensure that media devices are cached.
1642 (when (string-equal method "media") 1642 (when (string-equal method "mtp")
1643 (tramp-get-media-device v)) 1643 (tramp-get-media-device v))
1644 (with-tramp-connection-property v "activation-uri" 1644 (with-tramp-connection-property v "activation-uri"
1645 (setq localname "/") 1645 (setq localname "/")
@@ -1649,7 +1649,7 @@ ID-FORMAT valid values are `string' and `integer'."
1649 (setq method "davs" 1649 (setq method "davs"
1650 localname 1650 localname
1651 (concat (tramp-gvfs-get-remote-prefix v) localname))) 1651 (concat (tramp-gvfs-get-remote-prefix v) localname)))
1652 (when (string-equal "media" method) 1652 (when (string-equal "mtp" method)
1653 (when-let 1653 (when-let
1654 ((media (tramp-get-connection-property v "media-device" nil))) 1654 ((media (tramp-get-connection-property v "media-device" nil)))
1655 (setq method (tramp-media-device-method media) 1655 (setq method (tramp-media-device-method media)
@@ -2058,7 +2058,7 @@ and \"org.gtk.Private.RemoteVolumeMonitor.VolumeRemoved\" signals."
2058 (uri (url-generic-parse-url (nth 5 volume))) 2058 (uri (url-generic-parse-url (nth 5 volume)))
2059 (method (url-type uri)) 2059 (method (url-type uri))
2060 (vec (make-tramp-file-name 2060 (vec (make-tramp-file-name
2061 :method "media" 2061 :method "mtp"
2062 ;; A host name cannot contain spaces. 2062 ;; A host name cannot contain spaces.
2063 :host (tramp-compat-string-replace " " "_" (nth 1 volume)))) 2063 :host (tramp-compat-string-replace " " "_" (nth 1 volume))))
2064 (media (make-tramp-media-device 2064 (media (make-tramp-media-device
@@ -2363,7 +2363,7 @@ VEC is used only for traces."
2363 tramp-gvfs-interface-remotevolumemonitor "List"))) 2363 tramp-gvfs-interface-remotevolumemonitor "List")))
2364 (let* ((uri (url-generic-parse-url (nth 5 volume))) 2364 (let* ((uri (url-generic-parse-url (nth 5 volume)))
2365 (vec (make-tramp-file-name 2365 (vec (make-tramp-file-name
2366 :method "media" 2366 :method "mtp"
2367 ;; A host name cannot contain spaces. 2367 ;; A host name cannot contain spaces.
2368 :host (tramp-compat-string-replace " " "_" (nth 1 volume)))) 2368 :host (tramp-compat-string-replace " " "_" (nth 1 volume))))
2369 (media (make-tramp-media-device 2369 (media (make-tramp-media-device
@@ -2376,12 +2376,12 @@ VEC is used only for traces."
2376 (tramp-set-connection-property vec "media-device" media) 2376 (tramp-set-connection-property vec "media-device" media)
2377 (tramp-set-connection-property media "vector" vec)))) 2377 (tramp-set-connection-property media "vector" vec))))
2378 2378
2379 ;; Adapt default host name, supporting /media:: when possible. 2379 ;; Adapt default host name, supporting /mtp:: when possible.
2380 (setq tramp-default-host-alist 2380 (setq tramp-default-host-alist
2381 (append 2381 (append
2382 `(("media" nil ,(if (= (length devices) 1) (car devices) ""))) 2382 `(("mtp" nil ,(if (= (length devices) 1) (car devices) "")))
2383 (delete 2383 (delete
2384 (assoc "media" tramp-default-host-alist) 2384 (assoc "mtp" tramp-default-host-alist)
2385 tramp-default-host-alist))))) 2385 tramp-default-host-alist)))))
2386 2386
2387(defun tramp-parse-media-names (service) 2387(defun tramp-parse-media-names (service)
@@ -2498,7 +2498,7 @@ This uses \"avahi-browse\" in case D-Bus is not enabled in Avahi."
2498 ;; Add completion functions for media devices. 2498 ;; Add completion functions for media devices.
2499 (tramp-get-media-devices nil) 2499 (tramp-get-media-devices nil)
2500 (tramp-set-completion-function 2500 (tramp-set-completion-function
2501 "media" 2501 "mtp"
2502 (mapcar 2502 (mapcar
2503 (lambda (method) `(tramp-parse-media-names ,(format "_%s._tcp" method))) 2503 (lambda (method) `(tramp-parse-media-names ,(format "_%s._tcp" method)))
2504 tramp-media-methods)))) 2504 tramp-media-methods))))