emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: "[emacs-orgmode]" <emacs-orgmode@gnu.org>
Subject: STill errorneous Treestyle sitemap
Date: Fri, 31 Oct 2008 21:22:01 +0100	[thread overview]
Message-ID: <490B68E9.5060302@gmx.de> (raw)

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

             reply	other threads:[~2008-10-31 20:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-31 20:22 Sebastian Rose [this message]
2008-11-02  7:08 ` STill errorneous Treestyle sitemap Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=490B68E9.5060302@gmx.de \
    --to=sebastian_rose@gmx.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).