emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [PATCH] org.el: make org-paragraph-fill ignore \[...\] regions start


From: Federico Beffa
Subject: [O] [PATCH] org.el: make org-paragraph-fill ignore \[...\] regions starting and ending a line
Date: Tue, 5 Aug 2014 23:45:03 +0200

>>> The current proposal is to make them elements instead of objects in Org
>>> syntax (i.e, a `latex-environment' instead of a `latex-fragment'). In
>>> a nutshell:
>>>
>>>  - Pros:
>>>    + conform to LaTeX intent,
>>>    + impossible to fill.
>>>  - Cons:
>>>    - documents containing \[...\] mid-line will be broken (such
>>>      constructs will not be recognized anymore).

...

> If this is always the case for you, you can "fix" this behavior by
> always putting it in a new paragraph and using a filter.

OK, I understand that the Cons above is a serious issue and nobody wants it.
For this reason I went back to my original idea and modified the
`org-fill-paragraph' function. This provides the two Pros above
without having to introduce the undesired Cons. The behavior is a
follows:
- if \[...\] is inline, behave as before.
- if \[ is the first non space character of a line and the closing \]
is the last non space character of a line (possibly spanning several
lines), then do not fill this region of the paragraph.

Attached you find a patch with the proposed modification. I would
greatly appreciate if you could consider it for inclusion in org-mode
and provide feedback.

I understand that if you are willing to make use of this patch, I will
have to sign a copyright assignment form. This is not a problem, but
please do not make me waste time with forms if you do not want to
include the patch in org-mode. Please provide instructions on how to
proceed.

Regards,
Federico.

Attachment: 0001-org.el-make-org-paragraph-fill-ignore-.-regions-star.patch
Description: Binary data


reply via email to

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