Просмотр исходного кода

Fix site-map creation in org-publish.

The creation of an automatic site map in org-publish with the
:auto-index and :index-filename parameter does exclude the index
file name from being added to the index.  There was a bug which would
exclude this file name also in all subdirectories in a project. This
patch switches the comparison from looking at file names only to
looking at the complete path.
Carsten Dominik 16 лет назад
Родитель
Сommit
4e4bdf3646
2 измененных файлов с 7 добавлено и 1 удалено
  1. 5 0
      lisp/ChangeLog
  2. 2 1
      lisp/org-publish.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2008-11-25  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-publish.el (org-publish-org-index): Only exclude the index
+	file in the main directory from being added to the site-map.
+
 2008-11-24  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-table.el (orgtbl-ret): Fix RET at beginning-of-buffer.

+ 2 - 1
lisp/org-publish.el

@@ -631,7 +631,8 @@ Default for INDEX-FILENAME is 'index.org'."
 	      (link (file-relative-name file dir))
 	      (oldlocal localdir))
 	  ;; index shouldn't index itself
-	  (unless (string= fn ifn)
+	  (unless (equal (file-truename index-filename)
+			 (file-truename file))
 	    (if (eq index-style 'list)
 		(message "Generating list-style index for %s" index-title)
 	      (message "Generating tree-style index for %s" index-title)