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

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

bug#27634: 25.2.1; C-g does not quit register-read-with-preview


From: Eli Zaretskii
Subject: bug#27634: 25.2.1; C-g does not quit register-read-with-preview
Date: Tue, 11 Jul 2017 17:36:09 +0300

> From: Paul Rankin <address@hidden>
> Cc: address@hidden, address@hidden
> 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.





reply via email to

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