emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Should comments break paragraphs?


From: Nicolas Goaziou
Subject: Re: [O] Should comments break paragraphs?
Date: Tue, 16 Jul 2013 19:51:38 +0200

Eric Schulte <address@hidden> writes:

> So are you proposing to remove comments from Org-mode entirely? 

Certainly not.

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.

> 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.

>> 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.


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]