From e3010a1a613b9d799b91a2688cba0b6e395b55da Mon Sep 17 00:00:00 2001 From: Nicolas Petton Date: Wed, 21 Jan 2015 00:33:08 +0100 Subject: [PATCH] ox-rss: Handle RSS_TITLE property * contrib/lisp/ox-rss.el (org-rss-headline): Title use :RSS_TITLE instead of headline text, when available. --- contrib/lisp/ox-rss.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el index fddaa1df0..97a23b871 100644 --- a/contrib/lisp/ox-rss.el +++ b/contrib/lisp/ox-rss.el @@ -42,6 +42,9 @@ ;; PUBDATE property. If `org-rss-use-entry-url-as-guid', it will also add ;; an ID property, later used as the guid for the feed's item. ;; +;; The top-level headline is used as the title of each RSS item unless +;; an RSS_TITLE property is set on the headline. +;; ;; You typically want to use it within a publishing project like this: ;; ;; (add-to-list @@ -244,11 +247,12 @@ communication channel." (format-time-string "%a, %d %b %Y %H:%M:%S %z" (org-time-string-to-time pubdate0))))) - (title (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))) + (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