all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Why use CTL-x CTL-c to quit instead of CTL-x CTL-q?
@ 2021-04-06  2:49 Hongyi Zhao
  2021-04-06  7:59 ` Jean Louis
  2021-04-06 12:34 ` Skip Montanaro
  0 siblings, 2 replies; 13+ messages in thread
From: Hongyi Zhao @ 2021-04-06  2:49 UTC (permalink / raw)
  To: help-gnu-emacs

Obviously, from a mnemonic perspective, CTL-x CTL-q is more intuitive
than CTL-x CTL-c.

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China



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

* Re: Why use CTL-x CTL-c to quit instead of CTL-x CTL-q?
  2021-04-06  2:49 Why use CTL-x CTL-c to quit instead of CTL-x CTL-q? Hongyi Zhao
@ 2021-04-06  7:59 ` Jean Louis
  2021-04-06 12:34 ` Skip Montanaro
  1 sibling, 0 replies; 13+ messages in thread
From: Jean Louis @ 2021-04-06  7:59 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

* Hongyi Zhao <hongyi.zhao@gmail.com> [2021-04-06 05:50]:
> Obviously, from a mnemonic perspective, CTL-x CTL-q is more intuitive
> than CTL-x CTL-c.

To customize it personally, user may do following:

(global-set-key (kbd "C-x C-q") 'save-buffers-kill-terminal)

That is probably related to computer history. At some point of time
one could quit many applications with ESC or ESCAPE, that one is more
logical to me, today ESC does not work as expected. In Emacs Escape
has different meaning, but I almost never use it.

I may guess that logic comes from Control-C on terminal to abort
action, and that Emacs adopted CTRL-C with the prefix.

More about Control-C: https://en.wikipedia.org/wiki/Control-C

Thus the meaning comes from computer history.

Quote:

"Control+C ("C for Cancel")[3] was part of various Digital Equipment
operating systems, including TOPS-10 and TOPS-20. Its popularity as an
abort command was adopted by other systems including Unix."

Meanings of "cancel" and "quit" are different, though similar. My
dictionary Wordnet does not tell me they are synonyms, I would say
they are.

When program is funning furiously on terminal we often "cancel" it
with CTRL-C, but don't quit like saying "Good bye" to program, we
cancel the execution abruptly. From that logic probably it was adopted
in Emacs.

Author RMS and few experienced users of that time would know it.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://rms-support-letter.github.io/




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

* Re: Why use CTL-x CTL-c to quit instead of CTL-x CTL-q?
  2021-04-06  2:49 Why use CTL-x CTL-c to quit instead of CTL-x CTL-q? Hongyi Zhao
  2021-04-06  7:59 ` Jean Louis
@ 2021-04-06 12:34 ` Skip Montanaro
  2021-04-06 14:53   ` Skip Montanaro
  2021-04-06 15:15   ` Philip Kaludercic
  1 sibling, 2 replies; 13+ messages in thread
From: Skip Montanaro @ 2021-04-06 12:34 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

> Obviously, from a mnemonic perspective, CTL-x CTL-q is more intuitive than CTL-x CTL-c.

Jean already provided a precise reply to your question. I've seen
several questions about the Emacs interface over the past year or so.
Indulge an old crank for a couple minutes. I will offer a more general
reply on why I think the Emacs keybindings are the way they are.

Emacs availability predates Windows and Unix by a fair bit. It
predates common graphical user interface technology by more than that.
In fact, Emacs was popular enough by the time Windows and Unix were
around that other implementations of Emacs existed before that, both
as spin-offs of the GNU Emacs codebase as well as complete rewrites.
The Wikipedia page about Emacs provides useful background:

https://en.wikipedia.org/wiki/Emacs

GNU Emacs first appeared in 1976 or thereabouts (and not on Unix).
Technically, Unix had already moved through several versions by that
point, but it was still captive to Bell Labs.

https://en.wikipedia.org/wiki/Unix

In contrast, Microsoft Windows didn't appear for another ten years or
so as a response to the success of the commercialization of graphical
user interfaces by Apple's Macintosh.

https://en.wikipedia.org/wiki/Microsoft_Windows

ISTR Stallman was resistant to a port of Emacs to the Mac before the
release of Mac OS X, largely because of his stance on closed-source
software. I believe he was resistant to a Windows port for a long time
too. It was a different story after the release of Mac OS X, since it
was a Unix-based system under the covers. I don't think Stallman could
have resisted the port at that point.

https://en.wikipedia.org/wiki/Macintosh_operating_systems

By the time that Emacs was available on Windows and Macs, we are
talking well beyond the mid-80s. I don't know when a Windows port
became available, but Mac OS X wasn't released to the public until
2001. I'm not sure when it was ported to Windows, but likely not
before version 19.24. See the release history table here:

https://en.wikipedia.org/wiki/GNU_Emacs#Release_history

So, Emacs's roots lie in the pre-Unix/Windows/Mac history of
computing. Nearly as important, they lie in the pre-GUI history of
computing. By the time Windows, Unix and Macs were around, the Emacs
user interface was quite stable. While users can (and do) do pretty
much anything they want w.r.t. key bindings, I don't think changing
the defaults as the winds of computing changed would have been the
right thing to do. There is value in a certain amount of consistency,
even if it isn't "perfect."

Skip

P.S. Do vi/vim users wonder why its key bindings don't correspond more
strongly to common Windows, Mac or Unix/Linux interface standards? I
rarely need to use vim, but if they changed the quit command (:q or
:q!) I'd be completely lost. How would I ever get back to the shell
prompt? Oh, right, C-z followed by kill(1).



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

* Re: Why use CTL-x CTL-c to quit instead of CTL-x CTL-q?
  2021-04-06 12:34 ` Skip Montanaro
@ 2021-04-06 14:53   ` Skip Montanaro
  2021-04-06 15:40     ` Stefan Monnier
  2021-04-06 16:17     ` Gregory Heytings
  2021-04-06 15:15   ` Philip Kaludercic
  1 sibling, 2 replies; 13+ messages in thread
From: Skip Montanaro @ 2021-04-06 14:53 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

I wrote:

> GNU Emacs first appeared in 1976 or thereabouts (and not on Unix).

Stefan corrected me off-list. It wasn't GNU Emacs, but its predecessor
on ITS. In fact, Wikipedia indicates that Richard Stallman didn't
start on GNU Emacs until 1984, in response to the not-open-source
Gosling Emacs.

Skip



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

* Re: Why use CTL-x CTL-c to quit instead of CTL-x CTL-q?
  2021-04-06 12:34 ` Skip Montanaro
  2021-04-06 14:53   ` Skip Montanaro
@ 2021-04-06 15:15   ` Philip Kaludercic
  2021-04-06 20:52     ` Jean Louis
  1 sibling, 1 reply; 13+ messages in thread
From: Philip Kaludercic @ 2021-04-06 15:15 UTC (permalink / raw)
  To: Skip Montanaro; +Cc: help-gnu-emacs, Hongyi Zhao

Skip Montanaro <skip.montanaro@gmail.com> writes:

> P.S. Do vi/vim users wonder why its key bindings don't correspond more
> strongly to common Windows, Mac or Unix/Linux interface standards? I
> rarely need to use vim, but if they changed the quit command (:q or
> :q!) I'd be completely lost. How would I ever get back to the shell
> prompt? Oh, right, C-z followed by kill(1).

I don't think so, as vi(m) is culturally more about the keys than the
software. People use vi(m) for vi(m), while many use Emacs for {org, magit,
whatever} and find Emacs to be an obstacle. Or that is at least how I
make sense of it.

-- 
	Philip K.



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

* Re: Why use CTL-x CTL-c to quit instead of CTL-x CTL-q?
  2021-04-06 14:53   ` Skip Montanaro
@ 2021-04-06 15:40     ` Stefan Monnier
  2021-04-06 16:17     ` Gregory Heytings
  1 sibling, 0 replies; 13+ messages in thread
From: Stefan Monnier @ 2021-04-06 15:40 UTC (permalink / raw)
  To: help-gnu-emacs

>> GNU Emacs first appeared in 1976 or thereabouts (and not on Unix).
> Stefan corrected me off-list. It wasn't GNU Emacs, but its predecessor
> on ITS.  In fact, Wikipedia indicates that Richard Stallman didn't
> start on GNU Emacs until 1984, in response to the not-open-source
> Gosling Emacs.

Actually, AFAIK (that's before my time) he started GNU Emacs because he
wanted something like Multics Emacs to be available everywhere (and the
use of Lisp as the only implementation language was a hurdle in this
respect).  He didn't want something like Gosling Emacs either (because
that one was using C as the only implementation language since its
extension language was not good enough).  So he took Gosling Emacs's
code as a base (which he mistakenly thought he could use) to make GNU
Emacs (an implementation that combined a "mostly Lisp implementation"
with a "needs only a C compiler" requirement).


        Stefan




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

* Re: Why use CTL-x CTL-c to quit instead of CTL-x CTL-q?
  2021-04-06 14:53   ` Skip Montanaro
  2021-04-06 15:40     ` Stefan Monnier
@ 2021-04-06 16:17     ` Gregory Heytings
  1 sibling, 0 replies; 13+ messages in thread
From: Gregory Heytings @ 2021-04-06 16:17 UTC (permalink / raw)
  To: Skip Montanaro; +Cc: help-gnu-emacs, Hongyi Zhao


>> GNU Emacs first appeared in 1976 or thereabouts (and not on Unix).
>
> Stefan corrected me off-list. It wasn't GNU Emacs, but its predecessor 
> on ITS. In fact, Wikipedia indicates that Richard Stallman didn't start 
> on GNU Emacs until 1984, in response to the not-open-source Gosling 
> Emacs.
>

To link this with the OP's question, note that C-x C-c in ITS Emacs did 
not "quit Emacs" as C-x C-c now does, it was a "suspend" operation.



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

* Re: Why use CTL-x CTL-c to quit instead of CTL-x CTL-q?
  2021-04-06 15:15   ` Philip Kaludercic
@ 2021-04-06 20:52     ` Jean Louis
  2021-04-06 21:00       ` Jean Louis
  2021-04-07 21:02       ` Francis Belliveau
  0 siblings, 2 replies; 13+ messages in thread
From: Jean Louis @ 2021-04-06 20:52 UTC (permalink / raw)
  To: Philip Kaludercic, g; +Cc: Skip Montanaro, help-gnu-emacs, Hongyi Zhao

* Philip Kaludercic <philipk@posteo.net> [2021-04-06 18:16]:
> Skip Montanaro <skip.montanaro@gmail.com> writes:
> 
> > P.S. Do vi/vim users wonder why its key bindings don't correspond more
> > strongly to common Windows, Mac or Unix/Linux interface standards? I
> > rarely need to use vim, but if they changed the quit command (:q or
> > :q!) I'd be completely lost. How would I ever get back to the shell
> > prompt? Oh, right, C-z followed by kill(1).
> 
> I don't think so, as vi(m) is culturally more about the keys than the
> software. People use vi(m) for vi(m), while many use Emacs for {org, magit,
> whatever} and find Emacs to be an obstacle. Or that is at least how I

I expect on every system to have vi available just because Emacs is
not available. That is where trouble starts. Sometimes use to edit
remote files within M-x shell.

If I remember well "vi" stands for "victim":

vi tutorial for beginners:
http://web-old.archive.org/web/20120528000356/http://www.dina.kvl.dk/~abraham/religion/vi-tutorial.html

Editors 101 Menace:
http://web-old.archive.org/web/20120208080648/http://www.dina.kvl.dk/~abraham/religion/editors-101.html

Quote:
======

 All vi commands have nice mnemonics. The mnemonic for leaving vi is:

<ESC>ape this 
<COLON> thing,     // The colon-thing is a nickname for vi.
<Q>uit and do 
<NOT>              // C slang for `!'.  Here used in the meaning `never'.
<RET>urn.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://rms-support-letter.github.io/



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

* Re: Why use CTL-x CTL-c to quit instead of CTL-x CTL-q?
  2021-04-06 20:52     ` Jean Louis
@ 2021-04-06 21:00       ` Jean Louis
  2021-04-06 23:03         ` Stefan Monnier
  2021-04-07 21:02       ` Francis Belliveau
  1 sibling, 1 reply; 13+ messages in thread
From: Jean Louis @ 2021-04-06 21:00 UTC (permalink / raw)
  To: help-gnu-emacs, Hongyi Zhao

* Jean Louis <bugs@gnu.support> [2021-04-06 23:58]:
> * Philip Kaludercic <philipk@posteo.net> [2021-04-06 18:16]:
> > Skip Montanaro <skip.montanaro@gmail.com> writes:
> > 
> > > P.S. Do vi/vim users wonder why its key bindings don't correspond more
> > > strongly to common Windows, Mac or Unix/Linux interface standards? I
> > > rarely need to use vim, but if they changed the quit command (:q or
> > > :q!) I'd be completely lost. How would I ever get back to the shell
> > > prompt? Oh, right, C-z followed by kill(1).
> > 
> > I don't think so, as vi(m) is culturally more about the keys than the
> > software. People use vi(m) for vi(m), while many use Emacs for {org, magit,
> > whatever} and find Emacs to be an obstacle. Or that is at least how I
> 
> I expect on every system to have vi available just because Emacs is
> not available. That is where trouble starts. Sometimes use to edit
> remote files within M-x shell.

Correction: Sometimes I use ed to edit remote files witin M-x shell
especially when there are just few lines to be changed.



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

* Re: Why use CTL-x CTL-c to quit instead of CTL-x CTL-q?
  2021-04-06 21:00       ` Jean Louis
@ 2021-04-06 23:03         ` Stefan Monnier
  2021-04-06 23:16           ` Skip Montanaro
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2021-04-06 23:03 UTC (permalink / raw)
  To: help-gnu-emacs

> Correction: Sometimes I use ed to edit remote files witin M-x shell

Well, of course: it's the standard text editor, after all.


        Stefan




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

* Re: Why use CTL-x CTL-c to quit instead of CTL-x CTL-q?
  2021-04-06 23:03         ` Stefan Monnier
@ 2021-04-06 23:16           ` Skip Montanaro
  0 siblings, 0 replies; 13+ messages in thread
From: Skip Montanaro @ 2021-04-06 23:16 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Help GNU Emacs

> > Correction: Sometimes I use ed to edit remote files witin M-x shell
>
> Well, of course: it's the standard text editor, after all.


I was surprised to find it wasn't installed by default on my Manjaro
system. I mean, really, what's the world coming to? ;-)

(Obviously Manjaro isn't a developer-focused Linux distro. I switched to it
for the user interface and have had to install several packages of come to
expect from other Linux distros.)

Skip


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

* Re: Why use CTL-x CTL-c to quit instead of CTL-x CTL-q?
  2021-04-06 20:52     ` Jean Louis
  2021-04-06 21:00       ` Jean Louis
@ 2021-04-07 21:02       ` Francis Belliveau
  2021-04-07 23:00         ` Philip Kaludercic
  1 sibling, 1 reply; 13+ messages in thread
From: Francis Belliveau @ 2021-04-07 21:02 UTC (permalink / raw)
  To: help-gnu-emacs


> On Apr 6, 2021, at 16:52, Jean Louis <bugs@gnu.support> wrote:
> 
> If I remember well "vi" stands for "victim":
> 
That sounds wrong to me since the original version was just a full-screen terminal interface for "ed".  More likely it would have stood for "video interface" since "ed" was designed to support "paper terminal" interfaces.


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

* Re: Why use CTL-x CTL-c to quit instead of CTL-x CTL-q?
  2021-04-07 21:02       ` Francis Belliveau
@ 2021-04-07 23:00         ` Philip Kaludercic
  0 siblings, 0 replies; 13+ messages in thread
From: Philip Kaludercic @ 2021-04-07 23:00 UTC (permalink / raw)
  To: Francis Belliveau; +Cc: help-gnu-emacs

Francis Belliveau <f.belliveau@comcast.net> writes:

>> On Apr 6, 2021, at 16:52, Jean Louis <bugs@gnu.support> wrote:
>> 
>> If I remember well "vi" stands for "victim":
>> 
> That sounds wrong to me since the original version was just a
> full-screen terminal interface for "ed".  More likely it would have
> stood for "video interface" since "ed" was designed to support "paper
> terminal" interfaces.

AFAIK vi is just the "visual mode/editor" of the ex editor, that in turn
was a development on ed, the line editor.

-- 
	Philip K.



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

end of thread, other threads:[~2021-04-07 23:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-06  2:49 Why use CTL-x CTL-c to quit instead of CTL-x CTL-q? Hongyi Zhao
2021-04-06  7:59 ` Jean Louis
2021-04-06 12:34 ` Skip Montanaro
2021-04-06 14:53   ` Skip Montanaro
2021-04-06 15:40     ` Stefan Monnier
2021-04-06 16:17     ` Gregory Heytings
2021-04-06 15:15   ` Philip Kaludercic
2021-04-06 20:52     ` Jean Louis
2021-04-06 21:00       ` Jean Louis
2021-04-06 23:03         ` Stefan Monnier
2021-04-06 23:16           ` Skip Montanaro
2021-04-07 21:02       ` Francis Belliveau
2021-04-07 23:00         ` Philip Kaludercic

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.