summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/misc/ChangeLog6
-rw-r--r--lisp/org/ChangeLog33
-rw-r--r--lisp/org/org-agenda.el14
-rw-r--r--lisp/org/org-archive.el2
-rw-r--r--lisp/org/org-attach.el2
-rw-r--r--lisp/org/org-bbdb.el4
-rw-r--r--lisp/org/org-bibtex.el2
-rw-r--r--lisp/org/org-clock.el4
-rw-r--r--lisp/org/org-colview.el4
-rw-r--r--lisp/org/org-compat.el2
-rw-r--r--lisp/org/org-exp.el25
-rw-r--r--lisp/org/org-export-latex.el7
-rw-r--r--lisp/org/org-faces.el4
-rw-r--r--lisp/org/org-footnote.el17
-rw-r--r--lisp/org/org-gnus.el2
-rw-r--r--lisp/org/org-id.el6
-rw-r--r--lisp/org/org-info.el2
-rw-r--r--lisp/org/org-irc.el2
-rw-r--r--lisp/org/org-jsinfo.el4
-rw-r--r--lisp/org/org-list.el8
-rw-r--r--lisp/org/org-mac-message.el2
-rw-r--r--lisp/org/org-macs.el2
-rw-r--r--lisp/org/org-mew.el2
-rw-r--r--lisp/org/org-mhe.el2
-rw-r--r--lisp/org/org-mouse.el4
-rw-r--r--lisp/org/org-plot.el2
-rw-r--r--lisp/org/org-publish.el2
-rw-r--r--lisp/org/org-remember.el2
-rw-r--r--lisp/org/org-rmail.el3
-rw-r--r--lisp/org/org-table.el2
-rw-r--r--lisp/org/org-timer.el2
-rw-r--r--lisp/org/org-vm.el2
-rw-r--r--lisp/org/org-w3m.el2
-rw-r--r--lisp/org/org-wl.el2
-rw-r--r--lisp/org/org.el207
35 files changed, 268 insertions, 120 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index f46514d2173..81bd01e7664 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-27 Carsten Dominik <dominik@science.uva.nl>
+
+ * org.texi (Plain lists, TODO basics, Priorities)
+ (Multiple sets in one file, Conflicts): Document interaction with
+ `shift-selection-mode'.
+
2009-01-27 Jay Belanger <jay.p.belanger@gmail.com>
* calc.texi (Embedded Mode, Algebraic-Style Calculations):
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 61852f6b37f..846dcabf26e 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -1,3 +1,36 @@
+2009-01-27 Carsten Dominik <carsten.dominik@gmail.com>
+
+ * 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 <dominik@science.uva.nl>
* org-export-latex.el (org-export-as-latex): Call
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 698c6244ac4..97d68d5aa9f 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -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 @@ in `org-agenda-text-search-extra-files'."
'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 @@ FRACTION is what fraction of the head-warning time has passed."
(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 @@ to switch to narrowing."
(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 @@ If the line does not have an effort defined, return nil."
(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 @@ the same tree node, and the headline of the tree node in the Org-mode file."
(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 @@ TAB Visit marked entry in other window
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
diff --git a/lisp/org/org-archive.el b/lisp/org/org-archive.el
index 8c2ef988030..045a505e45f 100644
--- a/lisp/org/org-archive.el
+++ b/lisp/org/org-archive.el
@@ -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.
;;
diff --git a/lisp/org/org-attach.el b/lisp/org/org-attach.el
index 9ee6af64efe..d68fe410c9b 100644
--- a/lisp/org/org-attach.el
+++ b/lisp/org/org-attach.el
@@ -4,7 +4,7 @@
;; Author: John Wiegley <johnw@newartisans.com>
;; Keywords: org data task
-;; Version: 6.19a
+;; Version: 6.19e
;; This file is part of GNU Emacs.
;;
diff --git a/lisp/org/org-bbdb.el b/lisp/org/org-bbdb.el
index b925151743f..5656ba5f5e7 100644
--- a/lisp/org/org-bbdb.el
+++ b/lisp/org/org-bbdb.el
@@ -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 @@ This is used by Org to re-create the anniversary hash table."
(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)
diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el
index 0df5d4a05ac..968da0044a8 100644
--- a/lisp/org/org-bibtex.el
+++ b/lisp/org/org-bibtex.el
@@ -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.
;;
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index 3703b52d1cb..44118471625 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -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 @@ of a different task.")
(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*"))
diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el
index 1de46fef303..3de6ec95844 100644
--- a/lisp/org/org-colview.el
+++ b/lisp/org/org-colview.el
@@ -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 @@ This is the compiled version of the format.")
(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)
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el
index cc4a2fa9d6a..e9e750437b5 100644
--- a/lisp/org/org-compat.el
+++ b/lisp/org/org-compat.el
@@ -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.
;;
diff --git a/lisp/org/org-exp.el b/lisp/org/org-exp.el
index 14abae40507..89cbd95d61b 100644
--- a/lisp/org/org-exp.el
+++ b/lisp/org/org-exp.el
@@ -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 @@ modified) list.")
"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 @@ modified) list.")
"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 @@ on this string to produce the exported version."
(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 @@ from the buffer."
(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 @@ from the buffer."
(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 @@ can work correctly."
(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 @@ can work correctly."
(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 @@ and `+n' for continuing previous numering.
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 @@ If there are links in the string, don't modify these."
"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)))))
+ (while (string-match "@&lt;\\([^&]*\\)&gt;" 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 @@ When COMBINE is non nil, add the category to each line."
"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
diff --git a/lisp/org/org-export-latex.el b/lisp/org/org-export-latex.el
index a6958860276..ce79337b4f6 100644
--- a/lisp/org/org-export-latex.el
+++ b/lisp/org/org-export-latex.el
@@ -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 @@ when PUB-DIR is set, use this as the publishing directory."
(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 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
;; 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
diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el
index eb415a4a154..2ba13d2e965 100644
--- a/lisp/org/org-faces.el
+++ b/lisp/org/org-faces.el
@@ -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.
;;
diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el
index 05ebce54c0b..4372411c06d 100644
--- a/lisp/org/org-footnote.el
+++ b/lisp/org/org-footnote.el
@@ -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 @@ or new, let the user edit the definition of the footnote."
"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 @@ Org-mode exporters.
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 @@ referenced sequence."
"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)))))))
+ (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))))))
(defun org-footnote-goto-local-insertion-point ()
"Find insertion point for footnote, just before next outline heading."
diff --git a/lisp/org/org-gnus.el b/lisp/org/org-gnus.el
index 3c56e7f6bc4..393d47b25c9 100644
--- a/lisp/org/org-gnus.el
+++ b/lisp/org/org-gnus.el
@@ -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.
;;
diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el
index 0623c6071a8..659142b7191 100644
--- a/lisp/org/org-id.el
+++ b/lisp/org/org-id.el
@@ -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 @@ When CHECK is given, prepare detailed information about duplicate IDs."
(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 @@ If that files does not exist, or if it does not contain this ID,
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)
diff --git a/lisp/org/org-info.el b/lisp/org/org-info.el
index a2c8acffbd1..388ae9d8212 100644
--- a/lisp/org/org-info.el
+++ b/lisp/org/org-info.el
@@ -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.
;;
diff --git a/lisp/org/org-irc.el b/lisp/org/org-irc.el
index 596f6a9d8e7..ddf9e3bc635 100644
--- a/lisp/org/org-irc.el
+++ b/lisp/org/org-irc.el
@@ -4,7 +4,7 @@
;;
;; Author: Philip Jackson <emacs@shellarchive.co.uk>
;; Keywords: erc, irc, link, org
-;; Version: 6.19a
+;; Version: 6.19e
;;
;; This file is part of GNU Emacs.
;;
diff --git a/lisp/org/org-jsinfo.el b/lisp/org/org-jsinfo.el
index 39462cf3266..d2b49a007d4 100644
--- a/lisp/org/org-jsinfo.el
+++ b/lisp/org/org-jsinfo.el
@@ -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 @@ Option settings will replace the %MANAGER-OPTIONS cookie."
(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)))
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el
index bf5bbdf234d..08140a34803 100644
--- a/lisp/org/org-list.el
+++ b/lisp/org/org-list.el
@@ -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 @@ list, obtained by prompting the user."
((= 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."
diff --git a/lisp/org/org-mac-message.el b/lisp/org/org-mac-message.el
index b65bc20eae8..3a94d2feafa 100644
--- a/lisp/org/org-mac-message.el
+++ b/lisp/org/org-mac-message.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
-;; Version: 6.19a
+;; Version: 6.19e
;; Keywords: outlines, hypermedia, calendar, wp
;; This file is part of GNU Emacs.
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el
index 2055fcf7c8b..70c9fc390a8 100644
--- a/lisp/org/org-macs.el
+++ b/lisp/org/org-macs.el
@@ -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.
;;
diff --git a/lisp/org/org-mew.el b/lisp/org/org-mew.el
index 20a0f08fdcd..afbbe9a88f1 100644
--- a/lisp/org/org-mew.el
+++ b/lisp/org/org-mew.el
@@ -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.
diff --git a/lisp/org/org-mhe.el b/lisp/org/org-mhe.el
index ef32397ea28..d8276f09e53 100644
--- a/lisp/org/org-mhe.el
+++ b/lisp/org/org-mhe.el
@@ -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.
;;
diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el
index c04acb2bf30..a0597fec6ee 100644
--- a/lisp/org/org-mouse.el
+++ b/lisp/org/org-mouse.el
@@ -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.
;;
diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el
index a0a79a82c39..fadd3541d0a 100644
--- a/lisp/org/org-plot.el
+++ b/lisp/org/org-plot.el
@@ -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.
;;
diff --git a/lisp/org/org-publish.el b/lisp/org/org-publish.el
index 149975fac22..1ad5ae6820b 100644
--- a/lisp/org/org-publish.el
+++ b/lisp/org/org-publish.el
@@ -4,7 +4,7 @@
;; Author: David O'Toole <dto@gnu.org>
;; 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.
;;
diff --git a/lisp/org/org-remember.el b/lisp/org/org-remember.el
index 8114d32dea7..74a7ada51db 100644
--- a/lisp/org/org-remember.el
+++ b/lisp/org/org-remember.el
@@ -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.
;;
diff --git a/lisp/org/org-rmail.el b/lisp/org/org-rmail.el
index 45990f0f4dc..927d49edac6 100644
--- a/lisp/org/org-rmail.el
+++ b/lisp/org/org-rmail.el
@@ -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)
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
index fbc7debe1b2..0c78685752c 100644
--- a/lisp/org/org-table.el
+++ b/lisp/org/org-table.el
@@ -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.
;;
diff --git a/lisp/org/org-timer.el b/lisp/org/org-timer.el
index 3320f77d297..4c3584b4e7b 100644
--- a/lisp/org/org-timer.el
+++ b/lisp/org/org-timer.el
@@ -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.
;;
diff --git a/lisp/org/org-vm.el b/lisp/org/org-vm.el
index 225660b7da4..2f12d6de07f 100644
--- a/lisp/org/org-vm.el
+++ b/lisp/org/org-vm.el
@@ -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.
;;
diff --git a/lisp/org/org-w3m.el b/lisp/org/org-w3m.el
index f1d2350b0ba..808199e4bba 100644
--- a/lisp/org/org-w3m.el
+++ b/lisp/org/org-w3m.el
@@ -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.
;;
diff --git a/lisp/org/org-wl.el b/lisp/org/org-wl.el
index 0863c7a4b48..91d29ff0d9c 100644
--- a/lisp/org/org-wl.el
+++ b/lisp/org/org-wl.el
@@ -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.
;;
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 22db64a6ad6..5508b814f99 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -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 @@ to add the symbol `xyz', and the package must have a call to
(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 @@ Changing this variable requires a restart of Emacs to take effect."
(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 @@ Changing this variable requires a restart of Emacs to take effect."
(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 @@ With a numeric prefix, show all headlines up to that level."
(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,16 +4523,16 @@ This function is the default value of the hook `org-cycle-hook'."
((eq state 'subtree) (or (org-subtree-end-visible-p) (recenter 1))))))
(defun org-compact-display-after-subtree-move ()
- (let (beg end)
- (save-excursion
- (if (org-up-heading-safe)
- (progn
- (hide-subtree)
- (show-entry)
- (show-children)
- (org-cycle-show-empty-lines 'children)
- (org-cycle-hide-drawers 'children))
- (org-overview)))))
+ "Show a compacter version of the tree of the entry's parent."
+ (save-excursion
+ (if (org-up-heading-safe)
+ (progn
+ (hide-subtree)
+ (show-entry)
+ (show-children)
+ (org-cycle-show-empty-lines 'children)
+ (org-cycle-hide-drawers 'children))
+ (org-overview))))
(defun org-cycle-show-empty-lines (state)
"Show empty lines above all visible headlines.
@@ -5846,7 +5887,7 @@ exit by killing the buffer with \\[org-edit-src-exit]."
(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 @@ the language, a switch telling of the content should be in a single line."
("^#\\+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 @@ operation has put the subtree."
(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 @@ DONE are present, add TODO at the beginning of the heading.
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 @@ For calling through lisp, arg is also interpreted in the following way:
\"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 @@ For calling through lisp, arg is also interpreted in the following way:
: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 @@ This function is run automatically after each state change to a DONE state."
(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 @@ This function is run automatically after each state change to a DONE state."
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 @@ the scanner. The following items can be given here:
(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 @@ the scanner. The following items can be given here:
(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 @@ With INCLUDE-DEFAULTS, also include properties that has special meaning
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 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
'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 @@ See the individual commands for more information."
((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 @@ See the individual commands for more information."
((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 @@ for more information."
((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 @@ commands for more information."
((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 @@ Calls `org-timestamp-up' or `org-priority-up', or `org-previous-item',
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 @@ Calls `org-timestamp-down' or `org-priority-down', or `org-next-item'
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 @@ Depending on context, this does one of the following:
- 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 @@ Depending on context, this does one of the following:
- 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 @@ Show the heading too, if it is currently invisible."
(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 @@ if no description is present"
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))