From: Kostas Zorbadelos <kzorba@otenet.gr>
To: Jan Tatarik <jan.tatarik@gmail.com>
Cc: help-gnu-emacs@gnu.org, Lars Magne Ingebrigtsen <lmi@gnus.org>
Subject: Re: gnus-icalendar international character handling
Date: Thu, 25 Feb 2016 15:15:37 +0200 [thread overview]
Message-ID: <87bn752ao6.fsf@otenet.gr> (raw)
In-Reply-To: <87oab6a36u.fsf@xing.com> (Jan Tatarik's message of "Wed, 24 Feb 2016 10:05:29 +0100")
Hi,
this fix (removing the localized day) does not seem to fix the
international character display of calendar events and their export to
org files. Also, there is the timezone issue I mentioned in the other
thread.
For the record, saving the calendar MIME part (gnus-mime-save-part) and
then importing it to a diary file with (icalendar-import-file) seems to
work really well (handling international characters and timezone).
Regards,
Kostas
Jan Tatarik <jan.tatarik@gmail.com> writes:
> On Wed, Feb 24 2016, Lars Magne Ingebrigtsen wrote:
>
>> Kostas Zorbadelos <kzorba@otenet.gr> writes:
>
>>> after activation of gnus-icalendar, the text/calendar MIME parts are not
>>> shown properly in gnus if they contain international (in my case Greek)
>>> characters (e.g. in Summary or Description).
>>> The export to org file also saves the relevant part as raw text and
>>> prompts for encoding. Is there any way to fix this?
>
>> Yeah, I think including the (localised) week day here just seems likely
>> to break lots of stuff... Does that have to be included in these time
>> stamps?
>
> This works for me.
>
>
> diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el
> index d7a431a..3df3a8c 100644
> --- a/lisp/gnus/gnus-icalendar.el
> +++ b/lisp/gnus/gnus-icalendar.el
> @@ -394,10 +394,10 @@ gnus-icalendar-event:org-timestamp
> "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-%d" 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-%d" end))
> (end-time (format-time-string "%H:%M" end))
> (end-at-midnight (string= end-time "00:00"))
> (start-end-date-diff
> @@ -417,7 +417,7 @@ gnus-icalendar-event:org-timestamp
> ;; A 0:0 - A+1 0:0 -> A
> ;; A 0:0 - A+n 0:0 -> A - A+n-1
> ((and start-at-midnight end-at-midnight) (if (> start-end-date-diff 1)
> - (let ((end-ts (format-time-string "%Y-%m-%d %a" (time-subtract end time-1-day))))
> + (let ((end-ts (format-time-string "%Y-%m-%d" (time-subtract end time-1-day))))
> (format "<%s>--<%s>" start-date end-ts))
> (format "<%s%s>" start-date repeat)))
> ;; end midnight
> @@ -425,7 +425,7 @@ gnus-icalendar-event:org-timestamp
> ;; A .:. - A+n 0:0 -> A .:. - A_n-1
> (end-at-midnight (if (= start-end-date-diff 1)
> (format "<%s %s-23:59%s>" start-date start-time repeat)
> - (let ((end-ts (format-time-string "%Y-%m-%d %a" (time-subtract end time-1-day))))
> + (let ((end-ts (format-time-string "%Y-%m-%d" (time-subtract end time-1-day))))
> (format "<%s %s>--<%s>" start-date start-time end-ts))))
> ;; start midnight
> ;; A 0:0 - A .:. -> A 0:0-.:. (default 1)
>
--
Kostas Zorbadelos http://gr.linkedin.com/in/kzorba
next prev parent reply other threads:[~2016-02-25 13:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.5501.1456224411.843.help-gnu-emacs@gnu.org>
2016-02-24 1:13 ` gnus-icalendar international character handling Lars Magne Ingebrigtsen
2016-02-24 8:56 ` Jan Tatarik
2016-02-24 9:05 ` Jan Tatarik
2016-02-25 13:15 ` Kostas Zorbadelos [this message]
2016-02-25 13:18 ` tomas
2016-02-26 5:35 ` Lars Ingebrigtsen
2016-02-26 7:28 ` Kostas Zorbadelos
2016-02-26 5:35 ` Lars Ingebrigtsen
2016-02-23 10:46 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bn752ao6.fsf@otenet.gr \
--to=kzorba@otenet.gr \
--cc=help-gnu-emacs@gnu.org \
--cc=jan.tatarik@gmail.com \
--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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.