From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 18116@debbugs.gnu.org
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 [thread overview]
Message-ID: <jwvy4to92vk.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <54110061.1060908@yandex.ru> (Dmitry Gutov's message of "Thu, 11 Sep 2014 05:52:33 +0400")
>> 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 <cbdata>) instead of (list <cbdata>),
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
next prev parent reply other threads:[~2014-09-12 17:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-27 3:12 bug#18116: 24.3.92; url-http calls CALLBACK recursively with malformed CBARGS if the former calls `delete-process' Dmitry
2014-08-13 17:06 ` Glenn Morris
2014-08-18 19:34 ` Óscar Fuentes
2014-09-10 2:24 ` Stefan Monnier
2014-09-11 1:52 ` Dmitry Gutov
2014-09-12 17:22 ` Stefan Monnier [this message]
2014-09-19 2:00 ` Dmitry Gutov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvy4to92vk.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=18116@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.