emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Petton <nicolas@petton.fr>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: Org-mode Org-Mode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] org-rss-headline
Date: Mon, 19 Jan 2015 00:04:50 +0100	[thread overview]
Message-ID: <87lhkzsnal.fsf@petton.fr> (raw)
In-Reply-To: <87k30nt8v7.fsf@nicolasgoaziou.fr>

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

Indeed, sorry about that.
Here's a new patch with a short description of the RSS_TITLE property.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ox-rss.diff --]
[-- Type: text/x-patch, Size: 1220 bytes --]

diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el
index fddaa1d..6681336 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

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


Cheers,
Nico
-- 
Nicolas Petton
http://nicolas-petton.fr

  reply	other threads:[~2015-01-18 23:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 18:09 [PATCH] org-rss-headline Nicolas Petton
2015-01-13 19:23 ` Nicolas Goaziou
2015-01-13 19:42   ` Nicolas Petton
2015-01-13 22:14     ` Nicolas Goaziou
2015-01-13 22:21       ` Nicolas Petton
2015-01-14 22:51   ` Nicolas Petton
2015-01-16  8:42     ` Nicolas Goaziou
2015-01-18 23:04       ` Nicolas Petton [this message]
2015-01-20 14:17         ` Nicolas Petton
2015-01-20 23:36           ` Nicolas Goaziou
2015-01-20 23:46             ` Nicolas Petton
2015-01-21 21:06               ` Nicolas Goaziou

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=87lhkzsnal.fsf@petton.fr \
    --to=nicolas@petton.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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).