unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: url-retrieve may cause hang
Date: Mon, 23 Oct 2006 07:45:21 -0400	[thread overview]
Message-ID: <E1GbyF7-0004ma-PN@fencepost.gnu.org> (raw)
In-Reply-To: <878xj7aize.fsf@freemail.hu> (message from Magnus Henoch on Mon,  23 Oct 2006 04:01:09 +0200)

    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.

  reply	other threads:[~2006-10-23 11:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-16 22:33 url-retrieve may cause hang David Reitter
2006-10-17  0:42 ` Magnus Henoch
2006-10-17  8:05   ` Kim F. Storm
2006-10-17 14:57     ` Magnus Henoch
2006-10-17 15:38       ` Stefan Monnier
2006-10-23  2:01         ` Magnus Henoch
2006-10-23 11:45           ` Richard Stallman [this message]
2006-10-25 14:22             ` Chong Yidong
2006-10-25 23:00               ` Magnus Henoch
2006-10-26  5:23               ` Richard Stallman
2006-10-17 16:24       ` Magnus Henoch
2006-10-17 17:48       ` David Reitter
2006-10-18 16:23         ` Michaël Cadilhac
2006-10-18  5:12       ` Richard Stallman
2006-10-18  9:03         ` Magnus Henoch
2006-10-18 14:01           ` Stefan Monnier
2006-10-18 17:54           ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1GbyF7-0004ma-PN@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).