diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-04-23 00:06:10 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-04-23 00:06:10 +0200 |
commit | 238a3d28182d57decd9694fe7892fb7ece64a1f2 (patch) | |
tree | 9079b472e627fccd1e37a5d818507f814400efc4 | |
parent | 830e0cfe407b42060c3adc490baa7c3104589435 (diff) | |
download | org-mode-238a3d28182d57decd9694fe7892fb7ece64a1f2.tar.gz |
Another fix for sitemap sorting
-rw-r--r-- | lisp/org-publish.el | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lisp/org-publish.el b/lisp/org-publish.el index b93c92f..ac22603 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -388,18 +388,15 @@ eventually alphabetically." (aorg (and (string-match "\\.org$" a) (not adir))) (bdir (file-directory-p b)) (borg (and (string-match "\\.org$" b) (not bdir))) - (A (if aorg (org-publish-find-title a) a)) - (B (if borg (org-publish-find-title b) b))) - ;; If we have a directory and an Org file, we need to combine - ;; directory and title as filename of the Org file: - (when (and adir borg) - (setq B (concat (file-name-directory b) B))) - (when (and bdir aorg) - (setq A (concat (file-name-directory a) A))) - ;; + (A (if aorg + (concat (file-name-directory a) + (org-publish-find-title a)) a)) + (B (if borg + (concat (file-name-directory b) + (org-publish-find-title b)) b))) (setq retval (if sitemap-ignore-case - (string-lessp (upcase A) (upcase B)) - (string-lessp A B))))) + (not (string-lessp (upcase B) (upcase A))) + (not (string-lessp B A)))))) ;; Directory-wise wins: (when sitemap-sort-folders |