emacs-devel
[Top][All Lists]
Advanced

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

RE: delete-selection-mode


From: Drew Adams
Subject: RE: delete-selection-mode
Date: Sun, 20 Apr 2008 14:06:05 -0700

> Does really nobody have an idea how to improve the situation?  Maybe
> generalize mouse-deletion-mode (or what it is called) somewhat: I think
> that I could tolerate an active region being deleted by typing DEL.

I shudder to post on this topic, especially replying to you, David, but here
goes. ;-) This is not an argument for choosing delete-selection-mode as the
default behavior. It's a reply to your request for ideas for improvement.

How about starting with delete-selection-mode (regardless of whether it would
become the default behavior - let's assume not, here), and trying to improve it
so that it plays better with your use cases?

For example, you say that you don't want to delete the active region sometimes
when you type text. Never? Sometimes? When? Maybe you can characterize the use
cases better (to yourself at least).

The delsel.el code might already provide some of the infrastructure for the
improvements that would make it useful for you; I don't know. There is, for
example, the ability to classify commands wrt their delete-selection-mode
behavior (kill, yank, supersede, delete (t)) - the `delete-selection' property.

This is pretty rudimentary currently. It might be one thing that could be
tweaked - either by further classifying certain commands where you don't want
the region deleted/replaced, or perhaps by adding more behavior types (besides
kill, yank, etc.). Perhaps not just the current command but other parts of the
current context and history could also usefully be taken into account.

Dunno if it would help, but you might thus want to start with delsel, and
improve it so it's not so obnoxious in your use cases. The code is short and
simple. It could be a good place to improve things.

Of course, "improve" is in the eye of the beholder. But I suspect that by
characterizing your use cases and making the code respond better to them, we
might even end up reducing the thrashing about preferred behavior, instead of
increasing it. Call me an optimist. :-)

Unlike the case of CUA selection and CUA mode, where one explicit goal is to
stay very close to what non-Emacs users are used to, I think that improving
delete-selection mode might just provide us the opportunity to come up with
something great - something that is not only good for Emacs users of different
habits but also much better than anything else out there. Call me a dreamer.

On the default-behavior question, I'd say that we should consider the decision
still open for future discussion. Whatever the current behavior is, I don't
think we've come as close to a fix point as we can or need to. Which default
behavior to use while the discussion goes on, I don't really care.

I agree with David that we should try to see if we can't improve on the current
alternatives a bit. That means discussing different use cases and things that
bother us about each current alternative. That's frustrating as hell, granted,
but if we take David's tack of looking to improvement of our options instead of
just trying to sell each other on our current preference, we might just move the
schmilblick forward a bit.






reply via email to

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