[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112067: * net/tramp-adb.el (tramp-ad
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112067: * net/tramp-adb.el (tramp-adb-parse-device-names): Use |
Date: |
Sun, 17 Mar 2013 18:23:05 +0100 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 112067
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Sun 2013-03-17 18:23:05 +0100
message:
* net/tramp-adb.el (tramp-adb-parse-device-names): Use
`start-process' instead of `call-process'. Otherwise, the
function might be blocked under MS Windows.
modified:
lisp/ChangeLog
lisp/net/tramp-adb.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-03-17 15:00:37 +0000
+++ b/lisp/ChangeLog 2013-03-17 17:23:05 +0000
@@ -1,3 +1,9 @@
+2013-03-17 Michael Albinus <address@hidden>
+
+ * net/tramp-adb.el (tramp-adb-parse-device-names): Use
+ `start-process' instead of `call-process'. Otherwise, the
+ function might be blocked under MS Windows.
+
2013-03-17 Leo Liu <address@hidden>
Extend eldoc to display info in the mode-line. (Bug#13978)
=== modified file 'lisp/net/tramp-adb.el'
--- a/lisp/net/tramp-adb.el 2013-03-03 10:31:01 +0000
+++ b/lisp/net/tramp-adb.el 2013-03-17 17:23:05 +0000
@@ -155,12 +155,18 @@
"Return a list of (nil host) tuples allowed to access."
(with-timeout (10)
(with-temp-buffer
- (when (zerop (call-process tramp-adb-program nil t nil "devices"))
- (let (result)
- (goto-char (point-min))
- (while (search-forward-regexp "^\\(\\S-+\\)[[:space:]]+device$" nil t)
- (add-to-list 'result (list nil (match-string 1))))
- result)))))
+ ;; `call-process' does not react on timer under MS Windows.
+ ;; That's why we use `start-process'.
+ (let ((p (start-process
+ tramp-adb-program (current-buffer) tramp-adb-program "devices"))
+ result)
+ (tramp-compat-set-process-query-on-exit-flag p nil)
+ (while (eq 'run (process-status p))
+ (sleep-for 0.1))
+ (goto-char (point-min))
+ (while (search-forward-regexp "^\\(\\S-+\\)[[:space:]]+device$" nil t)
+ (add-to-list 'result (list nil (match-string 1))))
+ result))))
(defun tramp-adb-handle-expand-file-name (name &optional dir)
"Like `expand-file-name' for Tramp files."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112067: * net/tramp-adb.el (tramp-adb-parse-device-names): Use,
Michael Albinus <=