emacs-devel
[Top][All Lists]
Advanced

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

Tweaking t-m-m to make room for d-s-m


From: Stefan Monnier
Subject: Tweaking t-m-m to make room for d-s-m
Date: Thu, 25 Mar 2010 12:27:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> For example, there was one proposal that the equivalent of
> delete-selection-mode was enabled for all marking operations (mouse,
> shift-selection) that new user would be tempted to use, coming from
> other editing environments.

Here is how I see the situation:
- The DEL part of d-s-m would be acceptable right now
  (i.e. generalizing mouse-region-delete-keys to non-mouse-activated
  regions).
- The self-insert part of d-s-m is more problematic.  The main problem
  being the regions that are active "because of t-m-m" rather than
  because the user wanted to activate the region.

AFAIK the first point is decided and I'm just waiting for someone to
code it up.  [ The main reason why I like it is that I dislike the
current implementation of mouse-region-delete-keys. ]

For the second point, it's a real problem.  Enabling self-insert d-s-m
without addressing the problem will lead to frequent annoyances for some
usage patterns.  So, yes, we're back to discussing how to make t-m-m
work right, so that the region is active iff the user wants it.

Your suggestion to address that problem makes sense: make C-SPC not
activate the region (but let everything else activate it), so that the
region is only active when the user really intended to activate it.
This reverts some part of the "enable t-m-m by default".

I'm not completely sure it's a good solution, but it's one that I did
consider back when we discussed enabling t-m-m (and I was happy not to
have to resort to it ;-).

One of the problems left with it is what to do for C-x C-x.  Basically,
we'd want two commands: one that swap point and mark, and one that
activates the region.  Currently C-x C-x does both.  If we change C-x
C-x to not activate the region any more, than that makes the C-SPC
change more painful because then only C-u C-x C-x would be able to
activate the region when you forgot to use C-SPC C-SPC and just hit
C-SPC instead.  OTOH if we don't change C-x C-x, then users who want to
navigate to the mark get the region activated when they didn't want it.
One point of attack might be to use C-x C-x C-x instead of C-u C-x C-x
(a lot easier to type), but that's risky (hackish implementation almost
unavoidable, plus conflicts with C-x C-x followed by some other
C-x <foo> command)..

This C-x C-x issue can also be solved if we can come up with a short
key-binding that activates the region (in which case C-x C-x doesn't
need to activate the region).  Notice that we also have a need for
a short key-binding to deactivate the region (one that has fewer
side-effects than C-g, e.g. can be embedded in a keyboard macro).
So maybe the answer to all this is to find a "short" key-binding that
can toggle the region's active status.


        Stefan




reply via email to

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