[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: delete-selection-mode
From: |
David Kastrup |
Subject: |
Re: delete-selection-mode |
Date: |
Thu, 18 Mar 2010 16:02:07 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> I also think that the distinction between kill-region and
>> delete-region would be more confusing than helpful to a beginner.
>
> Indeed.
>
>> OK. The penalty for that convenience is having your region explode and
>> disappear when you accidentally type a self-insert character (or arrow
>> key). This might happen if you hit the x before the M in M-x, or
>> something like that. Or, you might regionify a defun with C-M-h for some
>> reason and accidentally lose it.
>
> These are very valid concerns, and even if we don't enable delsel by
> default, I think we should try and come up with ways to reduce the
> pain. E.g. making sure that you can revert the damage with `undo'
> (e.g. the delsel behavior should only affect buffer where undo is
> enabled; and maybe undoing a self-insert which also deleted the region
> might undo the self-insert, undo the delete-region *and* re-activate
> the region).
I already mentioned the pattern C-y C-x C-x for inserting/modifying at
the top of a yanked insertion.
> delsel only applies to active regions, so it shouldn't affect users
> when t-m-m is disabled.
We have temporary transient mark mode, which is also turned on with
mouse selections.
> Many things have fallen into this category in the past:
> - X11 (need to use -nw).
> - menu-bar
> - tool-bar
> - scroll-bar
> - fringes
> - blinking-cursor
> - t-m-m
> - font-lock
> - mouse-1-click-follows-link
> - "prettification" of info buffers
None of those destroy your text.
>> Is there any evidence that delete-select-mode is instrinsically a
>> good thing, disregarding the fact that it has become common?
>
> For DEL, I think it is very natural, yes. For self-insert, I'm not
> really sure: I haven't been annoyed by it, but I haven't used it much
> either.
I think it is somewhat natural after mouse selections: after all, there
would be little point in mouse-selecting a region only to insert at one
end of the region. There is the possible use of double/triple-clicking
in order to _move_ fast to beginning of word/line, but I don't think
that people make use of that much.
So something which extends mouse-region-delete-keys' functionality to
self-insert would not bother me.
--
David Kastrup
- RE: delete-selection-mode, (continued)
- RE: delete-selection-mode, Berndl, Klaus, 2010/03/18
- Re: delete-selection-mode, David Kastrup, 2010/03/18
- AW: delete-selection-mode, Berndl, Klaus, 2010/03/18
- RE: delete-selection-mode, Drew Adams, 2010/03/18
- Re: delete-selection-mode, Juri Linkov, 2010/03/18
- Re: delete-selection-mode, Miles Bader, 2010/03/18
- Re: delete-selection-mode, David Kastrup, 2010/03/18
- Re: delete-selection-mode, Juri Linkov, 2010/03/18
- Re: delete-selection-mode, David Kastrup, 2010/03/19
- Re: delete-selection-mode, Stefan Monnier, 2010/03/18
- Re: delete-selection-mode,
David Kastrup <=
- RE: delete-selection-mode (was: Put scroll-bar on right by defaulton UNIX.), Drew Adams, 2010/03/18
- Re: delete-selection-mode, David Kastrup, 2010/03/18
- Re: delete-selection-mode, Chad Brown, 2010/03/18
- RE: delete-selection-mode, Drew Adams, 2010/03/18
- Re: delete-selection-mode, David Kastrup, 2010/03/19
- RE: delete-selection-mode, Drew Adams, 2010/03/19
- Re: delete-selection-mode, David Kastrup, 2010/03/19
- RE: delete-selection-mode, Drew Adams, 2010/03/19
- Re: delete-selection-mode, David Kastrup, 2010/03/19
- Re: delete-selection-mode, Juri Linkov, 2010/03/19