From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Platon Pronko Newsgroups: gmane.emacs.bugs Subject: bug#34821: discard_input_tty does not discard pending input, resulting in garbage inserted into the buffer Date: Wed, 13 Mar 2019 11:04:28 +0300 Message-ID: <66917314-4c95-f2e3-1faa-49154772e197@gmail.com> References: <6e2317c9-5063-3718-740e-f53c70f5db5b@gmail.com> 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="102719"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 To: 34821@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 13 09:12:00 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 1h3yzX-000QZR-TF for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Mar 2019 09:12:00 +0100 Original-Received: from localhost ([127.0.0.1]:40236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3yzW-0003j4-T0 for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Mar 2019 04:11:58 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3ywU-0001g9-I1 for bug-gnu-emacs@gnu.org; Wed, 13 Mar 2019 04:08:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3yso-00018u-TX for bug-gnu-emacs@gnu.org; Wed, 13 Mar 2019 04:05:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55684) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3yso-00018l-MC for bug-gnu-emacs@gnu.org; Wed, 13 Mar 2019 04:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h3yso-0006iN-FP for bug-gnu-emacs@gnu.org; Wed, 13 Mar 2019 04:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Platon Pronko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Mar 2019 08:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34821 X-GNU-PR-Package: emacs Original-Received: via spool by 34821-submit@debbugs.gnu.org id=B34821.155246427925763 (code B ref 34821); Wed, 13 Mar 2019 08:05:02 +0000 Original-Received: (at 34821) by debbugs.gnu.org; 13 Mar 2019 08:04:39 +0000 Original-Received: from localhost ([127.0.0.1]:40995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3ysR-0006hT-32 for submit@debbugs.gnu.org; Wed, 13 Mar 2019 04:04:39 -0400 Original-Received: from mail-lj1-f170.google.com ([209.85.208.170]:42178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3ysO-0006hF-Dn for 34821@debbugs.gnu.org; Wed, 13 Mar 2019 04:04:37 -0400 Original-Received: by mail-lj1-f170.google.com with SMTP id v3so662143ljk.9 for <34821@debbugs.gnu.org>; Wed, 13 Mar 2019 01:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=8zkWjz2TsXGZmtJYRcm0jhfklydHeHcNMPH7hUMdc1o=; b=ZYPLsZFQEKAhME7wqZLDoWF7DSaet/49clQ5OZgcHRnW/uS5aDOjJGI1oFVHDMN0aE jMGViuAtAWo2VGsVUZFfF9vOBabBSIOL/sTosGIP30ErKAOMT79RoZZIhWMQff6HB8i9 7HuMVpBOEpFjMQuQtzz7W5Ikq3P19Gq0ZY1rvxzdIckoSflkfp7e9LllMsdGpYPEp/DP 5OrESXmqVmTM72dUNvcAY3XH3T6dGbeifZOWbVABX/CiPVitFhceoFyrBmj3LQkycqLh xc4gO+mN4CVvF9GUPzGGVnFKLWVpvboTzLFK3xc7GMvLq9XQyTyHN+hDMTt61TpxTWVn vzag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=8zkWjz2TsXGZmtJYRcm0jhfklydHeHcNMPH7hUMdc1o=; b=I0DmVY14ermRqL7fl+gJdpOJickEHbT3M0C7bxCvU4lkdnPxgicML6nR/Uyka8bAvJ hV8gZzZsS996BfEhyZm1JqVsmQZKqH+a65TtYp9HyfkcLiD3CnzWiZX6irFgRt0FS9yR z+czEJ87yAQyDCx86OZdQWyoI6DlSJFMt+rD3cjQAy2hJ4gIeftrREkH9Qjsmwj280LS 6G1j4vJdbtYRr4W9GdBgmtkRvKwweiVroEuyaZ/RY8ri4DGTDopsBRnhpO+n1FS53wQU vLqrQADq5oC+RVaMoewYpap56RhXPWUGlpXPPxnlLzQ19R6FukFWH6XlaVniebY/AbkI AJqA== X-Gm-Message-State: APjAAAVGFSHvGwtMPjbduWPuuZ/oEh96SR0hquv3zU+ibTI7YE3I/6Yi werwXxm8fQfy4HZa0Ni4H/XaZNEE X-Google-Smtp-Source: APXvYqyk2A47vul+0MgsU7WrY4eoTDVpktRovH8zDNvLQSPRMt9Feo+v5B+K7Lmnb0GWAPSZ+NJU/g== X-Received: by 2002:a2e:9607:: with SMTP id v7mr15536062ljh.154.1552464270074; Wed, 13 Mar 2019 01:04:30 -0700 (PDT) Original-Received: from [192.168.1.65] (109-252-80-126.nat.spd-mgts.ru. [109.252.80.126]) by smtp.gmail.com with ESMTPSA id m16sm1680622ljb.50.2019.03.13.01.04.28 for <34821@debbugs.gnu.org> (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 13 Mar 2019 01:04:29 -0700 (PDT) In-Reply-To: <6e2317c9-5063-3718-740e-f53c70f5db5b@gmail.com> 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:156288 Archived-At: Found two problems with current workarounds. 1. Simply reading and discarding events before xterm--query call still leaves small timing window while single typed character breaks response parsing and garbage still ends up in the buffer. 2. Thus async querying is prefererrable, and it works most of the time, but sometimes "65;5403;1c" ends up in input buffer (even if no characters are typed at all).