From 6663452588591ad1f0a45424b8436388b94731c8 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 2 Nov 2016 09:14:50 +0100 Subject: [PATCH] ox-publish: Remove :sitemap-sans-extension * lisp/ox-publish.el (org-publish-sitemap): Remove property. * doc/org.texi (Sitemap): * lisp/ox-publish.el (org-publish-project-alist): Remove documentation. Caches uses absolute file names as keys. We cannot provide file names without extension to `:sitemap-format-entry' as they are no longer existing key, and cannot be used for `org-publish-find-property' or `org-publish-find-title'. --- doc/org.texi | 5 ----- etc/ORG-NEWS | 18 ++++++++++++++++++ lisp/ox-publish.el | 9 --------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index fbd53b640..69fff8c82 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -14572,11 +14572,6 @@ a file is retrieved with @code{org-publish-find-date}. a sitemap entry's date is to be formatted. This property bypasses @code{org-publish-sitemap-date-format} which defaults to @code{%Y-%m-%d}. -@item @code{:sitemap-sans-extension} -@tab When non-@code{nil}, remove filenames' extensions from the generated sitemap. -Useful to have cool URIs (see @uref{http://www.w3.org/Provider/Style/URI}). -Defaults to @code{nil}. - @end multitable @node Generating an index diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 0bf0571a9..0b87be839 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -23,6 +23,24 @@ into : (file (lambda () (sexp))) +*** Removal of ~:sitemap-sans-extension~ + +The publishing property is no longer recognized, as a consequence of +changes to site-map generation. + +You can get the same functionality by setting ~:sitemap-format-entry~ +to the following + +#+BEGIN_SRC elisp +(lambda (entry root style) + (cond ((not (directory-name-p entry)) + (format "[[file:%s][%s]]" + (file-name-sans-extension (file-relative-name entry root)) + (org-publish-find-title entry))) + ((eq style 'tree) (file-name-nondirectory (directory-file-name entry))) + (t (file-relative-name entry root)))) +#+END_SRC + *** Change signature for ~:sitemap-function~ ~:sitemap-function~ now expects to be called with two arguments. See diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index bfc663e07..240e3a71f 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -218,12 +218,6 @@ a site-map of files or summary page for a given project. structure of the source files is reflected in the site-map). Defaults to `tree'. - `:sitemap-sans-extension' - - Remove extension from site-map's file-names. Useful to have - cool URIs (see http://www.w3.org/Provider/Style/URI). - Defaults to nil. - `:sitemap-format-entry' Plugin function used to format entries in the site-map. It @@ -739,9 +733,6 @@ Default for SITEMAP-FILENAME is `sitemap.org'." (insert (let ((files (remove sitemap-filename (org-publish-get-base-files project)))) - ;; Remove extensions, if requested. - (when (plist-get project-plist :sitemap-sans-extension) - (setq files (mapcar #'file-name-sans-extension files))) ;; Add directories, if applicable. (unless (and (eq style 'list) (eq sort-folders 'ignore)) (setq files