emacs-devel
[Top][All Lists]
Advanced

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

Re: delete-selection-mode as default


From: Yuri Khan
Subject: Re: delete-selection-mode as default
Date: Thu, 20 Sep 2018 12:45:52 +0700

On Thu, Sep 20, 2018 at 8:46 AM Richard Stallman <address@hidden> wrote:

>   > some text without replacing the selection.
>
>   > C-g <type some text> C-S-g
>
> If C-S-g were given a suitable definition,
> that command sequence would do what you have in mind.
>
> However, it requires typing two extra characters, so it is an
> inconvenience in something that is currently easy and natural.
> It also requires remembering more.

You are using the current default Emacs behavior
(delete-selection-mode off) as the baseline for comparison. In that
setup, yes, you can insert text right away.

However, the context of discussion is when delete-selection-mode is
on. In that setup, typing new text replaces the selection, and the
assumption is that most new users expect that and want that behavior
most of the time. So, in the rare case that one wants to insert text
without replacing the active region, one has two options:

a) Disable delete-selection-mode temporarily, insert new text, and
then enable d-s-m again. This takes a minimum of two extra key
presses, if d-s-m is bound to a key; more if it isn’t.

b) Deactivate the region, insert new text, then reactivate the region.

b0) As far as I can tell, currently, the most economical way to do
that is C-g then C-x C-x (three extra key presses), and it has a side
effect of exchanging mark and point.

b1) A novice user will typically deactivate the region by doing a
dummy point movement, either by clicking at the point, or by two
mutually canceling motions: <left> <right>. After inserting new text,
if they still need the region to be active, they will most probably
re-select it, with whatever selection gesture they are used to (mouse
or shift-selection).

So my suggestion is no worse than the existing solutions.



reply via email to

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