3 ;; Copyright (c) ߚ David Maus
6 ;; Released under the GNU General Public License version 3
7 ;; see: http://www.gnu.org/licenses/gpl-3.0.html
11 ;; Template test file for Org-mode tests
14 (ert-deftest test-org
/org-link-escape-ascii-character
()
15 "Escape an ascii character."
19 (org-link-escape "["))))
21 (ert-deftest test-org
/org-link-escape-ascii-ctrl-character
()
22 "Escape an ascii control character."
26 (org-link-escape "\t"))))
28 (ert-deftest test-org
/org-link-escape-multibyte-character
()
29 "Escape an unicode multibyte character."
33 (org-link-escape "€"))))
35 (ert-deftest test-org
/org-link-escape-custom-table
()
36 "Escape string with custom character table."
40 (org-link-escape "Foo:Bar\n" '(?\
: ?\B
)))))
42 (ert-deftest test-org
/org-link-escape-custom-table-merge
()
43 "Escape string with custom table merged with default table."
46 "%5BF%6F%6F%3A%42ar%0A%5D"
47 (org-link-escape "[Foo:Bar\n]" '(?\
: ?\B ?\o
) t
))))
49 (ert-deftest test-org
/org-link-unescape-ascii-character
()
50 "Unescape an ascii character."
54 (org-link-unescape "%5B"))))
56 (ert-deftest test-org
/org-link-unescape-ascii-ctrl-character
()
57 "Unescpae an ascii control character."
61 (org-link-unescape "%0A"))))
63 (ert-deftest test-org
/org-link-unescape-multibyte-character
()
64 "Unescape unicode multibyte character."
68 (org-link-unescape "%E2%82%AC"))))
70 (ert-deftest test-org
/org-link-unescape-ascii-extended-char
()
71 "Unescape old style percent escaped character."
75 (decode-coding-string (org-link-unescape "%E0%E2%E7%E8%E9%EA%EE%F4%F9%FB") 'latin-1
))))
77 (ert-deftest test-org
/org-link-escape-url-with-escaped-char
()
78 "Escape and unscape a URL that includes an escaped char.
79 http://article.gmane.org/gmane.emacs.orgmode/21459/"
82 "http://some.host.com/form?&id=blah%2Bblah25"
83 (org-link-unescape (org-link-escape "http://some.host.com/form?&id=blah%2Bblah25")))))
85 (ert-deftest test-org
/accumulated-properties-in-drawers
()
86 "Ensure properties accumulate in subtree drawers."
87 (org-test-at-id "75282ba2-f77a-4309-a970-e87c149fe125"
88 (org-babel-next-src-block)
89 (should (equal '(2 1) (org-babel-execute-src-block)))))
95 (ert-deftest test-org
/org-read-date
()
96 "Test `org-read-date' specifications."
97 ;; Parse ISO date with abbreviated year and month.
98 (should (equal "2012-03-29 16:40"
99 (let ((org-time-was-given t
))
100 (org-read-date t nil
"12-3-29 16:40"))))
101 ;; Parse Europeans dates.
102 (should (equal "2012-03-29 16:40"
103 (let ((org-time-was-given t
))
104 (org-read-date t nil
"29.03.2012 16:40"))))
105 ;; Parse Europeans dates without year.
106 (should (string-match "2[0-9]\\{3\\}-03-29 16:40"
107 (let ((org-time-was-given t
))
108 (org-read-date t nil
"29.03. 16:40")))))
116 ;; Fuzzy links [[text]] encompass links to a target (<<text>>), to
117 ;; a target keyword (aka an invisible target: #+TARGET: text), to
118 ;; a named element (#+name: text) and to headlines (* Text).
120 (ert-deftest test-org
/fuzzy-links
()
121 "Test fuzzy links specifications."
122 ;; 1. Fuzzy link goes in priority to a matching target.
123 (org-test-with-temp-text
124 "#+TARGET: Test\n#+NAME: Test\n|a|b|\n<<Test>>\n* Test\n[[Test]]"
127 (should (looking-at "<<Test>>")))
128 ;; 2. Fuzzy link should then go to a matching target keyword.
129 (org-test-with-temp-text
130 "#+NAME: Test\n|a|b|\n#+TARGET: Test\n* Test\n[[Test]]"
133 (should (looking-at "#\\+TARGET: Test")))
134 ;; 3. Then fuzzy link points to an element with a given name.
135 (org-test-with-temp-text "Test\n#+NAME: Test\n|a|b|\n* Test\n[[Test]]"
138 (should (looking-at "#\\+NAME: Test")))
139 ;; 4. A target still lead to a matching headline otherwise.
140 (org-test-with-temp-text "* Head1\n* Head2\n*Head3\n[[Head2]]"
143 (should (looking-at "\\* Head2")))
144 ;; 5. With a leading star in link, enforce heading match.
145 (org-test-with-temp-text "#+TARGET: Test\n* Test\n<<Test>>\n[[*Test]]"
148 (should (looking-at "\\* Test"))))
154 (ert-deftest test-org
/fill-paragraph
()
155 "Test `org-fill-paragraph' specifications."
156 ;; At an Org table, align it.
157 (org-test-with-temp-text "|a|"
159 (should (equal (buffer-string) "| a |\n")))
160 ;; At a paragraph, preserve line breaks.
161 (org-test-with-temp-text "some \\\\\nlong\ntext"
162 (let ((fill-column 20))
164 (should (equal (buffer-string) "some \\\\\nlong text"))))
165 ;; Correctly fill a paragraph when point is at its very end.
168 (org-test-with-temp-text "A\nB"
169 (let ((fill-column 20))
170 (goto-char (point-max))
173 ;; Correctly fill the last paragraph of a greater element.
175 (equal "#+BEGIN_CENTER\n- 012345\n 789\n#+END_CENTER"
176 (org-test-with-temp-text "#+BEGIN_CENTER\n- 012345 789\n#+END_CENTER"
177 (let ((fill-column 8))
182 ;; Correctly fill an element in a narrowed buffer.
185 (org-test-with-temp-text "01234 6789"
186 (let ((fill-column 5))
187 (narrow-to-region 1 8)
190 ;; Special case: Fill first paragraph when point is at an item or
191 ;; a plain-list or a footnote reference.
194 (org-test-with-temp-text "- A\n B"
195 (let ((fill-column 20))
200 (org-test-with-temp-text "[fn:1] A\nB"
201 (let ((fill-column 20))
204 (org-test-with-temp-text "#+BEGIN_VERSE\nSome \\\\\nlong\ntext\n#+END_VERSE"
205 (let ((fill-column 20))
207 (should (equal (buffer-string)
208 "#+BEGIN_VERSE\nSome \\\\\nlong\ntext\n#+END_VERSE"))))
209 ;; Fill contents of `comment-block' elements.
212 (org-test-with-temp-text "#+BEGIN_COMMENT\nSome\ntext\n#+END_COMMENT"
213 (let ((fill-column 20))
217 "#+BEGIN_COMMENT\nSome text\n#+END_COMMENT"))
218 ;; Fill `comment' elements.
221 (org-test-with-temp-text " # A\n # B"
222 (let ((fill-column 20))
225 ;; Do nothing at affiliated keywords.
226 (org-test-with-temp-text "#+NAME: para\nSome\ntext."
227 (let ((fill-column 20))
229 (should (equal (buffer-string) "#+NAME: para\nSome\ntext.")))))
231 (ert-deftest test-org
/auto-fill-function
()
232 "Test auto-filling features."
233 ;; Auto fill paragraph.
236 (org-test-with-temp-text "12345 7890"
237 (let ((fill-column 5))
239 (org-auto-fill-function)
241 ;; Auto fill first paragraph in an item.
243 (equal "- 12345\n 7890"
244 (org-test-with-temp-text "- 12345 7890"
245 (let ((fill-column 7))
247 (org-auto-fill-function)
249 ;; Auto fill comments.
251 (equal " # 12345\n # 7890"
252 (org-test-with-temp-text " # 12345 7890"
253 (let ((fill-column 10))
255 (org-auto-fill-function)
257 ;; A hash within a line isn't a comment.
259 (equal "12345 # 7890\n# 1"
260 (org-test-with-temp-text "12345 # 7890 1"
261 (let ((fill-column 12))
263 (org-auto-fill-function)
265 ;; Correctly interpret empty prefix.
267 (equal "# a\n# b\nRegular\n# paragraph"
268 (org-test-with-temp-text "# a\n# b\nRegular paragraph"
269 (let ((fill-column 12))
271 (org-auto-fill-function)
273 ;; Comment block: auto fill contents.
275 (equal "#+BEGIN_COMMENT\n12345\n7890\n#+END_COMMENT"
276 (org-test-with-temp-text "#+BEGIN_COMMENT\n12345 7890\n#+END_COMMENT"
277 (let ((fill-column 5))
280 (org-auto-fill-function)
283 (equal "#+BEGIN_COMMENT\n12345\n7890\n#+END_COMMENT"
284 (org-test-with-temp-text "#+BEGIN_COMMENT\n12345 7890\n#+END_COMMENT"
285 (let ((fill-column 5))
288 (org-auto-fill-function)
290 ;; Do not fill if a new item could be created.
293 (org-test-with-temp-text "12345 - 90"
294 (let ((fill-column 5))
296 (org-auto-fill-function)
298 ;; Do not fill if a line break could be introduced.
300 (equal "123\\\\\n7890"
301 (org-test-with-temp-text "123\\\\ 7890"
302 (let ((fill-column 6))
304 (org-auto-fill-function)
306 ;; Do not fill affiliated keywords.
308 (equal "#+ATTR_LATEX: ABC\nDEFGHIJKL"
309 (org-test-with-temp-text "#+ATTR_LATEX: ABC DEFGHIJKL"
310 (let ((fill-column 20))
312 (org-auto-fill-function)
319 (ert-deftest test-org
/comment-dwim
()
320 "Test `comment-dwim' behaviour in an Org buffer."
321 ;; No region selected, no comment on current line and line not
322 ;; empty: insert comment on line above.
325 (org-test-with-temp-text "Comment"
326 (progn (call-interactively 'comment-dwim
)
328 ;; No region selected, no comment on current line and line empty:
329 ;; insert comment on this line.
331 (equal "# \nParagraph"
332 (org-test-with-temp-text "\nParagraph"
333 (progn (call-interactively 'comment-dwim
)
335 ;; No region selected, and a comment on this line: indent it.
337 (equal "* Headline\n # Comment"
338 (org-test-with-temp-text "* Headline\n# Comment"
339 (progn (forward-line)
340 (let ((org-adapt-indentation t
))
341 (call-interactively 'comment-dwim
))
343 ;; Also recognize single # at column 0 as comments.
346 (org-test-with-temp-text "# Comment"
347 (progn (forward-line)
348 (call-interactively 'comment-dwim
)
350 ;; Region selected and only comments and blank lines within it:
351 ;; un-comment all commented lines.
353 (equal "Comment 1\n\nComment 2"
354 (org-test-with-temp-text "# Comment 1\n\n# Comment 2"
356 (transient-mark-mode 1)
357 (push-mark (point) t t
)
358 (goto-char (point-max))
359 (call-interactively 'comment-dwim
)
361 ;; Region selected without comments: comment all non-blank lines.
363 (equal "# Comment 1\n\n# Comment 2"
364 (org-test-with-temp-text "Comment 1\n\nComment 2"
366 (transient-mark-mode 1)
367 (push-mark (point) t t
)
368 (goto-char (point-max))
369 (call-interactively 'comment-dwim
)
371 ;; In front of a keyword without region, insert a new comment.
373 (equal "# \n#+KEYWORD: value"
374 (org-test-with-temp-text "#+KEYWORD: value"
375 (progn (call-interactively 'comment-dwim
)
382 (ert-deftest test-org
/mark-subtree
()
383 "Test `org-mark-subtree' specifications."
384 ;; Error when point is before first headline.
386 (org-test-with-temp-text "Paragraph\n* Headline\nBody"
387 (progn (transient-mark-mode 1)
388 (org-mark-subtree))))
389 ;; Without argument, mark current subtree.
393 (org-test-with-temp-text "* Headline\n** Sub-headline\nBody"
394 (progn (transient-mark-mode 1)
397 (list (region-beginning) (region-end))))))
398 ;; With an argument, move ARG up.
402 (org-test-with-temp-text "* Headline\n** Sub-headline\nBody"
403 (progn (transient-mark-mode 1)
406 (list (region-beginning) (region-end))))))
407 ;; Do not get fooled with inlinetasks.
408 (when (featurep 'org-inlinetask
)
411 (org-test-with-temp-text "* Headline\n*************** Task\nContents"
412 (progn (transient-mark-mode 1)
414 (let ((org-inlinetask-min-level 15)) (org-mark-subtree))
415 (region-beginning)))))))
421 (ert-deftest test-org
/beginning-of-line
()
422 "Test `org-beginning-of-line' specifications."
425 (org-test-with-temp-text "Some text\nSome other text"
426 (progn (org-beginning-of-line) (bolp))))
427 ;; Standard test with `visual-line-mode'.
429 (org-test-with-temp-text "A long line of text\nSome other text"
430 (progn (visual-line-mode)
432 (dotimes (i 1000) (insert "very "))
433 (org-beginning-of-line)
435 ;; At an headline with special movement.
437 (org-test-with-temp-text "* TODO Headline"
438 (let ((org-special-ctrl-a/e t
))
440 (and (progn (org-beginning-of-line) (looking-at "Headline"))
441 (progn (org-beginning-of-line) (bolp))
442 (progn (org-beginning-of-line) (looking-at "Headline")))))))
444 (ert-deftest test-org
/end-of-line
()
445 "Test `org-end-of-line' specifications."
448 (org-test-with-temp-text "Some text\nSome other text"
449 (progn (org-end-of-line) (eolp))))
450 ;; Standard test with `visual-line-mode'.
452 (org-test-with-temp-text "A long line of text\nSome other text"
453 (progn (visual-line-mode)
455 (dotimes (i 1000) (insert "very "))
456 (goto-char (point-min))
459 ;; At an headline with special movement.
461 (org-test-with-temp-text "* Headline :tag:\n"
462 (let ((org-special-ctrl-a/e t
))
463 (and (progn (org-end-of-line) (looking-at " :tag:"))
464 (progn (org-end-of-line) (eolp))
465 (progn (org-end-of-line) (looking-at " :tag:"))))))
466 ;; At an headline without special movement.
468 (org-test-with-temp-text "* Headline :tag:\n"
469 (let ((org-special-ctrl-a/e nil
))
470 (and (progn (org-end-of-line) (eolp))
471 (progn (org-end-of-line) (eolp))))))
472 ;; At an headline, with reversed movement.
474 (org-test-with-temp-text "* Headline :tag:\n"
475 (let ((org-special-ctrl-a/e
'reversed
)
476 (this-command last-command
))
477 (and (progn (org-end-of-line) (eolp))
478 (progn (org-end-of-line) (looking-at " :tag:"))))))
479 ;; At a block without hidden contents.
481 (org-test-with-temp-text "#+BEGIN_CENTER\nContents\n#+END_CENTER"
482 (progn (org-end-of-line) (eolp))))
483 ;; At a block with hidden contents.
485 (org-test-with-temp-text "#+BEGIN_CENTER\nContents\n#+END_CENTER"
486 (let ((org-special-ctrl-a/e t
))
487 (org-hide-block-toggle)
491 (ert-deftest test-org
/forward-element
()
492 "Test `org-forward-element' specifications."
493 ;; 1. At EOB: should error.
494 (org-test-with-temp-text "Some text\n"
495 (goto-char (point-max))
496 (should-error (org-forward-element)))
497 ;; 2. Standard move: expected to ignore blank lines.
498 (org-test-with-temp-text "First paragraph.\n\n\nSecond paragraph."
499 (org-forward-element)
500 (should (looking-at "Second paragraph.")))
501 ;; 3. Headline tests.
502 (org-test-with-temp-text "
507 ;; 3.1. At an headline beginning: move to next headline at the
510 (org-forward-element)
511 (should (looking-at "** Head 1.2"))
512 ;; 3.2. At an headline beginning: move to parent headline if no
513 ;; headline at the same level.
515 (org-forward-element)
516 (should (looking-at "** Head 1.2")))
517 ;; 4. Greater element tests.
518 (org-test-with-temp-text
519 "#+BEGIN_CENTER\nInside.\n#+END_CENTER\n\nOutside."
520 ;; 4.1. At a greater element: expected to skip contents.
521 (org-forward-element)
522 (should (looking-at "Outside."))
523 ;; 4.2. At the end of greater element contents: expected to skip
524 ;; to the end of the greater element.
526 (org-forward-element)
527 (should (looking-at "Outside.")))
529 (org-test-with-temp-text "
543 ;; 5.1. At list top point: expected to move to the element after
546 (org-forward-element)
547 (should (looking-at "Outside."))
548 ;; 5.2. Special case: at the first line of a sub-list, but not at
549 ;; beginning of line, move to next item.
552 (org-forward-element)
553 (should (looking-at "- item2"))
556 (org-forward-element)
557 (should (looking-at " - sub2"))
558 ;; 5.3 At sub-list beginning: expected to move after the sub-list.
560 (org-forward-element)
561 (should (looking-at " Inner paragraph."))
562 ;; 5.4. At sub-list end: expected to move outside the sub-list.
564 (org-forward-element)
565 (should (looking-at " Inner paragraph."))
566 ;; 5.5. At an item: expected to move to next item, if any.
568 (org-forward-element)
569 (should (looking-at " - sub3"))))
571 (ert-deftest test-org
/backward-element
()
572 "Test `org-backward-element' specifications."
573 ;; 1. Should error at BOB.
574 (org-test-with-temp-text " \nParagraph."
575 (should-error (org-backward-element)))
576 ;; 2. Should move at BOB when called on the first element in buffer.
578 (org-test-with-temp-text "\n#+TITLE: test"
579 (progn (forward-line)
580 (org-backward-element)
582 ;; 3. Not at the beginning of an element: move at its beginning.
583 (org-test-with-temp-text "Paragraph1.\n\nParagraph2."
586 (org-backward-element)
587 (should (looking-at "Paragraph2.")))
588 ;; 4. Headline tests.
589 (org-test-with-temp-text "
594 ;; 4.1. At an headline beginning: move to previous headline at the
597 (org-backward-element)
598 (should (looking-at "** Head 1.1"))
599 ;; 4.2. At an headline beginning: move to parent headline if no
600 ;; headline at the same level.
602 (org-backward-element)
603 (should (looking-at "* Head 1"))
604 ;; 4.3. At the first top-level headline: should error.
606 (should-error (org-backward-element)))
607 ;; 5. At beginning of first element inside a greater element:
608 ;; expected to move to greater element's beginning.
609 (org-test-with-temp-text "Before.\n#+BEGIN_CENTER\nInside.\n#+END_CENTER"
611 (org-backward-element)
612 (should (looking-at "#\\+BEGIN_CENTER")))
613 ;; 6. At the beginning of the first element in a section: should
614 ;; move back to headline, if any.
616 (org-test-with-temp-text "#+TITLE: test\n* Headline\n\nParagraph"
617 (progn (goto-char (point-max))
619 (org-backward-element)
620 (org-at-heading-p))))
622 (org-test-with-temp-text "
637 ;; 7.1. At beginning of sub-list: expected to move to the
638 ;; paragraph before it.
640 (org-backward-element)
641 (should (looking-at "item1"))
642 ;; 7.2. At an item in a list: expected to move at previous item.
644 (org-backward-element)
645 (should (looking-at " - sub2"))
647 (org-backward-element)
648 (should (looking-at "- item1"))
649 ;; 7.3. At end of list/sub-list: expected to move to list/sub-list
652 (org-backward-element)
653 (should (looking-at " - sub1"))
655 (org-backward-element)
656 (should (looking-at "- item1"))
657 ;; 7.4. At blank-lines before list end: expected to move to top
660 (org-backward-element)
661 (should (looking-at "- item1"))))
663 (ert-deftest test-org
/up-element
()
664 "Test `org-up-element' specifications."
665 ;; 1. At BOB or with no surrounding element: should error.
666 (org-test-with-temp-text "Paragraph."
667 (should-error (org-up-element)))
668 (org-test-with-temp-text "* Head1\n* Head2"
670 (should-error (org-up-element)))
671 (org-test-with-temp-text "Paragraph1.\n\nParagraph2."
673 (should-error (org-up-element)))
674 ;; 2. At an headline: move to parent headline.
675 (org-test-with-temp-text "* Head1\n** Sub-Head1\n** Sub-Head2"
678 (should (looking-at "\\* Head1")))
679 ;; 3. Inside a greater element: move to greater element beginning.
680 (org-test-with-temp-text
681 "Before.\n#+BEGIN_CENTER\nParagraph1\nParagraph2\n#+END_CENTER\n"
684 (should (looking-at "#\\+BEGIN_CENTER")))
686 (org-test-with-temp-text "* Top
693 Paragraph within sub2.
696 ;; 4.1. Within an item: move to the item beginning.
699 (should (looking-at " - sub2"))
700 ;; 4.2. At an item in a sub-list: move to parent item.
703 (should (looking-at "- item1"))
704 ;; 4.3. At an item in top list: move to beginning of whole list.
707 (should (looking-at "- item1"))
708 ;; 4.4. Special case. At very top point: should move to parent of
712 (should (looking-at "\\* Top"))))
714 (ert-deftest test-org
/down-element
()
715 "Test `org-down-element' specifications."
716 ;; Error when the element hasn't got a recursive type.
717 (org-test-with-temp-text "Paragraph."
718 (should-error (org-down-element)))
719 ;; Error when the element has no contents
720 (org-test-with-temp-text "* Headline"
721 (should-error (org-down-element)))
722 ;; When at a plain-list, move to first item.
723 (org-test-with-temp-text "- Item 1\n - Item 1.1\n - Item 2.2"
726 (should (looking-at " - Item 1.1")))
727 (org-test-with-temp-text "#+NAME: list\n- Item 1"
729 (should (looking-at " Item 1")))
730 ;; When at a table, move to first row
731 (org-test-with-temp-text "#+NAME: table\n| a | b |"
733 (should (looking-at " a | b |")))
734 ;; Otherwise, move inside the greater element.
735 (org-test-with-temp-text "#+BEGIN_CENTER\nParagraph.\n#+END_CENTER"
737 (should (looking-at "Paragraph"))))
739 (ert-deftest test-org
/drag-element-backward
()
740 "Test `org-drag-element-backward' specifications."
741 ;; 1. Error when trying to move first element of buffer.
742 (org-test-with-temp-text "Paragraph 1.\n\nParagraph 2."
743 (should-error (org-drag-element-backward)))
744 ;; 2. Error when trying to swap nested elements.
745 (org-test-with-temp-text "#+BEGIN_CENTER\nTest.\n#+END_CENTER"
747 (should-error (org-drag-element-backward)))
748 ;; 3. Error when trying to swap an headline element and
749 ;; a non-headline element.
750 (org-test-with-temp-text "Test.\n* Head 1"
752 (should-error (org-drag-element-backward)))
753 ;; 4. Otherwise, swap elements, preserving column and blank lines
755 (org-test-with-temp-text "Para1\n\n\nParagraph 2\n\nPara3"
756 (search-forward "graph")
757 (org-drag-element-backward)
758 (should (equal (buffer-string) "Paragraph 2\n\n\nPara1\n\nPara3"))
759 (should (looking-at " 2")))
760 ;; 5. Preserve visibility of elements and their contents.
761 (org-test-with-temp-text "
769 (while (search-forward "BEGIN_" nil t
) (org-cycle))
770 (search-backward "- item 1")
771 (org-drag-element-backward)
774 '((63 .
82) (26 .
48))
775 (mapcar (lambda (ov) (cons (overlay-start ov
) (overlay-end ov
)))
776 (overlays-in (point-min) (point-max)))))))
778 (ert-deftest test-org
/drag-element-forward
()
779 "Test `org-drag-element-forward' specifications."
780 ;; 1. Error when trying to move first element of buffer.
781 (org-test-with-temp-text "Paragraph 1.\n\nParagraph 2."
783 (should-error (org-drag-element-forward)))
784 ;; 2. Error when trying to swap nested elements.
785 (org-test-with-temp-text "#+BEGIN_CENTER\nTest.\n#+END_CENTER"
787 (should-error (org-drag-element-forward)))
788 ;; 3. Error when trying to swap a non-headline element and an
790 (org-test-with-temp-text "Test.\n* Head 1"
791 (should-error (org-drag-element-forward)))
792 ;; 4. Otherwise, swap elements, preserving column and blank lines
794 (org-test-with-temp-text "Paragraph 1\n\n\nPara2\n\nPara3"
795 (search-forward "graph")
796 (org-drag-element-forward)
797 (should (equal (buffer-string) "Para2\n\n\nParagraph 1\n\nPara3"))
798 (should (looking-at " 1")))
799 ;; 5. Preserve visibility of elements and their contents.
800 (org-test-with-temp-text "
808 (while (search-forward "BEGIN_" nil t
) (org-cycle))
809 (search-backward "#+BEGIN_CENTER")
810 (org-drag-element-forward)
813 '((63 .
82) (26 .
48))
814 (mapcar (lambda (ov) (cons (overlay-start ov
) (overlay-end ov
)))
815 (overlays-in (point-min) (point-max)))))))
820 ;;; test-org.el ends here