ox: Fix `org-export--delete-commented-subtrees'
* lisp/ox.el (org-export--delete-commented-subtrees): Match COMMENT subtree even with a priority cookie or a TODO keyword.
This commit is contained in:
parent
fa0cc0ab70
commit
e8b2a120c2
|
@ -2669,11 +2669,12 @@ The function assumes BUFFER's major mode is `org-mode'."
|
||||||
"Delete commented subtrees or inlinetasks in the buffer."
|
"Delete commented subtrees or inlinetasks in the buffer."
|
||||||
(org-with-wide-buffer
|
(org-with-wide-buffer
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(let ((regexp (concat org-outline-regexp-bol org-comment-string)))
|
(let ((regexp (concat org-outline-regexp-bol ".*" org-comment-string)))
|
||||||
(while (re-search-forward regexp nil t)
|
(while (re-search-forward regexp nil t)
|
||||||
(delete-region
|
(let ((e (org-element-at-point)))
|
||||||
(line-beginning-position)
|
(when (org-element-property :commentedp e)
|
||||||
(org-element-property :end (org-element-at-point)))))))
|
(delete-region (org-element-property :begin e)
|
||||||
|
(org-element-property :end e))))))))
|
||||||
|
|
||||||
(defun org-export--prune-tree (data info)
|
(defun org-export--prune-tree (data info)
|
||||||
"Prune non exportable elements from DATA.
|
"Prune non exportable elements from DATA.
|
||||||
|
|
Loading…
Reference in New Issue