unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* What is the difference between C-g and M-x keyboard-quit?
@ 2015-09-15 20:23 Marcin Borkowski
  2015-09-15 23:25 ` Emanuel Berg
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Marcin Borkowski @ 2015-09-15 20:23 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

Hi all,

there /must/ be some difference, since C-g beeps and M-x keyboard-quit
does not.  What is the reason for that?  What is exactly the difference?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



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

* Re: What is the difference between C-g and M-x keyboard-quit?
       [not found] <mailman.1208.1442348628.19560.help-gnu-emacs@gnu.org>
@ 2015-09-15 21:31 ` Dan Espen
  2015-09-16  6:27   ` Michael Heerdegen
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Espen @ 2015-09-15 21:31 UTC (permalink / raw)
  To: help-gnu-emacs

Marcin Borkowski <mbork@mbork.pl> writes:

> Hi all,
>
> there /must/ be some difference, since C-g beeps and M-x keyboard-quit
> does not.  What is the reason for that?  What is exactly the difference?

C-h k C-g seems clear enough:

It is bound to C-g.

(keyboard-quit)

Signal a `quit' condition.
During execution of Lisp code, this character causes a quit directly.
At top-level, as an editor command, this simply beeps.

-- 
Dan Espen


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

* Re: What is the difference between C-g and M-x keyboard-quit?
  2015-09-15 20:23 What is the difference between C-g and M-x keyboard-quit? Marcin Borkowski
@ 2015-09-15 23:25 ` Emanuel Berg
  2015-09-16  6:20 ` Michael Heerdegen
  2015-09-16  7:11 ` Bob Proulx
  2 siblings, 0 replies; 6+ messages in thread
From: Emanuel Berg @ 2015-09-15 23:25 UTC (permalink / raw)
  To: help-gnu-emacs

Marcin Borkowski <mbork@mbork.pl> writes:

> there /must/ be some difference, since C-g beeps and
> M-x keyboard-quit does not. What is the reason for
> that? What is exactly the difference?

Use the source, Luke! (if you can figure it out...)

The help has already been quoted, but for me, with
beeping enabled and 'emacs -Q', (keyboard-quit) beeps
regardless how I invoke it ("from Lisp" and with M-x).

Here is how to disable the beeping - and enabling, for
the sake of testing:

# in X
xset -b
xset b on

# Linux VT (virtual terminal)/console/tty
setterm -term linux -blength 0   > `tty` # or, e.g., /dev/tty1
setterm -term linux -blength 100 > `tty` # 0 and 100 are durations

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

* Re: What is the difference between C-g and M-x keyboard-quit?
  2015-09-15 20:23 What is the difference between C-g and M-x keyboard-quit? Marcin Borkowski
  2015-09-15 23:25 ` Emanuel Berg
@ 2015-09-16  6:20 ` Michael Heerdegen
  2015-09-16  7:11 ` Bob Proulx
  2 siblings, 0 replies; 6+ messages in thread
From: Michael Heerdegen @ 2015-09-16  6:20 UTC (permalink / raw)
  To: help-gnu-emacs

Marcin Borkowski <mbork@mbork.pl> writes:

> there /must/ be some difference, since C-g beeps and M-x keyboard-quit
> does not.  What is the reason for that?  What is exactly the
> difference?

In what situation does that happen for you?  At top level?  C-g is not
always bound to `keyboard-quit', in some cases, it has a different
binding.


Regards,

Michael.




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

* Re: What is the difference between C-g and M-x keyboard-quit?
  2015-09-15 21:31 ` Dan Espen
@ 2015-09-16  6:27   ` Michael Heerdegen
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Heerdegen @ 2015-09-16  6:27 UTC (permalink / raw)
  To: help-gnu-emacs

Dan Espen <despen@verizon.net> writes:

> Signal a `quit' condition.
> During execution of Lisp code, this character causes a quit directly.
> At top-level, as an editor command, this simply beeps.

But if you look at the code, you see that

    (signal 'quit nil)

is always executed.  If you get a beep depends on whether the quit
is caught.  But the behavior should be independent from how you invoke
`keyboard-quit' in one and the same context - either the quit signal
gets caught (no beep) or it isn't (beep).


Michael.




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

* Re: What is the difference between C-g and M-x keyboard-quit?
  2015-09-15 20:23 What is the difference between C-g and M-x keyboard-quit? Marcin Borkowski
  2015-09-15 23:25 ` Emanuel Berg
  2015-09-16  6:20 ` Michael Heerdegen
@ 2015-09-16  7:11 ` Bob Proulx
  2 siblings, 0 replies; 6+ messages in thread
From: Bob Proulx @ 2015-09-16  7:11 UTC (permalink / raw)
  To: help-gnu-emacs

Marcin Borkowski wrote:
> there /must/ be some difference, since C-g beeps and M-x keyboard-quit
> does not.  What is the reason for that?  What is exactly the difference?

For me M-x keyboard-quit beeps identically to C-g.  I wonder why your
M-x keyboard-quit does not beep?

Here is some trivia.  If you run emacs in a terminal and then send
that terminal emacs the INT signal 2 then it will beep and report
"Quit" in minibuffer just the same as C-g.  C-g is really just the
same as a tty interrupt.  I am specific about in a terminal because an
X graphics emacs receiving signal 2 INT exits.

Bob



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

end of thread, other threads:[~2015-09-16  7:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-15 20:23 What is the difference between C-g and M-x keyboard-quit? Marcin Borkowski
2015-09-15 23:25 ` Emanuel Berg
2015-09-16  6:20 ` Michael Heerdegen
2015-09-16  7:11 ` Bob Proulx
     [not found] <mailman.1208.1442348628.19560.help-gnu-emacs@gnu.org>
2015-09-15 21:31 ` Dan Espen
2015-09-16  6:27   ` Michael Heerdegen

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