emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-rss-headline
@ 2015-01-13 18:09 Nicolas Petton
  2015-01-13 19:23 ` Nicolas Goaziou
  0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Petton @ 2015-01-13 18:09 UTC (permalink / raw)
  To: Org-mode Org-Mode

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

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.


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

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

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


Please tell me what you think.

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-01-21 21:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).