emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] fill-paragraph: wrong behaviour after latex-environments


From: Nicolas Goaziou
Subject: Re: [O] fill-paragraph: wrong behaviour after latex-environments
Date: Sat, 05 May 2012 18:13:32 +0200

Hello,

Bastien <address@hidden> writes:

> Benjamin Motz <address@hidden> writes:
>
>> invoking fill-paragraph on the following org-code will delete the
>> newline after \end{equation}:
>>
>> The relation
>> \begin{equation}
>> E=mc^2
>> \end{equation}
>> won't be further discussed here.
>>
>> This behaviour is undesirable because it makes the org-text less
>> readable. Also, when adding '%' after \end{equation}, newline is still
>> being deleted by fill-paragraph (and the text after '%' won't be
>> exported e.g. by latex-export).
>
> There is `org-element-paragraph-separate', which already uses a 
> better `paragraph-separate' value than the one currently in Org.
>
> Nicolas, do you think the default value for `paragraph-separate' 
> in Org could use ̀org-element-paragraph-separate' in a way?
>
> How does org-element.el handles inline LaTeX code like the one 
> Benjamin showed?

org-element now provides a filling function for elements
(org-element-fill-paragraph) which doesn't rely on `paragraph-separate'
value. It needs testing, but it should do the right thing in most, if
not all, cases.

You can still use `org-element-paragraph-separate' as a value for
`paragraph-separate' (provided all carets are removed first), but
I don't think that would be useful.


Regards,

-- 
Nicolas Goaziou



reply via email to

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