From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: Org-special-blogs does not make well-formed xhtml Date: Thu, 06 Oct 2011 12:17:16 +0200 Message-ID: <4E8D802C.7030601@christianmoe.com> References: <4E89AE38.3020309@christianmoe.com> <80r52unr44.fsf@somewhere.org> <81ipo4u8ln.fsf@gmail.com> <4E8B57FB.5040808@christianmoe.com> <2704BF81-08C0-4616-AFF1-20797E42CAE3@gmail.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030301020104040405020204" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:39897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBkyW-0007Vv-Sm for emacs-orgmode@gnu.org; Thu, 06 Oct 2011 06:14:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBkyV-0000kj-LU for emacs-orgmode@gnu.org; Thu, 06 Oct 2011 06:14:48 -0400 Received: from mars.hitrost.net ([91.185.211.18]:22813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBkyV-0000kS-4y for emacs-orgmode@gnu.org; Thu, 06 Oct 2011 06:14:47 -0400 In-Reply-To: <2704BF81-08C0-4616-AFF1-20797E42CAE3@gmail.com> 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: Carsten Dominik Cc: Sebastien Vauban , emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------030301020104040405020204 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Carsten, I've submitted a patch separately. It seems to play nice with the enclosed test file. If org-special-blocks is supposed to become part of the core (it's moved out of contrib, but we still have to require it), it might make sense to just move the html and latex formatting code into org-html.el and org-latex.el respectively, together with the handling of blockquotes, verses, centering etc. Yours, Christian On 10/4/11 11:33 PM, Carsten Dominik wrote: > Hi Christian, > > for now I have reverted the patch. WOuld you like to work on a better one? > > - Carsten > > On 4.10.2011, at 21:01, Christian Moe wrote: > >> Hi, >> >> Carsten, thanks. >> >> Jambunathan's probably right, though, that this fix (while necessary) is incomplete. Sorry, I hadn't thought it through. >> >> Now, when the first paragraph of a special block comes right after the #+BEGIN_WHATEVER line, it will just come as the first text node of the
block, and will not be wrapped in a

element. So among other things, any special CSS styling for

s will not be applied to it. >> >> It's not a big deal -- if you need a

(and often you really don't) the workaround is as simple as leaving an empty line between #+BEGIN_WHATEVER and the first paragraph. >> >> But I guess it would be more consistent/expected/helpful behavior for special-blocks to start a new paragraph -- this time *after* the opening

tag and not around it! >> >> Yours, >> Christian >> >> >> On 10/4/11 4:36 PM, Jambunathan K wrote: >>> >>> Carsten Dominik writes: >>>> I see no reason to not uncomment this line. Shall we just do this? >>> >>> Shouldn't a paragraph be opened/closed while entering/leaving the div. >>> >>> ,---- See org-xhtml-format-environment >>> | (center >>> | (case beg-end >>> | (BEGIN >>> | (org-lparse-end-paragraph) >>> | (insert "\n
") >>> | (org-lparse-begin-paragraph)) >>> | (END >>> | (org-lparse-end-paragraph) >>> | (insert "\n
") >>> | (org-lparse-begin-paragraph)))) >>> `---- >>> >>> We can always open a paragraph gratis, because empty paragraphs are >>> pruned at the end of export. > > > --------------030301020104040405020204 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="special-blocks-test.org" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="special-blocks-test.org" #+style: ") (org-open-par)) (when (equal (match-string 2 line) "END") (org-close-par-maybe) (insert "\n
") (org-open-par)) (throw 'nextline nil))) #+end_src --------------030301020104040405020204--