From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [BUG] [ODT] Annotations break paragraphs Date: Thu, 28 Mar 2013 15:41:01 +0100 Message-ID: <87vc8by4ci.fsf@gmail.com> References: <871ub3o6mn.fsf@bzg.ath.cx> <87ip4f9zqa.fsf@bzg.ath.cx> <87r4j35ejb.fsf@bzg.ath.cx> <87ip4fxh1e.fsf@gmail.com> <87k3osg7xg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULE0x-0000XO-HT for emacs-orgmode@gnu.org; Thu, 28 Mar 2013 10:41:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULE0r-0002O4-LB for emacs-orgmode@gnu.org; Thu, 28 Mar 2013 10:41:15 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:59432) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULE0r-0002Nk-FR for emacs-orgmode@gnu.org; Thu, 28 Mar 2013 10:41:09 -0400 Received: by mail-wi0-f172.google.com with SMTP id hr17so3376750wib.17 for ; Thu, 28 Mar 2013 07:41:08 -0700 (PDT) In-Reply-To: (Achim Gratz's message of "Thu, 28 Mar 2013 07:24:09 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Achim Gratz Cc: emacs-orgmode@gnu.org Hello, Achim Gratz writes: >> It wouldn't allow paragraphs within the annotation. > > ??? > > ----8<---- > There is an annotation by the original author here > #+BEGIN_ANNOTATION > I never meant to break this paragraph. > > But here's a second one in the annotation, > still not braking the outer paragraph. > #+END_ANNOTATION > in the middle of the paragraph. > ---->8---- Then you're contradicting yourself, since you also said: I suggest to follow the lead of (La)TeX and determine begin and end of such blocks by blank lines. In your example, the end of the "P-block" isn't at the blank line. My comment was on that precise part of your message. >> Anyway, every back-end has its own interpretation of what a paragraph >> is. Some back-ends don't even know what a paragraph is. Org cannot fit >> them all. > > That's why Org can't impose its much more restricted paragraph model on > backends with different paragraph models. As I explained, it doesn't impose anything on back-ends: it merely offers its reasonable view. You can always ignore its definition, as written just below. >> On the other hand, as the ox-odt patch somehow demonstrates, it is >> possible for a back-end to ignore Org paragraph definition and rolls its >> own. It requires some additional code, but I'm open to discussion about >> implementing tools in ox.el in order to ease the process. > > Yes, and footnotes with paragraphs... Anyway, for me this is the main > sticking point with how Org syntax is defined, because it currently > implies Org syntax == Backend semantics, which is simply not the case > for most if not all backends. You're stating the obvious. Org syntax is indeed different from back-end semantics. Otherwise, we wouldn't need export back-ends to do the transcoding job, would we? > Working around this in each and every backend doesn't look appealing. It didn't prevent dedicated people to rewrite almost all previous back-ends and implement additional ones. >> In any case, I think we ought to keep raw Org syntax as simple as >> possible. The current definition of a paragraph is simple enough. > > The syntax wouldn't change all that much, except that blank lines would > need to be made tokens during parsing. This is not only about blank lines. Remember your example: There is an annotation by the original author here #+BEGIN_ANNOTATION I never meant to break this paragraph. #+END_ANNOTATION in the middle of the paragraph. There is no blank line, and, yet, it should be parsed differently than it is actually. Therefore, it's not just about blank lines. It's about allowing indirectly paragraphs within paragraphs. Do not misunderstand me: I agree that the current paragraph model is restricted. But remember we're working with plain text which should be readable as plain text, not with a full-fledged XML-like markup. The strength of this paragraph definition lies in its simplicity. And I am impressed about how much is done with such a simple syntax. IMO, this kind of syntax, i.e. mixing blocks and paragraphs, is just ugly. It makes it impossible to read property the paragraph and emphasizes the annotation, which is counter-productive. A good rule of thumb is that blocks should be used as containers, never as inlined elements. Speaking of inlined elements, I repeat that [note:label] within the paragraph should offer a good markup for annotations. Regards, -- Nicolas Goaziou