emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] ox: fix comment exported as a blank line


From: Phil Estival
Subject: Re: [PATCH] ox: fix comment exported as a blank line
Date: Thu, 2 Jun 2022 07:02:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0


Le 01/06/2022 à 13:48, Max Nikulin wrote :
On 01/06/2022 12:30, Phil Estival wrote:

* lisp/ox.el (org-export--skip-p): no longer export single-line
comments as blank lines which did break paragraphs in two.
unfortunately, you took a wrong direction
If you are interested in other cases when org paragraph is not the same
as exported LaTeX one, see the following thread:

Max Nikulin. Comments break up a paragraph when writing
one-setence-per-line. Sun, 3 Oct 2021 18:34:10 +0700.
https://list.orgmode.org/sjc4fk$76r$1@ciao.gmane.io


Max,

Right, thanks for the clarifications.

A hook at pre-export stage to filter out the
line-comments is one correct way to get an output
compliant with different backends. Yet the removal
of comments may provide an AST different from the
one of the emacs buffer.

>> However there [are] users in this thread who
>> expect that "# " or "#+latex:" should not be
>> "element" and should be a part of surrounding
>> paragraph.

That's an interesting idea.  This would add an
attribute to the previous element.

If we keep speculating on that, the rendering path
would change. It would have to consider this
property too when showing or hiding elements.

And it would require additional function to
reallocate this attribute like a node.

And this would probably break some conceptual
integrity.

The org spec is correct to handle the comments the
way it does. As I see it now, that's the only
possible attempts to reconcile the behaviors of
different backends.

Still, the writing experience is much improved
when comments are allowed inside paragraphs
without disrupting the publication, and this
definitely worth a few modifications.


Phil




reply via email to

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