From 85d396a2630341a0bf24c7edb4c25d966b8d766d Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Wed, 8 Feb 2012 17:06:45 +0000 Subject: [PATCH] Re: [PATCH 2/2] emacs: regard text/calendar as text/x-vcalendar --- 00/45e9f91088fab66bb5816fa532cd42b010c7d0 | 122 ++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 00/45e9f91088fab66bb5816fa532cd42b010c7d0 diff --git a/00/45e9f91088fab66bb5816fa532cd42b010c7d0 b/00/45e9f91088fab66bb5816fa532cd42b010c7d0 new file mode 100644 index 000000000..d86a6d54c --- /dev/null +++ b/00/45e9f91088fab66bb5816fa532cd42b010c7d0 @@ -0,0 +1,122 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 76953431FAF + for ; Wed, 8 Feb 2012 09:06:50 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id auhynSyWfN6D for ; + Wed, 8 Feb 2012 09:06:50 -0800 (PST) +Received: from mail-we0-f181.google.com (mail-we0-f181.google.com + [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id B5D72431FAE + for ; Wed, 8 Feb 2012 09:06:49 -0800 (PST) +Received: by werp13 with SMTP id p13so616190wer.26 + for ; Wed, 08 Feb 2012 09:06:48 -0800 (PST) +Received: by 10.216.132.214 with SMTP id o64mr6951531wei.26.1328720808670; + Wed, 08 Feb 2012 09:06:48 -0800 (PST) +Received: from hotblack-desiato.hh.sledj.net + (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25]) + by mx.google.com with ESMTPS id cs4sm2359033wib.8.2012.02.08.09.06.46 + (version=TLSv1/SSLv3 cipher=OTHER); + Wed, 08 Feb 2012 09:06:47 -0800 (PST) +Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) + id 9DBC5A0A98; Wed, 8 Feb 2012 17:06:45 +0000 (GMT) +To: Jani Nikula , notmuch@notmuchmail.org +Subject: Re: [PATCH 2/2] emacs: regard text/calendar as text/x-vcalendar +In-Reply-To: + <19a567d3e0c466ec6d73ba2039cf5a0d6c8bc3f5.1328719309.git.jani@nikula.org> +References: + <19a567d3e0c466ec6d73ba2039cf5a0d6c8bc3f5.1328719309.git.jani@nikula.org> +User-Agent: Notmuch/0.11.1+166~g546cb24 (http://notmuchmail.org) + Emacs/24.0.92.1 (x86_64-pc-linux-gnu) +From: David Edmondson +Date: Wed, 08 Feb 2012 17:06:45 +0000 +Message-ID: +MIME-Version: 1.0 +Content-Type: multipart/signed; boundary="=-=-="; + micalg=pgp-sha1; protocol="application/pgp-signature" +X-Gm-Message-State: + ALoCoQn+36B5uB32jYNtNloryflHcYDKNk1Sv5kPy7aJza+wytMe8mDhVvz0TMrTOQ4a3K6523GG +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 08 Feb 2012 17:06:50 -0000 + +--=-=-= +Content-Type: text/plain +Content-Transfer-Encoding: quoted-printable + +On Wed, 8 Feb 2012 16:55:16 +0000, Jani Nikula wrote: +> Treat text/calendar as text/x-vcalendar. At least the following +> produce text/calendar that parse as text/x-vcalendar: +>=20 +> PRODID:-//Google Inc//Google Calendar 70.9054//EN +> PRODID:Microsoft Exchange Server 2010 +>=20 +> Code by David Edmondson +>=20 +> --- +>=20 +> I wish I had some references here, other than my own maildirs. Almost +> all of the calendar invites I have are text/calendar, and all of them +> parse just fine as text/x-vcalendar. +> --- +> emacs/notmuch-show.el | 3 +++ +> 1 files changed, 3 insertions(+), 0 deletions(-) +>=20 +> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +> index 1340380..f6588b3 100644 +> --- a/emacs/notmuch-show.el +> +++ b/emacs/notmuch-show.el +> @@ -720,6 +720,9 @@ current buffer, if possible." +> result))) +> t) +>=20=20 +> +(defun notmuch-show-insert-part-text/calendar (msg part content-type nth= + depth declared-type) +> + (notmuch-show-insert-part-text/x-vcalendar msg part content-type nth d= +epth declared-type)) +> + +> (defun notmuch-show-insert-part-application/octet-stream (msg part conte= +nt-type nth depth declared-type) + +It seems that "text/calendar" is officially sanctioned and +"text/x-vcalendar" is old and being phased out, so these should really +be the other way around (i.e. text/calendar is the 'real' function that +is called by the text/x-vcalendar variant). + +> ;; If we can deduce a MIME type from the filename of the attachment, +> ;; do so and pass it on to the handler for that type. +> --=20 +> 1.7.1 +>=20 + +--=-=-= +Content-Type: application/pgp-signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.11 (GNU/Linux) + +iEYEARECAAYFAk8yq6UACgkQaezQq/BJZRZvFgCeI/dok59pj+N+vGJN2Dz1CUXG +GAwAn3ZJWrEnO0lTg02l8MMPYUhF4BUU +=UKZX +-----END PGP SIGNATURE----- +--=-=-=-- -- 2.26.2