Re: Lispm keyboard commands
- From: "xahlee@xxxxxxxxx" <xahlee@xxxxxxxxx>
- Date: Tue, 15 Jul 2008 18:40:02 -0700 (PDT)
hi Rainer!
Thanks a lot for the corrections. My bad history gussing about lisp
machine keyboard's use of Control key is removed. (and you are
credited in the bottom, if you don't object ^_^ )
--------------------------
Some other comment i don't totally agree, with some qualifications...
You mentioned that the following commands are often used:
transpose-words, M-t
find-tag, M-.
in my context, i'd like to know if they are used or often used with
respect to all emacs users, regardless whether they are lisp coders.
Suppose we are god and we are omniscient. So, if we look al all emacs
users, who has used, say emacs for 2 accumulated solid years in day
job. Then, we check how often, they use the above commands, or at all.
I think the result is that majority, don't use it.
But anyway, thanks for your input it was valuable. (i myself never
found the transpose commands useful. (it was in BBEdit in the 1990s
probably still there)
and i find the transpose commands somehow distasteful.
I'd be interested to know, if Xcode, MS Visual Studio, Microsoft Word,
Eclipse, IntelliSense, has the transpose command. As far as i've
checked, it's not in Apple's Xcode, TextEdit. Could anyone say if it
is in Visual Studio, MS Word, Eclipse, IntelliSense?
)
As for the tag related command... i still haven't looked into what it
actually do. One time i looked at info and read i'll need some C code
or some tool to compile the tags outside emacs... so i kinda stopped
at that.
---------------------
Rainer wrote:
A Flaw in Keybinding Policy
Any major software, maintains a guide for the developers about the
choices of keyboard shortcuts, so that the shortcuts will be
consistent. Emacs has this in its EmacsLispmanual: Elisp Manual: Key-
Binding-Conventions.
I would hope that there would be more.
You mean you wish there's more key spaces reserved by emacs, or more
key spaces reserved for user to define?
----------------------
A better way to gather emacs usage stat is actually to log it of
course. Emacs users, please get the lisp code at the bottom of:
http://xahlee.org/emacs/command-frequency.html
send me the result after you used emacs for a week. I'll incorporate
your usage stat into the report. Thanks.
Xah
∑ http://xahlee.org/
☄
No Employment of the Shift Key
On Jul 15, 5:22 pm, "jos...@xxxxxxxxxxxxxxxxxxxxxxx" <jos...@corporate-
world.lisp.de> wrote:
On 16 Jul., 00:34, "xah...@xxxxxxxxx" <xah...@xxxxxxxxx> wrote:
A important aspect in designing a keyboard shortcut set, for a
application that has intensive, repetitive, prolonged human-machine
interaction (such as coding and text editing), is to consider
ergonomic principles. Specifically: allocate keyboard shortcuts for
the most frequently used commands, and, the top most frequently used
commands should have most easily-pressed keystrokes. For example,
they should be on the home row.
Some remarks about some old influence from using the Lisp machine and
Zmacs.
Warning: obscure and old...
Zmacs documentation:
The TI Explorer Zmacs Manual
http://bitsavers.org/pdf/ti/explorer/2243192-0001A_Zmacs_Jun87.pdf
The Symbolics Lisp Machine has for example things like:
c- for character level commands
m- for word-level commands
c-m- for Lisp-level commands
m-SPECIALKEY do more strongly ( SUSPEND enters a REPL, m-SUSPEND
enters the debugger)
symbol- for special characters
local- for local console commands
c-u numbers for numeric prefixes (like c-u 10 c-f moves ten
characters forward)
super- select from choices (in the debugger super-a selects
the first restart, super-b the second, ...)
hyper- modifier reserved for the user's personal commands
-sh modifier to the command
m-x Command invoke extended command
c-x Prefix
There is some more stuff like navigating in menus and options with the
keyboard or the 'various
quantities' command. The latter does for example things like m-4 c-q
F( which
moves forward four lists. Or m-3 c-q dd deletes the next three top-
level definitions.
(The reason that Symbolics keyboards have Control as primary modifier,
is because in the early computing era, the use of Control Characters
as part of the non-printable chars from the ASCII↗ standard, is
important and frequent.
The Lisp Machine had a different idea of character sets and also about
keys on the keyboard. Since all machines were using a GUI-based user
interface
with special keyboards, terminal control characters were not the
biggest influence on the
design of the keyboard commands.
This still can be seen in emacs today by the
standard use of “Form feed” character (ASCII 12, represented as ^L) as
a indication of “page break”/ section in much of EmacsLisp'ssource
codes. (To go to the previous/next ^L, emacs uses the command forward-
page (C-x ]) and backward-page (C-x [)) At those times, there's not
much of the concept of “keyboard shortcuts”, but rather, modifier keys
are means to enter special data. Today, the Control key is primarily
used as a mechanism for keyboard shortcuts. Only in Telnet/ Terminal/
SSH applications, the Control key still remain of its original use.)
See above. The Lisp machine has tons of keyboards shortcuts. control-
something
was not to enter data - it was to issue a command.
The shortcut's key choices are primarily based on first letter of the
commands, not based on key position and finger strength or ease of
pressing the key. For example, the single char cursor moving shortcuts
(C-p previous-line ↑, C-n next-line ↓, C-b backward-char ←, C-f
forward-char →) are scattered around the keyboard with positions that
are most difficult to press.
Note that on the Lisp machine many commands get special keys. The
keyboard
layout is such that outer keys are bigger (easier to hit). Several
keys that the programmer might use get some special position:
parentheses
without shift, rubout is left, etc.
See here:
http://www.johnbear.net/symbolics-keyboard-paper/gnu-emacs-kbd-for-ma...
(these shortcuts all together accounts
for 43% of all commands executed by a keyboard shortcut) Of these, the
most frequently used is C-n (next-line), which accounts for 20% of all
shortcut calls, but is assigned to the letter n, positioned in the
middle of the keyboard, which is one of the most costly key to press.
Similarly, the second most used among these is the C-p (previous-
line), accounting for 16% of all shortcut command calls, is located in
a position above the right hand's pinky, also one of the most costly
key to press.
I use cursor keys on 'normal' keyboards for that.
Outdated Commands
A significant portion of emacs's major shortcuts (those with M-‹key›
or C-‹key›) are mapped to commands that are almost never used today.
Some of these occupies the most precious space (Home row with thumb:
For example: M-s (center-line), M-j (indent-new-comment-line), M-k
(kill-sentence)). Most programer who have used emacs for years never
use these commands. For example:
digit-argument, M-1 to M-9
Above I use. m-3 c-m-f moves three lisp expressions forward.
transpose-words, M-t
Above is quite often used. name-class with the cursor between the
words and doing M-t transposes the words.
Even more often I use C-M-t to transpose Lisp expressions or c-t to
transpose characters.
find-tag, M-.
Above is very often used. It finds the source to a symbol in Lisp
code. In most Lisp environments.
No Employment of the Shift Key
For historical reasons, emacs do not use any keybindings involving the
Shift with a letter. (Example: there's no “meta shift a”, or “control
shift a”) This is so because in early computing environment, such key
combination cannot be distinguished, due to a practical combination of
ASCII↗, Computer terminal↗, telnet↗.
note that on the Lisp Machine, the shift key is used in commands.
For the user there is the HYPER- modifier. The system does not use it.
It is reserved for the user.
The user can also use three function keys: SQUARE, CIRCLE and
TRIANGLE.
A Flaw in Keybinding Policy
Any major software, maintains a guide for the developers about the
choices of keyboard shortcuts, so that the shortcuts will be
consistent. Emacs has this in its EmacsLispmanual: Elisp Manual: Key-
Binding-Conventions.
I would hope that there would be more.
.
- Follow-Ups:
- Re: Lispm keyboard commands
- From: joswig@xxxxxxxxxxxxxxxxxxxxxxx
- Re: Lispm keyboard commands
- References:
- Good Lisp editor for Win
- From: Francogrex
- Re: Good Lisp editor for Win
- From: Jacobite1607
- Re: Good Lisp editor for Win
- From: Pascal J. Bourguignon
- Re: Good Lisp editor for Win
- From: Jacobite1607
- Re: Good Lisp editor for Win
- From: Matthias Buelow
- Re: Good Lisp editor for Win
- From: Jacobite1607
- Why Emacs Keyboard Shorts are Painful. [was Good Lisp editor for Win]
- From: xahlee@xxxxxxxxx
- Lispm keyboard commands
- From: joswig@xxxxxxxxxxxxxxxxxxxxxxx
- Good Lisp editor for Win
- Prev by Date: Re: SBCL is now faster than Java, as fast as Ocaml, and getting better
- Next by Date: The Fundamental Confusion of Xah
- Previous by thread: Lispm keyboard commands
- Next by thread: Re: Lispm keyboard commands
- Index(es):
Relevant Pages
|
|