From: Jani Nikula Date: Wed, 8 Feb 2012 16:55:16 +0000 (+0000) Subject: [PATCH 2/2] emacs: regard text/calendar as text/x-vcalendar X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=6c724f5f94a14c9e527738c3413e9ddaa7bb4b23;p=notmuch-archives.git [PATCH 2/2] emacs: regard text/calendar as text/x-vcalendar --- diff --git a/87/883d5ac16bb8b61d41f03dfaba722f4446982c b/87/883d5ac16bb8b61d41f03dfaba722f4446982c new file mode 100644 index 000000000..df4151028 --- /dev/null +++ b/87/883d5ac16bb8b61d41f03dfaba722f4446982c @@ -0,0 +1,88 @@ +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 CBFEC431FAE + for ; Wed, 8 Feb 2012 08:55:31 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" +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 n5Hrsspw8vEA for ; + Wed, 8 Feb 2012 08:55:27 -0800 (PST) +Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com + [209.85.216.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5F257431FB6 + for ; Wed, 8 Feb 2012 08:55:27 -0800 (PST) +Received: by mail-qw0-f53.google.com with SMTP id k1so601534qaf.5 + for ; Wed, 08 Feb 2012 08:55:27 -0800 (PST) +Received: by 10.224.106.194 with SMTP id y2mr7034400qao.87.1328720127052; + Wed, 08 Feb 2012 08:55:27 -0800 (PST) +Received: from localhost (nikula.org. [92.243.24.172]) + by mx.google.com with ESMTPS id fh6sm3852677qab.22.2012.02.08.08.55.25 + (version=SSLv3 cipher=OTHER); Wed, 08 Feb 2012 08:55:26 -0800 (PST) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH 2/2] emacs: regard text/calendar as text/x-vcalendar +Date: Wed, 8 Feb 2012 16:55:16 +0000 +Message-Id: + <19a567d3e0c466ec6d73ba2039cf5a0d6c8bc3f5.1328719309.git.jani@nikula.org> +X-Mailer: git-send-email 1.7.1 +In-Reply-To: +References: +In-Reply-To: +References: +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 16:55:32 -0000 + +Treat text/calendar as text/x-vcalendar. At least the following +produce text/calendar that parse as text/x-vcalendar: + +PRODID:-//Google Inc//Google Calendar 70.9054//EN +PRODID:Microsoft Exchange Server 2010 + +Code by David Edmondson + +--- + +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(-) + +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) + ++(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 depth declared-type)) ++ + (defun notmuch-show-insert-part-application/octet-stream (msg part content-type nth depth declared-type) + ;; 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. +-- +1.7.1 +