From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: index-title in org-publish Date: Mon, 17 Nov 2008 13:37:16 +0100 Message-ID: <9B70F51E-69BF-4239-9FBB-9A3066290710@uva.nl> References: <873ahqd0lv.fsf@kassiopeya.MSHEIMNETZ> Mime-Version: 1.0 (Apple Message framework v929.2) 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 1L23M4-0005vp-Co for emacs-orgmode@gnu.org; Mon, 17 Nov 2008 07:37:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L23M2-0005vd-PF for emacs-orgmode@gnu.org; Mon, 17 Nov 2008 07:37:23 -0500 Received: from [199.232.76.173] (port=43294 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L23M2-0005va-J2 for emacs-orgmode@gnu.org; Mon, 17 Nov 2008 07:37:22 -0500 Received: from ug-out-1314.google.com ([66.249.92.169]:31217) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L23M2-0003s7-3u for emacs-orgmode@gnu.org; Mon, 17 Nov 2008 07:37:22 -0500 Received: by ug-out-1314.google.com with SMTP id 36so480930uga.17 for ; Mon, 17 Nov 2008 04:37:20 -0800 (PST) In-Reply-To: <873ahqd0lv.fsf@kassiopeya.MSHEIMNETZ> 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@gnu.org Hi Sebastian, I actually fixed the bug with the superfluous . So it should now be no problem to remove the headline stars again. - Carsten On Nov 17, 2008, at 12:59 PM, Sebastian Rose wrote: > Hi Matthew, > > > sorry, I'm off on weekends currently till I have a new machine at > home. My old omnibook broke lately :-( > > > >> Hi Carsten (and Sebastian), >> >> Yes, so sorry. My post wasn't clear. I was wondering if >> org-publish-org-index could be reverted to the old behavior to >> produce >> a file in which the first line contains the index-filename (e.g., >> "Page List") in form "a" below: >> >> Page List <------- (a) - old behavior >> >> rather than >> >> * Page List <------- (b) new behavior >> >> The new behavior (b) causes the filename (e.g., "pagelist") to be >> exported as the title, which results in redundant titles/headings in >> the html. You can see the results new behavior at: >> >> http://faculty.valpo.edu/mlundin/pagelist.html > > > > This is due to the fact, that the structure of the exported index file > now is the same, as for all the other files. We did this partly, to > produce valid XHTML. > > As an aside, the file now looks as all the other files. The solution > is > not perfect, yes. There is the title, eventually a T.O.C. and a first > section (depends on your global setting), wich just repeats the title. > > I will take a look in it - hm, was certainly not the best way to fix > it. It was the easiest way to get rid of thoses XHTML errors. I was > not > aware of the index-title option and I don't use it, sorry for that. > > The first thing that happens on export, is to produce a Org-file with > index-filename. This file is exported just like any other > Org-file. Since the export to XHTML is more complicated, this won't be > as easy as the (dubious) quick-fix I came up with, I fear. > > > The index-title should be correct. > > In org-publish-org-index: > > (index-title (or (plist-get project-plist :index-title) > (concat "Index for project " (car project)))) > > >>>> Thanks! (And sorry to bother you with such a minor issue...) > > Is there another way to advance? > > > > > OK, this patch would revert the change (I believe): > > <<< --->8----------------------------->8----------------------------- > >8--- > diff --git a/lisp/org-publish.el b/lisp/org-publish.el > index 77ccd4f..5a46551 100644 > --- a/lisp/org-publish.el > +++ b/lisp/org-publish.el > @@ -626,7 +626,7 @@ Default for INDEX-FILENAME is 'index.org'." > (if index-buffer > (kill-buffer index-buffer)) > (with-temp-buffer > - (insert (concat "* " index-title "\n\n")) > + (insert (concat "#+TITLE: " index-title "\n\n")) > (while (setq file (pop files)) > (let ((fn (file-name-nondirectory file)) > (link (file-relative-name file dir)) > <<< > ---8<-----------------------------8<-----------------------------8<--- > > > Ahh - now as I read this, there is the index-title again, sorry. > > > > The created Org-file now looks like this (for my test data on github): > > > <<< --->8----------------------------->8----------------------------- > >8--- > #+TITLE: Sitemap > > + Databases > + [[file:Databases/index.org][Databases]] > + [[file:Databases/test-level-1.org][test-level-1]] > + Emacs > + [[file:Emacs/org-mode.org][Org-mode]] > + Test-tree > + Jack London > + [[file:Test-tree/Jack London/The-white-fang.org][The White > Fang]] > + Paul-Auster > + [[file:Test-tree/Paul-Auster/Moon-Palace.org][Moon Palace]] > + [[file:Test-tree/Paul-Auster/test-level-2.org][Test level-2]] > + [[file:Umlaut-test.org][Umlaut-test]] > + [[file:footnotes-test.org][footnotes-test]] > + [[file:index.org][Org export tests - main page]] > + [[file:test-level-0.org][test-level-0]] > + [[file:test-slides.org][Comming soon: Slides with Org-Mode and > JavaScript]] > + [[file:test-standard-export-options.org][Test of standard export > options template]] > + [[file:test-text-before-first-headline.org][test-text-before- > first-headline]] > + xhmtl-tests > + [[file:xhmtl-tests/horizontal-line.org][horizontal-line]] > > <<< > ---8<-----------------------------8<-----------------------------8<--- > > > > But unfortunately, there is a '' near the end of the resulting > XHTML file, which was never opened. This seems to be the bug I should > have have fixed before (there's a patch below): > > > sh$ xmllint --dtdvalid http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd > sitemap.html > sitemap.html:118: parser error : Opening and ending tag mismatch: > body line 42 and div > > ^ > sitemap.html:124: parser error : Opening and ending tag mismatch: > html line 3 and body > > ^ > sitemap.html:125: parser error : Extra content at the end of the > document > > > > > > > The element in question is the one after the
    : > > => --->8----------------------------->8----------------------------- > >8--- > > ..... > > >

    Sitemap

    > >
      >
    • > Databases >
        > > ...... lots of list items .... > >
      > <== HERE
      never opened. > > <= > ---8<-----------------------------8<-----------------------------8<--- > > > > > Carsten, is there an easy way to fix this? I believe it's these > lines in > org-exp.el, since they alway insert an '
      ', no matter if we > have a > section (which would insert the start tag '
      '). This one fixes > it. I > did my xmllint for all files in my test-repo, and it works. > > > > => --->8----------------------------->8----------------------------- > >8--- > sh$ git-diff lisp/org-exp.el > diff --git a/lisp/org-exp.el b/lisp/org-exp.el > index 3b9d1c9..88c2225 100644 > --- a/lisp/org-exp.el > +++ b/lisp/org-exp.el > @@ -3510,7 +3510,7 @@ lang=\"%s\" xml:lang=\"%s\"> > (and org-export-with-toc (<= level umax)) > head-count) > ;; the
      to close the last text-... div. > - (insert "\n") > + (if have-headings (insert "\n")) > > (save-excursion > (goto-char (point-min)) > > <= > ---8<-----------------------------8<-----------------------------8<--- > > > > > Regards, > > Sebastian > > > -- > Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 > Hannover > > Tel.: +49 (0)511 - 36 58 472 > Fax: +49 (0)1805 - 233633 - 11044 > mobil: +49 (0)173 - 83 93 417 > Email: s.rose emma-stil de, sebastian_rose gmx de > Http: www.emma-stil.de