Dr. Arne Babenhauserheide writes: > When creating an RSS feed, org-publish broke for me with > > signal(error ("Not an Org time string: ")) > error("Not an Org time string: %s" "") > org-parse-time-string("") > org-time-string-to-time("") [...] > Maybe relevant: I have date enabled in options. > #+OPTIONS: date:t
I'm not an ox-rss user and don't know if there are more realistic ways to hit this error, but I was able to trigger it by taking an already exported buffer of --8<---------------cut here---------------start------------->8--- * h1 :PROPERTIES: :ID: 76841adc-b233-4f6d-8446-3478f263544b :PUBDATE: <2021-01-10 Sun 17:46> :END: --8<---------------cut here---------------end--------------->8--- and then setting PUBDATE to an empty string and exporting again. I'm not sure if the error you see is indicative of a larger issue, though either way guarding against an empty string as your patch does seems fine. But... > diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el > index 299d22086..97a4bfc8f 100644 > --- a/contrib/lisp/ox-rss.el > +++ b/contrib/lisp/ox-rss.el > @@ -245,7 +245,7 @@ communication channel." > (or (org-element-property :CATEGORY headline) "") info)) > (pubdate0 (org-element-property :PUBDATE headline)) > (pubdate (let ((system-time-locale "C")) > - (if pubdate0 > + (if (and pubdate0 (not (string-empty-p pubdate0)) ... you're missing a closing parenthesis here. Also, a bit downstream I see (if (not pubdate0) "" ;; Skip entries with no PUBDATE prop It seems like this should be updated to look at pubdate rather than pubdate0 to avoid "<pubDate>nil</pubDate>" for the empty string case. What do you think?