Skip to content

Commit 248c5e1

Browse files
committed
Sync with Tramp 2.4.3
* doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.4.3". * lisp/net/tramp.el: Bump version. (tramp-handle-shell-command): The temp file for error-buffer is remote. * test/lisp/net/tramp-tests.el (tramp-test30-make-process): Simplify buffer generation. (tramp-test32-shell-command): Extend test. (cherry picked from commit d6922db)
1 parent 90083b7 commit 248c5e1

File tree

4 files changed

+29
-20
lines changed

4 files changed

+29
-20
lines changed

doc/misc/trampver.texi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@c In the Tramp GIT, the version numbers are auto-frobbed from
99
@c tramp.el, and the bug report address is auto-frobbed from
1010
@c configure.ac.
11-
@set trampver 2.4.3-pre
11+
@set trampver 2.4.3
1212
@set tramp-bug-report-address tramp-devel@@gnu.org
1313
@set emacsver 24.4
1414

lisp/net/tramp.el

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
;; Maintainer: Michael Albinus <[email protected]>
88
;; Keywords: comm, processes
99
;; Package: tramp
10-
;; Version: 2.4.3-pre
10+
;; Version: 2.4.3
1111
;; Package-Requires: ((emacs "24.4"))
12+
;; Package-Type: multi
1213
;; URL: https://savannah.gnu.org/projects/tramp
1314

1415
;; This file is part of GNU Emacs.
@@ -3681,7 +3682,9 @@ support symbolic links."
36813682

36823683
(setq buffer (if (and (not asynchronous) error-buffer)
36833684
(with-parsed-tramp-file-name default-directory nil
3684-
(list output-buffer (tramp-make-tramp-temp-file v)))
3685+
(list output-buffer
3686+
(tramp-make-tramp-file-name
3687+
v (tramp-make-tramp-temp-file v))))
36853688
output-buffer))
36863689

36873690
(if current-buffer-p
@@ -3735,7 +3738,7 @@ support symbolic links."
37353738

37363739
(defun tramp-handle-start-file-process (name buffer program &rest args)
37373740
"Like `start-file-process' for Tramp files."
3738-
;; `make-process' knows the `:file-error' argument since Emacs 27.1.
3741+
;; `make-process' knows the `:file-handler' argument since Emacs 27.1 only.
37393742
(tramp-file-name-handler
37403743
'make-process
37413744
:name name

lisp/net/trampver.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
(defvar inhibit-message)
4040

4141
;;;###tramp-autoload
42-
(defconst tramp-version "2.4.3-pre"
42+
(defconst tramp-version "2.4.3"
4343
"This version of Tramp.")
4444

4545
;;;###tramp-autoload
@@ -73,7 +73,7 @@
7373
;; Check for Emacs version.
7474
(let ((x (if (not (string-lessp emacs-version "24.4"))
7575
"ok"
76-
(format "Tramp 2.4.3-pre is not fit for %s"
76+
(format "Tramp 2.4.3 is not fit for %s"
7777
(replace-regexp-in-string "\n" "" (emacs-version))))))
7878
(unless (string-equal "ok" x) (error "%s" x)))
7979

test/lisp/net/tramp-tests.el

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2902,8 +2902,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'."
29022902
(sort (copy-sequence `(,tmp-name3 ,tmp-name4)) 'string<))))
29032903

29042904
;; Cleanup.
2905-
(ignore-errors
2906-
(delete-directory tmp-name1 'recursive))))))
2905+
(ignore-errors (delete-directory tmp-name1 'recursive))))))
29072906

29082907
(ert-deftest tramp-test17-insert-directory ()
29092908
"Check `insert-directory'."
@@ -4354,8 +4353,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
43544353

43554354
;; Process with stderr. tramp-adb.el doesn't support it (yet).
43564355
(unless (tramp--test-adb-p)
4357-
(let ((stderr
4358-
(generate-new-buffer (generate-new-buffer-name "stderr"))))
4356+
(let ((stderr (generate-new-buffer "*stderr*")))
43594357
(unwind-protect
43604358
(with-temp-buffer
43614359
(setq proc
@@ -4458,6 +4456,20 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
44584456
;; Cleanup.
44594457
(ignore-errors (delete-file tmp-name)))
44604458

4459+
;; Test `shell-command' with error buffer.
4460+
(let ((stderr (generate-new-buffer "*stderr*")))
4461+
(unwind-protect
4462+
(with-temp-buffer
4463+
(shell-command "error" (current-buffer) stderr)
4464+
(should (= (point-min) (point-max)))
4465+
(should
4466+
(string-match
4467+
"error:.+not found"
4468+
(with-current-buffer stderr (buffer-string)))))
4469+
4470+
;; Cleanup.
4471+
(ignore-errors (kill-buffer stderr))))
4472+
44614473
;; Test ordinary `async-shell-command'.
44624474
(unwind-protect
44634475
(with-temp-buffer
@@ -4475,10 +4487,6 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
44754487
(while
44764488
(re-search-forward tramp-display-escape-sequence-regexp nil t)
44774489
(replace-match "" nil nil))
4478-
;; There might be a nasty "Process *Async Shell* finished" message.
4479-
(goto-char (point-min))
4480-
(forward-line)
4481-
(narrow-to-region (point-min) (point))
44824490
(should
44834491
(string-equal
44844492
(format "%s\n" (file-name-nondirectory tmp-name))
@@ -4505,13 +4513,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
45054513
(while
45064514
(re-search-forward tramp-display-escape-sequence-regexp nil t)
45074515
(replace-match "" nil nil))
4508-
;; There might be a nasty "Process *Async Shell* finished" message.
4509-
(goto-char (point-min))
4510-
(forward-line)
4511-
(narrow-to-region (point-min) (point))
4516+
;; We cannot use `string-equal', because tramp-adb.el
4517+
;; echoes also the sent string.
45124518
(should
4513-
(string-equal
4514-
(format "%s\n" (file-name-nondirectory tmp-name))
4519+
(string-match
4520+
(format "\\`%s" (regexp-quote (file-name-nondirectory tmp-name)))
45154521
(buffer-string))))
45164522

45174523
;; Cleanup.

0 commit comments

Comments
 (0)