summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-11-02 09:14:50 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-12-19 12:19:59 +0100
commit6663452588591ad1f0a45424b8436388b94731c8 (patch)
tree422f06c21903d62db4f5763ba385c2096307a389
parentbaf2e0e5ee7aa5ada272e2e4ab6c5ff75c160f9e (diff)
downloadorg-mode-6663452588591ad1f0a45424b8436388b94731c8.tar.gz
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'.
-rw-r--r--doc/org.texi5
-rw-r--r--etc/ORG-NEWS18
-rw-r--r--lisp/ox-publish.el9
3 files changed, 18 insertions, 14 deletions
diff --git a/doc/org.texi b/doc/org.texi
index fbd53b6..69fff8c 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 0bf0571..0b87be8 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 bfc663e..240e3a7 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