[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnus-icalendar international character handling
From: |
Kostas Zorbadelos |
Subject: |
Re: gnus-icalendar international character handling |
Date: |
Thu, 25 Feb 2016 15:15:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
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