Mercurial > emacs
comparison lisp/url/url.el @ 83290:042f282a2ed7
Merged from miles@gnu.org--gnu-2005 (patch 66, 266-268)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-266
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-267
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-268
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-66
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-330
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Tue, 19 Apr 2005 13:33:31 +0000 |
parents | 3dcba0bc766b 68114d546e48 |
children | e58cb448e07c |
comparison
equal
deleted
inserted
replaced
83289:1e53ee7473e9 | 83290:042f282a2ed7 |
---|---|
178 nil | 178 nil |
179 (while (not retrieval-done) | 179 (while (not retrieval-done) |
180 (url-debug 'retrieval | 180 (url-debug 'retrieval |
181 "Spinning in url-retrieve-synchronously: %S (%S)" | 181 "Spinning in url-retrieve-synchronously: %S (%S)" |
182 retrieval-done asynch-buffer) | 182 retrieval-done asynch-buffer) |
183 ;; We used to use `sit-for' here, but in some cases it wouldn't | 183 (if (memq (process-status proc) '(closed exit signal failed)) |
184 ;; work because apparently pending keyboard input would always | 184 ;; FIXME: It's not clear whether url-retrieve's callback is |
185 ;; interrupt it before it got a chance to handle process input. | 185 ;; guaranteed to be called or not. It seems that url-http |
186 ;; `sleep-for' was tried but it lead to other forms of | 186 ;; decides sometimes consciously not to call it, so it's not |
187 ;; hanging. --Stef | 187 ;; clear that it's a bug, but even if we need to decide how |
188 (unless (accept-process-output proc) | 188 ;; url-http can then warn us that the download has completed. |
189 ;; accept-process-output returned nil, maybe because the process | 189 ;; In the mean time, we use this here workaround. |
190 ;; exited (and may have been replaced with another). | 190 (setq retrieval-done t) |
191 (setq proc (get-buffer-process asynch-buffer))))) | 191 ;; We used to use `sit-for' here, but in some cases it wouldn't |
192 ;; work because apparently pending keyboard input would always | |
193 ;; interrupt it before it got a chance to handle process input. | |
194 ;; `sleep-for' was tried but it lead to other forms of | |
195 ;; hanging. --Stef | |
196 (unless (accept-process-output proc) | |
197 ;; accept-process-output returned nil, maybe because the process | |
198 ;; exited (and may have been replaced with another). | |
199 (setq proc (get-buffer-process asynch-buffer)))))) | |
192 asynch-buffer))) | 200 asynch-buffer))) |
193 | 201 |
194 (defun url-mm-callback (&rest ignored) | 202 (defun url-mm-callback (&rest ignored) |
195 (let ((handle (mm-dissect-buffer t))) | 203 (let ((handle (mm-dissect-buffer t))) |
196 (save-excursion | 204 (save-excursion |