emacs-devel
[Top][All Lists]
Advanced

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

Re: Shift-movement selection


From: Alan Mackenzie
Subject: Re: Shift-movement selection
Date: Tue, 11 Mar 2008 22:33:35 +0000
User-agent: Mutt/1.5.9i

On Sun, Mar 09, 2008 at 11:37:27PM -0400, Stefan Monnier wrote:
> >> (defun activate-on-shift-selecting-movement ()
> >> (if (this-command-keys-are-shifted-p)
> >> (progn
> >> (setq shift-selecting-movement t)
> >> (unless mark-active (set-mark)))
> >> (when shift-selecting-movement
> >> (setq shift-selecting-movement nil)
> >> (when mark-active (deactivate-mark)))))
> >> 
> >> and then call it from wherever it's considered useful
> >> (e.g. forward-char, next-line, ...).

> > AFAICS, such an approach would make deselection much less likely to work
> > consistently:  the way it's _supposed_ to work is that any pretty much
> > any command except for the special shifted versions should cause
> > deactivation -- and in emacs that's pretty much _every command_.
> > So to make it work "correctly", you need to modify all commands in
> > emacs!  [yikes!]

> Most commands already deactivate the mark.  So which ones would be left?

Scrolling commands should not deactivate the mark; things like C-l,
C-M-l, .....  After all, you're going to be wanting to shift point to
the middle of the screen to see more of what you might want to put into
the region.  C-x 2 should not deactivate the mark, neither should
commands which operate on the other window (such as
scroll-other-window-down).  In fact, more or less all commands with the
'isearch-scroll property could usefully have a 'no-demarkation property.

> Do they matter?

Yes, they matter very much.  Well, they would for me if I were to start
using shift-movement to extend a region.  Two of the most inhibiting
things for me whilst using a "lowest common denominator" editor are the
fear of a painsteakingly created region vanishing in a puff of smoke at a
careless keypress, and the annoyance of practically all the features of
the editor being unavailable whenever I have a region I don't want to
lose.  It would be nice, at least for me, for these annoyances to be
reduced as far as possible.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).




reply via email to

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