From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: Publishing with auto-sitemap is broken [7.7 (release_7.7.497.gae02e)] Date: Mon, 31 Oct 2011 20:23:37 +0100 Message-ID: <87r51tc6di.fsf@gmail.com> References: <87sjmbmzt1.fsf@norang.ca> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKxTh-0008Jk-TH for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 15:25:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKxTg-0005hY-JB for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 15:25:01 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:62927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKxTg-0005hU-Ea for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 15:25:00 -0400 Received: by wwe3 with SMTP id 3so1890325wwe.30 for ; Mon, 31 Oct 2011 12:24:59 -0700 (PDT) In-Reply-To: <87sjmbmzt1.fsf@norang.ca> (Bernt Hansen's message of "Sat, 29 Oct 2011 14:13:14 -0400") 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: Bernt Hansen Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hello, Bernt Hansen writes: > Publishing with an automatically generated index file is broken for me. > > With org-publish-projects set with > > :auto-sitemap t > :sitemap-filename "index.html" > :sitemap-title "Test Publishing Area" > :sitemap-style "tree" I think reverting changes on headlines in HTML and DocBook exporters is the best option for now. Does the following patch work? Regards, -- Nicolas Goaziou --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Do-not-rely-on-variables-defined-in-Org-buffers-only.patch >From 0a6d23ac0f865829701f21a1d460cdf0647473c7 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 31 Oct 2011 20:21:06 +0100 Subject: [PATCH] Do not rely on variables defined in Org buffers only for export * lisp/org-html.el (org-export-as-html): Revert changes effectued on patch dfcb6faef11a2439b56b18a6289803361d402130. `org-heading-keyword-regexp-format' may not be defined during all the export stages. * lisp/org-docbook.el (org-export-as-docbook): Ditto. --- lisp/org-docbook.el | 5 ++--- lisp/org-html.el | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el index 6b10354..5cb9722 100644 --- a/lisp/org-docbook.el +++ b/lisp/org-docbook.el @@ -502,9 +502,8 @@ publishing directory." ;; We will use HTML table formatter to export tables to DocBook ;; format, so need to set html-table-tag here. (html-table-tag (plist-get opt-plist :html-table-tag)) - (quote-re0 (concat "^ *" org-quote-string "\\( +\\|[ \t]*$\\)")) - (quote-re (format org-heading-keyword-regexp-format - org-quote-string)) + (quote-re0 (concat "^[ \t]*" org-quote-string "\\>")) + (quote-re (concat "^\\(\\*+\\)\\([ \t]+" org-quote-string "\\>\\)")) (inquote nil) (infixed nil) (inverse nil) diff --git a/lisp/org-html.el b/lisp/org-html.el index fa3811f..8908198 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1179,9 +1179,8 @@ PUB-DIR is set, use this as the publishing directory." (plist-get opt-plist :link-home))) (dummy (setq opt-plist (plist-put opt-plist :title title))) (html-table-tag (plist-get opt-plist :html-table-tag)) - (quote-re0 (concat "^ *" org-quote-string "\\( +\\|[ \t]*$\\)")) - (quote-re (format org-heading-keyword-regexp-format - org-quote-string)) + (quote-re0 (concat "^[ \t]*" org-quote-string "\\>")) + (quote-re (concat "^\\(\\*+\\)\\([ \t]+" org-quote-string "\\>\\)")) (inquote nil) (infixed nil) (inverse nil) -- 1.7.7.1 --=-=-=--