diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 496f4d1..34589db 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -397,10 +397,10 @@ eventually alphabetically." ;; a is directory, b not: (cond ((and (file-directory-p a) (not (file-directory-p b))) - (setq retval (eq sitemap-sort-folders 'first))) + (setq retval (equal sitemap-sort-folders 'first))) ;; a is not a directory, but b is: ((and (not (file-directory-p a)) (file-directory-p b)) - (setq retval (eq sitemap-sort-folders 'last)))))) + (setq retval (equal sitemap-sort-folders 'last)))))) retval)) (defun org-publish-get-base-files-1 (base-dir &optional recurse match skip-file skip-dir) @@ -609,7 +609,7 @@ If :makeindex is set, also produce a file theindex.org." 'org-publish-org-sitemap)) (sitemap-sort-folders (if (plist-member project-plist :sitemap-sort-folders) - (plist-get project-plist :sitemap-sort-folders) + (plist-get project-plist :sitemap-sort-folders) 'first)) (sitemap-alphabetically (if (plist-member project-plist :sitemap-alphabetically) @@ -618,9 +618,9 @@ If :makeindex is set, also produce a file theindex.org." (preparation-function (plist-get project-plist :preparation-function)) (completion-function (plist-get project-plist :completion-function)) (files (org-publish-get-base-files project exclude-regexp)) file) - (when (and (not (stringp sitemap-sort-folders)) - (not (string= sitemap-sort-folders "first")) - (not (string= sitemap-sort-folders "last"))) + (when (and (not (null sitemap-sort-folders)) + (not (equal sitemap-sort-folders 'first)) + (not (equal sitemap-sort-folders 'last))) (setq sitemap-sort-folders nil)) (when preparation-function (run-hooks 'preparation-function)) (if sitemap-p (funcall sitemap-function project sitemap-filename))