diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-05-13 17:37:49 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-05-13 17:37:49 +0200 |
commit | 1fd6f2815721c1d1270e30941c400cb1cb5f20b2 (patch) | |
tree | 68e68563c4e7d7b67f128fa342e7cf98f6f4deda | |
parent | 1c923b9ae734304b0dc6688ee056864facb7c3b8 (diff) | |
parent | 9b5e8fdb5c40e17f234a3e14d4db7f88ad4a283d (diff) | |
download | org-mode-1fd6f2815721c1d1270e30941c400cb1cb5f20b2.tar.gz |
Merge branch 'maint'
-rw-r--r-- | contrib/lisp/ox-rss.el | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el index 39fce30..0c4a2f2 100644 --- a/contrib/lisp/ox-rss.el +++ b/contrib/lisp/ox-rss.el @@ -228,59 +228,59 @@ Return output file name." "Transcode HEADLINE element into RSS format. CONTENTS is the headline contents. INFO is a plist used as a communication channel." - (unless (or (org-element-property :footnote-section-p headline) - ;; Only consider first-level headlines - (> (org-export-get-relative-level headline info) 1)) - (let* ((author (and (plist-get info :with-author) - (let ((auth (plist-get info :author))) - (and auth (org-export-data auth info))))) - (htmlext (plist-get info :html-extension)) - (hl-number (org-export-get-headline-number headline info)) - (hl-home (file-name-as-directory (plist-get info :html-link-home))) - (hl-pdir (plist-get info :publishing-directory)) - (hl-perm (org-element-property :RSS_PERMALINK headline)) - (anchor (org-export-get-reference headline info)) - (category (org-rss-plain-text - (or (org-element-property :CATEGORY headline) "") info)) - (pubdate0 (org-element-property :PUBDATE headline)) - (pubdate (let ((system-time-locale "C")) - (if pubdate0 - (format-time-string - "%a, %d %b %Y %H:%M:%S %z" - (org-time-string-to-time pubdate0))))) - (title (or (org-element-property :RSS_TITLE headline) - (replace-regexp-in-string - org-bracket-link-regexp - (lambda (m) (or (match-string 3 m) - (match-string 1 m))) - (org-element-property :raw-value headline)))) - (publink - (or (and hl-perm (concat (or hl-home hl-pdir) hl-perm)) - (concat - (or hl-home hl-pdir) - (file-name-nondirectory - (file-name-sans-extension - (plist-get info :input-file))) "." htmlext "#" anchor))) - (guid (if org-rss-use-entry-url-as-guid - publink - (org-rss-plain-text - (or (org-element-property :ID headline) - (org-element-property :CUSTOM_ID headline) - publink) - info)))) - (if (not pubdate0) "" ;; Skip entries with no PUBDATE prop - (format - (concat - "<item>\n" - "<title>%s</title>\n" - "<link>%s</link>\n" - "<author>%s</author>\n" - "<guid isPermaLink=\"false\">%s</guid>\n" - "<pubDate>%s</pubDate>\n" - (org-rss-build-categories headline info) "\n" - "<description><![CDATA[%s]]></description>\n" - "</item>\n") - title publink author guid pubdate contents))))) + (if (> (org-export-get-relative-level headline info) 1) + (org-export-data-with-backend headline 'html info) + (unless (org-element-property :footnote-section-p headline) + (let* ((author (and (plist-get info :with-author) + (let ((auth (plist-get info :author))) + (and auth (org-export-data auth info))))) + (htmlext (plist-get info :html-extension)) + (hl-number (org-export-get-headline-number headline info)) + (hl-home (file-name-as-directory (plist-get info :html-link-home))) + (hl-pdir (plist-get info :publishing-directory)) + (hl-perm (org-element-property :RSS_PERMALINK headline)) + (anchor (org-export-get-reference headline info)) + (category (org-rss-plain-text + (or (org-element-property :CATEGORY headline) "") info)) + (pubdate0 (org-element-property :PUBDATE headline)) + (pubdate (let ((system-time-locale "C")) + (if pubdate0 + (format-time-string + "%a, %d %b %Y %H:%M:%S %z" + (org-time-string-to-time pubdate0))))) + (title (or (org-element-property :RSS_TITLE headline) + (replace-regexp-in-string + org-bracket-link-regexp + (lambda (m) (or (match-string 3 m) + (match-string 1 m))) + (org-element-property :raw-value headline)))) + (publink + (or (and hl-perm (concat (or hl-home hl-pdir) hl-perm)) + (concat + (or hl-home hl-pdir) + (file-name-nondirectory + (file-name-sans-extension + (plist-get info :input-file))) "." htmlext "#" anchor))) + (guid (if org-rss-use-entry-url-as-guid + publink + (org-rss-plain-text + (or (org-element-property :ID headline) + (org-element-property :CUSTOM_ID headline) + publink) + info)))) + (if (not pubdate0) "" ;; Skip entries with no PUBDATE prop + (format + (concat + "<item>\n" + "<title>%s</title>\n" + "<link>%s</link>\n" + "<author>%s</author>\n" + "<guid isPermaLink=\"false\">%s</guid>\n" + "<pubDate>%s</pubDate>\n" + (org-rss-build-categories headline info) "\n" + "<description><![CDATA[%s]]></description>\n" + "</item>\n") + title publink author guid pubdate contents)))))) (defun org-rss-build-categories (headline info) "Build categories for the RSS item." |