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