help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs-w3m question


From: Xah
Subject: Re: emacs-w3m question
Date: Mon, 3 Nov 2008 17:48:14 -0800 (PST)
User-agent: G2/1.0

On Nov 3, 3:25 am, Xavier Maillard <x...@gnu.org> wrote:
>    in perhaps early 1990s, some keyboards do not have the arrow keys, or
>    that some applications (in particular, terminal applications) do not
>    necessarily support physical arrow keys by default.
>
>    Today, i think more than 99.999% keyboards and applications support
>    the physical arrows keys by default. The availablity of arrow keys i
>    think is pretty much standard by mid 1990s, and their support in
>    applications including term emulators is probably standard by 2000.
>
> At work, I still have oldies that still do not support these
> keys. What's more, directional keys are one of the dumbest
> addition one could have thought off (in my opinion). The same
> apply for numerical keypad: what are they useful for exactly ? Is
> it that hard to press shift+& (for the azerty keyboard) to get a
> 1 ? Or press C-b to move point left ? I do not think so.

The numerical keypad, and the physical cursor moving keys, are
technical superior to their counterparts in the main section of the
keyboard for many applications.

For example, if your job is data entry, the numerical keypad is much
more efficient to operate than the numbers on top row of the main
keys.

In the same way, arrow keys, and the dedicated function keys for page
up/down, home/end keys, are superior to key combos in the main section
because they involve single key press with a clear label, and their
physical layout makes them more efficient to operate.

You can test these by, for example, try to type a quarter page of
phone numbers in a yellow book. (this is assuming that you do touch
type on the numerical keypads. (e.g. “you are not a noob who refuse to
learn”)) Similarly, you can try to play pacman by using the arrow
keys, as compared to using Alt+n Alt+p Alt+f Alt+b, and see which one
is more efficient.

Besides operational efficiency in these applications, dedicated keys
also provide clarity and ease of use — elements important in the
design of machineries. Suppose in a jet fighter cockpit it requires
you to use emacs elaborate combinations to control knobs and buttons.

The design of machine-human interfaces, in particular, control panels,
input devices, is a relatively new field with its own industry and
experts. You can look into that.

> The real reason that comes to mind is lazyness. People do not
> want to (take time to) learn how to do things, they want to go
> fast (even if they go fast wrongly). Keyboard (or typing more
> generally) is just an example, there are so many other applying
> here...

people who are expert in one area tends to sneer at newbies or their
stupidity or their “unwillingness to learn”. These sneerings are often
baseless. If the world's things are designed so that they are not
“dumb'd down for newbies”, you'd be already dead in all sorts
accidents in this modern world, or, still learning how to use the
toilet. You think i'm kidding?

But coming back to emacs... one may think that even though emacs is
hard to use, but as soon as one gets over the initial hurdle, it is
actually one of the most perfectly designed system. But in fact, many
aspects of emacs are _technically_ the worst possible. If you do
research on it, you'll find that many of emacs's ways, is the way it
is mostly because of historical happenstances. Only some aspects of
emacs are actually well designed, and a intentional one.

For example, one particular aspect of emacs, its system of
keybindings, are in fact the worst possible. And why emacs's
keybinding is the way it is? it is because it so happened that the 15
or so hackers already got used to the Ctrl+n Ctrl+p Ctrl+f Ctrl+b
keys...

For more detail on this, see:

• Why Emacs's Keyboard Shortcuts Are Painful
http://xahlee.org/emacs/emacs_kb_shortcuts_pain.html

I recommend tech geekers to read the following articles:

• http://en.wikipedia.org/wiki/Data_entry_clerkhttp://en.wikipedia.org/wiki/Ergonomics

note that the Ergonomics article is fairly long, and most of you
probaby think “O, i already knew what's ergonomics” and thus just
glance it over and groan. Although to most of you the word ergonomics
is just things like keyboarding and monitor setup and seat height and
posture, but broadly it encompasses lots of fields. In particular,
check out the “See Also” section in the bottom. You could spend a
month to to read these articles just to have a idea of what it is
about or involves.

more generally, ergonomics is a form of Operations Research applied to
human-machine operation. See
• http://en.wikipedia.org/wiki/Operations_research

For those of you concerned, you might ask “what can we do about the
emacs situation”? I'd recommend to support Aquamacs, Emacs32, file bug
report on emacs usabilities issues (under menu “Help‣Send Bug
Report”), and in general spread the idea.

The following is a plain text version of one of the above article.
----------------------------

Why Emacs's Keyboard Shortcuts Are Painful

Xah Lee, 2007-07

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.

This article shows why Emacs's keyboard shortcut set is the most
ergonomically bad.

The Swapping of Control and Meta Modifiers

Emacs's keyboard shortcuts is very inefficient. The primary cause is
because, emacs's keyboard shortcuts are designed with a keyboard that
practically has the Ctrl and Alt key positions swapped.
Space-Cadet keyboard-2m

above: The Space-cadet keyboard. (Large Size: Space..._2.jpg
(2003x813)) (Source↗ 2008-07)

The common keyboard used around emacs era in the 1980s are those
keyboards from Lisp Machines↗. (see Space-cadet keyboard↗) The
keyboard on lisp machines have the Control key right besides the space
bar (similar to the position of Alt keys on PC keyboards), and Meta to
the left of Control. So, the Control key is the primary modifier, and
the Meta is secondary to Control. This is why, the shortcuts for the
most used commands in emacs involve the Control key instead of the
Meta key. (Example: The cursor movements: C-p, C-n, C-f, C-b, C-a, C-
e, the cut/paste/undo C-w, C-y, C-/, the kill-line C-k, the mark C-
SPC, the search C-s.) Lisp Machine's keyboards fell out of use alone
with Lisp Machines. Since the 1990s, the IBM PC keyboard↗ (and its
decedents) becomes the most popular and is used by some 98% of
personal computers today. The PC keyboard does not have Meta key but
have Alt instead. The Alt is placed right beside the space bar, while
Control is placed far to the corner.

Emacs did not change its keyboard shortcut bindings to adapt the PC
keyboard. Emacs simply remapped its Meta shortcuts to the Alt key by
default. (and kept on using the terminology Meta)

The tragedy of the Control/(Alt/Meta) swap made emacs keyboard
shortcuts very painful, and the frequent need to press the far-away
Control key creates the Emacs Pinky syndrome. (Many emacs-using
programer celebrities have injured their hands with emacs. (e.g.
Richard Stallman↗, Jamie Zawinski↗, Ben Wing↗), and emacs's Ctrl and
Meta combinations are most cited as the major turnoff to potential
users among programers)

(For more photos of Lisp Machine's keyboards (all have Control as
primary), see: lisp_machine_symbolics_keyboard.jpg (photo by Rainer
Joswig↗. Used with permission), Symbolics keyboard PN 364000↗,
Symbolics keyboard PN 365407 Rev C↗ by Peter Paine )
The Choice Of Keys

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

(Here we assumes the QWERTY keyboard layout. On the Dvorak layout, it
is about as bad.)
emacs cursor qwerty emacs cursor dvorak

above: Emacs's cursor moving keys on qwerty and dvorak.

See also, a newsgroup post on “comp.emacs”. “Re: effective
emacs” (2008-06-01) by Daniel Weinreb↗.
http://groups.google.com/group/comp.emacs/msg/0342e0bc1aa05c0d.

    «Emacs's default cursor moving shortcuts are “Ctrl+f”, “Ctrl+b”,
“Ctrl
    +n”, “Ctrl+p”. The keys f, b, n, p are scattered around the
keyboard
    and are not under the home row.»

    That's true.  At the time Guy Steele put together the Emacs
default
    key mappings, many people in the target user community (about 20
    people at MIT!) were already using these key bindings.  It would
    have been hard to get the new Emacs bindings accepted by the
    community if they differed for such basic commands.  As you point
    out, anyone using Emacs can very easily change this based on
    their own ergonomic preferences.

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
negative-argument, M--

move-to-window-line, M-r
center-line, M-s
transpose-words, M-t
tab-to-tab-stop, M-i

M-g prefix, M-g
indent-new-comment-line, M-j
tmm-menubar, M-'

zap-to-char, M-z
back-to-indentation, M-m
tags-loop-continue, M-,
find-tag, M-.

Difficult Keystrokes for Frequently Used Commands

Some commands that are used by every emacs user many times every hour,
such as Open (find-file; C-x C-f), Save (save-buffer; C-x C-s), Close
(kill-buffer; C-x k), Next Window/Tab (next-buffer C-x →) all require
multiple keystrokes with the difficult Control key.
Standard Name   Emacs Command Name      Keystroke
Open    find-file       C-x C-f
Save    save-buffer     C-x C-s
Close   kill-buffer     C-x k
Next Tab        next-buffer     C-x →
Previous Tab    previous-buffer C-x ←
No Employment of the Shift Key

For historical reasons, emacs does not use any keybindings involving
the Shift with a letter. (e.g. there's no “Meta Shift a”, or “Control
Shift a”) This is so because in early computing environment, Ctrl+Shift
+‹letter› cannot be distinguished from the non-Shift version, due to a
practical combination of ASCII↗, Computer terminal↗, telnet↗.

Today, however, employing the Shift key as part of a shortcut with
other modifiers is common and convenient. For example, on Mac OS X,
Undo and Redo are Cmd+Z and Cmd+Shift+Z, Save and Save As are Cmd+S
and Cmd+Shift+S. On Mac and Windows, moving to next/previous field/
window/application often use the Shift key for reversing direction. In
text editing on both Mac and Windows, a modifier key with a arrow key
will move cursor by word/paragraph, and with Shift down will select
them while moving.

Using the Shift key as a reverse operation is very easy to remember,
and doesn't take another precious shortcut letter. By not using the
Shift key, commands with a logical reverse operation necessarily have
to find other key space, and overall making the shortcut set more
difficult to remember, or scattered, or more difficult to press.
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 Emacs Lisp manual: Elisp Manual: Key-
Binding-Conventions.

This guide, indicates that the only key space reserved for users to
define, are the function keys F5 to F9, and key stroke sequence
starting with Ctrl+c followed by a single letter key.

This is a severe restraint to the utility of customized shortcuts. F5
to F9 are only 6 keys. The key sequence starting with C-c followed by
a letter, is a difficult sequence to execute, and there are only 26
spaces there.

The function keys, F1 to F12, are very good candidates for user
defined shortcut space, similarly for the digit key shortcuts, 0 to 9.
These keys can be used with any combination of Control, Meta, Shift.
For example, a user might define them to insert various templates,
headers/footers, a system of customized HTML/XML tags. Or, she might
assign them to various special emacs modes such as dired, shell, ftp,
email, calendar, calc, *scratch*, make-frame-command (Open a new
window), insert signature.

It seems too drastic a policy, to limit user defined keys to only F5
to F9, and key sequence of Control+c followed by a single letter key.
Epilogue: Failure to Change

Today, most commonly used keyboard shortcuts have been somewhat
informally standardized. For example, C/X/V is for Copy/Cut/Paste. O
is for Open. S is for Save, Shift-S is for Save As. P is for Print. F
is for Find/Search. Tab is for next, Shift tab for previous. These are
common conventions today in every application across Microsoft Windows
and Macintosh (and in Linux too in general).

These shortcut conventions are primarily brought about by Apple
Computer Inc's Human interface guidelines↗ and IBM's Common User
Access↗ in the 1990s.

In the early 1990s, DOS era software, each application has its own
scheme of shortcuts. The following is a excerpt from the Wikipedia
article on Common User Access↗:

    CUA was a detailed specification and set strict rules about how
applications should look and function. Its aim was in part to bring
about harmony between MS-DOS applications, which until then had
implemented totally different user interfaces.

    Examples:

        * In WordPerfect, the command to open a file was [F7], [3].
        * In Lotus 1-2-3, a file was opened with [/] (to open the
menus), [W] (for Workspace), [R] (for Retrieve).
        * In Microsoft Word, a file was opened with [Esc] (to open the
menus), [T] (for Transfer), [L] (for Load).
        * In WordStar, it was [Ctrl]+[K]+[O].
        * In Emacs, a file was opened with [Ctrl]+[x] followed by
[Ctrl]+[f] (for find-file).

    Some programs used [Esc] to cancel an action, some used it to
complete one; WordPerfect used it to repeat a character. Some programs
used [End] to go to the end of a line, some used it to complete
filling in a form. [F1] was often help but in WordPerfect that was
[F3]. [Ins] sometimes toggled between overtype and inserting
characters, but some programs used it for “paste”.

    Thus, every program had to be learned individually and its
complete user interface memorized. It was a sign of expertise to have
learned the UIs of dozens of applications, since a novice user facing
a new program would find their existing knowledge of a similar
application absolutely no use whatsoever.

Commercial software have updated themselves with time (or went
extinct), but emacs has not.

If we take a survey of the market share of text editors (including
IDEs) among professional programers (as defined by those who make a
living by computer programing), then, it is my guess, that emacs from
mid 1980s to early 1990s, has more than 50% of market share, but
gradually declined. Today, perhaps less that 5% of professional
programers use emacs (possibly even below 1%). I think, part of the
reason being that emacs has not modernized (not in the sense of being
fashionable, but in the sense of keeping with hardware and software
changes in the IT industry). The other major reason, is because emacs
itself is not a IDE in a modern sense, and most programing development
using compiled languages such as Pascal, C, C++, Java, C#, have moved
on with IDE platforms integrated with these language's compiler
application.

See also: The Modernization of Emacs.

2008-07-15 Addendum: Thanks to Rainer Joswig↗ for some correction
about the history of the lisp machine's keyboards.
http://groups.google.com/group/comp.lang.lisp/msg/3b3dcdc52f507b02 .

  Xah
∑ http://xahlee.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]