[Top][All Lists]
[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).
- Re: Shift-movement selection, (continued)
- Re: Shift-movement selection, Miles Bader, 2008/03/10
- Re: Shift-movement selection, Stefan Monnier, 2008/03/11
- Re: Shift-movement selection, Richard Stallman, 2008/03/11
- Re: Shift-movement selection, Richard Stallman, 2008/03/10
- Re: Shift-movement selection, Stefan Monnier, 2008/03/10
- Re: Shift-movement selection, Richard Stallman, 2008/03/11
- Re: Shift-movement selection, Lennart Borgman (gmail), 2008/03/11
- Re: Shift-movement selection, Richard Stallman, 2008/03/12
- Re: Shift-movement selection,
Alan Mackenzie <=
- Re: position on changing defaults?, Stefan Monnier, 2008/03/06
- Re: position on changing defaults?, Miles Bader, 2008/03/06
- Re: position on changing defaults?, Richard Stallman, 2008/03/08
- Re: position on changing defaults?, Richard Stallman, 2008/03/08
- Re: position on changing defaults?, Kim F. Storm, 2008/03/08
- Re: position on changing defaults?, Kim F. Storm, 2008/03/08
- Re: position on changing defaults?, Stefan Monnier, 2008/03/08
- Re: position on changing defaults?, Richard Stallman, 2008/03/09
- Re: position on changing defaults?, Stefan Monnier, 2008/03/09
- Re: position on changing defaults?, Kim F. Storm, 2008/03/09