From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: comments and attributes Date: Wed, 01 Feb 2012 14:04:08 +0100 Message-ID: <878vkmso1j.fsf@gmail.com> References: <87aa5lwfxm.fsf@med.uni-goettingen.de> <81pqefv4r9.fsf@gmail.com> <87r4yt9x5u.fsf@med.uni-goettingen.de> <81ipk2mbzv.fsf@gmail.com> <878vkyi09l.fsf@gmail.com> <81aa52vrpz.fsf_-_@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsZtE-0007ah-Bv for emacs-orgmode@gnu.org; Wed, 01 Feb 2012 08:06:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsZt8-0007Cn-75 for emacs-orgmode@gnu.org; Wed, 01 Feb 2012 08:06:20 -0500 Received: from mail-we0-f169.google.com ([74.125.82.169]:40569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsZt7-0007CX-Tm for emacs-orgmode@gnu.org; Wed, 01 Feb 2012 08:06:14 -0500 Received: by wera13 with SMTP id a13so1194243wer.0 for ; Wed, 01 Feb 2012 05:06:12 -0800 (PST) In-Reply-To: <81aa52vrpz.fsf_-_@gmail.com> (Jambunathan K.'s message of "Wed, 01 Feb 2012 14:46:24 +0530") 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: Jambunathan K Cc: Orgmode Hello, Jambunathan K writes: > On a related note, > > * Example > > This > is > a > single > # some comment > paragraph. > > > This > is > another > #+attr_odt: t > paragraph. > > if I parse the above buffer, I get > > #+begin_src emacs-lisp > (paragraph > (:begin 412 :end 431 :contents-begin 412 :contents-end 430 :post-blank 0) > "This \nis \na\nsingle") > (comment > (:begin 431 :end 446 :value "# some comment\n" :post-blank 0)) > (paragraph > (:begin 446 :end 459 :contents-begin 446 :contents-end 456 :post-blank 2) > "paragraph.") > (paragraph > (:begin 459 :end 477 :contents-begin 459 :contents-end 476 :post-blank 0) > "This \nis \nanother") > (paragraph > (:begin 477 :end 502 :contents-begin 491 :contents-end 501 :post-blank 0 :attr_odt > ("t")) > "paragraph.") > #+end_src > > I see that the new export engine treats comment and control lines as par > breakers. The backends that are in production treats the first paragraph > as but a single paragraph. Not the export engine, but the parser. Comment is an element type, as is Paragraph. Beginning an element ends the previous one. This has always been true in Org. For example, you may look at `paragraph-start' and `paragraph-separate' values in an Org buffer: comments (and many other things) are clearly separating and ending paragraphs. Also, it is consistent with other elements. Indeed, consider the following example: --8<---------------cut here---------------start------------->8--- : fixed-width line 1 # Commented line : fixed-width line 2 --8<---------------cut here---------------end--------------->8--- If you use C-c ' on the first fixed-width line, you won't be offered to edit also the second one. Though, you're right, current exporter indeed ignores that Org feature. > There is already a way by which parbreaks can be introduced. Do you > think there could be some useful behaviour achieved - side by side > export of images came up in this thread - by not having commented > elements introduce parbreaks. I think that it's a mistake to rely on comments to define semantics. Anyway, I suggested something already about the problem of side by side paragraphs. What was wrong with it? If it wasn't clear, I'll try to provide an example. If it was flawed, we may try to improve it. Regards, -- Nicolas Goaziou