unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Tweaking t-m-m to make room for d-s-m
Date: Thu, 25 Mar 2010 12:27:50 -0400	[thread overview]
Message-ID: <jwv634kcrmk.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87mxxw6c7b.fsf@lola.goethe.zz> (David Kastrup's message of "Thu,  25 Mar 2010 09:24:24 +0100")

> 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




  parent reply	other threads:[~2010-03-25 16:27 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       ` Stefan Monnier [this message]
2010-03-25 17:51         ` Tweaking t-m-m to make room for d-s-m Alan Mackenzie
2010-03-26  7:04           ` Juri Linkov
2010-03-25 23:56         ` Drew Adams
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv634kcrmk.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).