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#27634: 25.2.1; C-g does not quit register-read-with-preview Date: Tue, 11 Jul 2017 17:36:09 +0300 Message-ID: <83a84bjb1i.fsf@gnu.org> References: <1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com> <87h8ykdcmx.fsf@calancha-pc> <1499671255.3837111.1035640480.1DBD693E@webmail.messagingengine.com> <83shi4i5ma.fsf@gnu.org> <1499746462.2451911.1036820704.00105E22@webmail.messagingengine.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1499784611 25885 195.159.176.226 (11 Jul 2017 14:50:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 11 Jul 2017 14:50:11 +0000 (UTC) Cc: tino.calancha@gmail.com, 27634@debbugs.gnu.org To: Paul Rankin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 11 16:50:01 2017 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 1dUwUB-0005zO-IY for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Jul 2017 16:49:59 +0200 Original-Received: from localhost ([::1]:46746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUwHx-0004Nc-SS for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Jul 2017 10:37:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUwHh-0004JM-Vu for bug-gnu-emacs@gnu.org; Tue, 11 Jul 2017 10:37:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUwHd-0005Jd-Un for bug-gnu-emacs@gnu.org; Tue, 11 Jul 2017 10:37:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59729) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUwHd-0005JZ-QP for bug-gnu-emacs@gnu.org; Tue, 11 Jul 2017 10:37:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dUwHd-0002ow-KR for bug-gnu-emacs@gnu.org; Tue, 11 Jul 2017 10:37: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, 11 Jul 2017 14:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27634 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27634-submit@debbugs.gnu.org id=B27634.149978379210808 (code B ref 27634); Tue, 11 Jul 2017 14:37:01 +0000 Original-Received: (at 27634) by debbugs.gnu.org; 11 Jul 2017 14:36:32 +0000 Original-Received: from localhost ([127.0.0.1]:34173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUwH7-0002oC-2c for submit@debbugs.gnu.org; Tue, 11 Jul 2017 10:36:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUwH2-0002nx-8u for 27634@debbugs.gnu.org; Tue, 11 Jul 2017 10:36:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUwGt-00055K-3m for 27634@debbugs.gnu.org; Tue, 11 Jul 2017 10:36:19 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUwGt-00055G-0a; Tue, 11 Jul 2017 10:36:15 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1220 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dUwGs-00078H-4u; Tue, 11 Jul 2017 10:36:14 -0400 In-reply-to: <1499746462.2451911.1036820704.00105E22@webmail.messagingengine.com> (message from Paul Rankin on Tue, 11 Jul 2017 14:14:22 +1000) 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:134431 Archived-At: > From: Paul Rankin > Cc: tino.calancha@gmail.com, 27634@debbugs.gnu.org > Date: Tue, 11 Jul 2017 14:14:22 +1000 > > On Tue, 11 Jul 2017, at 03:06 AM, Eli Zaretskii wrote: > > FWIW, I actually agree with Tino's solution, and was about to propose > > something similar. It's true that control characters are not > > alphanumeric, but we could fix the documentation to be more accurate > > if we care about that. OTOH, we've supported control characters as > > register names for many years, and by now it should be quite clear it > > didn't bother anyone yet. > > Hmm, it bothers me? OK, not "anyone", just "one". ;-) > But the question is moot I think, since this is an opportunity to improve the code.. why waste time arguing for poorer code when we can make it better? We are not arguing _whether_ to make it better, we are arguing _how_ to make it better. > > > That prohibits anything except "a-zA-Z0-9", although users may want to save registers to "$" or "*". > > > > Why would we want to be so strict when the only real problem is that > > C-g doesn't quit? > > I think there are two good options for good UX: make the code reflect the documentation (this is the strict option), or update both the documentation and the code to reflect what we believe is user expectation, i.e. that the user may save registers to any character key on their keyboard (this is my preference). I believe the user expectations by now are that any character should do. We want to exempt C-g and ESC ESC in order to allow the user to bail out, but other than that, I see no reason to add restrictions where they aren't needed. "Alphanumeric" these days means much more than just ASCII, and we have no reasons I can see to restrict users to ASCII, certainly not after so many years of the current behavior. > One overlooked thing about Tino's solution is that C-g is a keystroke and keyboard-quit is a function, which obviously aren't necessarily equivalent. What if the user remaps keyboard quit to "7"? As Andreas points out, only quit char is important. If we want to be holier than the Pope, we could look at its value by calling current-input-method. I don't object to such an extension.