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: hw
Subject: Re: delete-selection-mode as default
Date: Sun, 16 Sep 2018 15:36:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Yuri Khan <address@hidden> writes:

> On Sun, Sep 16, 2018 at 10:15 AM hw <address@hidden> wrote:
>
>> In joe, you make a selection by pressing C-k b to mark the beginning and
>> C-k k to mark the end of the selection.  The selection is called a block
>> in joe. It is highlighted.  You can change it any time by setting the
>> marks again.
>>
>> Now you can copy the block with C-k c, meaning the whole block is
>> inserted at point, and the copy is the new selection.  The beginning and
>> the end of a block (selection) can both be off screen.
>
> I recognize this as the WordStar block/region/selection model. Yes, I,
> too, was quite used to it in my Turbo Pascal years (late ’90s). Later,
> I migrated to Windows and got used to its CUA-like model.

Yes, joe is "wordstarlike".  You can start it with different names to
get different key bindings, though, like jmacs is like Emacs.

> [...]
> I think it is instructive to compare a few selection/region/block
> models, all of which have been quite successful.


,---- [ joe ]
|    New ways of selecting regions
|        The  classic  way  is to hit ^K B at the beginning and ^K K at the
|        end. These set pointers called markb and markk. Once these are set
|        you can jump to markb with Esc B and jump to markk with Esc K.
| 
|        New  way:  hit Ctrl-Right Arrow to start selecting rightward. Each
`----


The new ways refer to keys that don't work in a terminal unless you
manage to somehow configure them.  With mouse support, you use the mouse
to select.

There seems to be more to it because it seems that both pointers can be
remembered, and operations on a block are not possible when there is no
block highlighted. --- This also allows moving blocks, something that
Emacs can't do.

Also noteworthy:

,----
|    How do I deselect a highlighted region?
|        After  you  are finished with some region operations, you can just
|        leave the highlighting on if you don´t mind it (but don´t acciden‐
|        tally  hit ^K Y). If it really bothers you, however, just hit ^K B
|        ^K K, to turn the highlighting off.
| 
|        Beginning with JOE 4.2, you can hit ^C to cancel the region selec‐
|        tion.
`----


> * WordStar model: Block is delimited by two markers, and is
> highlighted. (Some implementations allow toggling the highlight; when
> highlight is off, markers are preserved but block commands are not
> available.) Moving the cursor or typing text does not affect block
> markers (except to adjust their positions to accommodate length
> changes). Basic block operations are: copy to point, move to point,
> delete, write to file, read from file. (The latter inserts the
> contents of the file at point and puts block markers around it.)

+ move block

I like that.

> * Brief model: Block is delimited by mark and point (like in Emacs).
> Pressing Alt+A starts selecting the corresponding type of block (which
> is highlighted); pressing the same key again removes the highlight.
> When selecting, newly typed text is inserted normally at point. Block
> operations are: cut, copy, paste, delete, write to file. When no block
> is highlighted, these act on the current line.
>
> * Windows model: Selection is defined by two positions, one of which
> is at point. Unshifted cursor movement cancels the selection, shifted
> cursor movement extends or shrinks it, text insertion replaces the
> selected text, and both Backspace and Delete delete the selected text.
> Selection operations are cut, copy, paste, and delete; when there is
> no selection, cut and copy are disabled, and Backspace and Delete act
> on one character backward and forward, respectively.

There are also multiple selections which you can usually make by holding
control and clicking on something with the trackball to include it into
a selection.  I'm not sure if there is a version of that which works
with text.  The wordstar model could work with multiple selections.



reply via email to

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