From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [patch] Terminating lists by indentation of #+SPECIALS too Date: Thu, 22 Apr 2010 11:44:49 +0200 Message-ID: References: <877ho4e56t.fsf@gmx.de> <87zl10co57.fsf@gmx.de> <87ljcgiy96.fsf@gmx.de> <871ve846rv.fsf@gmx.de> <398E37C4-42A0-4928-83BA-8F4258FE5503@gmail.com> <87ochb26r8.fsf@gmx.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4sxw-0005TQ-Ie for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 05:45:00 -0400 Received: from [140.186.70.92] (port=57940 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4sxr-0005Rg-Li for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 05:44:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4sxq-00070P-Ej for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 05:44:55 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:57801) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4sxq-00070G-4A for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 05:44:54 -0400 Received: by wyg36 with SMTP id 36so1395005wyg.0 for ; Thu, 22 Apr 2010 02:44:53 -0700 (PDT) In-Reply-To: <87ochb26r8.fsf@gmx.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastian Rose Cc: Emacs-orgmode mailing list On Apr 22, 2010, at 11:09 AM, Sebastian Rose wrote: > Carsten Dominik writes: >> Hi Sebastian, >> >> thanks or your patience - I have now aplied this patch. > > Thanks!!! > >> You are saying that your files "mostly validate". Are there issues >> we should address? > > > No no no no no. OK, I am glad to hear that. - Carsten > > I checked it over and over again.... it's _not_ the exporter, but > PHP's build-in XML-parser (libexpat ??). > > > It goes: > > Warning: DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: ID > org:1ad2d2aa-50d6-4423-9ada-ecb18b22fed7 already defined in > ... > > but it is not. > > > The parser fails to distinguish `name="org:2aff..."' and > `id="org:2aff..."' in headlines like > >

Headline >

> > > But it validates on http://validator.w3.org. > > > > The other error is cut-and-pasted HTML. An embedded youtube video - > something about Org-mode :) > > Those links do not validate - I'll have to fix that by hand. > > > > Sebastian > > >> >> Thanks! >> >> - Carsten >> >> On Apr 22, 2010, at 3:26 AM, Sebastian Rose wrote: >> >>> Carsten Dominik writes: >>>> Hi Sebastion, sorry for being hard to satisfy on this one. >>>> >>>> What I mean is this: >>>> >>>> The location where your patck kicks in looks like this: >>>> >>>> .... >>>> (org-export-html-close-lists-maybe line) >>>> >>>> ;; Protected HTML >>>> (when (get-text-property 0 'org-protected line) >>>> (let (par (ind (get-text-property 0 'original-indentation >>>> line))) >>>> (when (re-search-backward >>>> "\\(

\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) >>>> (setq par (match-string 1)) >>>> (replace-match "\\2\n")) >>>> (insert line "\n") >>>> >>>> So before we are looking at protected stuff, there is already a >>>> call to >>>> org-export-html-close-lists-maybe. It seems to me that what you >>>> are trying >>>> to >>>> do >>>> could just happen inside that function. The function checks for >>>> a text >>>> property >>>> 'original-indentation to check for special stuff that was >>>> indented - >>>> but apparently that does not cover your case. So in that >>>> function you could >>>> also look at the protected property and act accordingly. >>>> >>>> Does that make sense? >>> >>> >>> >>> Ah, now I got you here! >>> >>> You're feeling for the code is all to good :) I could indeed >>> remove more >>> than half of the lines. >>> >>> >>> So here comes the next generation: >>> >>> >>> >>> diff --git a/lisp/org-html.el b/lisp/org-html.el >>> index 0903bff..5b13649 100644 >>> --- a/lisp/org-html.el >>> +++ b/lisp/org-html.el >>> @@ -959,10 +959,12 @@ lang=\"%s\" xml:lang=\"%s\"> >>> (when (equal "ORG-VERSE-START" line) >>> (org-close-par-maybe) >>> (insert "\n

\n") >>> + (setq org-par-open t) >>> (setq inverse t) >>> (throw 'nextline nil)) >>> (when (equal "ORG-VERSE-END" line) >>> (insert "

\n") >>> + (setq org-par-open nil) >>> (org-open-par) >>> (setq inverse nil) >>> (throw 'nextline nil)) >>> @@ -1996,7 +1998,11 @@ If there are links in the string, don't >>> modify these." >>> (defvar local-list-indent) >>> (defvar local-list-type) >>> (defun org-export-html-close-lists-maybe (line) >>> - (let ((ind (or (get-text-property 0 'original-indentation line))) >>> + (let* ((rawhtml (and in-local-list (get-text-property 0 'org- >>> protected line))) >>> + (ind >>> + (if rawhtml >>> + (org-get-indentation line) >>> + (or (get-text-property 0 'original-indentation line)))) >>> ; (and (string-match "\\S-" line) >>> ; (org-get-indentation line)))) >>> didclose) >>> >>> >>> >>> Sebastian >>> _______________________________________________ >>> Emacs-orgmode mailing list >>> Please use `Reply All' to send replies to the list. >>> Emacs-orgmode@gnu.org >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> >> - Carsten >> >> >> > > -- > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Sebastian Rose Fachinformatiker / Anwendungsentwicklung > Viktoriastr. 22 Entwicklung von Anwendungen mit freien Werkzeugen > 30451 Hannover und Bibliotheken. > > 0173 83 93 417 sebastian_rose@gmx.de s.rose@emma-stil.de > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Carsten