From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: url-retrieve may cause hang Date: Mon, 23 Oct 2006 07:45:21 -0400 Message-ID: References: <878xjfydq3.fsf@freemail.hu> <87vemj9eib.fsf@freemail.hu> <878xj7aize.fsf@freemail.hu> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1161603994 15938 80.91.229.2 (23 Oct 2006 11:46:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 23 Oct 2006 11:46:34 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 23 13:46:34 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GbyGD-0002TL-EA for ged-emacs-devel@m.gmane.org; Mon, 23 Oct 2006 13:46:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GbyGC-0005Vm-Dq for ged-emacs-devel@m.gmane.org; Mon, 23 Oct 2006 07:46:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GbyFD-00059t-2z for emacs-devel@gnu.org; Mon, 23 Oct 2006 07:45:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GbyFC-00058n-4b for emacs-devel@gnu.org; Mon, 23 Oct 2006 07:45:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GbyFA-00058W-Gr for emacs-devel@gnu.org; Mon, 23 Oct 2006 07:45:25 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GbyFA-0002FA-Cm for emacs-devel@gnu.org; Mon, 23 Oct 2006 07:45:24 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1GbyF7-0004ma-PN; Mon, 23 Oct 2006 07:45:21 -0400 Original-To: Magnus Henoch In-reply-to: <878xj7aize.fsf@freemail.hu> (message from Magnus Henoch on Mon, 23 Oct 2006 04:01:09 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:61037 Archived-At: I made "status" an extra argument at the beginning of the argument list (so if CBARGS has N elements, the callback is called with N+1 arguments). I described this in the docstring of url-retrieve in my patch below (not yet committed). Is this new argument _unconditionally_ present? I can't tell, and I see comments that seem to suggest that it might not be so: + (setf (car url-callback-arguments) + (nconc (list :error (list 'error 'connection-failed why + :host (url-host url-current-object) + :service (url-port url-current-object))) + (car url-callback-arguments))) And this: It is called as (apply CALLBACK STATUS CBARGS), where STATUS ! is a list with an even number of elements representing what happened ! during the request, with most recent events first. Each pair is one ! of: ! ! \(:redirect REDIRECTED-TO) - the request was redirected to this URL ! \(:error (ERROR-SYMBOL . DATA)) - an error occurred. The error can be ! signaled with (signal ERROR-SYMBOL DATA). I don't like that variability, and it is easy to avoid. If we are to change the API of these callbacks now, let's change it to something more consistent: add a single argument unconditionally. That added argument can be a property list in which :redirect and :error may occur.