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: Bastien
Subject: Re: [O] Should comments break paragraphs?
Date: Wed, 17 Jul 2013 10:15:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Hi Nicolas,

Nicolas Goaziou <address@hidden> writes:

>> I think everyone agrees that comments are an important part of Org.
>
> Then I, for one, am not in the "everyone" part. FWIW, I think comments
> are a minor part of Org and that we're just bikeshedding.

Perhaps "part" is not the right word here.

The way to know whether comments are important or not is to poll
users.  My guess is that many of them use comments (I do a lot).
That's what I call "important".

And I don't think we not bikeshedding: several users explain why
they think the current behavior does not match what they expect.
If the conversation goes on, it's just that the answer is not
what they expect either.

>> Nicolas, apart from the current code, what theoretically prevents Org
>> from considering them as *empty* lines (not blank lines)?
>
> This question is too vague.
>
> What is the difference between an empty line and the way they are
> treated actually?

(I used the "empty vs. blank" line terminology from the thread.)

By considered an empty line, I mean this:

This is
# a comment
within a paragraph.

If "# a comment" is considered to be an empty line (i.e. a no-line),
then the above is treated as one single paragraph.  If it is treated
as a blank line, the above is treated as three paragraphs: a first
paragraph, a commented paragraph, another paragraph.

> More importantly, where, precisely, comments should be
> allowed to appear in an Org buffer?

I think "no-line" comments they should be allowed anywhere expect in
src code blocks, where the comment syntax is different.

For example this list:

- an item
# a comment
- another item

would be treated as

- an item
- another item

etc.

> IOW, you need to define exactly what a comment should be in Org, first,
> if the current definition doesn't suit you (or someone else willing to
> change it). Then, we'll know where the pitfalls are.

I think we have two options: either define comments in Org syntax,
either treat them as normal lines and delete them before parsing a
buffer for export purposes.

A simple (setq org-export-ignore-comments t) would put the user in
the second situation, where comments are deleted before parsing and
exporting, and treated as standard citizens when manipulating or
buffers.  (Eric's patch goes into that direction.)

Then (setq org-export-ignore-comments nil) would put us in the first
situation, which is the current one, where comments are defines as
elements within Org syntax, with some constraints when parsing or
exporting them (such as separating a paragraph.)

What do you think?

-- 
 Bastien



reply via email to

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