diff options
author | Nicolas Petton <nicolas@petton.fr> | 2015-01-21 00:33:08 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-01-21 00:33:08 +0100 |
commit | e3010a1a613b9d799b91a2688cba0b6e395b55da (patch) | |
tree | 9b91bd03373cedfd3904b0d4e02c3364b2a0bdb6 | |
parent | ec0706ea40efd4d6048fe031b216586f1e32c27b (diff) | |
download | org-mode-e3010a1a613b9d799b91a2688cba0b6e395b55da.tar.gz |
ox-rss: Handle RSS_TITLE property
* contrib/lisp/ox-rss.el (org-rss-headline): Title use :RSS_TITLE
instead of headline text, when available.
-rw-r--r-- | contrib/lisp/ox-rss.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el index fddaa1d..97a23b8 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 |