From: Paul Rankin <hello@paulwrankin.com>
To: 27634@debbugs.gnu.org
Subject: bug#27634: 25.2.1; C-g does not quit register-read-with-preview
Date: Mon, 10 Jul 2017 13:58:54 +1000 [thread overview]
Message-ID: <1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com> (raw)
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".
This runs counter to expected behaviour with both quitting from saving a register, and in quitting from recalling a register, e.g. by attempting to quit 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 states 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 ‘a’) or a number (such
> as ‘1’); case matters, so register ‘a’ is not the same as register ‘A’.
(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 probably a poor fix.
Configuration:
GNU Emacs 25.2.1 (x86_64-apple-darwin16.6.0, NS appkit-1504.83 Version 10.12.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
next reply other threads:[~2017-07-10 3:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-10 3:58 Paul Rankin [this message]
2017-07-10 6:33 ` bug#27634: 25.2.1; C-g does not quit register-read-with-preview Tino Calancha
2017-07-10 7:20 ` Paul Rankin
2017-07-10 7:59 ` Tino Calancha
2017-07-10 17:06 ` Eli Zaretskii
2017-07-11 4:14 ` Paul Rankin
2017-07-11 4:48 ` Tino Calancha
2017-07-11 5:07 ` Paul Rankin
2017-07-11 5:50 ` Tino Calancha
2017-07-11 7:20 ` Andreas Schwab
2017-07-11 14:36 ` Eli Zaretskii
2017-07-12 2:12 ` Paul Rankin
2017-07-10 19:01 ` Andreas Schwab
2017-07-21 3:47 ` Allen Li
2017-07-21 6:19 ` Tino Calancha
2017-07-21 8:40 ` Eli Zaretskii
2017-07-21 8:55 ` Tino Calancha
2017-07-25 2:45 ` Tino Calancha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1499659134.3804557.1035526184.45B0CA20@webmail.messagingengine.com \
--to=hello@paulwrankin.com \
--cc=27634@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).