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

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

[elpa] externals/tramp cc78c39: Tramp ELPA version 2.4.4.3 released


From: Michael Albinus
Subject: [elpa] externals/tramp cc78c39: Tramp ELPA version 2.4.4.3 released
Date: Thu, 29 Oct 2020 06:43:01 -0400 (EDT)

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

    Tramp ELPA version 2.4.4.3 released
---
 test/tramp-tests.el | 356 +++++++++++++++++++++-------------------------------
 texi/tramp.texi     |  40 +++---
 texi/trampver.texi  |   2 +-
 tramp-compat.el     |   8 ++
 tramp-loaddefs.el   |   2 +-
 tramp-sh.el         |   8 +-
 tramp.el            |   4 +-
 tramp.info          | 174 ++++++++++++-------------
 trampver.el         |   4 +-
 9 files changed, 262 insertions(+), 336 deletions(-)

diff --git a/test/tramp-tests.el b/test/tramp-tests.el
index e4def7e..bbb9815 100644
--- a/test/tramp-tests.el
+++ b/test/tramp-tests.el
@@ -2057,8 +2057,8 @@ properly.  BODY shall not contain a timeout."
       ;; user "foo" to "/~foo"".  Otherwise, it doesn't expand.
       (should
        (string-equal
-       (substitute-in-file-name
-        "/method:host:/path/~foo") "/method:host:/path/~foo"))
+       (substitute-in-file-name "/method:host:/path/~foo")
+       "/method:host:/path/~foo"))
       ;; Quoting local part.
       (should
        (string-equal
@@ -2070,12 +2070,12 @@ properly.  BODY shall not contain a timeout."
         "/method:host:/:/~foo") "/method:host:/:/~foo"))
       (should
        (string-equal
-       (substitute-in-file-name
-        "/method:host:/:/path//~foo") "/method:host:/:/path//~foo"))
+       (substitute-in-file-name "/method:host:/:/path//~foo")
+       "/method:host:/:/path//~foo"))
       (should
        (string-equal
-       (substitute-in-file-name
-        "/method:host:/:/path/~foo") "/method:host:/:/path/~foo")))
+       (substitute-in-file-name "/method:host:/:/path/~foo")
+       "/method:host:/:/path/~foo")))
 
     (let (process-environment)
       (should
@@ -2120,19 +2120,16 @@ properly.  BODY shall not contain a timeout."
       (expand-file-name "/method:host:/path/../file") "/method:host:/file"))
     (should
      (string-equal
-      (expand-file-name "/method:host:/path/.")
-      (if (tramp--test-emacs28-p) "/method:host:/path/" "/method:host:/path")))
+      (expand-file-name "/method:host:/path/.") "/method:host:/path"))
     (should
      (string-equal
       (expand-file-name "/method:host:/path/..") "/method:host:/"))
     (should
      (string-equal
-      (expand-file-name "." "/method:host:/path/")
-      (if (tramp--test-emacs28-p) "/method:host:/path/" "/method:host:/path")))
+      (expand-file-name "." "/method:host:/path/") "/method:host:/path"))
     (should
      (string-equal
-      (expand-file-name "" "/method:host:/path/")
-      (if (tramp--test-emacs28-p) "/method:host:/path/" "/method:host:/path")))
+      (expand-file-name "" "/method:host:/path/") "/method:host:/path"))
     ;; Quoting local part.
     (should
      (string-equal
@@ -4286,6 +4283,21 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
            (should (string-match "\\`foo" (buffer-string))))
 
        ;; Cleanup.
+       (ignore-errors (delete-process proc)))
+
+      ;; PTY.
+      (unwind-protect
+         (with-temp-buffer
+           (if (not (tramp--test-sh-p))
+               (should-error
+                (start-file-process "test4" (current-buffer) nil)
+                :type 'wrong-type-argument)
+             (setq proc (start-file-process "test4" (current-buffer) nil))
+             (should (processp proc))
+             (should (equal (process-status proc) 'run))
+             (should (stringp (process-tty-name proc)))))
+
+       ;; Cleanup.
        (ignore-errors (delete-process proc))))))
 
 (ert-deftest tramp-test30-make-process ()
@@ -4612,214 +4624,128 @@ INPUT, if non-nil, is a string sent to the process."
 ;; This test is inspired by Bug#39067.
 (ert-deftest tramp-test32-shell-command-dont-erase-buffer ()
   "Check `shell-command-dont-erase-buffer'."
-  :tags '(:expensive-test)
+  ;; As long as Bug#40896 is not solved both in simple.el and Tramp,
+  ;; this test cannot run properly.
+  :tags '(:expensive-test :unstable)
   (skip-unless (tramp--test-enabled))
+  (skip-unless nil)
   (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p)))
   ;; Prior Emacs 27, `shell-command-dont-erase-buffer' wasn't working properly.
   (skip-unless (tramp--test-emacs27-p))
 
-  ;; We check both the local and remote case, in order to guarantee
-  ;; that they behave similar.
-  (dolist (default-directory
-           `(,temporary-file-directory ,tramp-test-temporary-file-directory))
-    (let ((buffer (generate-new-buffer "foo"))
-         ;; Suppress nasty messages.
-         (inhibit-message t)
-         point kill-buffer-query-functions)
-      (unwind-protect
-         (progn
-           ;; Don't erase if buffer is the current one.  Point is not moved.
-           (let (shell-command-dont-erase-buffer)
-             (with-temp-buffer
-               (insert "bar")
-               (setq point (point))
-               (should (string-equal "bar" (buffer-string)))
-               (should (= (point) (point-max)))
-               (shell-command "echo baz" (current-buffer))
-               (should (string-equal "barbaz\n" (buffer-string)))
-               (should (= point (point)))
-               (should-not (= (point) (point-max)))))
-
-           ;; Erase if the buffer is not current one.  Point is not moved.
-           (let (shell-command-dont-erase-buffer)
-             (with-current-buffer buffer
-               (erase-buffer)
-               (insert "bar")
-               (setq point (point))
-               (should (string-equal "bar" (buffer-string)))
-               (should (= (point) (point-max)))
-               (with-temp-buffer
-                 (shell-command "echo baz" buffer))
-               (should (string-equal "baz\n" (buffer-string)))
-               (should (= point (point)))
-               (should-not (= (point) (point-max)))))
-
-           ;; Erase if buffer is the current one, but
-           ;; `shell-command-dont-erase-buffer' is set to `erase'.
-           ;; There is no point to check point.
-           (let ((shell-command-dont-erase-buffer 'erase))
-             (with-temp-buffer
-               (insert "bar")
-               (should (string-equal "bar" (buffer-string)))
-               (should (= (point) (point-max)))
-               (shell-command "echo baz" (current-buffer))
-               (should (string-equal "baz\n" (buffer-string)))
-               ;; In the local case, point is not moved after the
-               ;; inserted text.
-               (should (= (point)
-                          (if (file-remote-p default-directory)
-                              (point-max) (point-min))))))
-
-           ;; Don't erase if the buffer is the current one and
-           ;; `shell-command-dont-erase-buffer' is set to
-           ;; `beg-last-out'.  Check point.
-           (let ((shell-command-dont-erase-buffer 'beg-last-out))
-             (with-temp-buffer
-               (insert "bar")
-               (setq point (point))
-               (should (string-equal "bar" (buffer-string)))
-               (should (= (point) (point-max)))
-               (shell-command "echo baz" (current-buffer))
-               (should (string-equal "barbaz\n" (buffer-string)))
-               ;; There is still an error in Tramp.
-               (unless (file-remote-p default-directory)
-                 (should (= point (point)))
-                 (should-not (= (point) (point-max))))))
-
-           ;; Don't erase if the buffer is not the current one and
-           ;; `shell-command-dont-erase-buffer' is set to
-           ;; `beg-last-out'.  Check point.
-           (let ((shell-command-dont-erase-buffer 'beg-last-out))
-             (with-current-buffer buffer
-               (erase-buffer)
-               (insert "bar")
-               (setq point (point))
-               (should (string-equal "bar" (buffer-string)))
-               (should (= (point) (point-max)))
-               (with-temp-buffer
-                 (shell-command "echo baz" buffer))
-               (should (string-equal "barbaz\n" (buffer-string)))
-               ;; There is still an error in Tramp.
-               (unless (file-remote-p default-directory)
-                 (should (= point (point)))
-                 (should-not (= (point) (point-max))))))
-
-           ;; Don't erase if the buffer is the current one and
-           ;; `shell-command-dont-erase-buffer' is set to
-           ;; `end-last-out'.  Check point.
-           (let ((shell-command-dont-erase-buffer 'end-last-out))
-             (with-temp-buffer
-               (insert "bar")
-               (setq point (point))
-               (should (string-equal "bar" (buffer-string)))
-               (should (= (point) (point-max)))
-               (shell-command "echo baz" (current-buffer))
-               (should (string-equal "barbaz\n" (buffer-string)))
-               ;; This does not work as expected in the local case.
-               ;; Therefore, we negate the test for the time being.
-               (should-not
-                (funcall (if (file-remote-p default-directory) #'identity 
#'not)
-                         (= point (point))))
-               (should
-                (funcall (if (file-remote-p default-directory) #'identity 
#'not)
-                         (= (point) (point-max))))))
-
-           ;; Don't erase if the buffer is not the current one and
-           ;; `shell-command-dont-erase-buffer' is set to
-           ;; `end-last-out'.  Check point.
-           (let ((shell-command-dont-erase-buffer 'end-last-out))
-             (with-current-buffer buffer
-               (erase-buffer)
-               (insert "bar")
-               (setq point (point))
-               (should (string-equal "bar" (buffer-string)))
-               (should (= (point) (point-max)))
-               (with-temp-buffer
-                 (shell-command "echo baz" buffer))
-               (should (string-equal "barbaz\n" (buffer-string)))
-               ;; There is still an error in Tramp.
-               (unless (file-remote-p default-directory)
-                 (should-not (= point (point)))
-                 (should (= (point) (point-max))))))
-
-           ;; Don't erase if the buffer is the current one and
-           ;; `shell-command-dont-erase-buffer' is set to
-           ;; `save-point'.  Check point.
-           (let ((shell-command-dont-erase-buffer 'save-point))
-             (with-temp-buffer
-               (insert "bar")
-               (goto-char (1- (point-max)))
-               (setq point (point))
-               (should (string-equal "bar" (buffer-string)))
-               (should (= (point) (1- (point-max))))
-               (shell-command "echo baz" (current-buffer))
-               (should (string-equal "babaz\nr" (buffer-string)))
-               ;; There is still an error in Tramp.
-               (unless (file-remote-p default-directory)
-                 (should (= point (point)))
-                 (should-not (= (point) (point-max))))))
-
-           ;; Don't erase if the buffer is not the current one and
-           ;; `shell-command-dont-erase-buffer' is set to
-           ;; `save-point'.  Check point.
-           (let ((shell-command-dont-erase-buffer 'save-point))
-             (with-current-buffer buffer
-               (erase-buffer)
-               (insert "bar")
-               (goto-char (1- (point-max)))
-               (setq point (point))
-               (should (string-equal "bar" (buffer-string)))
-               (should (= (point) (1- (point-max))))
-               (with-temp-buffer
-                 (shell-command "echo baz" buffer))
-               ;; This does not work as expected.  Therefore, we
-               ;; use the "wrong" string.
-               (should (string-equal "barbaz\n" (buffer-string)))
-               ;; There is still an error in Tramp.
-               (unless (file-remote-p default-directory)
-                 (should (= point (point)))
-                 (should-not (= (point) (point-max))))))
-
-           ;; Don't erase if the buffer is the current one and
-           ;; `shell-command-dont-erase-buffer' is set to a random
-           ;; value.  Check point.
-           (let ((shell-command-dont-erase-buffer 'random))
-             (with-temp-buffer
-               (insert "bar")
-               (setq point (point))
-               (should (string-equal "bar" (buffer-string)))
-               (should (= (point) (point-max)))
-               (shell-command "echo baz" (current-buffer))
-               (should (string-equal "barbaz\n" (buffer-string)))
-               ;; This does not work as expected in the local case.
-               ;; Therefore, we negate the test for the time being.
-               (should-not
-                (funcall (if (file-remote-p default-directory) #'identity 
#'not)
-                         (= point (point))))
-               (should
-                (funcall (if (file-remote-p default-directory) #'identity 
#'not)
-                         (= (point) (point-max))))))
-
-           ;; Don't erase if the buffer is not the current one and
-           ;; `shell-command-dont-erase-buffer' is set to a random
-           ;; value.  Check point.
-           (let ((shell-command-dont-erase-buffer 'random))
-             (with-current-buffer buffer
-               (erase-buffer)
-               (insert "bar")
-               (setq point (point))
-               (should (string-equal "bar" (buffer-string)))
-               (should (= (point) (point-max)))
-               (with-temp-buffer
-                 (shell-command "echo baz" buffer))
-               (should (string-equal "barbaz\n" (buffer-string)))
-               ;; There is still an error in Tramp.
-               (unless (file-remote-p default-directory)
-                 (should-not (= point (point)))
-                 (should (= (point) (point-max)))))))
-
-       ;; Cleanup.
-       (ignore-errors (kill-buffer buffer))))))
+  ;; (message "   s-c-d-e-b current-buffer buffer-string point")
+  ;; (message "===============================================")
+
+  ;;    s-c-d-e-b current-buffer buffer-string point
+  ;; ===============================================
+  ;;          nil              t    foobazzbar     4 x
+  ;;          nil            nil          bazz     5
+  ;; -----------------------------------------------
+  ;;        erase              t          bazz     1 x
+  ;;        erase            nil          bazz     5
+  ;; -----------------------------------------------
+  ;; beg-last-out              t    foobazzbar     4 x
+  ;; beg-last-out            nil    foobarbazz     7
+  ;; -----------------------------------------------
+  ;; end-last-out              t    foobazzbar     4
+  ;; end-last-out            nil    foobazzbar    11
+  ;; -----------------------------------------------
+  ;;   save-point              t    foobazzbar     4 x
+  ;;   save-point            nil    foobarbazz     4 x
+  ;; -----------------------------------------------
+  ;;       random              t    foobazzbar     4
+  ;;       random            nil    foobazzbar    11
+  ;; -----------------------------------------------
+
+  (let (;; Suppress nasty messages.
+       (inhibit-message t)
+       buffer kill-buffer-query-functions)
+    ;; We check both the local and remote case, in order to guarantee
+    ;; that they behave similar.
+    (dolist (default-directory
+             `(,temporary-file-directory ,tramp-test-temporary-file-directory))
+      ;; These are the possible values of `shell-command-dont-erase-buffer'.
+      ;; `random' is taken as non-nil value without special meaning.
+      (dolist (shell-command-dont-erase-buffer
+              '(nil erase beg-last-out end-last-out save-point random))
+       ;; `shell-command' might work over the current buffer, or not.
+       (dolist (current '(t nil))
+         (with-temp-buffer
+           ;; We insert the string "foobar" into an empty buffer.
+           ;; Point is set between "foo" and "bar".
+           (setq buffer (current-buffer))
+           (insert "foobar")
+           (goto-char (- (point) 3))
+           (should (string-equal "foobar" (buffer-string)))
+           (should (string-equal "foo" (buffer-substring (point-min) (point))))
+           (should (string-equal "bar" (buffer-substring (point) (point-max))))
+
+           ;; Apply `shell-command'.  It shall output the string
+           ;; "bazz".  Messages in the *Messages* buffer are
+           ;; suppressed.
+            (let (message-log-max)
+             (if current
+                 (shell-command "echo -n bazz" (current-buffer))
+               (with-temp-buffer (shell-command "echo -n bazz" buffer))))
+
+         ;;   (message
+         ;;    "%12s %14s %13s %5d"
+         ;;    shell-command-dont-erase-buffer current (buffer-string) 
(point))))
+         ;; (message "-----------------------------------------------")))))
+
+           ;; Check result.
+           (cond
+            (current
+             ;; String is inserted at point, and point is preserved
+             ;; unless dictated otherwise.
+             (cond
+              ((null shell-command-dont-erase-buffer)
+               (should (string-equal "foobazzbar" (buffer-string)))
+               (should (= 4 (point))))
+              ((eq shell-command-dont-erase-buffer 'erase)
+               (should (string-equal "bazz" (buffer-string)))
+               (should (= 1 (point))))
+              ((eq shell-command-dont-erase-buffer 'beg-last-out)
+               (should (string-equal "foobazzbar" (buffer-string)))
+               (should (= 4 (point))))
+              ;; Bug#40896
+              ;; ((eq shell-command-dont-erase-buffer 'end-last-out)
+              ;;       (should (string-equal "foobazzbar" (buffer-string)))
+              ;;       (should (= 7 (point))))
+              ((eq shell-command-dont-erase-buffer 'save-point)
+               (should (string-equal "foobazzbar" (buffer-string)))
+               (should (= 4 (point))))
+              ;; Bug#40896
+              ;; ((eq shell-command-dont-erase-buffer 'random)
+              ;;       (should (string-equal "foobazzbar" (buffer-string)))
+              ;;       (should (= 7 (point))))))
+              ))
+
+            (t ;; not current buffer
+             ;; String is appended, and point is at point-max unless
+             ;; dictated otherwise.
+             (cond
+              ((null shell-command-dont-erase-buffer)
+               (should (string-equal "bazz" (buffer-string)))
+               (should (= 5 (point))))
+              ((eq shell-command-dont-erase-buffer 'erase)
+               (should (string-equal "bazz" (buffer-string)))
+               (should (= 5 (point))))
+              ((eq shell-command-dont-erase-buffer 'beg-last-out)
+               (should (string-equal "foobarbazz" (buffer-string)))
+               (should (= 7 (point))))
+              ;; ;; Bug#40896
+              ;; ((eq shell-command-dont-erase-buffer 'end-last-out)
+              ;;       (should (string-equal "foobarbazz" (buffer-string)))
+              ;;       (should (= 11 (point))))
+              ((eq shell-command-dont-erase-buffer 'save-point)
+               (should (string-equal "foobarbazz" (buffer-string)))
+               (should (= 4 (point))))
+              ;; ;; Bug#40896
+              ;; ((eq shell-command-dont-erase-buffer 'random)
+              ;;       (should (string-equal "foobarbazz" (buffer-string)))
+              ;;       (should (= 11 (point)))))))))))))
+              )))))))))
 
 ;; This test is inspired by Bug#23952.
 (ert-deftest tramp-test33-environment-variables ()
diff --git a/texi/tramp.texi b/texi/tramp.texi
index 037791b..3b5b8be 100644
--- a/texi/tramp.texi
+++ b/texi/tramp.texi
@@ -383,7 +383,7 @@ After one of the above commands, @file{~/emacs/tramp} will
 containing the latest version of @value{tramp}.
 
 @noindent
-To fetch updates from the repository, use git pull:
+To fetch updates from the repository, use @code{git pull}:
 
 @example
 @group
@@ -1687,9 +1687,9 @@ Integration for LXD containers.  A container is accessed 
via
 @item magit-tramp
 @cindex method @option{git}
 @cindex @option{git} method
-Browsing git repositories with @code{magit}.  A versioned file is
+Browsing Git repositories with @code{magit}.  A versioned file is
 accessed via @file{@trampfn{git,rev@@root-dir,/path/to/file}}.
-@samp{rev} is a git revision, and @samp{root-dir} is a virtual host
+@samp{rev} is a Git revision, and @samp{root-dir} is a virtual host
 name for the root directory, specified in
 @code{magit-tramp-hosts-alist}.
 
@@ -2943,19 +2943,6 @@ Example:
 @end group
 @end example
 
-During file name completion, remote directory contents are re-read
-regularly to account for any changes in the filesystem that may affect
-the completion candidates.  Such re-reads can account for changes to
-the file system by applications outside Emacs (@pxref{Connection
-caching}).
-
-@defopt tramp-completion-reread-directory-timeout
-The timeout is number of seconds since last remote command for
-rereading remote directory contents.  A value of 0 re-reads
-immediately during file name completion, @code{nil} uses cached
-directory contents.
-@end defopt
-
 
 @node Ad-hoc multi-hops
 @section Declaring multiple hops in the file name
@@ -3004,7 +2991,7 @@ to user @code{root} on host @code{remotehost}, starting 
with an
 @option{ssh} session on host @code{remotehost}:
 
@samp{@value{prefix}ssh@value{postfixhop}%h|su@value{postfixhop}remotehost@value{postfix}}.
 
-On the other hand, if a trailing hop does not specifiy a host name,
+On the other hand, if a trailing hop does not specify a host name,
 the host name of the previous hop is reused. Therefore, the following
 file name is equivalent to the previous example:
 
@samp{@value{prefix}ssh@value{postfixhop}remotehost|su@value{postfixhop}@value{postfix}}.
@@ -3909,9 +3896,6 @@ files are not independently updated outside 
@value{tramp}'s control.
 That cache cleanup will be necessary if the remote directories or
 files are updated independent of @value{tramp}.
 
-Set @code{tramp-completion-reread-directory-timeout} to @code{nil} to
-speed up completions, @ref{File name completion}.
-
 Disable version control to avoid delays:
 
 @lisp
@@ -4063,8 +4047,8 @@ first saving to a temporary file.
 
 @vindex tramp-local-host-regexp
 When connecting to a local host, @value{tramp} uses some internal
-optimizations.  They fail, when there is a chrooted environment.  In
-order to disable those optimizations, set user option
+optimizations.  They fail when Emacs runs in a chrooted environment.
+In order to disable those optimizations, set user option
 @code{tramp-local-host-regexp} to @code{nil}.
 
 
@@ -4647,6 +4631,18 @@ remote files}.
 
 
 @item
+I get a warning @samp{Tramp has been compiled with Emacs a.b, this is Emacs 
c.d}
+
+@value{tramp} comes with compatibility code for different Emacs
+versions.  When you see this warning, you don't use the Emacs built-in
+version of @value{tramp}.  In case you have installed @value{tramp}
+from GNU ELPA, you must delete and reinstall it.
+@ifset installchapter
+In case you have installed it from its Git repository, @ref{Recompilation}.
+@end ifset
+
+
+@item
 How to disable other packages from calling @value{tramp}?
 
 There are packages that call @value{tramp} without the user ever
diff --git a/texi/trampver.texi b/texi/trampver.texi
index 9a3d5e4..2b12616 100644
--- a/texi/trampver.texi
+++ b/texi/trampver.texi
@@ -8,7 +8,7 @@
 @c In the Tramp GIT, the version numbers are auto-frobbed from
 @c tramp.el, and the bug report address is auto-frobbed from
 @c configure.ac.
-@set trampver 2.4.4.2
+@set trampver 2.4.4.3
 @set tramp-bug-report-address tramp-devel@@gnu.org
 @set emacsver 24.4
 
diff --git a/tramp-compat.el b/tramp-compat.el
index 3f25afe..b7a7cc4 100644
--- a/tramp-compat.el
+++ b/tramp-compat.el
@@ -44,6 +44,14 @@
 ;; `temporary-file-directory' as function is introduced with Emacs 26.1.
 (declare-function tramp-handle-temporary-file-directory "tramp")
 
+(defconst tramp-compat-emacs-compiled-version (eval-when-compile emacs-version)
+  "The Emacs version used for compilation.")
+
+(unless (= emacs-major-version
+          (car (version-to-list tramp-compat-emacs-compiled-version)))
+  (warn "Tramp has been compiled with Emacs %s, this is Emacs %s"
+       tramp-compat-emacs-compiled-version emacs-version))
+
 ;; For not existing functions, obsolete functions, or functions with a
 ;; changed argument list, there are compiler warnings.  We want to
 ;; avoid them in cases we know what we do.
diff --git a/tramp-loaddefs.el b/tramp-loaddefs.el
index 33ee286..4d4144e 100644
--- a/tramp-loaddefs.el
+++ b/tramp-loaddefs.el
@@ -663,7 +663,7 @@ UU-encode the region between BEG and END.
 ;;;### (autoloads nil "trampver" "trampver.el" (0 0 0 0))
 ;;; Generated autoloads from trampver.el
 
-(defconst tramp-version "2.4.4.2" "\
+(defconst tramp-version "2.4.4.3" "\
 This version of Tramp.")
 
 (defconst tramp-bug-report-address "tramp-devel@gnu.org" "\
diff --git a/tramp-sh.el b/tramp-sh.el
index 9e8a316..df6720b 100644
--- a/tramp-sh.el
+++ b/tramp-sh.el
@@ -753,7 +753,7 @@ for($i = 0; $i < $n; $i++)
         $stat[1]);
 }
 printf(\")\\n\");' \"$1\" \"$2\" 2>/dev/null"
-  "Perl script implementing `directory-files-attributes' as Lisp `read'able
+  "Perl script implementing `directory-files-and-attributes' as Lisp `read'able
 output.
 Escape sequence %s is replaced with name of Perl binary.
 This string is passed to `format', so percent characters need to be doubled.")
@@ -2822,7 +2822,7 @@ STDERR can also be a file name."
          (signal 'wrong-type-argument (list #'stringp name)))
        (unless (or (null buffer) (bufferp buffer) (stringp buffer))
          (signal 'wrong-type-argument (list #'stringp buffer)))
-       (unless (consp command)
+       (unless (or (null command) (consp command))
          (signal 'wrong-type-argument (list #'consp command)))
        (unless (or (null coding)
                    (and (symbolp coding) (memq coding coding-system-list))
@@ -2863,8 +2863,10 @@ STDERR can also be a file name."
               ;; command.
               (heredoc (and (stringp program)
                             (string-match-p "sh$" program)
+                            (= (length args) 2)
                             (string-equal "-c" (car args))
-                            (= (length args) 2)))
+                            ;; Don't if there is a string.
+                            (not (string-match-p "'\\|\"" (cadr args)))))
               ;; When PROGRAM is nil, we just provide a tty.
               (args (if (not heredoc) args
                       (let ((i 250))
diff --git a/tramp.el b/tramp.el
index bf88690..20d00b4 100644
--- a/tramp.el
+++ b/tramp.el
@@ -7,7 +7,7 @@
 ;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
 ;; Package: tramp
-;; Version: 2.4.4.2
+;; Version: 2.4.4.3
 ;; Package-Requires: ((emacs "24.4"))
 ;; Package-Type: multi
 ;; URL: https://savannah.gnu.org/projects/tramp
@@ -1224,6 +1224,8 @@ have been gone since last remote command execution.  A 
value of t
 would require an immediate reread during filename completion, nil
 means to use always cached values for the directory contents."
   :type '(choice (const nil) (const t) integer))
+(make-obsolete-variable
+ 'tramp-completion-reread-directory-timeout 'remote-file-name-inhibit-cache 
"27.2")
 
 ;;; Internal Variables:
 
diff --git a/tramp.info b/tramp.info
index dcfc3ef..7228b73 100644
--- a/tramp.info
+++ b/tramp.info
@@ -21,10 +21,10 @@ END-INFO-DIR-ENTRY
 
 File: tramp.info,  Node: Top,  Next: Overview,  Prev: (dir),  Up: (dir)
 
-TRAMP 2.4.4.2 User Manual
+TRAMP 2.4.4.3 User Manual
 *************************
 
-This file documents TRAMP 2.4.4.2, a remote file editing package for
+This file documents TRAMP 2.4.4.3, a remote file editing package for
 Emacs.
 
    TRAMP stands for “Transparent Remote (file) Access, Multiple
@@ -292,7 +292,7 @@ TRAMP developers:
 After one of the above commands, ‘~/emacs/tramp’ will containing the
 latest version of TRAMP.
 
-To fetch updates from the repository, use git pull:
+To fetch updates from the repository, use ‘git pull’:
 
      $ cd ~/emacs/tramp
      $ git pull
@@ -1278,8 +1278,8 @@ They can be installed with Emacs’ Package Manager.  This 
includes
      the same meaning as in ‘docker-tramp’.
 
 ‘magit-tramp’
-     Browsing git repositories with ‘magit’.  A versioned file is
-     accessed via ‘/git:rev@root-dir:/path/to/file’.  ‘rev’ is a git
+     Browsing Git repositories with ‘magit’.  A versioned file is
+     accessed via ‘/git:rev@root-dir:/path/to/file’.  ‘rev’ is a Git
      revision, and ‘root-dir’ is a virtual host name for the root
      directory, specified in ‘magit-tramp-hosts-alist’.
 
@@ -2219,17 +2219,6 @@ Example:
      C-x C-f /ssh:melancholia:/usr/local/bin///etc <TAB>
           ⊣ /etc
 
-   During file name completion, remote directory contents are re-read
-regularly to account for any changes in the filesystem that may affect
-the completion candidates.  Such re-reads can account for changes to the
-file system by applications outside Emacs (*note Connection caching::).
-
- -- User Option: tramp-completion-reread-directory-timeout
-     The timeout is number of seconds since last remote command for
-     rereading remote directory contents.  A value of 0 re-reads
-     immediately during file name completion, ‘nil’ uses cached
-     directory contents.
-
 
 File: tramp.info,  Node: Ad-hoc multi-hops,  Next: Remote processes,  Prev: 
File name completion,  Up: Usage
 
@@ -2271,7 +2260,7 @@ connections::).
 ‘root’ on host ‘remotehost’, starting with an ‘ssh’ session on host
 ‘remotehost’: ‘/ssh:%h|su:remotehost:’.
 
-   On the other hand, if a trailing hop does not specifiy a host name,
+   On the other hand, if a trailing hop does not specify a host name,
 the host name of the previous hop is reused.  Therefore, the following
 file name is equivalent to the previous example: ‘/ssh:remotehost|su::’.
 
@@ -2905,9 +2894,6 @@ File: tramp.info,  Node: Frequently Asked Questions,  
Next: Files directories an
      cleanup will be necessary if the remote directories or files are
      updated independent of TRAMP.
 
-     Set ‘tramp-completion-reread-directory-timeout’ to ‘nil’ to speed
-     up completions, *note File name completion::.
-
      Disable version control to avoid delays:
 
           (setq vc-ignore-dir-regexp
@@ -3026,9 +3012,9 @@ File: tramp.info,  Node: Frequently Asked Questions,  
Next: Files directories an
    • TRAMP fails in a chrooted environment
 
      When connecting to a local host, TRAMP uses some internal
-     optimizations.  They fail, when there is a chrooted environment.
-     In order to disable those optimizations, set user option
-     ‘tramp-local-host-regexp’ to ‘nil’.
+     optimizations.  They fail when Emacs runs in a chrooted
+     environment.  In order to disable those optimizations, set user
+     option ‘tramp-local-host-regexp’ to ‘nil’.
 
    • TRAMP does not recognize if a ‘ssh’ session hangs
 
@@ -3455,6 +3441,14 @@ File: tramp.info,  Node: Frequently Asked Questions,  
Next: Files directories an
      network path, or somewhere else entirely (including locally).
      *note Renaming remote files::.
 
+   • I get a warning ‘Tramp has been compiled with Emacs a.b, this is
+     Emacs c.d’
+
+     TRAMP comes with compatibility code for different Emacs versions.
+     When you see this warning, you don’t use the Emacs built-in version
+     of TRAMP.  In case you have installed TRAMP from GNU ELPA, you must
+     delete and reinstall it.
+
    • How to disable other packages from calling TRAMP?
 
      There are packages that call TRAMP without the user ever entering a
@@ -4189,17 +4183,17 @@ Variable Index
 * customize-package-emacs-version-alist: Obtaining TRAMP.     (line  20)
 * DISPLAY, environment variable:         Remote processes.    (line 107)
 * EDITOR, environment variable:          Frequently Asked Questions.
-                                                              (line 570)
+                                                              (line 567)
 * ENV, environment variable:             Remote processes.    (line  78)
 * ESHELL, environment variable:          Remote shell setup.  (line 187)
 * HGPLAIN, environment variable:         Remote processes.    (line  96)
 * HISTFILE, environment variable:        Frequently Asked Questions.
-                                                              (line 311)
+                                                              (line 308)
 * HISTFILESIZE, environment variable:    Frequently Asked Questions.
-                                                              (line 311)
+                                                              (line 308)
 * HISTORY, environment variable:         Remote processes.    (line  66)
 * HISTSIZE, environment variable:        Frequently Asked Questions.
-                                                              (line 311)
+                                                              (line 308)
 * INSIDE_EMACS, environment variable:    Remote shell setup.  (line 104)
 * INSIDE_EMACS, environment variable <1>: Remote shell setup. (line 187)
 * INSIDE_EMACS, environment variable <2>: Remote processes.   (line  38)
@@ -4229,8 +4223,6 @@ Variable Index
                                                               (line  37)
 * tramp-completion-function-alist:       Customizing Completion.
                                                               (line   6)
-* tramp-completion-reread-directory-timeout: File name completion.
-                                                              (line  70)
 * tramp-completion-use-auth-sources:     File name completion.
                                                               (line  37)
 * tramp-confirm-rename-file-names:       Renaming remote files.
@@ -4252,16 +4244,16 @@ Variable Index
                                                               (line  28)
 * tramp-gvfs-methods:                    GVFS-based methods.  (line  60)
 * tramp-histfile-override:               Frequently Asked Questions.
-                                                              (line 311)
+                                                              (line 308)
 * tramp-ignored-file-name-regexp:        Frequently Asked Questions.
-                                                              (line 632)
+                                                              (line 637)
 * tramp-inline-compress-commands:        Inline methods.      (line  25)
 * tramp-inline-compress-start-size:      Inline methods.      (line  25)
 * tramp-local-host-regexp:               Frequently Asked Questions.
-                                                              (line 165)
+                                                              (line 162)
 * tramp-methods:                         Customizing Methods. (line   6)
 * tramp-mode:                            Frequently Asked Questions.
-                                                              (line 626)
+                                                              (line 631)
 * tramp-own-remote-path:                 Remote programs.     (line  32)
 * tramp-password-prompt-regexp:          Remote shell setup.  (line  65)
 * tramp-persistency-file-name:           Connection caching.  (line   6)
@@ -4274,14 +4266,14 @@ Variable Index
 * tramp-sh-extra-args:                   Remote shell setup.  (line  22)
 * tramp-shell-prompt-pattern:            Remote shell setup.  (line  57)
 * tramp-smb-options:                     Frequently Asked Questions.
-                                                              (line 228)
+                                                              (line 225)
 * tramp-ssh-controlmaster-options:       Frequently Asked Questions.
-                                                              (line 188)
+                                                              (line 185)
 * tramp-terminal-type:                   Remote shell setup.  (line  90)
 * tramp-theme-face-remapping-alist:      Frequently Asked Questions.
-                                                              (line 291)
+                                                              (line 288)
 * tramp-use-ssh-controlmaster-options:   Frequently Asked Questions.
-                                                              (line 201)
+                                                              (line 198)
 * tramp-verbose:                         Traces and Profiles. (line   6)
 * tramp-version:                         Obtaining TRAMP.     (line   6)
 * tramp-wrong-passwd-regexp:             Remote shell setup.  (line  65)
@@ -4596,7 +4588,7 @@ Concept Index
 * tgz file archive suffix:               Archive file names.  (line  71)
 * tlz file archive suffix:               Archive file names.  (line  71)
 * TRAMP theme:                           Frequently Asked Questions.
-                                                              (line 291)
+                                                              (line 288)
 * tset unix command:                     Remote shell setup.  (line 124)
 * txz file archive suffix:               Archive file names.  (line  71)
 * type-ahead:                            Usage.               (line  12)
@@ -4622,59 +4614,59 @@ Tag Table:
 Node: Top933
 Node: Overview5421
 Node: Obtaining TRAMP10755
-Node: Quick Start Guide13202
-Ref: Quick Start Guide: File name syntax13979
-Ref: Quick Start Guide: ssh and plink methods15081
-Ref: Quick Start Guide: su, sudo and sg methods15625
-Ref: Quick Start Guide: ssh, plink, su, sudo and sg methods16189
-Ref: Quick Start Guide: sudoedit method16719
-Ref: Quick Start Guide: smb method17130
-Ref: Quick Start Guide: GVFS-based methods17461
-Ref: Quick Start Guide: GNOME Online Accounts based methods17857
-Ref: Quick Start Guide: Android18399
-Ref: Quick Start Guide: rclone method18631
-Node: Configuration18958
-Node: Connection types21430
-Node: Inline methods22844
-Node: External methods27806
-Node: GVFS-based methods38444
-Node: Default Method41713
-Node: Default User44730
-Node: Default Host46259
-Node: Multi-hops47391
-Node: Firewalls51583
-Node: Customizing Methods53040
-Node: Customizing Completion55381
-Node: Password handling58871
-Ref: Using an authentication file59341
-Ref: Caching passwords60843
-Node: Connection caching61361
-Node: Predefined connection information62291
-Node: Remote programs66385
-Node: Remote shell setup69306
-Node: Android shell setup78922
-Node: Auto-save and Backup81309
-Node: Windows setup hints84384
-Node: Usage86004
-Node: File name syntax87357
-Node: Change file name syntax89364
-Node: File name completion90795
-Node: Ad-hoc multi-hops93950
-Node: Remote processes96016
-Ref: Running a debugger on a remote host105663
-Node: Cleanup remote connections107633
-Node: Renaming remote files109334
-Node: Archive file names113553
-Node: Bug Reports118067
-Node: Frequently Asked Questions120808
-Node: Files directories and localnames145173
-Node: Localname deconstruction145609
-Node: External packages146262
-Node: Traces and Profiles148307
-Node: GNU Free Documentation License150276
-Node: Function Index175649
-Node: Variable Index178527
-Node: Concept Index186497
+Node: Quick Start Guide13208
+Ref: Quick Start Guide: File name syntax13985
+Ref: Quick Start Guide: ssh and plink methods15087
+Ref: Quick Start Guide: su, sudo and sg methods15631
+Ref: Quick Start Guide: ssh, plink, su, sudo and sg methods16195
+Ref: Quick Start Guide: sudoedit method16725
+Ref: Quick Start Guide: smb method17136
+Ref: Quick Start Guide: GVFS-based methods17467
+Ref: Quick Start Guide: GNOME Online Accounts based methods17863
+Ref: Quick Start Guide: Android18405
+Ref: Quick Start Guide: rclone method18637
+Node: Configuration18964
+Node: Connection types21436
+Node: Inline methods22850
+Node: External methods27812
+Node: GVFS-based methods38450
+Node: Default Method41719
+Node: Default User44736
+Node: Default Host46265
+Node: Multi-hops47397
+Node: Firewalls51589
+Node: Customizing Methods53046
+Node: Customizing Completion55387
+Node: Password handling58877
+Ref: Using an authentication file59347
+Ref: Caching passwords60849
+Node: Connection caching61367
+Node: Predefined connection information62297
+Node: Remote programs66391
+Node: Remote shell setup69312
+Node: Android shell setup78928
+Node: Auto-save and Backup81315
+Node: Windows setup hints84390
+Node: Usage86010
+Node: File name syntax87363
+Node: Change file name syntax89370
+Node: File name completion90801
+Node: Ad-hoc multi-hops93383
+Node: Remote processes95448
+Ref: Running a debugger on a remote host105095
+Node: Cleanup remote connections107065
+Node: Renaming remote files108766
+Node: Archive file names112985
+Node: Bug Reports117499
+Node: Frequently Asked Questions120240
+Node: Files directories and localnames144822
+Node: Localname deconstruction145258
+Node: External packages145911
+Node: Traces and Profiles147956
+Node: GNU Free Documentation License149925
+Node: Function Index175298
+Node: Variable Index178176
+Node: Concept Index186006
 
 End Tag Table
 
diff --git a/trampver.el b/trampver.el
index 0af9c11..60cebfb 100644
--- a/trampver.el
+++ b/trampver.el
@@ -39,7 +39,7 @@
 (defvar inhibit-message)
 
 ;;;###tramp-autoload
-(defconst tramp-version "2.4.4.2"
+(defconst tramp-version "2.4.4.3"
   "This version of Tramp.")
 
 ;;;###tramp-autoload
@@ -75,7 +75,7 @@
 ;; Check for Emacs version.
 (let ((x   (if (not (string-lessp emacs-version "24.4"))
       "ok"
-    (format "Tramp 2.4.4.2 is not fit for %s"
+    (format "Tramp 2.4.4.3 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]