* Patch: correction for tree-style sitemap (org-publish)
@ 2008-10-26 0:13 Sebastian Rose
2008-10-26 6:05 ` Carsten Dominik
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Rose @ 2008-10-26 0:13 UTC (permalink / raw)
To: [emacs-orgmode]
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 <carsten.dominik@gmail.com>
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:"
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Patch: correction for tree-style sitemap (org-publish)
2008-10-26 0:13 Patch: correction for tree-style sitemap (org-publish) Sebastian Rose
@ 2008-10-26 6:05 ` Carsten Dominik
0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2008-10-26 6:05 UTC (permalink / raw)
To: sebastian_rose; +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 <carsten.dominik@gmail.com>
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-26 6:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-26 0:13 Patch: correction for tree-style sitemap (org-publish) Sebastian Rose
2008-10-26 6:05 ` Carsten Dominik
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.