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 18:01:12 +0200

Hello,

Eric Schulte <address@hidden> writes:

> When Org-mode is used as a document preparation language inline comments
> are very useful.  The use case being notes on the surrounding material
> which are not to be published.  Both HTML and LaTeX support comments and
> at least in LaTeX they are extensively used (in my experience) and can
> be very helpful.

Again, Org is neither LaTeX nor HTML.

> Stripping lines starting with "^ *#[^+]" is a trivial pre-processing
> step, and would support the traditional Org-mode comments which (as I
> recall) could previously appear mid paragraph without causing
> problems.

> The attached patch worked on some small example files for me.

As I explained in a previous post, it's only a kludge hiding the real
problem: comments cannot appear anywhere, even if we don't take export
into account. Actually, handling comments during export is the easiest
part of the problem.

> From ce4c30ebe56d4cd66810bca48824d8841e7b130d Mon Sep 17 00:00:00 2001
> From: Eric Schulte <address@hidden>
> Date: Tue, 16 Jul 2013 09:44:59 -0600
> Subject: [PATCH] support inline comments w/o breaking paragraphs
>
> * lisp/org-element.el (org-element-parse-buffer): Strip inline comments
>   as a pre-processing step before exporting.

The parser is unrelated to the export process, so export pre-processing
shouldn't happen in org-element.el. Also, parsing a buffer mustn't
modify it in the process.

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.


Regards,

-- 
Nicolas Goaziou



reply via email to

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