[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Include missing files when sitemap style is tree
From: |
Bastien |
Subject: |
Re: [PATCH] Include missing files when sitemap style is tree |
Date: |
Sat, 24 Oct 2020 14:21:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hi Anthony,
Anthony Carrico <acarrico@memebeam.org> writes:
> * ox-publish.el (org-publish-sitemap): Include files that have an
> ancestor below base-directory with no published files and sitemap style
> is tree.
thanks for the patch and sorry for the delay in replying. I'm not
sure I understand the bug it fixes: can you briefly describe it or
provide a reproducible recipe?
> +(defun org-publish-dir-name-parent (dir-name)
> + (file-name-as-directory (expand-file-name (concat dir-name ".."))))
> +
> +(defun org-publish-dir-name-and-parents (dir-name root-dir-name)
> + (pcase dir-name
> + ("" nil)
> + ((or "./" "/" (pred (string= root-dir-name))) (list dir-name))
> + (_ (cons dir-name (org-publish-dir-name-and-parents
> + (org-publish-dir-name-parent dir-name)
> root-dir-name)))))
> +
> +(defun org-publish-file-name-parents (file root)
> + (org-publish-dir-name-and-parents (file-name-directory file)
> + (file-name-as-directory root)))
> +
You would need to add docstrings for each of the new functions.
Thanks,
--
Bastien
- Re: [PATCH] Include missing files when sitemap style is tree,
Bastien <=