[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: AW: delete-selection-mode
From: |
Drew Adams |
Subject: |
RE: AW: delete-selection-mode |
Date: |
Thu, 18 Mar 2010 10:10:23 -0700 |
> >> You can set the mark, move somewhere else, type stuff there, and
> >> return using C-x C-x, again typing stuff there, without destroying
> >> anything you have written.
>
> > Again, that's just a rehash of an argument why we should *not* even
> > have t-m-mode as the default.
>
> Huh? That works fine with transient-mark-mode.
Yes, it works with t-m-mode. But there is no reason to have t-m-mode or an
active region, to be able to do that. The example uses nothing about t-m-mode.
That is straight, classic behavior for a non-active region.
As Stefan pointed out, you might or might not have t-m-mode on when doing that,
but you are essentially ignoring t-m-mode and the active region in that example:
Stefan> But this lacks crucial info about transient-mark-mode:
> if you don't have transient-mark-mode enabled, the above example
> will not be affected by delsel or any of its siblings.
>
> OTOH if you do have t-m-m enabled, then you'll probably want
> to use C-u C-x C-x rather than C-x C-x and also use
> C-SPC C-SPC (so as not to activate the mark, to avoid
> spuriously highlighting the region while you're moving around),
> in which case again delsel will have no impact.
It's simple:
a. Without an active region in the sense expected by new users (e.g. with
d-s-mode off), you can do what you described without hitting any extra keys. OK,
fine.
With an active region (e.g. with d-s-mode on), you have to hit C-g to deactivate
the region, but otherwise, your same example applies equally. So: one extra
key-press.
b. OTOH, to get the usual (for most people) type-to-replace behavior with
d-s-mode off, you need to hit C-w (or `delete-region', e.g. DEL). Again: one
extra key-press.
Each approach can be said to have an advantage and a corresponding disadvantage.
You need to hit an extra key (either C-g or C-w/DEL), depending on which
approach you take and whether you want to replace the region or add text
elsewhere.
So the questions are:
1. Which action is more common: replacing selected text or adding text outside
the selection.
2. Which behavior is more expected by new users (since we're talking about the
default).
I use d-s-mode. I have no problem doing the kind of thing you describe. I
regularly use marks that way (navigationally), without being bothered in any way
by the active region.
I can always deactivate it, using C-g. But oddly enough, I find that I rarely
need to use C-g that way. Most of the time, other actions have already
deactivated the region when I need it to be inactive.
- RE: AW: delete-selection-mode, (continued)
- Re: AW: delete-selection-mode, Chong Yidong, 2010/03/18
- Re: AW: delete-selection-mode, Stefan Monnier, 2010/03/18
- Re: AW: delete-selection-mode, David Kastrup, 2010/03/18
- Re: AW: delete-selection-mode, Stefan Monnier, 2010/03/18
- Re: AW: delete-selection-mode, David Kastrup, 2010/03/18
- RE: AW: delete-selection-mode, Drew Adams, 2010/03/17
- Re: AW: delete-selection-mode, David Kastrup, 2010/03/18
- Re: AW: delete-selection-mode, Richard Stallman, 2010/03/18
- RE: AW: delete-selection-mode,
Drew Adams <=
- Re: delete-selection-mode, Alan Mackenzie, 2010/03/18
- Re: delete-selection-mode, David Kastrup, 2010/03/18
- Re: AW: delete-selection-mode, Juri Linkov, 2010/03/17
- Re: AW: delete-selection-mode, David Kastrup, 2010/03/18
- Re: AW: delete-selection-mode, Harald Hanche-Olsen, 2010/03/17
- Re: AW: delete-selection-mode, David Kastrup, 2010/03/18
- Re: AW: delete-selection-mode, Chad Brown, 2010/03/18
- Re: AW: delete-selection-mode, Stefan Monnier, 2010/03/18
- Re: AW: delete-selection-mode, Chad Brown, 2010/03/18
- Re: AW: delete-selection-mode, Stefan Monnier, 2010/03/18