To: Subject: [BUG] Unable to ignore sorting for sitemap generation [9.7.27 (9.7.27-??-74dde3aba @ /Users/haisheng.wu/.config/emacs/.local/straight/build-30.1/org/)] From: Haisheng Wu <fre...@gmail.com> --text follows this line--
I have following org project configuration ``` ("roam-notes-orgs" :base-directory "~/hw/emacs/roam-notes/" :base-extension "org" :publishing-directory "~/haisheng-scratch/dist/" :publishing-function hw/org-pandoc-publish-to-md :with-broken-links t :completion-function hw/org-bulk-move-md-files :auto-sitemap t :sitemap-filename "readme.org" :sitemap-title "README" :sitemap-sort-files nil ) ``` I want to disable the sitemap sorting completely. With such configuration, I got following error ``` (wrong-type-argument listp ignore) ``` turns out `memq` expects the 2nd argument to be list instead of a single value. I changed code to ```diff diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index bb9e0bd2e..51cb7433a 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -826,7 +826,7 @@ Default for SITEMAP-FILENAME is `sitemap.org'." (mapcar #'file-name-directory files))) files))) ;; Eventually sort all entries. - (when (or sort-files (not (memq sort-folders 'ignore))) + (when (or sort-files (not (eq sort-folders 'ignore))) (setq files (sort files sort-predicate))) (funcall sitemap-builder title ``` And it worked. ----- The reason I want to disable the sorting is b/c it is very slow on about 100 org files. My Emacs stuck so I didn't have much profile detail. Basically I print out messages before the sorting block (` (when (or sort-`) and after sorting block. I can only see the message before sorting block when emacs is stuck. (no response, cpu goes to 99% ----- Thank you! Emacs : GNU Emacs 30.1 (build 2, aarch64-apple-darwin24.3.0, NS appkit-2575.40 Version 15.3.1 (Build 24D70)) of 2025-02-26 Package: Org mode version 9.7.27 (9.7.27-??-74dde3aba @ /Users/haisheng.wu/.config/emacs/.local/straight/build-30.1/org/)