[Top][All Lists]

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

Re: delete-selection-mode as default

From: Alan Mackenzie
Subject: Re: delete-selection-mode as default
Date: Thu, 13 Sep 2018 17:46:40 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hello, hw.

On Thu, Sep 13, 2018 at 06:16:24 +0200, hw wrote:
> Alan Mackenzie <address@hidden> writes:

> > On Wed, Sep 12, 2018 at 00:34:11 +0200, hw wrote:
> >> Drew Adams <address@hidden> writes:

> >> Highlighting regions should be separated from whether they are active
> >> or not, and I don't want hidden regions, either.

> > I do.  I want point and mark, and the region between them to be regarded
> > as "the" region.  That's it.  I currently (almost) have that option.

> How do I get the region highlighted so I can see where it is?

You can't, as far as I'm aware, except by using transient-mark-mode.  If
you want such a facility, implement it!

> > There's exactly one region, except when there's none (before the mark has
> > been set in a buffer).

> There shouldn't be one unless it's highlighted.  If highlighted, it
> depends on how you consider it:  multiple regions, or still one region
> which is non-consecutive.

Don't confuse your personal preferences with objective things.  We all
use Emacs differently, which is why it is so customisable.  If you can't
customise it to work the way you want, that is likely a bug, which you
should feel free to fix.

[ .... ]

> > No, it [the mark]'s central and essential to how Emacs works.  There
> > is ONE region, the part of the buffer between mark and point.  Let's
> > not muck around with this.

> Then how come I can't even see where the mark is, let alone the region?
> Why is that not displayed?

Because this was tried and found counter-productive.

> >> Do you mean they would rather do things with hidden regions?  I never
> >> want to do that.

> > I do.  I don't want my region highlighted, ever.

> Why not?

Personal preference.

> When highlighting screws up your syntax highlighting, maybe a different
> way of highlighting could help.  Even only marking the fringes of lines
> that are selected would be better than nothing.

I prefer nothing, thanks.  Would you want to make my preferred way of
working impossible?

> How do you limit functions to a part of a buffer when you do not use
> transient-mark-mode?

By narrowing.  C-x n n narrows to the region.  C-x n w widens to the
entire buffer.  C-x n d narrows to the current source code function.  Try
it!  Look it up in the Emacs manual (e.g., with C-i narrowing).

[ .... ]

> > Who really wants to have several regions, and why?  I think the times
> > one would want several regions would be so rare as to be pure
> > unjustified complexity.

> One reason is visual indication.  I can set a register or a bookmark in
> a buffer and never see it, or I can write 'FIXME:' comments which is
> silly when I'm working on something so that it's gona be fixed anyway,
> and hard to see --- or I could highlight the lines I'm concerned about
> and need to look into.  If I could highlight parts, I could go through
> the source and read it, which I do anyway, highlight the relevant places
> and have it much easier to move around and to find things and not
> overlook something.  It could be a big relieve because I don't need to
> remember so much all at the same time because I could just see it
> highlighted.

As a matter of interest, you can easily arrange for all occurrences of
FIXME: to be highlighted, with hi-lock-mode (look it up in the manual).

> If it wouldn't screw up regions and do what ever hidden stuff, I might
> even use the mark for navigation, so navigating would be easier in two
> ways.

I suggest you try this use of the mark anyway.

[ .... ]

> > Monkey?

> ... around with temporary t-m-m to limit functions to selections.


> > One of the uses of C-x C-x is to check what is currently in the region.
> > Typically, you'd type it twice, to get back to your starting point.

> Why would I?

Then you see for sure where mark is.  It's an alternative to having the
region highlighted, which might work for you, it might not.

> >> I never use C-x C-x, so it doesn't make a difference otherwise, which
> >> leaves nothing but disadvantages to having t-m-m disabled.

> > There are many advantages to having transient-mark-mode disabled:
> > primarily simplicity, and the severe reduction in the modal behaviour (in
> > the sense of key sequences doing different things in things like vi's
> > insert mode and command mode).  And I'm not happy having my font-locking
> > splatted by the region's highlighting.

> Any simplicity here is no more than a deceptive apparition.

:-)  No, the simplicity is real.

> It's not like I like transient-mark-mode, it's only the least evil.  The
> concept of "the" region and having it all messed up with each other is
> what's really evil.

I dislike transient-mark-mode quite strongly.  I have the option to
disable it, which I do.  You have that option, too.  You also have the
option to extend Emacs to do what you want.

> I want my selection highlighted.  I'd also need to have regions and
> selections decoupled from the navigation.  There's no sense in "the"
> region.

There's a lot of sense in it.  Otherwise, it would have been superseded
or extended sometime over the last 40 years of Emacs's existence.

> I don't need a region to navigate.  I don't need a region for a
> selection.  I need to navigate and to select, independently of each
> other, and I especially don't need "the" lurking hidden region to screw
> things up for me because it's coupled to everything.

I do.  It works smoothly for me, and I never find things "screwing up"
for me in the way you're depicting.

> > But everybody's different here, with different preferences, likes, hates.
> > It's a mistake (which I've made quite a few times) to assume that
> > "obvious" options in Emacs actually are obvious.

> Is there anything obvious about Emacs? :)

Yes, lots of things.

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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