emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Sitemap sans extension
@ 2011-04-29 13:07 Manuel Giraud
  2011-05-02  7:26 ` [Accepted] " Carsten Dominik
  2011-05-02  7:27 ` [PATCH] " Carsten Dominik
  0 siblings, 2 replies; 5+ messages in thread
From: Manuel Giraud @ 2011-04-29 13:07 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 192 bytes --]


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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-org-publish.el-org-publish-org-sitemap-add-a-sitemap.patch --]
[-- Type: text/x-patch, Size: 1912 bytes --]

From 32ca3e459e759fbf6312c0154b1f1ba5b2cb7b13 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel.giraud@univ-nantes.fr>
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


[-- Attachment #3: Type: text/plain, Size: 19 bytes --]


-- 
Manuel Giraud

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Accepted]  Sitemap sans extension
  2011-04-29 13:07 [PATCH] Sitemap sans extension Manuel Giraud
@ 2011-05-02  7:26 ` Carsten Dominik
  2011-05-02  7:27 ` [PATCH] " Carsten Dominik
  1 sibling, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2011-05-02  7:26 UTC (permalink / raw)
  To: emacs-orgmode

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 <manuel.giraud@univ-nantes.fr>
> X-Patchwork-Id: 769
> Message-Id: <8762pxxl31.fsf@univ-nantes.fr>
> To: emacs-orgmode <emacs-orgmode@gnu.org>
> 
> 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 <manuel.giraud@univ-nantes.fr>
> 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
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Sitemap sans extension
  2011-04-29 13:07 [PATCH] Sitemap sans extension Manuel Giraud
  2011-05-02  7:26 ` [Accepted] " Carsten Dominik
@ 2011-05-02  7:27 ` Carsten Dominik
  2011-05-10 15:09   ` Manuel Giraud
  1 sibling, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2011-05-02  7:27 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: emacs-orgmode

Hi Manuel,

this has been applied, but please provide a separate patch for the manual to document the new property.

- Carsten

On Apr 29, 2011, at 3:07 PM, Manuel Giraud wrote:

> 
> 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
> 
> <0003-org-publish.el-org-publish-org-sitemap-add-a-sitemap.patch>
> -- 
> Manuel Giraud

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Sitemap sans extension
  2011-05-02  7:27 ` [PATCH] " Carsten Dominik
@ 2011-05-10 15:09   ` Manuel Giraud
  2011-05-11  8:19     ` [Accepted] " Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Manuel Giraud @ 2011-05-10 15:09 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

Carsten Dominik <carsten.dominik@gmail.com> writes:

> Hi Manuel,
>
> this has been applied, but please provide a separate patch for the
> manual to document the new property.

Thanks Carsten, here it is.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-org.texi-Sitemap-documentation-for-sitemap-sans-exte.patch --]
[-- Type: text/x-patch, Size: 986 bytes --]

From 50d10f54241bbdd554b99534af9b66ea67b557eb Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel.giraud@univ-nantes.fr>
Date: Tue, 10 May 2011 17:06:16 +0200
Subject: [PATCH 2/2] * org.texi (Sitemap): documentation for :sitemap-sans-extension

---
 doc/org.texi |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 0625f4c..535672d 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -11155,6 +11155,11 @@ for the title of the file, @code{%a} stands for the author of the file and
 a sitemap entry's date is to be formated. This property bypasses
 @code{org-publish-sitemap-date-format} which defaults to @code{%Y-%m-%d}.
 
+@item @code{:sitemap-sans-extension}
+@tab When non-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,  , Sitemap, Configuration
-- 
1.7.3.5


[-- Attachment #3: Type: text/plain, Size: 19 bytes --]


-- 
Manuel Giraud

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Accepted]  Sitemap sans extension
  2011-05-10 15:09   ` Manuel Giraud
@ 2011-05-11  8:19     ` Carsten Dominik
  0 siblings, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2011-05-11  8:19 UTC (permalink / raw)
  To: emacs-orgmode

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

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C87oc3amw1w.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: Tue, 10 May 2011 20:09:47 -0000
> From: Manuel Giraud <manuel.giraud@univ-nantes.fr>
> X-Patchwork-Id: 799
> Message-Id: <87oc3amw1w.fsf@univ-nantes.fr>
> To: Carsten Dominik <carsten.dominik@gmail.com>
> Cc: emacs-orgmode <emacs-orgmode@gnu.org>
> 
> Carsten Dominik <carsten.dominik@gmail.com> writes:
> 
> > Hi Manuel,
> >
> > this has been applied, but please provide a separate patch for the
> > manual to document the new property.
> 
> Thanks Carsten, here it is.
> 
> 
> >From 50d10f54241bbdd554b99534af9b66ea67b557eb Mon Sep 17 00:00:00 2001
> From: Manuel Giraud <manuel.giraud@univ-nantes.fr>
> Date: Tue, 10 May 2011 17:06:16 +0200
> Subject: [PATCH 2/2] * org.texi (Sitemap): documentation for :sitemap-sans-extension
> 
> ---
>  doc/org.texi |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/doc/org.texi b/doc/org.texi
> index 0625f4c..535672d 100644
> --- a/doc/org.texi
> +++ b/doc/org.texi
> @@ -11155,6 +11155,11 @@ for the title of the file, @code{%a} stands for the author of the file and
>  a sitemap entry's date is to be formated. This property bypasses
>  @code{org-publish-sitemap-date-format} which defaults to @code{%Y-%m-%d}.
>  
> +@item @code{:sitemap-sans-extension}
> +@tab When non-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,  , Sitemap, Configuration
> -- 
> 1.7.3.5
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-05-11  8:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-29 13:07 [PATCH] Sitemap sans extension Manuel Giraud
2011-05-02  7:26 ` [Accepted] " Carsten Dominik
2011-05-02  7:27 ` [PATCH] " Carsten Dominik
2011-05-10 15:09   ` Manuel Giraud
2011-05-11  8:19     ` [Accepted] " Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).