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: Mon, 17 Sep 2018 12:28:47 +0700

On Mon, Sep 17, 2018 at 3:29 AM Drew Adams <address@hidden> wrote:

> > > The point of persistent blocks is that you can mark a region and leave
> > > it for a while before actually doing something to it. It is not a goal
> > > to be able to mark a block somewhere far away without ever leaving
> > > your position.
> >
> > And how, may I ask, you then indicate which of the "blocks" is to be
> > acted upon by some command?
>
> How do you choose anything in Emacs? There are many ways. […]
>
> (But I wonder why you even ask such a question.)

No, it is a valid question, and possibly one of the reasons why
persistent blocks went out of fashion. As I understand it, the pure
persistent block model started out in single-buffer, single-window
editors. In that setup, there is never more than one block.

As soon as you have buffers and windows, the “which one?” question
arises, and there are two major ways to answer it.

* You can say the block is global; if you select a block in buffer B,
then the block in buffer A is unselected. But this works against the
general idea of block persistence.

* Or you can say every buffer or window can have a block. Then you can
have an easy gesture for copying/moving/deleting the block in the
current buffer/window, but no natural way of direct inter-buffer or
inter-window copying/moving. (Asking the user a question equivalent to
“please type the first few characters of the selected region you’d
like to copy and press TAB or, at your leisure, make your way through
the 123 blocks currently active, one M-n at a time” is probably not
the answer.)

Several editors that had persistent blocks and multiple buffers
arrived at the mixed model: persistent buffer-local blocks +
clipboard. You can copy and move blocks within the current buffer
directly, but if you want to copy or move across buffers, you go to
the source buffer, copy or cut to clipboard, then go to the target
buffer and paste. Of course you can also do that in a single buffer.
So you now have two ways of doing the same things, and the less
versatile one falls into disuse. You now use the clipboard for most
copy and move operations.

Now there is a subtle shift in your workflow. Before, you could mark a
block, go to the target position, and press C-k v to move the block
here. Now, when you cut, point is moved to where you cut from, because
otherwise you could accidentally cut something and not notice it. So
you cut right after selecting, and now persistent blocks lose most of
the appeal.



reply via email to

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