From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Petton Subject: [PATCH] org-rss-headline Date: Tue, 13 Jan 2015 19:09:41 +0100 Message-ID: <87ppaisgbe.fsf@petton.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YB5uX-0002oN-HR for emacs-orgmode@gnu.org; Tue, 13 Jan 2015 13:09:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YB5uT-0003FN-7t for emacs-orgmode@gnu.org; Tue, 13 Jan 2015 13:09:49 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:53865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YB5uS-0003F2-Vz for emacs-orgmode@gnu.org; Tue, 13 Jan 2015 13:09:45 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 58A122D13 for ; Tue, 13 Jan 2015 13:09:43 -0500 (EST) Received: from blueberry (unknown [213.89.134.104]) by mail.messagingengine.com (Postfix) with ESMTPA id 9CAA2C0001A for ; Tue, 13 Jan 2015 13:09:42 -0500 (EST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode Org-Mode --=-=-= Content-Type: text/plain Hi guys, I'm a happy user of ox-rss.el, but was annoyed the other day when I wanted to export an article with a headline containing markup. The problem is that org-rss-headlines uses the raw-value of the headline to export the title, which could contain any markup. Here's a patch that uses the :EXPORT_TITLE property if present, :raw-value if not. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=org-rss-headline.diff diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el index fddaa1d..5617d26 100644 --- a/contrib/lisp/ox-rss.el +++ b/contrib/lisp/ox-rss.el @@ -244,11 +244,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 :EXPORT_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 --=-=-= Content-Type: text/plain Please tell me what you think. Cheers Nico -- Nicolas Petton http://nicolas-petton.fr --=-=-=--