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: Rainer M Krug
Subject: Re: [O] Should comments break paragraphs?
Date: Wed, 17 Jul 2013 15:21:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin)

Bastien <address@hidden> writes:

> Nicolas Goaziou <address@hidden> writes:
>
>>   1. an item
>>   # a normal line breaking the list
>>   1. an item in another list
>>
>> but, upon exporting, both items will belong to the same list. This is
>> just nonsensical.
>
> Users who want comments to be equivalent to empty lines will not write
> the above.  If they do, it's their responsability.
>
>>> 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.)
>>
>> And the direction is wrong... Parsing shouldn't modify the buffer being
>> parsed, ever. But you can use a hook for that purpose.
>
> I didn't suggest that parsing should modify the before: I said "where
> comments are deleted before parsing and exporting".
>
> There should be an easy solution for that.
>
>>> 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?
>>
>> I still think the same. Comments belong to Org syntax (if they don't,
>> you can't even fill them correctly, for example). If you redefine them,
>> there's no easy workaround.
>
> I didn't suggest to redefine comments.
>
>> You have to change every part of Org that
>> assumes there will be no comment in its way (lists, agenda, babel,
>> parser and probably more I can't think of).
>>
>> If it's an HTML/ODT export issue, it's far easier to patch the export
>> back-ends instead. 10 lines of code in each one, maybe.
>
> This is a general pre-export issue, it does not depend on the
> exporters themselves.
>
> So again, what prevents us to make it easy for users to treat comments
> as no-line before parsing and exporting?

OK - I can't comment on the inner workings of org and the exporters (so
this might not make any sense at all), but I think that
comments have their place in exports as well:

LaTeX: has comments
odt format: has notes

So at least in these two formats, it would make sense to provide the
exports to the exporter, so that they can then be converted to
comments. But in general, I agree that they should be treated as being
non existent, rather then as "\n", unless the exporter deals with them
on it's own.

Cheers,

Rainer

-- 
Rainer M. Krug

email: RMKrug<at>gmail<dot>com




reply via email to

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