emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Federico Beffa <beffa@ieee.org>
To: Rasmus <rasmus@gmx.us>,
	emacs-orgmode@gnu.org, Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: [PATCH] org.el: make org-paragraph-fill ignore \[...\] regions starting and ending a line
Date: Sat, 9 Aug 2014 12:20:08 +0200	[thread overview]
Message-ID: <CAKrPhPN11+hzLc3QZUXQsSORyRYksq0NqSR_trK3zQNNLiaFng@mail.gmail.com> (raw)
In-Reply-To: <87tx5mxfck.fsf@nicolasgoaziou.fr>

>> 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.
>
> But then, you introduce a discrepancy between M-q results and Org
> syntax. This is not optimal either.

Would you mind elaborating on the discrepancy. I do not quite
understand what do you mean. Doesn't the Org syntax "just" defines the
result of parsing a buffer (like in most programming languages where
indentation and line breaks are just to help people reading code)?

>
> Also, this will not be consistent anyway with \begin{...} ... \end{...}
> markup, which is handled differently, unlike to LaTeX.

Yes, I agree. But, given that we do not want to make \[...\] an
`org-mode' environment for backward compatibility reasons, this
appears to be the only alternative. Note that (as noted earlier)
`latex-mode' behaves similarly: it does not fill parts of a paragraph
where a line begins with \[ and ends with \]. The reason and goal is
to achieve that a carefully typed long equation does not get scrambled
by M-q because if it does it becomes difficult to read for humans.

>
>> 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.
>
> Note that you should use master to provide patches. `org-fill-paragraph'
> was modified recently.

OK, will pull again.

Regards,
Federico

  reply	other threads:[~2014-08-09 10:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05 21:45 [PATCH] org.el: make org-paragraph-fill ignore \[...\] regions starting and ending a line Federico Beffa
2014-08-09  8:00 ` Nicolas Goaziou
2014-08-09 10:20   ` Federico Beffa [this message]
2014-08-09 23:20     ` Nicolas Goaziou
  -- strict thread matches above, loose matches on Subject: below --
2014-08-07 13:56 Federico Beffa
2014-08-10 13:13 Federico Beffa
2014-08-11 13:06 ` Nicolas Goaziou
2014-08-11 18:27   ` Federico Beffa
2014-08-11 19:43     ` Rasmus
2014-08-11 20:44       ` Nicolas Goaziou
2014-08-16  7:50         ` Federico Beffa
2014-08-16  9:46           ` Nicolas Goaziou
2014-08-11 20:40     ` Nicolas Goaziou
2014-08-16  7:38       ` Federico Beffa
2014-08-28 10:10         ` Nicolas Goaziou
2014-08-10 13:15 Federico Beffa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKrPhPN11+hzLc3QZUXQsSORyRYksq0NqSR_trK3zQNNLiaFng@mail.gmail.com \
    --to=beffa@ieee.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    --cc=rasmus@gmx.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).