From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2J6vFUaJ+1/hcAAA0tVLHw (envelope-from ) for ; Sun, 10 Jan 2021 23:09:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id KBKCEUaJ+18EbwAAB5/wlQ (envelope-from ) for ; Sun, 10 Jan 2021 23:09:58 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7889C9402A9 for ; Sun, 10 Jan 2021 23:09:57 +0000 (UTC) Received: from localhost ([::1]:43980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyjqO-0003XL-EV for larch@yhetil.org; Sun, 10 Jan 2021 18:09:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyjol-0002E2-Gh for emacs-orgmode@gnu.org; Sun, 10 Jan 2021 18:08:15 -0500 Received: from out1.migadu.com ([91.121.223.63]:38600) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyjof-0006dQ-VI for emacs-orgmode@gnu.org; Sun, 10 Jan 2021 18:08:15 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1610320082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jz2H3kfPRMXwz444uMCsZSARbVPSozAM/jdKoXIxJvc=; b=fqQmzUGODVAwrKrqX1UQW3L24AEtW3R0Acydg4UehiNOExvRXNLiGSAZAn/tWtaVrHpaFD Tx9BFYfPwIn5AuvON2+fdV5VRHaJ9nGzV02vl0TI9WVAAV+K8REk46DujQlZhirhj7mwhF oQNstbssjlMWGH+5is6pKIDF1J9e25ex7AgauLLYDwftY8wx1UjL17vnlwR2P7Tzj9WJNP DQNn+yNT/5Es8zdq1NTWGW8TqpQqrsytAYINgcBXgyh1lw6bsbJ04VB/K3rOIK5808y4mA zaOmRAgji5f0odlJsv7Sh7xhNMDiM9jSsJVaqox0mmMluCJcey7sLG9TXuYE9A== From: Kyle Meyer To: "Dr. Arne Babenhauserheide" Subject: Re: Bug: [patch] fix: ox-rss died when an entry had an empty date [ ( @ /home/arne/.guix-profile/share/emacs/site-lisp/)] In-Reply-To: <875z49echi.fsf@web.de> References: <875z49echi.fsf@web.de> Message-ID: <87k0skpezy.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: kyle@kyleam.com Date: Sun, 10 Jan 2021 23:08:02 GMT Received-SPF: pass client-ip=91.121.223.63; envelope-from=kyle@kyleam.com; helo=out1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.55 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b=fqQmzUGO; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 7889C9402A9 X-Spam-Score: -2.55 X-Migadu-Scanner: scn1.migadu.com X-TUID: rRZw53F/N6tP 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 "nil" for the empty string case. What do you think?