emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `url-retrieve-synchronously' is not synchronous enough


From: Eduardo Ochs
Subject: Re: `url-retrieve-synchronously' is not synchronous enough
Date: Wed, 14 Nov 2007 18:28:52 -0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> > `url-retrieve-synchronously' is not synchronous enough.
> > When I execute this sexp,
> >
> >   (progn (switch-to-buffer
> >           (url-retrieve-synchronously "http://127.0.0.1/";))
> >          (point))
> >
> > the result is (point-max), but when I get the control back the
> > point is at the first character of a buffer - as if some hook
> > containing (goto-char (point-min)) ran after the (point) in the
> > progn.
>
> Does this patch make it work?
>
> *** url.el    25 Jul 2007 11:49:25 -0400      1.27.2.1
> --- url.el    10 Nov 2007 19:58:50 -0500      
> ***************
> *** 240,246 ****
>               ;; XXX: The callback must always be called.  Any
>               ;; exception is a bug that should be fixed, not worked
>               ;; around.
> !                 (setq retrieval-done t))
>               ;; We used to use `sit-for' here, but in some cases it wouldn't
>               ;; work because apparently pending keyboard input would always
>               ;; interrupt it before it got a chance to handle process input.
> --- 240,248 ----
>               ;; XXX: The callback must always be called.  Any
>               ;; exception is a bug that should be fixed, not worked
>               ;; around.
> !             (progn ;; Call delete-process so we run any sentinel now.
> !               (delete-process proc)
> !               (setq retrieval-done t)))
>               ;; We used to use `sit-for' here, but in some cases it wouldn't
>               ;; work because apparently pending keyboard input would always
>               ;; interrupt it before it got a chance to handle process input.

That fixed it! Thanks. :-)

  Eduardo Ochs
  http://angg.twu.net/
  address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]