From: Kyle Meyer <email@example.com>
To: "Dr. Arne Babenhauserheide" <firstname.lastname@example.org>
Subject: Re: Bug: [patch] fix: ox-rss died when an entry had an empty date [ ( @ /home/arne/.guix-profile/share/emacs/site-lisp/)]
Date: Sun, 10 Jan 2021 23:08:02 GMT [thread overview]
Message-ID: <email@example.com> (raw)
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" "")
> 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
:PUBDATE: <2021-01-10 Sun 17:46>
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?
next prev parent reply other threads:[~2021-01-10 23:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 1:56 Bug: [patch] fix: ox-rss died when an entry had an empty date [ ( @ /home/arne/.guix-profile/share/emacs/site-lisp/)] Dr. Arne Babenhauserheide
2021-01-10 23:08 ` Kyle Meyer [this message]
2021-04-30 7:04 ` Bastien
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:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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
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).