Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comment lines in orgmode

Consult org document with the comments lines:

The Org Manual: Comment lines

12.6 Comment lines

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, regions surrounded by #+BEGIN_COMMENT ... #+END_COMMENT are not exported.

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 either129. The command below helps changing the comment status of a headline.

C-c ;

Toggle the ‘COMMENT’ keyword at the beginning of an entry.

#+BEGIN_COMMENT … #+END_COMMENT works correctly.

Code block showing comment

However,

Lines starting with zero or more whitespace characters followed by one ‘#’ and a whitespace are treated as comments and, as such, are not exported.

Another code block

Do I misunderstand that statement?

like image 253
Alice Avatar asked Dec 31 '22 22:12

Alice


1 Answers

You read it well: working comment syntax are

#+BEGIN_COMMENT
this is a comment
#+END_COMMENT

or

# this is a comment (needs at least one first whitespace after #)

However

#this is not a comment (it is exported as "#this is not a comment")
like image 152
Picaud Vincent Avatar answered Jan 08 '23 08:01

Picaud Vincent