all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jan Tatarik <jan.tatarik@gmail.com>
To: Lars Magne Ingebrigtsen <lmi@gnus.org>
Cc: help-gnu-emacs@gnu.org, Kostas Zorbadelos <kzorba@otenet.gr>
Subject: Re: gnus-icalendar international character handling
Date: Wed, 24 Feb 2016 10:05:29 +0100	[thread overview]
Message-ID: <87oab6a36u.fsf@xing.com> (raw)
In-Reply-To: <87si0ioqqb.fsf@gnus.org> (Lars Magne Ingebrigtsen's message of "Wed, 24 Feb 2016 12:13:16 +1100")

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff, Size: 2183 bytes --]

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)

  parent reply	other threads:[~2016-02-24  9:05 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 [this message]
2016-02-25 13:15     ` Kostas Zorbadelos
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=87oab6a36u.fsf@xing.com \
    --to=jan.tatarik@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=kzorba@otenet.gr \
    --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.