Re: [O] [PATCH] org-rss-headline

2015-01-21 Thread Nicolas Goaziou
Nicolas Petton nico...@petton.fr writes:

 Ahh, sorry about that. I'm not used to contributing through
 emails. Would cloning the repository and create branches that can be
 merged into the main repository be more convenient?

Cloning the repository would help. You can create branches for large
patches and use format-patch for simple ones.

Regards,



Re: [O] [PATCH] org-rss-headline

2015-01-20 Thread Nicolas Petton
Hi guys,

Any update on this?

Cheers,
Nico


Nicolas Petton nico...@petton.fr writes:

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


 Cheers,
 Nico

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




Re: [O] [PATCH] org-rss-headline

2015-01-20 Thread Nicolas Petton

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Nicolas Petton nico...@petton.fr writes:

 Hi guys,

 Any update on this?

 Applied, thank you.

 I forgot to mention it, but next time, please provide patch with git
 format-patch and a proper commit message.

Ahh, sorry about that. I'm not used to contributing through
emails. Would cloning the repository and create branches that can be
merged into the main repository be more convenient?

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




Re: [O] [PATCH] org-rss-headline

2015-01-20 Thread Nicolas Goaziou
Nicolas Petton nico...@petton.fr writes:

 Hi guys,

 Any update on this?

Applied, thank you.

I forgot to mention it, but next time, please provide patch with git
format-patch and a proper commit message.


Regards,



Re: [O] [PATCH] org-rss-headline

2015-01-18 Thread Nicolas Petton
Indeed, sorry about that.
Here's a new patch with a short description of the RSS_TITLE property.

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

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


Re: [O] [PATCH] org-rss-headline

2015-01-16 Thread Nicolas Goaziou
Nicolas Petton nico...@petton.fr writes:

 Here's a new version that uses :RSS_TITLE. Do you think it's good enough
 for a first patch?

Thanks. It would be nice to document the feature somewhere in the
library.

 +(title (or (org-element-property :EXPORT_TITLE headline)

I think you sent the wrong patch.


Regards,



Re: [O] [PATCH] org-rss-headline

2015-01-14 Thread Nicolas Petton
Hi,

Here's a new version that uses :RSS_TITLE. Do you think it's good enough
for a first patch? I'll work on the export back-end, but that'll take
some more time.

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

Cheers,
Nico


Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Nicolas Petton nico...@petton.fr writes:

 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.

 What problem did you encounter? 

 The problem is that org-rss-headlines uses the raw-value of the headline
 to export the title, which could contain any markup.

 Actually, an export back-end isn't expected to use :raw-value. 

 One way to handle this is to create an anonymous export back-end that
 strips unwanted objects, or export them differently (e.g., a link is
 exported as its description, if any, or its path). See, for example
 `org-html--format-toc-headline'.

 Here's a patch that uses the :EXPORT_TITLE property if present,
 :raw-value if not.

 :EXPORT_TITLE is meant to replace #+TITLE: during a subtree export.
 There is ALT_TITLE property, but this is usually used in table of
 contents.


 Regards,

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


Re: [O] [PATCH] org-rss-headline

2015-01-13 Thread Nicolas Goaziou
Hello,

Nicolas Petton nico...@petton.fr writes:

 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.

What problem did you encounter? 

 The problem is that org-rss-headlines uses the raw-value of the headline
 to export the title, which could contain any markup.

Actually, an export back-end isn't expected to use :raw-value. 

One way to handle this is to create an anonymous export back-end that
strips unwanted objects, or export them differently (e.g., a link is
exported as its description, if any, or its path). See, for example
`org-html--format-toc-headline'.

 Here's a patch that uses the :EXPORT_TITLE property if present,
 :raw-value if not.

:EXPORT_TITLE is meant to replace #+TITLE: during a subtree export.
There is ALT_TITLE property, but this is usually used in table of
contents.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] org-rss-headline

2015-01-13 Thread Nicolas Petton

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Nicolas Petton nico...@petton.fr writes:

 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.

 What problem did you encounter?

If the headline contains *bold* text for example, the RSS item title
will have the extras * characters, since it's using the :raw-value.


 The problem is that org-rss-headlines uses the raw-value of the headline
 to export the title, which could contain any markup.

 Actually, an export back-end isn't expected to use :raw-value. 

 One way to handle this is to create an anonymous export back-end that
 strips unwanted objects, or export them differently (e.g., a link is
 exported as its description, if any, or its path). See, for example
 `org-html--format-toc-headline'.

 Here's a patch that uses the :EXPORT_TITLE property if present,
 :raw-value if not.

 :EXPORT_TITLE is meant to replace #+TITLE: during a subtree export.
 There is ALT_TITLE property, but this is usually used in table of
 contents.

Ok. What about an :RSS_TITLE property? Or should I have a look at
`org-html--format-toc-headline' and submit a different patch?

Nico

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




Re: [O] [PATCH] org-rss-headline

2015-01-13 Thread Nicolas Goaziou
Nicolas Petton nico...@petton.fr writes:

 If the headline contains *bold* text for example, the RSS item title
 will have the extras * characters, since it's using the :raw-value.

OK. But what is expected instead? HTML markup? Nothing at all?

 Ok. What about an :RSS_TITLE property? Or should I have a look at
 `org-html--format-toc-headline' and submit a different patch?

I think we can have both: an anonymous export back-end that strips
markup from headline, and a property (RSS_TITLE is fine) to override the
headline.

WDYT?

Regards,



Re: [O] [PATCH] org-rss-headline

2015-01-13 Thread Nicolas Petton

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Nicolas Petton nico...@petton.fr writes:

 If the headline contains *bold* text for example, the RSS item title
 will have the extras * characters, since it's using the :raw-value.

 OK. But what is expected instead? HTML markup? Nothing at all?

I'd say the content of headline without any markup.


 Ok. What about an :RSS_TITLE property? Or should I have a look at
 `org-html--format-toc-headline' and submit a different patch?

 I think we can have both: an anonymous export back-end that strips
 markup from headline, and a property (RSS_TITLE is fine) to override the
 headline.

 WDYT?

LGTM.

I'll provide another patch shortly


 Regards,

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