emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/tramp b04c8bfc49: Tramp ELPA version 2.6.1 released


From: ELPA Syncer
Subject: [elpa] externals/tramp b04c8bfc49: Tramp ELPA version 2.6.1 released
Date: Thu, 29 Jun 2023 03:59:55 -0400 (EDT)

branch: externals/tramp
commit b04c8bfc49d4c41b8db461b837452887f4c259fe
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Tramp ELPA version 2.6.1 released
---
 README              |    4 +-
 test/tramp-tests.el | 1003 +++++++++++++++++++++++++++++----------------------
 texi/tramp.texi     |   20 +-
 texi/trampver.texi  |    2 +-
 tramp-compat.el     |    3 +-
 tramp-fuse.el       |   45 ++-
 tramp-gvfs.el       |    3 +-
 tramp-rclone.el     |   38 +-
 tramp-sh.el         |    3 +-
 tramp-sshfs.el      |    2 +-
 tramp.el            |   56 +--
 trampver.el         |    6 +-
 12 files changed, 681 insertions(+), 504 deletions(-)

diff --git a/README b/README
index c8a52d9a71..a27e105fdc 100644
--- a/README
+++ b/README
@@ -22,11 +22,11 @@ installed with, you must recompile the package:
 
    • Remove all byte-compiled Tramp files
 
-          $ rm -f ~/.emacs.d/elpa/tramp-2.6.0.5/tramp*.elc
+          $ rm -f ~/.emacs.d/elpa/tramp-2.6.1/tramp*.elc
 
    • Start Emacs with Tramp’s source files
 
-          $ emacs -L ~/.emacs.d/elpa/tramp-2.6.0.5 -l tramp
+          $ emacs -L ~/.emacs.d/elpa/tramp-2.6.1 -l tramp
 
      This should not give you the error.
 
diff --git a/test/tramp-tests.el b/test/tramp-tests.el
index c956e54c0c..6d06da261a 100644
--- a/test/tramp-tests.el
+++ b/test/tramp-tests.el
@@ -531,6 +531,7 @@ Also see `ignore'."
        tramp-default-method-alist
        tramp-default-user-alist
        tramp-default-host-alist
+       tramp-default-proxies-alist
        ;; Suppress method name check.
        (non-essential t)
        ;; Suppress check for multihops.
@@ -857,154 +858,203 @@ Also see `ignore'."
                   "/path/to/file"))
 
          ;; Multihop.
-         (should
-          (string-equal
-           (file-remote-p
-            "/method1:user1@host1|method2:user2@host2:/path/to/file")
-           "/method2:user2@host2:"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/method1:user1@host1|method2:user2@host2:/path/to/file" 'method)
-           "method2"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/method1:user1@host1|method2:user2@host2:/path/to/file" 'user)
-           "user2"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/method1:user1@host1|method2:user2@host2:/path/to/file" 'host)
-           "host2"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/method1:user1@host1|method2:user2@host2:/path/to/file"
-            'localname)
-           "/path/to/file"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/method1:user1@host1|method2:user2@host2:/path/to/file" 'hop)
-           (format "%s:%s@%s|"
-                   "method1" "user1" "host1")))
+         (dolist (tramp-show-ad-hoc-proxies '(nil t))
 
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/method1:user1@host1"
-             "|method2:user2@host2"
-             "|method3:user3@host3:/path/to/file"))
-           "/method3:user3@host3:"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/method1:user1@host1"
-             "|method2:user2@host2"
-             "|method3:user3@host3:/path/to/file")
-            'method)
-           "method3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/method1:user1@host1"
-             "|method2:user2@host2"
-             "|method3:user3@host3:/path/to/file")
-            'user)
-           "user3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/method1:user1@host1"
-             "|method2:user2@host2"
-             "|method3:user3@host3:/path/to/file")
-            'host)
-           "host3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/method1:user1@host1"
-             "|method2:user2@host2"
-             "|method3:user3@host3:/path/to/file")
-            'localname)
-           "/path/to/file"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/method1:user1@host1"
-             "|method2:user2@host2"
-             "|method3:user3@host3:/path/to/file")
-            'hop)
-           (format "%s:%s@%s|%s:%s@%s|"
-                   "method1" "user1" "host1" "method2" "user2" "host2")))
-
-         ;; Expand `tramp-default-method-alist'.
-         (add-to-list 'tramp-default-method-alist '("host1" "user1" "method1"))
-         (add-to-list 'tramp-default-method-alist '("host2" "user2" "method2"))
-         (add-to-list 'tramp-default-method-alist '("host3" "user3" "method3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/-:user1@host1"
-             "|-:user2@host2"
-             "|-:user3@host3:/path/to/file"))
-           "/method3:user3@host3:"))
-
-         ;; Expand `tramp-default-user-alist'.
-         (add-to-list 'tramp-default-user-alist '("method1" "host1" "user1"))
-         (add-to-list 'tramp-default-user-alist '("method2" "host2" "user2"))
-         (add-to-list 'tramp-default-user-alist '("method3" "host3" "user3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/method1:host1"
-             "|method2:host2"
-             "|method3:host3:/path/to/file"))
-           "/method3:user3@host3:"))
-
-         ;; Expand `tramp-default-host-alist'.
-         (add-to-list 'tramp-default-host-alist '("method1" "user1" "host1"))
-         (add-to-list 'tramp-default-host-alist '("method2" "user2" "host2"))
-         (add-to-list 'tramp-default-host-alist '("method3" "user3" "host3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/method1:user1@"
-             "|method2:user2@"
-             "|method3:user3@:/path/to/file"))
-           "/method3:user3@host3:"))
-
-         ;; Ad-hoc user name and host name expansion.
-         (setq tramp-default-method-alist nil
-               tramp-default-user-alist nil
-               tramp-default-host-alist nil)
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/method1:user1@host1"
-             "|method2:user2@"
-             "|method3:user3@:/path/to/file"))
-           "/method3:user3@host1:"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/method1:%u@%h"
-             "|method2:user2@host2"
-             "|method3:%u@%h"
-             "|method4:user4%domain4@host4#1234:/path/to/file"))
-           "/method4:user4%domain4@host4#1234:")))
+           ;; Explicit settings in `tramp-default-proxies-alist'
+           ;; shouldn't show hops.
+           (setq tramp-default-proxies-alist
+                 '(("^host2$" "^user2$" "/method1:user1@host1:")))
+           (should
+            (string-equal
+             (file-remote-p "/method2:user2@host2:/path/to/file")
+             "/method2:user2@host2:"))
+           (setq tramp-default-proxies-alist nil)
+
+           ;; Ad-hoc settings.
+           (should
+            (string-equal
+             (file-remote-p
+              "/method1:user1@host1|method2:user2@host2:/path/to/file")
+             (if tramp-show-ad-hoc-proxies
+                 "/method1:user1@host1|method2:user2@host2:"
+               "/method2:user2@host2:")))
+           (should
+            (string-equal
+             (file-remote-p
+              "/method1:user1@host1|method2:user2@host2:/path/to/file" 'method)
+             "method2"))
+           (should
+            (string-equal
+             (file-remote-p
+              "/method1:user1@host1|method2:user2@host2:/path/to/file" 'user)
+             "user2"))
+           (should
+            (string-equal
+             (file-remote-p
+              "/method1:user1@host1|method2:user2@host2:/path/to/file" 'host)
+             "host2"))
+           (should
+            (string-equal
+             (file-remote-p
+              "/method1:user1@host1|method2:user2@host2:/path/to/file"
+              'localname)
+             "/path/to/file"))
+           (should
+            (string-equal
+             (file-remote-p
+              "/method1:user1@host1|method2:user2@host2:/path/to/file" 'hop)
+             (format "%s:%s@%s|"
+                     "method1" "user1" "host1")))
+
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/method1:user1@host1"
+               "|method2:user2@host2"
+               "|method3:user3@host3:/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/method1:user1@host1"
+                  "|method2:user2@host2"
+                  "|method3:user3@host3:")
+               "/method3:user3@host3:")))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/method1:user1@host1"
+               "|method2:user2@host2"
+               "|method3:user3@host3:/path/to/file")
+              'method)
+             "method3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/method1:user1@host1"
+               "|method2:user2@host2"
+               "|method3:user3@host3:/path/to/file")
+              'user)
+             "user3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/method1:user1@host1"
+               "|method2:user2@host2"
+               "|method3:user3@host3:/path/to/file")
+              'host)
+             "host3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/method1:user1@host1"
+               "|method2:user2@host2"
+               "|method3:user3@host3:/path/to/file")
+              'localname)
+             "/path/to/file"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/method1:user1@host1"
+               "|method2:user2@host2"
+               "|method3:user3@host3:/path/to/file")
+              'hop)
+             (format "%s:%s@%s|%s:%s@%s|"
+                     "method1" "user1" "host1" "method2" "user2" "host2")))
+
+           ;; Expand `tramp-default-method-alist'.
+           (add-to-list
+            'tramp-default-method-alist '("host1" "user1" "method1"))
+           (add-to-list
+            'tramp-default-method-alist '("host2" "user2" "method2"))
+           (add-to-list
+            'tramp-default-method-alist '("host3" "user3" "method3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/-:user1@host1"
+               "|-:user2@host2"
+               "|-:user3@host3:/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/method1:user1@host1"
+                  "|method2:user2@host2"
+                  "|method3:user3@host3:")
+               "/method3:user3@host3:")))
+
+           ;; Expand `tramp-default-user-alist'.
+           (add-to-list 'tramp-default-user-alist '("method1" "host1" "user1"))
+           (add-to-list 'tramp-default-user-alist '("method2" "host2" "user2"))
+           (add-to-list 'tramp-default-user-alist '("method3" "host3" "user3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/method1:host1"
+               "|method2:host2"
+               "|method3:host3:/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/method1:user1@host1"
+                  "|method2:user2@host2"
+                  "|method3:user3@host3:")
+               "/method3:user3@host3:")))
+
+           ;; Expand `tramp-default-host-alist'.
+           (add-to-list 'tramp-default-host-alist '("method1" "user1" "host1"))
+           (add-to-list 'tramp-default-host-alist '("method2" "user2" "host2"))
+           (add-to-list 'tramp-default-host-alist '("method3" "user3" "host3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/method1:user1@"
+               "|method2:user2@"
+               "|method3:user3@:/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/method1:user1@host1"
+                  "|method2:user2@host2"
+                  "|method3:user3@host3:")
+               "/method3:user3@host3:")))
+
+           ;; Ad-hoc user name and host name expansion.
+           (setq tramp-default-method-alist nil
+                 tramp-default-user-alist nil
+                 tramp-default-host-alist nil)
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/method1:user1@host1"
+               "|method2:user2@"
+               "|method3:user3@:/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/method1:user1@host1"
+                  "|method2:user2@host1"
+                  "|method3:user3@host1:")
+               "/method3:user3@host1:")))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/method1:%u@%h"
+               "|method2:user2@host2"
+               "|method3:%u@%h"
+               "|method4:user4%domain4@host4#1234:/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/method1:user2@host2"
+                  "|method2:user2@host2"
+                  "|method3:user4@host4"
+                  "|method4:user4%domain4@host4#1234:")
+               "/method4:user4%domain4@host4#1234:")))))
 
       ;; Exit.
       (tramp-change-syntax syntax))))
@@ -1017,6 +1067,7 @@ Also see `ignore'."
        (tramp-default-host "default-host")
        tramp-default-user-alist
        tramp-default-host-alist
+       tramp-default-proxies-alist
        ;; Suppress method name check.
        (non-essential t)
        ;; Suppress check for multihops.
@@ -1188,137 +1239,178 @@ Also see `ignore'."
                   "/path/to/file"))
 
          ;; Multihop.
-         (should
-          (string-equal
-           (file-remote-p "/user1@host1|user2@host2:/path/to/file")
-           "/user2@host2:"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/user1@host1|user2@host2:/path/to/file" 'method)
-           "default-method"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/user1@host1|user2@host2:/path/to/file" 'user)
-           "user2"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/user1@host1|user2@host2:/path/to/file" 'host)
-           "host2"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/user1@host1|user2@host2:/path/to/file" 'localname)
-           "/path/to/file"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/user1@host1|user2@host2:/path/to/file" 'hop)
-           (format "%s@%s|" "user1" "host1")))
+         (dolist (tramp-show-ad-hoc-proxies '(nil t))
 
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/user1@host1"
-             "|user2@host2"
-             "|user3@host3:/path/to/file"))
-           "/user3@host3:"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/user1@host1"
-             "|user2@host2"
-             "|user3@host3:/path/to/file")
-            'method)
-           "default-method"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/user1@host1"
-             "|user2@host2"
-             "|user3@host3:/path/to/file")
-            'user)
-           "user3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/user1@host1"
-             "|user2@host2"
-             "|user3@host3:/path/to/file")
-            'host)
-           "host3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/user1@host1"
-             "|user2@host2"
-             "|user3@host3:/path/to/file")
-            'localname)
-           "/path/to/file"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/user1@host1"
-             "|user2@host2"
-             "|user3@host3:/path/to/file")
-            'hop)
-           (format "%s@%s|%s@%s|"
-                   "user1" "host1" "user2" "host2")))
-
-         ;; Expand `tramp-default-user-alist'.
-         (add-to-list 'tramp-default-user-alist '(nil "host1" "user1"))
-         (add-to-list 'tramp-default-user-alist '(nil "host2" "user2"))
-         (add-to-list 'tramp-default-user-alist '(nil "host3" "user3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/host1"
-             "|host2"
-             "|host3:/path/to/file"))
-           "/user3@host3:"))
-
-         ;; Expand `tramp-default-host-alist'.
-         (add-to-list 'tramp-default-host-alist '(nil "user1" "host1"))
-         (add-to-list 'tramp-default-host-alist '(nil "user2" "host2"))
-         (add-to-list 'tramp-default-host-alist '(nil "user3" "host3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/user1@"
-             "|user2@"
-             "|user3@:/path/to/file"))
-           "/user3@host3:"))
-
-         ;; Ad-hoc user name and host name expansion.
-         (setq tramp-default-user-alist nil
-               tramp-default-host-alist nil)
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/user1@host1"
-             "|user2@"
-             "|user3@:/path/to/file"))
-           "/user3@host1:"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/%u@%h"
-             "|user2@host2"
-             "|%u@%h"
-             "|user4%domain4@host4#1234:/path/to/file"))
-           "/user4%domain4@host4#1234:")))
+           ;; Explicit settings in `tramp-default-proxies-alist'
+           ;; shouldn't show hops.
+           (setq tramp-default-proxies-alist
+                 '(("^host2$" "^user2$" "/user1@host1:")))
+           (should
+            (string-equal
+             (file-remote-p "/user2@host2:/path/to/file")
+             "/user2@host2:"))
+           (setq tramp-default-proxies-alist nil)
+
+           ;; Ad-hoc settings.
+           (should
+            (string-equal
+             (file-remote-p "/user1@host1|user2@host2:/path/to/file")
+             (if tramp-show-ad-hoc-proxies
+                 "/user1@host1|user2@host2:"
+               "/user2@host2:")))
+           (should
+            (string-equal
+             (file-remote-p
+              "/user1@host1|user2@host2:/path/to/file" 'method)
+             "default-method"))
+           (should
+            (string-equal
+             (file-remote-p
+              "/user1@host1|user2@host2:/path/to/file" 'user)
+             "user2"))
+           (should
+            (string-equal
+             (file-remote-p
+              "/user1@host1|user2@host2:/path/to/file" 'host)
+             "host2"))
+           (should
+            (string-equal
+             (file-remote-p
+              "/user1@host1|user2@host2:/path/to/file" 'localname)
+             "/path/to/file"))
+           (should
+            (string-equal
+             (file-remote-p
+              "/user1@host1|user2@host2:/path/to/file" 'hop)
+             (format "%s@%s|" "user1" "host1")))
+
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/user1@host1"
+               "|user2@host2"
+               "|user3@host3:/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/user1@host1"
+                  "|user2@host2"
+                  "|user3@host3:")
+               "/user3@host3:")))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/user1@host1"
+               "|user2@host2"
+               "|user3@host3:/path/to/file")
+              'method)
+             "default-method"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/user1@host1"
+               "|user2@host2"
+               "|user3@host3:/path/to/file")
+              'user)
+             "user3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/user1@host1"
+               "|user2@host2"
+               "|user3@host3:/path/to/file")
+              'host)
+             "host3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/user1@host1"
+               "|user2@host2"
+               "|user3@host3:/path/to/file")
+              'localname)
+             "/path/to/file"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/user1@host1"
+               "|user2@host2"
+               "|user3@host3:/path/to/file")
+              'hop)
+             (format "%s@%s|%s@%s|"
+                     "user1" "host1" "user2" "host2")))
+
+           ;; Expand `tramp-default-user-alist'.
+           (add-to-list 'tramp-default-user-alist '(nil "host1" "user1"))
+           (add-to-list 'tramp-default-user-alist '(nil "host2" "user2"))
+           (add-to-list 'tramp-default-user-alist '(nil "host3" "user3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/host1"
+               "|host2"
+               "|host3:/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/user1@host1"
+                  "|user2@host2"
+                  "|user3@host3:")
+               "/user3@host3:")))
+
+           ;; Expand `tramp-default-host-alist'.
+           (add-to-list 'tramp-default-host-alist '(nil "user1" "host1"))
+           (add-to-list 'tramp-default-host-alist '(nil "user2" "host2"))
+           (add-to-list 'tramp-default-host-alist '(nil "user3" "host3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/user1@"
+               "|user2@"
+               "|user3@:/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/user1@host1"
+                  "|user2@host2"
+                  "|user3@host3:")
+               "/user3@host3:")))
+
+           ;; Ad-hoc user name and host name expansion.
+           (setq tramp-default-user-alist nil
+                 tramp-default-host-alist nil)
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/user1@host1"
+               "|user2@"
+               "|user3@:/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/user1@host1"
+                  "|user2@host1"
+                  "|user3@host1:")
+               "/user3@host1:")))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/%u@%h"
+               "|user2@host2"
+               "|%u@%h"
+               "|user4%domain4@host4#1234:/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/user2@host2"
+                  "|user2@host2"
+                  "|user4@host4"
+                  "|user4%domain4@host4#1234:")
+               "/user4%domain4@host4#1234:")))))
 
       ;; Exit.
       (tramp-change-syntax syntax))))
@@ -1332,6 +1424,7 @@ Also see `ignore'."
        tramp-default-method-alist
        tramp-default-user-alist
        tramp-default-host-alist
+       tramp-default-proxies-alist
        ;; Suppress method name check.
        (non-essential t)
        ;; Suppress check for multihops.
@@ -1804,154 +1897,203 @@ Also see `ignore'."
                   "/path/to/file"))
 
          ;; Multihop.
-         (should
-          (string-equal
-           (file-remote-p
-            "/[method1/user1@host1|method2/user2@host2]/path/to/file")
-           "/[method2/user2@host2]"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/[method1/user1@host1|method2/user2@host2]/path/to/file" 'method)
-           "method2"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/[method1/user1@host1|method2/user2@host2]/path/to/file" 'user)
-           "user2"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/[method1/user1@host1|method2/user2@host2]/path/to/file" 'host)
-           "host2"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/[method1/user1@host1|method2/user2@host2]/path/to/file"
-            'localname)
-           "/path/to/file"))
-         (should
-          (string-equal
-           (file-remote-p
-            "/[method1/user1@host1|method2/user2@host2]/path/to/file" 'hop)
-           (format "%s/%s@%s|"
-                   "method1" "user1" "host1")))
+         (dolist (tramp-show-ad-hoc-proxies '(nil t))
 
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/[method1/user1@host1"
-             "|method2/user2@host2"
-             "|method3/user3@host3]/path/to/file"))
-           "/[method3/user3@host3]"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/[method1/user1@host1"
-             "|method2/user2@host2"
-             "|method3/user3@host3]/path/to/file")
-            'method)
-           "method3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/[method1/user1@host1"
-             "|method2/user2@host2"
-             "|method3/user3@host3]/path/to/file")
-            'user)
-           "user3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/[method1/user1@host1"
-             "|method2/user2@host2"
-             "|method3/user3@host3]/path/to/file")
-            'host)
-           "host3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/[method1/user1@host1"
-             "|method2/user2@host2"
-             "|method3/user3@host3]/path/to/file")
-            'localname)
-           "/path/to/file"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/[method1/user1@host1"
-             "|method2/user2@host2"
-             "|method3/user3@host3]/path/to/file")
-            'hop)
-           (format "%s/%s@%s|%s/%s@%s|"
-                   "method1" "user1" "host1" "method2" "user2" "host2")))
-
-         ;; Expand `tramp-default-method-alist'.
-         (add-to-list 'tramp-default-method-alist '("host1" "user1" "method1"))
-         (add-to-list 'tramp-default-method-alist '("host2" "user2" "method2"))
-         (add-to-list 'tramp-default-method-alist '("host3" "user3" "method3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/[/user1@host1"
-             "|/user2@host2"
-             "|/user3@host3]/path/to/file"))
-           "/[method3/user3@host3]"))
-
-         ;; Expand `tramp-default-user-alist'.
-         (add-to-list 'tramp-default-user-alist '("method1" "host1" "user1"))
-         (add-to-list 'tramp-default-user-alist '("method2" "host2" "user2"))
-         (add-to-list 'tramp-default-user-alist '("method3" "host3" "user3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/[method1/host1"
-             "|method2/host2"
-             "|method3/host3]/path/to/file"))
-           "/[method3/user3@host3]"))
-
-         ;; Expand `tramp-default-host-alist'.
-         (add-to-list 'tramp-default-host-alist '("method1" "user1" "host1"))
-         (add-to-list 'tramp-default-host-alist '("method2" "user2" "host2"))
-         (add-to-list 'tramp-default-host-alist '("method3" "user3" "host3"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/[method1/user1@"
-             "|method2/user2@"
-             "|method3/user3@]/path/to/file"))
-           "/[method3/user3@host3]"))
-
-         ;; Ad-hoc user name and host name expansion.
-         (setq tramp-default-method-alist nil
-               tramp-default-user-alist nil
-               tramp-default-host-alist nil)
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/[method1/user1@host1"
-             "|method2/user2@"
-             "|method3/user3@]/path/to/file"))
-           "/[method3/user3@host1]"))
-         (should
-          (string-equal
-           (file-remote-p
-            (concat
-             "/[method1/%u@%h"
-             "|method2/user2@host2"
-             "|method3/%u@%h"
-             "|method4/user4%domain4@host4#1234]/path/to/file"))
-           "/[method4/user4%domain4@host4#1234]")))
+           ;; Explicit settings in `tramp-default-proxies-alist'
+           ;; shouldn't show hops.
+           (setq tramp-default-proxies-alist
+                 '(("^host2$" "^user2$" "/[method1/user1@host1]")))
+           (should
+            (string-equal
+             (file-remote-p "/[method2/user2@host2]/path/to/file")
+             "/[method2/user2@host2]"))
+           (setq tramp-default-proxies-alist nil)
+
+           ;; Ad-hoc settings.
+           (should
+            (string-equal
+             (file-remote-p
+              "/[method1/user1@host1|method2/user2@host2]/path/to/file")
+             (if tramp-show-ad-hoc-proxies
+                 "/[method1/user1@host1|method2/user2@host2]"
+               "/[method2/user2@host2]")))
+           (should
+            (string-equal
+             (file-remote-p
+              "/[method1/user1@host1|method2/user2@host2]/path/to/file" 
'method)
+             "method2"))
+           (should
+            (string-equal
+             (file-remote-p
+              "/[method1/user1@host1|method2/user2@host2]/path/to/file" 'user)
+             "user2"))
+           (should
+            (string-equal
+             (file-remote-p
+              "/[method1/user1@host1|method2/user2@host2]/path/to/file" 'host)
+             "host2"))
+           (should
+            (string-equal
+             (file-remote-p
+              "/[method1/user1@host1|method2/user2@host2]/path/to/file"
+              'localname)
+             "/path/to/file"))
+           (should
+            (string-equal
+             (file-remote-p
+              "/[method1/user1@host1|method2/user2@host2]/path/to/file" 'hop)
+             (format "%s/%s@%s|"
+                     "method1" "user1" "host1")))
+
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/[method1/user1@host1"
+               "|method2/user2@host2"
+               "|method3/user3@host3]/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/[method1/user1@host1"
+                  "|method2/user2@host2"
+                  "|method3/user3@host3]")
+               "/[method3/user3@host3]")))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/[method1/user1@host1"
+               "|method2/user2@host2"
+               "|method3/user3@host3]/path/to/file")
+              'method)
+             "method3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/[method1/user1@host1"
+               "|method2/user2@host2"
+               "|method3/user3@host3]/path/to/file")
+              'user)
+             "user3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/[method1/user1@host1"
+               "|method2/user2@host2"
+               "|method3/user3@host3]/path/to/file")
+              'host)
+             "host3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/[method1/user1@host1"
+               "|method2/user2@host2"
+               "|method3/user3@host3]/path/to/file")
+              'localname)
+             "/path/to/file"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/[method1/user1@host1"
+               "|method2/user2@host2"
+               "|method3/user3@host3]/path/to/file")
+              'hop)
+             (format "%s/%s@%s|%s/%s@%s|"
+                     "method1" "user1" "host1" "method2" "user2" "host2")))
+
+           ;; Expand `tramp-default-method-alist'.
+           (add-to-list
+            'tramp-default-method-alist '("host1" "user1" "method1"))
+           (add-to-list
+            'tramp-default-method-alist '("host2" "user2" "method2"))
+           (add-to-list
+            'tramp-default-method-alist '("host3" "user3" "method3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/[/user1@host1"
+               "|/user2@host2"
+               "|/user3@host3]/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/[method1/user1@host1"
+                  "|method2/user2@host2"
+                  "|method3/user3@host3]")
+               "/[method3/user3@host3]")))
+
+           ;; Expand `tramp-default-user-alist'.
+           (add-to-list 'tramp-default-user-alist '("method1" "host1" "user1"))
+           (add-to-list 'tramp-default-user-alist '("method2" "host2" "user2"))
+           (add-to-list 'tramp-default-user-alist '("method3" "host3" "user3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/[method1/host1"
+               "|method2/host2"
+               "|method3/host3]/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/[method1/user1@host1"
+                  "|method2/user2@host2"
+                  "|method3/user3@host3]")
+               "/[method3/user3@host3]")))
+
+           ;; Expand `tramp-default-host-alist'.
+           (add-to-list 'tramp-default-host-alist '("method1" "user1" "host1"))
+           (add-to-list 'tramp-default-host-alist '("method2" "user2" "host2"))
+           (add-to-list 'tramp-default-host-alist '("method3" "user3" "host3"))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/[method1/user1@"
+               "|method2/user2@"
+               "|method3/user3@]/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/[method1/user1@host1"
+                  "|method2/user2@host2"
+                  "|method3/user3@host3]")
+               "/[method3/user3@host3]")))
+
+           ;; Ad-hoc user name and host name expansion.
+           (setq tramp-default-method-alist nil
+                 tramp-default-user-alist nil
+                 tramp-default-host-alist nil)
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/[method1/user1@host1"
+               "|method2/user2@"
+               "|method3/user3@]/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/[method1/user1@host1"
+                  "|method2/user2@host1"
+                  "|method3/user3@host1]")
+               "/[method3/user3@host1]")))
+           (should
+            (string-equal
+             (file-remote-p
+              (concat
+               "/[method1/%u@%h"
+               "|method2/user2@host2"
+               "|method3/%u@%h"
+               "|method4/user4%domain4@host4#1234]/path/to/file"))
+             (if tramp-show-ad-hoc-proxies
+                 (concat
+                  "/[method1/user2@host2"
+                  "|method2/user2@host2"
+                  "|method3/user4@host4"
+                  "|method4/user4%domain4@host4#1234]")
+               "/[method4/user4%domain4@host4#1234]")))))
 
       ;; Exit.
       (tramp-change-syntax syntax))))
@@ -2524,7 +2666,7 @@ This checks also `file-name-as-directory', 
`file-name-directory',
            ;; Do not overwrite if excluded.
            (cl-letf (((symbol-function #'y-or-n-p) #'tramp--test-always)
                      ;; Ange-FTP.
-                     ((symbol-function 'yes-or-no-p) #'tramp--test-always))
+                     ((symbol-function #'yes-or-no-p) #'tramp--test-always))
              (write-region "foo" nil tmp-name nil nil nil 'mustbenew))
            (should-error
             (cl-letf (((symbol-function #'y-or-n-p) #'ignore)
@@ -6738,8 +6880,9 @@ INPUT, if non-nil, is a string sent to the process."
                (insert "foo")
                ;; Bug#53207: with `create-lockfiles' nil, saving the
                ;; buffer results in a prompt.
-               (cl-letf (((symbol-function 'yes-or-no-p)
-                          (lambda (_) (ert-fail "Test failed unexpectedly"))))
+               (cl-letf (((symbol-function #'read-from-minibuffer)
+                          (lambda (&rest _)
+                            (ert-fail "Test failed unexpectedly"))))
                  (should (buffer-modified-p))
                  (save-buffer)
                  (should-not (buffer-modified-p)))
@@ -6757,7 +6900,7 @@ INPUT, if non-nil, is a string sent to the process."
                ;; modification time properly, for them it doesn't
                ;; make sense to test.
                (when (not (verify-visited-file-modtime))
-                 (cl-letf (((symbol-function 'read-char-choice)
+                 (cl-letf (((symbol-function #'read-char-choice)
                             (lambda (prompt &rest _) (message "%s" prompt) 
?y)))
                    (ert-with-message-capture captured-messages
                      (insert "bar")
@@ -6773,8 +6916,8 @@ INPUT, if non-nil, is a string sent to the process."
                        (should (file-locked-p tmp-name)))))
 
                  ;; `save-buffer' removes the file lock.
-                 (cl-letf (((symbol-function 'yes-or-no-p) 
#'tramp--test-always)
-                           ((symbol-function 'read-char-choice)
+                 (cl-letf (((symbol-function #'yes-or-no-p) 
#'tramp--test-always)
+                           ((symbol-function #'read-char-choice)
                             (lambda (&rest _) ?y)))
                    (should (buffer-modified-p))
                    (save-buffer)
diff --git a/texi/tramp.texi b/texi/tramp.texi
index 8917b47e0d..72fcbb8021 100644
--- a/texi/tramp.texi
+++ b/texi/tramp.texi
@@ -3559,7 +3559,7 @@ completion lists.  If you want to suppress this 
completion because
 there are invalid entries in the persistency file, for example if the
 host configuration changes often, or if you plug your laptop to
 different networks frequently, you can set the user option
-@code{tramp-completion-use-cache} to nil.
+@code{tramp-completion-use-cache} to @code{nil}.
 
 After remote host name completion comes completion of file names on
 the remote host.  It works the same as with local host file completion
@@ -3614,10 +3614,20 @@ Each involved method must be an inline method 
(@pxref{Inline methods}).
 @code{tramp-default-proxies-alist} and is available for re-use during
 that Emacs session.  Subsequent @value{tramp} connections to the same
 remote host can then use the shortcut form:
-@samp{@trampfn{ssh,you@@remotehost,/path}}.  Ad-hoc definitions are
-removed from @code{tramp-default-proxies-alist} via the command
-@kbd{M-x tramp-cleanup-all-connections @key{RET}} (@pxref{Cleanup
-remote connections}).
+@samp{@trampfn{ssh,you@@remotehost,/path}}.
+
+@defopt tramp-show-ad-hoc-proxies
+If this user option is non-@code{nil}, ad-hoc definitions are kept in
+remote file names instead of showing the shortcuts.
+
+@lisp
+(customize-set-variable 'tramp-show-ad-hoc-proxies t)
+@end lisp
+@end defopt
+
+Ad-hoc definitions are removed from @code{tramp-default-proxies-alist}
+via the command @kbd{M-x tramp-cleanup-all-connections @key{RET}}
+(@pxref{Cleanup remote connections}).
 
 @defopt tramp-save-ad-hoc-proxies
 For ad-hoc definitions to be saved automatically in
diff --git a/texi/trampver.texi b/texi/trampver.texi
index 59787ec58f..3c2553c8db 100644
--- a/texi/trampver.texi
+++ b/texi/trampver.texi
@@ -7,7 +7,7 @@
 
 @c In the  Tramp GIT, the version number and the bug report address
 @c are auto-frobbed from configure.ac.
-@set trampver 2.6.0.5
+@set trampver 2.6.1
 @set trampurl https://www.gnu.org/software/tramp/
 @set tramp-bug-report-address tramp-devel@@gnu.org
 @set emacsver 26.1
diff --git a/tramp-compat.el b/tramp-compat.el
index 1386f301db..4aa0dccccb 100644
--- a/tramp-compat.el
+++ b/tramp-compat.el
@@ -32,7 +32,6 @@
 (require 'ansi-color)
 (require 'auth-source)
 (require 'format-spec)
-(require 'ls-lisp) ;; Due to `tramp-handle-insert-directory'.
 (require 'parse-time)
 (require 'shell)
 (require 'subr-x)
@@ -41,6 +40,7 @@
 (declare-function tramp-error "tramp")
 (declare-function tramp-file-name-handler "tramp")
 (declare-function tramp-tramp-file-p "tramp")
+(defvar tramp-syntax)
 (defvar tramp-temp-name-prefix)
 
 (defconst tramp-compat-emacs-compiled-version (eval-when-compile emacs-version)
@@ -128,7 +128,6 @@ NAME is unquoted."
 ;; support old settings.
 (defsubst tramp-compat-tramp-syntax ()
   "Return proper value of `tramp-syntax'."
-  (defvar tramp-syntax)
   (cond ((eq tramp-syntax 'ftp) 'default)
        ((eq tramp-syntax 'sep) 'separate)
        (t tramp-syntax)))
diff --git a/tramp-fuse.el b/tramp-fuse.el
index 132ecefb27..e4610b069a 100644
--- a/tramp-fuse.el
+++ b/tramp-fuse.el
@@ -97,6 +97,11 @@
     (with-tramp-file-property v localname "file-executable-p"
       (file-executable-p (tramp-fuse-local-file-name filename)))))
 
+(defun tramp-fuse-handle-file-exists-p (filename)
+  "Like `file-exists-p' for Tramp files."
+  (tramp-skeleton-file-exists-p filename
+    (file-exists-p (tramp-fuse-local-file-name filename))))
+
 (defun tramp-fuse-handle-file-name-all-completions (filename directory)
   "Like `file-name-all-completions' for Tramp files."
   (tramp-fuse-remove-hidden-files
@@ -147,23 +152,24 @@
       (format "%s@%s:/" user host)
     (format "%s:/" host)))
 
-(defun tramp-fuse-mount-point (vec)
-  "Return local mount point of VEC."
-  (or (tramp-get-file-property vec "/" "mount-point")
-      (expand-file-name
-       (concat
-       tramp-temp-name-prefix
-       (tramp-file-name-method vec) "."
-       (when (tramp-file-name-user vec)
-         (concat (tramp-file-name-user-domain vec) "@"))
-       (tramp-file-name-host-port vec))
-       tramp-compat-temporary-file-directory)))
-
 (defconst tramp-fuse-mount-timeout
   (eval (car (get 'remote-file-name-inhibit-cache 'standard-value)) t)
   "Time period to check whether the mount point still exists.
 It has the same meaning as `remote-file-name-inhibit-cache'.")
 
+(defun tramp-fuse-mount-point (vec)
+  "Return local mount point of VEC."
+  (let ((remote-file-name-inhibit-cache tramp-fuse-mount-timeout))
+    (or (tramp-get-file-property vec "/" "mount-point")
+       (expand-file-name
+        (concat
+         tramp-temp-name-prefix
+         (tramp-file-name-method vec) "."
+         (when (tramp-file-name-user vec)
+           (concat (tramp-file-name-user-domain vec) "@"))
+         (tramp-file-name-host-port vec))
+        tramp-compat-temporary-file-directory))))
+
 (defun tramp-fuse-mounted-p (vec)
   "Check, whether fuse volume determined by VEC is mounted."
   ;; Remember the mount status by using a file property on "/",
@@ -176,13 +182,23 @@ It has the same meaning as 
`remote-file-name-inhibit-cache'.")
     (or (tramp-get-file-property vec "/" "mounted")
         (let* ((default-directory tramp-compat-temporary-file-directory)
                (command (format "mount -t fuse.%s" (tramp-file-name-method 
vec)))
-              (mount (shell-command-to-string command)))
+              (mount (shell-command-to-string command))
+              (mount-spec (split-string (tramp-fuse-mount-spec vec) ":" 
'omit)))
           (tramp-message vec 6 "%s\n%s" command mount)
+         ;; The mount-spec contains a trailing local file name part,
+         ;; which might not be visible, for example with rclone
+         ;; mounts of type "memory" or "gdrive".  Make it optional.
+         (setq mount-spec
+               (if (cdr mount-spec)
+                   (tramp-compat-rx
+                    (literal (car mount-spec))
+                    ":" (? (literal (cadr mount-spec))))
+                 (car mount-spec)))
           (tramp-set-file-property
           vec "/" "mounted"
            (when (string-match
                  (tramp-compat-rx
-                  bol (group (literal (tramp-fuse-mount-spec vec)))
+                  bol (group (regexp mount-spec))
                   " on " (group (+ (not blank))) blank)
                  mount)
             (tramp-set-file-property
@@ -206,6 +222,7 @@ It has the same meaning as 
`remote-file-name-inhibit-cache'.")
          (command (format "%s -u %s" (tramp-fuse-get-fusermount) mount-point)))
     (tramp-message vec 6 "%s\n%s" command (shell-command-to-string command))
     (tramp-flush-file-property vec "/" "mounted")
+    (tramp-flush-file-property vec "/" "mount-point")
     (setq tramp-fuse-mount-points
          (delete (tramp-file-name-unify vec) tramp-fuse-mount-points))
     ;; Give the caches a chance to expire.
diff --git a/tramp-gvfs.el b/tramp-gvfs.el
index 00b3ac7775..8b7e492358 100644
--- a/tramp-gvfs.el
+++ b/tramp-gvfs.el
@@ -114,6 +114,7 @@
 (declare-function zeroconf-service-host "zeroconf")
 (declare-function zeroconf-service-port "zeroconf")
 (declare-function zeroconf-service-txt "zeroconf")
+(defvar tramp-gvfs-dbus-event-vector)
 
 ;; We don't call `dbus-ping', because this would load dbus.el.
 (defconst tramp-gvfs-enabled
@@ -848,8 +849,6 @@ Operations not mentioned here will be handled by the 
default Emacs primitives.")
     (let ((method (tramp-file-name-method vec)))
       (and (stringp method) (member method tramp-gvfs-methods)))))
 
-(defvar tramp-gvfs-dbus-event-vector)
-
 ;;;###tramp-autoload
 (defun tramp-gvfs-file-name-handler (operation &rest args)
   "Invoke the GVFS related OPERATION and ARGS.
diff --git a/tramp-rclone.el b/tramp-rclone.el
index 4160364f31..6a1446bd2b 100644
--- a/tramp-rclone.el
+++ b/tramp-rclone.el
@@ -298,25 +298,25 @@ file names."
       (setq filename (file-name-directory filename)))
     (with-parsed-tramp-file-name (expand-file-name filename) nil
       (tramp-message v 5 "file system info: %s" localname)
-      (tramp-rclone-send-command v "about" (concat host ":"))
-      (with-current-buffer (tramp-get-connection-buffer v)
-       (let (total used free)
-         (goto-char (point-min))
-         (while (not (eobp))
-           (when (looking-at (rx "Total: " (+ blank) (group (+ digit))))
-             (setq total (string-to-number (match-string 1))))
-           (when (looking-at (rx "Used: " (+ blank) (group (+ digit))))
-             (setq used (string-to-number (match-string 1))))
-           (when (looking-at (rx "Free: " (+ blank) (group (+ digit))))
-             (setq free (string-to-number (match-string 1))))
-           (forward-line))
-         (when used
-           ;; The used number of bytes is not part of the result.  As
-           ;; side effect, we store it as file property.
-           (tramp-set-file-property v localname "used-bytes" used))
-         ;; Result.
-         (when (and total free)
-           (list total free (- total free))))))))
+      (when (zerop (tramp-rclone-send-command v "about" (concat host ":")))
+        (with-current-buffer (tramp-get-connection-buffer v)
+         (let (total used free)
+           (goto-char (point-min))
+           (while (not (eobp))
+             (when (looking-at (rx "Total: " (+ blank) (group (+ digit))))
+               (setq total (string-to-number (match-string 1))))
+             (when (looking-at (rx "Used: " (+ blank) (group (+ digit))))
+               (setq used (string-to-number (match-string 1))))
+             (when (looking-at (rx "Free: " (+ blank) (group (+ digit))))
+               (setq free (string-to-number (match-string 1))))
+             (forward-line))
+           (when used
+             ;; The used number of bytes is not part of the result.
+             ;; As side effect, we store it as file property.
+             (tramp-set-file-property v localname "used-bytes" used))
+           ;; Result.
+           (when (and total free)
+             (list total free (- total free)))))))))
 
 (defun tramp-rclone-handle-rename-file
   (filename newname &optional ok-if-already-exists)
diff --git a/tramp-sh.el b/tramp-sh.el
index ec28b51c97..7915ea9a8a 100644
--- a/tramp-sh.el
+++ b/tramp-sh.el
@@ -38,6 +38,7 @@
 (declare-function dired-compress-file "dired-aux")
 (declare-function dired-remove-file "dired-aux")
 (defvar dired-compress-file-suffixes)
+(defvar ls-lisp-use-insert-directory-program)
 ;; Added in Emacs 28.1.
 (defvar process-file-return-signal-string)
 (defvar vc-handled-backends)
@@ -2634,7 +2635,7 @@ The method used must be an out-of-band method."
     (access-file filename "Reading directory"))
   (with-parsed-tramp-file-name (expand-file-name filename) nil
     (if (and (featurep 'ls-lisp)
-            (not (symbol-value 'ls-lisp-use-insert-directory-program)))
+            (not ls-lisp-use-insert-directory-program))
        (tramp-handle-insert-directory
         filename switches wildcard full-directory-p)
       (when (stringp switches)
diff --git a/tramp-sshfs.el b/tramp-sshfs.el
index 83e767953b..0ec2a1e74b 100644
--- a/tramp-sshfs.el
+++ b/tramp-sshfs.el
@@ -100,7 +100,7 @@
     (file-directory-p . tramp-handle-file-directory-p)
     (file-equal-p . tramp-handle-file-equal-p)
     (file-executable-p . tramp-fuse-handle-file-executable-p)
-    (file-exists-p . tramp-handle-file-exists-p)
+    (file-exists-p . tramp-fuse-handle-file-exists-p)
     (file-in-directory-p . tramp-handle-file-in-directory-p)
     (file-local-copy . tramp-handle-file-local-copy)
     (file-locked-p . tramp-handle-file-locked-p)
diff --git a/tramp.el b/tramp.el
index c5a82d7b32..649b8578e4 100644
--- a/tramp.el
+++ b/tramp.el
@@ -63,6 +63,23 @@
 (declare-function file-notify-rm-watch "filenotify")
 (declare-function netrc-parse "netrc")
 (defvar auto-save-file-name-transforms)
+(defvar ls-lisp-use-insert-directory-program)
+(defvar tramp-prefix-format)
+(defvar tramp-prefix-regexp)
+(defvar tramp-method-regexp)
+(defvar tramp-postfix-method-format)
+(defvar tramp-postfix-method-regexp)
+(defvar tramp-prefix-ipv6-format)
+(defvar tramp-prefix-ipv6-regexp)
+(defvar tramp-postfix-ipv6-format)
+(defvar tramp-postfix-ipv6-regexp)
+(defvar tramp-postfix-host-format)
+(defvar tramp-postfix-host-regexp)
+(defvar tramp-remote-file-name-spec-regexp)
+(defvar tramp-file-name-structure)
+(defvar tramp-file-name-regexp)
+(defvar tramp-completion-method-regexp)
+(defvar tramp-completion-file-name-regexp)
 
 ;; Reload `tramp-compat' when we reload `tramp-autoloads' of the GNU
 ;; ELPA package.
@@ -522,6 +539,11 @@ interpreted as a regular expression which always matches."
   :version "24.3"
   :type 'boolean)
 
+(defcustom tramp-show-ad-hoc-proxies nil
+  "Whether to show ad-hoc proxies in file names."
+  :version "29.2"
+  :type 'boolean)
+
 ;; For some obscure technical reasons, `system-name' on w32 returns
 ;; either lower case or upper case letters.  See
 ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38079#20>.
@@ -815,23 +837,6 @@ Customize.  See also `tramp-change-syntax'."
   :initialize #'custom-initialize-default
   :set #'tramp-set-syntax)
 
-(defvar tramp-prefix-format)
-(defvar tramp-prefix-regexp)
-(defvar tramp-method-regexp)
-(defvar tramp-postfix-method-format)
-(defvar tramp-postfix-method-regexp)
-(defvar tramp-prefix-ipv6-format)
-(defvar tramp-prefix-ipv6-regexp)
-(defvar tramp-postfix-ipv6-format)
-(defvar tramp-postfix-ipv6-regexp)
-(defvar tramp-postfix-host-format)
-(defvar tramp-postfix-host-regexp)
-(defvar tramp-remote-file-name-spec-regexp)
-(defvar tramp-file-name-structure)
-(defvar tramp-file-name-regexp)
-(defvar tramp-completion-method-regexp)
-(defvar tramp-completion-file-name-regexp)
-
 (defun tramp-set-syntax (symbol value)
   "Set SYMBOL to value VALUE.
 Used in user option `tramp-syntax'.  There are further variables
@@ -1824,8 +1829,8 @@ the form (METHOD USER DOMAIN HOST PORT LOCALNAME 
&optional HOP)."
       (when (cadr args)
        (setq localname (and (stringp (cadr args)) (cadr args))))
       (when hop
-       ;; Keep hop in file name for completion.
-       (unless minibuffer-completing-file-name
+       ;; Keep hop in file name for completion or when indicated.
+       (unless (or minibuffer-completing-file-name tramp-show-ad-hoc-proxies)
          (setq hop nil))
        ;; Assure that the hops are in `tramp-default-proxies-alist'.
        ;; In tramp-archive.el, the slot `hop' is used for the archive
@@ -1876,7 +1881,7 @@ the form (METHOD USER DOMAIN HOST PORT LOCALNAME 
&optional HOP)."
      (tramp-compat-rx
       (regexp tramp-postfix-host-regexp) eos)
      tramp-postfix-hop-format
-     (tramp-make-tramp-file-name vec 'noloc)))))
+     (tramp-make-tramp-file-name (tramp-file-name-unify vec))))))
 
 (defun tramp-completion-make-tramp-file-name (method user host localname)
   "Construct a Tramp file name from METHOD, USER, HOST and LOCALNAME.
@@ -1975,8 +1980,11 @@ version, the function does nothing."
   "Return contents of BUFFER.
 If BUFFER is not a buffer or a buffer name, return the contents
 of `current-buffer'."
-  (with-current-buffer (or buffer (current-buffer))
-    (substring-no-properties (buffer-string))))
+  (or (let ((buf (or buffer (current-buffer))))
+        (when (bufferp buf)
+          (with-current-buffer (or buffer (current-buffer))
+           (substring-no-properties (buffer-string)))))
+      ""))
 
 (defun tramp-debug-buffer-name (vec)
   "A name for the debug buffer for VEC."
@@ -4326,6 +4334,7 @@ Let-bind it when necessary.")
 (defun tramp-handle-insert-directory
   (filename switches &optional wildcard full-directory-p)
   "Like `insert-directory' for Tramp files."
+  (require 'ls-lisp)
   (unless switches (setq switches ""))
   ;; Mark trailing "/".
   (when (and (directory-name-p filename)
@@ -4338,7 +4347,6 @@ Let-bind it when necessary.")
     (with-tramp-progress-reporter v 0 (format "Opening directory %s" filename)
       (let (ls-lisp-use-insert-directory-program start)
        ;; Silence byte compiler.
-       (ignore ls-lisp-use-insert-directory-program)
        (tramp-run-real-handler
         #'insert-directory
         (list filename switches wildcard full-directory-p))
@@ -5055,7 +5063,7 @@ support symbolic links."
 
 (defun tramp-handle-memory-info ()
   "Like `memory-info' for Tramp files."
-  (let ((result '(0 0 0 0))
+  (let ((result (list 0 0 0 0))
         process-file-side-effects)
     (with-temp-buffer
       (cond
diff --git a/trampver.el b/trampver.el
index 7b86f21388..672a9aa200 100644
--- a/trampver.el
+++ b/trampver.el
@@ -7,7 +7,7 @@
 ;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
 ;; Package: tramp
-;; Version: 2.6.0.5
+;; Version: 2.6.1
 ;; Package-Requires: ((emacs "26.1"))
 ;; Package-Type: multi
 ;; URL: https://www.gnu.org/software/tramp/
@@ -40,7 +40,7 @@
 ;; ./configure" to change them.
 
 ;;;###tramp-autoload
-(defconst tramp-version "2.6.0.5"
+(defconst tramp-version "2.6.1"
   "This version of Tramp.")
 
 ;;;###tramp-autoload
@@ -78,7 +78,7 @@
 ;; Check for Emacs version.
 (let ((x   (if (not (string-version-lessp emacs-version "26.1"))
       "ok"
-    (format "Tramp 2.6.0.5 is not fit for %s"
+    (format "Tramp 2.6.1 is not fit for %s"
             (replace-regexp-in-string "\n" "" (emacs-version))))))
   (unless (string-equal "ok" x) (error "%s" x)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]