From: Bastien Guerry <bzg@altern.org>
To: emacs-orgmode@gnu.org
Subject: [Accepted] Better sitemap formating
Date: Fri, 11 Feb 2011 17:37:00 +0100 (CET) [thread overview]
Message-ID: <20110211163700.A4E427F77@myhost.localdomain> (raw)
In-Reply-To: 87lj1m7hts.fsf@univ-nantes.fr
Patch 594 (http://patchwork.newartisans.com/patch/594/) is now "Accepted".
Maintainer comment: none
This relates to the following submission:
http://mid.gmane.org/%3C87lj1m7hts.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: [Orgmode] Better sitemap formating
> Date: Fri, 11 Feb 2011 19:43:11 -0000
> From: Manuel Giraud <manuel.giraud@univ-nantes.fr>
> X-Patchwork-Id: 594
> Message-Id: <87lj1m7hts.fsf@univ-nantes.fr>
> To: emacs-orgmode <emacs-orgmode@gnu.org>
>
> Hi,
>
> Here's a patch that make the sitemap entry formating coherent with the
> new html-pre/postamble one.
>
> While here I was trying to add some documentation about this feature in
> org.texi but I end up copy/pasting or paraphrasing the docstring of
> correspondant customs. Is it acceptable for the documentation or plain
> useless?
>
>
> >From 766b0db7d0189d2edb0d8799c3424d62f9ac4e47 Mon Sep 17 00:00:00 2001
> From: Manuel Giraud <manuel.giraud@univ-nantes.fr>
> Date: Fri, 11 Feb 2011 15:32:58 +0100
> Subject: [PATCH] org-publish.el: sitemap formating coherent with new preamble
>
> Adopt downcase for format directive to be coherent with the new
> pre/postamble formating.
>
> Use `format-spec' function instead of `org-replace-escapes'.
> ---
> lisp/org-publish.el | 21 ++++++++++-----------
> 1 files changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/lisp/org-publish.el b/lisp/org-publish.el
> index a7aaee2..3a29d06 100644
> --- a/lisp/org-publish.el
> +++ b/lisp/org-publish.el
> @@ -55,6 +55,7 @@
> (require 'cl))
> (require 'org)
> (require 'org-exp)
> +(require 'format-spec)
>
> (eval-and-compile
> (unless (fboundp 'declare-function)
> @@ -271,13 +272,13 @@ in the sitemap."
> :group 'org-publish
> :type 'string)
>
> -(defcustom org-publish-sitemap-file-entry-format "%T"
> +(defcustom org-publish-sitemap-file-entry-format "%t"
> "How a sitemap file entry is formated.
> You could use brackets to delimit on what part the link will be.
>
> -%T is the title.
> -%A is the author.
> -%D is the date formated using `org-publish-sitemap-date-format'."
> +%t is the title.
> +%a is the author.
> +%d is the date formated using `org-publish-sitemap-date-format'."
> :group 'org-publish
> :type 'string)
>
> @@ -816,13 +817,11 @@ Default for SITEMAP-FILENAME is 'sitemap.org'."
> (or visiting (kill-buffer sitemap-buffer))))
>
> (defun org-publish-format-file-entry (fmt file project-plist)
> - (org-replace-escapes fmt
> - (list (cons "%T" (org-publish-find-title file))
> - (cons "%D" (format-time-string
> - sitemap-date-format
> - (org-publish-find-date file)))
> - (cons "%A" (or (plist-get project-plist :author)
> - user-full-name)))))
> + (format-spec fmt
> + `((?t . ,(org-publish-find-title file))
> + (?d . ,(format-time-string sitemap-date-format
> + (org-publish-find-date file)))
> + (?a . ,(or (plist-get project-plist :author) user-full-name)))))
>
> (defun org-publish-find-title (file)
> "Find the title of FILE in project."
> --
> 1.7.1
>
>
next prev parent reply other threads:[~2011-02-11 16:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 14:43 Better sitemap formating Manuel Giraud
2011-02-11 16:37 ` Bastien Guerry [this message]
2011-02-11 16:38 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110211163700.A4E427F77@myhost.localdomain \
--to=bzg@altern.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).