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

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

[elpa] externals/tramp 4c72c437f6: Tramp ELPA version 2.6.1.5 released


From: ELPA Syncer
Subject: [elpa] externals/tramp 4c72c437f6: Tramp ELPA version 2.6.1.5 released
Date: Wed, 29 Nov 2023 03:58:48 -0500 (EST)

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

    Tramp ELPA version 2.6.1.5 released
---
 README              |  18 ++++--
 test/tramp-tests.el |  10 +--
 texi/tramp.texi     |   4 +-
 texi/trampelpa.texi |  20 ++++--
 texi/trampver.texi  |   2 +-
 tramp-adb.el        |  17 ++---
 tramp-crypt.el      |   2 +-
 tramp-fuse.el       |  18 ++----
 tramp-gvfs.el       |   6 +-
 tramp-sh.el         |  83 ++++++++++++-------------
 tramp-smb.el        |  17 +++--
 tramp-sudoedit.el   |  14 ++---
 tramp.el            | 174 ++++++++++++++++++++++++++++++----------------------
 trampver.el         |   6 +-
 14 files changed, 208 insertions(+), 183 deletions(-)

diff --git a/README b/README
index bdb25fc67a..50b6dd07ec 100644
--- a/README
+++ b/README
@@ -20,13 +20,23 @@ experience compatibility error messages for the Tramp 
package, or if you
 use another major Emacs version than the version Tramp has been
 installed with, you must recompile the package:
 
+Emacs 29 or newer
+-----------------
+
+   • Recompile the Tramp package
+
+          M-x package-recompile RET tramp
+
+Emacs 28 or older
+-----------------
+
    • Remove all byte-compiled Tramp files
 
-          $ rm -f ~/.emacs.d/elpa/tramp-2.6.1.4/tramp*.elc
+          $ rm -f ~/.emacs.d/elpa/tramp-2.6.1.5/tramp*.elc
 
    • Start Emacs with Tramp’s source files
 
-          $ emacs -L ~/.emacs.d/elpa/tramp-2.6.1.4 -l tramp
+          $ emacs -L ~/.emacs.d/elpa/tramp-2.6.1.5 -l tramp
 
      This should not give you the error.
 
@@ -37,10 +47,10 @@ installed with, you must recompile the package:
      Afterwards, you must restart Emacs.
 
 Mitigation of a bug in Emacs 29.1
-*********************************
+---------------------------------
 
 Due to a bug in Emacs 29.1, you must apply the following change prior
-installation or upgrading Tramp 2.6.1.4 from GNU ELPA:
+installation or upgrading Tramp 2.6.1.5 from GNU ELPA:
 
      (when (string-equal emacs-version "29.1")
        (with-current-buffer
diff --git a/test/tramp-tests.el b/test/tramp-tests.el
index e74837b926..7854466b81 100644
--- a/test/tramp-tests.el
+++ b/test/tramp-tests.el
@@ -4844,6 +4844,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
                (if (tramp--test-expensive-test-p)
                    ;; It doesn't work for `initials' and `shorthand'
                    ;; completion styles.  Should it?
+                  ;; `orderless' passes the tests, but it is an ELPA package.
                    '(emacs21 emacs22 basic partial-completion substring flex)
                 '(basic)))
 
@@ -5154,10 +5155,11 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
 (defun tramp--test-timeout-handler (&rest _ignore)
   "Timeout handler, reporting a failed test."
   (interactive)
-  (let ((proc (get-buffer-process (current-buffer))))
-    (when (processp proc)
-      (tramp--test-message
-       "cmd: %s\nbuf:\n%s\n---" (process-command proc) (buffer-string))))
+  (tramp--test-message "proc: %s" (get-buffer-process (current-buffer)))
+  (when-let ((proc (get-buffer-process (current-buffer)))
+            ((processp proc)))
+    (tramp--test-message "cmd: %s" (process-command proc)))
+  (tramp--test-message "buf: %s\n%s\n---" (current-buffer) (buffer-string))
   (ert-fail (format "`%s' timed out" (ert-test-name (ert-running-test)))))
 
 (ert-deftest tramp-test29-start-file-process ()
diff --git a/texi/tramp.texi b/texi/tramp.texi
index f758850539..ce55c319f7 100644
--- a/texi/tramp.texi
+++ b/texi/tramp.texi
@@ -2960,7 +2960,7 @@ connection cleanup or on Emacs exiting.
 @cindex rclone setup
 
 The default arguments of the @command{rclone} operations
-@command{mount}, @command{coopyto}, @command{moveto} and
+@command{mount}, @command{copyto}, @command{moveto} and
 @command{about} are declared in the variable @code{tramp-methods} as
 method specific parameters.  Usually, they don't need to be overwritten.
 
@@ -5069,7 +5069,7 @@ Yes.  @command{OpenSSH} has added support for 
@acronym{FIDO} hardware
 devices via special key types @option{*-sk}.  @value{tramp} supports
 the additional handshaking messages for them.  This requires at least
 @command{OpenSSH} 8.2, and a @acronym{FIDO} @acronym{U2F} compatible
-security key, like yubikey, solokey, or nitrokey.
+security key, like yubikey, solokey, nitrokey, or titankey.
 
 
 @item
diff --git a/texi/trampelpa.texi b/texi/trampelpa.texi
index 484a478935..5e3a31b906 100644
--- a/texi/trampelpa.texi
+++ b/texi/trampelpa.texi
@@ -42,6 +42,19 @@ If you experience compatibility error messages for the 
@value{tramp}
 package, or if you use another major Emacs version than the version
 @value{tramp} has been installed with, you must recompile the package:
 
+@subheading Emacs 29 or newer
+
+@itemize @bullet
+@item
+Recompile the @value{tramp} package
+
+@example
+M-x package-recompile RET tramp
+@end example
+@end itemize
+
+@subheading Emacs 28 or older
+
 @itemize @bullet
 @item
 Remove all byte-compiled @value{tramp} files
@@ -70,12 +83,7 @@ M-x tramp-recompile-elpa
 Afterwards, you must restart Emacs.
 @end itemize
 
-@ifplaintext
-@unnumbered Mitigation of a bug in Emacs 29.1
-@end ifplaintext
-@ifnotplaintext
-@section Mitigation of a bug in Emacs 29.1
-@end ifnotplaintext
+@subheading Mitigation of a bug in Emacs 29.1
 
 Due to a bug in Emacs 29.1, you must apply the following change prior
 installation or upgrading @value{tramp} @value{trampver} from GNU ELPA:
diff --git a/texi/trampver.texi b/texi/trampver.texi
index 788c56dbe3..9b6d7eb624 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.1.4
+@set trampver 2.6.1.5
 @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-adb.el b/tramp-adb.el
index f16c97a235..b815344e04 100644
--- a/tramp-adb.el
+++ b/tramp-adb.el
@@ -449,7 +449,7 @@ Emacs dired can't find files."
 
 (defun tramp-adb-handle-file-name-all-completions (filename directory)
   "Like `file-name-all-completions' for Tramp files."
-  (tramp-compat-ignore-error file-missing
+  (tramp-skeleton-file-name-all-completions filename directory
     (all-completions
      filename
      (with-parsed-tramp-file-name (expand-file-name directory) nil
@@ -464,17 +464,10 @@ Emacs dired can't find files."
                (file-name-as-directory f)
              f))
          (with-current-buffer (tramp-get-buffer v)
-           (delete-dups
-            (append
-             ;; On some file systems like "sdcard", "." and ".." are
-             ;; not included.  We fix this by `delete-dups'.
-             '("." "..")
-             (delq
-              nil
-              (mapcar
-               (lambda (l)
-                 (and (not (string-match-p (rx bol (* blank) eol) l)) l))
-               (split-string (buffer-string) "\n"))))))))))))
+           (mapcar
+            (lambda (l)
+              (and (not (string-match-p (rx bol (* blank) eol) l)) l))
+            (split-string (buffer-string) "\n" 'omit)))))))))
 
 (defun tramp-adb-handle-file-local-copy (filename)
   "Like `file-local-copy' for Tramp files."
diff --git a/tramp-crypt.el b/tramp-crypt.el
index 62cd3f0a3b..1cc4e96bc9 100644
--- a/tramp-crypt.el
+++ b/tramp-crypt.el
@@ -735,7 +735,7 @@ absolute file names."
 
 (defun tramp-crypt-handle-file-name-all-completions (filename directory)
   "Like `file-name-all-completions' for Tramp files."
-  (tramp-compat-ignore-error file-missing
+  (tramp-skeleton-file-name-all-completions filename directory
     (all-completions
      filename
      (let* (completion-regexp-list
diff --git a/tramp-fuse.el b/tramp-fuse.el
index e4610b069a..ceaab43e89 100644
--- a/tramp-fuse.el
+++ b/tramp-fuse.el
@@ -104,22 +104,12 @@
 
 (defun tramp-fuse-handle-file-name-all-completions (filename directory)
   "Like `file-name-all-completions' for Tramp files."
-  (tramp-fuse-remove-hidden-files
-   (tramp-compat-ignore-error file-missing
+  (tramp-skeleton-file-name-all-completions filename directory
+    (tramp-fuse-remove-hidden-files
      (all-completions
       filename
-      (delete-dups
-       (append
-       (file-name-all-completions
-        filename (tramp-fuse-local-file-name directory))
-       ;; Some storage systems do not return "." and "..".
-       (let (result)
-         (dolist (item '(".." ".") result)
-           (when (string-prefix-p filename item)
-             (catch 'match
-               (dolist (elt completion-regexp-list)
-                 (unless (string-match-p elt item) (throw 'match nil)))
-               (setq result (cons (concat item "/") result))))))))))))
+      (file-name-all-completions
+       filename (tramp-fuse-local-file-name directory))))))
 
 ;; This function isn't used.
 (defun tramp-fuse-handle-insert-directory
diff --git a/tramp-gvfs.el b/tramp-gvfs.el
index 07390b50df..8e3e3d312a 100644
--- a/tramp-gvfs.el
+++ b/tramp-gvfs.el
@@ -1434,13 +1434,13 @@ If FILE-SYSTEM is non-nil, return file system 
attributes."
 
 (defun tramp-gvfs-handle-file-name-all-completions (filename directory)
   "Like `file-name-all-completions' for Tramp files."
-  (unless (tramp-compat-string-search "/" filename)
-    (tramp-compat-ignore-error file-missing
+  (tramp-skeleton-file-name-all-completions filename directory
+    (unless (tramp-compat-string-search "/" filename)
       (all-completions
        filename
        (with-parsed-tramp-file-name (expand-file-name directory) nil
         (with-tramp-file-property v localname "file-name-all-completions"
-           (let ((result '("./" "../")))
+           (let (result)
              ;; Get a list of directories and files.
             (dolist (item
                      (tramp-gvfs-get-directory-attributes directory)
diff --git a/tramp-sh.el b/tramp-sh.el
index 74b1638f12..aa1d025bf1 100644
--- a/tramp-sh.el
+++ b/tramp-sh.el
@@ -1831,46 +1831,47 @@ ID-FORMAT valid values are `string' and `integer'."
 ;; files.
 (defun tramp-sh-handle-file-name-all-completions (filename directory)
   "Like `file-name-all-completions' for Tramp files."
-  (with-parsed-tramp-file-name (expand-file-name directory) nil
-    (when (and (not (tramp-compat-string-search "/" filename))
-              (tramp-connectable-p v))
-    (unless (tramp-compat-string-search "/" filename)
-      (tramp-compat-ignore-error file-missing
-       (all-completions
-        filename
-        (with-tramp-file-property v localname "file-name-all-completions"
-          (let (result)
-            ;; Get a list of directories and files, including
-            ;; reliably tagging the directories with a trailing "/".
-            ;; Because I rock.  --daniel@danann.net
-            (when (tramp-send-command-and-check
-                   v
-                   (if (tramp-get-remote-perl v)
-                       (progn
-                         (tramp-maybe-send-script
-                          v tramp-perl-file-name-all-completions
-                          "tramp_perl_file_name_all_completions")
-                         (format "tramp_perl_file_name_all_completions %s"
-                                 (tramp-shell-quote-argument localname)))
-
-                     (format (concat
-                              "cd %s 2>&1 && %s -a 2>%s"
-                              " | while IFS= read f; do"
-                              " if %s -d \"$f\" 2>%s;"
-                              " then \\echo \"$f/\"; else \\echo \"$f\"; fi;"
-                              " done")
-                             (tramp-shell-quote-argument localname)
-                             (tramp-get-ls-command v)
-                             (tramp-get-remote-null-device v)
-                             (tramp-get-test-command v)
-                             (tramp-get-remote-null-device v))))
-
-              ;; Now grab the output.
-              (with-current-buffer (tramp-get-buffer v)
-                (goto-char (point-max))
-                (while (zerop (forward-line -1))
-                  (push (buffer-substring (point) (line-end-position)) 
result)))
-              result)))))))))
+  (tramp-skeleton-file-name-all-completions filename directory
+    (with-parsed-tramp-file-name (expand-file-name directory) nil
+      (when (and (not (tramp-compat-string-search "/" filename))
+                (tramp-connectable-p v))
+       (unless (tramp-compat-string-search "/" filename)
+         (all-completions
+          filename
+          (with-tramp-file-property v localname "file-name-all-completions"
+            (let (result)
+              ;; Get a list of directories and files, including
+              ;; reliably tagging the directories with a trailing "/".
+              ;; Because I rock.  --daniel@danann.net
+              (when (tramp-send-command-and-check
+                     v
+                     (if (tramp-get-remote-perl v)
+                         (progn
+                           (tramp-maybe-send-script
+                            v tramp-perl-file-name-all-completions
+                            "tramp_perl_file_name_all_completions")
+                           (format "tramp_perl_file_name_all_completions %s"
+                                   (tramp-shell-quote-argument localname)))
+
+                       (format (concat
+                                "cd %s 2>&1 && %s -a 2>%s"
+                                " | while IFS= read f; do"
+                                " if %s -d \"$f\" 2>%s;"
+                                " then \\echo \"$f/\"; else \\echo \"$f\"; fi;"
+                                " done")
+                               (tramp-shell-quote-argument localname)
+                               (tramp-get-ls-command v)
+                               (tramp-get-remote-null-device v)
+                               (tramp-get-test-command v)
+                               (tramp-get-remote-null-device v))))
+
+                ;; Now grab the output.
+                (with-current-buffer (tramp-get-buffer v)
+                  (goto-char (point-max))
+                  (while (zerop (forward-line -1))
+                    (push
+                     (buffer-substring (point) (line-end-position)) result)))
+                result)))))))))
 
 ;; cp, mv and ln
 
@@ -5508,7 +5509,7 @@ raises an error."
                     (unless noerror signal-hook-function)))
                (read (current-buffer)))
            ;; Error handling.
-           (when (re-search-forward (rx (not blank)) (line-end-position) t)
+           (when (re-search-forward (rx (not space)) (line-end-position) t)
              (error nil)))
        (error (unless noerror
                 (tramp-error
diff --git a/tramp-smb.el b/tramp-smb.el
index 0ba24352a3..5c385641cf 100644
--- a/tramp-smb.el
+++ b/tramp-smb.el
@@ -987,20 +987,19 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are 
completely ignored."
 ;; files.
 (defun tramp-smb-handle-file-name-all-completions (filename directory)
   "Like `file-name-all-completions' for Tramp files."
-  (tramp-compat-ignore-error file-missing
+  (tramp-skeleton-file-name-all-completions filename directory
     (all-completions
      filename
      (when (file-directory-p directory)
        (with-parsed-tramp-file-name (expand-file-name directory) nil
         (with-tramp-file-property v localname "file-name-all-completions"
-          (delete-dups
-           (mapcar
-            (lambda (x)
-              (list
-               (if (tramp-compat-string-search "d" (nth 1 x))
-                   (file-name-as-directory (nth 0 x))
-                 (nth 0 x))))
-            (tramp-smb-get-file-entries directory)))))))))
+          (mapcar
+           (lambda (x)
+             (list
+              (if (tramp-compat-string-search "d" (nth 1 x))
+                  (file-name-as-directory (nth 0 x))
+                (nth 0 x))))
+           (tramp-smb-get-file-entries directory))))))))
 
 (defun tramp-smb-handle-file-system-info (filename)
   "Like `file-system-info' for Tramp files."
diff --git a/tramp-sudoedit.el b/tramp-sudoedit.el
index 9939d93ba3..092a414f3d 100644
--- a/tramp-sudoedit.el
+++ b/tramp-sudoedit.el
@@ -467,7 +467,7 @@ the result will be a local, non-Tramp, file name."
 
 (defun tramp-sudoedit-handle-file-name-all-completions (filename directory)
   "Like `file-name-all-completions' for Tramp files."
-  (tramp-compat-ignore-error file-missing
+  (tramp-skeleton-file-name-all-completions filename directory
     (all-completions
      filename
      (with-parsed-tramp-file-name (expand-file-name directory) nil
@@ -481,13 +481,11 @@ the result will be a local, non-Tramp, file name."
            (if (ignore-errors (file-directory-p (expand-file-name f 
directory)))
                (file-name-as-directory f)
              f))
-         (delq
-          nil
-          (mapcar
-           (lambda (l) (and (not (string-match-p (rx bol (* blank) eol) l)) l))
-           (split-string
-            (tramp-get-buffer-string (tramp-get-connection-buffer v))
-            "\n" 'omit)))))))))
+         (mapcar
+          (lambda (l) (and (not (string-match-p (rx bol (* blank) eol) l)) l))
+          (split-string
+           (tramp-get-buffer-string (tramp-get-connection-buffer v))
+           "\n" 'omit))))))))
 
 (defun tramp-sudoedit-handle-file-readable-p (filename)
   "Like `file-readable-p' for Tramp files."
diff --git a/tramp.el b/tramp.el
index 29f5ffd68f..30bed224ab 100644
--- a/tramp.el
+++ b/tramp.el
@@ -759,8 +759,9 @@ The regexp should match at end of buffer."
 
 ;; A security key requires the user physically to touch the device
 ;; with their finger.  We must tell it to the user.
-;; Added in OpenSSH 8.2.  I've tested it with yubikey.  Nitrokey,
-;; which has also passed the tests, does not show such a message.
+;; Added in OpenSSH 8.2.  I've tested it with yubikey.  Nitrokey and
+;; Titankey, which have also passed the tests, do not show such a
+;; message.
 (defcustom tramp-security-key-confirm-regexp
   (rx bol (* "\r") "Confirm user presence for key " (* nonl) (* (any "\r\n")))
   "Regular expression matching security key confirmation message.
@@ -3069,85 +3070,108 @@ not in completion mode."
 
       (tramp-run-real-handler #'file-exists-p (list filename))))
 
+(defmacro tramp-skeleton-file-name-all-completions
+    (filename directory &rest body)
+  "Skeleton for `tramp-*-handle-filename-all-completions'.
+BODY is the backend specific code."
+  (declare (indent 2) (debug t))
+  `(tramp-compat-ignore-error file-missing
+     (delete-dups (delq nil
+       (let* ((case-fold-search read-file-name-completion-ignore-case)
+             (result (progn ,@body)))
+        ;; Some storage systems do not return "." and "..".
+        (when (tramp-tramp-file-p ,directory)
+          (dolist (elt '(".." "."))
+            (when (string-prefix-p ,filename elt)
+              (setq result (cons (concat elt "/") result)))))
+        (if (consp completion-regexp-list)
+            ;; Discriminate over `completion-regexp-list'.
+            (mapcar
+             (lambda (x)
+               (when (stringp x)
+                 (catch 'match
+                   (dolist (elt completion-regexp-list x)
+                     (unless (string-match-p elt x) (throw 'match nil))))))
+             result)
+          result))))))
+
 ;; Method, host name and user name completion.
 ;; `tramp-completion-dissect-file-name' returns a list of
 ;; `tramp-file-name' structures.  For all of them we return possible
 ;; completions.
 (defun tramp-completion-handle-file-name-all-completions (filename directory)
   "Like `file-name-all-completions' for partial Tramp files."
-  (let ((fullname
-        (tramp-drop-volume-letter (expand-file-name filename directory)))
-       ;; When `tramp-syntax' is `simplified', we need a default method.
-       (tramp-default-method
-        (and (string-empty-p tramp-postfix-method-format)
-             tramp-default-method))
-       (tramp-default-method-alist
-        (and (string-empty-p tramp-postfix-method-format)
-             tramp-default-method-alist))
-       tramp-default-user tramp-default-user-alist
-       tramp-default-host tramp-default-host-alist
-       hop result result1)
-
-    ;; Suppress hop from completion.
-    (when (string-match
-          (tramp-compat-rx
-           (regexp tramp-prefix-regexp)
-           (group (+ (regexp tramp-remote-file-name-spec-regexp)
-                     (regexp tramp-postfix-hop-regexp))))
-          fullname)
-      (setq hop (match-string 1 fullname)
-           fullname (replace-match "" nil nil fullname 1)))
-
-    ;; Possible completion structures.
-    (dolist (elt (tramp-completion-dissect-file-name fullname))
-      (let* ((method (tramp-file-name-method elt))
-            (user (tramp-file-name-user elt))
-            (host (tramp-file-name-host elt))
-            (localname (tramp-file-name-localname elt))
-            (m (tramp-find-method method user host))
-            all-user-hosts)
-
-       (unless localname ;; Nothing to complete.
-
-         (if (or user host)
-
-             ;; Method dependent user / host combinations.
-             (progn
-               (mapc
-                (lambda (x)
-                  (setq all-user-hosts
-                        (append all-user-hosts
-                                (funcall (nth 0 x) (nth 1 x)))))
-                (tramp-get-completion-function m))
-
-               (setq result
-                     (append result
-                             (mapcar
-                              (lambda (x)
-                                (tramp-get-completion-user-host
-                                 method user host (nth 0 x) (nth 1 x)))
-                              (delq nil all-user-hosts)))))
-
-           ;; Possible methods.
-           (setq result
-                 (append result (tramp-get-completion-methods m)))))))
-
-    ;; Unify list, add hop, remove nil elements.
-    (dolist (elt result)
-      (when elt
-       (string-match tramp-prefix-regexp elt)
-       (setq elt (replace-match (concat tramp-prefix-format hop) nil nil elt))
-       (push
-        (substring elt (length (tramp-drop-volume-letter directory)))
-        result1)))
-
-    ;; Complete local parts.
-    (delete-dups
-     (append
-      result1
-      (ignore-errors
-        (tramp-run-real-handler
-        #'file-name-all-completions (list filename directory)))))))
+  (tramp-skeleton-file-name-all-completions filename directory
+    (let ((fullname
+          (tramp-drop-volume-letter (expand-file-name filename directory)))
+         ;; When `tramp-syntax' is `simplified', we need a default method.
+         (tramp-default-method
+          (and (string-empty-p tramp-postfix-method-format)
+               tramp-default-method))
+         (tramp-default-method-alist
+          (and (string-empty-p tramp-postfix-method-format)
+               tramp-default-method-alist))
+         tramp-default-user tramp-default-user-alist
+         tramp-default-host tramp-default-host-alist
+         hop result result1)
+
+      ;; Suppress hop from completion.
+      (when (string-match
+            (tramp-compat-rx
+             (regexp tramp-prefix-regexp)
+             (group (+ (regexp tramp-remote-file-name-spec-regexp)
+                       (regexp tramp-postfix-hop-regexp))))
+            fullname)
+       (setq hop (match-string 1 fullname)
+             fullname (replace-match "" nil nil fullname 1)))
+
+      ;; Possible completion structures.
+      (dolist (elt (tramp-completion-dissect-file-name fullname))
+       (let* ((method (tramp-file-name-method elt))
+              (user (tramp-file-name-user elt))
+              (host (tramp-file-name-host elt))
+              (localname (tramp-file-name-localname elt))
+              (m (tramp-find-method method user host))
+              all-user-hosts)
+
+         (unless localname ;; Nothing to complete.
+           (if (or user host)
+               ;; Method dependent user / host combinations.
+               (progn
+                 (mapc
+                  (lambda (x)
+                    (setq all-user-hosts
+                          (append all-user-hosts
+                                  (funcall (nth 0 x) (nth 1 x)))))
+                  (tramp-get-completion-function m))
+
+                 (setq result
+                       (append result
+                               (mapcar
+                                (lambda (x)
+                                  (tramp-get-completion-user-host
+                                   method user host (nth 0 x) (nth 1 x)))
+                                (delq nil all-user-hosts)))))
+
+             ;; Possible methods.
+             (setq result
+                   (append result (tramp-get-completion-methods m)))))))
+
+      ;; Add hop.
+      (dolist (elt result)
+       (when elt
+         (string-match tramp-prefix-regexp elt)
+         (setq elt (replace-match (concat tramp-prefix-format hop) nil nil 
elt))
+         (push
+          (substring elt (length (tramp-drop-volume-letter directory)))
+          result1)))
+
+      ;; Complete local parts.
+      (append
+       result1
+       (ignore-errors
+        (tramp-run-real-handler
+         #'file-name-all-completions (list filename directory)))))))
 
 ;; Method, host name and user name completion for a file.
 (defun tramp-completion-handle-file-name-completion
diff --git a/trampver.el b/trampver.el
index 7d91618361..6114aa3a83 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.1.4
+;; Version: 2.6.1.5
 ;; 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.1.4"
+(defconst tramp-version "2.6.1.5"
   "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.1.4 is not fit for %s"
+    (format "Tramp 2.6.1.5 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]