Re: [PATCH v2 2/2] emacs: support text/calendar mime type
authorJani Nikula <jani@nikula.org>
Tue, 21 Feb 2012 07:52:54 +0000 (07:52 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:46 +0000 (09:44 -0800)
bf/cc175d5129bc0f6004d83b9babc2d1834092c5 [new file with mode: 0644]

diff --git a/bf/cc175d5129bc0f6004d83b9babc2d1834092c5 b/bf/cc175d5129bc0f6004d83b9babc2d1834092c5
new file mode 100644 (file)
index 0000000..3f9f1e6
--- /dev/null
@@ -0,0 +1,110 @@
+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 F0EAE431FAF\r
+       for <notmuch@notmuchmail.org>; Mon, 20 Feb 2012 23:52:59 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\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 QBj661FNUo1q for <notmuch@notmuchmail.org>;\r
+       Mon, 20 Feb 2012 23:52:59 -0800 (PST)\r
+Received: from mail-qw0-f50.google.com (mail-qw0-f50.google.com\r
+       [209.85.216.50]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 659F8431FAE\r
+       for <notmuch@notmuchmail.org>; Mon, 20 Feb 2012 23:52:59 -0800 (PST)\r
+Received: by qabg27 with SMTP id g27so7238236qab.2\r
+       for <notmuch@notmuchmail.org>; Mon, 20 Feb 2012 23:52:58 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of jani@nikula.org designates\r
+       10.229.111.228 as permitted sender) client-ip=10.229.111.228; \r
+Authentication-Results: mr.google.com;\r
+       spf=pass (google.com: domain of jani@nikula.org\r
+       designates 10.229.111.228 as permitted sender)\r
+       smtp.mail=jani@nikula.org\r
+Received: from mr.google.com ([10.229.111.228])\r
+       by 10.229.111.228 with SMTP id t36mr18864348qcp.73.1329810778936\r
+       (num_hops = 1); Mon, 20 Feb 2012 23:52:58 -0800 (PST)\r
+Received: by 10.229.111.228 with SMTP id t36mr15960038qcp.73.1329810778411;\r
+       Mon, 20 Feb 2012 23:52:58 -0800 (PST)\r
+Received: from localhost (nikula.org. [92.243.24.172])\r
+       by mx.google.com with ESMTPS id ec5sm49911907qab.21.2012.02.20.23.52.56\r
+       (version=SSLv3 cipher=OTHER); Mon, 20 Feb 2012 23:52:57 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org, David Bremner <david@tethera.net>\r
+Subject: Re: [PATCH v2 2/2] emacs: support text/calendar mime type\r
+In-Reply-To:\r
+ <25a7cebf4b36e42f8232e34f86d7b5379d1d1959.1328798471.git.jani@nikula.org>\r
+References: <cover.1328719309.git.jani@nikula.org>\r
+       <25a7cebf4b36e42f8232e34f86d7b5379d1d1959.1328798471.git.jani@nikula.org>\r
+User-Agent: Notmuch/0.11.1+168~g25a7ceb (http://notmuchmail.org) Emacs/23.1.1\r
+       (i686-pc-linux-gnu)\r
+Date: Tue, 21 Feb 2012 07:52:54 +0000\r
+Message-ID: <87linwipwp.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQkRZEqRKCjTz4eUWLe/8Xfx1lLyHXEkCUX4HsgkSIB7HVaw0tdB5IR75bhNQbwBU7U0FSot\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: Tue, 21 Feb 2012 07:53:00 -0000\r
+\r
+On Thu,  9 Feb 2012 14:46:03 +0000, Jani Nikula <jani@nikula.org> wrote:\r
+> Replace text/x-vcalendar with text/calendar, while maintaining support\r
+> and backwards compatibility for text/x-vcalendar.\r
+\r
+David (B, not E), while 1/2 needs work, this 2/2 is independent and IMHO\r
+could go in.\r
+\r
+BR,\r
+Jani.\r
+\r
+\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