emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp/org ChangeLog org-agenda.el org-arch...


From: Carsten Dominik
Subject: [Emacs-diffs] emacs/lisp/org ChangeLog org-agenda.el org-arch...
Date: Tue, 27 Jan 2009 11:38:24 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Carsten Dominik <cdominik>      09/01/27 11:38:24

Modified files:
        lisp/org       : ChangeLog org-agenda.el org-archive.el 
                         org-attach.el org-bbdb.el org-bibtex.el 
                         org-clock.el org-colview.el org-compat.el 
                         org-exp.el org-export-latex.el org-faces.el 
                         org-footnote.el org-gnus.el org-id.el 
                         org-info.el org-irc.el org-jsinfo.el 
                         org-list.el org-mac-message.el org-macs.el 
                         org-mew.el org-mhe.el org-mouse.el org-plot.el 
                         org-publish.el org-remember.el org-rmail.el 
                         org-table.el org-timer.el org-vm.el org-w3m.el 
                         org-wl.el org.el 

Log message:
        2009-01-27  Carsten Dominik  <address@hidden>
        
                * org.el (org-todo): Return correct state type even if the 
blocker
                throws an error.
                (org-modifier-cursor-error): Renamed from
                `org-shiftcursor-error'.
                (org-shiftmetaleft, org-shiftmetaright, org-shiftmetaup)
                (org-shiftmetadown): Call `org-modifier-cursor-error'.
        
                * org-agenda.el (org-agenda-todo): Call `org-todo' 
interactively,
                to get real errors from the blocker hook.
        
                * org.el (org-shiftselect-error, org-call-for-shift-select): New
                functions.
                (org-set-visibility-according-to-property): Turn off the setting
                of `org-show-entry-below', to avoid overruling a FOLDED 
visibility
                property.
        
                * org.el (org-support-shift-select): New option.
                (org-shiftup, org-shiftdown, org-shiftright, org-shiftleft)
                (org-shiftcontrolright, org-shiftcontrolleft): Support for shift
                selection outside contexts.
        
                * org-list.el (org-at-item-bullet-p): New function.
        
                * org-jsinfo.el (org-infojs-handle-options): Remove unnecessary
                variables.
        
                * org-footnote.el (org-footnote-normalize): Remove unnecessary
                variable.
                (org-insert-footnote-reference-near-definition): Remove
                unnecessary let form.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/ChangeLog?cvsroot=emacs&r1=1.52&r2=1.53
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-agenda.el?cvsroot=emacs&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-archive.el?cvsroot=emacs&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-attach.el?cvsroot=emacs&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-bbdb.el?cvsroot=emacs&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-bibtex.el?cvsroot=emacs&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-clock.el?cvsroot=emacs&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-colview.el?cvsroot=emacs&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-compat.el?cvsroot=emacs&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-exp.el?cvsroot=emacs&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-export-latex.el?cvsroot=emacs&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-faces.el?cvsroot=emacs&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-footnote.el?cvsroot=emacs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-gnus.el?cvsroot=emacs&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-id.el?cvsroot=emacs&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-info.el?cvsroot=emacs&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-irc.el?cvsroot=emacs&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-jsinfo.el?cvsroot=emacs&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-list.el?cvsroot=emacs&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-mac-message.el?cvsroot=emacs&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-macs.el?cvsroot=emacs&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-mew.el?cvsroot=emacs&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-mhe.el?cvsroot=emacs&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-mouse.el?cvsroot=emacs&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-plot.el?cvsroot=emacs&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-publish.el?cvsroot=emacs&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-remember.el?cvsroot=emacs&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-rmail.el?cvsroot=emacs&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-table.el?cvsroot=emacs&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-timer.el?cvsroot=emacs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-vm.el?cvsroot=emacs&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-w3m.el?cvsroot=emacs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-wl.el?cvsroot=emacs&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org.el?cvsroot=emacs&r1=1.38&r2=1.39

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/ChangeLog,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- ChangeLog   26 Jan 2009 08:39:48 -0000      1.52
+++ ChangeLog   27 Jan 2009 11:38:21 -0000      1.53
@@ -1,3 +1,36 @@
+2009-01-27  Carsten Dominik  <address@hidden>
+
+       * org.el (org-todo): Return correct state type even if the blocker
+       throws an error.
+       (org-modifier-cursor-error): Renamed from
+       `org-shiftcursor-error'.
+       (org-shiftmetaleft, org-shiftmetaright, org-shiftmetaup)
+       (org-shiftmetadown): Call `org-modifier-cursor-error'.
+
+       * org-agenda.el (org-agenda-todo): Call `org-todo' interactively,
+       to get real errors from the blocker hook.
+
+       * org.el (org-shiftselect-error, org-call-for-shift-select): New
+       functions.
+       (org-set-visibility-according-to-property): Turn off the setting
+       of `org-show-entry-below', to avoid overruling a FOLDED visibility
+       property.
+
+       * org.el (org-support-shift-select): New option.
+       (org-shiftup, org-shiftdown, org-shiftright, org-shiftleft)
+       (org-shiftcontrolright, org-shiftcontrolleft): Support for shift
+       selection outside contexts.
+
+       * org-list.el (org-at-item-bullet-p): New function.
+
+       * org-jsinfo.el (org-infojs-handle-options): Remove unnecessary
+       variables.
+
+       * org-footnote.el (org-footnote-normalize): Remove unnecessary
+       variable.
+       (org-insert-footnote-reference-near-definition): Remove
+       unnecessary let form.
+
 2009-01-26  Carsten Dominik  <address@hidden>
 
        * org-export-latex.el (org-export-as-latex): Call

Index: org-agenda.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-agenda.el,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- org-agenda.el       25 Jan 2009 15:49:43 -0000      1.22
+++ org-agenda.el       27 Jan 2009 11:38:21 -0000      1.23
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -2612,7 +2612,7 @@
                      'keymap org-agenda-keymap
                      'help-echo (format "mouse-2 or RET jump to location")))
         regexp rtn rtnall files file pos
-        marker priority category tags c neg re
+        marker category tags c neg re
         ee txt beg end words regexps+ regexps- hdl-only buffer beg1 str)
     (unless (and (not edit-at)
                 (stringp string)
@@ -3715,7 +3715,7 @@
         (regexp org-tr-regexp)
         (d0 (calendar-absolute-from-gregorian date))
         marker hdmarker ee txt d1 d2 s1 s2 timestr category todo-state tags pos
-        donep head)
+        head)
     (goto-char (point-min))
     (while (re-search-forward regexp nil t)
       (catch :skip
@@ -4324,7 +4324,7 @@
        (effort-prompt "")
        (inhibit-read-only t)
        (current org-agenda-filter)
-       char a n tag tags)
+       char a n tag)
     (unless char
       (message
        "%s by tag [%s ], [TAB], [/]:off, [+-]:narrow, [>=<]:effort: "
@@ -4423,7 +4423,7 @@
       (while (not (eobp))
        (if (get-text-property (point) 'org-marker)
            (progn
-             (setq tags (get-text-property (point) 'tags))
+             (setq tags (get-text-property (point) 'tags)) ; used in eval
              (if (not (eval org-agenda-filter-form))
                  (org-agenda-filter-by-tag-hide-line))
              (beginning-of-line 2))
@@ -5084,7 +5084,7 @@
        (save-excursion
          (and (outline-next-heading)
               (org-flag-heading nil)))   ; show the next heading
-       (org-todo arg)
+       (call-interactively 'org-todo)
        (and (bolp) (forward-char 1))
        (setq newhead (org-get-heading))
        (when (and (org-bound-and-true-p
@@ -5419,7 +5419,7 @@
 
 The cursor may be at a date in the calendar, or in the Org agenda."
   (interactive)
-  (let (pos ans)
+  (let (ans)
     (message "Select action: [m]ark | [s]chedule [d]eadline [r]emember [ 
]show")
     (setq ans (read-char-exclusive))
     (cond

Index: org-archive.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-archive.el,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- org-archive.el      26 Jan 2009 07:44:42 -0000      1.19
+++ org-archive.el      27 Jan 2009 11:38:21 -0000      1.20
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-attach.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-attach.el,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- org-attach.el       25 Jan 2009 15:49:43 -0000      1.12
+++ org-attach.el       27 Jan 2009 11:38:21 -0000      1.13
@@ -4,7 +4,7 @@
 
 ;; Author: John Wiegley <address@hidden>
 ;; Keywords: org data task
-;; Version: 6.19a
+;; Version: 6.19e
 
 ;; This file is part of GNU Emacs.
 ;;

Index: org-bbdb.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-bbdb.el,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- org-bbdb.el 25 Jan 2009 15:49:43 -0000      1.19
+++ org-bbdb.el 27 Jan 2009 11:38:21 -0000      1.20
@@ -7,7 +7,7 @@
 ;;         Thomas Baumann <thomas dot baumann at ch dot tum dot de>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -292,7 +292,7 @@
          (y (nth 2 date))  ; year
          (annivs (gethash (list m d) org-bbdb-anniv-hash))
          (text ())
-         split class form rec recs)
+         rec recs)
 
     ;; we don't want to miss people born on Feb. 29th
     (when (and (= m 3) (= d 1)

Index: org-bibtex.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-bibtex.el,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- org-bibtex.el       25 Jan 2009 15:49:44 -0000      1.17
+++ org-bibtex.el       27 Jan 2009 11:38:21 -0000      1.18
@@ -5,7 +5,7 @@
 ;; Author: Bastien Guerry <bzg at altern dot org>
 ;;         Carsten Dominik <carsten dot dominik at gmail dot com>
 ;; Keywords: org, wp, remember
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-clock.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-clock.el,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- org-clock.el        26 Jan 2009 07:44:42 -0000      1.20
+++ org-clock.el        27 Jan 2009 11:38:21 -0000      1.21
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -188,7 +188,7 @@
 (defun org-clock-select-task (&optional prompt)
   "Select a task that recently was associated with clocking."
   (interactive)
-  (let (sel-list rpl file task (i 0) s)
+  (let (sel-list rpl (i 0) s)
     (save-window-excursion
       (org-switch-to-buffer-other-window
        (get-buffer-create "*Clock Task Select*"))

Index: org-colview.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-colview.el,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- org-colview.el      26 Jan 2009 07:44:42 -0000      1.18
+++ org-colview.el      27 Jan 2009 11:38:22 -0000      1.19
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -149,7 +149,7 @@
         (face1 (list color 'org-agenda-column-dateline ref-face))
         (pl (or (get-text-property (point-at-bol) 'prefix-length) 0))
         (cphr (get-text-property (point-at-bol) 'org-complex-heading-regexp))
-        pom property ass width f string ov column val modval s1 s2 title)
+        pom property ass width f string ov column val modval s2 title)
     ;; Check if the entry is in another buffer.
     (unless props
       (if (eq major-mode 'org-agenda-mode)

Index: org-compat.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-compat.el,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- org-compat.el       26 Jan 2009 07:44:42 -0000      1.18
+++ org-compat.el       27 Jan 2009 11:38:22 -0000      1.19
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-exp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-exp.el,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- org-exp.el  26 Jan 2009 07:44:42 -0000      1.22
+++ org-exp.el  27 Jan 2009 11:38:22 -0000      1.23
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -981,7 +981,7 @@
                    "LINK_UP" "LINK_HOME" "SETUPFILE" "STYLE" "LATEX_HEADER"
                    "EXPORT_SELECT_TAGS" "EXPORT_EXCLUDE_TAGS")
                  (mapcar 'car org-export-inbuffer-options-extra))))
-           p key val text options js-up js-main js-css js-opt a pr style
+           p key val text options a pr style
            latex-header
            ext-setup-or-nil setup-contents (start 0))
        (while (or (and ext-setup-or-nil
@@ -1040,7 +1040,7 @@
   "Parse an OPTIONS line and set values in the property list P."
   (let (o)
     (when options
-      (let ((op org-export-plist-vars) a)
+      (let ((op org-export-plist-vars))
        (while (setq o (pop op))
          (if (and (nth 1 o)
                   (string-match (concat (regexp-quote (nth 1 o))
@@ -1640,7 +1640,7 @@
 
 (defun org-export-kill-licensed-text ()
   "Remove all text that is marked with a :org-license-to-kill property."
-  (let (p q)
+  (let (p)
     (while (setq p (text-property-any (point-min) (point-max)
                                      :org-license-to-kill t))
       (delete-region
@@ -1849,7 +1849,7 @@
        (tags (plist-get opts :tags))
        (pri  (plist-get opts :priority))
        (elts '(1 2 3 4 5))
-       rpl props)
+       rpl)
     (setq elts (delq nil (list 1 (if todo 2) (if pri 3) 4 (if tags 5))))
     (when (or (not todo) (not tags) (not pri))
       (goto-char (point-min))
@@ -1898,7 +1898,7 @@
 (defun org-export-protect-colon-examples ()
   "Protect lines starting with a colon."
   (goto-char (point-min))
-  (let ((re "^[ \t]*:\\([ \t]\\|$\\)") beg end)
+  (let ((re "^[ \t]*:\\([ \t]\\|$\\)") beg)
     (while (re-search-forward re nil t)
       (beginning-of-line 1)
       (setq beg (point))
@@ -2133,7 +2133,7 @@
 
 (defun org-export-get-title-from-subtree ()
   "Return subtree title and exclude it from export."
-  (let (title (m (mark)) (rbeg (region-beginning)) (rend (region-end)))
+  (let (title (rbeg (region-beginning)) (rend (region-end)))
     (save-excursion
       (goto-char rbeg)
       (when (and (org-at-heading-p)
@@ -2160,7 +2160,7 @@
 
 (defun org-get-min-level (lines)
   "Get the minimum level in LINES."
-  (let ((re "^\\(\\*+\\) ") l min)
+  (let ((re "^\\(\\*+\\) ") l)
     (catch 'exit
       (while (setq l (pop lines))
        (if (string-match re l)
@@ -2363,7 +2363,7 @@
 Code formatting according to language currently only works for HTML.
 Numbering lines works for all three major backends (html, latex, and ascii)."
   (save-match-data
-    (let (num cont rtn named rpllbl keepp textareap cols rows fmt)
+    (let (num cont rtn rpllbl keepp textareap cols rows fmt)
       (setq opts (or opts "")
            num (string-match "[-+]n\\>" opts)
            cont (string-match "\\+n\\>" opts)
@@ -4445,9 +4445,8 @@
   "Apply all active conversions to translate special ASCII to HTML."
   (setq s (org-html-protect s))
   (if org-export-html-expand
-      (let ((start 0))
        (while (string-match "@&lt;\\([^&]*\\)&gt;" s)
-         (setq s (replace-match "<\\1>" t nil s)))))
+       (setq s (replace-match "<\\1>" t nil s))))
   (if org-export-with-emphasize
       (setq s (org-export-html-convert-emphasize s)))
   (if org-export-with-special-strings
@@ -4747,7 +4746,7 @@
              "DTSTART"))
        hd ts ts2 state status (inc t) pos b sexp rrule
        scheduledp deadlinep todo prefix due start
-       tmp pri categories entry location summary desc uid
+       tmp pri categories location summary desc uid
        (sexp-buffer (get-buffer-create "*ical-tmp*")))
     (org-refresh-category-properties)
     (save-excursion

Index: org-export-latex.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-export-latex.el,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- org-export-latex.el 26 Jan 2009 08:40:19 -0000      1.21
+++ org-export-latex.el 27 Jan 2009 11:38:22 -0000      1.22
@@ -4,7 +4,7 @@
 ;;
 ;; Emacs Lisp Archive Entry
 ;; Filename: org-export-latex.el
-;; Version: 6.19a
+;; Version: 6.19e
 ;; Author: Bastien Guerry <bzg AT altern DOT org>
 ;; Maintainer: Bastien Guerry <bzg AT altern DOT org>
 ;; Keywords: org, wp, tex
@@ -434,7 +434,8 @@
                     (region-p nil)
                     (t (plist-get opt-plist :skip-before-1st-heading))))
         (text (plist-get opt-plist :text))
-        (first-lines (if skip "" (org-export-latex-first-lines opt-plist 
rbeg)))
+        (first-lines (if skip "" (org-export-latex-first-lines
+                                  opt-plist rbeg)))
         (coding-system (and (boundp 'buffer-file-coding-system)
                             buffer-file-coding-system))
         (coding-system-for-write (or org-export-latex-coding-system
@@ -1306,7 +1307,7 @@
 
   ;; Convert LaTeX to \LaTeX{}
   (goto-char (point-min))
-  (let ((case-fold-search nil) rpl)
+  (let ((case-fold-search nil))
     (while (re-search-forward "\\([^+_]\\)LaTeX" nil t)
       (org-if-unprotected
        (replace-match (org-export-latex-protect-string

Index: org-faces.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-faces.el,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- org-faces.el        26 Jan 2009 07:44:42 -0000      1.19
+++ org-faces.el        27 Jan 2009 11:38:22 -0000      1.20
@@ -1,12 +1,12 @@
 ;;; org-faces.el --- Face definitions for Org-mode.
 
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009;
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
 ;;   Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-footnote.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-footnote.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- org-footnote.el     25 Jan 2009 15:49:44 -0000      1.1
+++ org-footnote.el     27 Jan 2009 11:38:22 -0000      1.2
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -255,7 +255,7 @@
   "Start the definition of a footnote with label LABEL."
   (interactive "sLabel: ")
   (setq label (org-footnote-normalize-label label))
-  (let (re p)
+  (let (re)
     (cond
      ((org-mode-p)
       (if (not org-footnote-section)
@@ -322,7 +322,7 @@
 When SORT-ONLY is set, only sort the footnote definitions into the
 referenced sequence."
   ;; This is based on Paul's function, but rewritten.
-  (let ((count 0) ref def idef ref-table liste beg beg1 marker a before
+  (let ((count 0) ref def idef ref-table beg beg1 marker a before
        ins-point)
      (save-excursion
       ;; Now find footnote references, and extract the definitions
@@ -443,12 +443,11 @@
   "Find first reference of footnote ENTRY and insert the definition there.
 ENTRY is (fn-label num-mark definition)."
   (when (car entry)
-    (let ((pos (point)))
       (goto-char (point-min))
       (when (re-search-forward (format ".\\[%s[]:]" (regexp-quote (car entry)))
                               nil t)
        (org-footnote-goto-local-insertion-point)
-       (insert (format "\n\n[%s] %s" (car entry) (nth 2 entry)))))))
+      (insert (format "\n\n[%s] %s" (car entry) (nth 2 entry))))))
 
 (defun org-footnote-goto-local-insertion-point ()
   "Find insertion point for footnote, just before next outline heading."

Index: org-gnus.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-gnus.el,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- org-gnus.el 26 Jan 2009 07:44:42 -0000      1.18
+++ org-gnus.el 27 Jan 2009 11:38:22 -0000      1.19
@@ -7,7 +7,7 @@
 ;;         Tassilo Horn <tassilo at member dot fsf dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-id.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-id.el,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- org-id.el   25 Jan 2009 15:49:44 -0000      1.17
+++ org-id.el   27 Jan 2009 11:38:22 -0000      1.18
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -499,7 +499,7 @@
   (let ((res (make-hash-table
              :test 'equal
              :size (apply '+ (mapcar 'length list))))
-       f i)
+       f)
     (mapc
      (lambda (x)
        (setq f (car x))
@@ -540,7 +540,7 @@
 return nil.
 The position is returned as a cons cell (file-name . position).  With
 optional argument MARKERP, return the position as a new marker."
-  (let (org-agenda-new-buffers m buf pos)
+  (let (org-agenda-new-buffers buf pos)
     (cond
      ((not file) nil)
      ((not (file-exists-p file)) nil)

Index: org-info.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-info.el,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- org-info.el 26 Jan 2009 07:44:42 -0000      1.19
+++ org-info.el 27 Jan 2009 11:38:22 -0000      1.20
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-irc.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-irc.el,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- org-irc.el  25 Jan 2009 15:49:44 -0000      1.18
+++ org-irc.el  27 Jan 2009 11:38:22 -0000      1.19
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Philip Jackson <address@hidden>
 ;; Keywords: erc, irc, link, org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-jsinfo.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-jsinfo.el,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- org-jsinfo.el       26 Jan 2009 07:44:43 -0000      1.17
+++ org-jsinfo.el       27 Jan 2009 11:38:22 -0000      1.18
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -130,7 +130,7 @@
     (let ((template org-infojs-template)
        (ptoc (plist-get exp-plist :table-of-contents))
        (hlevels (plist-get exp-plist :headline-levels))
-       tdepth sdepth p1 s p v a1 tmp e opt var val table default)
+       tdepth sdepth s v e opt var val table default)
     (setq sdepth hlevels
          tdepth hlevels)
     (if (integerp ptoc) (setq tdepth (min ptoc tdepth)))

Index: org-list.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-list.el,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- org-list.el 26 Jan 2009 07:44:43 -0000      1.14
+++ org-list.el 27 Jan 2009 11:38:22 -0000      1.15
@@ -7,7 +7,7 @@
 ;;        Bastien Guerry <bzg AT altern DOT org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -162,6 +162,12 @@
        ((= llt ?\)) "\\([ \t]*\\([-+]\\|\\([0-9]+))\\)\\|[ \t]+\\*\\)\\( 
\\|$\\)")
        (t (error "Invalid value of 
`org-plain-list-ordered-item-terminator'")))))))
 
+(defun org-at-item-bullet-p ()
+  "Is point at the bullet of a plain list item?"
+  (and (org-at-item-p)
+       (not (member (char-after) '(?\  ?\t)))
+       (< (point) (match-end 0))))
+
 (defun org-in-item-p ()
   "It the cursor inside a plain list item.
 Does not have to be the first line."

Index: org-mac-message.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-mac-message.el,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- org-mac-message.el  25 Jan 2009 15:49:45 -0000      1.19
+++ org-mac-message.el  27 Jan 2009 11:38:22 -0000      1.20
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <address@hidden>
-;; Version: 6.19a
+;; Version: 6.19e
 ;; Keywords: outlines, hypermedia, calendar, wp
 
 ;; This file is part of GNU Emacs.

Index: org-macs.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-macs.el,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- org-macs.el 26 Jan 2009 07:44:43 -0000      1.19
+++ org-macs.el 27 Jan 2009 11:38:22 -0000      1.20
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-mew.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-mew.el,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- org-mew.el  25 Jan 2009 15:49:45 -0000      1.18
+++ org-mew.el  27 Jan 2009 11:38:23 -0000      1.19
@@ -5,7 +5,7 @@
 ;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 
 ;; This file is part of GNU Emacs.
 

Index: org-mhe.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-mhe.el,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- org-mhe.el  26 Jan 2009 07:44:43 -0000      1.18
+++ org-mhe.el  27 Jan 2009 11:38:23 -0000      1.19
@@ -6,7 +6,7 @@
 ;; Author: Thomas Baumann <thomas dot baumann at ch dot tum dot de>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-mouse.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-mouse.el,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- org-mouse.el        26 Jan 2009 07:44:43 -0000      1.20
+++ org-mouse.el        27 Jan 2009 11:38:23 -0000      1.21
@@ -1,10 +1,10 @@
 ;;; org-mouse.el --- Better mouse support for org-mode
 
-;; Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation
 ;;
 ;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com>
 ;; Maintainer: Carsten Dominik <carsten at orgmode dot org>
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-plot.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-plot.el,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- org-plot.el 25 Jan 2009 15:49:45 -0000      1.13
+++ org-plot.el 27 Jan 2009 11:38:23 -0000      1.14
@@ -5,7 +5,7 @@
 ;; Author: Eric Schulte <schulte dot eric at gmail dot com>
 ;; Keywords: tables, plotting
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-publish.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-publish.el,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- org-publish.el      25 Jan 2009 15:49:45 -0000      1.23
+++ org-publish.el      27 Jan 2009 11:38:23 -0000      1.24
@@ -4,7 +4,7 @@
 ;; Author: David O'Toole <address@hidden>
 ;; Maintainer: Bastien Guerry <bzg AT altern DOT org>
 ;; Keywords: hypermedia, outlines, wp
-;; Version: 6.19a
+;; Version: 6.19e
 
 ;; This file is part of GNU Emacs.
 ;;

Index: org-remember.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-remember.el,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- org-remember.el     26 Jan 2009 07:44:43 -0000      1.20
+++ org-remember.el     27 Jan 2009 11:38:23 -0000      1.21
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-rmail.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-rmail.el,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- org-rmail.el        25 Jan 2009 15:49:45 -0000      1.18
+++ org-rmail.el        27 Jan 2009 11:38:23 -0000      1.19
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -35,6 +35,7 @@
 (require 'org)
 
 ;; Declare external functions and variables
+(declare-function rmail-narrow-to-non-pruned-header "rmail" ())
 (declare-function rmail-show-message "rmail" (&optional n no-summary))
 (declare-function rmail-what-message "rmail" ())
 (defvar rmail-current-message)

Index: org-table.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-table.el,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- org-table.el        26 Jan 2009 07:44:43 -0000      1.22
+++ org-table.el        27 Jan 2009 11:38:23 -0000      1.23
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-timer.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-timer.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- org-timer.el        25 Jan 2009 15:49:45 -0000      1.6
+++ org-timer.el        27 Jan 2009 11:38:23 -0000      1.7
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-vm.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-vm.el,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- org-vm.el   26 Jan 2009 07:44:43 -0000      1.18
+++ org-vm.el   27 Jan 2009 11:38:23 -0000      1.19
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-w3m.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-w3m.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- org-w3m.el  25 Jan 2009 15:49:46 -0000      1.6
+++ org-w3m.el  27 Jan 2009 11:38:23 -0000      1.7
@@ -5,7 +5,7 @@
 ;; Author: Andy Stewart <lazycat dot manatee at gmail dot com>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-wl.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-wl.el,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- org-wl.el   26 Jan 2009 07:44:43 -0000      1.18
+++ org-wl.el   27 Jan 2009 11:38:23 -0000      1.19
@@ -6,7 +6,7 @@
 ;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org.el,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- org.el      26 Jan 2009 07:44:43 -0000      1.38
+++ org.el      27 Jan 2009 11:38:23 -0000      1.39
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.19a
+;; Version: 6.19e
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -94,7 +94,7 @@
 
 ;;; Version
 
-(defconst org-version "6.19a"
+(defconst org-version "6.19e"
   "The version number of the file org.el.")
 
 (defun org-version (&optional here)
@@ -199,6 +199,48 @@
        (const :tag "C  sqlinsert:         Convert Org-mode tables to SQL 
insertions" orgtbl-sqlinsert)
        (repeat :tag "External packages" :inline t (symbol :tag "Package"))))
 
+(defcustom org-support-shift-select nil
+  "Non-nil means, make shift-cursor commands select text when possible.
+
+In Emacs 23, when `shift-select-mode' is on, shifted cursor keys start
+selecting a region, or enlarge thusly regions started in this way.
+In Org-mode, in special contexts, these same keys are used for other
+purposes, important enough to compete with shift selection.  Org tries
+to balance these needs by supporting `shift-select-mode' outside these
+special contexts, under control of this variable.
+
+The default of this variable is nil, to avoid confusing behavior.  Shifted
+cursor keys will then execute Org commands in the following contexts:
+- on a headline, changing TODO state (left/right) and priority (up/down)
+- on a time stamp, changing the time
+- in a plain list item, changing the bullet type
+- in a property definition line, switching between allowed values
+- in the BEGIN line of a clock table (changing the time block).
+Outside these contexts, the commands will throw an error.
+
+When this variable is t and the cursor is not in a special context,
+Org-mode will support shift-selection for making and enlarging regions.
+To make this more effective, the bullet cycling will no longer happen
+anywhere in an item line, but only if the cursor is exactly on the bullet.
+
+If you set this variable to the symbol `always', then the keys
+will not be special in headlines, property lines, and item lines, to make
+shift selection work there as well.  If this is what you want, you can
+use the following alternative commands: `C-c C-t' and `C-c ,' to
+change TODO state and priority, `C-u C-u C-c C-t' can be used to switch
+TODO sets, `C-c -' to cycle item bullet types, and properties can be
+edited by hand or in column view.
+
+However, when the cursor is on a timestamp, shift-cursor commands
+will still edit the time stamp - this is just too good to give up.
+
+XEmacs user should have this variable set to nil, because shift-select-mode
+is Emacs 23 only."
+  :group 'org
+  :type '(choice
+         (const :tag "Never" nil)
+         (const :tag "When outside special context" t)
+         (const :tag "Everywhere except timestamps" always)))
 
 (defgroup org-startup nil
   "Options concerning startup of Org-mode."
@@ -2341,7 +2383,6 @@
           (border (nth 2 e))
           (body (nth 3 e))
           (nl (nth 4 e))
-          (stacked (and nil (nth 5 e))) ; stacked is no longer allowed, forced 
to nil
           (body1 (concat body "*?"))
           (markers (mapconcat 'car org-emphasis-alist ""))
           (vmarkers (mapconcat
@@ -2361,17 +2402,17 @@
                               (int-to-string nl) "\\}")))
       ;; Make the regexp
       (setq org-emph-re
-           (concat "\\([" pre (if (and nil stacked) markers) "]\\|^\\)"
+           (concat "\\([" pre "]\\|^\\)"
                    "\\("
                    "\\([" markers "]\\)"
                    "\\("
                    "[^" border "]\\|"
-                   "[^" border (if (and nil stacked) markers) "]"
+                   "[^" border "]"
                    body1
-                   "[^" border (if (and nil stacked) markers) "]"
+                   "[^" border "]"
                    "\\)"
                    "\\3\\)"
-                   "\\([" post (if (and nil stacked) markers) "]\\|$\\)"))
+                   "\\([" post "]\\|$\\)"))
       (setq org-verbatim-re
            (concat "\\([" pre "]\\|^\\)"
                    "\\("
@@ -4404,7 +4445,7 @@
 (defun org-set-visibility-according-to-property (&optional no-cleanup)
   "Switch subtree visibilities according to :VISIBILITY: property."
   (interactive)
-  (let (state)
+  (let (org-show-entry-below state)
     (save-excursion
       (goto-char (point-min))
       (while (re-search-forward
@@ -4482,7 +4523,7 @@
      ((eq state 'subtree)  (or (org-subtree-end-visible-p) (recenter 1))))))
 
 (defun org-compact-display-after-subtree-move ()
-  (let (beg end)
+  "Show a compacter version of the tree of the entry's parent."
     (save-excursion
       (if (org-up-heading-safe)
          (progn
@@ -4491,7 +4532,7 @@
            (show-children)
            (org-cycle-show-empty-lines 'children)
            (org-cycle-hide-drawers 'children))
-       (org-overview)))))
+      (org-overview))))
 
 (defun org-cycle-show-empty-lines (state)
   "Show empty lines above all visible headlines.
@@ -5846,7 +5887,7 @@
        (msg (substitute-command-keys
              "Edit, then exit with C-c ' (C-c and single quote)"))
        (org-mode-p (eq major-mode 'org-mode))
-       beg end lang lang-f)
+       beg end)
     (beginning-of-line 1)
     (if (looking-at "[ \t]*[^:\n \t]")
        nil
@@ -5913,7 +5954,7 @@
            ("^#\\+ascii:" "\n" "ascii" single-line)
            )))
        (pos (point))
-       re re1 re2 single beg end lang lfmt match-re1)
+       re1 re2 single beg end lang lfmt match-re1)
     (catch 'exit
       (while (setq entry (pop re-list))
        (setq re1 (car entry) re2 (nth 1 entry) lang (nth 2 entry)
@@ -7836,7 +7877,7 @@
     (apply
      'org-ido-completing-read prompt
      (lambda (string predicate &optional flag)
-       (let (rtn r s f (l (length string)))
+       (let (rtn r f (l (length string)))
         (cond
          ((eq flag nil)
           ;; try completion
@@ -8275,6 +8316,7 @@
 
 With C-u prefix arg, use completion to determine the new state.
 With numeric prefix arg, switch to that state.
+With a double C-u prefix, switch to the next set of TODO keywords (nextset).
 
 For calling through lisp, arg is also interpreted in the following way:
 'none             -> empty state
@@ -8285,6 +8327,7 @@
 \"WAITING\"         -> switch to the specified keyword, but only if it
                      really is a member of `org-todo-keywords'."
   (interactive "P")
+  (if (equal arg '(16)) (setq arg 'nextset))
   (save-excursion
     (catch 'exit
       (org-back-to-heading)
@@ -8368,6 +8411,8 @@
                                 :position startpos))
             dolog now-done-p)
        (when org-blocker-hook
+         (setq org-last-todo-state-is-todo
+               (not (member this org-done-keywords)))
          (unless (save-excursion
                    (save-match-data
                      (run-hook-with-args-until-failure
@@ -8659,7 +8704,7 @@
         (org-log-done nil)
         (org-todo-log-states nil)
         (nshiftmax 10) (nshift 0)
-        re type n what ts mb0 time)
+        re type n what ts time)
     (when repeat
       (if (eq org-log-repeat t) (setq org-log-repeat 'state))
       (org-todo (if (eq interpret 'type) last-state head))
@@ -8682,8 +8727,7 @@
              re (save-excursion (outline-next-heading) (point)) t)
        (setq type (if (match-end 1) org-scheduled-string
                     (if (match-end 3) org-deadline-string "Plain:"))
-             ts (match-string (if (match-end 2) 2 (if (match-end 4) 4 0)))
-             mb0 (match-beginning 0))
+             ts (match-string (if (match-end 2) 2 (if (match-end 4) 4 0))))
        (when (string-match "\\([.+]\\)?\\(\\+[0-9]+\\)\\([dwmy]\\)" ts)
          (setq n (string-to-number (match-string 2 ts))
                what (match-string 3 ts))
@@ -10166,7 +10210,7 @@
         (org-agenda-skip-function
          (car (org-delete-all '(comment archive) skip)))
         (org-tags-match-list-sublevels t)
-        matcher pos file res
+        matcher file res
         org-todo-keywords-for-agenda
         org-done-keywords-for-agenda
         org-todo-keyword-alist-for-agenda
@@ -10190,7 +10234,6 @@
               (list (buffer-file-name (current-buffer))))
              (setq res (org-scan-tags func matcher)))
          ;; Get the right scope
-         (setq pos (point))
          (cond
           ((and scope (listp scope) (symbolp (car scope)))
            (setq scope (eval scope)))
@@ -10588,7 +10631,7 @@
 internally: ARCHIVE, CATEGORY, SUMMARY, DESCRIPTION, LOCATION, and LOGGING.
 With INCLUDE-COLUMNS, also include property names given in COLUMN
 formats in the current buffer."
-  (let (rtn range cfmt cols s p)
+  (let (rtn range cfmt s p)
     (save-excursion
       (save-restriction
        (widen)
@@ -12898,9 +12941,19 @@
             'delete-backward-char 'org-delete-backward-char)
   (org-defkey org-mode-map "|" 'org-force-self-insert))
 
-(defun org-shiftcursor-error ()
+(defun org-modifier-cursor-error ()
+  "Throw an error, a modified cursor command was applied in wrong context."
+  (error "This command is active in special context like tables, headlines or 
items"))
+
+(defun org-shiftselect-error ()
   "Throw an error because Shift-Cursor command was applied in wrong context."
-  (error "This command is active in special context like tables, headlines or 
timestamps"))
+  (if (and (boundp 'shift-select-mode) shift-select-mode)
+      (error "To use shift-selection with Org-mode, customize 
`org-support-shift-select'.")
+    (error "This command works only in special context like headlines or 
timestamps.")))
+
+(defun org-call-for-shift-select (cmd)
+  (let ((this-command-keys-shift-translated t))
+    (call-interactively cmd)))
 
 (defun org-shifttab (&optional arg)
   "Global visibility cycling or move to previous table field.
@@ -12926,7 +12979,7 @@
    ((org-at-table-p) (call-interactively 'org-table-delete-column))
    ((org-on-heading-p) (call-interactively 'org-promote-subtree))
    ((org-at-item-p) (call-interactively 'org-outdent-item))
-   (t (org-shiftcursor-error))))
+   (t (org-modifier-cursor-error))))
 
 (defun org-shiftmetaright ()
   "Demote subtree or insert table column.
@@ -12938,7 +12991,7 @@
    ((org-at-table-p) (call-interactively 'org-table-insert-column))
    ((org-on-heading-p) (call-interactively 'org-demote-subtree))
    ((org-at-item-p) (call-interactively 'org-indent-item))
-   (t (org-shiftcursor-error))))
+   (t (org-modifier-cursor-error))))
 
 (defun org-shiftmetaup (&optional arg)
   "Move subtree up or kill table row.
@@ -12950,7 +13003,7 @@
    ((org-at-table-p) (call-interactively 'org-table-kill-row))
    ((org-on-heading-p) (call-interactively 'org-move-subtree-up))
    ((org-at-item-p) (call-interactively 'org-move-item-up))
-   (t (org-shiftcursor-error))))
+   (t (org-modifier-cursor-error))))
 (defun org-shiftmetadown (&optional arg)
   "Move subtree down or insert table row.
 Calls `org-move-subtree-down' or `org-table-insert-row' or
@@ -12961,7 +13014,7 @@
    ((org-at-table-p) (call-interactively 'org-table-insert-row))
    ((org-on-heading-p) (call-interactively 'org-move-subtree-down))
    ((org-at-item-p) (call-interactively 'org-move-item-down))
-   (t (org-shiftcursor-error))))
+   (t (org-modifier-cursor-error))))
 
 (defun org-metaleft (&optional arg)
   "Promote heading or move table column to left.
@@ -13019,13 +13072,20 @@
 depending on context.  See the individual commands for more information."
   (interactive "P")
   (cond
+   ((and org-support-shift-select (org-region-active-p))
+    (org-call-for-shift-select 'previous-line))
    ((org-at-timestamp-p t)
     (call-interactively (if org-edit-timestamp-down-means-later
                            'org-timestamp-down 'org-timestamp-up)))
-   ((org-on-heading-p) (call-interactively 'org-priority-up))
-   ((org-at-item-p) (call-interactively 'org-previous-item))
+   ((and (not (eq org-support-shift-select 'always))
+        (org-on-heading-p))
+    (call-interactively 'org-priority-up))
+   ((and (not org-support-shift-select) (org-at-item-p))
+    (call-interactively 'org-previous-item))
    ((org-clocktable-try-shift 'up arg))
-   (t (call-interactively 'org-beginning-of-item) (beginning-of-line 1))))
+   (org-support-shift-select
+    (org-call-for-shift-select 'previous-line))
+   (t (org-shiftselect-error))))
 
 (defun org-shiftdown (&optional arg)
   "Decrease item in timestamp or decrease priority of current headline.
@@ -13033,12 +13093,20 @@
 depending on context.  See the individual commands for more information."
   (interactive "P")
   (cond
+   ((and org-support-shift-select (org-region-active-p))
+    (org-call-for-shift-select 'next-line))
    ((org-at-timestamp-p t)
     (call-interactively (if org-edit-timestamp-down-means-later
                            'org-timestamp-up 'org-timestamp-down)))
-   ((org-on-heading-p) (call-interactively 'org-priority-down))
+   ((and (not (eq org-support-shift-select 'always))
+        (org-on-heading-p))
+    (call-interactively 'org-priority-down))
+   ((and (not org-support-shift-select) (org-at-item-p))
+    (call-interactively 'org-next-item))
    ((org-clocktable-try-shift 'down arg))
-   (t (call-interactively 'org-next-item))))
+   (org-support-shift-select 
+    (org-call-for-shift-select 'next-line))
+   (t (org-shiftselect-error))))
 
 (defun org-shiftright (&optional arg)
   "Cycle the thing at point or in the current line, depending on context.
@@ -13051,12 +13119,24 @@
 - on a clocktable definition line, move time block into the future"
   (interactive "P")
   (cond
+   ((and org-support-shift-select (org-region-active-p))
+    (org-call-for-shift-select 'forward-char))
    ((org-at-timestamp-p t) (call-interactively 'org-timestamp-up-day))
-   ((org-on-heading-p) (org-call-with-arg 'org-todo 'right))
-   ((org-at-item-p) (org-call-with-arg 'org-cycle-list-bullet nil))
-   ((org-at-property-p) (call-interactively 'org-property-next-allowed-value))
+   ((and (not (eq org-support-shift-select 'always))
+        (org-on-heading-p))
+    (org-call-with-arg 'org-todo 'right))
+   ((or (and org-support-shift-select
+            (not (eq org-support-shift-select 'always))
+            (org-at-item-bullet-p))
+       (and (not org-support-shift-select) (org-at-item-p)))
+    (org-call-with-arg 'org-cycle-list-bullet nil))
+   ((and (not (eq org-support-shift-select 'always))
+        (org-at-property-p))
+    (call-interactively 'org-property-next-allowed-value))
    ((org-clocktable-try-shift 'right arg))
-   (t (org-shiftcursor-error))))
+   (org-support-shift-select 
+    (org-call-for-shift-select 'forward-char))
+   (t (org-shiftselect-error))))
 
 (defun org-shiftleft (&optional arg)
   "Cycle the thing at point or in the current line, depending on context.
@@ -13069,27 +13149,50 @@
 - on a clocktable definition line, move time block into the past"
   (interactive "P")
   (cond
+   ((and org-support-shift-select (org-region-active-p))
+    (org-call-for-shift-select 'backward-char))
    ((org-at-timestamp-p t) (call-interactively 'org-timestamp-down-day))
-   ((org-on-heading-p) (org-call-with-arg 'org-todo 'left))
-   ((org-at-item-p) (org-call-with-arg 'org-cycle-list-bullet 'previous))
-   ((org-at-property-p)
+   ((and (not (eq org-support-shift-select 'always))
+        (org-on-heading-p))
+    (org-call-with-arg 'org-todo 'left))
+   ((or (and org-support-shift-select
+            (not (eq org-support-shift-select 'always))
+            (org-at-item-bullet-p))
+       (and (not org-support-shift-select) (org-at-item-p)))
+    (org-call-with-arg 'org-cycle-list-bullet 'previous))
+   ((and (not (eq org-support-shift-select 'always))
+        (org-at-property-p))
     (call-interactively 'org-property-previous-allowed-value))
    ((org-clocktable-try-shift 'left arg))
-   (t (org-shiftcursor-error))))
+   (org-support-shift-select 
+    (org-call-for-shift-select 'backward-char))
+   (t (org-shiftselect-error))))
 
 (defun org-shiftcontrolright ()
   "Switch to next TODO set."
   (interactive)
   (cond
-   ((org-on-heading-p) (org-call-with-arg 'org-todo 'nextset))
-   (t (org-shiftcursor-error))))
+   ((and org-support-shift-select (org-region-active-p))
+    (org-call-for-shift-select 'forward-word))
+   ((and (not (eq org-support-shift-select 'always))
+        (org-on-heading-p))
+    (org-call-with-arg 'org-todo 'nextset))
+   (org-support-shift-select
+    (org-call-for-shift-select 'forward-word))
+   (t (org-shiftselect-error))))
 
 (defun org-shiftcontrolleft ()
   "Switch to previous TODO set."
   (interactive)
   (cond
-   ((org-on-heading-p) (org-call-with-arg 'org-todo 'previousset))
-   (t (org-shiftcursor-error))))
+   ((and org-support-shift-select (org-region-active-p))
+    (org-call-for-shift-select 'backward-word))
+   ((and (not (eq org-support-shift-select 'always))
+        (org-on-heading-p))
+    (org-call-with-arg 'org-todo 'previousset))
+   (org-support-shift-select
+    (org-call-for-shift-select 'backward-word))
+   (t (org-shiftselect-error))))
 
 (defun org-ctrl-c-ret ()
   "Call `org-table-hline-and-move' or `org-insert-heading' dep. on context."
@@ -14846,7 +14949,7 @@
         (re (concat "^" outline-regexp))
         (subs (make-vector (1+ n) nil))
         (last-level 0)
-        m tree level head)
+        m level head)
     (save-excursion
       (save-restriction
        (widen)
@@ -14899,7 +15002,7 @@
 To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]."
   (interactive)
   (require 'org-agenda)
-  (let (p m tp np dir txt w)
+  (let (p m tp np dir txt)
     (cond
      ((setq p (text-property-any (point-at-bol) (point-at-eol)
                                 'org-imenu t))




reply via email to

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