Merge branch 'bugfix'
This commit is contained in:
commit
0509a84786
|
@ -7702,7 +7702,15 @@ the cache."
|
||||||
(when org-element-cache-map-continue-from
|
(when org-element-cache-map-continue-from
|
||||||
(goto-char org-element-cache-map-continue-from))
|
(goto-char org-element-cache-map-continue-from))
|
||||||
(when (> (point) start)
|
(when (> (point) start)
|
||||||
(move-start-to-next-match nil))
|
(move-start-to-next-match nil)
|
||||||
|
;; (point) inside matching element.
|
||||||
|
;; Go further.
|
||||||
|
(when (> (point) start)
|
||||||
|
(setq data (element-match-at-point))
|
||||||
|
(if (not data)
|
||||||
|
(cache-walk-abort)
|
||||||
|
(goto-char (next-element-start))
|
||||||
|
(move-start-to-next-match next-element-re))))
|
||||||
;; Drop nil.
|
;; Drop nil.
|
||||||
(unless (car result) (pop result)))
|
(unless (car result) (pop result)))
|
||||||
;; If FUNC did not move the point and we
|
;; If FUNC did not move the point and we
|
||||||
|
|
|
@ -2740,7 +2740,27 @@ SCHEDULED: <2014-03-04 tue.>"
|
||||||
(setq org-map-continue-from
|
(setq org-map-continue-from
|
||||||
(org-element-property
|
(org-element-property
|
||||||
:begin (org-element-at-point))))))
|
:begin (org-element-at-point))))))
|
||||||
(buffer-string)))))
|
(buffer-string))))
|
||||||
|
(should
|
||||||
|
(= 1
|
||||||
|
(org-test-with-temp-text "* H1\n** H1.1\n** H1.2\n"
|
||||||
|
(let (acc)
|
||||||
|
(org-map-entries
|
||||||
|
(lambda ()
|
||||||
|
(push (org-element-property :title (org-element-at-point)) acc)
|
||||||
|
(setq org-map-continue-from
|
||||||
|
(org-element-property :end (org-element-at-point)))))
|
||||||
|
(length acc)))))
|
||||||
|
(should
|
||||||
|
(= 2
|
||||||
|
(org-test-with-temp-text "* H1\n** H1.1\n** H1.2\n"
|
||||||
|
(let (acc)
|
||||||
|
(org-map-entries
|
||||||
|
(lambda ()
|
||||||
|
(push (org-element-property :title (org-element-at-point)) acc)
|
||||||
|
(setq org-map-continue-from
|
||||||
|
(line-end-position 2))))
|
||||||
|
(length acc))))))
|
||||||
|
|
||||||
(ert-deftest test-org/edit-headline ()
|
(ert-deftest test-org/edit-headline ()
|
||||||
"Test `org-edit-headline' specifications."
|
"Test `org-edit-headline' specifications."
|
||||||
|
|
Loading…
Reference in New Issue