From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Shane Mulligan Newsgroups: gmane.emacs.bugs Subject: bug#48500: 28.0.50; url-retrieve-synchronously exits abnormally due to pending keyboard input from terminal Date: Wed, 19 May 2021 11:32:23 +1200 Message-ID: References: <87pmxo4kiu.wl-mullikine@gmail.com> <8335ukrsj3.fsf@gnu.org> <83sg2kq8yc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e3b50505c2a31f6e" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3816"; mail-complaints-to="usenet@ciao.gmane.io" To: 48500@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 19 02:56:55 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 1ljAW7-0000jj-E6 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 May 2021 02:56:55 +0200 Original-Received: from localhost ([::1]:60556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljAW5-0003F7-FB for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 20:56:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljAVG-0003Ex-GN for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 20:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46069) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ljAVG-0007x0-9E for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 20:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ljAVG-0002dJ-8W for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 20:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Shane Mulligan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 May 2021 00:56:02 +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.162138574010090 (code B ref 48500); Wed, 19 May 2021 00:56:02 +0000 Original-Received: (at 48500) by debbugs.gnu.org; 19 May 2021 00:55:40 +0000 Original-Received: from localhost ([127.0.0.1]:57615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljAUu-0002cg-7Q for submit@debbugs.gnu.org; Tue, 18 May 2021 20:55:40 -0400 Original-Received: from mail-yb1-f177.google.com ([209.85.219.177]:35498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj9CZ-0000ch-Oc for 48500@debbugs.gnu.org; Tue, 18 May 2021 19:32:40 -0400 Original-Received: by mail-yb1-f177.google.com with SMTP id i4so15646860ybe.2 for <48500@debbugs.gnu.org>; Tue, 18 May 2021 16:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=aeBuQ1L13DzOPBjB12ZVq/bptdMWYwvEgPQsfSZzYhs=; b=c2R+GyWeTxNJn0PuSXZJK4e6ZU94xM8I7QFWZN5B10JOY5tRuSuEMFtLvEaUHxVjtI sm+lqGqSLuNnovvr2O2s6taBQoYTIkcBglRvb/wbcUCQlUD4mZgDvvEuZffHWbpX8gjg T7khj13KzjuSnNykm9gxhs/nP46FXB/7lVgqLLNdqe9JvjptPLe5HVW/rFykTRx3YQm3 ElT8EHUGkgonEgsMdirIJ6nPE3OVrTKffwj0wQ2SsmM/Cam4PH4bu5mOJYMhgmF3mpaJ KBfKlXf1qJuOdj3XgNrNXRWydILjPyaEEhY4NYxlV4ou7lg1pcG+JOdEz+sK1OKDEwsB kBGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=aeBuQ1L13DzOPBjB12ZVq/bptdMWYwvEgPQsfSZzYhs=; b=r/d7iJtLX0FmwG0Y+U/mCUQuggOinQTuDaPDxZ8YV/78fGDTggRUpZBG/TjwmiRQn9 ngeQQ449FcXysNIUeeoBkmttyvejN9uLXtBdLzZjF1VGW+PcyiLyPt8mfRyYzt1DzvK6 Z91COdg1WGpMo6kDZ569+iklOzkvji5XTD5dRwOipsBOd3G+RtagsB+BJ65zd9aXnq8y wobvjjmQA3QEY6Sz3DR+FOkwlZIiAs5KP62Rfjgf/99hCwlGfRkxOVhjCeN6uXccxtrY cpG/OuaibulP38SbIKeQFCEtqKROd2aNN7iDV2WdOT+J9JBHSC7Fd8hfFEXZwFozlSgA th/g== X-Gm-Message-State: AOAM532aE0HofC1i5qvtiZaN9tj9hMUBBWihlpig3bEG17pBJJiF2s9n ODI6ITbxCH4nIoiC/7rO5l/He1p3fxC20ZhhORV/P7u73L7Z X-Google-Smtp-Source: ABdhPJznHxU6rSgKBE/pES2BSc15MJl30TiXvk7sVUl/zK+KZmW7BuRIMw2W9yPmnpGhdh2KVtNUqMUVreS3iFcHYnU= X-Received: by 2002:a25:a466:: with SMTP id f93mr10663771ybi.264.1621380754026; Tue, 18 May 2021 16:32:34 -0700 (PDT) In-Reply-To: <83sg2kq8yc.fsf@gnu.org> X-Mailman-Approved-At: Tue, 18 May 2021 20:55:39 -0400 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:206848 Archived-At: --000000000000e3b50505c2a31f6e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable My apologies. It was literally 5am when I wrote that. I think I have misunderstood `C-g` being generated with `quit-flag`. The bad behaviour is very clearly still happening. I will try to clarify this problem further by experimenting with it. I need to figure out why `while-no-input` suppresses the `quit` but merely setting `quit-flag` does not. Something indirect may be happening. Thank you all, Shane Mulligan How to contact me: =F0=9F=87=A6=F0=9F=87=BA 00 61 421 641 250 =F0=9F=87=B3=F0=9F=87=BF 00 64 21 1462 759 <+64-21-1462-759> mullikine@gmail.com On Wed, May 19, 2021 at 4:54 AM Eli Zaretskii wrote: > > 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` insid= e > 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 bubblin= g > 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 hav= e > 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. > --000000000000e3b50505c2a31f6e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
My apologies. It was literally 5am when I wrote that. I th= ink I have misunderstood `C-g` being generated with `quit-flag`. The bad be= haviour is very clearly still happening. I will try to clarify this problem= further by experimenting with it. I need to figure out why `while-no-input= ` suppresses the `quit` but merely setting `quit-flag` does not. Something = indirect may be happening.=C2=A0

Thank you all,
=
Shane Mulligan

<= table style=3D"padding:0.5em;border:1px solid rgb(240,240,240);background:l= inear-gradient(135deg,rgb(225,255,255) 0%,rgb(225,255,255) 7%,rgb(225,255,2= 55) 12%,rgb(253,255,255) 12%,rgb(230,248,253) 30%,rgb(200,238,251) 54%,rgb(= 190,228,248) 75%,rgb(177,216,245) 100%)">
How to contac= t me:
3D""
=F0=9F=87=A6=F0=9F=87=BA00 61 421 641 250
=F0=9F=87=B3=F0=9F=87=BF00 64 21 1462 759
mullikine@gmail= .com



On Wed, May 19, 2021 at= 4:54 AM Eli Zaretskii <eliz@gnu.org= > wrote:
>= From: Shane Mulligan <mullikine@gmail.com>
> 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/is= sues/2417) with the `emacs-helm` maintainer and we
> found what appears to be that the call to `accept-process-output` insi= de 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 comment= s surrounding,
>
> ```
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; accept-proces= s-output returned nil, maybe because the process
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; exited (and m= ay have been replaced with another).=C2=A0 If we got
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; 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.=C2=A0 In
> this case, the `C-g` emanating from `accept-process-output` was bubbli= ng 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 mi= nibuffer.
> https://asciinema.org/a/nAIB8Z1lGgZJqJg9Mt8YiN= EM9
>
> Here, I have added `while-no-input` and I no longer get the `quit`. > https://asciinema.org/a/x9ELZhwDP1IUtmOz0M1cly= 42H
>
> 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 ha= ve 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 wh= ile 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.gn= u.org, on the CC list, so that others will see your
detailed descriptions.=C2=A0 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.
--000000000000e3b50505c2a31f6e--