From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Patch: correction for tree-style sitemap (org-publish) Date: Sun, 26 Oct 2008 07:05:12 +0100 Message-ID: <862634C8-1182-4FFF-85ED-8DE9A67D904C@uva.nl> References: <4903B622.6030206@gmx.de> 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 1KtykY-0005ZD-3e for emacs-orgmode@gnu.org; Sun, 26 Oct 2008 02:05:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KtykX-0005Z1-Lg for emacs-orgmode@gnu.org; Sun, 26 Oct 2008 02:05:17 -0400 Received: from [199.232.76.173] (port=37475 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtykX-0005Yy-GS for emacs-orgmode@gnu.org; Sun, 26 Oct 2008 02:05:17 -0400 Received: from nf-out-0910.google.com ([64.233.182.190]:17071) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KtykX-0005Zx-5T for emacs-orgmode@gnu.org; Sun, 26 Oct 2008 02:05:17 -0400 Received: by nf-out-0910.google.com with SMTP id c7so566157nfi.26 for ; Sat, 25 Oct 2008 23:05:15 -0700 (PDT) In-Reply-To: <4903B622.6030206@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@gmx.de Cc: "[emacs-orgmode]" Applied, thanks. - Carsten On Oct 26, 2008, at 2:13 AM, Sebastian Rose wrote: > Issue > ===== > > Sitemap not correct, when mutlitple subdirectories (my fault I > believe, sorry). Only the tree-style sitemap is affected. > > > How to reproduce > ================ > > Try to export the following structure to HTML (directories > marked by `/'): > > base-directory/ > | > +-- B/ > | | > | +---C/ > | | | > | | +--- c.org > | | > | +---D/ > | | > | +--- d.org > | > +-- E/ > > The resulting sitemap: > > > - B > - C > - c.org > - B <= B again! > -D > - d.org > - E > > Should be: > > - B > -C > - c.org > -D > - d.org > - E > > > > How to fix > ========== > > > The following patch fixes it. The patch is against > commit 523cf1fe31dc5fc0e73a973b3e1a3bde74e0263d > Author: Carsten Dominik > Date: Sat Oct 25 12:56:42 2008 +0200 > > Release 6.10c. > > > > diff --git a/lisp/org-publish.el b/lisp/org-publish.el > index 2af71d3..3859442 100644 > --- a/lisp/org-publish.el > +++ b/lisp/org-publish.el > @@ -645,8 +645,12 @@ Default for INDEX-FILENAME is 'index.org'." > (directory-file-name > (file-name-directory > (file-relative-name localdir dir))) "/")) > - (subdir "")) > + (subdir "") > + (old-subdirs (split-string (file-relative-name oldlocal > dir) "/"))) > (setq indent-str (make-string 2 ?\ )) > + (while (string= (car old-subdirs) (car subdirs)) > + (setq indent-str (concat indent-str (make-string 2 ? > \ ))) > + (pop old-subdirs)(pop subdirs)) > (dolist (d subdirs) > (setq subdir (concat subdir d "/")) > (insert (concat indent-str " + [[file:" > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode