[PATCH 2/2] emacs: regard text/calendar as text/x-vcalendar
authorJani Nikula <jani@nikula.org>
Wed, 8 Feb 2012 16:55:16 +0000 (16:55 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:17 +0000 (09:44 -0800)
87/883d5ac16bb8b61d41f03dfaba722f4446982c [new file with mode: 0644]

diff --git a/87/883d5ac16bb8b61d41f03dfaba722f4446982c b/87/883d5ac16bb8b61d41f03dfaba722f4446982c
new file mode 100644 (file)
index 0000000..df41510
--- /dev/null
@@ -0,0 +1,88 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id CBFEC431FAE\r
+       for <notmuch@notmuchmail.org>; Wed,  8 Feb 2012 08:55:31 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id n5Hrsspw8vEA for <notmuch@notmuchmail.org>;\r
+       Wed,  8 Feb 2012 08:55:27 -0800 (PST)\r
+Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com\r
+       [209.85.216.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 5F257431FB6\r
+       for <notmuch@notmuchmail.org>; Wed,  8 Feb 2012 08:55:27 -0800 (PST)\r
+Received: by mail-qw0-f53.google.com with SMTP id k1so601534qaf.5\r
+       for <notmuch@notmuchmail.org>; Wed, 08 Feb 2012 08:55:27 -0800 (PST)\r
+Received: by 10.224.106.194 with SMTP id y2mr7034400qao.87.1328720127052;\r
+       Wed, 08 Feb 2012 08:55:27 -0800 (PST)\r
+Received: from localhost (nikula.org. [92.243.24.172])\r
+       by mx.google.com with ESMTPS id fh6sm3852677qab.22.2012.02.08.08.55.25\r
+       (version=SSLv3 cipher=OTHER); Wed, 08 Feb 2012 08:55:26 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/2] emacs: regard text/calendar as text/x-vcalendar\r
+Date: Wed,  8 Feb 2012 16:55:16 +0000\r
+Message-Id:\r
+ <19a567d3e0c466ec6d73ba2039cf5a0d6c8bc3f5.1328719309.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.1\r
+In-Reply-To: <cover.1328719309.git.jani@nikula.org>\r
+References: <cover.1328719309.git.jani@nikula.org>\r
+In-Reply-To: <cover.1328719309.git.jani@nikula.org>\r
+References: <cover.1328719309.git.jani@nikula.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 08 Feb 2012 16:55:32 -0000\r
+\r
+Treat text/calendar as text/x-vcalendar. At least the following\r
+produce text/calendar that parse as text/x-vcalendar:\r
+\r
+PRODID:-//Google Inc//Google Calendar 70.9054//EN\r
+PRODID:Microsoft Exchange Server 2010\r
+\r
+Code by David Edmondson <dme@dme.org>\r
+\r
+---\r
+\r
+I wish I had some references here, other than my own maildirs. Almost\r
+all of the calendar invites I have are text/calendar, and all of them\r
+parse just fine as text/x-vcalendar.\r
+---\r
+ emacs/notmuch-show.el |    3 +++\r
+ 1 files changed, 3 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 1340380..f6588b3 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -720,6 +720,9 @@ current buffer, if possible."\r
+             result)))\r
+   t)\r
+ \r
++(defun notmuch-show-insert-part-text/calendar (msg part content-type nth depth declared-type)\r
++  (notmuch-show-insert-part-text/x-vcalendar msg part content-type nth depth declared-type))\r
++\r
+ (defun notmuch-show-insert-part-application/octet-stream (msg part content-type nth depth declared-type)\r
+   ;; If we can deduce a MIME type from the filename of the attachment,\r
+   ;; do so and pass it on to the handler for that type.\r
+-- \r
+1.7.1\r
+\r