From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id o5JIFlYclF8tAQAA0tVLHw (envelope-from ) for ; Sat, 24 Oct 2020 12:21:42 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MJijEVYclF9KewAAbx9fmQ (envelope-from ) for ; Sat, 24 Oct 2020 12:21:42 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E566B940393 for ; Sat, 24 Oct 2020 12:21:41 +0000 (UTC) Received: from localhost ([::1]:60220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWIYG-0005Pe-LM for larch@yhetil.org; Sat, 24 Oct 2020 08:21:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWIXv-0005PW-IO for emacs-orgmode@gnu.org; Sat, 24 Oct 2020 08:21:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46078) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWIXv-0007SQ-7H; Sat, 24 Oct 2020 08:21:19 -0400 Received: from lns-bzn-32-82-254-31-120.adsl.proxad.net ([82.254.31.120]:36876 helo=guerry) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1kWIXu-0004h1-Rj; Sat, 24 Oct 2020 08:21:19 -0400 Received: by guerry (Postfix, from userid 1000) id EE25B1A60E5A; Sat, 24 Oct 2020 14:21:16 +0200 (CEST) From: Bastien To: Anthony Carrico Subject: Re: [PATCH] Include missing files when sitemap style is tree Organization: GNU References: <393d0ddf-894a-6183-c1fd-d8ab23a2163a@memebeam.org> Date: Sat, 24 Oct 2020 14:21:16 +0200 In-Reply-To: <393d0ddf-894a-6183-c1fd-d8ab23a2163a@memebeam.org> (Anthony Carrico's message of "Fri, 11 Sep 2020 23:26:33 -0400") Message-ID: <87blgrke6b.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.51 X-TUID: fsxSftM1KJZ0 Hi Anthony, Anthony Carrico 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