From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#18116: 24.3.92; url-http calls CALLBACK recursively with malformed CBARGS if the former calls `delete-process' Date: Fri, 12 Sep 2014 13:22:11 -0400 Message-ID: References: <86ppgr4hqe.fsf@yandex.ru> <54110061.1060908@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1410542616 5900 80.91.229.3 (12 Sep 2014 17:23:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Sep 2014 17:23:36 +0000 (UTC) Cc: 18116@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 12 19:23:28 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XSUZ8-0005lq-2r for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Sep 2014 19:23:22 +0200 Original-Received: from localhost ([::1]:46569 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSUZ7-0005Aq-MD for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Sep 2014 13:23:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSUYw-00055s-FF for bug-gnu-emacs@gnu.org; Fri, 12 Sep 2014 13:23:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSUYo-0006NT-8s for bug-gnu-emacs@gnu.org; Fri, 12 Sep 2014 13:23:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSUYo-0006NO-5e for bug-gnu-emacs@gnu.org; Fri, 12 Sep 2014 13:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XSUYn-0006KG-KJ for bug-gnu-emacs@gnu.org; Fri, 12 Sep 2014 13:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Sep 2014 17:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18116 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18116-submit@debbugs.gnu.org id=B18116.141054255624284 (code B ref 18116); Fri, 12 Sep 2014 17:23:01 +0000 Original-Received: (at 18116) by debbugs.gnu.org; 12 Sep 2014 17:22:36 +0000 Original-Received: from localhost ([127.0.0.1]:39624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XSUYO-0006Jb-7t for submit@debbugs.gnu.org; Fri, 12 Sep 2014 13:22:36 -0400 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]:53360) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XSUYM-0006JU-Lb for 18116@debbugs.gnu.org; Fri, 12 Sep 2014 13:22:35 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 8746585083; Fri, 12 Sep 2014 13:22:34 -0400 (EDT) Original-Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 8E6381E5B8A; Fri, 12 Sep 2014 13:22:11 -0400 (EDT) Original-Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848) id 6BBB1B41B5; Fri, 12 Sep 2014 13:22:11 -0400 (EDT) In-Reply-To: <54110061.1060908@yandex.ru> (Dmitry Gutov's message of "Thu, 11 Sep 2014 05:52:33 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.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=-2.71, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_TRANSFR 0.11, MC_TSTLAST 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93307 Archived-At: >> The problem is that calling `delete-process' may run the sentinel (and >> since this is code run from the sentinel, it may end up calling the >> sentinel recursively). > I can observe a definite change in behavior, which I cannot reason about I think there is indeed a change of behavior in that the sentinel used to be nil'd while running it. [ This was changed because it prevented the sentinel from modifying itself. ] > Indeed. Looks like my misunderstanding stemmed from Tern not handling this > value exactly right: it expected STATUS to have a certain length in case of > an error, and when called recursively, the callback received STATUS of > different length, prepended with new history. Right, it should use (cons nil ) instead of (list ), since the `car' is used to carry the "historical events" of the request. > I guess there's no bug there, then. Sorry. Maybe not code-wise, but docstring-wise I think there's at least "room for improvement". > Guess so. And both `url-http' and `url-retrieve-internal' are pretty > confusing when it comes to describing the arguments that will be passed > to CALLBACK. > To me, "When retrieval is completed, execute the function CALLBACK, using > the arguments listed in CBARGS." means that it will be called exactly with > the value of CBARGS passed to `url-http', whereas instead the list gets > prepended with stuff before it's passed to CALLBACK. Can you improve those docstrings, to avoid such confusion in the future? Stefan