Fix property drawer insertion with consecutive headlines
* lisp/org.el (org-get-property-block): Fix property drawer insertion with consecutive headlines * testing/lisp/test-org.el (test-org/entry-put): Add test. Thanks to Eric Abrahamsen for reporting it.
This commit is contained in:
parent
1aad53bd39
commit
705a2cdeab
|
@ -15337,6 +15337,7 @@ return nil."
|
||||||
(cons (point) (progn (goto-char (match-end 0))
|
(cons (point) (progn (goto-char (match-end 0))
|
||||||
(line-beginning-position))))
|
(line-beginning-position))))
|
||||||
(force
|
(force
|
||||||
|
(goto-char beg)
|
||||||
(org-insert-property-drawer)
|
(org-insert-property-drawer)
|
||||||
(let ((pos (save-excursion (search-forward ":END:")
|
(let ((pos (save-excursion (search-forward ":END:")
|
||||||
(line-beginning-position))))
|
(line-beginning-position))))
|
||||||
|
|
|
@ -2366,7 +2366,13 @@ Text.
|
||||||
(string-match "^ *:A: +1$"
|
(string-match "^ *:A: +1$"
|
||||||
(org-test-with-temp-text "* H"
|
(org-test-with-temp-text "* H"
|
||||||
(org-entry-put (point) "A" "1")
|
(org-entry-put (point) "A" "1")
|
||||||
(buffer-string)))))
|
(buffer-string))))
|
||||||
|
;; Special case: two consecutive headlines.
|
||||||
|
(should
|
||||||
|
(string-match "\\* A\n *:PROPERTIES:"
|
||||||
|
(org-test-with-temp-text "* A\n** B"
|
||||||
|
(org-entry-put (point) "A" "1")
|
||||||
|
(buffer-string)))))
|
||||||
|
|
||||||
|
|
||||||
;;; Radio Targets
|
;;; Radio Targets
|
||||||
|
|
Loading…
Reference in New Issue