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:
Nicolas Goaziou 2015-03-28 09:59:08 +01:00
parent fa0cc0ab70
commit e8b2a120c2
1 changed files with 5 additions and 4 deletions

View File

@ -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.