[PATCH v2 2/2] emacs: support text/calendar mime type
authorJani Nikula <jani@nikula.org>
Thu, 9 Feb 2012 14:46:03 +0000 (14:46 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:19 +0000 (09:44 -0800)
aa/b76b0c4411a1850a2b2e4f62d598e98d8c9f32 [new file with mode: 0644]

diff --git a/aa/b76b0c4411a1850a2b2e4f62d598e98d8c9f32 b/aa/b76b0c4411a1850a2b2e4f62d598e98d8c9f32
new file mode 100644 (file)
index 0000000..ce7e9bb
--- /dev/null
@@ -0,0 +1,94 @@
+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 0E426429E31\r
+       for <notmuch@notmuchmail.org>; Thu,  9 Feb 2012 06:46:13 -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 Fx4HSV4hlMx6 for <notmuch@notmuchmail.org>;\r
+       Thu,  9 Feb 2012 06:46:12 -0800 (PST)\r
+Received: from mail-qw0-f46.google.com (mail-qw0-f46.google.com\r
+       [209.85.216.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 46891431FAF\r
+       for <notmuch@notmuchmail.org>; Thu,  9 Feb 2012 06:46:12 -0800 (PST)\r
+Received: by qadc10 with SMTP id c10so4971907qad.5\r
+       for <notmuch@notmuchmail.org>; Thu, 09 Feb 2012 06:46:11 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.229.69.33 with SMTP id x33mr1429603qci.30.1328798771663;\r
+       Thu, 09 Feb 2012 06:46:11 -0800 (PST)\r
+Received: from localhost (nikula.org. [92.243.24.172])\r
+       by mx.google.com with ESMTPS id ef1sm6120244qab.19.2012.02.09.06.46.09\r
+       (version=SSLv3 cipher=OTHER); Thu, 09 Feb 2012 06:46:10 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 2/2] emacs: support text/calendar mime type\r
+Date: Thu,  9 Feb 2012 14:46:03 +0000\r
+Message-Id:\r
+ <25a7cebf4b36e42f8232e34f86d7b5379d1d1959.1328798471.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:\r
+ <ab777cf0fa83778d3399ac52094df9230738819d.1328798471.git.jani@nikula.org>\r
+References:\r
+ <ab777cf0fa83778d3399ac52094df9230738819d.1328798471.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQk99hfDyaixEAQcKlPFbEhaDrMCjMXNmMUXG9J9RAijwRHcKu44pemjnC0F0bSJUnre0Pzx\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: Thu, 09 Feb 2012 14:46:13 -0000\r
+\r
+Replace text/x-vcalendar with text/calendar, while maintaining support\r
+and backwards compatibility for text/x-vcalendar.\r
+\r
+Code by David Edmondson <dme@dme.org>\r
+---\r
+ emacs/notmuch-show.el |    6 +++++-\r
+ 1 files changed, 5 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 5f643f1..33a4f18 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -711,7 +711,7 @@ current buffer, if possible."\r
+       (run-hook-with-args 'notmuch-show-insert-text/plain-hook msg depth))))\r
+   t)\r
\r
+-(defun notmuch-show-insert-part-text/x-vcalendar (msg part content-type nth depth declared-type)\r
++(defun notmuch-show-insert-part-text/calendar (msg part content-type nth depth declared-type)\r
+   (notmuch-show-insert-part-header nth declared-type content-type (plist-get part :filename))\r
+   (insert (with-temp-buffer\r
+           (insert (notmuch-show-get-bodypart-content msg part nth))\r
+@@ -729,6 +729,10 @@ current buffer, if possible."\r
+             result)))\r
+   t)\r
\r
++;; For backwards compatibility.\r
++(defun notmuch-show-insert-part-text/x-vcalendar (msg part content-type nth depth declared-type)\r
++  (notmuch-show-insert-part-text/calendar 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