emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [Accepted] Sitemap sans extension


From: Carsten Dominik
Subject: [O] [Accepted] Sitemap sans extension
Date: Mon, 2 May 2011 09:26:28 +0200 (CEST)

Patch 769 (http://patchwork.newartisans.com/patch/769/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C8762pxxl31.fsf%40univ-nantes.fr%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Sitemap sans extension
> Date: Fri, 29 Apr 2011 18:07:14 -0000
> From: Manuel Giraud <address@hidden>
> X-Patchwork-Id: 769
> Message-Id: <address@hidden>
> To: emacs-orgmode <address@hidden>
> 
> Hi,
> 
> The following patch adds an option to remove extensions of files linked
> from the auto generated sitemap. This is useful if you want to follow
> this: http://www.w3.org/Provider/Style/URI
> 
> 
> >From 32ca3e459e759fbf6312c0154b1f1ba5b2cb7b13 Mon Sep 17 00:00:00 2001
> From: Manuel Giraud <address@hidden>
> Date: Fri, 29 Apr 2011 14:57:48 +0200
> Subject: [PATCH 3/3] org-publish.el (org-publish-org-sitemap): add a sitemap 
> option to
>  remove extension from filename's link
> 
> ---
>  lisp/org-publish.el |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/lisp/org-publish.el b/lisp/org-publish.el
> index 7470ee2..56cc80a 100644
> --- a/lisp/org-publish.el
> +++ b/lisp/org-publish.el
> @@ -178,6 +178,11 @@ sitemap of files or summary page for a given project.
>                           `tree' (the directory structure of the source
>                           files is reflected in the sitemap).  Defaults to
>                           `tree'.
> +  :sitemap-sans-extension Remove extension from sitemap's
> +                           filenames.  Useful to have cool
> +                           URIs (see
> +                           http://www.w3.org/Provider/Style/URI).
> +                           Defaults to nil.
>  
>    If you create a sitemap file, adjust the sorting like this:
>  
> @@ -758,6 +763,7 @@ Default for SITEMAP-FILENAME is 'sitemap.org'."
>                         (concat "Sitemap for project " (car project))))
>        (sitemap-style (or (plist-get project-plist :sitemap-style)
>                         'tree))
> +      (sitemap-sans-extension (plist-get project-plist 
> :sitemap-sans-extension))
>        (visiting (find-buffer-visiting sitemap-filename))
>        (ifn (file-name-nondirectory sitemap-filename))
>        file sitemap-buffer)
> @@ -769,6 +775,8 @@ Default for SITEMAP-FILENAME is 'sitemap.org'."
>       (let ((fn (file-name-nondirectory file))
>             (link (file-relative-name file dir))
>             (oldlocal localdir))
> +       (when sitemap-sans-extension
> +         (setq link (file-name-sans-extension link)))
>         ;; sitemap shouldn't list itself
>         (unless (equal (file-truename sitemap-filename)
>                        (file-truename file))
> -- 
> 1.7.3.5
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]