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: Alan Mackenzie
Subject: Re: delete-selection-mode as default
Date: Sat, 15 Sep 2018 10:20:16 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hello, Eli.

On Sat, Sep 15, 2018 at 10:50:18 +0300, Eli Zaretskii wrote:
> > Date: Fri, 14 Sep 2018 13:57:59 -0700 (PDT)
> > From: Drew Adams <address@hidden>
> > Cc: address@hidden, address@hidden, address@hidden, address@hidden,
> >         address@hidden, address@hidden, address@hidden,
> >         address@hidden

[ .... ]

> My point is that even users who know what they are doing currently
> have no good means to tell that to Emacs on a case by case basis.  If
> they turn on transient-mark-mode, they get a whole slew of non-trivial
> behaviors as a single package deal; if they turn on
> delete-selection-mode, they have another package deal which
> contradicts some of the one they get with transient-mark-mode.

> My proposal is to give users a more fine-grained control of that, so
> that users could control the "meaning" of the current region with
> easily typed commands, and by that tell the next command(s) how to
> interpret the region.  The implementation of this proposal could be
> based on a new "state" of the region, which will be the 3rd state in
> addition to the currently-available "active" and "inactive" states.
> The 3rd state will have the semantics of supporting the behavior
> provided by the commands that have the delete-selection property on
> their symbols.  Or it could be based on something else.  The important
> facet of the proposal is that we need to introduce easily typed
> commands that will assign one of the 3 possible meanings to the
> current region.

> With that, users will have the capability of using delete-selection
> features when they need them, without deciding up front that they
> prefer those features to other commands that pay attention to active
> regions.  We could also teach the commands which could support either
> behavior to DTRT by default using some heuristics.  All of this and
> more is currently impossible because the same state of the region is
> interpreted differently by some commands given a global mode.

I can't help feeling that this isn't the right approach.  I feel that it
will increase complexity which the new features won't justify.  I know
I'm speaking as an "extremist" (i.e. no transient-mark-mode at all) here,
but still: I think having to press a key sequence before d-s-m would work
would take the purpose of d-s-m away - that key sequence might as well be
C-w.

You seem to be proposing to associate a three-value state with the
region, which state users could change with key sequences.  I can see
this being more confusing than the current two-value state (or is it
2.5?) we currently have.

It might well be that, having introduced transient-mark-mode as a
default, a certain degree of confusion in Emacs is unavoidable.  If so,
does it make sense to spend a lot of effort which might merely switch the
confusion to somewhere else?  Assuming that we'd want to have options to
retain all the "old" behaviour, I think it would be difficult to avoid
increasing the confusion.

I've interacted somewhat with hw, who's been driving this thread, and
come to the conclusion that he doesn't really want to use Emacs.  The
mechanisms of point, mark, and the regions are fundamental to Emacs and
can't be readily customised away.  I don't think we should try to provide
this customisability.

Sorry if I've been a bit negative in this post.

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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