forked from mirrors/org-mode
org.el: fix `org-end-of-meta-data-and-drawers'
Back to the previous version of `org-end-of-meta-data-and-drawers', with a better fix. Thanks to Eric Abrahamsen for this.
This commit is contained in:
parent
5a5036cc13
commit
330ed08feb
15
lisp/org.el
15
lisp/org.el
|
@ -20032,11 +20032,18 @@ This will move over empty lines, lines with planning time stamps,
|
|||
clocking lines, and drawers."
|
||||
(org-back-to-heading t)
|
||||
(let ((end (save-excursion (outline-next-heading) (point)))
|
||||
(re (concat "[ \t]*$"
|
||||
"\\|" org-drawer-regexp
|
||||
(re (concat "\\(" org-drawer-regexp "\\)"
|
||||
"\\|" "[ \t]*" org-keyword-time-regexp)))
|
||||
(while (re-search-forward re end 'move)
|
||||
(forward-line 1))))
|
||||
(forward-line 1)
|
||||
(while (re-search-forward re end t)
|
||||
(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)))
|
||||
(and (re-search-forward "[^\n]" nil t) (backward-char 1))
|
||||
(point)))
|
||||
|
||||
(defun org-forward-same-level (arg &optional invisible-ok)
|
||||
"Move forward to the arg'th subheading at same level as this one.
|
||||
|
|
Loading…
Reference in New Issue