Support for Shift Selection
commit773a3c624ed0063d1bd800b24bbd44d5785cdb07
authorCarsten Dominik <carsten.dominik@gmail.com>
Mon, 26 Jan 2009 15:23:44 +0000 (26 16:23 +0100)
committerCarsten Dominik <carsten.dominik@gmail.com>
Mon, 26 Jan 2009 15:23:44 +0000 (26 16:23 +0100)
tree9a2bef2e569bedf72f9b9ab7337b696652d8855b
parentf31255c8f32a06a814da293867b0605685a85355
Support for Shift Selection

Emacs 23 introduces `shift-selection-mode', and even turns it on by
default.  Therefore, it is fair to assume that users of Emacs 23 will
expect to be able to select a region by holding down shift will moving
the cursor.  This conflicts with the use of shifted cursor keys in
Org-mode for other purposes, in particular to "change the item under
the cursor", like it is done for time stamps, item bullet types, TODO
keywords and priorities.

This commit tries to support `shift-selection-mode' as much as possible,
while retaining these valuable commands keys for Org-mode.  The
following things are changed:

1. The range of contexts where Org's commands do act is reduced.

  - S-up and S-down no longer jump to the previous and next plain list
    item - you can use the paragraph commands C-up and C-down for this
    quite well.

  - S-left and S-right only change the bullet type of a plain list
    item when the cursor is *exactly* on the bullet, not just anywhere
    in the item line.

2. When a S-cursor key is used outside a special context, a region is
   started or extended.

3. When a region has already been started, it will be continue to
   extend even if the S-cursor keys move the cursor into a special
   context.

4. If you want S-cursor selection to work in headlines as well, you
   can set the variable `org-support-shift-select' to
   `even-in-headlines'.  Then you need to rely on `C-c C-t' to set
   TODO keywords, and on `C-c ,' to set priorities.

If you want everything to behave the way it was, set
`org-support-shift-select' to nil.
ChangeLog
doc/ChangeLog
doc/org.texi
lisp/ChangeLog
lisp/org-list.el
lisp/org.el