From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#48500: 28.0.50; url-retrieve-synchronously exits abnormally due to pending keyboard input from terminal Date: Tue, 18 May 2021 19:54:03 +0300 Message-ID: <83sg2kq8yc.fsf@gnu.org> References: <87pmxo4kiu.wl-mullikine@gmail.com> <8335ukrsj3.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30264"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48500@debbugs.gnu.org To: Shane Mulligan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 18 18:55:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lj2zv-0007cz-68 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 18:55:11 +0200 Original-Received: from localhost ([::1]:58264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lj2zu-0007AF-3b for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 12:55:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lj2zm-0007A0-0p for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 12:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45623) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lj2zl-00088Q-Pz for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 12:55:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lj2zl-0007dT-N4 for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 12:55:01 -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, 18 May 2021 16:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48500 X-GNU-PR-Package: emacs Original-Received: via spool by 48500-submit@debbugs.gnu.org id=B48500.162135684729278 (code B ref 48500); Tue, 18 May 2021 16:55:01 +0000 Original-Received: (at 48500) by debbugs.gnu.org; 18 May 2021 16:54:07 +0000 Original-Received: from localhost ([127.0.0.1]:57169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj2yt-0007cA-CY for submit@debbugs.gnu.org; Tue, 18 May 2021 12:54:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj2yr-0007bh-Up for 48500@debbugs.gnu.org; Tue, 18 May 2021 12:54:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43924) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lj2yl-0007ab-D1; Tue, 18 May 2021 12:54:00 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4062 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lj2yk-0002yl-QQ; Tue, 18 May 2021 12:53:59 -0400 In-Reply-To: (message from Shane Mulligan on Wed, 19 May 2021 04:32:16 +1200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:206817 Archived-At: > From: Shane Mulligan > Date: Wed, 19 May 2021 04:32:16 +1200 > > Thanks for looking into this so quickly. First some background on the problem. I managed to work through > this issue (https://github.com/emacs-helm/helm/issues/2417) with the `emacs-helm` maintainer and we > found what appears to be that the call to `accept-process-output` inside of `url-retrieve-synchronously` will > generate a `C-g` when there is pending input of any char. As far as I can tell this is an issue only with > terminal emacs. As I understand it, `inhibit-quit`, as used in `accept-process-output` allows a `C-g` to be > propagated outwards and handled and from what I can see by the comments surrounding, > > ``` > ;; accept-process-output returned nil, maybe because the process > ;; exited (and may have been replaced with another). If we got > ;; a quit, just stop. > ``` > > the `C-g` in this case is expected. > > But I wonder if `C-g` was meant to be generated if the user was simply mashing keys on the keyboard. In > this case, the `C-g` emanating from `accept-process-output` was bubbling up into `helm` and `helm` was > treating it like an error. > > Here, you can see a quit being generated from the visual cue in the minibuffer. > https://asciinema.org/a/nAIB8Z1lGgZJqJg9Mt8YiNEM9 > > Here, I have added `while-no-input` and I no longer get the `quit`. > https://asciinema.org/a/x9ELZhwDP1IUtmOz0M1cly42H > > However, as I test the addition of `while-no-input` with `helm-google-suggest` (as above), though Quit is no > longer being generated from mashing keys, the key input which would have generated the `quit` is not > immediately shown in `helm`. Instead, it only appears on the next key press. So my implementation may not > be perfect or complete. > > Finding the solution would make the minibuffer far less interrupted while typing when > `url-retrieve-synchronously` is used in the background. > > Thank you. > > Shane Mulligan Please in the future send your responses with the bug address, 48500@debbugs.gnu.org, on the CC list, so that others will see your detailed descriptions. I won't have time to take a good look into that in the next few days, so it's good to make others aware of your findings, because they might look into it meanwhile. Personally, I find it very strange that typing on the keyboard produces C-g, it shouldn't happen, neither on a TTY nor on a GUI display.