In Org-mode there are several ways to make comments. But I do not know of any way to make inline comments. According to the manual
regions surrounded by ‘#+BEGIN_COMMENT’ ... ‘#+END_COMMENT’ will not be exported.
But this is only true if the said region starts a line.
In the following
#+TITLE: Test
text #+BEGIN_COMMENT comment 1 #+END_COMMENT text
text
#+BEGIN_COMMENT comment 2 #+END_COMMENT text
only comment 2 is treated as a comment. It exports (e.g. C-e A) as
text #+BEGIN_COMMENT comment 1 #+END_COMMENT text
text
Also, org-toggle-comment
does not work for making inline comments by using it on regions and comment-region
does not even create a comment.
So, how can I make inline comments in Org-mode?
Jonathan Leech-Pepin's comment on your question on \printbibliography
gave me an idea. You can use a macro for inline comments. Note that you need trailing space after the comment definition.
#+macro: comment
...
{{{comment(here is a comment)}}}
EDIT: Since this is supposed to be a macro odd input may screw things up. I'm a little surprised that
{{{comment(here is a)}} comment)}}}
works for me, although
{{{comment(here is a comment) more}}}
does not. I would assume that anything other than fairly simple text would be fairly fragile if they decide to change the way they parse macros in the future.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With