From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#34763: 27.0.50; url-retrieve-synchronously misbehaves inside eldoc-documentation-function Date: Tue, 12 Mar 2019 20:00:34 +0200 Message-ID: <83r2bc2csd.fsf@gnu.org> References: <83a7i15vrk.fsf@gnu.org> <787f765a-42f4-40d0-3b78-e751f546fe6c@yandex.ru> <831s3c3ta8.fsf@gnu.org> <8f7ae869-2e94-5535-f16f-476348036dc2@yandex.ru> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="246423"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34763@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 12 19:36:59 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3mGo-0011zK-UI for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Mar 2019 19:36:59 +0100 Original-Received: from localhost ([127.0.0.1]:57584 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3mGn-0008F8-Rt for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Mar 2019 14:36:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3lzZ-00006l-Tl for bug-gnu-emacs@gnu.org; Tue, 12 Mar 2019 14:19:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3lj3-0008HM-Bh for bug-gnu-emacs@gnu.org; Tue, 12 Mar 2019 14:02:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55249) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3lj0-0008FM-P8 for bug-gnu-emacs@gnu.org; Tue, 12 Mar 2019 14:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h3lj0-0006iv-HS for bug-gnu-emacs@gnu.org; Tue, 12 Mar 2019 14:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Mar 2019 18:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34763 X-GNU-PR-Package: emacs Original-Received: via spool by 34763-submit@debbugs.gnu.org id=B34763.155241366525777 (code B ref 34763); Tue, 12 Mar 2019 18:02:02 +0000 Original-Received: (at 34763) by debbugs.gnu.org; 12 Mar 2019 18:01:05 +0000 Original-Received: from localhost ([127.0.0.1]:40560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3li5-0006hh-7g for submit@debbugs.gnu.org; Tue, 12 Mar 2019 14:01:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3li2-0006h6-PH for 34763@debbugs.gnu.org; Tue, 12 Mar 2019 14:01:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3lhq-0006os-9U; Tue, 12 Mar 2019 14:00:53 -0400 Original-Received: from [176.228.60.248] (port=4860 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h3lhg-0006Zk-Vm; Tue, 12 Mar 2019 14:00:44 -0400 In-reply-to: <8f7ae869-2e94-5535-f16f-476348036dc2@yandex.ru> (message from Dmitry Gutov on Tue, 12 Mar 2019 19:44:04 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:156275 Archived-At: > Cc: 34763@debbugs.gnu.org > From: Dmitry Gutov > Date: Tue, 12 Mar 2019 19:44:04 +0200 > > > Crystal ball says there _was_ in fact a change: the error message text > > has changed slightly. > > I'm sorry, you are right. The text did change. It's similar enough, so I can understand the confusion and disappointment ;-). > > The below should fix both; please see if it does, and also whether it > > fixes your original real-life use case. > > The patch does away with the first part of the complaint: no "Transfer > interrupted" or "Interrupted" messages anymore. Thanks! > > The HTTP requests do take longer and longer times to complete, though. > After enough typing, the 10th request never seems to complete. I can > monitor that with changing the function's definition to > > (defun silly-eldoc () > (dotimes (i 10) > (url-retrieve-synchronously "http://www.google.com") > (message "try %i" i)) > "done") > > and watching the Messages buffer. > > The counter fairly quickly reaches 0, but rarely goes past 3, and almost > never past 5 (now that I've been calling that eldoc function for several > minutes, albeit with big pauses). > > M-x list-processes shows 12 lines with very similar contents. > > I don't know whether having 10 requests to the same URL counts as a > real-life case, though. Isn't the above expected, given the recipe? You are initiating an HTTP retrieval inside while-no-input, and then provide input which aborts the retrieval. What else can we expect from this code? The point of my changes was to avoid signaling errors from the retrieval routines when some other unrelated code, such as the "real" eldoc function, is running inside while-no-input. But if you run url-retrieve-synchronously itself inside while-no-input, you should expect it to be aborted by arriving input, right? Or am I missing something?