Nicolas Goaziou <n.goaz...@gmail.com> writes: > Eric Schulte <schulte.e...@gmail.com> writes: > >> So are you proposing to remove comments from Org-mode entirely? > > Certainly not. >
Great, then I think we're much closer together on this than I originally thought. > > I'm on the "good enough" side and I simply suggest to live with it. > Also, if you badly need inline comments, there's the empty "comment" > macro: > > #+MACRO: comment > > Some text {{{comment(This is my comment)}}} and some more. > I'm not suggesting adding inline comments, only that comment lines be treated as "" instead of "\n". > >> But if we treat comments as semantically empty, then maybe they should >> be ignored by the parser? > > Yes, we can ignore them at the parser level. But what about the rest of > Org? There are many places that do not rely on the parser and do not > ignore comments (lists being an example, agenda being another one, and > I'm pretty sure comments at some locations can break Babel too). > > Something could be done, but again, it would certainly not be > a one-liner in org-element.el or ox.el. > I'm happy to work to fix places where babel is breaking comments. > >>> Even if you move it to ox.el, this is not an acceptable solution. Think >>> about the following example >>> >>> - item 1 >>> >>> # with a comment >>> >>> - item 2 >>> >>> If you simply delete matching lines, you break the list. >>> >> >> Yes, I would argue that this list should be broken, because with or >> without the comment the items are separated by two blank lines. > > On the other hand, visually, this list looks perfectly correct. > >> In my opinion comments as semantically empty lines is a simple rule >> for both users and parsers to understand. > > Comments are already almost semantically empty lines. That's why: > > Text > # Comment > Other Text > > generates two paragraphs in Org (and in every back-end excepted `latex', > but that's a different problem). They basically act as a paragraph > separator, much like blank lines. > > Also, note that if they really are empty lines, they cannot be inlined > within paragraphs either. > Sorry I was unclear, see above, by "semantically empty" I meant replacing comment lines with "" instead of the current behavior (except in the latex exporter) which replaces them with "\n". Cheers, > > > Regards, -- Eric Schulte http://cs.unm.edu/~eschulte