emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] STill errorneous Treestyle sitemap


From: Carsten Dominik
Subject: Re: [Orgmode] STill errorneous Treestyle sitemap
Date: Sun, 2 Nov 2008 08:08:09 +0100

Hi Sebastian,

Fix A seems good to me, I have added it, many thanks.

- Carsten

On Oct 31, 2008, at 9:22 PM, Sebastian Rose wrote:

Hi,


mea culpa: The treestyle sitemap is still wrong.

This tree

pub
|
+--A
|  |
|  +-- B
|  |   |
|  |   +-- file1
|  |
|  +-- C
|      |
|      +-- file2


_looks_ great in the sitemap, but _is_ wrong. The link to
C looks like this:

<a href="C">C</a>

instead of

<a href="A/C">C</a>



Two different ways to fix this:


A) Don't link to directories anymore.

  I think this is quite a good solution, since in production
  evironments those links will not work, if no index.html exists
  in the directory. If it exists, it will be in the index file
  anyway.

diff --git a/lisp/org-publish.el b/lisp/org-publish.el
index e0cf4bd..d2b4c1f 100644
--- a/lisp/org-publish.el
+++ b/lisp/org-publish.el
@@ -656,9 +656,8 @@ Default for INDEX-FILENAME is 'index.org'."
                      (pop subdirs))
                    (dolist (d subdirs)
                      (setq subdir (concat subdir d "/"))
-                     (insert (concat indent-str " + [[file:"
-                                     subdir "][" d "/]]\n"))
-                     (setq indent-str (make-string
+                     (insert (concat indent-str " + " d "\n"))
+                     (setq indent-str (make-string
                                        (+ (length indent-str) 2) ?\ )))))))
            ;; This is common to 'flat and 'tree
            (insert (concat indent-str " + [[file:" link "]["




B) Fix it, so that the link is correct (no patch yet :-( ).




What do you think?



 Sebastian




_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode





reply via email to

[Prev in Thread] Current Thread [Next in Thread]