From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: RE: Tweaking t-m-m to make room for d-s-m
Date: Thu, 25 Mar 2010 16:56:31 -0700 [thread overview]
Message-ID: <8D826837413D49AC968F80154D97F021@us.oracle.com> (raw)
In-Reply-To: <jwv634kcrmk.fsf-monnier+emacs@gnu.org>
> 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.
So much for the famous user poll. ;-)
> 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.
Inappropriate assumption about user intention. Why assume that a user never
intends to activate the region when s?he sets the mark using C-SPC? Sometimes I
do and sometimes I don't.
Setting the mark sets a navigation point, but it also sets one end of the region
(by definition). If you want to select everything from here to there, and there
is no ready command that does that (as does `C-M-@' for sexps, for example),
then you want to set the mark here, move point there, and have the region
activated. That's not an uncommon intention.
Currently, you can avoid activating the region by using C-SPC C-SPC instead of
C-SPC. And if you activate it and change your mind, you can use C-g to
deactivate it. Not good enough?
If you think C-SPC C-SPC is too much trouble, then switch the two: Let C-SPC set
the mark without activating the region and C-SPC C-SPC set mark and activate. I
could live with that, and I'll bet other d-s-moders could too.
If t-m-mode is off, C-SPC C-SPC currently activates the region temporarily (i.e.
without turning on t-m-mode). This change would just mean that C-SPC C-SPC
always activates.
But we can do better: Let users decide individually, by adding an option that
says whether a single or a double C-SPC activates the region. The default could
be either (double, if you like). That way, John Default can use C-SPC to set
mark without activating and use C-SPC C-SPC to set and activate. And Jane
Customize can use C-SPC to set and activate and C-SPC C-SPC to set without
activating.
Even better: The option could be defined so that one possible choice separates
the navigational use from the region use completely. One of the possible values
would thus mean that the key that sets mark and activates the region would not
push it to the mark ring.
For example, let the option value be a cons of two commands, the car being for
C-SPC and the cdr for C-SPC C-SPC. The commands could be chosen from these:
a. set mark and push to mark-ring (do not activate)
b. set mark and activate (do not push to mark-ring)
c. set mark, activate, and push to mark-ring
A value of (a . b) would mean C-SPC sets mark for navigation only and C-SPC
C-SPC uses it only for selection. A value of (c . a) would give today's
behavior; (a . c) would swap today's keys.
> One of the problems left with it is what to do for C-x C-x.
Why not leave it as is? If t-m-mode is on, it activates; if off, it doesn't. The
real concern, I think, is what happens when one uses C-SPC (see above).
Or if C-x C-x C-g is really too much trouble, then add an option for this too.
> we'd want two commands: one that swap point and mark, and one that
> activates the region. Currently C-x C-x does both.
Only if t-m-mode is on.
> 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.
Just use C-g (or whatever new key we choose for deactivation).
And if someone never uses the active region, then by definition she never needs
t-m-mode, and s?he can just turn it off.
> 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.
Sure, why not? That would combine well with my suggestion above about C-SPC vs
C-SPC C-SPC. Let users choose the general behavior they want, and give them a
key to toggle the current active/inactive state. And set the default behavior to
whatever you want.
Do I have a great key in mind for activate/deactivate? Dunno. How about `C-z' or
`C-x C-z'? Does `suspend-frame' really need to be bound to both of those?
next prev parent reply other threads:[~2010-03-25 23:56 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87sk7pzqsp.fsf@ambire.localdomain>
2010-03-24 20:20 ` d-s-m default: nil Ulf Jasper
2010-03-24 20:26 ` Deniz Dogan
2010-03-25 0:24 ` d-s-m default: Nil + explanation! (was: d-s-m default) Memnon Anon
2010-03-25 4:22 ` Lennart Borgman
2010-03-25 8:24 ` d-s-m default: Nil + explanation! David Kastrup
2010-03-25 13:03 ` Lennart Borgman
2010-03-25 13:18 ` David Kastrup
2010-03-25 13:27 ` Lennart Borgman
2010-03-25 14:21 ` Davis Herring
2010-03-25 14:42 ` Lennart Borgman
2010-03-25 15:04 ` Drew Adams
2010-03-25 16:27 ` Tweaking t-m-m to make room for d-s-m Stefan Monnier
2010-03-25 17:51 ` Alan Mackenzie
2010-03-26 7:04 ` Juri Linkov
2010-03-25 23:56 ` Drew Adams [this message]
2010-03-26 2:36 ` Stefan Monnier
2010-03-26 8:28 ` mathias
2010-03-26 17:53 ` Drew Adams
2010-03-26 20:18 ` Lennart Borgman
2010-03-26 21:18 ` Drew Adams
2010-03-26 21:30 ` Lennart Borgman
2010-03-26 22:05 ` Christophe Poncy
2010-03-26 22:07 ` Lennart Borgman
2010-03-26 22:23 ` Drew Adams
2010-03-26 22:33 ` Lennart Borgman
2010-03-26 22:44 ` Drew Adams
2010-03-26 22:59 ` Lennart Borgman
2010-03-26 23:15 ` Drew Adams
2010-03-26 22:30 ` Christophe Poncy
2010-03-26 22:13 ` Drew Adams
2010-03-26 22:32 ` Lennart Borgman
2010-03-26 23:11 ` Drew Adams
2010-03-26 23:23 ` Lennart Borgman
2010-03-26 23:35 ` Drew Adams
2010-03-27 22:49 ` Richard Stallman
2010-03-27 23:27 ` Lennart Borgman
2010-03-27 23:37 ` Deniz Dogan
2010-03-27 23:53 ` Lennart Borgman
2010-03-28 0:28 ` Deniz Dogan
2010-03-29 23:38 ` Richard Stallman
2010-03-30 0:08 ` Lennart Borgman
2010-03-30 1:16 ` Christoph
2010-03-30 5:31 ` Richard Stallman
2010-03-30 6:38 ` Lennart Borgman
2010-03-30 9:47 ` Eli Zaretskii
2010-03-30 18:17 ` Chad Brown
2010-03-30 19:19 ` Lluís
2010-03-25 20:48 ` d-s-m default: t Noah Friedman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8D826837413D49AC968F80154D97F021@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.