]> git.eshelyaron.com Git - emacs.git/commitdiff
Some minor Tramp changes
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 29 Dec 2024 11:26:05 +0000 (12:26 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 4 Jan 2025 20:24:10 +0000 (21:24 +0100)
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file): Do proper quoting.

* lisp/net/tramp.el (tramp-string-empty-or-nil-p):
Declare `tramp-suppress-trace' property.
(tramp-skeleton-make-symbolic-link): Drop volume letter when flushing.

* test/lisp/net/tramp-tests.el (tramp-test39-make-lock-file-name):
Adapt test.
(tramp-test42-utf8): Do not run expensive tests on MS Windows.

(cherry picked from commit 680906c136adfefda3a5d8be2b3ab7527521a449)

lisp/net/tramp-sh.el
lisp/net/tramp.el

index 8660eabf24adc1a51f1bfc56049400389706e3b0..fb41cfdf32ed41d280010d14a6c0abcd4d5f0725 100644 (file)
@@ -3287,8 +3287,7 @@ will be used."
               (setq ret (tramp-send-command-and-check
                         v (format
                            "cd %s && %s"
-                           (tramp-unquote-shell-quote-argument localname)
-                           command)
+                           (tramp-shell-quote-argument localname) command)
                         t t t))
            (unless (natnump ret) (setq ret 1))
            ;; We should add the output anyway.
@@ -5682,7 +5681,7 @@ Nonexistent directories are removed from spec."
        (dolist (cmd
                ;; Prefer GNU ls on *BSD and macOS.
                 (if (tramp-check-remote-uname vec tramp-bsd-unames)
-                   '( "gls" "ls" "gnuls") '("ls" "gnuls" "gls")))
+                   '("gls" "ls" "gnuls") '("ls" "gnuls" "gls")))
         (let ((dl (tramp-get-remote-path vec))
               result)
           (while (and dl (setq result (tramp-find-executable vec cmd dl t t)))
index 0af6fe967ee2a9c410dcfa20036a77ded182e133..93c6aaa8d55ef4e4cd512d01ca85f4567886627b 100644 (file)
@@ -1891,8 +1891,14 @@ See `tramp-dissect-file-name' for details."
 ;;;###tramp-autoload
 (defsubst tramp-string-empty-or-nil-p (string)
   "Check whether STRING is empty or nil."
+  ;; (declare (tramp-suppress-trace t))
   (or (null string) (string= string "")))
 
+;; We cannot use the `declare' form for `tramp-suppress-trace' in
+;; autoloaded functions, because the tramp-loaddefs.el generation
+;; would fail.
+(function-put #'tramp-string-empty-or-nil-p 'tramp-suppress-trace t)
+
 (defun tramp-buffer-name (vec)
   "A name for the connection buffer VEC."
   (declare (tramp-suppress-trace t))
@@ -3712,7 +3718,9 @@ on the same host.  Otherwise, TARGET is quoted."
         (setf ,target (tramp-file-local-name (expand-file-name ,target))))
        ;; There could be a cyclic link.
        (tramp-flush-file-properties
-       v (expand-file-name ,target (tramp-file-local-name default-directory))))
+       v (tramp-drop-volume-letter
+          (expand-file-name
+           ,target (tramp-file-local-name default-directory)))))
 
      ;; If TARGET is still remote, quote it.
      (if (tramp-tramp-file-p ,target)