浏览代码

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'.
Nicolas Goaziou 8 年之前
父节点
当前提交
6663452588
共有 3 个文件被更改,包括 18 次插入14 次删除
  1. 0 5
      doc/org.texi
  2. 18 0
      etc/ORG-NEWS
  3. 0 9
      lisp/ox-publish.el

+ 0 - 5
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

+ 18 - 0
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

+ 0 - 9
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