summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-adb.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2020-01-27 10:11:32 +0100
committerMichael Albinus <michael.albinus@gmx.de>2020-01-27 10:11:32 +0100
commite1c93a02dd13039f7a9f4ccefddaa3e761a27a2e (patch)
treed61cbea1be54bb1491663a1f69f28df1a1fd96f3 /lisp/net/tramp-adb.el
parent502059433ce0e9699eb73d21656ce6e9e127d63b (diff)
downloademacs-e1c93a02dd13039f7a9f4ccefddaa3e761a27a2e.tar.gz
emacs-e1c93a02dd13039f7a9f4ccefddaa3e761a27a2e.tar.bz2
emacs-e1c93a02dd13039f7a9f4ccefddaa3e761a27a2e.zip
Fix problems in Tramp's async-shell-command
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process): * lisp/net/tramp-cache.el (top): * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Use `insert-file-contents-literally'. * lisp/net/tramp.el (tramp-parse-file): Use `insert-file-contents-literally'. (tramp-handle-shell-command): Reorganize error-buffer handling. (tramp-handle-start-file-process): Use `consp' instead of `listp'. * test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process): Bind `delete-exited-processes'. (tramp--test-async-shell-command): Bind `delete-exited-processes'. Add additional `accept-process-output'. Move cleanup of output buffer ... (tramp-test32-shell-command): ... here. Test error buffer also for `async-shell-command'.
Diffstat (limited to 'lisp/net/tramp-adb.el')
-rw-r--r--lisp/net/tramp-adb.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 194dd2d308f..aa7fe147c20 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -1065,13 +1065,15 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
;; until the process is deleted.
(when (bufferp stderr)
(with-current-buffer stderr
- (insert-file-contents remote-tmpstderr 'visit))
+ (insert-file-contents-literally
+ remote-tmpstderr 'visit))
;; Delete tmpstderr file.
(add-function
:after (process-sentinel p)
(lambda (_proc _msg)
(with-current-buffer stderr
- (insert-file-contents remote-tmpstderr 'visit))
+ (insert-file-contents-literally
+ remote-tmpstderr 'visit nil nil 'replace))
(delete-file remote-tmpstderr))))
;; Return process.
p))))