From: Kostas Zorbadelos <kzorba@otenet.gr>
To: Lars Magne Ingebrigtsen <lmi@gnus.org>
Cc: help-gnu-emacs@gnu.org, Jan Tatarik <Jan.Tatarik@gmail.com>
Subject: Re: gnus-icalendar errors in emacs 24.5
Date: Tue, 23 Feb 2016 11:13:55 +0200 [thread overview]
Message-ID: <87bn77dc18.fsf@otenet.gr> (raw)
In-Reply-To: <87y4acurrt.fsf@gnus.org> (Lars Magne Ingebrigtsen's message of "Tue, 23 Feb 2016 12:41:58 +1100")
Lars,
thank you so much. The problem is indeed my Greek locale that causes
failure in date-to-time().
I made the following patch
--- gnus-icalendar.el.orig 2016-02-23 09:04:49.755027543 +0200
+++ gnus-icalendar.el 2016-02-23 10:57:03.759362183 +0200
@@ -389,10 +389,10 @@
"Build `org-mode' timestamp from EVENT start/end dates and recurrence info."
(let* ((start (gnus-icalendar-event:start-time event))
(end (gnus-icalendar-event:end-time event))
- (start-date (format-time-string "%Y-%m-%d %a" start))
+ (start-date (format-time-string "%Y-%m-%dT%T%z" start))
(start-time (format-time-string "%H:%M" start))
(start-at-midnight (string= start-time "00:00"))
- (end-date (format-time-string "%Y-%m-%d %a" end))
+ (end-date (format-time-string "%Y-%m-%dT%T%z" end))
(end-time (format-time-string "%H:%M" end))
(end-at-midnight (string= end-time "00:00"))
(start-end-date-diff (/ (float-time (time-subtract
that seems to work. Jan, as the author has the final saying in this,
hopefully it doesn't break anything else, or there is just a better
solution. Hopefully it will be fixed in later versions of Emacs.
Again, thanks, it is a pleasure to finally get rid of Thunderbird and
have a plain text calendaring that works.
Regards,
Kostas
Lars Magne Ingebrigtsen <lmi@gnus.org> writes:
> Kostas Zorbadelos <kzorba@otenet.gr> writes:
>
>> Org file exists and has a 'Calendar' headline.
>> On export of a calendar mail (attached the calendar MIME part) I get the
>> attached backtrace. I get the same backtrace even when I send a gmail
>> calendar invitation. Any suggestions?
>
> [...]
>
>> Debugger entered--Lisp error: (error "Invalid date: 2016-02-25 Πεμ")
>> signal(error ("Invalid date: 2016-02-25 Πεμ"))
>> error("Invalid date: %s" "2016-02-25 Πεμ")
>> date-to-time("2016-02-25 Πεμ")
>
> This is definitely a bug, and it comes from here:
>
> (cl-defmethod gnus-icalendar-event:org-timestamp ((event gnus-icalendar-event))
> "Build `org-mode' timestamp from EVENT start/end dates and recurrence info."
> (let* ((start (gnus-icalendar-event:start-time event))
> (end (gnus-icalendar-event:end-time event))
> (start-date (format-time-string "%Y-%m-%d %a" start))
>
> %a is the locale's day name, and that's not something `date-to-time' can
> parse. But I'm not familiar with gnus-icalendar, so I'm not sure what
> the right fix is here.
>
> Jan, is the week day supposed to be in these date strings at all?
--
Kostas Zorbadelos http://gr.linkedin.com/in/kzorba
next prev parent reply other threads:[~2016-02-23 9:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.5404.1456174176.843.help-gnu-emacs@gnu.org>
2016-02-23 1:41 ` gnus-icalendar errors in emacs 24.5 Lars Magne Ingebrigtsen
2016-02-23 9:13 ` Kostas Zorbadelos [this message]
2016-02-23 10:13 ` Jan Tatarik
2016-02-23 10:16 ` Lars Ingebrigtsen
2016-02-23 10:35 ` gnus-icalendar errors in emacs 24.5 [FIXED] Kostas Zorbadelos
2016-02-23 14:25 ` gnus-icalendar errors in emacs 24.5 [timezone issue] Kostas Zorbadelos
2016-02-22 18:48 gnus-icalendar errors in emacs 24.5 Kostas Zorbadelos
Reply instructions:
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bn77dc18.fsf@otenet.gr \
--to=kzorba@otenet.gr \
--cc=Jan.Tatarik@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=lmi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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.
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).