From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: [patch] Terminating lists by indentation of #+SPECIALS too Date: Mon, 19 Apr 2010 01:01:14 +0200 Message-ID: <877ho4e56t.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3dUW-00025e-Ac for emacs-orgmode@gnu.org; Sun, 18 Apr 2010 19:01:28 -0400 Received: from [140.186.70.92] (port=58434 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3dUU-00024C-0W for emacs-orgmode@gnu.org; Sun, 18 Apr 2010 19:01:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3dUQ-0007Bp-CB for emacs-orgmode@gnu.org; Sun, 18 Apr 2010 19:01:25 -0400 Received: from mail.gmx.net ([213.165.64.20]:59823) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O3dUP-0007Ba-Q2 for emacs-orgmode@gnu.org; Sun, 18 Apr 2010 19:01:22 -0400 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: Emacs-orgmode mailing list --=-=-= Hello Carsten, there was much discussion about a terminator and I ran into a problem, that made me think we need one. But then I found we had one --- it's just not used on HTML export. Below is a little file I wrote. Thanks to the `- __' items, it results in the XHTML closely to what I wanted it to. But only as long as I use those _undocumented_ `- __' items. Once you remove them, you'll see, that the `#+html: #+STYLE: body,p,div,td{font-size:13px;font-family:sans-serif;} #+STYLE: div { text-align:left; } #+STYLE: #content {width:550px; #+STYLE: margin-left:auto;margin-right:auto;text-align:center; } #+STYLE: #postamble { width:550px;clear:both;border-top:1px solid black; #+STYLE: margin-left:auto;margin-right:auto;text-align:center; } #+STYLE: * List of design patterns #+HTML:
*Behavioural Patterns* - [[file:BatchCommand][BatchCommand]] - [[file:ChainOfResponsibility.org][Chain Of Responsibility]] - [[file:Command.org][Command]], UndoableCommand and BatchCommand - [[file:Interpreter.org][Interpreter]] - [[file:Iterator.org][Iterator]] - [[file:Mediator.org][Mediator]] - [[file:Memento.org][Memento]] - [[file:NullObject][NullObject]] - [[file:Observer.org][Observer]] - [[file:State.org][State]] - [[file:Strategy.org][Strategy]] - [[file:TemplateMethod.org][Template Method]] - [[file:Visitor.org][Visitor]] *Creational Patterns* - [[file:AbstractFactory.org][Abstract Factory]] - [[file:Builder.org][Builder]] - [[file:Factory.org][Factory]] - [[file:FactoryMethod.org][Factory Method]] - [[file:Prototype.org][Prototype]] - [[file:Singleton.org][Singleton]] - __ #+html:
#+html:
*Structural Patterns* - [[file:Adapter.org][Adapter]] - [[file:Composite.org][Composite]] - [[file::Bridge.org][Bridge]] - [[file:Decorator.org][Decorator]] - [[file:Facade.org][Facade]] - [[file:Flyweight.org][Flyweight]] - [[file:Proxy.org][Proxy]] *Unsorted* - [[file:BusinessDelegate.org][Business Delegate]] - [[file:DataAccessObject.org][Data Access Object]] - [[file:DataTransferObject.org][Data Transfer Object]] - [[file:DependencyInjection.org][Dependency Injection]] - [[file:FluentInterface.org][Fluent Interface]] - [[file:InversionOfControl.org][Inversion Of Control]] - [[file:ModelViewControler.org][Model View Controler]] - [[file:ModelViewPresenter.org][Model View Presenter]] - [[file:Plugin.org][Plugin]] - __ #+HTML:
--=-=-= And, finally, the patch. I would have used the function `org-export-html-close-lists-maybe' but that didn't work, so I wrote similar code just in place. Carsten: If it makes things easier for you, I could apply the change to the master branch and send an appropriate patch. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=org-html.el-terminate-lists-by-indentation.patch diff --git a/lisp/org-html.el b/lisp/org-html.el index fcddd50..812e63c 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -929,6 +929,15 @@ lang=\"%s\" xml:lang=\"%s\"> ;; Protected HTML (when (get-text-property 0 'org-protected line) + (when in-local-list + (let ((ind (or (get-text-property 0 'original-indentation line) 0))) + (while (and (car local-list-indent) (< ind (car local-list-indent))) + (org-close-li (car local-list-type)) + (insert (format "\n" (car local-list-type))) + (setq local-list-indent (cdr local-list-indent)) + (setq local-list-type (cdr local-list-type)) + (setq in-local-list local-list-indent)))) + (let (par (ind (get-text-property 0 'original-indentation line))) (when (re-search-backward "\\(

\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) --=-=-= Best wishes Sebastian Footnotes: [fn:1] `org-end-of-item' and `org-end-of-item-list' already consider the decreased indentation of the `#+html:' line the end of the list. You can proof that by deleting the last dot and all empty lines, so that the `#+html:' line is directly below the last list item. Then move point somewhere on the item and do `M-x org-end-of-item RET'. --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: [patch] Terminating lists by indentation of #+SPECIALS too Date: Mon, 19 Apr 2010 01:54:44 +0200 Message-ID: <87zl10co57.fsf@gmx.de> References: <877ho4e56t.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3eKG-0003Hi-9B for emacs-orgmode@gnu.org; Sun, 18 Apr 2010 19:54:56 -0400 Received: from [140.186.70.92] (port=60927 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3eKD-0003HW-93 for emacs-orgmode@gnu.org; Sun, 18 Apr 2010 19:54:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3eKB-0005k8-N8 for emacs-orgmode@gnu.org; Sun, 18 Apr 2010 19:54:53 -0400 Received: from mail.gmx.net ([213.165.64.20]:44505) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O3eKB-0005jy-Bu for emacs-orgmode@gnu.org; Sun, 18 Apr 2010 19:54:51 -0400 In-Reply-To: <877ho4e56t.fsf@gmx.de> (Sebastian Rose's message of "Mon, 19 Apr 2010 01:01:14 +0200") 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: Emacs-orgmode mailing list --=-=-= Haaarrrgh --- the first patch in my previous mail does not work for all cases. Hairy stuff.... Here's what did _not_ work with my previous patch: #+html:

*Unsorted Patterns* - a - b - c #+HTML:
Somthing inside the last item!!! #+HTML:
But this one finally works: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=org-html.el-terminate-lists-by-indentation.patch diff --git a/lisp/org-html.el b/lisp/org-html.el index fcddd50..0174e43 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -929,6 +929,17 @@ lang=\"%s\" xml:lang=\"%s\"> ;; Protected HTML (when (get-text-property 0 'org-protected line) + (when in-local-list + (let ((ind (org-get-indentation line))) + (while (and (car local-list-indent) (< ind (car local-list-indent))) + (org-close-li (car local-list-type)) + (insert (format "\n" (car local-list-type))) + (setq local-list-indent (cdr local-list-indent)) + (setq local-list-type (cdr local-list-type)) + (setq in-local-list local-list-indent)) + (insert line "\n") + (throw 'nextline nil))) + (let (par (ind (get-text-property 0 'original-indentation line))) (when (re-search-backward "\\(

\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) --=-=-= Again: If it makes things easier, I could apply the change to the master branch and send an appropriate patch. Sebastian Sebastian Rose writes: > Hello Carsten, > > > there was much discussion about a terminator and I ran into a problem, > that made me think we need one. But then I found we had one --- it's > just not used on HTML export. > > > Below is a little file I wrote. Thanks to the `- __' items, it results > in the XHTML closely to what I wanted it to. > But only as long as I use those _undocumented_ `- __' items. Once you > remove them, you'll see, that the `#+html: inside the last list item and the XHTML will not validate. > > > As I looked at it, I found the most natural solution would be, to > terminate the list by regarding the indentation of `#+WHATEVER' and > `#+BEGIN_WHATEVER' if inside lists [fn:1]. > > > > The patch below (diffed against `remove-compatibility-code') makes > XHTML-export honor the indentation of `#+SPECIALS'. > > > > Here's the Org-file I wrote (remove and add the `- __' list items to see > the effect): > > > #+OPTIONS: toc:nil > #+STYLE: > > * List of design patterns > > #+HTML:

> *Behavioural Patterns* > - [[file:BatchCommand][BatchCommand]] > - [[file:ChainOfResponsibility.org][Chain Of Responsibility]] > - [[file:Command.org][Command]], UndoableCommand and BatchCommand > - [[file:Interpreter.org][Interpreter]] > - [[file:Iterator.org][Iterator]] > - [[file:Mediator.org][Mediator]] > - [[file:Memento.org][Memento]] > - [[file:NullObject][NullObject]] > - [[file:Observer.org][Observer]] > - [[file:State.org][State]] > - [[file:Strategy.org][Strategy]] > - [[file:TemplateMethod.org][Template Method]] > - [[file:Visitor.org][Visitor]] > *Creational Patterns* > - [[file:AbstractFactory.org][Abstract Factory]] > - [[file:Builder.org][Builder]] > - [[file:Factory.org][Factory]] > - [[file:FactoryMethod.org][Factory Method]] > - [[file:Prototype.org][Prototype]] > - [[file:Singleton.org][Singleton]] > - __ > #+html:
> #+html:
> *Structural Patterns* > - [[file:Adapter.org][Adapter]] > - [[file:Composite.org][Composite]] > - [[file::Bridge.org][Bridge]] > - [[file:Decorator.org][Decorator]] > - [[file:Facade.org][Facade]] > - [[file:Flyweight.org][Flyweight]] > - [[file:Proxy.org][Proxy]] > *Unsorted* > - [[file:BusinessDelegate.org][Business Delegate]] > - [[file:DataAccessObject.org][Data Access Object]] > - [[file:DataTransferObject.org][Data Transfer Object]] > - [[file:DependencyInjection.org][Dependency Injection]] > - [[file:FluentInterface.org][Fluent Interface]] > - [[file:InversionOfControl.org][Inversion Of Control]] > - [[file:ModelViewControler.org][Model View Controler]] > - [[file:ModelViewPresenter.org][Model View Presenter]] > - [[file:Plugin.org][Plugin]] > - __ > #+HTML:
> > > > And, finally, the patch. I would have used the function > `org-export-html-close-lists-maybe' but that didn't work, so I wrote > similar code just in place. > > Carsten: If it makes things easier for you, I could apply the change to > the master branch and send an appropriate patch. > > > diff --git a/lisp/org-html.el b/lisp/org-html.el > index fcddd50..812e63c 100644 > --- a/lisp/org-html.el > +++ b/lisp/org-html.el > @@ -929,6 +929,15 @@ lang=\"%s\" xml:lang=\"%s\"> > > ;; Protected HTML > (when (get-text-property 0 'org-protected line) > + (when in-local-list > + (let ((ind (or (get-text-property 0 'original-indentation line) 0))) > + (while (and (car local-list-indent) (< ind (car local-list-indent))) > + (org-close-li (car local-list-type)) > + (insert (format "\n" (car local-list-type))) > + (setq local-list-indent (cdr local-list-indent)) > + (setq local-list-type (cdr local-list-type)) > + (setq in-local-list local-list-indent)))) > + > (let (par (ind (get-text-property 0 'original-indentation line))) > (when (re-search-backward > "\\(

\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) > > > > > > Best wishes > > Sebastian > > > > > Footnotes: > > [fn:1] `org-end-of-item' and `org-end-of-item-list' already consider the > decreased indentation of the `#+html:' line the end of the list. > > You can proof that by deleting the last dot and all empty lines, > so that the `#+html:' line is directly below the last list > item. Then move point somewhere on the item and do `M-x > org-end-of-item RET'. > > _______________________________________________ > 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 --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [patch] Terminating lists by indentation of #+SPECIALS too Date: Wed, 21 Apr 2010 09:59:15 +0200 Message-ID: References: <877ho4e56t.fsf@gmx.de> <87zl10co57.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 1O4UqB-0001me-2v for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 03:59:23 -0400 Received: from [140.186.70.92] (port=52145 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4Uq8-0001lP-Mr for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 03:59:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4Uq6-0002kQ-TN for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 03:59:20 -0400 Received: from mail-ew0-f214.google.com ([209.85.219.214]:57130) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4Uq6-0002k3-KC for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 03:59:18 -0400 Received: by ewy6 with SMTP id 6so2329050ewy.32 for ; Wed, 21 Apr 2010 00:59:17 -0700 (PDT) In-Reply-To: <87zl10co57.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 Hi Sebastian, I am not sure I understand this patch fully. And it looks to me that this should be taken care of in `org-export-html-close-list-maybe'. Could you take another look and check if this could be easily moved into there? I am confused why this is inside the when clause about protectedness of the line. But I may have just lost my memory of how this works.... - Carsten On Apr 19, 2010, at 1:54 AM, Sebastian Rose wrote: > Haaarrrgh --- > > > the first patch in my previous mail does not work for all cases. Hairy > stuff.... > > > Here's what did _not_ work with my previous patch: > > #+html:

> *Unsorted Patterns* > - a > - b > - c > #+HTML:
Somthing inside the last item!!! > #+HTML:
> > > > > > But this one finally works: > > > diff --git a/lisp/org-html.el b/lisp/org-html.el > index fcddd50..0174e43 100644 > --- a/lisp/org-html.el > +++ b/lisp/org-html.el > @@ -929,6 +929,17 @@ lang=\"%s\" xml:lang=\"%s\"> > > ;; Protected HTML > (when (get-text-property 0 'org-protected line) > + (when in-local-list > + (let ((ind (org-get-indentation line))) > + (while (and (car local-list-indent) (< ind (car local- > list-indent))) > + (org-close-li (car local-list-type)) > + (insert (format "\n" (car local-list-type))) > + (setq local-list-indent (cdr local-list-indent)) > + (setq local-list-type (cdr local-list-type)) > + (setq in-local-list local-list-indent)) > + (insert line "\n") > + (throw 'nextline nil))) > + > (let (par (ind (get-text-property 0 'original-indentation line))) > (when (re-search-backward > "\\(

\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) > > > Again: If it makes things easier, I could apply the change to the > master > branch and send an appropriate patch. > > > > > > Sebastian > > > > > > > Sebastian Rose writes: >> Hello Carsten, >> >> >> there was much discussion about a terminator and I ran into a >> problem, >> that made me think we need one. But then I found we had one --- it's >> just not used on HTML export. >> >> >> Below is a little file I wrote. Thanks to the `- __' items, it >> results >> in the XHTML closely to what I wanted it to. >> But only as long as I use those _undocumented_ `- __' items. Once you >> remove them, you'll see, that the `#+html: > inside the last list item and the XHTML will not validate. >> >> >> As I looked at it, I found the most natural solution would be, to >> terminate the list by regarding the indentation of `#+WHATEVER' and >> `#+BEGIN_WHATEVER' if inside lists [fn:1]. >> >> >> >> The patch below (diffed against `remove-compatibility-code') makes >> XHTML-export honor the indentation of `#+SPECIALS'. >> >> >> >> Here's the Org-file I wrote (remove and add the `- __' list items >> to see >> the effect): >> >> >> #+OPTIONS: toc:nil >> #+STYLE: >> >> * List of design patterns >> >> #+HTML:

>> *Behavioural Patterns* >> - [[file:BatchCommand][BatchCommand]] >> - [[file:ChainOfResponsibility.org][Chain Of Responsibility]] >> - [[file:Command.org][Command]], UndoableCommand and BatchCommand >> - [[file:Interpreter.org][Interpreter]] >> - [[file:Iterator.org][Iterator]] >> - [[file:Mediator.org][Mediator]] >> - [[file:Memento.org][Memento]] >> - [[file:NullObject][NullObject]] >> - [[file:Observer.org][Observer]] >> - [[file:State.org][State]] >> - [[file:Strategy.org][Strategy]] >> - [[file:TemplateMethod.org][Template Method]] >> - [[file:Visitor.org][Visitor]] >> *Creational Patterns* >> - [[file:AbstractFactory.org][Abstract Factory]] >> - [[file:Builder.org][Builder]] >> - [[file:Factory.org][Factory]] >> - [[file:FactoryMethod.org][Factory Method]] >> - [[file:Prototype.org][Prototype]] >> - [[file:Singleton.org][Singleton]] >> - __ >> #+html:
>> #+html:
>> *Structural Patterns* >> - [[file:Adapter.org][Adapter]] >> - [[file:Composite.org][Composite]] >> - [[file::Bridge.org][Bridge]] >> - [[file:Decorator.org][Decorator]] >> - [[file:Facade.org][Facade]] >> - [[file:Flyweight.org][Flyweight]] >> - [[file:Proxy.org][Proxy]] >> *Unsorted* >> - [[file:BusinessDelegate.org][Business Delegate]] >> - [[file:DataAccessObject.org][Data Access Object]] >> - [[file:DataTransferObject.org][Data Transfer Object]] >> - [[file:DependencyInjection.org][Dependency Injection]] >> - [[file:FluentInterface.org][Fluent Interface]] >> - [[file:InversionOfControl.org][Inversion Of Control]] >> - [[file:ModelViewControler.org][Model View Controler]] >> - [[file:ModelViewPresenter.org][Model View Presenter]] >> - [[file:Plugin.org][Plugin]] >> - __ >> #+HTML:
>> >> >> >> And, finally, the patch. I would have used the function >> `org-export-html-close-lists-maybe' but that didn't work, so I wrote >> similar code just in place. >> >> Carsten: If it makes things easier for you, I could apply the >> change to >> the master branch and send an appropriate patch. >> >> >> diff --git a/lisp/org-html.el b/lisp/org-html.el >> index fcddd50..812e63c 100644 >> --- a/lisp/org-html.el >> +++ b/lisp/org-html.el >> @@ -929,6 +929,15 @@ lang=\"%s\" xml:lang=\"%s\"> >> >> ;; Protected HTML >> (when (get-text-property 0 'org-protected line) >> + (when in-local-list >> + (let ((ind (or (get-text-property 0 'original- >> indentation line) 0))) >> + (while (and (car local-list-indent) (< ind (car local- >> list-indent))) >> + (org-close-li (car local-list-type)) >> + (insert (format "\n" (car local-list-type))) >> + (setq local-list-indent (cdr local-list-indent)) >> + (setq local-list-type (cdr local-list-type)) >> + (setq in-local-list local-list-indent)))) >> + >> (let (par (ind (get-text-property 0 'original-indentation >> line))) >> (when (re-search-backward >> "\\(

\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) >> >> >> >> >> >> Best wishes >> >> Sebastian >> >> >> >> >> Footnotes: >> >> [fn:1] `org-end-of-item' and `org-end-of-item-list' already >> consider the >> decreased indentation of the `#+html:' line the end of the >> list. >> >> You can proof that by deleting the last dot and all empty >> lines, >> so that the `#+html:' line is directly below the last list >> item. Then move point somewhere on the item and do `M-x >> org-end-of-item RET'. >> >> _______________________________________________ >> 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 > _______________________________________________ > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: [patch] Terminating lists by indentation of #+SPECIALS too Date: Wed, 21 Apr 2010 18:08:53 +0200 Message-ID: <87ljcgiy96.fsf@gmx.de> References: <877ho4e56t.fsf@gmx.de> <87zl10co57.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4cUL-0004U2-Mr for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 12:09:21 -0400 Received: from [140.186.70.92] (port=34647 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4cUH-0004OP-OC for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 12:09:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4cU5-0000Dn-F8 for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 12:09:08 -0400 Received: from mail.gmx.net ([213.165.64.20]:50717) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O4cU4-0000DK-Hb for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 12:09:05 -0400 In-Reply-To: (Carsten Dominik's message of "Wed, 21 Apr 2010 09:59:15 +0200") 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: Carsten Dominik Cc: Emacs-orgmode mailing list --=-=-= Hi Carsten, Carsten Dominik writes: > Hi Sebastian, > > I am not sure I understand this patch fully. And it looks to me that this > should be taken care of in `org-export-html-close-list-maybe'. Could you take > another look and check if this could be easily moved into there? I am confused > why this is inside the when clause about protectedness of the line. I was aware of the function `org-export-html-close-list-maybe' but I couldn't get that to work. Now got it to work by adding a new parameter to that function, saying, that it's first argument is raw HTML (see new patch below). There was another problem about paragraphs. In this file, "*List ONE*" was wrapped in "

", while "*List TWO*" was not: --=-=-= Content-Type: text/x-verbatim Content-Disposition: inline * Some Lists #+HTML:
*List ONE* - Item one - Item two #+html:
#+html:
*List TWO* - Item one - Item two #+HTML:
--=-=-= The new patch fixes this, too. That is, what the new `org-open-par-maybe' is for. It's a corner case and I should keep it for testing. I published all my org-notes (more than 100 files) to HTML and they validate better then before. So the patch might be save to apply. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=org-html.el-terminate-lists-by-indentation-2.patch --- lisp/org-html.el 2010-04-21 17:02:18.000000000 +0200 +++ lisp/org-html-versuch-mit-rawhtml.el 2010-04-21 17:50:10.000000000 +0200 @@ -929,6 +929,12 @@ ;; Protected HTML (when (get-text-property 0 'org-protected line) + (when in-local-list + (org-export-html-close-lists-maybe line t) + (insert line "\n") + (throw 'nextline nil)) + + (let (par (ind (get-text-property 0 'original-indentation line))) (when (re-search-backward "\\(

\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) @@ -959,10 +965,12 @@ (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)) @@ -986,6 +994,8 @@ (unless (string-match "\\\\\\\\[ \t]*$" line) (setq line (concat line "\\\\"))))) + (org-open-par-maybe) + ;; make targets to anchors (setq start 0) (while (string-match @@ -1982,6 +1992,11 @@ (org-close-par-maybe) (insert "\n

") (setq org-par-open t)) +(defun org-open-par-maybe () + "Insert

, but only if no paragraph is open." + (when (not org-par-open) + (insert "\n

") + (setq org-par-open t))) (defun org-close-par-maybe () "Close paragraph if there is one open." (when org-par-open @@ -1995,15 +2010,20 @@ (defvar in-local-list) (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))) +(defun org-export-html-close-lists-maybe (line &optional rawhtml) + "RAWHTML suppresses paragraphs and checks the indentation for +`#+SPECIAL:' lines." + (let ((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) (when ind (while (and in-local-list (<= ind (car local-list-indent))) - (setq didclose t) + (setq didclose (not rawhtml)) (org-close-li (car local-list-type)) (insert (format "\n" (car local-list-type))) (pop local-list-type) (pop local-list-indent) --=-=-= Sebastian > But I may have just lost my memory of how this works.... > > - Carsten > > On Apr 19, 2010, at 1:54 AM, Sebastian Rose wrote: > >> Haaarrrgh --- >> >> >> the first patch in my previous mail does not work for all cases. Hairy >> stuff.... >> >> >> Here's what did _not_ work with my previous patch: >> >> #+html:

>> *Unsorted Patterns* >> - a >> - b >> - c >> #+HTML:
Somthing inside the last item!!! >> #+HTML:
>> >> >> >> >> >> But this one finally works: >> >> >> diff --git a/lisp/org-html.el b/lisp/org-html.el >> index fcddd50..0174e43 100644 >> --- a/lisp/org-html.el >> +++ b/lisp/org-html.el >> @@ -929,6 +929,17 @@ lang=\"%s\" xml:lang=\"%s\"> >> >> ;; Protected HTML >> (when (get-text-property 0 'org-protected line) >> + (when in-local-list >> + (let ((ind (org-get-indentation line))) >> + (while (and (car local-list-indent) (< ind (car local- >> list-indent))) >> + (org-close-li (car local-list-type)) >> + (insert (format "\n" (car local-list-type))) >> + (setq local-list-indent (cdr local-list-indent)) >> + (setq local-list-type (cdr local-list-type)) >> + (setq in-local-list local-list-indent)) >> + (insert line "\n") >> + (throw 'nextline nil))) >> + >> (let (par (ind (get-text-property 0 'original-indentation line))) >> (when (re-search-backward >> "\\(

\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) >> >> >> Again: If it makes things easier, I could apply the change to the master >> branch and send an appropriate patch. >> >> >> >> >> >> Sebastian >> >> >> >> >> >> >> Sebastian Rose writes: >>> Hello Carsten, >>> >>> >>> there was much discussion about a terminator and I ran into a problem, >>> that made me think we need one. But then I found we had one --- it's >>> just not used on HTML export. >>> >>> >>> Below is a little file I wrote. Thanks to the `- __' items, it results >>> in the XHTML closely to what I wanted it to. >>> But only as long as I use those _undocumented_ `- __' items. Once you >>> remove them, you'll see, that the `#+html: >> inside the last list item and the XHTML will not validate. >>> >>> >>> As I looked at it, I found the most natural solution would be, to >>> terminate the list by regarding the indentation of `#+WHATEVER' and >>> `#+BEGIN_WHATEVER' if inside lists [fn:1]. >>> >>> >>> >>> The patch below (diffed against `remove-compatibility-code') makes >>> XHTML-export honor the indentation of `#+SPECIALS'. >>> >>> >>> >>> Here's the Org-file I wrote (remove and add the `- __' list items to see >>> the effect): >>> >>> >>> #+OPTIONS: toc:nil >>> #+STYLE: >>> >>> * List of design patterns >>> >>> #+HTML:

>>> *Behavioural Patterns* >>> - [[file:BatchCommand][BatchCommand]] >>> - [[file:ChainOfResponsibility.org][Chain Of Responsibility]] >>> - [[file:Command.org][Command]], UndoableCommand and BatchCommand >>> - [[file:Interpreter.org][Interpreter]] >>> - [[file:Iterator.org][Iterator]] >>> - [[file:Mediator.org][Mediator]] >>> - [[file:Memento.org][Memento]] >>> - [[file:NullObject][NullObject]] >>> - [[file:Observer.org][Observer]] >>> - [[file:State.org][State]] >>> - [[file:Strategy.org][Strategy]] >>> - [[file:TemplateMethod.org][Template Method]] >>> - [[file:Visitor.org][Visitor]] >>> *Creational Patterns* >>> - [[file:AbstractFactory.org][Abstract Factory]] >>> - [[file:Builder.org][Builder]] >>> - [[file:Factory.org][Factory]] >>> - [[file:FactoryMethod.org][Factory Method]] >>> - [[file:Prototype.org][Prototype]] >>> - [[file:Singleton.org][Singleton]] >>> - __ >>> #+html:
>>> #+html:
>>> *Structural Patterns* >>> - [[file:Adapter.org][Adapter]] >>> - [[file:Composite.org][Composite]] >>> - [[file::Bridge.org][Bridge]] >>> - [[file:Decorator.org][Decorator]] >>> - [[file:Facade.org][Facade]] >>> - [[file:Flyweight.org][Flyweight]] >>> - [[file:Proxy.org][Proxy]] >>> *Unsorted* >>> - [[file:BusinessDelegate.org][Business Delegate]] >>> - [[file:DataAccessObject.org][Data Access Object]] >>> - [[file:DataTransferObject.org][Data Transfer Object]] >>> - [[file:DependencyInjection.org][Dependency Injection]] >>> - [[file:FluentInterface.org][Fluent Interface]] >>> - [[file:InversionOfControl.org][Inversion Of Control]] >>> - [[file:ModelViewControler.org][Model View Controler]] >>> - [[file:ModelViewPresenter.org][Model View Presenter]] >>> - [[file:Plugin.org][Plugin]] >>> - __ >>> #+HTML:
>>> >>> >>> >>> And, finally, the patch. I would have used the function >>> `org-export-html-close-lists-maybe' but that didn't work, so I wrote >>> similar code just in place. >>> >>> Carsten: If it makes things easier for you, I could apply the change to >>> the master branch and send an appropriate patch. >>> >>> >>> diff --git a/lisp/org-html.el b/lisp/org-html.el >>> index fcddd50..812e63c 100644 >>> --- a/lisp/org-html.el >>> +++ b/lisp/org-html.el >>> @@ -929,6 +929,15 @@ lang=\"%s\" xml:lang=\"%s\"> >>> >>> ;; Protected HTML >>> (when (get-text-property 0 'org-protected line) >>> + (when in-local-list >>> + (let ((ind (or (get-text-property 0 'original- >>> indentation line) 0))) >>> + (while (and (car local-list-indent) (< ind (car local- >>> list-indent))) >>> + (org-close-li (car local-list-type)) >>> + (insert (format "\n" (car local-list-type))) >>> + (setq local-list-indent (cdr local-list-indent)) >>> + (setq local-list-type (cdr local-list-type)) >>> + (setq in-local-list local-list-indent)))) >>> + >>> (let (par (ind (get-text-property 0 'original-indentation line))) >>> (when (re-search-backward >>> "\\(

\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) >>> >>> >>> >>> >>> >>> Best wishes >>> >>> Sebastian >>> >>> >>> >>> >>> Footnotes: >>> >>> [fn:1] `org-end-of-item' and `org-end-of-item-list' already consider the >>> decreased indentation of the `#+html:' line the end of the list. >>> >>> You can proof that by deleting the last dot and all empty lines, >>> so that the `#+html:' line is directly below the last list >>> item. Then move point somewhere on the item and do `M-x >>> org-end-of-item RET'. >>> >>> _______________________________________________ >>> 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 >> _______________________________________________ >> 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [patch] Terminating lists by indentation of #+SPECIALS too Date: Wed, 21 Apr 2010 23:21:38 +0200 Message-ID: References: <877ho4e56t.fsf@gmx.de> <87zl10co57.fsf@gmx.de> <87ljcgiy96.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 1O4hMi-0001p4-EA for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 17:21:48 -0400 Received: from [140.186.70.92] (port=51958 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4hMf-0001oR-AE for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 17:21:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4hMb-0000En-Ny for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 17:21:45 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:60791) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4hMb-0000Ee-Bl for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 17:21:41 -0400 Received: by wwc33 with SMTP id 33so4104565wwc.0 for ; Wed, 21 Apr 2010 14:21:40 -0700 (PDT) In-Reply-To: <87ljcgiy96.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 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? - Carsten On Apr 21, 2010, at 6:08 PM, Sebastian Rose wrote: > Hi Carsten, > > > > Carsten Dominik writes: >> Hi Sebastian, >> >> I am not sure I understand this patch fully. And it looks to me >> that this >> should be taken care of in `org-export-html-close-list-maybe'. >> Could you take >> another look and check if this could be easily moved into there? >> I am confused >> why this is inside the when clause about protectedness of the line. > > > I was aware of the function `org-export-html-close-list-maybe' but I > couldn't get that to work. Now got it to work by adding a new > parameter > to that function, saying, that it's first argument is raw HTML (see > new > patch below). > > > There was another problem about paragraphs. > In this file, "*List ONE*" was wrapped in "

", while "*List > TWO*" > was not: > > * Some Lists > > #+HTML:
> > *List ONE* > - Item one > - Item two > > #+html:
> #+html:
> > *List TWO* > - Item one > - Item two > > #+HTML:
> > The new patch fixes this, too. That is, what the new > `org-open-par-maybe' is for. It's a corner case and I should keep it > for testing. > > > > > I published all my org-notes (more than 100 files) to HTML and they > validate better then before. So the patch might be save to apply. > > > > > > > --- lisp/org-html.el 2010-04-21 17:02:18.000000000 +0200 > +++ lisp/org-html-versuch-mit-rawhtml.el 2010-04-21 > 17:50:10.000000000 +0200 > @@ -929,6 +929,12 @@ > > ;; Protected HTML > (when (get-text-property 0 'org-protected line) > + (when in-local-list > + (org-export-html-close-lists-maybe line t) > + (insert line "\n") > + (throw 'nextline nil)) > + > + > (let (par (ind (get-text-property 0 'original-indentation line))) > (when (re-search-backward > "\\(

\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) > @@ -959,10 +965,12 @@ > (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)) > @@ -986,6 +994,8 @@ > (unless (string-match "\\\\\\\\[ \t]*$" line) > (setq line (concat line "\\\\"))))) > > + (org-open-par-maybe) > + > ;; make targets to anchors > (setq start 0) > (while (string-match > @@ -1982,6 +1992,11 @@ > (org-close-par-maybe) > (insert "\n

") > (setq org-par-open t)) > +(defun org-open-par-maybe () > + "Insert

, but only if no paragraph is open." > + (when (not org-par-open) > + (insert "\n

") > + (setq org-par-open t))) > (defun org-close-par-maybe () > "Close paragraph if there is one open." > (when org-par-open > @@ -1995,15 +2010,20 @@ > (defvar in-local-list) > (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))) > +(defun org-export-html-close-lists-maybe (line &optional rawhtml) > + "RAWHTML suppresses paragraphs and checks the indentation for > +`#+SPECIAL:' lines." > + (let ((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) > (when ind > (while (and in-local-list > (<= ind (car local-list-indent))) > - (setq didclose t) > + (setq didclose (not rawhtml)) > (org-close-li (car local-list-type)) > (insert (format "\n" (car local-list-type))) > (pop local-list-type) (pop local-list-indent) > > > > > > > > > Sebastian > > > > > > >> But I may have just lost my memory of how this works.... >> >> - Carsten >> >> On Apr 19, 2010, at 1:54 AM, Sebastian Rose wrote: >> >>> Haaarrrgh --- >>> >>> >>> the first patch in my previous mail does not work for all cases. >>> Hairy >>> stuff.... >>> >>> >>> Here's what did _not_ work with my previous patch: >>> >>> #+html:

>>> *Unsorted Patterns* >>> - a >>> - b >>> - c >>> #+HTML:
Somthing inside the last item!!! >>> #+HTML:
>>> >>> >>> >>> >>> >>> But this one finally works: >>> >>> >>> diff --git a/lisp/org-html.el b/lisp/org-html.el >>> index fcddd50..0174e43 100644 >>> --- a/lisp/org-html.el >>> +++ b/lisp/org-html.el >>> @@ -929,6 +929,17 @@ lang=\"%s\" xml:lang=\"%s\"> >>> >>> ;; Protected HTML >>> (when (get-text-property 0 'org-protected line) >>> + (when in-local-list >>> + (let ((ind (org-get-indentation line))) >>> + (while (and (car local-list-indent) (< ind (car local- >>> list-indent))) >>> + (org-close-li (car local-list-type)) >>> + (insert (format "\n" (car local-list-type))) >>> + (setq local-list-indent (cdr local-list-indent)) >>> + (setq local-list-type (cdr local-list-type)) >>> + (setq in-local-list local-list-indent)) >>> + (insert line "\n") >>> + (throw 'nextline nil))) >>> + >>> (let (par (ind (get-text-property 0 'original-indentation >>> line))) >>> (when (re-search-backward >>> "\\(

\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) >>> >>> >>> Again: If it makes things easier, I could apply the change to the >>> master >>> branch and send an appropriate patch. >>> >>> >>> >>> >>> >>> Sebastian >>> >>> >>> >>> >>> >>> >>> Sebastian Rose writes: >>>> Hello Carsten, >>>> >>>> >>>> there was much discussion about a terminator and I ran into a >>>> problem, >>>> that made me think we need one. But then I found we had one --- >>>> it's >>>> just not used on HTML export. >>>> >>>> >>>> Below is a little file I wrote. Thanks to the `- __' items, it >>>> results >>>> in the XHTML closely to what I wanted it to. >>>> But only as long as I use those _undocumented_ `- __' items. Once >>>> you >>>> remove them, you'll see, that the `#+html: >>> inside the last list item and the XHTML will not validate. >>>> >>>> >>>> As I looked at it, I found the most natural solution would be, to >>>> terminate the list by regarding the indentation of `#+WHATEVER' and >>>> `#+BEGIN_WHATEVER' if inside lists [fn:1]. >>>> >>>> >>>> >>>> The patch below (diffed against `remove-compatibility-code') makes >>>> XHTML-export honor the indentation of `#+SPECIALS'. >>>> >>>> >>>> >>>> Here's the Org-file I wrote (remove and add the `- __' list items >>>> to see >>>> the effect): >>>> >>>> >>>> #+OPTIONS: toc:nil >>>> #+STYLE: >>>> >>>> * List of design patterns >>>> >>>> #+HTML:

>>>> *Behavioural Patterns* >>>> - [[file:BatchCommand][BatchCommand]] >>>> - [[file:ChainOfResponsibility.org][Chain Of Responsibility]] >>>> - [[file:Command.org][Command]], UndoableCommand and BatchCommand >>>> - [[file:Interpreter.org][Interpreter]] >>>> - [[file:Iterator.org][Iterator]] >>>> - [[file:Mediator.org][Mediator]] >>>> - [[file:Memento.org][Memento]] >>>> - [[file:NullObject][NullObject]] >>>> - [[file:Observer.org][Observer]] >>>> - [[file:State.org][State]] >>>> - [[file:Strategy.org][Strategy]] >>>> - [[file:TemplateMethod.org][Template Method]] >>>> - [[file:Visitor.org][Visitor]] >>>> *Creational Patterns* >>>> - [[file:AbstractFactory.org][Abstract Factory]] >>>> - [[file:Builder.org][Builder]] >>>> - [[file:Factory.org][Factory]] >>>> - [[file:FactoryMethod.org][Factory Method]] >>>> - [[file:Prototype.org][Prototype]] >>>> - [[file:Singleton.org][Singleton]] >>>> - __ >>>> #+html:
>>>> #+html:
>>>> *Structural Patterns* >>>> - [[file:Adapter.org][Adapter]] >>>> - [[file:Composite.org][Composite]] >>>> - [[file::Bridge.org][Bridge]] >>>> - [[file:Decorator.org][Decorator]] >>>> - [[file:Facade.org][Facade]] >>>> - [[file:Flyweight.org][Flyweight]] >>>> - [[file:Proxy.org][Proxy]] >>>> *Unsorted* >>>> - [[file:BusinessDelegate.org][Business Delegate]] >>>> - [[file:DataAccessObject.org][Data Access Object]] >>>> - [[file:DataTransferObject.org][Data Transfer Object]] >>>> - [[file:DependencyInjection.org][Dependency Injection]] >>>> - [[file:FluentInterface.org][Fluent Interface]] >>>> - [[file:InversionOfControl.org][Inversion Of Control]] >>>> - [[file:ModelViewControler.org][Model View Controler]] >>>> - [[file:ModelViewPresenter.org][Model View Presenter]] >>>> - [[file:Plugin.org][Plugin]] >>>> - __ >>>> #+HTML:
>>>> >>>> >>>> >>>> And, finally, the patch. I would have used the function >>>> `org-export-html-close-lists-maybe' but that didn't work, so I >>>> wrote >>>> similar code just in place. >>>> >>>> Carsten: If it makes things easier for you, I could apply the >>>> change to >>>> the master branch and send an appropriate patch. >>>> >>>> >>>> diff --git a/lisp/org-html.el b/lisp/org-html.el >>>> index fcddd50..812e63c 100644 >>>> --- a/lisp/org-html.el >>>> +++ b/lisp/org-html.el >>>> @@ -929,6 +929,15 @@ lang=\"%s\" xml:lang=\"%s\"> >>>> >>>> ;; Protected HTML >>>> (when (get-text-property 0 'org-protected line) >>>> + (when in-local-list >>>> + (let ((ind (or (get-text-property 0 'original- >>>> indentation line) 0))) >>>> + (while (and (car local-list-indent) (< ind (car local- >>>> list-indent))) >>>> + (org-close-li (car local-list-type)) >>>> + (insert (format "\n" (car local-list-type))) >>>> + (setq local-list-indent (cdr local-list-indent)) >>>> + (setq local-list-type (cdr local-list-type)) >>>> + (setq in-local-list local-list-indent)))) >>>> + >>>> (let (par (ind (get-text-property 0 'original-indentation >>>> line))) >>>> (when (re-search-backward >>>> "\\(

\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) >>>> >>>> >>>> >>>> >>>> >>>> Best wishes >>>> >>>> Sebastian >>>> >>>> >>>> >>>> >>>> Footnotes: >>>> >>>> [fn:1] `org-end-of-item' and `org-end-of-item-list' already >>>> consider the >>>> decreased indentation of the `#+html:' line the end of the >>>> list. >>>> >>>> You can proof that by deleting the last dot and all empty >>>> lines, >>>> so that the `#+html:' line is directly below the last list >>>> item. Then move point somewhere on the item and do `M-x >>>> org-end-of-item RET'. >>>> >>>> _______________________________________________ >>>> 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 >>> _______________________________________________ >>> 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: [patch] Terminating lists by indentation of #+SPECIALS too Date: Thu, 22 Apr 2010 03:26:12 +0200 Message-ID: <871ve846rv.fsf@gmx.de> References: <877ho4e56t.fsf@gmx.de> <87zl10co57.fsf@gmx.de> <87ljcgiy96.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4lBS-0008N1-6E for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 21:26:26 -0400 Received: from [140.186.70.92] (port=36745 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4lBQ-0008MX-JW for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 21:26:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4lBO-0005aG-HS for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 21:26:24 -0400 Received: from mail.gmx.net ([213.165.64.20]:49444) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O4lBO-0005Zy-23 for emacs-orgmode@gnu.org; Wed, 21 Apr 2010 21:26:22 -0400 In-Reply-To: (Carsten Dominik's message of "Wed, 21 Apr 2010 23:21:38 +0200") 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: Carsten Dominik Cc: Emacs-orgmode mailing list --=-=-= 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: --=-=-= Content-Type: text/x-diff Content-Disposition: inline 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 --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --=-=-=-- 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 10:22:50 +0200 Message-ID: <398E37C4-42A0-4928-83BA-8F4258FE5503@gmail.com> References: <877ho4e56t.fsf@gmx.de> <87zl10co57.fsf@gmx.de> <87ljcgiy96.fsf@gmx.de> <871ve846rv.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 1O4rgZ-0003en-Qf for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 04:22:59 -0400 Received: from [140.186.70.92] (port=38742 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4rgY-0003eX-Bb for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 04:22:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4rgW-0001rc-4O for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 04:22:58 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:51819) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4rgT-0001rA-Gu for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 04:22:55 -0400 Received: by wyg36 with SMTP id 36so1347190wyg.0 for ; Thu, 22 Apr 2010 01:22:52 -0700 (PDT) In-Reply-To: <871ve846rv.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 Hi Sebastian, thanks or your patience - I have now aplied this patch. You are saying that your files "mostly validate". Are there issues we should address? 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: [patch] Terminating lists by indentation of #+SPECIALS too Date: Thu, 22 Apr 2010 11:09:31 +0200 Message-ID: <87ochb26r8.fsf@gmx.de> References: <877ho4e56t.fsf@gmx.de> <87zl10co57.fsf@gmx.de> <87ljcgiy96.fsf@gmx.de> <871ve846rv.fsf@gmx.de> <398E37C4-42A0-4928-83BA-8F4258FE5503@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4sPp-00031p-T8 for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 05:09:45 -0400 Received: from [140.186.70.92] (port=47873 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4sPo-00031b-5X for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 05:09:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4sPk-0000KH-1N for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 05:09:44 -0400 Received: from mail.gmx.net ([213.165.64.20]:40990) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O4sPj-0000Jn-LS for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 05:09:39 -0400 In-Reply-To: <398E37C4-42A0-4928-83BA-8F4258FE5503@gmail.com> (Carsten Dominik's message of "Thu, 22 Apr 2010 10:22:50 +0200") 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: Carsten Dominik Cc: Emacs-orgmode mailing list --=-=-= 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. 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 --=-=-= Content-Type: text/x-verbatim Content-Disposition: inline

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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --=-=-=-- 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