unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27454: C-S-g [keyboard-quit] doesn't work to get out of disabled command choice
@ 2017-06-23  2:33 積丹尼 Dan Jacobson
  2019-07-21 15:48 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: 積丹尼 Dan Jacobson @ 2017-06-23  2:33 UTC (permalink / raw)
  To: 27454

Please make
 C-S-g [keyboard-quit]
work just like
 C-g [keyboard-quit]
to get out of
 Please type y, n, ! or SPC (the space bar):
in case one's CAPS LOCK key gets stuck, etc.
Seen on
 You have typed e, invoking disabled command gnus-summary-edit-article.
 It is disabled because new users often find it confusing.
 Here’s the first part of its description:





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#27454: C-S-g [keyboard-quit] doesn't work to get out of disabled command choice
  2017-06-23  2:33 bug#27454: C-S-g [keyboard-quit] doesn't work to get out of disabled command choice 積丹尼 Dan Jacobson
@ 2019-07-21 15:48 ` Lars Ingebrigtsen
  2019-07-21 16:22   ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-21 15:48 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 27454

積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:

> Please make
>  C-S-g [keyboard-quit]
> work just like
>  C-g [keyboard-quit]
> to get out of
>  Please type y, n, ! or SPC (the space bar):
> in case one's CAPS LOCK key gets stuck, etc.
> Seen on
>  You have typed e, invoking disabled command gnus-summary-edit-article.

To reproduce:

emacs -Q
C-x n n

and then try using C-S-g to break out of it, and that doesn't work.

So I'm guessing that whatever does this translation normally doesn't
work in whatever disabled-command-function uses...

Oh, it's this:

       (while (progn (setq char (read-event))
		     (or (not (numberp char))
			 (not (memq (downcase char)
				    '(?! ?y ?n ?\s ?\C-g)))))
	 (ding)
	 (message "Please type y, n, ! or SPC (the space bar): "))))
 


Because normally C-S-g works the same as C-g (see below).  Should we
perhaps just add C-S-g to the events this function checks for?

---

C-g (translated from C-S-g) runs the command keyboard-quit (found in
global-map), which is an interactive compiled Lisp function in
‘simple.el’.

It is bound to C-g.

(keyboard-quit)

Signal a ‘quit’ condition.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#27454: C-S-g [keyboard-quit] doesn't work to get out of disabled command choice
  2019-07-21 15:48 ` Lars Ingebrigtsen
@ 2019-07-21 16:22   ` Eli Zaretskii
  2019-07-21 17:22     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2019-07-21 16:22 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 27454, jidanni

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Sun, 21 Jul 2019 17:48:54 +0200
> Cc: 27454@debbugs.gnu.org
> 
>        (while (progn (setq char (read-event))
> 		     (or (not (numberp char))
> 			 (not (memq (downcase char)
> 				    '(?! ?y ?n ?\s ?\C-g)))))
> 	 (ding)
> 	 (message "Please type y, n, ! or SPC (the space bar): "))))
>  
> 
> 
> Because normally C-S-g works the same as C-g (see below).  Should we
> perhaps just add C-S-g to the events this function checks for?

But C-S-g is not a character.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#27454: C-S-g [keyboard-quit] doesn't work to get out of disabled command choice
  2019-07-21 16:22   ` Eli Zaretskii
@ 2019-07-21 17:22     ` Lars Ingebrigtsen
  2019-07-21 17:53       ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-21 17:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 27454, jidanni

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Date: Sun, 21 Jul 2019 17:48:54 +0200
>> Cc: 27454@debbugs.gnu.org
>> 
>>        (while (progn (setq char (read-event))
>> 		     (or (not (numberp char))
>> 			 (not (memq (downcase char)
>> 				    '(?! ?y ?n ?\s ?\C-g)))))
>> 	 (ding)
>> 	 (message "Please type y, n, ! or SPC (the space bar): "))))
>>  
>> 
>> 
>> Because normally C-S-g works the same as C-g (see below).  Should we
>> perhaps just add C-S-g to the events this function checks for?
>
> But C-S-g is not a character.

But it's an event...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#27454: C-S-g [keyboard-quit] doesn't work to get out of disabled command choice
  2019-07-21 17:22     ` Lars Ingebrigtsen
@ 2019-07-21 17:53       ` Eli Zaretskii
  2019-07-21 18:17         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2019-07-21 17:53 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 27454, jidanni

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: jidanni@jidanni.org,  27454@debbugs.gnu.org
> Date: Sun, 21 Jul 2019 19:22:28 +0200
> 
> >> Because normally C-S-g works the same as C-g (see below).  Should we
> >> perhaps just add C-S-g to the events this function checks for?
> >
> > But C-S-g is not a character.
> 
> But it's an event...

Sure, and we have many others that mean "get me out of here".
Probably should support more than just one extra.

Btw, if I leave CAPS LOCK stuck and type C-g, I do get Quit.  So I
don't think I understand the bug report.  You explicitly pressed C-S-g
in your recipe, but that's not really reasonable in my book -- the
user explicitly pressed Shift, a much less innocent mistake.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#27454: C-S-g [keyboard-quit] doesn't work to get out of disabled command choice
  2019-07-21 17:53       ` Eli Zaretskii
@ 2019-07-21 18:17         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-21 18:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 27454, jidanni

Eli Zaretskii <eliz@gnu.org> writes:

> Btw, if I leave CAPS LOCK stuck and type C-g, I do get Quit.  So I
> don't think I understand the bug report.  You explicitly pressed C-S-g
> in your recipe, but that's not really reasonable in my book -- the
> user explicitly pressed Shift, a much less innocent mistake.

Ah, right.  I have caps lock totally disabled, so I wasn't able to test
that bit.  Then I don't think there's anything here to fix, and I'm
closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-07-21 18:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23  2:33 bug#27454: C-S-g [keyboard-quit] doesn't work to get out of disabled command choice 積丹尼 Dan Jacobson
2019-07-21 15:48 ` Lars Ingebrigtsen
2019-07-21 16:22   ` Eli Zaretskii
2019-07-21 17:22     ` Lars Ingebrigtsen
2019-07-21 17:53       ` Eli Zaretskii
2019-07-21 18:17         ` Lars Ingebrigtsen

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).