Nicolas Goaziou <mail <at> nicolasgoaziou.fr> writes: > Mark Edgington <edgimar <at> gmail.com> writes: > > > Assume we have the following sample org-mode document: > > > > * Test Heading > > test test test test test test test > > test test test test test test test > > test test test test test test test > > # HERE IS A COMMENT > > TEST TEST TEST TEST TEST TEST TEST > > TEST TEST TEST TEST TEST TEST TEST > > TEST TEST TEST TEST TEST TEST TEST > > > > I would assume that in org-mode the comment line would be completely > > ignored when exporting the document, however this seems not to be the > > case -- notice the difference when exporting the following to LaTeX: > > The behavior is correct. Actually, what you suggest was reported as > a bug a couple of years ago. Comments separate paragraphs, so you really > have two paragraphs in the first example, but only one in the second > example. > > You can handle comments differently by adding a function in, e.g. > `org-export-before-processing-hook', that will take care of removing > commented lines. These are easy to recognize. See > `org-export--delete-comments' for an example.
I'm inclined to view it more as a bug, because it makes it impossible to place comments within a paragraph. Paragraphs consist of sentences, and perhaps you'd like to make a note related to one of those sentences (in fact I do). On the other hand, if the behavior was to not create blank lines, it wouldn't be difficult to add a blank line either before or after a comment if desired. Furthermore, the behavior is inconsistent with how LaTeX comments behave (which may not matter, but it may be easier for people who know both org-mode and LaTeX for the behavior to be consistent). At the least, I think it would be helpful to have a built-in option that allows one to select the preferred behavior.