GNU bug report logs - #34763
27.0.50; url-retrieve-synchronously misbehaves inside eldoc-documentation-function

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Tue, 5 Mar 2019 21:35:01 UTC

Severity: normal

Found in version 27.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 34763 <at> debbugs.gnu.org
Subject: bug#34763: 27.0.50; url-retrieve-synchronously misbehaves inside eldoc-documentation-function
Date: Fri, 5 Apr 2019 03:29:55 +0300
On 04.04.2019 17:36, Eli Zaretskii wrote:

>> Because accept-process-output doesn't abort on user input?
> 
> It doesn't?  Are you sure?  Or are you talking about calling
> accept-process-output with inhibit-quit non-nil?

Sorry, you're right. That's the only thing that's necessary.

>> And url-retrieve-synchronously calls it with 1 second timeout (which
>> is a fairly long wait).
> 
> That could be dealt with by making the timeout shorter.

No need.

So, I tried the patch below (did you have that change in mind exactly?), 
and I see no adverse effects so far.

Unfortunately, I don't see all the improvement I was hoping for either.

Good (probably): No "interrupted" messages now, or weird 1-second 
pauses. Or full freezes (so far).

Bad:

The requests still get slower after I've been typing a while, and the 
original speed is never recovered. Even after I wait 10 minutes or so.

And this scenario still spawns lots of processes for the same host and port.

>> 2. I wonder if there are cases where some part of the asynchronous code
>> takes too long, where it should be allowed to be aborted by the user
>> right away. Meaning when url-retrieve is used, not
>> url-retrieve-synchronously.
> 
> I always thought that C-g aborts accept-process-output.

url-retrieve doesn't use accept-process-output.


diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index cf1952066a..d76ad63eef 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -158,7 +158,8 @@ url-http-debug
 	    (progn
 	      (set-process-sentinel proc nil)
 	      (set-process-filter proc nil)))
-	(error "Transfer interrupted!")))
+	;; (error "Transfer interrupted!")
+        ))
   (apply 'url-debug 'http args))

 (defun url-http-mark-connection-as-busy (host port proc)
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index 72ff4f171c..5b8350642f 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -61,8 +61,6 @@ url-debug

 ;;;###autoload
 (defun url-debug (tag &rest args)
-  (if (eq quit-flag t)
-      (error "Interrupted!"))
   (if (or (eq url-debug t)
 	  (numberp url-debug)
 	  (and (listp url-debug) (memq tag url-debug)))




This bug report was last modified 6 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.