emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#27634: closed (25.2.1; C-g does not quit register-


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#27634: closed (25.2.1; C-g does not quit register-read-with-preview)
Date: Tue, 25 Jul 2017 02:46:02 +0000

Your message dated Tue, 25 Jul 2017 11:45:11 +0900
with message-id <address@hidden>
and subject line Re: bug#27634: 25.2.1; C-g does not quit 
register-read-with-preview
has caused the debbugs.gnu.org bug report #27634,
regarding 25.2.1; C-g does not quit register-read-with-preview
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
27634: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27634
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.2.1; C-g does not quit register-read-with-preview Date: Mon, 10 Jul 2017 13:58:54 +1000
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



--- End Message ---
--- Begin Message --- Subject: Re: bug#27634: 25.2.1; C-g does not quit register-read-with-preview Date: Tue, 25 Jul 2017 11:45:11 +0900 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
Tino Calancha <address@hidden> 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


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]