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