Article 1307 of net.emacs:
From: dick@tjalk.UUCP (Dick Grune)
Newsgroups: net.emacs
Subject: Proposal for key bindings
Message-ID: <571@tjalk.UUCP>
Date: 24 Apr 86 18:40:22 GMT
Organization: VU Informatica, Amsterdam
Lines: 340
Posted: Thu Apr 24 12:40:22 1986

1. INTRODUCTION

At this moment we, the authors, have at our disposal 7 emacses, all
slightly or more than slightly different in their key bindings, enough
to confuse novice and expert alike. Emacs's great strength, its
programmability, turns into a weakness and chaos rages. In an
attempt to bring some order into this chaos we have drawn up the
complete lists of initial key bindings of each emacs (i.e. the
bindings the unsuspecting user gets when he just calls the specific
emacs) and printed them side by side, on a virtual piece of paper,
210 columns wide.  Upon examination, patterns began to emerge, and
we have observed the following.

1.	Almost all elementary functions, functions "that every emacs
should have," are always bound to the same keys, ^H and ^Z being the
only problems. These key bindings are brought together in Class A in
the proposal.

2.	Most of the non-essential functions have a "home", a binding
about which a majority of the emacses agree. Those for which a home
could be identified are grouped in Class B.

3.	All emacses agree that ^X- or ESC- followed by a capital
letter is either bound to nothing or to the same function as ^X- or
ESC- followed by the corresponding small letter.

4.	None of the emacses recognizes the problems caused by the fact
that on some systems ^S and ^Q are preempted by the terminal
communication, as X-OFF and X-ON. Any emacs should supply reasonable
alternatives.

This has led us to submit the attached proposal, which is
accompanied by a rationale.  We are very interested to receive
reactions from any interested party.  We will summarize to the net,
or, if too many people think this is a bad idea, shut up.

				Dick Grune		dick@vu44.UUCP
				Sjoerd Mullender	sjoerd@vu44.UUCP
				Vrije Universiteit
				de Boelelaan 1081
				1081 HV  Amsterdam
				the Netherlands


2. PROPOSAL

	Proposal for recommended key bindings in emacs-like editors.

SCOPE
The recommendations in this proposal apply to the key bindings as
they appear initially --upon calling the editor-- to the user who has
given no customization or initialization information.

This proposal is NOT to be construed as a recommendation against
differing local or personal key bindings, and is intended solely to
reduce confusion in the unsuspecting user and as matter for
consideration to future emacs authors.

The editor functions are grouped into 3 classes, according to their
relative importance:

	Class A: functions the user can expect to be present.
	Class B: optional functions, which the user can nevertheless
		expect to be present in a wordprocessor/development
		environment.
	Class C: highly optional or specialized features, which are
		common enough for a recommendation to be in order.

In addition to these classes, two general recommendations are given.

Class A:

	Character commands:
	^B	backward character
	^D	delete next character
	^F	forward character
	^T	transpose characters
	^?	delete previous character

	Line commands:
	^A	beginning of line
	^E	end of line
	^K	kill to end of line

	Intra-line commands:
	^N	next line
	^P	previous line

	Word commands:
	ESC-b	backward word
	ESC-d	delete next word
	ESC-f	forward word
	ESC-^?	delete previous word

	Window commands:
	^V	next page
	^Z	scroll forward
	^X-1	delete other windows
	^X-2	split window
	^X-d	delete window
	^X-n	next window
	^X-o	other window
	^X-p	previous window
	ESC-^V	page next window
	ESC-,	beginning of window
	ESC-.	end of window
	ESC-<	beginning of file
	ESC->	end of file
	ESC-v	previous page
	ESC-z	scroll backward

	Buffer commands:
	^X-^B	list buffers
	^X-b	switch to buffer
	^X-k	kill buffer

	File commands:
	^X-^F	find file
	^X-^I	insert file
	^X-^M	write modified files
	^X-^R	read file
	^X-^S	save file
	^X-^W	write named file

	Region commands:
	^@	set mark
	^W	delete region to internal buffer
	^Y	yank from internal buffer
	^X-^X	exchange cursor and mark

	White space commands:
	^I	tab
	^J	insert newline and indent
	^M	insert newline
	^O	insert newline and backup

	Search commands:
	^R	search reverse
	^S	search forward
	ESC-q	query replace string
	ESC-r	replace string

	Miscellaneous commands:
	^C	exit
	^X-^C	exit
	^L	redraw screen
	^Q	quote next character
	^U	argument prefix
	^^	replacement for ^Q
	^\	replacement for ^S		(or vice versa?)
	^]	alternate prefix
	
	^G	abort
	^X-^G	abort
	ESC-^G	abort

Class B:

	Word commands:
	ESC-t	transpose words

	Sentence commands:
	^X-^?	kill to beginning of sentence
	ESC-a	backward sentence
	ESC-e	forward sentence
	ESC-k	kill sentence

	Paragraph commands:
	ESC-[	backward paragraph
	ESC-]	forward paragraph
	ESC-j	justify paragraph

	Window commands:
	^X-^	enlarge window

	Region commands:
	ESC-w	copy region to internal buffer
	ESC-^W	delete region to end of internal buffer

	Case commands:
	^X-^L	lower case region
	^X-^U	upper case region
	ESC-c	capitalize word
	ESC-l	lower case word
	ESC-u	upper case word

	White space commands:
	^X-^O	delete blank lines
	ESC-\	delete horizontal space

	Macro commands:
	^X-(	start keyboard macro
	^X-)	stop keyboard macro
	^X-e	execute keyboard macro

	Internal editor commands:
	ESC-ESC	evaluate internal expression
	ESC-x	execute internal command

	Information commands:
	^X-=	display cursor position
	ESC-?	help

	System commands:
	^X-^E	compile
	^X-^N	next error
	^X-!	give command to command interpreter
	^_	call command interpreter

Class C:

	Line commands:
	^X-^T	transpose lines
	ESC-m	go to first non-blank

	Buffer commands:
	ESC-~	buffer not modified

	Information commands:
	^X-*	print version number

	Abbreviations:
	^X-^A	add local abbreviation
	^X-^H	inverse add local abbreviation
	^X-+	add global abbreviation
	^X--	inverse add global abbreviation

	Layout control:
	^X-.	set indent column
	^X-;	set comment column
	^X-f	set fill column
	ESC-;	indent to comment column

	Scroll sideways:
	^X-<	scroll left
	^X->	scroll right

	Parentheses:
	ESC-^B	backward parenthesis
	ESC-^F	forward parenthesis



CAPITAL LETTERS IN A PREFIXED COMMAND
Key strokes consisting of a prefix (^X or ESC) followed by a capital
letter should not be bound.  If this is found very inconvenient,
they should be bound to the same command as the prefix followed by
the corresponding small letter.

^S AND ^Q
All key bindings that include a ^S or ^Q should have a corresponding
binding with ^\ substituted for ^S and ^^ for ^Q.  If possible, this
substitution should be hard-wired (to be switched off on request);
if not, appropriate explicit bindings should be supplied.

END OF PROPOSAL


3. RATIONALE

3.1 The concept
The reason for this proposal at all is the same as that for any
standard: some design decisions are to a large extend arbitrary, and
to reduce the ensuing complexity, additional artificial order has to
be imposed.  We feel that the subject has at present reached a
certain maturity and has not yet petrified.

3.2 The approach
We have considered the initial key bindings of
	emacs2.10 (Unipress/Gosling),
	jove (Jonathan Payne/Unison World),
	PerfectWriter (Perfect Software),
	MicroEmacs (Curt Jutzi, jutz@pogo),
	GNU (Richard M. Stallman),
	scame (Leif Samuelsson, leif@erisun),
	MicroEMACS (conroy@dec-rex).
For Class A and B we only considered those key bindings that were
defined in at least four of the above. The key bindings for which no
rationale is given below were either unanimous or defined by some
and not contradicted by any of the others.

We have not concerned ourselves with small semantic differences:
"next-paragraph" will go to the beginning of the next paragraph on
some editors and to the end of this paragraph on others;
"transpose-characters" may transpose cursor[-2..-1] or
cursor[-1..0], etc. These are considered the same, since the user
has direct optical feedback.

3.3 Specific key bindings
^H is left unbound. It is usually bound to backwards-character or to
delete-previous-character, without clear preference for either.  Both
of these are available under other keys (^B and ^?).  Users working
on low-grade telephone lines may need to avoid ^? since it is often
generated by noise; in this case they may bind
delete-previous-character to ^H and unbind ^?.

^Z
Some systems have the possibility to suspend a running process; this
action is traditionally coupled to the ^Z key. It is, however, not
at all universal and requires considerable OS support. We feel
therefore that we can still use ^Z (and its compagnion ESC-z) for
scrolling  --with suspending, calling command interpreters, etc.,
bound to ^_ .

^]
Most editors do not use a third prefix besides ^X and ESC; among
those that do, there is no consensus, with ^H, ^Z, ^\, ^^ and ^X-4
being used.  ^] is not used by any editor for anything.

^X-^F, ^X-^R
Generally there exist two commands, "read file into new buffer" and
"read file into existing buffer", called "find file" and "read file"
respectively here.  They are bound to various permutations of ^X-^F,
^X-^R and ^X-^V, the latter being called "visit file", but being
identical to "find file". The proposed assignment seems more
mnemonic and seems to have a slight majority.


3.4 Capital letters in a prefixed command
The beginning user would have difficulty in telling apart ^X-^S,
^X-s, ^X-S, ESC-^S, ESC-s and ESC-S, with assorted meanings like
save-file, forward-search, call-spelling-checker, center-line or
scratch-buffer.  Some tutorials print ^X-S when they mean ^X-s.
Some terminals with function keys send ESC-@ to ESC-O for them,
which should remain free for special applications.

3.5 ^S and ^Q
^S and ^Q are used by some communication protocols and will then
cause a great deal of confusion, both to the user and to the
computer.  It seems preferable to lift this problem out of the user
realm and into the editor.

It is disturbing that we have seen editors that have the mapping
	^S -> ^\		^Q -> ^^
and those that have
	^S -> ^^		^Q -> ^\
We specifically request more advice and information from the emacs
community.

END OF RATIONALE


