From unknown Sun Aug 10 10:55:09 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#27634 <27634@debbugs.gnu.org> To: bug#27634 <27634@debbugs.gnu.org> Subject: Status: 25.2.1; C-g does not quit register-read-with-preview Reply-To: bug#27634 <27634@debbugs.gnu.org> Date: Sun, 10 Aug 2025 17:55:09 +0000 retitle 27634 25.2.1; C-g does not quit register-read-with-preview reassign 27634 emacs submitter 27634 Paul Rankin severity 27634 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 09 23:59:09 2017 Received: (at submit) by debbugs.gnu.org; 10 Jul 2017 03:59:09 +0000 Received: from localhost ([127.0.0.1]:59437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUPqn-0000xr-IH for submit@debbugs.gnu.org; Sun, 09 Jul 2017 23:59:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUPql-0000xe-Ni for submit@debbugs.gnu.org; Sun, 09 Jul 2017 23:59:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUPqf-0005AM-KI for submit@debbugs.gnu.org; Sun, 09 Jul 2017 23:59:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35485) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dUPqf-0005AI-Ga for submit@debbugs.gnu.org; Sun, 09 Jul 2017 23:59:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUPqe-00020v-Aj for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 23:59:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUPqb-00059D-4L for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 23:59:00 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:32897) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dUPqa-000593-P7 for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 23:58:57 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id CB5D8206C7 for ; Sun, 9 Jul 2017 23:58:54 -0400 (EDT) Received: from web5 ([10.202.2.215]) by compute3.internal (MEProxy); Sun, 09 Jul 2017 23:58:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulwrankin.com; h=content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=P35Hym6djxV2DLLcQNtYHEavItH5688Gh7Zr4sTq0AU=; b=LrwTDYaw cuQpoVuUQ6iMrNmHam55MV/xcvfnR05WDEK2kFk7Q6jIUqMF658IVA90t1Fb3GPR SYgKFXU1HTa9MYJOxfdO/q6H22FD4YV8mtFYFxXIccCq5b2HytFoCLtGi+xAyqQz E2CRC8U3fzsuJ4qVTjFhDw2OHt/vV7bl7v4xODPGeAu3j0qWlXNKR3Rr924piTxF gdSb2LALgq5i0Fn//HrewPCiSUlPpmoh529Y6VPA8AgaILbqV27BN/ZdUR1I+zKA MBGPDqOqLr/yp/u0nxtS2gwrYnnzvL+L9K8HXM+UutsZlxZ/JkasyNR1kQSQDDom WCXudn/p/TdgFA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=P35Hym6djxV2DLLcQNtYHEavItH56 88Gh7Zr4sTq0AU=; b=ZWQKiTqqKTe/EwVwjHW4raEyYcqrqo0oeicdPUqdvcSnT rEYgV8WyFoQRrrLaHK0U5/Bz2nJT0PVVE8/bmm/fU99+lOp2vCv8a+AE1UWlRJik G1uKfgyQLa5Qk27S1hWvEvQ7fYZ283dMMHHfNRQkqxGOqdqmvbTt24zMVzlWbRa8 R30srEz6eL7LjLXbA0SzA0685L//83LxkixQWiMy1wzw97SBrYeXKRCR82p4oJa9 MW+BlgW2O0/7doZXB8t74dADAB9V9Ulh3dAGxg89EF9unvfI0ZNweNHB8wdczjoP kkBWBxAz1Lsb8ssCyjD+TUUbLPFNIO5oblUKDLp4g== X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 9925A9E2A4; Sun, 9 Jul 2017 23:58:54 -0400 (EDT) Message-Id: <1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com> From: Paul Rankin To: bug-gnu-emacs@gnu.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-6ef673f5 Subject: 25.2.1; C-g does not quit register-read-with-preview Date: Mon, 10 Jul 2017 13:58:54 +1000 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) When saving to a register C-g does not quit but instead saves to the regist= er "C-g". To reproduce: 1. $ emacs -Q 2. M-x point-to-register [C-x r SPC] 3. C-g Expected results: C-g should call keyboard-quit and escape point-to-register Actual results: Point marker is saved to register "C-g". This runs counter to expected behaviour with both quitting from saving a re= gister, and in quitting from recalling a register, e.g. by attempting to qu= it from saving a point to register in buffer-A with C-g, when the user then= attempts to keyboard-quit from jump-to-register [C-x r j C-g] he/she will = be returned to point in buffer-A. The root of the problem appears to be that register-read-with-preview only = tests input with characterp: (characterp ?^G) -> t This appears to conflict with the Emacs manual entry on registers, which st= ates that registers can be a letters or numbers: > Each register has a name that consists of a single character, which > we will denote by R; R can be a letter (such as =E2=80=98a=E2=80=99) or a= number (such > as =E2=80=981=E2=80=99); case matters, so register =E2=80=98a=E2=80=99 is= not the same as register =E2=80=98A=E2=80=99. (info "(emacs) Registers") I have worked around this with the following patch to register.el.gz: @@ -164,7 +164,7 @@ help-chars) (unless (get-buffer-window buffer) (register-preview buffer 'show-empty))) - (if (characterp last-input-event) last-input-event + (if (< 31 last-input-event 127) last-input-event (error "Non-character input-event"))) (and (timerp timer) (cancel-timer timer)) (let ((w (get-buffer-window buffer))) However, I think this will not work on international keyboards and so is pr= obably a poor fix. Configuration: GNU Emacs 25.2.1 (x86_64-apple-darwin16.6.0, NS appkit-1504.83 Version 10.1= 2.5 (Build 16F73)) of 2017-06-06 macOS 10.12.5 (16F73) MacBook Pro (Retina, 15-inch, Mid 2014) 2.2 GHz Intel Core i7 16 GB 1600 MHz DDR3 Intel Iris Pro 1536 MB -- www.paulwrankin.com From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 10 02:33:55 2017 Received: (at 27634) by debbugs.gnu.org; 10 Jul 2017 06:33:55 +0000 Received: from localhost ([127.0.0.1]:59475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUSGZ-0004h6-7K for submit@debbugs.gnu.org; Mon, 10 Jul 2017 02:33:55 -0400 Received: from mail-pg0-f50.google.com ([74.125.83.50]:36110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUSGX-0004gq-Gg for 27634@debbugs.gnu.org; Mon, 10 Jul 2017 02:33:54 -0400 Received: by mail-pg0-f50.google.com with SMTP id u62so44334096pgb.3 for <27634@debbugs.gnu.org>; Sun, 09 Jul 2017 23:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=io7OCtmr4nHPcoqb4icLTdTzvA263jIE196wg+QFAmM=; b=M0Rjy+KZosACmJsdkt/pAY+aSxtKXqlmRAVOcuvsQVf7tIimDYG3htc9/zVIujEahN /tlGGHmzcc6oZFNfWi7RPRE/B6qFmSDTlArs8prIdLlh0bdRDW+17n2zVWgdWqFJ+lmM S6b8ugvyHbT1EZl+LfNlCZXkbc0DRcR1RXwMvZ1dnpqlCbzaKdRIm+EszurXQz4sybq0 zdyWQ2z+WUyONBxYEvagXtU6Y1WL1MGD0Z6+93EyuN/waKUcfEdouGGqg56xIRN+sW6q crMdIMRdWZ/vcAw8QyXg1hNgQTLWuFuJbD+VjHsyzKjLgPSIF1dy5glczxNTPyHGNt0t NdNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=io7OCtmr4nHPcoqb4icLTdTzvA263jIE196wg+QFAmM=; b=f8XncH5QKN1g2jHNKbW3pQ5QPjTt6go6SA2Hh0Vk6FS9Rsix8tNVXTyem3HCtLWY4g 8OQRJjLRCBNsjgo3kualT6Omqkykxtb0uobnT/2ItJYipCB/sHcBxAkmNec7TFLde/MS 1bd2PAX2LGa77M3DJsZffysvrfyorOmnC4j2VSBavZx2rHVekv2W+J0JNbkcekzrxfym /3i2X8cEDwKumtjpihL8j7dshBz8F/5EEAV1Rxy5J6C5wes09mssrkVI5NyWO6Hgwrxy QAN2MCpBBThPZOR3TEWHG7uUYciVjwCqMrOzM19DPDkdGwPNtN1a5lhwAOK8KdeebCAq vbJw== X-Gm-Message-State: AIVw113Ng5pWpR+FfoyBne2LeEBHtjNDvugXuxYvu1eo9wFjw5VHoTEn k+UFDuWyk2e/0Q== X-Received: by 10.99.143.94 with SMTP id r30mr13132652pgn.102.1499668427224; Sun, 09 Jul 2017 23:33:47 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id c62sm18933701pfb.93.2017.07.09.23.33.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Jul 2017 23:33:46 -0700 (PDT) From: Tino Calancha To: Paul Rankin Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview References: <1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com> Date: Mon, 10 Jul 2017 15:33:42 +0900 In-Reply-To: <1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com> (Paul Rankin's message of "Mon, 10 Jul 2017 13:58:54 +1000") Message-ID: <87h8ykdcmx.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27634 Cc: Eli Zaretskii , 27634@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Paul Rankin writes: > When saving to a register C-g does not quit but instead saves to the register "C-g". > > To reproduce: > > 1. $ emacs -Q > 2. M-x point-to-register [C-x r SPC] > 3. C-g > > Expected results: > > C-g should call keyboard-quit and escape point-to-register > > Actual results: > > Point marker is saved to register "C-g". > I have worked around this with the following patch to register.el.gz: > > @@ -164,7 +164,7 @@ > help-chars) > (unless (get-buffer-window buffer) > (register-preview buffer 'show-empty))) > - (if (characterp last-input-event) last-input-event > + (if (< 31 last-input-event 127) last-input-event > (error "Non-character input-event"))) > (and (timerp timer) (cancel-timer timer)) > (let ((w (get-buffer-window buffer))) > > However, I think this will not work on international keyboards and so is probably a poor fix. How about the following? @@ -164,6 +164,8 @@ register-read-with-preview help-chars) (unless (get-buffer-window buffer) (register-preview buffer 'show-empty))) + (when (eq (string-to-char "\C-g") last-input-event) + (keyboard-quit)) (if (characterp last-input-event) last-input-event (error "Non-character input-event"))) (and (timerp timer) (cancel-timer timer)) --8<-----------------------------cut here---------------start------------->8--- commit 51de600be1351704d4e435a4977d63b3d4e04eaf Author: Tino Calancha Date: Mon Jul 10 15:22:32 2017 +0900 Don't set registers in 'C-g' That key is reserved to abort commands (Bug#27634). * lisp/register-tests.el (register-read-with-preview): Abort when user inputs 'C-g'. * test/lisp/register-tests.el (register-test-bug27634): Add test. diff --git a/lisp/register.el b/lisp/register.el index 7cc3ccd870..19b7dee4b9 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -164,6 +164,8 @@ register-read-with-preview help-chars) (unless (get-buffer-window buffer) (register-preview buffer 'show-empty))) + (when (eq (string-to-char "\C-g") last-input-event) + (keyboard-quit)) (if (characterp last-input-event) last-input-event (error "Non-character input-event"))) (and (timerp timer) (cancel-timer timer)) diff --git a/test/lisp/register-tests.el b/test/lisp/register-tests.el new file mode 100644 index 0000000000..30c1468e25 --- /dev/null +++ b/test/lisp/register-tests.el @@ -0,0 +1,40 @@ +;;; register-tests.el --- tests for electric.el + +;; Copyright (C) 2017 Free Software Foundation, Inc. + +;; Author: Tino Calacha +;; Keywords: + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + + +;;; Code: +(require 'ert) +(require 'cl-lib) + +(ert-deftest register-test-bug27634 () + "Test for http://debbugs.gnu.org/27634 ." + (cl-letf (((symbol-function 'read-key) #'ignore) + (last-input-event 7) + (register-alist nil)) + (should (equal 'quit + (condition-case err + (call-interactively 'point-to-register) + (quit (car err))))) + (should-not register-alist))) + +(provide 'register-tests) +;;; register-tests.el ends here --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-07-10 Repository revision: 273f4bde39af5d87f10fd58f35b666dfa8a996a3 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 10 03:20:58 2017 Received: (at 27634) by debbugs.gnu.org; 10 Jul 2017 07:20:58 +0000 Received: from localhost ([127.0.0.1]:59487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUT06-0005kn-3Q for submit@debbugs.gnu.org; Mon, 10 Jul 2017 03:20:58 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:35965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUT04-0005kf-Ll for 27634@debbugs.gnu.org; Mon, 10 Jul 2017 03:20:57 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 10521206C8; Mon, 10 Jul 2017 03:20:56 -0400 (EDT) Received: from web5 ([10.202.2.215]) by compute3.internal (MEProxy); Mon, 10 Jul 2017 03:20:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulwrankin.com; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=x/F3JwYeMm5cQ05yG UMV2GKIyAERKeJsizpL4NcEHOs=; b=OCi0dNfj6pKiC2YHsdl+7o21Vk8r60hFs uQSIOYuQMGvCv7SIBQRQmygt+GfR5hjivxnvnFsOUEapShKBcwlFo8jTW9UXE6qe 8cEPCKQ198eWWOej/cT8BaVhd9Ex/PsF1gD4+zFGx9UPYrRBpeWd7DZrODWf5R7+ bLWMJ/pWV6mYKiI3SkahHVGX9+lE6c0h6CZl01fnYAYK1S3fYpWqc2Wf/9lwFLnq MHx8vCze+K2sH4dW+FAvedjblm1NnoIKp0T1Q3oD0IzxG3W2XZf+1TzhXVlkvAYc j7MU5f74MyFnKc90/2UgsdVMEvEqozWndjWtDKcAjKfSPRjDf/nAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=x/F3Jw YeMm5cQ05yGUMV2GKIyAERKeJsizpL4NcEHOs=; b=aYhn8qa1cTF4r3SnMuv1wW 8/RLojve47HpYEKZlhMEoUlOulV7fvlUJnDR+8cXTs3IvDSU5TA/mXNdx0vYLcRC ufBiBI0ygYM7usxSUkyzBhufHhcSgK0qT1hEZ52UyIh1ztjxMg1HMD93c7WXOcY1 nsaFk2YvDDaizZsIPjSp5SmI41URjcCzB1MIWxtmx6MUDybTeK+fHVku1lbOUjgA eB6zg7ZZ9eUZzFJnDbIFJTcisp5PT0andt+8+RJ4BHUMpQz5WgDPMwC2ae61/SKC WB2MAbT9c2fah6M9g7e/Q/2c2c5x/UW/dp4rwoNNYuRaR5faFNedTfPMBnFdiZVQ == X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id D28689E2B4; Mon, 10 Jul 2017 03:20:55 -0400 (EDT) Message-Id: <1499671255.3837111.1035640480.1DBD693E@webmail.messagingengine.com> From: Paul Rankin To: Tino Calancha MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-6ef673f5 In-Reply-To: <87h8ykdcmx.fsf@calancha-pc> Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview Date: Mon, 10 Jul 2017 17:20:55 +1000 References: <1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com> <87h8ykdcmx.fsf@calancha-pc> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 27634 Cc: Eli Zaretskii , 27634@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Mon, 10 Jul 2017, at 04:33 PM, Tino Calancha wrote: > How about the following? > > @@ -164,6 +164,8 @@ register-read-with-preview > help-chars) > (unless (get-buffer-window buffer) > (register-preview buffer 'show-empty))) > + (when (eq (string-to-char "\C-g") last-input-event) > + (keyboard-quit)) > (if (characterp last-input-event) last-input-event > (error "Non-character input-event"))) > (and (timerp timer) (cancel-timer timer)) I think that's more a bandaid than fixing the root of the problem, which is that the manual tells the user that register names are alphanumeric characters (and I assume 99% of users only use alphanumeric characters) but the function doesn't test for this. e.g. testing for C-g doesn't catch for ^L or ^M, etc. If we want to be strict about it, this might work: @@ -164,8 +164,8 @@ help-chars) (unless (get-buffer-window buffer) (register-preview buffer 'show-empty))) - (if (characterp last-input-event) last-input-event - (error "Non-character input-event"))) + (if (= (char-syntax last-input-event) 119) last-input-event + (error "Register name must be alphanumeric"))) (and (timerp timer) (cancel-timer timer)) (let ((w (get-buffer-window buffer))) (and (window-live-p w) (delete-window w))) That prohibits anything except "a-zA-Z0-9", although users may want to save registers to "$" or "*". From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 10 03:59:39 2017 Received: (at 27634) by debbugs.gnu.org; 10 Jul 2017 07:59:39 +0000 Received: from localhost ([127.0.0.1]:59527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUTbW-0006dx-TA for submit@debbugs.gnu.org; Mon, 10 Jul 2017 03:59:39 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUTbV-0006dk-D5 for 27634@debbugs.gnu.org; Mon, 10 Jul 2017 03:59:37 -0400 Received: by mail-pf0-f196.google.com with SMTP id q85so13452282pfq.2 for <27634@debbugs.gnu.org>; Mon, 10 Jul 2017 00:59:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=bKnscGFdrG6fEYmXsU1QI8A+WZ+/5eIoitmKFJH4KaI=; b=APTVC+n6Bidmkdf9HgMUraT562uhW6Xii3f83jt97+1pAT2QiVgd4M+4Jb/rW2NuI9 CuhA3SzNANYTcuVYwzXM428pLB0RO5/+oPRASRKXThQRgUoSo3RC0kKZgwsVf5K5eOqf 6BVvbeh15df2tyqwvZQEuDf3nVHuiPRSCxkUQbESXK9r/Nws5SJVxAMDkW4ZrVJOAYhy Wwk+qI0Y5+S3jqC/DubdV99OXakrzm/6jrg2NFbPR8mJdnoT7LHnt8sSUe9fx2zKjIPx FKOrAKbydD4kZV0RpSTWnIbQ5FNpwRdT1X5ynY6s5tm8hVzzOkMcVw1X11gfOpvygfTK DdRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=bKnscGFdrG6fEYmXsU1QI8A+WZ+/5eIoitmKFJH4KaI=; b=E8+dxt8gVdisWAyPJ3Q5s3nM3AMnAAoGc/iwYOHmAgl2SWntnujQ/TDLF6go6l6wf/ vHjUCwrPU+2PlzbwHB6Lejst9XOHzD5jfte/2Vy1s2LltFaFP7UAHzHI8WZkfzqufvKN 8ovOGYagrlAfRv23ZtERz2/6nhW/ptYfFEy6n3GdNW7sbk+/jJmdkS58gHQq72RGIhXi 8TJwekMw3Q4zSuw47LxvfP4fo1ccZqdDdABSbMLEHWAg2aWckAaYQKCyDrTTkIdYKxc9 YJTAzgTszTXSIFxwZX4sjrgUG3k9ysSaC8MWUW9kl/iWt9CUVZUtThPpNqQT4soZVT0I li1w== X-Gm-Message-State: AIVw112FdLYteoiwu3sRTPkMLUKa+u5R1bDPMo57ltv+I7QhjvwdK/ja RFdijalAxZMRTA== X-Received: by 10.84.130.42 with SMTP id 39mr16485785plc.60.1499673571453; Mon, 10 Jul 2017 00:59:31 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id 73sm23706658pfp.103.2017.07.10.00.59.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jul 2017 00:59:30 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Mon, 10 Jul 2017 16:59:26 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Paul Rankin Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview In-Reply-To: <1499671255.3837111.1035640480.1DBD693E@webmail.messagingengine.com> Message-ID: References: <1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com> <87h8ykdcmx.fsf@calancha-pc> <1499671255.3837111.1035640480.1DBD693E@webmail.messagingengine.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 27634 Cc: Eli Zaretskii , 27634@debbugs.gnu.org, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On Mon, 10 Jul 2017, Paul Rankin wrote: > On Mon, 10 Jul 2017, at 04:33 PM, Tino Calancha wrote: >> How about the following? >> >> @@ -164,6 +164,8 @@ register-read-with-preview >> help-chars) >> (unless (get-buffer-window buffer) >> (register-preview buffer 'show-empty))) >> + (when (eq (string-to-char "\C-g") last-input-event) >> + (keyboard-quit)) >> (if (characterp last-input-event) last-input-event >> (error "Non-character input-event"))) >> (and (timerp timer) (cancel-timer timer)) > > I think that's more a bandaid than fixing the root of the problem, which is that the manual tells the user that register names are alphanumeric characters (and I assume 99% of users only use alphanumeric characters) but the function doesn't test for this. e.g. testing for C-g doesn't catch for ^L or ^M, etc. Opps, you are right. > > If we want to be strict about it, this might work: > > @@ -164,8 +164,8 @@ > help-chars) > (unless (get-buffer-window buffer) > (register-preview buffer 'show-empty))) > - (if (characterp last-input-event) last-input-event > - (error "Non-character input-event"))) > + (if (= (char-syntax last-input-event) 119) last-input-event > + (error "Register name must be alphanumeric"))) > (and (timerp timer) (cancel-timer timer)) > (let ((w (get-buffer-window buffer))) > (and (window-live-p w) (delete-window w))) > > That prohibits anything except "a-zA-Z0-9", although users may want to save registers to "$" or "*". I cannot assure that i've never used "@" or "," as a register. Probably i did it several times. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 10 13:06:34 2017 Received: (at 27634) by debbugs.gnu.org; 10 Jul 2017 17:06:34 +0000 Received: from localhost ([127.0.0.1]:32892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUc8n-0005GC-Mg for submit@debbugs.gnu.org; Mon, 10 Jul 2017 13:06:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUc8m-0005Fz-Bt for 27634@debbugs.gnu.org; Mon, 10 Jul 2017 13:06:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUc8g-0006CC-3B for 27634@debbugs.gnu.org; Mon, 10 Jul 2017 13:06:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUc8f-0006C6-W0; Mon, 10 Jul 2017 13:06:26 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4259 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dUc8f-0004WE-9V; Mon, 10 Jul 2017 13:06:25 -0400 Date: Mon, 10 Jul 2017 20:06:21 +0300 Message-Id: <83shi4i5ma.fsf@gnu.org> From: Eli Zaretskii To: Paul Rankin In-reply-to: <1499671255.3837111.1035640480.1DBD693E@webmail.messagingengine.com> (message from Paul Rankin on Mon, 10 Jul 2017 17:20:55 +1000) Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview References: <1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com> <87h8ykdcmx.fsf@calancha-pc> <1499671255.3837111.1035640480.1DBD693E@webmail.messagingengine.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27634 Cc: 27634@debbugs.gnu.org, tino.calancha@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Paul Rankin > Cc: 27634@debbugs.gnu.org, Eli Zaretskii > Date: Mon, 10 Jul 2017 17:20:55 +1000 > > On Mon, 10 Jul 2017, at 04:33 PM, Tino Calancha wrote: > > How about the following? > > > > @@ -164,6 +164,8 @@ register-read-with-preview > > help-chars) > > (unless (get-buffer-window buffer) > > (register-preview buffer 'show-empty))) > > + (when (eq (string-to-char "\C-g") last-input-event) > > + (keyboard-quit)) > > (if (characterp last-input-event) last-input-event > > (error "Non-character input-event"))) > > (and (timerp timer) (cancel-timer timer)) > > I think that's more a bandaid than fixing the root of the problem, which is that the manual tells the user that register names are alphanumeric characters (and I assume 99% of users only use alphanumeric characters) but the function doesn't test for this. e.g. testing for C-g doesn't catch for ^L or ^M, etc. 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. C-g needs indeed to generate keyboard quit, and perhaps ESC ESC as well. I'd look at read-char-choice for inspiration. > If we want to be strict about it, this might work: > > @@ -164,8 +164,8 @@ > help-chars) > (unless (get-buffer-window buffer) > (register-preview buffer 'show-empty))) > - (if (characterp last-input-event) last-input-event > - (error "Non-character input-event"))) > + (if (= (char-syntax last-input-event) 119) last-input-event > + (error "Register name must be alphanumeric"))) > (and (timerp timer) (cancel-timer timer)) > (let ((w (get-buffer-window buffer))) > (and (window-live-p w) (delete-window w))) > > 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? From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 10 15:01:29 2017 Received: (at 27634) by debbugs.gnu.org; 10 Jul 2017 19:01:29 +0000 Received: from localhost ([127.0.0.1]:32980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUdw1-0001O4-AK for submit@debbugs.gnu.org; Mon, 10 Jul 2017 15:01:29 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:37894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUdvz-0001Nv-CF for 27634@debbugs.gnu.org; Mon, 10 Jul 2017 15:01:28 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3x5vh60wMGz1qwRm; Mon, 10 Jul 2017 21:01:25 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3x5vh56SDDz3jgXt; Mon, 10 Jul 2017 21:01:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id CHu1xMe1ReJn; Mon, 10 Jul 2017 21:01:25 +0200 (CEST) X-Auth-Info: 28/ERYdIr9mJk2pxccV69dj9QgRcVLpRUBPoIvU1pIIqDvthwZKtv5vcZKqn2zlJ Received: from igel.home (ppp-88-217-21-192.dynamic.mnet-online.de [88.217.21.192]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 10 Jul 2017 21:01:25 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 8A71D2C4BAA; Mon, 10 Jul 2017 21:01:24 +0200 (CEST) From: Andreas Schwab To: Tino Calancha Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview References: <1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com> <87h8ykdcmx.fsf@calancha-pc> X-Yow: Toes, knees, NIPPLES. Toes, knees, nipples, KNUCKLES... Nipples, dimples, knuckles, NICKLES, wrinkles, pimples!! I don't like FRANK SINATRA or his CHILDREN. Date: Mon, 10 Jul 2017 21:01:24 +0200 In-Reply-To: <87h8ykdcmx.fsf@calancha-pc> (Tino Calancha's message of "Mon, 10 Jul 2017 15:33:42 +0900") Message-ID: <87lgnw9kvv.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 27634 Cc: Paul Rankin , 27634@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Jul 10 2017, Tino Calancha wrote: > + (when (eq (string-to-char "\C-g") last-input-event) ?\C-g Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 11 00:14:24 2017 Received: (at 27634) by debbugs.gnu.org; 11 Jul 2017 04:14:24 +0000 Received: from localhost ([127.0.0.1]:33218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUmZ6-00031Y-7O for submit@debbugs.gnu.org; Tue, 11 Jul 2017 00:14:24 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:46159) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUmZ4-00031R-VV for 27634@debbugs.gnu.org; Tue, 11 Jul 2017 00:14:23 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 6BB9B20B67; Tue, 11 Jul 2017 00:14:22 -0400 (EDT) Received: from web5 ([10.202.2.215]) by compute3.internal (MEProxy); Tue, 11 Jul 2017 00:14:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulwrankin.com; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=JgBBf1gs/myq9Gop2 k7CQuUhkkK+qE0UrbTkiq58vHY=; b=DcO2o6I/7XmXQbC8YrFkerCUfSiw3/sYN Xm4c6+H8Mqo/z2KxRaA4RfJEBi9qZXY/GwfBAGretU2eWP6P2BR7QVqa8+/zocAG q6cgASln9gvCSdrStYcvd0HNBCigvgUoLK1SAHMYaUlmWFb+55Q3/DS2seLIcncn OWawAylpokaxNcrdwuTIZL2TOdqTV+Kl6T7uWqFncnT26hfYIX6xhfD9MlqZiLbH eFeziXhqn/xaBD0D0rIfAeapbb2Pt7JYPIdybs5A7M/1It79mPzgdaPNo0SYn2vP 3UJhXupUqrKt7T953XDjHIR762KSSP9UITjUn/4+XnlQYk1t1ZTVw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=JgBBf1 gs/myq9Gop2k7CQuUhkkK+qE0UrbTkiq58vHY=; b=S3SFblWKnlmgv3qt5h0xta ZcmvBSt3QCGw+BOZ4qOUCVagaRKfd/ZLOOVckionwpDRqkSO6ofaf9l/b20IncuY QeYIA00Ogo1rP37on/2yMc+7JK4egBrUlLa795XhOvTppOXnY0E/XkeUHbx/dCZR SlQvi1QTztfxLfSNgcbB2tZedOflqIHo7y5huN3rjHAaOV7s7U/hOGRfrucjEMnD J7P/+a77l+BtiRmnGTUqptfzMluA0zY5KkWEI/t0nLTQykLbNHZJp8h1me/nbD1m NMvX1qDHu2BG2sG3BM1Vr2jwphXojGQzT+gVHMPXS0jVaPxgwAOBrMLi+CXqlmBg == X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 43B9D9E2A7; Tue, 11 Jul 2017 00:14:22 -0400 (EDT) Message-Id: <1499746462.2451911.1036820704.00105E22@webmail.messagingengine.com> From: Paul Rankin To: Eli Zaretskii MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-6ef673f5 References: <1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com> <87h8ykdcmx.fsf@calancha-pc> <1499671255.3837111.1035640480.1DBD693E@webmail.messagingengine.com> <83shi4i5ma.fsf@gnu.org> Date: Tue, 11 Jul 2017 14:14:22 +1000 Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview In-Reply-To: <83shi4i5ma.fsf@gnu.org> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 27634 Cc: 27634@debbugs.gnu.org, tino.calancha@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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? If no one had reported an issue before now, it doesn't then follow that the issue didn't bother anyone, or, wouldn't have bothered them if they knew about it. 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? > > 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). 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"? From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 11 00:48:14 2017 Received: (at 27634) by debbugs.gnu.org; 11 Jul 2017 04:48:14 +0000 Received: from localhost ([127.0.0.1]:33225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUn5p-0003pp-Tq for submit@debbugs.gnu.org; Tue, 11 Jul 2017 00:48:14 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUn5o-0003pe-V0 for 27634@debbugs.gnu.org; Tue, 11 Jul 2017 00:48:13 -0400 Received: by mail-pf0-f193.google.com with SMTP id e199so17243988pfh.0 for <27634@debbugs.gnu.org>; Mon, 10 Jul 2017 21:48:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=lwgXv7dhPw0BfObSkyy8Q9TkYEp7zs6rrgtQFBVQxQo=; b=KbF6Ghn7Jy+LNboswnmv9z2qUEFzfZdXLIojeksMghAUpHumUq9porYGdAWrYM8lhB x7Dpe0X6Gvudkv4fE6UflgHPt9EXaLcQx9B9NH7ioV3V4AiIEsPscKZxrtr5jQ1L3OTt bSxkWRBrmkfJXhVlaZPElzZFPfKH/PEPs+l5X1GP9611K0R7fn83owGEv2OYObmhmhnk BHWcuJgZCuc3n35+Emy+cjQimMlgHzDLGJ80ZF4rzlkW4xwphRfPMS1jVxgKdPlZ9kcR sN6aJoKrQIk3mQijyMC1NxRNpjMid+GWr1qmg0NP72dpVaE69cFyv4tok8CczHlsn2vi q0MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=lwgXv7dhPw0BfObSkyy8Q9TkYEp7zs6rrgtQFBVQxQo=; b=ZTOPM2yiw3mnZ0a5rpGmcGyFdFPjNc/TAkHXE/PS3wGwE+tDex/pn2GfnKCXCQjkNN gI0ZD6K6v1pNZXZflCVgNayv0+Kgjy6D0gzQlPCM5E+TJM4xUXSu4COcZ2HWIkfIebTF cS6XBAvM95hh0IhTtYXhJPYbGcNvjDEuKS6ol2Kw6YUWsyNbekuPeM6Ditp5n5kYRAa8 GZguB81f9Y0KYZBQRVdCGoEWCBxvI33KGZjaKkcuYoZ4dwNlAEcxA00AEvlxB5bNVfhN MJfra1X78jWjCKEYNWbVAtOO2GX6X2buwMQrM1hf6hZZJKur/k6vlYpz6YMl9D3vuu7L ea7Q== X-Gm-Message-State: AIVw112f4ubRMC/ZBOrc0kl0okNlmoqmQWDWiiRDVM+Q00AzEB+i8pO3 0y5lNDtjgxvsbA== X-Received: by 10.99.116.84 with SMTP id e20mr17996421pgn.225.1499748487294; Mon, 10 Jul 2017 21:48:07 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id x5sm22263615pgq.18.2017.07.10.21.48.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jul 2017 21:48:06 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Tue, 11 Jul 2017 13:48:03 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Paul Rankin Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview In-Reply-To: <1499746462.2451911.1036820704.00105E22@webmail.messagingengine.com> Message-ID: 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> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 27634 Cc: Eli Zaretskii , 27634@debbugs.gnu.org, tino.calancha@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On Tue, 11 Jul 2017, Paul Rankin wrote: > 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"? I thought about that, but i discarded because i think binding something other that `keyboard-quit' to `C-g' is a misuse. The Emacs manual is full of mentions to `C-g' as `keyboard-quit'. There is even the following remark in the tips section: "don't bind a key sequence ending in @key{C-g}, since that is commonly used to cancel a key sequence." If a user want to ignore such kind of advice he/she should not expect everything will work the same. Maybe we can fix this so that `register-read-with-preview' will work with `C-g' bound to `my-cool-foo-command'; but we cannot assure that no other Emacs part is affected because such misguided `C-g' binding. We must encourage users to follow good practices. Sure, it would be great if the entire Emacs code is robust against any kind of user abuse/misuse, but that's not realistic. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 11 01:07:49 2017 Received: (at 27634) by debbugs.gnu.org; 11 Jul 2017 05:07:49 +0000 Received: from localhost ([127.0.0.1]:33241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUnOn-0004OR-Dt for submit@debbugs.gnu.org; Tue, 11 Jul 2017 01:07:49 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:56057) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUnOl-0004OJ-Rs for 27634@debbugs.gnu.org; Tue, 11 Jul 2017 01:07:48 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 761CF206B6; Tue, 11 Jul 2017 01:07:47 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Tue, 11 Jul 2017 01:07:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulwrankin.com; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=nMeyOZ Q31YrC9AZitjL2DOhZZVnNBoIs39/CB2VUnRA=; b=fgfS3Jd7gIy4gHFeny+hfD QK8VfsxUKhIofrV+8mfVTIirjIghRm7DydbL6AMzmEXcO/RUm6zux6rrlMZgGON9 srT2nUP9srksDE5PfdDUMFupGE1dyCrKpKJPPx2culvsXqCNnH38hTs9fbvfJZ00 jCGGgJceV52z7Imvylzh0polb1obuWzDji2LuYwGvRHDJSX+8BopKzSc/THCzx4y P5PgKpr5Gzz35cvFh0ShV2OEDv3PDgdkhVYme4V+U3yUbkRc/D+muJzO32Mk72M2 DW+ujqA8xVnUXX4MZ6LJdYHPQw0F3J8BWxV8ykJ3Popnc+HtnoaQr3IH0sqUqGgA == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=nMeyOZQ31YrC9AZitjL2DOhZZVnNBoIs39/CB2VUnRA=; b=rBza+dTo IHJiXJ51lPkihA4+VQMiqRCwIQ/Pr7VMuILyMh2aNS9rSBqHtNlfJFBqphqNzLuN 6u4pxe0ciQTaRwErS2AOCOkzO++p3lJo7wZHOd/dDcGqGJ27AXcL46LnY9RHwzWQ cfqnH5wZQjFytCemVhialMHMAAe4uB+GOfm5SU9afwjW88Q+/1hbFZa6OqbGIjHV N/A5tc6nzVphInmhuYgYvoof+iJrLnVRpandXrJPZM/s3rRj6ju60CzhfdzEFwOW x1dsvpW0b1K2rBtpQGUS46Se5xTZTne613bhX9i/Qxl2E76jsBEjE6He8Qc+pTZf 555JAiQL6Pqtiw== X-ME-Sender: X-Sasl-enc: 6O8j2MKne1AGbyoOVYawEQDWc2rvsAdLhl9Hq6MWzf/q 1499749666 Received: from [10.177.42.76] (pa49-197-236-169.pa.qld.optusnet.com.au [49.197.236.169]) by mail.messagingengine.com (Postfix) with ESMTPA id E26012424F; Tue, 11 Jul 2017 01:07:46 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview From: Paul Rankin X-Mailer: iPhone Mail (14F89) In-Reply-To: Date: Tue, 11 Jul 2017 15:07:43 +1000 Content-Transfer-Encoding: quoted-printable Message-Id: <3D7307DF-FB47-49FF-AEA9-67659E12821A@paulwrankin.com> 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> To: Tino Calancha X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 27634 Cc: Eli Zaretskii , 27634@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > On 11 Jul 2017, at 2:48 pm, Tino Calancha wrote:= >=20 >=20 >=20 >> On Tue, 11 Jul 2017, Paul Rankin wrote: >>=20 >> 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"? > I thought about that, but i discarded because i think binding something > other that `keyboard-quit' to `C-g' is a misuse. The Emacs manual is full= > of mentions to `C-g' as `keyboard-quit'. > There is even the following remark in the tips section: >=20 > "don't bind a key sequence ending in @key{C-g}, since that > is commonly used to cancel a key sequence." >=20 > If a user want to ignore such kind of advice he/she should > not expect everything will work the same. I'm gonna do this just to mess with you =F0=9F=98=89 > Maybe we can fix this so that `register-read-with-preview' > will work with `C-g' bound to `my-cool-foo-command'; but we > cannot assure that no other Emacs part is affected because such > misguided `C-g' binding. We must encourage users to follow > good practices. While I think encouragement and enforcement are different things, the point a= bout C-g is more what if the user *also* binds keyboard-quit to "7". In this= case the user expects 7 to call keyboard-quit, not just C-g. Also as Eli said ESC ESC is supposed to keyboard quit I think. But main thing, as in life, better to look for what what you want than contr= ol for what you don't want.= From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 11 01:50:33 2017 Received: (at 27634) by debbugs.gnu.org; 11 Jul 2017 05:50:33 +0000 Received: from localhost ([127.0.0.1]:33266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUo49-0005Uh-4j for submit@debbugs.gnu.org; Tue, 11 Jul 2017 01:50:33 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUo47-0005UT-Ic for 27634@debbugs.gnu.org; Tue, 11 Jul 2017 01:50:32 -0400 Received: by mail-pg0-f65.google.com with SMTP id y129so582939pgy.3 for <27634@debbugs.gnu.org>; Mon, 10 Jul 2017 22:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=nj1+poOzQ9A6euf6WAVC6RisVCjeFhMmzJ7KmlbNYyQ=; b=Gexb2AmFf4IjOlWnGCf/8DsO0sNoF+TvMyxGJ309qa9Obc1K5xui5g0drV3hur0Ih0 6tsO6kA88O2diK5IyEWTXGq7NQEAXIWr8Gu1/Qwtlyjz4zG36qqlfvIWZwYB6yI/Biso 82fLCCx74KUsdZz7haY6y5qbaUIwRBcGM5gVUj39KMNLwvwD0TlbFbYTr3s9SYX7J5ES oZZ8RwXBso4oBw5w4gtC76B97Mp7+E01YAJfIuqBWylxWsRw2MCCiD2CXopmA15dCWAT Zl0TA5GTJZk18vNsSC0f/ABd46zV0pbhU8Ni5kNQeOSlF2FHuEQuAI3RG84PiQNy5oj9 iJxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=nj1+poOzQ9A6euf6WAVC6RisVCjeFhMmzJ7KmlbNYyQ=; b=unFnbDZSJfyCt41wmZaTIwjWhcRmsxskGHYAgb/E3EeQNeG2XsrfwZLyrhu3vWQ2RE wwAQl/sF3F/Dpldci9RUoDXtJfgUzdxiCFcDS2DYBNQ2WjbIuAi/9qhXiBzyj9ktp+c1 /aWLhCU6Un7FULOb2my6iZ1tGvnXCO3547YXfZFdBmMdowIRtzu8/cVRrLluikFHWKuQ VhpnwMi9FzpCPGGPNj7nPwk12xzioX3Jn/Snf4V141qKHI0OlWj8OpLGao4CEm859mCn FwUdh52WwIAd9bbRtsdcxvPjoM8EUKmAUf37+ywMpyaQFKAc02IvLOetBosyVOxzw6ho 8pyA== X-Gm-Message-State: AIVw113CPKQ5obBrJH3+fMT7szoZp4utp+XRMwIWqrjb9+ah9k5qNIgH 3Hz6qTVGgjr9hg== X-Received: by 10.84.157.74 with SMTP id u10mr21951511plu.137.1499752225533; Mon, 10 Jul 2017 22:50:25 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id p15sm28260271pfi.99.2017.07.10.22.50.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jul 2017 22:50:24 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Tue, 11 Jul 2017 14:50:21 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Paul Rankin Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview In-Reply-To: <3D7307DF-FB47-49FF-AEA9-67659E12821A@paulwrankin.com> Message-ID: 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> <3D7307DF-FB47-49FF-AEA9-67659E12821A@paulwrankin.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-2139224032-1499752224=:16870" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 27634 Cc: Eli Zaretskii , 27634@debbugs.gnu.org, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --8323329-2139224032-1499752224=:16870 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Tue, 11 Jul 2017, Paul Rankin wrote: >>> >>> 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"? >> I thought about that, but i discarded because i think binding something >> other that `keyboard-quit' to `C-g' is a misuse. The Emacs manual is full >> of mentions to `C-g' as `keyboard-quit'. >> There is even the following remark in the tips section: >> >> "don't bind a key sequence ending in @key{C-g}, since that >> is commonly used to cancel a key sequence." >> >> If a user want to ignore such kind of advice he/she should >> not expect everything will work the same. > > I'm gonna do this just to mess with you 😉 Thank you. Actually i feel quite boring now, so it's OK :-) >> Maybe we can fix this so that `register-read-with-preview' >> will work with `C-g' bound to `my-cool-foo-command'; but we >> cannot assure that no other Emacs part is affected because such >> misguided `C-g' binding. We must encourage users to follow >> good practices. > >the point about C-g is more what if the user *also* binds keyboard-quit >to "7". In this case the user expects 7 to call keyboard-quit, not just >C-g. I see. Good point! Paul, what do you think about this? --- a/lisp/register.el +++ b/lisp/register.el @@ -164,6 +164,9 @@ register-read-with-preview help-chars) (unless (get-buffer-window buffer) (register-preview buffer 'show-empty))) + (when (and (characterp last-input-event) + (eq 'keyboard-quit (key-binding (string last-input-event)))) + (keyboard-quit)) (if (characterp last-input-event) last-input-event (error "Non-character input-event"))) I) Note, that my patch won't work in case our fearless user bind "7" to ...: (lambda () (message "What the hell are you doing?") (keyboard-quit)) ... But i don't think we must protect about things like I). --8323329-2139224032-1499752224=:16870-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 11 03:20:16 2017 Received: (at 27634) by debbugs.gnu.org; 11 Jul 2017 07:20:16 +0000 Received: from localhost ([127.0.0.1]:33296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUpSy-0007Vt-IC for submit@debbugs.gnu.org; Tue, 11 Jul 2017 03:20:16 -0400 Received: from mx2.suse.de ([195.135.220.15]:37923 helo=mx1.suse.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUpSw-0007Vk-Es for 27634@debbugs.gnu.org; Tue, 11 Jul 2017 03:20:14 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 18352AB9D; Tue, 11 Jul 2017 07:20:13 +0000 (UTC) From: Andreas Schwab To: Tino Calancha Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview 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> <3D7307DF-FB47-49FF-AEA9-67659E12821A@paulwrankin.com> X-Yow: My CODE of ETHICS is vacationing at famed SCHROON LAKE in upstate New York!! Date: Tue, 11 Jul 2017 09:20:12 +0200 In-Reply-To: (Tino Calancha's message of "Tue, 11 Jul 2017 14:50:21 +0900 (JST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 27634 Cc: Paul Rankin , 27634@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On Jul 11 2017, Tino Calancha wrote: >> the point about C-g is more what if the user *also* binds keyboard-quit >> to "7". In this case the user expects 7 to call keyboard-quit, not just >> C-g. For quit it is irrelevant which key is bound to keyboard-quit, only the quit char it used. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 11 10:36:32 2017 Received: (at 27634) by debbugs.gnu.org; 11 Jul 2017 14:36:32 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 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 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 Date: Tue, 11 Jul 2017 17:36:09 +0300 Message-Id: <83a84bjb1i.fsf@gnu.org> From: Eli Zaretskii To: Paul Rankin In-reply-to: <1499746462.2451911.1036820704.00105E22@webmail.messagingengine.com> (message from Paul Rankin on Tue, 11 Jul 2017 14:14:22 +1000) Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview 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> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27634 Cc: 27634@debbugs.gnu.org, tino.calancha@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 11 22:12:30 2017 Received: (at 27634) by debbugs.gnu.org; 12 Jul 2017 02:12:30 +0000 Received: from localhost ([127.0.0.1]:34524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dV78g-0003m2-DZ for submit@debbugs.gnu.org; Tue, 11 Jul 2017 22:12:30 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:49025) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dV78e-0003lu-MQ for 27634@debbugs.gnu.org; Tue, 11 Jul 2017 22:12:29 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 3065220B42; Tue, 11 Jul 2017 22:12:28 -0400 (EDT) Received: from web5 ([10.202.2.215]) by compute3.internal (MEProxy); Tue, 11 Jul 2017 22:12:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulwrankin.com; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=BfK5UUmkjlWKWwLGY yoKU2BiArM+w/5HIzZncUxuaXI=; b=k3j0pwTdCkQhp1yCxueYvz1vXvzM73hsE 189sZSyrOTVsZQLMhz4ovit0WvOzujCTPolQ72JU3zJH2+8dQ3KnS15NobGSmwPL Xy9KadDKTB2446EWAvQRFg/xTHtoa2J8BFjE7m6viubm9x7TPwQUtyOthaV7Eg9u r8dAinPSja5e8AbjxraybNYBpStLinj2OuYFSEeHmraX+4/FXvvpRxGXfcNM24As me42AatFdhyA7UuJNtJqg5k32ZvVGxQyoSvRPkFiB5maCtqgHShPjexsmu4lX5eb wGxhnVtQ9wD6XgiaoHHOE99MCFDgQ3bKv2C9Esw92V/jQ6iDkZTyQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=BfK5UU mkjlWKWwLGYyoKU2BiArM+w/5HIzZncUxuaXI=; b=nas11KVuu7DgquRk/IUzRg x66GI5Jw/+V8d3rOOmIFql9QBP3APlRHRjlkuE9GxdT7B/UoYwQPzQJKfuqk+mbN 4u2dqZx2xokmn5l/vdFYy8cIRo1SpyT6L2ZxnLNBg5vcu+jJv7gscr4h2VQ6kwX8 o+sVhZlSUMwVMCjOZU7fgPLRhE1Rc6zSRm1xIsw9Vk1Vc7ZEwNltTruUky4N58tt dVWQWvjK4v6RoEZrwvWh2zKGO85kk9icv0MPJI7nlrKN3pBhw23PEdcPTHN+nuyc DGfWZmWZbo3/WBLLNwD0TGHu/xqDvVhfIzhgpXDVnmh73E/sCgcAPEoIlhMeWfqA == X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id E82B39E1FD; Tue, 11 Jul 2017 22:12:27 -0400 (EDT) Message-Id: <1499825547.1062546.1038009976.1AADC27F@webmail.messagingengine.com> From: Paul Rankin To: Eli Zaretskii MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-68d1e0b4 Date: Wed, 12 Jul 2017 12:12:27 +1000 Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview 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> <83a84bjb1i.fsf@gnu.org> In-Reply-To: <83a84bjb1i.fsf@gnu.org> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 27634 Cc: 27634@debbugs.gnu.org, tino.calancha@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Wed, 12 Jul 2017, at 12:36 AM, Eli Zaretskii wrote: > 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. >=20 > > One overlooked thing about Tino's solution is that C-g is a keystroke a= nd keyboard-quit is a function, which obviously aren't necessarily equivale= nt. What if the user remaps keyboard quit to "7"? >=20 > 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. Looks like you guys have this under control =F0=9F=91=8D From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 20 23:47:42 2017 Received: (at submit) by debbugs.gnu.org; 21 Jul 2017 03:47:42 +0000 Received: from localhost ([127.0.0.1]:50232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYOuk-0004J0-7v for submit@debbugs.gnu.org; Thu, 20 Jul 2017 23:47:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYOui-0004Io-Uf for submit@debbugs.gnu.org; Thu, 20 Jul 2017 23:47:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYOuc-00028Z-UG for submit@debbugs.gnu.org; Thu, 20 Jul 2017 23:47:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46140) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dYOuc-00028T-QJ for submit@debbugs.gnu.org; Thu, 20 Jul 2017 23:47:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYOub-00041b-Oy for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 23:47:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYOub-00027k-2k for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 23:47:33 -0400 Received: from mail-qt0-x22d.google.com ([2607:f8b0:400d:c0d::22d]:33342) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dYOua-00027U-UY for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 23:47:33 -0400 Received: by mail-qt0-x22d.google.com with SMTP id n42so34997642qtn.0 for ; Thu, 20 Jul 2017 20:47:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=7U604SIGUYE+RP3j3ZPvg+WMSTPFmuc+oD5CHDhmLiw=; b=dR1qWZd1dM9xEgnUJ7qoqfQ0xKQFT9frAfRmo4RSqnh5o9ZSfbtEib+NWjCorj7nBT LdrssSZ0R7bC1pxbIv5PLxiEynbh/PLIX1uYf5ICtGso+tNWIS2CJqT39QWiJA7bcRV4 7Ud9NMVRAyW6JKYF+eHS0MjeOQgSQo4TNABvLVnTAgsPJo3vH7sX/tchqfFAWnbyQEhu 0HOd1GUZGuU1sb8LTlpO4xddQXwYA154zgNEQsNvbex80bFWKl6lB/LKZskwR1SJP/VX ZFRW5XHB202LHR7tQBvK2zqcPgyc0cJAV+a/AU8schC5PLFbXIhlZUVfN2YeufVS8iYv hSiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=7U604SIGUYE+RP3j3ZPvg+WMSTPFmuc+oD5CHDhmLiw=; b=Ko0u5q6UUDENAP21Ii6DNK/dE9FoIyUWPGMmLjPETK7SwREHnPqVaEM+jOlG2s/Zry olepIxqfxtCMbk3wonz8r+LgHwfg1poLljZUKTX++ZlfnojEq9Jv/+jvoij/YuM0seX+ s/eSm43HimKJRPampQQRCuVPHPoArpDklQCyDWIGW/BiPS7Slo79KwfBwsPEZY3X2ird rQ0ihXOnqENB73Y4kZsRH9UdwJ/FXVja3fCDY6HB8zoTBUIGnShvji4YrOn0jLlrm1Cj CMTehefPZhTsXRVxV5oFr0+MhP/UPQsc5mTHQkcEDR4KJcP1yItyVVcPVTgrxkIxiVbD QsJw== X-Gm-Message-State: AIVw1111NWvshvewD+7kyHaJb/qZkHSJB9C/4ReNnLJg6Eek0J9fo0dY 0m583SUoq4Ua77g11XMYnMJDT+C2+A== X-Received: by 10.237.40.69 with SMTP id r63mr8150521qtd.72.1500608852370; Thu, 20 Jul 2017 20:47:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.142.67 with HTTP; Thu, 20 Jul 2017 20:47:32 -0700 (PDT) From: Allen Li Date: Thu, 20 Jul 2017 20:47:32 -0700 Message-ID: Subject: bug#27634: 25.2.1; C-g does not quit register-read-with-preview To: tino.calancha@gmail.com Content-Type: multipart/alternative; boundary="94eb2c064a6897a88b0554cbb9e8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --94eb2c064a6897a88b0554cbb9e8 Content-Type: text/plain; charset="UTF-8" It sounds like there's a general consensus on how to fix this. Tino, would you care to post a finalized patch? Note: bug#25370 is a duplicate of this, it should probably be marked closed, wontfix, etc. --94eb2c064a6897a88b0554cbb9e8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It sounds like there's a general consensus on how= to fix this.=C2=A0 Tino, would you care to post a finalized patch?

Note:=C2=A0bug#25370 is a dup= licate of this, it should probably be marked closed, wontfix, etc. --94eb2c064a6897a88b0554cbb9e8-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 21 01:13:27 2017 Received: (at control) by debbugs.gnu.org; 21 Jul 2017 05:13:28 +0000 Received: from localhost ([127.0.0.1]:50267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYQFj-0006LK-PU for submit@debbugs.gnu.org; Fri, 21 Jul 2017 01:13:27 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:37584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYQFh-0006L4-F5 for control@debbugs.gnu.org; Fri, 21 Jul 2017 01:13:25 -0400 Received: by mail-pg0-f67.google.com with SMTP id t8so4476143pgs.4 for ; Thu, 20 Jul 2017 22:13:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:from:subject; bh=inRstheLM+QIZJmZTEnE6JM6NCx7dsYd7w19HLMBgRM=; b=MlXYBaD/vipzAVnn0RhYb/LpaUDqqHVyu9FEcjumz8YAR/zHAe3D9yuTw26rFRTUFk XGDY4auI8O8CZ72UTp79obP2x4+0sWGz06oXldrJJphDgPEV9T3ZqXhhJf3+wLzrNUYe quJvRV14bLVFbBX4gBQaG/Pg5orsCwv3FTwWVZCXTqF8m6JLDr+JyfuVvUowRiIMMMV/ SAJnHd4xQPhwt/bhAlomyJhFsZ8F6zecro+Fj7XIsCLJlrl2QMi/L75TOsKCiTTcTu1l e+A0M+h2/x/kBd07bvlNH1HnCMGxXceMk9JJXW5tYCQqjsve9tIFvnNVZtpyBJXB986n 9BeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:from:subject; bh=inRstheLM+QIZJmZTEnE6JM6NCx7dsYd7w19HLMBgRM=; b=kcVMe2Xvh+LOZYdxmgDK5QCiDsq9kJLxB6YWF6fiOfFm+AcWb7xbzbrA7iga1zIZJu Z/lRYLM20+0+3G5YWWBEQacMLiCdc4617pgmXOatO10Kaj/Pb6MGwNuOdxAiYpJIeuun c4rqErJ/kK9SR6foaxzTnrx0zu8ZU2MtXHdytbJcO+0pZAZA5ZdWqE6iR6sSbYXbZCUt +LyUclNf+Yr5Mlm1O0AjZ8wkZxYOXk80zes5a7kEWOt6oIKImFinAsJ1JIiJ+ggNO+y0 8kssMrcnwIQsxQIwg1lQz0dkU/AYXF7vhRf+a5f/9mJxwQ6dBc/MBLnhM7h3tpKFLzMi zVKA== X-Gm-Message-State: AIVw113Wh/tQpI7RoYz6WXUzGZLKNRSAkjc5+QBnZkIbuTeW8U0KSgIj HLhL7JDoZVK5zaPe X-Received: by 10.84.232.76 with SMTP id f12mr6712552pln.249.1500613999380; Thu, 20 Jul 2017 22:13:19 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id 83sm6863086pfa.113.2017.07.20.22.13.18 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Jul 2017 22:13:18 -0700 (PDT) Date: Fri, 21 Jul 2017 14:13:03 +0900 Message-Id: <87mv7yfk4g.fsf@calancha-pc> To: control@debbugs.gnu.org From: Tino Calancha Subject: control message for bug #27634 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) forcemerge 27634 25370 From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 21 02:19:15 2017 Received: (at 27634) by debbugs.gnu.org; 21 Jul 2017 06:19:15 +0000 Received: from localhost ([127.0.0.1]:50308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYRHP-0001J2-4l for submit@debbugs.gnu.org; Fri, 21 Jul 2017 02:19:15 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYRHN-0001Ip-P3 for 27634@debbugs.gnu.org; Fri, 21 Jul 2017 02:19:14 -0400 Received: by mail-pg0-f68.google.com with SMTP id y129so4601806pgy.3 for <27634@debbugs.gnu.org>; Thu, 20 Jul 2017 23:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=alKzk/fwjwZnOHBvr9Y7/SUnkGU7FwXJIPth/B30hqA=; b=Ey33u9IC/COs/ujrcNuUZYhjJ/m+ziGaWLnVTQKkVU55ZktMh94t4zgnZRovF3k94S Dj2WLxQIkhvKJQvz1BmvKo06GGW2/jaufsZHU2eVCAgCEkuo6SmllKlepg5eRgJyj44e 7+iIUxkXGStiBXWFJHefSvjJy5hajQb71iURhrT8/n0S6zumx+jLFhDTBdv6d3m0qc0l VfuA932WWbTRHbfGypPPa2S2qrHtZwr97r+bOqyUWybf+D9kL8jAsF4oWXiAqMSiJduL diaqLxeGdMwEnt3xXY34UZKj4EF/jaiO5a5jtUdkfq2cF8yHUr4GFHG8HaL7Pt9u0Cae JQ2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=alKzk/fwjwZnOHBvr9Y7/SUnkGU7FwXJIPth/B30hqA=; b=UajTgU1wbEODPs3OCxAom2OszynDuEUzBxTFvtiRrtf9N4UxIpuea9+WBrvoNGRsTP 2bvdfYaMEC0q3SgrvEMPElJXIi+3GHe1b23iXoOo+rqKvJGk7EEYs2jnDPOg4oLMYURo tXhY4cNyc7IjWGJhsMt8BTFN2Gg2UPJThACe8tn52KoH0BuKl2E8BJMoUNNyxfQwt5Nc Mnry4JxI9bAbtmVIDrcobkpDu2llcX/o/IByrOtPOzjARQAUhu+qbYf9W46UEiG3L6Vv IurM3YzOrB5VnzFQJfpLDBn32r3eDVfdOPQGe9nT1/lzgLmSDIiN4jRgjQYm7WNh+kj2 4ylA== X-Gm-Message-State: AIVw110eoD6EKBlyFLSytX/tZ7NVp85GdqjbpI3LoZhjskSLdmonNrsm dEBLTE5Y+6W4Gw== X-Received: by 10.98.13.28 with SMTP id v28mr6433520pfi.249.1500617947799; Thu, 20 Jul 2017 23:19:07 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id d29sm7878639pfb.11.2017.07.20.23.19.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Jul 2017 23:19:07 -0700 (PDT) From: Tino Calancha To: Allen Li Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview References: <1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com> Date: Fri, 21 Jul 2017 15:19:03 +0900 In-Reply-To: (Allen Li's message of "Thu, 20 Jul 2017 20:47:32 -0700") Message-ID: <87h8y6fh2g.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 27634 Cc: Andreas Schwab , Paul Rankin , Tino Calancha , Eli Zaretskii , 27634@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Allen Li writes: > It sounds like there's a general consensus on how to fix this. Tino, would you care to post a finalized patch? OK. > Note: bug#25370 is a duplicate of this, it should probably be marked closed, wontfix, etc. Thanks, i merged this thread with your bug report. Let's discuss following patch: *) Call `keyboard-quit' whenever last-input-event is ?\C-g or 'escape or ?\C-\[. **) Updated the manual to point out that non-alphanumeric keys are valid to store registers as well. Let me know if that is OK or if we need a fine-grained control. --8<-----------------------------cut here---------------start------------->8--- commit 484faa217fe5a76d12ce266bc3f84737da73f0ae Author: Tino Calancha Date: Fri Jul 21 15:08:06 2017 +0900 register-read-with-preview: Quit if user input C-g or ESC * lisp/register.el (register-read-with-preview): Quit if user input C-g or ESC (bug#27634). * doc/emacs/regs.texi (Registers): Update manual. diff --git a/doc/emacs/regs.texi b/doc/emacs/regs.texi index 7369f6b05b..40e3e2c1c3 100644 --- a/doc/emacs/regs.texi +++ b/doc/emacs/regs.texi @@ -15,7 +15,10 @@ Registers Each register has a name that consists of a single character, which we will denote by @var{r}; @var{r} can be a letter (such as @samp{a}) or a number (such as @samp{1}); case matters, so register @samp{a} is -not the same as register @samp{A}. +not the same as register @samp{A}. You can also set a register in +non-alphanumeric characters, for instance @samp{*} or @samp{C-d}. +Note, it's not possible to set a register in @samp{C-g} or @samp{ESC}, +because these keys are reserved to terminate interactive commands. @findex view-register A register can store a position, a piece of text, a rectangle, a diff --git a/lisp/register.el b/lisp/register.el index 7cc3ccd870..e395963f56 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -164,6 +164,10 @@ register-read-with-preview help-chars) (unless (get-buffer-window buffer) (register-preview buffer 'show-empty))) + (when (or (eq ?\C-g last-input-event) + (eq 'escape last-input-event) + (eq ?\C-\[ last-input-event)) + (keyboard-quit)) (if (characterp last-input-event) last-input-event (error "Non-character input-event"))) (and (timerp timer) (cancel-timer timer)) --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-07-21 Repository revision: 1d559e384b467b3f74e8b78695f124b561c884d9 From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 21 04:40:48 2017 Received: (at 27634) by debbugs.gnu.org; 21 Jul 2017 08:40:48 +0000 Received: from localhost ([127.0.0.1]:50348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYTUO-0004dE-5H for submit@debbugs.gnu.org; Fri, 21 Jul 2017 04:40:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYTUM-0004d1-TX for 27634@debbugs.gnu.org; Fri, 21 Jul 2017 04:40:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYTUG-00085C-T4 for 27634@debbugs.gnu.org; Fri, 21 Jul 2017 04:40:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYTU8-0007zY-58; Fri, 21 Jul 2017 04:40:32 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1850 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dYTU7-0003QZ-Ee; Fri, 21 Jul 2017 04:40:31 -0400 Date: Fri, 21 Jul 2017 11:40:23 +0300 Message-Id: <83shhq9o94.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-reply-to: <87h8y6fh2g.fsf@calancha-pc> (message from Tino Calancha on Fri, 21 Jul 2017 15:19:03 +0900) Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview References: <1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com> <87h8y6fh2g.fsf@calancha-pc> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27634 Cc: vianchielfaura@gmail.com, hello@paulwrankin.com, schwab@suse.de, 27634@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Tino Calancha > Cc: 27634@debbugs.gnu.org, Paul Rankin , Andreas Schwab , Eli Zaretskii , Tino Calancha > Date: Fri, 21 Jul 2017 15:19:03 +0900 > > Allen Li writes: > > > It sounds like there's a general consensus on how to fix this. Tino, would you care to post a finalized patch? > OK. > > Note: bug#25370 is a duplicate of this, it should probably be marked closed, wontfix, etc. > Thanks, i merged this thread with your bug report. > > Let's discuss following patch: > > *) Call `keyboard-quit' whenever last-input-event is > ?\C-g or 'escape or ?\C-\[. > > **) Updated the manual to point out that non-alphanumeric > keys are valid to store registers as well. Looks good, thanks. (I didn't test the code, but I assume you did.) From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 21 04:55:28 2017 Received: (at 27634) by debbugs.gnu.org; 21 Jul 2017 08:55:28 +0000 Received: from localhost ([127.0.0.1]:50354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYTia-0004xc-G7 for submit@debbugs.gnu.org; Fri, 21 Jul 2017 04:55:28 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:38191) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYTiY-0004xO-Vn for 27634@debbugs.gnu.org; Fri, 21 Jul 2017 04:55:27 -0400 Received: by mail-pf0-f195.google.com with SMTP id c23so4370822pfe.5 for <27634@debbugs.gnu.org>; Fri, 21 Jul 2017 01:55:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=tF3UJPKA3wX4uSnAGS1UYx8fAxAe0yIy6X0zzNeWdLk=; b=gnn5klo3lVdfmtqBOPpBGR+YUBo4gn9R8J2P5VS3SsMDoDEFylXabMGj7Cwo2EdUJz i5ByK5QhO8Ro3DmjTyE25BarZzzNMWJ0F4PYGoRASvDZGrbV4HfqXL4dmHAcmYt0zynU 36j12ZVbD+ZjiagJr/KTWV67SdG8k3HofbhDY3w1NShLI3f8OjI+zffC+addBIn31/oN NEi0M0XPxJF6sOXRh6DHg8Ds7WfhUuOy2+5nzvqvVz77NbviVR7hsmbI3Iv7AkHo1EfY cK+cMztuyV4wh6PjG+x+NLV1RzdwQHT8nu//V+NLpxh49tEXBOanhOl1VQ0Q5F0/vpzj dRgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=tF3UJPKA3wX4uSnAGS1UYx8fAxAe0yIy6X0zzNeWdLk=; b=PxaG/RfK2IhkrCbqYbB8k834nQxBh2yxc93KYhAc8Y7Ci8IU+VJRrEHPeQHJYWFB+7 p3FPQ6jcAVbEHJ8Z43+jHv6SMi9BtjnZInwCS7QiRpX3h9sSpcGpwrh0BUyIWKYdbHM/ SwPlqaPGPpRtbjvYkmG9LB4z7cbIThh3B+MD8mD7gewhEkcXok1Jrk4+Y/sucFKLp8CT e+j0uxBhlR3OKrSc2RDbpx/QBX4Q9FRI8QzE9VrDEaD+br+ZznA7xxeI/DzpTTH9V415 mbYPbfAw/D1SlGIgqEkoP+sVXrBeZGdZHX/BZuG00gsNO9xhUc8c28hyX1+ZU5cDv4Hn YZlw== X-Gm-Message-State: AIVw111DAtKpZ9R7rYrt00wooUpSh8d6BC+lZ3d2ESX2OlPc9W8uViL7 qd6e6pxsOhDhlQ== X-Received: by 10.98.24.202 with SMTP id 193mr6750465pfy.304.1500627320938; Fri, 21 Jul 2017 01:55:20 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id m18sm7633998pfe.126.2017.07.21.01.55.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Jul 2017 01:55:20 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Fri, 21 Jul 2017 17:55:17 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Eli Zaretskii Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview In-Reply-To: <83shhq9o94.fsf@gnu.org> Message-ID: References: <1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com> <87h8y6fh2g.fsf@calancha-pc> <83shhq9o94.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 27634 Cc: vianchielfaura@gmail.com, hello@paulwrankin.com, 27634@debbugs.gnu.org, schwab@suse.de, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On Fri, 21 Jul 2017, Eli Zaretskii wrote: >> Let's discuss following patch: >> >> *) Call `keyboard-quit' whenever last-input-event is >> ?\C-g or 'escape or ?\C-\[. >> >> **) Updated the manual to point out that non-alphanumeric >> keys are valid to store registers as well. > > Looks good, thanks. (I didn't test the code, but I assume you did.) Yes i tested it. Thank you. I will push it next week if i don't get more communications. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 24 22:45:24 2017 Received: (at 27634-done) by debbugs.gnu.org; 25 Jul 2017 02:45:24 +0000 Received: from localhost ([127.0.0.1]:54904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dZpqe-00030P-EX for submit@debbugs.gnu.org; Mon, 24 Jul 2017 22:45:24 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:35725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dZpqd-00030A-5X for 27634-done@debbugs.gnu.org; Mon, 24 Jul 2017 22:45:23 -0400 Received: by mail-pf0-f174.google.com with SMTP id h29so18652362pfd.2 for <27634-done@debbugs.gnu.org>; Mon, 24 Jul 2017 19:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=CeEwccX8IdnpfA82UYKjJm7T9WsTsTSjwTdWuTZV7fY=; b=qP0bbesbvZLhyLVGrh7Tc6JPRg7ULhusTBoH5PgmC1r8wfUVDd4KwBtDSxGh2j3BUk QRJdwauofX1jgZU20X4AQPxB3MmfJyWcbJg2n9Bw3xCQo0SDnIXrSRUrS66lZByhWQnV vklYEJgVtgWHKLYj/VCAvoG6Vf5SycgNYVY5SK9k56foIqklsnUEJr+u6Sa54k0ncJ1B C0tHw4lWQ9EQjd7RJRflqj73JDO7OS9GLOswP8fxV5rtWaOR1uHnVUqu2CfgcXrGLHBS v7bX5f9IgmdLHeFsfmqq+8Nzlp5IIfZ/H88yHFBRd5ARV+Y2wuJf/HcUxYjj6DUGwoS7 Wp8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=CeEwccX8IdnpfA82UYKjJm7T9WsTsTSjwTdWuTZV7fY=; b=GLR2NYzsD4JBBKGHMJUIHJJioWtF4cHFXpC3nAIUecXTm6sU2+vkmGLQ7CCT7P5dZF 5984+Rg8DPuS6MfMCG5W6WnMPcSKUhGf/W0B9+w/ON34c/0e+ZKDoqtyYyQrV9IgIhpn 38AEJE3EuUjc4wA/TbC6/c+rkLSORKmAXSg54JPKQBC01vsPvcHNP9y+uw7vvOvT/kGu kgwfskVN553Znj6mjuBE4rgXf7qvZNIHX1kkfq5/mgwxEM9bTA5Pnu/uDSbFXekAYxp1 veM6v4Ff3ehmEZQS4MyGjb7KtFS00wamFYCzMXAUuU5ndqBS7F99ewWdgfTnXObS0CTf eJNA== X-Gm-Message-State: AIVw111+/RTIqnPSyhQ0oiKn0hdRSE92iUsclXWiaOsL8U7c6MByp0U+ KhGUc+8lUXDP/XAP X-Received: by 10.101.88.8 with SMTP id g8mr17966873pgr.137.1500950717014; Mon, 24 Jul 2017 19:45:17 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id i131sm26841001pgd.25.2017.07.24.19.45.14 for <27634-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Jul 2017 19:45:15 -0700 (PDT) From: Tino Calancha To: 27634-done@debbugs.gnu.org Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview References: <1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com> <87h8y6fh2g.fsf@calancha-pc> <83shhq9o94.fsf@gnu.org> Date: Tue, 25 Jul 2017 11:45:11 +0900 In-Reply-To: (Tino Calancha's message of "Fri, 21 Jul 2017 17:55:17 +0900 (JST)") Message-ID: <87shhlfd54.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 27634-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Tino Calancha writes: > On Fri, 21 Jul 2017, Eli Zaretskii wrote: > >> Looks good, thanks. (I didn't test the code, but I assume you did.) > Yes i tested it. > Thank you. I will push it next week if i don't get more communications. Fixed in master branch as commit 35954cb92b8cd4ad093756d171688343bab02c2e From unknown Sun Aug 10 10:55:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 22 Aug 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator