From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Fwd: HTTP redirects make url-retrieve-synchronously asynchronous Date: Mon, 23 Jan 2006 11:40:33 -0500 Message-ID: References: <87y81ep6wf.fsf-monnier+emacs@gnu.org> <87wtgu8trl.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138041239 16142 80.91.229.2 (23 Jan 2006 18:33:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 23 Jan 2006 18:33:59 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 23 19:33:54 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 1F16VM-0002I7-NG for ged-emacs-devel@m.gmane.org; Mon, 23 Jan 2006 19:33:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F16Y0-0003LN-Ai for ged-emacs-devel@m.gmane.org; Mon, 23 Jan 2006 13:36:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F14nC-0005w7-DE for emacs-devel@gnu.org; Mon, 23 Jan 2006 11:43:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F14n9-0005vC-CI for emacs-devel@gnu.org; Mon, 23 Jan 2006 11:43:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F14n9-0005v6-1X for emacs-devel@gnu.org; Mon, 23 Jan 2006 11:43:43 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1F14rZ-0005x0-QR; Mon, 23 Jan 2006 11:48:17 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id E723533E612; Mon, 23 Jan 2006 11:40:36 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 431934AC017; Mon, 23 Jan 2006 11:40:33 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 27F54E6C1E; Mon, 23 Jan 2006 11:40:33 -0500 (EST) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Sat, 21 Jan 2006 22:59:07 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.854, requis 5, autolearn=not spam, AWL 0.05, BAYES_00 -4.90) X-MailScanner-From: monnier@iro.umontreal.ca 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:49445 Archived-At: > 3. some backends (at least url-http, maybe others) sometimes decide > not to call the callback, presumably as a way to signal an error (the > operation can't be completed so the callback can't be called, > basically). This is a bug, but I don't know of anyone who's tried to > tackle it yet. > What exactly is the bug? It isn't clear to me. Are you saying that > they should also call the callback function to report failure? Yes. > That seems like a good idea on general principles. I don't know how > much of a change it would be. Is the calling convention easy to > extend for this? Not directly. The most natural way to do that is to pass the success/failure information as a parameter to the callback function, but if we don't want to break existing code, we could pass the info via a local variable in the destination buffer. > 2. sometimes the callback gets called in another buffer than the one > returned by url-retrieve. > One solution would be to give the first buffer a local variable that > would, in this case, point to the second buffer. > Then url-retrieve-synchronously could check the local variable, which > would tell it to check the process in the other buffer. Yes, sounds like a good quick-fix. > They (and url-retrieve) should either take an optional destination > buffer as parameter or they should simply not return any buffer at all > and the destination buffer should only be made known when the callback > is called. > I don't much like the idea of that big a change in calling conventions. Neither do I, especially not that close to a release. OTOH we haven't released URL yet so it's the last opportunity to clean up the API. Stefan