/[emacs]/emacs/lisp/url/url.el
ViewVC logotype

Diff of /emacs/lisp/url/url.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by jet, Sat Nov 20 03:57:59 2004 UTC revision 1.8 by monnier, Thu Jan 13 14:35:11 2005 UTC
# Line 1  Line 1 
1  ;;; url.el --- Uniform Resource Locator retrieval tool  ;;; url.el --- Uniform Resource Locator retrieval tool
2    
3  ;; Copyright (c) 1996,1997,1998,1999,2001,2004  Free Software Foundation, Inc.  ;; Copyright (c) 1996, 1997, 1998, 1999, 2001, 2004, 2005
4    ;;           Free Software Foundation, Inc.
5    
6  ;; Author: Bill Perry <wmperry@gnu.org>  ;; Author: Bill Perry <wmperry@gnu.org>
7  ;; Keywords: comm, data, processes, hypermedia  ;; Keywords: comm, data, processes, hypermedia
# Line 169  no further processing).  URL is either a Line 170  no further processing).  URL is either a
170                                (url-debug 'retrieval "Synchronous fetching done (%S)" (current-buffer))                                (url-debug 'retrieval "Synchronous fetching done (%S)" (current-buffer))
171                                (setq retrieval-done t                                (setq retrieval-done t
172                                      asynch-buffer (current-buffer)))))                                      asynch-buffer (current-buffer)))))
173      (if (not asynch-buffer)      (let ((proc (and asynch-buffer (get-buffer-process asynch-buffer))))
174          ;; We do not need to do anything, it was a mailto or something        (if (null proc)
175          ;; similar that takes processing completely outside of the URL            ;; We do not need to do anything, it was a mailto or something
176          ;; package.            ;; similar that takes processing completely outside of the URL
177          nil            ;; package.
178        (while (not retrieval-done)            nil
179          (url-debug 'retrieval "Spinning in url-retrieve-synchronously: %S (%S)"          (while (not retrieval-done)
180                     retrieval-done asynch-buffer)            (url-debug 'retrieval
181          ;; Quoth Stef:                       "Spinning in url-retrieve-synchronously: %S (%S)"
182          ;; It turns out that the problem seems to be that the (sit-for                       retrieval-done asynch-buffer)
183          ;; 0.1) below doesn't actually process the data: instead it            ;; We used to use `sit-for' here, but in some cases it wouldn't
184          ;; returns immediately because there is keyboard input            ;; work because apparently pending keyboard input would always
185          ;; waiting, so we end up spinning endlessly waiting for the            ;; interrupt it before it got a chance to handle process input.
186          ;; process to finish while not letting it finish.            ;; `sleep-for' was tried but it lead to other forms of
187              ;; hanging.  --Stef
188          ;; However, raman claims that it blocks Emacs with Emacspeak            (unless (accept-process-output proc)
189          ;; for unexplained reasons.  Put back for his benefit until              ;; accept-process-output returned nil, maybe because the process
190          ;; someone can understand it.              ;; exited (and may have been replaced with another).
191          ;; (sleep-for 0.1)              (setq proc (get-buffer-process asynch-buffer)))))
         (sit-for 0.1))  
192        asynch-buffer)))        asynch-buffer)))
193    
194  (defun url-mm-callback (&rest ignored)  (defun url-mm-callback (&rest ignored)

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26