[Top][All Lists]

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

Re: more url-utils?

From: Stefan Monnier
Subject: Re: more url-utils?
Date: Wed, 18 May 2011 11:09:25 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

SM> What's the difference between the code run in call-back-closure from
SM> the code in `body'?
> The body is easier to write explicitly but the callback-closure offers
> more flexibility and backwards compatibility.  They are more or less the
> same otherwise (see below for the pseudocode), it's just different types
> of syntactic sugar for different situations.  I think the majority of
> uses will be in the synchronous mode, where `with-url-contents-buffer'
> is very convenient.

I think you're just afraid of lambda ;-0

Here's my proposal:

(defun url-fetch (url &optional silent callback)
  "Fetch URL into current buffer.
If CALLBACK is nil, do it synchronously and return a status flag."

But I also like the idea of passing url-request-method and such as
explicit arguments.  And I'm not sure what it should return if CALLBACK
is non-nil (both in the case where the request is performed
asynchronously and when it's performed synchronously).


reply via email to

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