Lines starting with zero or more whitespace characters followed by one ‘#’ and a whitespace are treated as comments and, as such, are not exported.
Likewise, comment blocks ‘#+BEGIN_COMMENT’ … ‘#+END_COMMENT’ are not exported. 135
Finally, a ‘COMMENT’ keyword at the beginning of an entry, but after any other keyword or priority cookie, comments out the entire subtree. In this case, the subtree is not exported and no code block within it is executed or tangled136. The command below helps to change the comment status of a headline.
org-toggle-comment) ¶Toggle the ‘COMMENT’ keyword at the beginning of an entry.
Just like in Literal Examples, you need to escape leading ‘*’ with ‘,’ to avoid interpreting them as headings.
For less restrictive export limitations, consider using a select tag (see Export Settings) instead.