[Top][All Lists]

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

visual-region-mode? (was: delete-selection-mode as default)

From: hw
Subject: visual-region-mode? (was: delete-selection-mode as default)
Date: Mon, 10 Sep 2018 13:52:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

address@hidden (Charles A. Roelli) writes:

>> From: hw <address@hidden>
>> Cc: Richard Stallman <address@hidden>, address@hidden,
>>      emacs-devel <address@hidden>
>> Date: Sat, 08 Sep 2018 17:52:07 +0200
>> Elias MÃ¥rtenson <address@hidden> writes:
>> > Without active regions, there would never be an expectation that backspace
>> > deletes anything but one character.
>> How come it wasn't distinguished between the concept of a region being
>> active and the visual aid of marking a region?
> Separating these two concepts could be useful,
> but Emacs would then need some other way of showing the user that a
> region is active,

Whether regions can be active or not, and whether "active" means that
they limit or extend operations to themselves, or both, might depend on
settings and doesn't necessarily need to be shown all the time.

> like a mode line indicator.

Such a mode line indicator would need to show which regions are active
when there several and in which way each one of them is active because
there are multiple ways of being active.

Perhaps it could generally show if any region is active and change when
point is within a region to show more of its details.

> We would then also need bindings for activating and deactivating the
> region, and for turning the visual aid on and off.

Another C-spc after starting to mark a region might do to end the

What would the advantage of hidden regions be?  When something is within
a region, it should be highlighted, and when it is no longer
highlighted, it should no longer be within a region.

Are these hidden regions a remnant of technical limitations that made it
advisable not to highlight the selection?

Perhaps region selections could be remembered in registers to make it
easier to re-create them once they were disabled to suppress the

>> [...]
>> I think for the strict-selection-mode I'd prefer, it would help to
>> disable transient-mark-mode.  But how can I see what I have selected?
> The most common answer to that is to use "C-u C-x C-x", which
> temporarily activates the region (thus highlighting it) and exchanges
> the point and the mark.  But there is no command to turn on the
> highlighting of the region directly.

Doesn't that enable transient-mark-mode?  If I wanted t-m-m, I could
just leave it enabled to begin with.

I tried with t-m-m disabled, and I don't see what the point of having it
disabled is.  Regions are not protected any better, and I'd have to be
stupid to select a region to do something I want to affect the whole

>> It would even be possible to leave the visual markers active while the
>> user is doing something else if transient-mark-mode didn't insist on the
>> region being active when it's visually highlighted.  
> I'd like this too.

It could be accompanied by a region-mode in which nothing can be done to
and with anything outside of the regions.

>>                                                     It would only need
>> a key binding to stop marking a region.  I'd appreciate it if I didn't
>> need to always do something with a region immediately and could leave it
>> highlighted, or leave several regions highlighted at the same time.
> For a second region, use the secondary selection.  We don't yet have
> keyboard bindings for its commands, unfortunately, though Drew's
> package "second-sel" suggests C-M-y:
> https://www.emacswiki.org/emacs/SecondarySelection#second-sel.el

Isn't is easier to use registers instead?

reply via email to

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