emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: beffa@ieee.org
Cc: emacs-orgmode@gnu.org, mail@nicolasgoaziou.fr
Subject: Re: [PATCH] org.el: make org-paragraph-fill ignore \[...\] regions starting and ending a line
Date: Mon, 11 Aug 2014 21:43:59 +0200	[thread overview]
Message-ID: <874mxiizgg.fsf@gmx.us> (raw)
In-Reply-To: <CAKrPhPOhBeeOyBMbdRttym688c5Zz2kyEgNv=OuWYnWSin9aZQ@mail.gmail.com> (Federico Beffa's message of "Mon, 11 Aug 2014 20:27:12 +0200")

Federico Beffa <beffa@ieee.org> writes:

> On Mon, Aug 11, 2014 at 3:06 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> Federico Beffa <beffa@ieee.org> writes:
>>
>
>>> to help me understand what kind of problems one could face with HTML (or
>>> another back-end), could you give a concrete example?
>>
>> line 1
>> line 2
>> \[1+1\]
>>
>> ==>
>>
>> <p>
>> line 1
>> line 2
>> <img... />
>> </p>
>>
>> whereas
>>
>> line 1
>> line 2
>> \begin{equation*}
>> 1+1
>> \end{equation*}
>>
>> ==>
>>
>> <p>
>> line 1
>> line 2
>> </p>
>>
>> <p>
>> <img ... />
>> </p>
>>
>> IOW, there are two different structures in the document:
>>
>>   ((paragraph latex))
>>
>>   vs
>>
>>   ((paragraph) (latex))
>>
>> even though M-q cannot tell that difference (with your proposal, the
>> behaviour would be the same in both cases).
>
> The example highlight the difference that I suggested to remove in the
> very first place (by making \[...\] an environment). This was rejected
> to preserve backward compatibility and that's fine. So I moved on to a
> second proposal: modify the paragraph filling function.
>
> Didn't the following comment in your previous reply refer to the
> second proposal?
>
>> Ignoring \[...\] when filling the paragraph is misleading. You may
>> believe the object doesn't belong to the paragraph at all. I think M-q
>> should, on the contrary, give clues about the structure of the document.
>>
>> Also, it doesn't make a difference when exporting to LaTeX, but it might
>> in back-ends with a different definition for paragraphs (e.g. HTML).
>
> From your sentence in your last reply:
>    "... even though M-q cannot tell that difference (with your proposal,
>    the behaviour would be the same in both cases)."
> I understand that there is no technical deficiency in it. Am I
> therefore correct in saying that if you prefer not to include this
> proposal in org-mode it isn't for technical reasons but it is a matter
> of opinion/taste?
>
> I would like to know, because in any case I would like to use the
> proposed filling function in my copy of org-mode and if you see
> technical problems/errors I very much would like to be aware of them
> and, if possible, avoid/correct them.

How about adding the possibility to add hooks to org-fill-paragraph?
So that people can add "extensions" to fill as they want and the core
function can rely on org-element only?

—Rasmus

-- 
Lasciate ogni speranza, voi che leggete questo.

  reply	other threads:[~2014-08-11 19:44 UTC|newest]

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

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=874mxiizgg.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=beffa@ieee.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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).