Function: org-export--delete-comment-trees
org-export--delete-comment-trees is a byte-compiled function defined
in ox.el.gz.
Signature
(org-export--delete-comment-trees)
Documentation
Delete commented trees and commented inlinetasks in the buffer.
Narrowing, if any, is ignored.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox.el.gz
(defun org-export--delete-comment-trees ()
"Delete commented trees and commented inlinetasks in the buffer.
Narrowing, if any, is ignored."
(org-with-wide-buffer
(goto-char (point-min))
(let* ((case-fold-search t)
(regexp (concat org-outline-regexp-bol ".*" org-comment-string)))
(while (re-search-forward regexp nil t)
(let ((element (org-element-at-point)))
(when (org-element-property :commentedp element)
(delete-region (org-element-begin element)
(org-element-end element))))))))