[Top][All Lists]

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

Re: Default Emacs keybindings (was: Re: Menu suggestion)

From: David Kastrup
Subject: Re: Default Emacs keybindings (was: Re: Menu suggestion)
Date: 26 Apr 2004 23:36:06 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

address@hidden (Kim F. Storm) writes:

> David Kastrup <address@hidden> writes:
> > Me neither.  If we have a need for a separate significantly different
> > traditional mode, we lose most of our advantage.  CUA-mode, IIRC,
> > assigns special meaning to its characters only when there is an active
> > selection.  
> Right.
> >             It is a compromise, of course.  (I think we still are
> > not there with regard to consistent selection behavior where we
> > should be, but that's a somewhat different problem).
> Can you emphasize on what's missing...

If transient-mark-mode is active, the region lights up at
inconvenient times.  Also there are moments when the region becomes
inactive at inconvenient times, and having to reactivate it with C-x
C-x based on the presence or absence of visual feedback is a nuisance.

Temporary transient mark mode (C-SPC C-SPC or C-u C-x C-x) is a real
life-saver, but the choice of keybindings for it clearly indicates
that we are talking about a kludge for experts here instead of
functionality intended for "ordinary" users, and I don't think that
the tutorial even mentions it or its obtuse keybindings.

Also when explicitly marking a region with the mouse (dragging mouse-1
or clicking mouse-3), temporary transient mark mode should be enabled:
it is a safe bet that if the user marks out a _region_ for a command,
that he wants the command to be applied to the region instead of just
operating at point.  _If_ the command has special behavior for active

For the ordinary user that likes marking out stuff with a mouse, this
would go a lot towards making Emacs behave in a rational manner even
without one of the half-dozen modes fiddling around with various
amounts of transientness of the mark.

> > If what I think I understood from the CUA descriptions is correct,
> > no key sequences starting with C-c or C-x can be used with an
> > active selection.  For example, selecting an active region and
> > using C-c C-e in AUCTeX (inserts environment around an active
> > region, if there is one) would not work in CUA mode, ever.
> That's completely untrue!!
> There are actually three ways to enter C-c C-e even when the region is
> active:
> 1) Type the C-c C-e very quickly (the quicklyness is configurable).
> 2) Type C-c C-c quickly, followed by C-e
> 3) Type S-C-c C-e
> 1 can be used for a sequence of control characters (i.e. where you hold
>   down CTRL during the whole sequence).
> 2 can be used generally, typing C-c C-c (or C-x C-x) very quickly is
>   trivial,

Unless you happen to be handicapped and use something like sticky key
modifiers to enter such sequences.

>   then you can complete the rest of the sequence at your own pace.
> 3 can be used generally, at any pace.

So if I have a busy computer or a slow connection or accessibility
problems or slow typing, the only way to reliably compile a document
in AUCTeX (C-c C-c) is to use

  S-C-c C-c

which is not the most friendly keysequence to type.  Also, the meaning
and/or naming of commands changes depending on whether the region is
active or not.

The total behavior is much more complex than I'd care to explain
within the scope of a tutorial.

It's a rather expensive compromise, I feel.

> The current thread of emacs users who have never used CUA discuss
> whether it is useful or not seems like a waste of time...

Why?  All will be concerned with changes.  And CUA mode is an expert
mode to enable "conventional" bindings.  It changes the behavior of
standard commands in undocumented ways with regard to Emacs'
self-documentation commands (commands like C-h w, C-h k, menus and so
on all talk about one set of keybindings that silently is replaced by
something different when a region is active).

Explaining Emacs' behavior with CUA-mode is quite more complicated
than it is without it.

So there is a non-zero cost associated with CUA-mode.  One way to
make it less costly would be to change all keybindings involving C-c
and C-x.  Another would be to offer a pseudo-CUA mode where instead
s-c, s-x, s-v and s-z would be affected: most PC-keyboards nowadays
offer a "Windows" key, not unrarely mapped to the Super modifier.  As
those bindings are on the "Apple" key on Macs, this would not be as
wildly crazy as it may sound.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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