summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2011-03-23 11:42:55 -0600
committerEric Schulte <schulte.eric@gmail.com>2011-03-23 11:42:55 -0600
commit432e1256bc334d33bea85e536cc37677f6ef9edf (patch)
treee59d93bf2e2668d544a175ae3ab4a33a943ead8e
parentabbee1635e18d88d82bbf9883c9e95e66540fdff (diff)
parent051b5b291cb3dbe6b7dba68fc8da5451e2546953 (diff)
downloadorg-mode-432e1256bc334d33bea85e536cc37677f6ef9edf.tar.gz
Merge branch 'master' of orgmode.org:org-mode
-rw-r--r--lisp/org-latex.el2
-rw-r--r--lisp/org-list.el37
2 files changed, 23 insertions, 16 deletions
diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 9be842b..605795c 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -258,7 +258,7 @@ For example \orgTITLE for #+TITLE."
:type 'boolean)
(defcustom org-export-latex-date-format
- "%d %B %Y"
+ "\\today"
"Format string for \\date{...}."
:group 'org-export-latex
:type 'string)
diff --git a/lisp/org-list.el b/lisp/org-list.el
index 5356330..7136e2b 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -468,10 +468,10 @@ This checks `org-list-ending-method'."
(looking-at org-list-end-re))
(throw 'exit nil))
;; Skip blocks, drawers, inline-tasks, blank lines
- ((looking-at "^[ \t]*#\\+end_")
- (re-search-backward "^[ \t]*#\\+begin_" nil t))
- ((looking-at "^[ \t]*:END:")
- (re-search-backward drawers-re nil t)
+ ((and (looking-at "^[ \t]*#\\+end_")
+ (re-search-backward "^[ \t]*#\\+begin_" lim-up t)))
+ ((and (looking-at "^[ \t]*:END:")
+ (re-search-backward drawers-re lim-up t))
(beginning-of-line))
((and inlinetask-re (looking-at inlinetask-re))
(org-inlinetask-goto-beginning)
@@ -689,10 +689,10 @@ Assume point is at an item."
(memq (assq (car beg-cell) itm-lst) itm-lst))))
;; Skip blocks, drawers, inline tasks, blank lines
;; along the way.
- ((looking-at "^[ \t]*#\\+end_")
- (re-search-backward "^[ \t]*#\\+begin_" nil t))
- ((looking-at "^[ \t]*:END:")
- (re-search-backward drawers-re nil t)
+ ((and (looking-at "^[ \t]*#\\+end_")
+ (re-search-backward "^[ \t]*#\\+begin_" lim-up t)))
+ ((and (looking-at "^[ \t]*:END:")
+ (re-search-backward drawers-re lim-up t))
(beginning-of-line))
((and inlinetask-re (looking-at inlinetask-re))
(org-inlinetask-goto-beginning)
@@ -756,11 +756,11 @@ Assume point is at an item."
(throw 'exit (push (cons 0 (point)) end-lst-2)))
;; Skip blocks, drawers, inline tasks and blank lines
;; along the way
- ((looking-at "^[ \t]*#\\+begin_")
- (re-search-forward "^[ \t]*#\\+end_")
+ ((and (looking-at "^[ \t]*#\\+begin_")
+ (re-search-forward "^[ \t]*#\\+end_" lim-down t))
(forward-line 1))
- ((looking-at drawers-re)
- (re-search-forward "^[ \t]*:END:" nil t)
+ ((and (looking-at drawers-re)
+ (re-search-forward "^[ \t]*:END:" lim-down t))
(forward-line 1))
((and inlinetask-re (looking-at inlinetask-re))
(org-inlinetask-goto-end))
@@ -2073,6 +2073,10 @@ in subtree, ignoring drawers."
block-item
lim-up
lim-down
+ (drawer-re (concat "^[ \t]*:\\("
+ (mapconcat 'regexp-quote org-drawers "\\|")
+ "\\):[ \t]*$"))
+ (keyword-re (concat "^[ \t]*" org-keyword-time-regexp))
(orderedp (org-entry-get nil "ORDERED"))
(bounds
;; In a region, start at first item in region
@@ -2085,11 +2089,14 @@ in subtree, ignoring drawers."
(error "No item in region"))
(setq lim-down (copy-marker limit))))
((org-on-heading-p)
- ;; On an heading, start at first item after drawers
+ ;; On an heading, start at first item after drawers and
+ ;; time-stamps (scheduled, etc.)
(let ((limit (save-excursion (outline-next-heading) (point))))
(forward-line 1)
- (when (looking-at org-drawer-regexp)
- (re-search-forward "^[ \t]*:END:" limit nil))
+ (while (or (looking-at drawer-re) (looking-at keyword-re))
+ (if (looking-at keyword-re)
+ (forward-line 1)
+ (re-search-forward "^[ \t]*:END:" limit nil)))
(if (org-list-search-forward (org-item-beginning-re) limit t)
(setq lim-up (point-at-bol))
(error "No item in subtree"))