0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 22:37:47 +00:00

Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2021-05-16 10:16:50 +02:00
commit 53b5af21fd
2 changed files with 6 additions and 1 deletions

View file

@ -737,7 +737,9 @@ Return a list whose CAR is `drawer' and CDR is a plist containing
Assume point is at beginning of drawer." Assume point is at beginning of drawer."
(let ((case-fold-search t)) (let ((case-fold-search t))
(if (not (save-excursion (re-search-forward "^[ \t]*:END:[ \t]*$" limit t))) (if (not (save-excursion
(goto-char (min limit (line-end-position)))
(re-search-forward "^[ \t]*:END:[ \t]*$" limit t)))
;; Incomplete drawer: parse it as a paragraph. ;; Incomplete drawer: parse it as a paragraph.
(org-element-paragraph-parser limit affiliated) (org-element-paragraph-parser limit affiliated)
(save-excursion (save-excursion

View file

@ -662,6 +662,9 @@ Some other text
(should-not (should-not
(org-test-with-temp-text ":TEST:" (org-test-with-temp-text ":TEST:"
(org-element-map (org-element-parse-buffer) 'drawer 'identity nil t))) (org-element-map (org-element-parse-buffer) 'drawer 'identity nil t)))
(should-not
(org-test-with-temp-text ":END:"
(org-element-map (org-element-parse-buffer) 'drawer 'identity nil t)))
;; Handle non-empty blank line at the end of buffer. ;; Handle non-empty blank line at the end of buffer.
(should (should
(org-test-with-temp-text ":TEST:\nC\n:END:\n " (org-test-with-temp-text ":TEST:\nC\n:END:\n "