emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Problem with org-export--delete-comments


From: Ethan Ligon
Subject: Re: [O] Problem with org-export--delete-comments
Date: Fri, 18 Dec 2015 00:59:06 +0000

On Thu, Dec 17, 2015 at 12:47 PM Nicolas Goaziou <address@hidden> wrote:
Hello,

Ethan Ligon <address@hidden> writes:

> I've long used the following construction for displayed equations in org
> #
> \[
>     u_i(c)=p_i\lambda
> \]
> #
> which (i) gives nice space for reading equations in the org-source, and
> (ii) nicely protects the display equation from (fill-paragraph) and
> friends.
>
> However, exporting with this construction *stopped* working after commit
> 53a4209; what happens now is that ox.el replaces the # with a blank line,
> breaking my single paragraph into  three.

I see only one paragraph above. Could you elaborate a bit?

Sure.  If I export the above using ox-ascii, I obtain, in part:

#+begin_example
I've long used the following construction for displayed equations in org

\[ u_i(c)=p_i\lambda \]

which (i) gives nice space for reading equations in the org-source, and
(ii) nicely protects the display equation from (fill-paragraph) and
friends.
#+end_example

While if  I export via ox-latex I obtain in the *.tex source:

#+begin_example
I've long used the following construction for displayed equations in org

\[
    u_i(c)=p_i\lambda
\]

which (i) gives nice space for reading equations in the org-source, and
(ii) nicely protects the display equation from (fill-paragraph) and
friends.
#+end_example

It's really this last case that's a serious problem, since when compiled with  LaTeX we get three paragraphs (too much vertical space between  the  first line and the displayed equation, and excruciatingly an improper indentation of the bit following the  displayed equation (i.e., "which (i)..." is indented).



 

> A related problem: one can no longer have commented lines in (at least
> some) property drawers.

This is not possible indeed, per property drawers syntax. Also, I'd
rather not introduce comments in property drawers (I don't think this
was ever officially supported anyway).

> It seems to me that the correct solution would have org-export--delete-
> comments actually delete a single line comment, not replace it with  \n, as
> was the case prior to  the  indicated commit.
>
> I gather that the change was introduced to deal with a bug observed by
> Samuel Wales (http://article.gmane.org/gmane.emacs.orgmode/102860; see also
> below).  His problem example involved incorrectly truncated footnotes
> (these are deemed to end after two blank lines).  But it seems to me that
> the correct solution to his example is to  delete *both* the  commented
> line and the  following blank line.

Been there, done that. Your solution is not correct in all cases. E.g.,
with the following document

  Paragra1
  # comment

  Paragraph2

removing both the comment and the blank line above gives you a single
paragraph, which doesn't match expectations.

Point taken,  and I appreciate that you must have thought about this quite a lot.   But I still wish for the old behavior, which  would have simply deleted the # comment line.

This would break SW's footnote example, but perhaps that (contrived? maybe I don't understand his  use case) problem could be addressed by changing the documentation.  Right now the docs say that a footnote 

"ends at the next footnote definition, headline, or after two consecutive empty lines."

 Why not just change to 

"ends at the next footnote definition, headline, or two empty lines (consecutive, or with a comment)."

Thanks for your work on this!
-Ethan
 

reply via email to

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