help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnus-icalendar international character handling


From: Jan Tatarik
Subject: Re: gnus-icalendar international character handling
Date: Wed, 24 Feb 2016 10:05:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (gnu/linux)

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)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]