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

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

[elpa] externals/tramp ae4ffa7b90: Tramp ELPA version 2.7.1.1 released


From: ELPA Syncer
Subject: [elpa] externals/tramp ae4ffa7b90: Tramp ELPA version 2.7.1.1 released
Date: Tue, 30 Jul 2024 12:01:08 -0400 (EDT)

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

    Tramp ELPA version 2.7.1.1 released
---
 README               |   6 +--
 test/tramp-tests.el  | 110 ++++++++++++++++++++++++++++++++++++++-------------
 texi/tramp.texi      |  11 ++++--
 texi/trampver.texi   |   2 +-
 tramp-adb.el         |   2 +-
 tramp-cmds.el        |   4 +-
 tramp-crypt.el       |   2 +-
 tramp-gvfs.el        |  17 ++++----
 tramp-integration.el |   9 ++++-
 tramp-message.el     |   4 +-
 tramp-sh.el          |  11 +++---
 tramp.el             |  49 ++++++++++++++++-------
 trampver.el          |  10 ++---
 13 files changed, 163 insertions(+), 74 deletions(-)

diff --git a/README b/README
index c8a850e388..a1d872777a 100644
--- a/README
+++ b/README
@@ -32,11 +32,11 @@ Emacs 28 or older
 
    • Remove all byte-compiled Tramp files
 
-          $ rm -f ~/.emacs.d/elpa/tramp-2.7.1/tramp*.elc
+          $ rm -f ~/.emacs.d/elpa/tramp-2.7.1.1/tramp*.elc
 
    • Start Emacs with Tramp's source files
 
-          $ emacs -L ~/.emacs.d/elpa/tramp-2.7.1 -l tramp
+          $ emacs -L ~/.emacs.d/elpa/tramp-2.7.1.1 -l tramp
 
      This should not give you the error.
 
@@ -50,7 +50,7 @@ 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.7.1 from GNU ELPA:
+installation or upgrading Tramp 2.7.1.1 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 bf77179e03..e958cd354b 100644
--- a/test/tramp-tests.el
+++ b/test/tramp-tests.el
@@ -330,6 +330,10 @@ is greater than 10.
          (should (tramp-tramp-file-p "/method:1.2.3.4:"))
          (should (tramp-tramp-file-p "/method:user@1.2.3.4:"))
 
+         ;; Using an IPv4 address with port.
+         (should (tramp-tramp-file-p "/method:1.2.3.4#1234:"))
+         (should (tramp-tramp-file-p "/method:user@1.2.3.4#1234:"))
+
          ;; Using an IPv6 address.
          (should (tramp-tramp-file-p "/method:[::1]:"))
          (should (tramp-tramp-file-p "/method:user@[::1]:"))
@@ -338,6 +342,10 @@ is greater than 10.
          (should (tramp-tramp-file-p "/method:[::ffff:1.2.3.4]:"))
          (should (tramp-tramp-file-p "/method:user@[::ffff:1.2.3.4]:"))
 
+         ;; Using an IPv6 address with port.
+         (should (tramp-tramp-file-p "/method:[::1]#1234:"))
+         (should (tramp-tramp-file-p "/method:user@[::1]#1234:"))
+
          ;; Local file name part.
          (should (tramp-tramp-file-p "/method:::"))
          (should (tramp-tramp-file-p "/method::/:"))
@@ -418,6 +426,10 @@ is greater than 10.
          (should (tramp-tramp-file-p "/1.2.3.4:"))
          (should (tramp-tramp-file-p "/user@1.2.3.4:"))
 
+         ;; Using an IPv4 address with port.
+         (should (tramp-tramp-file-p "/1.2.3.4#1234:"))
+         (should (tramp-tramp-file-p "/user@1.2.3.4#1234:"))
+
          ;; Using an IPv6 address.
          (should (tramp-tramp-file-p "/[::1]:"))
          (should (tramp-tramp-file-p "/user@[::1]:"))
@@ -426,6 +438,10 @@ is greater than 10.
          (should (tramp-tramp-file-p "/[::ffff:1.2.3.4]:"))
          (should (tramp-tramp-file-p "/user@[::ffff:1.2.3.4]:"))
 
+         ;; Using an IPv6 address with port.
+         (should (tramp-tramp-file-p "/[::1]#1234:"))
+         (should (tramp-tramp-file-p "/user@[::1]#1234:"))
+
          ;; Local file name part.
          (should (tramp-tramp-file-p "/host::"))
          (should (tramp-tramp-file-p "/host:/:"))
@@ -472,6 +488,10 @@ is greater than 10.
          (should (tramp-tramp-file-p "/[method/1.2.3.4]"))
          (should (tramp-tramp-file-p "/[method/user@1.2.3.4]"))
 
+         ;; Using an IPv4 address with port.
+         (should (tramp-tramp-file-p "/[method/1.2.3.4#1234]"))
+         (should (tramp-tramp-file-p "/[method/user@1.2.3.4#1234]"))
+
          ;; Using an IPv6 address.
          (should (tramp-tramp-file-p "/[method/::1]"))
          (should (tramp-tramp-file-p "/[method/user@::1]"))
@@ -480,6 +500,10 @@ is greater than 10.
          (should (tramp-tramp-file-p "/[method/::ffff:1.2.3.4]"))
          (should (tramp-tramp-file-p "/[method/user@::ffff:1.2.3.4]"))
 
+         ;; Using an IPv6 address with port.
+         (should (tramp-tramp-file-p "/[method/::1#1234]"))
+         (should (tramp-tramp-file-p "/[method/user@::1#1234]"))
+
          ;; Local file name part.
          (should (tramp-tramp-file-p "/[method/]"))
          (should (tramp-tramp-file-p "/[method/]/:"))
@@ -824,19 +848,20 @@ is greater than 10.
          (should (string-equal (file-remote-p "/method:[::1]:" 'localname) ""))
          (should (string-equal (file-remote-p "/method:[::1]:" 'hop) nil))
 
-         ;; No expansion.
+         ;; No expansion.  Hop.
          (should (string-equal
-                  (file-remote-p "/method:user@[::1]:")
-                  (format "/%s:%s@%s:" "method" "user" "[::1]")))
+                  (file-remote-p "/method:user@[::1]#1234:")
+                  (format "/%s:%s@%s#%s:" "method" "user" "[::1]" "1234")))
          (should (string-equal
-                  (file-remote-p "/method:user@[::1]:" 'method) "method"))
-         (should
-          (string-equal (file-remote-p "/method:user@[::1]:" 'user) "user"))
-         (should
-          (string-equal (file-remote-p "/method:user@[::1]:" 'host) "::1"))
+                  (file-remote-p "/method:user@[::1]#1234:" 'method) "method"))
+         (should (string-equal (file-remote-p "/method:user@[::1]#1234:" 'user)
+                               "user"))
+         (should (string-equal
+                  (file-remote-p "/method:user@[::1]#1234:" 'host) "::1#1234"))
+         (should (string-equal
+                  (file-remote-p "/method:user@[::1]#1234:" 'localname) ""))
          (should (string-equal
-                  (file-remote-p "/method:user@[::1]:" 'localname) ""))
-         (should (string-equal (file-remote-p "/method:user@[::1]:" 'hop) nil))
+                  (file-remote-p "/method:user@[::1]#1234:" 'hop) nil))
 
          ;; Local file name part.
          (should (string-equal (file-remote-p "/-:host:/:" 'localname) "/:"))
@@ -1220,6 +1245,20 @@ is greater than 10.
          (should (string-equal (file-remote-p "/user@[::1]:" 'localname) ""))
          (should (string-equal (file-remote-p "/user@[::1]:" 'hop) nil))
 
+         ;; No expansion.  Hop.
+         (should (string-equal
+                  (file-remote-p "/user@[::1]#1234:")
+                  (format "/%s@%s#%s:" "user" "[::1]" "1234")))
+         (should (string-equal
+                  (file-remote-p "/user@[::1]#1234:" 'method) 
"default-method"))
+         (should
+          (string-equal (file-remote-p "/user@[::1]#1234:" 'user) "user"))
+         (should
+          (string-equal (file-remote-p "/user@[::1]#1234:" 'host) "::1#1234"))
+         (should
+          (string-equal (file-remote-p "/user@[::1]#1234:" 'localname) ""))
+         (should (string-equal (file-remote-p "/user@[::1]#1234:" 'hop) nil))
+
          ;; Local file name part.
          (should (string-equal (file-remote-p "/host:/:" 'localname) "/:"))
          (should (string-equal (file-remote-p "/host::" 'localname) ":"))
@@ -1862,19 +1901,20 @@ is greater than 10.
          (should (string-equal (file-remote-p "/[method/::1]" 'localname) ""))
          (should (string-equal (file-remote-p "/[method/::1]" 'hop) nil))
 
-         ;; No expansion.
+         ;; No expansion.  Hop.
+         (should (string-equal
+                  (file-remote-p "/[method/user@::1#1234]")
+                  (format "/[%s/%s@%s#%s]" "method" "user" "::1" "1234")))
          (should (string-equal
-                  (file-remote-p "/[method/user@::1]")
-                  (format "/[%s/%s@%s]" "method" "user" "::1")))
+                  (file-remote-p "/[method/user@::1#1234]" 'method) "method"))
          (should (string-equal
-                  (file-remote-p "/[method/user@::1]" 'method) "method"))
+                  (file-remote-p "/[method/user@::1#1234]" 'user) "user"))
          (should (string-equal
-                  (file-remote-p "/[method/user@::1]" 'user) "user"))
+                  (file-remote-p "/[method/user@::1#1234]" 'host) "::1#1234"))
          (should (string-equal
-                  (file-remote-p "/[method/user@::1]" 'host) "::1"))
+                  (file-remote-p "/[method/user@::1#1234]" 'localname) ""))
          (should (string-equal
-                  (file-remote-p "/[method/user@::1]" 'localname) ""))
-         (should (string-equal (file-remote-p "/[method/user@::1]" 'hop) nil))
+                  (file-remote-p "/[method/user@::1#1234]" 'hop) nil))
 
          ;; Local file name part.
          (should (string-equal (file-remote-p "/[/host]/:" 'localname) "/:"))
@@ -2401,16 +2441,22 @@ This checks also `file-name-as-directory', 
`file-name-directory',
       ;; which ruins the tests.
       (let ((tramp-default-method
             (file-remote-p ert-remote-temporary-file-directory 'method))
-           (host (file-remote-p ert-remote-temporary-file-directory 'host)))
+           (host-port
+            (file-remote-p ert-remote-temporary-file-directory 'host)))
        (dolist
            (file
             `(,(format "/%s::" tramp-default-method)
               ,(format
                 "/-:%s:"
-                (if (string-match-p tramp-ipv6-regexp host)
-                    (concat
-                     tramp-prefix-ipv6-format host tramp-postfix-ipv6-format)
-                  host))))
+                ;; `(file-remote-p ... 'host)' eliminates IPv6
+                ;; delimiters.  Add them.
+                (if (string-match tramp-ipv6-regexp host-port)
+                    (replace-match
+                     (format
+                      "%s\\&%s"
+                      tramp-prefix-ipv6-format tramp-postfix-ipv6-format)
+                     nil nil host-port)
+                  host-port))))
          (should (string-equal (directory-file-name file) file))
          (should
           (string-equal
@@ -4772,8 +4818,11 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
        (host (file-remote-p ert-remote-temporary-file-directory 'host))
         (orig-syntax tramp-syntax)
         (minibuffer-completing-file-name t))
-    (when (and (stringp host) (string-match tramp-host-with-port-regexp host))
-      (setq host (match-string 1 host)))
+    (when (and (stringp host)
+              (string-match
+               (rx (regexp tramp-prefix-port-regexp) (regexp 
tramp-port-regexp))
+               host))
+      (setq host (replace-match "" nil nil host)))
 
     (unwind-protect
         (dolist (syntax (if (tramp--test-expensive-test-p)
@@ -4906,8 +4955,11 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
         (orig-syntax tramp-syntax)
         (non-essential t)
        (inhibit-message t))
-    (when (and (stringp host) (string-match tramp-host-with-port-regexp host))
-      (setq host (match-string 1 host)))
+    (when (and (stringp host)
+              (string-match
+               (rx (regexp tramp-prefix-port-regexp) (regexp 
tramp-port-regexp))
+               host))
+      (setq host (replace-match "" nil nil host)))
 
     ;; (trace-function #'tramp-completion-file-name-handler)
     ;; (trace-function #'completion-file-name-table)
@@ -7599,6 +7651,8 @@ This requires restrictions of file name syntax."
 
 (tramp--test-deftest-without-file-attributes tramp-test41-special-characters)
 
+(tramp--test-deftest-direct-async-process tramp-test41-special-characters)
+
 (ert-deftest tramp-test42-utf8 ()
   "Check UTF8 encoding in file names and file contents."
   (skip-unless (tramp--test-enabled))
@@ -7667,6 +7721,8 @@ This requires restrictions of file name syntax."
 
 (tramp--test-deftest-without-file-attributes tramp-test42-utf8)
 
+(tramp--test-deftest-direct-async-process tramp-test42-utf8)
+
 (ert-deftest tramp-test43-file-system-info ()
   "Check that `file-system-info' returns proper values."
   (skip-unless (tramp--test-enabled))
diff --git a/texi/tramp.texi b/texi/tramp.texi
index 7bf3d12b0e..7f1dd3854c 100644
--- a/texi/tramp.texi
+++ b/texi/tramp.texi
@@ -892,9 +892,9 @@ a predefined timeout.
 @cindex method @option{run0}
 @cindex @option{run0} method
 
-This method is used on @code{systemd}-based hosts.  Internally, it
-uses the @code{systemd-run} command.  A @option{run0} connection is
-disabled after a predefined timeout as well.
+@c This requires systemd 256.  Check with 'systemd-run --version'.
+This method is used on @code{systemd}-based hosts.  A @option{run0}
+connection is disabled after a predefined timeout as well.
 
 This is an optional method, @pxref{Optional methods}.
 
@@ -4580,6 +4580,11 @@ It does not report the remote terminal name via 
@code{process-tty-name}.
 
 @item
 It does not set process property @code{remote-pid}.
+
+@item
+It fails, when the command is too long.  This can happen on
+directories with a long directory name, or when the remote @env{PATH}
+and/or other environment variables, which must be set, are too long.
 @end itemize
 
 In order to gain even more performance, it is recommended to bind
diff --git a/texi/trampver.texi b/texi/trampver.texi
index 521fe592e7..21b3ef1bc3 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.7.1
+@set trampver 2.7.1.1
 @set trampurl https://www.gnu.org/software/tramp/
 @set tramp-bug-report-address tramp-devel@@gnu.org
 @set emacsver 27.1
diff --git a/tramp-adb.el b/tramp-adb.el
index 5b1c4ba5b1..b26a93fc6e 100644
--- a/tramp-adb.el
+++ b/tramp-adb.el
@@ -919,7 +919,7 @@ will be used."
 
 (defun tramp-adb-handle-get-remote-uid (vec id-format)
   "Like `tramp-get-remote-uid' for Tramp files.
- ID-FORMAT valid values are `string' and `integer'."
+ID-FORMAT valid values are `string' and `integer'."
   (tramp-adb-send-command vec "id")
   (tramp-read-id-output vec)
   (tramp-get-connection-property vec (format "uid-%s" id-format)))
diff --git a/tramp-cmds.el b/tramp-cmds.el
index ecb9071eb5..7635e9c4fa 100644
--- a/tramp-cmds.el
+++ b/tramp-cmds.el
@@ -39,6 +39,8 @@
 (defvar mm-7bit-chars)
 (defvar reporter-eval-buffer)
 (defvar reporter-prompt-for-summary-p)
+(defvar tramp-repository-branch)
+(defvar tramp-repository-version)
 
 ;;;###tramp-autoload
 (defun tramp-change-syntax (&optional syntax)
@@ -630,7 +632,7 @@ If the buffer runs `dired', the buffer is reverted."
 ;;;###tramp-autoload
 (defun tramp-recompile-elpa-command-completion-p (_symbol _buffer)
   "A predicate for `tramp-recompile-elpa'.
-It is completed by \"M-x TAB\" only if package.el is loaded, and
+It is completed by `M-x TAB' only if package.el is loaded, and
 Tramp is an installed ELPA package."
   ;; We cannot apply `package-installed-p', this would also return the
   ;; builtin package.
diff --git a/tramp-crypt.el b/tramp-crypt.el
index a7af64bff5..d44a656035 100644
--- a/tramp-crypt.el
+++ b/tramp-crypt.el
@@ -117,7 +117,7 @@ initializing a new encrypted remote directory."
 ;; `command-completion-default-include-p'.
 (defun tramp-crypt-command-completion-p (symbol _buffer)
   "A predicate for Tramp interactive commands.
-They are completed by \"M-x TAB\" only when encryption support is enabled."
+They are completed by `M-x TAB' only when encryption support is enabled."
   (and tramp-crypt-enabled
        ;; `tramp-crypt-remove-directory' needs to be completed only in
        ;; case we have already encrypted directories.
diff --git a/tramp-gvfs.el b/tramp-gvfs.el
index b1820b3e2f..381a5efc77 100644
--- a/tramp-gvfs.el
+++ b/tramp-gvfs.el
@@ -2217,8 +2217,8 @@ connection if a previous connection has died for some 
reason."
 
     (unless (tramp-gvfs-connection-mounted-p vec)
       (let ((method (tramp-file-name-method vec))
-           (user (tramp-file-name-user vec))
-           (host (tramp-file-name-host vec))
+           (user-domain (tramp-file-name-user-domain vec))
+           (host-port (tramp-file-name-host-port vec))
            (localname (tramp-file-name-unquote-localname vec))
            (object-path
             (tramp-gvfs-object-path (tramp-make-tramp-file-name vec 'noloc))))
@@ -2246,9 +2246,9 @@ connection if a previous connection has died for some 
reason."
 
        (with-tramp-progress-reporter
            vec 3 (format "Opening connection for %s%s using %s"
-                         (if (tramp-string-empty-or-nil-p user)
-                             "" (concat user "@"))
-                         host method)
+                         (if (tramp-string-empty-or-nil-p user-domain)
+                             "" (concat user-domain "@"))
+                         host-port method)
 
          ;; Enable `auth-source'.
          (tramp-set-connection-property
@@ -2296,13 +2296,14 @@ connection if a previous connection has died for some 
reason."
          (with-timeout
              ((tramp-get-method-parameter
                vec 'tramp-connection-timeout tramp-connection-timeout)
-              (if (tramp-string-empty-or-nil-p (tramp-file-name-user vec))
+              (if (tramp-string-empty-or-nil-p user-domain)
                   (tramp-error
                    vec 'file-error
-                   "Timeout reached mounting %s using %s" host method)
+                   "Timeout reached mounting %s using %s" host-port method)
                 (tramp-error
                  vec 'file-error
-                 "Timeout reached mounting %s@%s using %s" user host method)))
+                 "Timeout reached mounting %s@%s using %s"
+                 user-domain host-port method)))
            (while (not (tramp-get-file-property vec "/" "fuse-mountpoint"))
              (read-event nil nil 0.1)))
 
diff --git a/tramp-integration.el b/tramp-integration.el
index e1f0b2a349..56deaf9066 100644
--- a/tramp-integration.el
+++ b/tramp-integration.el
@@ -275,9 +275,14 @@ NAME must be equal to `tramp-current-connection'."
 ;;; Integration of shortdoc.el:
 
 (with-eval-after-load 'shortdoc
-  (dolist (elem '((file-remote-p
+  (dolist (elem `((file-remote-p
                   :eval (file-remote-p "/ssh:user@host:/tmp/foo")
-                  :eval (file-remote-p "/ssh:user@host:/tmp/foo" 'method))
+                  :eval (file-remote-p "/ssh:user@host:/tmp/foo" 'method)
+                  :eval (file-remote-p "/ssh:user@[::1]#1234:/tmp/foo" 'host)
+                  ;; We don't want to see the text properties.
+                  :no-eval (file-remote-p "/sudo::/tmp/foo" 'user)
+                  :result ,(substring-no-properties
+                            (file-remote-p "/sudo::/tmp/foo" 'user)))
                  (file-local-name
                   :eval (file-local-name "/ssh:user@host:/tmp/foo"))
                  (file-local-copy
diff --git a/tramp-message.el b/tramp-message.el
index b1f7aa9504..830635c53e 100644
--- a/tramp-message.el
+++ b/tramp-message.el
@@ -53,6 +53,8 @@
 (declare-function tramp-file-name-host-port "tramp")
 (declare-function tramp-file-name-user-domain "tramp")
 (declare-function tramp-get-default-directory "tramp")
+(defvar tramp-repository-branch)
+(defvar tramp-repository-version)
 
 ;;;###tramp-autoload
 (defcustom tramp-verbose 3
@@ -127,7 +129,7 @@ The outline level is equal to the verbosity of the Tramp 
message."
 ;; `command-completion-default-include-p'.
 (defun tramp-debug-buffer-command-completion-p (_symbol buffer)
   "A predicate for Tramp interactive commands.
-They are completed by \"M-x TAB\" only in Tramp debug buffers."
+They are completed by `M-x TAB' only in Tramp debug buffers."
   (declare (tramp-suppress-trace t))
   (with-current-buffer buffer
     (string-equal
diff --git a/tramp-sh.el b/tramp-sh.el
index bce7c323da..8fde854a97 100644
--- a/tramp-sh.el
+++ b/tramp-sh.el
@@ -107,7 +107,7 @@ detected as prompt when being sent on echoing hosts, 
therefore.")
 
 (defcustom tramp-use-connection-share (not (eq system-type 'windows-nt))
   "Whether to use connection share in ssh or PuTTY.
-Set it to t, if you want Tramp to apply respective options. These
+Set it to t, if you want Tramp to apply respective options.  These
 are `tramp-ssh-controlmaster-options' for ssh, and \"-share\" for PuTTY.
 Set it to nil, if you use Control* or Proxy* options in your ssh
 configuration.
@@ -509,8 +509,9 @@ The string is used in `tramp-methods'.")
   "Enable \"run0\" method."
  (add-to-list 'tramp-methods
               `("run0"
-                (tramp-login-program        "systemd-run")
-                (tramp-login-args           (("--uid" "%u") ("-t") ("%l")))
+                (tramp-login-program        "run0")
+                (tramp-login-args           (("--user" "%u")
+                                            ("--background" "''") ("%l")))
                 (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-args    ("-c"))
                 (tramp-connection-timeout   10)
@@ -5288,7 +5289,7 @@ connection if a previous connection has died for some 
reason."
                                    "" (concat " " process-name))
                                (if (tramp-string-empty-or-nil-p l-user)
                                    "" (concat l-user "@"))
-                               l-host l-method)
+                               (tramp-file-name-host-port hop) l-method)
                      (tramp-send-command vec command t t)
                      (tramp-process-actions
                       p vec
@@ -5316,7 +5317,7 @@ connection if a previous connection has died for some 
reason."
                            (if (tramp-string-empty-or-nil-p
                                 (tramp-file-name-user vec))
                                "" (concat (tramp-file-name-user vec) "@"))
-                           (tramp-file-name-host vec)
+                           (tramp-file-name-host-port vec)
                            (tramp-file-name-method vec))
                  (tramp-open-connection-setup-interactive-shell p vec))
 
diff --git a/tramp.el b/tramp.el
index f97ed66c58..22b3ef8462 100644
--- a/tramp.el
+++ b/tramp.el
@@ -78,6 +78,7 @@
 (defvar tramp-postfix-ipv6-regexp)
 (defvar tramp-postfix-host-format)
 (defvar tramp-postfix-host-regexp)
+(defvar tramp-host-with-port-regexp)
 (defvar tramp-remote-file-name-spec-regexp)
 (defvar tramp-file-name-structure)
 (defvar tramp-file-name-regexp)
@@ -878,6 +879,7 @@ to be set, depending on VALUE."
        tramp-postfix-ipv6-regexp (tramp-build-postfix-ipv6-regexp)
        tramp-postfix-host-format (tramp-build-postfix-host-format)
        tramp-postfix-host-regexp (tramp-build-postfix-host-regexp)
+       tramp-host-with-port-regexp (tramp-build-host-with-port-regexp)
        tramp-remote-file-name-spec-regexp
        (tramp-build-remote-file-name-spec-regexp)
        tramp-file-name-structure (tramp-build-file-name-structure)
@@ -955,7 +957,8 @@ The `ftp' syntax does not support methods.")
   "Return `tramp-postfix-method-format' according to `tramp-syntax'."
   (tramp-lookup-syntax tramp-postfix-method-format-alist))
 
-(defvar tramp-postfix-method-format nil ; Init'd when defining `tramp-syntax'!
+(defvar tramp-postfix-method-format
+  nil ; Initialized when defining `tramp-syntax'!
   "String matching delimiter between method and user or host names.
 The `ftp' syntax does not support methods.
 Used in `tramp-make-tramp-file-name'.")
@@ -964,7 +967,8 @@ Used in `tramp-make-tramp-file-name'.")
   "Return `tramp-postfix-method-regexp'."
   (rx (literal (tramp-build-postfix-method-format))))
 
-(defvar tramp-postfix-method-regexp nil ; Init'd when defining `tramp-syntax'!
+(defvar tramp-postfix-method-regexp
+  nil ; Initialized when defining `tramp-syntax'!
   "Regexp matching delimiter between method and user or host names.
 Derived from `tramp-postfix-method-format'.")
 
@@ -1059,11 +1063,18 @@ Derived from `tramp-prefix-port-format'.")
 (defconst tramp-port-regexp (rx (+ digit))
   "Regexp matching port numbers.")
 
-(defconst tramp-host-with-port-regexp
+(defun tramp-build-host-with-port-regexp ()
+  "Return `tramp-host-with-port-regexp'."
   (rx
-   (group (regexp tramp-host-regexp))
+   (group (| (regexp tramp-host-regexp)
+            (: (regexp tramp-prefix-ipv6-regexp)
+               (? (regexp tramp-ipv6-regexp))
+               (regexp tramp-postfix-ipv6-regexp))))
    (regexp tramp-prefix-port-regexp)
-   (group (regexp tramp-port-regexp)))
+   (group (regexp tramp-port-regexp))))
+
+(defvar tramp-host-with-port-regexp
+  nil ; Initialized when defining `tramp-syntax'!
   "Regexp matching host names with port numbers.")
 
 (defconst tramp-postfix-hop-format "|"
@@ -2688,7 +2699,7 @@ Run BODY."
 ;; `command-completion-default-include-p'.
 (defun tramp-command-completion-p (_symbol buffer)
   "A predicate for Tramp interactive commands.
-They are completed by \"M-x TAB\" only if the current buffer is remote."
+They are completed by `M-x TAB' only if the current buffer is remote."
   (tramp-tramp-file-p (tramp-get-default-directory buffer)))
 
 (defun tramp-connectable-p (vec-or-filename)
@@ -4279,7 +4290,10 @@ Let-bind it when necessary.")
             (file-regular-p (file-truename filename))))))))
 
 (defun tramp-handle-file-remote-p (filename &optional identification connected)
-  "Like `file-remote-p' for Tramp files."
+  "Like `file-remote-p' for Tramp files.
+It supports the additional IDENTIFICATION `hop'.
+For the `host' IDENTIFICATION, both host name and port number (if
+existing) are returned."
   ;; We do not want traces in the debug buffer.
   (let ((tramp-verbose (min tramp-verbose 3)))
     (when (tramp-tramp-file-p filename)
@@ -6782,9 +6796,9 @@ Consults the auth-source package."
               proc "password-vector" (process-get proc 'tramp-vector)))
         (key (tramp-make-tramp-file-name vec 'noloc))
         (method (tramp-file-name-method vec))
-        (user (or (tramp-file-name-user-domain vec)
-                  (tramp-get-connection-property key "login-as")))
-        (host (tramp-file-name-host-port vec))
+        (user-domain (or (tramp-file-name-user-domain vec)
+                         (tramp-get-connection-property key "login-as")))
+        (host-port (tramp-file-name-host-port vec))
         (pw-prompt
          (string-trim-left
           (or prompt
@@ -6812,9 +6826,9 @@ Consults the auth-source package."
                (setq auth-info
                      (car
                       (auth-source-search
-                       :max 1 :user user :host host :port method
-                       :require (cons :secret (and user '(:user)))
-                       :create (and user t)))
+                       :max 1 :user user-domain :host host-port :port method
+                       :require (cons :secret (and user-domain '(:user)))
+                       :create (and user-domain t)))
                      tramp-password-save-function
                      (plist-get auth-info :save-function)
                      auth-passwd
@@ -6975,8 +6989,13 @@ SIGCODE may be an integer, or a symbol whose name is a 
signal name."
       (setq pid process
             vec (and (stringp remote) (tramp-dissect-file-name remote))))
      (t (signal 'wrong-type-argument (list #'processp process))))
-    (unless (or (numberp sigcode) (symbolp sigcode))
-      (signal 'wrong-type-argument (list #'numberp sigcode)))
+    (cond
+     ((symbolp sigcode)
+      (setq sigcode (upcase (symbol-name sigcode)))
+      (when (string-prefix-p "SIG" sigcode)
+        (setq sigcode (substring sigcode 3))))
+     ((not (numberp sigcode))
+      (signal 'wrong-type-argument (list #'numberp sigcode))))
     ;; If it's a Tramp process, send SIGCODE remotely.
     (when (and pid vec)
       (tramp-message
diff --git a/trampver.el b/trampver.el
index 8bbfddeaab..9501079383 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.7.1
+;; Version: 2.7.1.1
 ;; Package-Requires: ((emacs "27.1"))
 ;; Package-Type: multi
 ;; URL: https://www.gnu.org/software/tramp/
@@ -40,14 +40,13 @@
 ;; ./configure" to change them.
 
 ;;;###tramp-autoload
-(defconst tramp-version "2.7.1"
+(defconst tramp-version "2.7.1.1"
   "This version of Tramp.")
 
 ;;;###tramp-autoload
 (defconst tramp-bug-report-address "tramp-devel@gnu.org"
   "Email address to send bug reports to.")
 
-;;;###tramp-autoload
 (defconst tramp-repository-branch
   (ignore-errors
     ;; Suppress message from `emacs-repository-get-branch'.  We must
@@ -61,7 +60,6 @@
           (emacs-repository-get-branch dir))))
   "The repository branch of the Tramp sources.")
 
-;;;###tramp-autoload
 (defconst tramp-repository-version
   (ignore-errors
     ;; Suppress message from `emacs-repository-get-version'.  We must
@@ -78,7 +76,7 @@
 ;; Check for Emacs version.
 (let ((x   (if (not (string-version-lessp emacs-version "27.1"))
       "ok"
-    (format "Tramp 2.7.1 is not fit for %s"
+    (format "Tramp 2.7.1.1 is not fit for %s"
             (replace-regexp-in-string "\n" "" (emacs-version))))))
   (unless (string-equal "ok" x) (error "%s" x)))
 
@@ -107,7 +105,7 @@
          ("2.5.2.28.1" . "28.1") ("2.5.3.28.2" . "28.2") ("2.5.4" . "28.3")
          ("2.6.0.29.1" . "29.1") ("2.6.2.29.2" . "29.2") ("2.6.3-pre" . "29.3")
         ("2.6.3" . "29.4")
-        ("2.7.1" . "30.1")))
+        ("2.7.1.30.1" . "30.1")))
 
 (add-hook 'tramp-unload-hook
          (lambda ()



reply via email to

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