From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33749: 26.1; input-decode-map to empty vector should preserve echo area Date: Sat, 15 Dec 2018 11:09:58 +0200 Message-ID: <83efajf95l.fsf@gnu.org> References: <83imzvff9w.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1544864949 11433 195.159.176.226 (15 Dec 2018 09:09:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Dec 2018 09:09:09 +0000 (UTC) Cc: 33749@debbugs.gnu.org To: Yuri Khan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 15 10:09:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gY5wU-0002qw-9G for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Dec 2018 10:09:02 +0100 Original-Received: from localhost ([::1]:38378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gY5yb-00080n-0J for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Dec 2018 04:11:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gY5yU-000804-R7 for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2018 04:11:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gY5yQ-0000N2-7v for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2018 04:11:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44694) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gY5yQ-0000Mp-3K for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2018 04:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gY5yP-0004rF-Qj for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2018 04:11:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Dec 2018 09:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33749 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33749-submit@debbugs.gnu.org id=B33749.154486500818604 (code B ref 33749); Sat, 15 Dec 2018 09:11:01 +0000 Original-Received: (at 33749) by debbugs.gnu.org; 15 Dec 2018 09:10:08 +0000 Original-Received: from localhost ([127.0.0.1]:48952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gY5xY-0004pz-Ji for submit@debbugs.gnu.org; Sat, 15 Dec 2018 04:10:08 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47951) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gY5xX-0004pf-Hk for 33749@debbugs.gnu.org; Sat, 15 Dec 2018 04:10:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gY5xP-0008Ah-7J for 33749@debbugs.gnu.org; Sat, 15 Dec 2018 04:10:02 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gY5xP-0008AW-11; Sat, 15 Dec 2018 04:09:59 -0500 Original-Received: from [176.228.60.248] (port=3130 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gY5xO-0001cE-KP; Sat, 15 Dec 2018 04:09:58 -0500 In-reply-to: (message from Yuri Khan on Sat, 15 Dec 2018 15:07:03 +0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 208.118.235.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:153478 Archived-At: > From: Yuri Khan > Date: Sat, 15 Dec 2018 15:07:03 +0700 > Cc: 33749@debbugs.gnu.org > > Okay. So, amended proposed course: > > * Add a variable such as ‘input-decode-preserve-echo’, boolean, > default nil, that controls the following behavior changes. > > [any better ideas on the naming?] > > * If the above variable is true > > > and ‘read_key_sequence’ detects that the whole key sequence has been > > > rewritten to an empty sequence, return -1. > > > > > > * In ‘command_loop_1’, save the echo area contents before calling > > > ‘read_key_sequence’. > Afterwards, if ‘input-decode-preserve-echo’ is true and the return > value is -1, restore the echo area contents. > > * In the future ‘terminal-init-xterm-kitty’ function, set > ‘input-decode-preserve-echo’ to true when full keyboard mode is > requested. SGTM, but let's hear what others think. > An alternative way could be to add hooks at start of > ‘read_key_sequence’ and at each each sequence rewrite, but IMO that > would be excessive. I think I agree.