From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#34763: 27.0.50; url-retrieve-synchronously misbehaves inside eldoc-documentation-function Date: Fri, 5 Apr 2019 03:29:55 +0300 Message-ID: <19dad181-7933-52b5-548f-08dfa48334bf@yandex.ru> References: <83a7i15vrk.fsf@gnu.org> <787f765a-42f4-40d0-3b78-e751f546fe6c@yandex.ru> <831s3c3ta8.fsf@gnu.org> <8f7ae869-2e94-5535-f16f-476348036dc2@yandex.ru> <83r2bc2csd.fsf@gnu.org> <83h8c63ek1.fsf@gnu.org> <7240d82b-5919-cee8-e3bc-81be8d996400@yandex.ru> <83pnqsyw68.fsf@gnu.org> <83pnq1diqk.fsf@gnu.org> <83lg0pdehd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="213590"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Thunderbird/67.0 Cc: 34763@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 05 02:31:12 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 1hCClD-000tPU-Kw for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Apr 2019 02:31:11 +0200 Original-Received: from localhost ([127.0.0.1]:33190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hCClC-0001UH-HO for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Apr 2019 20:31:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hCCl6-0001UB-N1 for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2019 20:31:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hCCl5-00016f-Is for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2019 20:31:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59546) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hCCl5-00016Y-Cq for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2019 20:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hCCl5-0000bQ-73 for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2019 20:31:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Apr 2019 00:31:03 +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.155442420931313 (code B ref 34763); Fri, 05 Apr 2019 00:31:03 +0000 Original-Received: (at 34763) by debbugs.gnu.org; 5 Apr 2019 00:30:09 +0000 Original-Received: from localhost ([127.0.0.1]:44857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hCCkC-00088c-Uz for submit@debbugs.gnu.org; Thu, 04 Apr 2019 20:30:09 -0400 Original-Received: from mail-lj1-f196.google.com ([209.85.208.196]:43966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hCCk8-00082N-Lz for 34763@debbugs.gnu.org; Thu, 04 Apr 2019 20:30:06 -0400 Original-Received: by mail-lj1-f196.google.com with SMTP id f18so3665813lja.10 for <34763@debbugs.gnu.org>; Thu, 04 Apr 2019 17:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8yqyVV8DZMwG6vx0bWXHePutWDzgEsbngciCx7wYBOc=; b=HfF9bSRgNQzFxI2oQFZ1PGRl6N7tieN1pt6+UeZC5nabg34xhNObKsQGuAt5PEEWcg l6i8QCm41kHkjArhzHXAxW6eSFeSkrD/VhhcZ6IURG5r3EKZyiTDwQNWarRVjLe5hUNV BmnCZXhHBtsyzKIKmCKDB2LLVgnoJNlBYuEf8wxTafqI9zIViNtkLCUmQzX+1U2mOjhe Rewo0rv8kcL7dE4yvXJXH7b55FbNVlMuk33clFbO7rcYW0rcI4krQ8KIkUlN+WicCs/q aZHdm78D9P/HPqeghFdX34mr30wd+FeCBYRDvj+/CTxOT+udGDn9tXWSjS6+uLmngdZ+ 3uWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8yqyVV8DZMwG6vx0bWXHePutWDzgEsbngciCx7wYBOc=; b=iyPZqGYudyXLEZCrNx9+b2u74bExwrs0FPUlFn0Vqcli3u3NhqeHY8kzeoVi47XQdY Uc85BibCbG6nR8ZYriLayWEUcUTsIQHfrDZQaAwBvmtUcIs8abiTjA9+IUGXnGF1yTkX rf4P2Tv9MpqlUkHG0xnr6ZiLQv6kNYHWtuO1EVTL2H2T5lsB15y6D00VXLzw/2BEmYDQ DYc+Mue1EP4GBYrXRKNKqkYp553Odz1mAvLbFMODwPHxxlqGl65WcTMFe2lrh44AfpU0 eIE6f+E4g6ZtfEMRKB4U1Pd7syiQ6sLsoOp2C9n/INHk5kxIB6bVEO0bpcwgQSjgJuDI ikLA== X-Gm-Message-State: APjAAAUQEHFQkzf9VgpKMKuaQ6KoOrICCZInKwS2MspT2ji2ksWXM+PS AS78/wU/q9FFmC9kW8tKLY/Sc4mP X-Google-Smtp-Source: APXvYqxkGlSSU4zj5LXBWgl25keXZtdSSoubtlPeXfn1J+NF/U4WPX/+Cl+X3swXz2TkVCWUrcgoqg== X-Received: by 2002:a2e:6e14:: with SMTP id j20mr5036836ljc.172.1554424198191; Thu, 04 Apr 2019 17:29:58 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id r20sm4343922ljj.22.2019.04.04.17.29.56 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 04 Apr 2019 17:29:56 -0700 (PDT) In-Reply-To: <83lg0pdehd.fsf@gnu.org> Content-Language: en-US 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:157193 Archived-At: 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)))