;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
;; Package: tramp
-;; Version: 2.4.3-pre
+;; Version: 2.4.3
;; Package-Requires: ((emacs "24.4"))
+;; Package-Type: multi
;; URL: https://savannah.gnu.org/projects/tramp
;; This file is part of GNU Emacs.
(setq buffer (if (and (not asynchronous) error-buffer)
(with-parsed-tramp-file-name default-directory nil
- (list output-buffer (tramp-make-tramp-temp-file v)))
+ (list output-buffer
+ (tramp-make-tramp-file-name
+ v (tramp-make-tramp-temp-file v))))
output-buffer))
(if current-buffer-p
(defun tramp-handle-start-file-process (name buffer program &rest args)
"Like `start-file-process' for Tramp files."
- ;; `make-process' knows the `:file-error' argument since Emacs 27.1.
+ ;; `make-process' knows the `:file-handler' argument since Emacs 27.1 only.
(tramp-file-name-handler
'make-process
:name name
(defvar inhibit-message)
;;;###tramp-autoload
-(defconst tramp-version "2.4.3-pre"
+(defconst tramp-version "2.4.3"
"This version of Tramp.")
;;;###tramp-autoload
;; Check for Emacs version.
(let ((x (if (not (string-lessp emacs-version "24.4"))
"ok"
- (format "Tramp 2.4.3-pre is not fit for %s"
+ (format "Tramp 2.4.3 is not fit for %s"
(replace-regexp-in-string "\n" "" (emacs-version))))))
(unless (string-equal "ok" x) (error "%s" x)))
(sort (copy-sequence `(,tmp-name3 ,tmp-name4)) 'string<))))
;; Cleanup.
- (ignore-errors
- (delete-directory tmp-name1 'recursive))))))
+ (ignore-errors (delete-directory tmp-name1 'recursive))))))
(ert-deftest tramp-test17-insert-directory ()
"Check `insert-directory'."
;; Process with stderr. tramp-adb.el doesn't support it (yet).
(unless (tramp--test-adb-p)
- (let ((stderr
- (generate-new-buffer (generate-new-buffer-name "stderr"))))
+ (let ((stderr (generate-new-buffer "*stderr*")))
(unwind-protect
(with-temp-buffer
(setq proc
;; Cleanup.
(ignore-errors (delete-file tmp-name)))
+ ;; Test `shell-command' with error buffer.
+ (let ((stderr (generate-new-buffer "*stderr*")))
+ (unwind-protect
+ (with-temp-buffer
+ (shell-command "error" (current-buffer) stderr)
+ (should (= (point-min) (point-max)))
+ (should
+ (string-match
+ "error:.+not found"
+ (with-current-buffer stderr (buffer-string)))))
+
+ ;; Cleanup.
+ (ignore-errors (kill-buffer stderr))))
+
;; Test ordinary `async-shell-command'.
(unwind-protect
(with-temp-buffer
(while
(re-search-forward tramp-display-escape-sequence-regexp nil t)
(replace-match "" nil nil))
- ;; There might be a nasty "Process *Async Shell* finished" message.
- (goto-char (point-min))
- (forward-line)
- (narrow-to-region (point-min) (point))
(should
(string-equal
(format "%s\n" (file-name-nondirectory tmp-name))
(while
(re-search-forward tramp-display-escape-sequence-regexp nil t)
(replace-match "" nil nil))
- ;; There might be a nasty "Process *Async Shell* finished" message.
- (goto-char (point-min))
- (forward-line)
- (narrow-to-region (point-min) (point))
+ ;; We cannot use `string-equal', because tramp-adb.el
+ ;; echoes also the sent string.
(should
- (string-equal
- (format "%s\n" (file-name-nondirectory tmp-name))
+ (string-match
+ (format "\\`%s" (regexp-quote (file-name-nondirectory tmp-name)))
(buffer-string))))
;; Cleanup.