* gnus-icalendar international character handling
@ 2016-02-23 10:46 Kostas Zorbadelos
0 siblings, 0 replies; 9+ messages in thread
From: Kostas Zorbadelos @ 2016-02-23 10:46 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: Lars Ingebrigtsen, Jan Tatarik
Hi,
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?
Regards,
Kostas
--
Kostas Zorbadelos http://gr.linkedin.com/in/kzorba
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <mailman.5501.1456224411.843.help-gnu-emacs@gnu.org>]
* Re: gnus-icalendar international character handling
[not found] <mailman.5501.1456224411.843.help-gnu-emacs@gnu.org>
@ 2016-02-24 1:13 ` Lars Magne Ingebrigtsen
2016-02-24 8:56 ` Jan Tatarik
2016-02-24 9:05 ` Jan Tatarik
0 siblings, 2 replies; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 2016-02-24 1:13 UTC (permalink / raw)
To: Kostas Zorbadelos; +Cc: help-gnu-emacs, Jan Tatarik
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?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: gnus-icalendar international character handling
2016-02-24 1:13 ` Lars Magne Ingebrigtsen
@ 2016-02-24 8:56 ` Jan Tatarik
2016-02-24 9:05 ` Jan Tatarik
1 sibling, 0 replies; 9+ messages in thread
From: Jan Tatarik @ 2016-02-24 8:56 UTC (permalink / raw)
To: Lars Magne Ingebrigtsen; +Cc: help-gnu-emacs, Kostas Zorbadelos
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?
All timestamps inserted using org-mode functions contain the week day,
but timestamps without a week day are also valid and understood by
org-mode. I just found this hidden in a footnote in the org-mode Info.
So I will experiment with removing the day and let you know.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: gnus-icalendar international character handling
2016-02-24 1:13 ` Lars Magne Ingebrigtsen
2016-02-24 8:56 ` Jan Tatarik
@ 2016-02-24 9:05 ` Jan Tatarik
2016-02-25 13:15 ` Kostas Zorbadelos
2016-02-26 5:35 ` Lars Ingebrigtsen
1 sibling, 2 replies; 9+ messages in thread
From: Jan Tatarik @ 2016-02-24 9:05 UTC (permalink / raw)
To: Lars Magne Ingebrigtsen; +Cc: help-gnu-emacs, Kostas Zorbadelos
[-- 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)
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: gnus-icalendar international character handling
2016-02-24 9:05 ` Jan Tatarik
@ 2016-02-25 13:15 ` Kostas Zorbadelos
2016-02-25 13:18 ` tomas
2016-02-26 5:35 ` Lars Ingebrigtsen
2016-02-26 5:35 ` Lars Ingebrigtsen
1 sibling, 2 replies; 9+ messages in thread
From: Kostas Zorbadelos @ 2016-02-25 13:15 UTC (permalink / raw)
To: Jan Tatarik; +Cc: help-gnu-emacs, Lars Magne Ingebrigtsen
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: gnus-icalendar international character handling
2016-02-25 13:15 ` Kostas Zorbadelos
@ 2016-02-25 13:18 ` tomas
2016-02-26 5:35 ` Lars Ingebrigtsen
1 sibling, 0 replies; 9+ messages in thread
From: tomas @ 2016-02-25 13:18 UTC (permalink / raw)
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, Feb 25, 2016 at 03:15:37PM +0200, Kostas Zorbadelos wrote:
>
> 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).
This is an interesting point. I haven't been following closely -- so
apologies if I'm asking something answered before, but could it be that
gnus is looking at the wrong header? Each MIME part of the multipart
message may have a different "charset" sub attribute.
Have a look at the "raw" message, perhaps there's a clue.
regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlbO/0AACgkQBcgs9XrR2kZQlwCeOMJT9VrqEK3QgmWaJgCW4WAw
oDUAnjwWmPWzC6YubpqWmXDsx87T1WXh
=9qz5
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: gnus-icalendar international character handling
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
1 sibling, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-26 5:35 UTC (permalink / raw)
To: Kostas Zorbadelos; +Cc: help-gnu-emacs, Jan Tatarik
Kostas Zorbadelos <kzorba@otenet.gr> writes:
> this fix (removing the localized day) does not seem to fix the
> international character display of calendar events and their export to
> org files.
Are those issues related?
> Also, there is the timezone issue I mentioned in the other thread.
And that's also another bug, but unrelated...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: gnus-icalendar international character handling
2016-02-26 5:35 ` Lars Ingebrigtsen
@ 2016-02-26 7:28 ` Kostas Zorbadelos
0 siblings, 0 replies; 9+ messages in thread
From: Kostas Zorbadelos @ 2016-02-26 7:28 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: help-gnu-emacs, Jan Tatarik
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Kostas Zorbadelos <kzorba@otenet.gr> writes:
>
>> this fix (removing the localized day) does not seem to fix the
>> international character display of calendar events and their export to
>> org files.
>
> Are those issues related?
>
I didn't think so. You just mentioned it seems likely to break lots of
stuff.
>> Also, there is the timezone issue I mentioned in the other thread.
>
> And that's also another bug, but unrelated...
Yes indeed.
--
Kostas Zorbadelos http://gr.linkedin.com/in/kzorba
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: gnus-icalendar international character handling
2016-02-24 9:05 ` Jan Tatarik
2016-02-25 13:15 ` Kostas Zorbadelos
@ 2016-02-26 5:35 ` Lars Ingebrigtsen
1 sibling, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-26 5:35 UTC (permalink / raw)
To: Jan Tatarik; +Cc: help-gnu-emacs, Kostas Zorbadelos
Jan Tatarik <jan.tatarik@gmail.com> writes:
>> 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.
Thanks; applied.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-02-26 7:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-23 10:46 gnus-icalendar international character handling Kostas Zorbadelos
[not found] <mailman.5501.1456224411.843.help-gnu-emacs@gnu.org>
2016-02-24 1:13 ` Lars Magne Ingebrigtsen
2016-02-24 8:56 ` Jan Tatarik
2016-02-24 9:05 ` Jan Tatarik
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
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.