org.el: (org-end-of-meta-data-and-drawers): simplify.

This commit is contained in:
Bastien Guerry 2011-06-30 18:01:38 +02:00
parent 9c582ceed8
commit f0bbfe50aa
1 changed files with 4 additions and 13 deletions

View File

@ -20028,19 +20028,10 @@ clocking lines, and drawers."
(org-back-to-heading t) (org-back-to-heading t)
(let ((end (save-excursion (outline-next-heading) (point))) (let ((end (save-excursion (outline-next-heading) (point)))
(re (concat "[ \t]*$" (re (concat "[ \t]*$"
"\\|" "\\|" org-drawer-regexp
"\\(" org-drawer-regexp "\\)" ; group 1 are drawers "\\|" "[ \t]*" org-keyword-time-regexp)))
"\\|" (while (re-search-forward re end 'move)
"\\([ \t]*\\(" org-keyword-time-regexp "\\)\\)"))) (forward-line 1))))
(forward-line 1)
(while (looking-at (concat "[ \t]*\\(" org-keyword-time-regexp "\\)"))
(if (not (match-end 1))
;; empty or planning line
(forward-line 1)
;; a drawer, find the end
(re-search-forward "^[ \t]*:END:" end 'move)
(forward-line 1)))
(point)))
(defun org-forward-same-level (arg &optional invisible-ok) (defun org-forward-same-level (arg &optional invisible-ok)
"Move forward to the arg'th subheading at same level as this one. "Move forward to the arg'th subheading at same level as this one.