From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan Tatarik Newsgroups: gmane.emacs.help Subject: Re: gnus-icalendar international character handling Date: Wed, 24 Feb 2016 10:05:29 +0100 Message-ID: <87oab6a36u.fsf@xing.com> References: <87si0ioqqb.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1456304764 17000 80.91.229.3 (24 Feb 2016 09:06:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Feb 2016 09:06:04 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Kostas Zorbadelos To: Lars Magne Ingebrigtsen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 24 10:06:04 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aYVOU-0007La-4y for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Feb 2016 10:06:02 +0100 Original-Received: from localhost ([::1]:34548 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYVOT-0001Wa-LC for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Feb 2016 04:06:01 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYVO4-0001Kb-D2 for help-gnu-emacs@gnu.org; Wed, 24 Feb 2016 04:05:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYVO0-0000ez-44 for help-gnu-emacs@gnu.org; Wed, 24 Feb 2016 04:05:36 -0500 Original-Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:35875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYVNz-0000es-TS for help-gnu-emacs@gnu.org; Wed, 24 Feb 2016 04:05:32 -0500 Original-Received: by mail-wm0-x22d.google.com with SMTP id g62so260766715wme.1 for ; Wed, 24 Feb 2016 01:05:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=lYLGsy3jEcbE/L/sxFFGd55lwsUa3WDruDcOMrVEAi4=; b=GorPdp5GzghXFlEFNvtd/n+69tSK+OAcM3cWr8G48/ExJbAzf3cOPZBoIaO4Yp0OSy Cvwhnl09xIzIGEbf3FimGP9FslfmU0/UuVm9IPl4xnNDq0koQCYXrFzY04EVyA6yRQGS KjhwHvoXPRQH9vufOXA8si3VtuWKOw1qTrP7NYb8Wt/AqJBCAMpgV/5WblU8KYmJUXYN cD9uR9PSYk7hYb+Ek2JYap0u4W5zbdTURjcIevYOnM4i8PUfIQvr9bhCzjSMOqA6f9BT R54gSDdRdm+nG+Q+jeOZcxpK8dtNsVBdw78JcmfkgqULhTAs73LpKVfdcNfGgoosBoMe kbRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=lYLGsy3jEcbE/L/sxFFGd55lwsUa3WDruDcOMrVEAi4=; b=A21pNn+p2OFeadalCH75GAneMsVBQ0o7rU4J4dLawDJ87XCP042RMQh5nDmPPyhqnR HUqzhJ506K+lzD0ATqs3XdNOIyuRam8i5kPOjqL271DiRm7TmDRWcCqyb3HtuIMbczMA whfjG9ciLYGJJciLl8uefEATI3RGcWp57I8aWyKuA1QGuTQLczk/G6aTG9Y/Tj/MCHJr s56Vc9ek8gxi3CJUugzKzwMZY8kZnf7FhQgGq9xP/Po+T7KivFyJBWiQLbrcTKnFN07P lhWipHHeWX0yvNefEZ7KKoKmk/sZtcsnFal59q1BrA9CtZVr8SvWA1IJJ67SBIhyTcno dL1A== X-Gm-Message-State: AG10YOSSHogWQo2boWCB0w0+kXvOdYK/fzWNCfjlQnRkdpHVMcBZ+umULRmjKJ4xKC4qMg== X-Received: by 10.28.60.84 with SMTP id j81mr23551834wma.91.1456304731047; Wed, 24 Feb 2016 01:05:31 -0800 (PST) Original-Received: from nb-jtatarik2 (office.xing.com. [82.112.107.65]) by smtp.gmail.com with ESMTPSA id x66sm2384771wmb.20.2016.02.24.01.05.30 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 24 Feb 2016 01:05:30 -0800 (PST) In-Reply-To: <87si0ioqqb.fsf@gnus.org> (Lars Magne Ingebrigtsen's message of "Wed, 24 Feb 2016 12:13:16 +1100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22d X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109285 Archived-At: --=-=-= Content-Type: text/plain On Wed, Feb 24 2016, Lars Magne Ingebrigtsen wrote: > Kostas Zorbadelos 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. --=-=-= Content-Type: text/x-diff Content-Disposition: inline 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) --=-=-=--