From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Inquiry about ical2org Date: Mon, 30 May 2016 13:59:29 +0100 Message-ID: <8737ozaeha.fsf@ucl.ac.uk> References: <649f280c5d4d4c0b9f100fb9da170cdc@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87zird5keq.fsf@ucl.ac.uk> <6aaed23035a1488b92c4c5b556966320@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <8737p43pp2.fsf@ucl.ac.uk> <82e201aa4dd34c99b527eb7b1009f062@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> Reply-To: Eric S Fraga Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7TPJ-0001xE-Os for emacs-orgmode@gnu.org; Mon, 30 May 2016 16:03:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7TPG-0003Nb-IU for emacs-orgmode@gnu.org; Mon, 30 May 2016 16:03:25 -0400 Received: from mail-db3on0116.outbound.protection.outlook.com ([157.55.234.116]:12446 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7TPF-0003Id-W1 for emacs-orgmode@gnu.org; Mon, 30 May 2016 16:03:22 -0400 In-Reply-To: <82e201aa4dd34c99b527eb7b1009f062@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> (John Hendy's message of "Fri, 27 May 2016 16:06:00 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: John Hendy Cc: emacs-orgmode --=-=-= Content-Type: text/plain On Friday, 27 May 2016 at 16:06, John Hendy wrote: > Is your original version anywhere handy? I tried searching but don't > seem to find it. I have not made it available since the one on Worg diverged but only because I didn't get around to doing anything about it. Attached is my latest version which I use daily. -- : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-164-g50a182 --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename="ical2org.awk" Content-Transfer-Encoding: base64 IyBhd2sgc2NyaXB0IGZvciBjb252ZXJ0aW5nIGFuIGlDYWwgZm9ybWF0dGVkIGZpbGUgdG8gYSBz ZXF1ZW5jZSBvZiBvcmctbW9kZSBoZWFkaW5ncy4KIyB0aGlzIG1heSBub3Qgd29yayBpbiBnZW5l cmFsIGJ1dCBzZWVtcyB0byB3b3JrIGZvciBkYXkgYW5kIHRpbWVkIGV2ZW50cyBmcm9tIEdvb2ds ZSdzCiMgY2FsZW5kYXIsIHdoaWNoIGlzIHJlYWxseSBhbGwgSSBuZWVkIHJpZ2h0IG5vdy4uLgoj CiMgdXNhZ2U6CiMgICBhd2sgLWYgVEhJU0ZJTEUgPCBpY2FsaW5wdXRmaWxlLmljcyA+IG9yZ21v ZGVlbnRyaWVzLm9yZyAtLWFzc2lnbiBOQU1FPWNhdGVnb3J5CiMKIyB3aGVyZSB0aGUgY2F0ZWdv cnkgaXMgdXNlZCB0byBkZWZpbmUgYSBDQVRFR09SWSBmb3IgYWxsIGVudHJpZXMgaW4KIyB0aGUg ZmlsZSBhbmQgYWxzbyBhc3NpZ24gdGhhdCBsYWJlbCBhcyBhIHRhZyB0byBlYWNoIGVudHJ5CiMK IyBOb3RlOiBjaGFuZ2Ugb3JnIG1ldGEgaW5mb3JtYXRpb24gZ2VuZXJhdGVkIGJlbG93IGZvciBh dXRob3IgYW5kCiMgZW1haWwgZW50cmllcyEKIwojIEtub3duIGJ1Z3M6CiMgLSBub3Qgc28gbXVj aCBhIGJ1ZyBhcyBhIHBvc3NpYmxlIGFzc3VtcHRpb246IGRhdGUgZW50cmllcyB3aXRoIG5vIHRp bWUKIyAgIHNwZWNpZmllZCBhcmUgYXNzdW1lZCB0byB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GluZm9ybWF0aW9uIGNvbWUgaW1tZWRpYXRl bHkgYWZ0ZXIgdGhlCiAgICAjIGhlYWRsaW5lLCBiZWZvcmUgcHJvcGVydGllcwogICAgaWYgKGRh dGUxICE9ICIiKSB7CiAgICAgICAgaWYgKGRhdGUyICE9ICIiKQogICAgICAgICAgICBpZiAodGlt ZTIgIT0gIiIpCiAgICAgICAgICAgICAgICBwcmludCAiU0NIRURVTEVEOiA8IiBkYXRlMSB0aW1l MSAiPiBERUFETElORTogPCIgZGF0ZTIgIiAiIHRpbWUyICI+ICIKICAgICAgICAgICAgZWxzZQog ICAgICAgICAgICAgICAgcHJpbnQgIlNDSEVEVUxFRDogPCIgZGF0ZTEgdGltZTEgIj4gREVBRExJ TkU6IDwiIGRhdGUyICI+ICIKICAgICAgICBlbHNlCiAgICAgICAgICAgIHByaW50ICJTQ0hFRFVM RUQ6IDwiIGRhdGUxIHRpbWUxICI+ICIKICAgIH0gZWxzZSBpZiAoZGF0ZTIgIT0gIiIpIHsKICAg ICAgICBpZiAodGltZTIgIT0gIiIpCiAgICAgICAgICAgIHByaW50ICJERUFETElORTogPCIgZGF0 ZTIgIiAiIHRpbWUyICI+ICIKICAgICAgICBlbHNlCiAgICAgICAgICAgIHByaW50ICJERUFETElO RTogPCIgZGF0ZTIgIj4gIgogICAgfQogICAgIyBub3cgY29tZSB0aGUgcHJvcGVydGllcyB3aGlj aCBpbmNsdWRlIHRoZSBJRCBhbHdheXMgYW5kIHBvc3NpYmx5CiAgICAjIGEgbG9jYXRpb24KICAg IHByaW50ICI6UFJPUEVSVElFUzoiCiAgICBwcmludCAiOklEOiAgICAgICAiIGlkCiAgICBpZiAo bG9jYXRpb24gIT0gIiIpIHsKICAgICAgICBwcmludCAiOkxPQ0FUSU9OOiAiIGdlbnN1YigiXFxc XCwiLCAiLCIsICJnIiwgbG9jYXRpb24pOwogICAgfQogICAgcHJpbnQgIjpFTkQ6IgogICAgIyBu b3cgdGhlIGVudHJ5OyB3ZSBwdXQg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