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 0E946431FAF for ; Wed, 8 Feb 2012 09:05:49 -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 uZxzYQZkK3Vd for ; Wed, 8 Feb 2012 09:05:48 -0800 (PST) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 23F15431FAE for ; Wed, 8 Feb 2012 09:05:48 -0800 (PST) Received: by wibhi8 with SMTP id hi8so601230wib.26 for ; Wed, 08 Feb 2012 09:05:47 -0800 (PST) Received: by 10.216.138.209 with SMTP id a59mr7172672wej.11.1328720747040; Wed, 08 Feb 2012 09:05:47 -0800 (PST) Received: from hotblack-desiato.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25]) by mx.google.com with ESMTPS id l8sm4761454wiy.5.2012.02.08.09.05.44 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Feb 2012 09:05:45 -0800 (PST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id A483BA0A98; Wed, 8 Feb 2012 17:05:43 +0000 (GMT) To: Jani Nikula , notmuch@notmuchmail.org Subject: Re: [PATCH 1/2] emacs: support defining a list of alternative parts to show In-Reply-To: References: User-Agent: Notmuch/0.11.1+166~g546cb24 (http://notmuchmail.org) Emacs/24.0.92.1 (x86_64-pc-linux-gnu) From: David Edmondson Date: Wed, 08 Feb 2012 17:05:39 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Gm-Message-State: ALoCoQkQugmk8UYMynOLm/0fKKU7ktGA3yt2mgzYT1A1CwO/3uXr5kMiVn7ZJG9/1dtoyph4P1yr 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 17:05:49 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 8 Feb 2012 16:55:15 +0000, Jani Nikula wrote: > Make notmuch-show-all-multipart/alternative-parts accept a list of > multipart/alternative types to show in addition to the preferred > types. This allows the user to force display some alternative part > types while normally showing just the preferred ones. >=20 > Signed-off-by: Jani Nikula > --- > emacs/notmuch-show.el | 8 ++++++-- > 1 files changed, 6 insertions(+), 2 deletions(-) >=20 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el > index faa9f9b..1340380 100644 > --- a/emacs/notmuch-show.el > +++ b/emacs/notmuch-show.el > @@ -97,7 +97,9 @@ any given message." > ;; Mostly useful for debugging. > (defcustom notmuch-show-all-multipart/alternative-parts t > "Should all parts of multipart/alternative parts be shown?" > - :type 'boolean > + :type '(choice (const :tag "Show all" t) > + (const :tag "Show preferred" nil) > + (repeat :tag "Show preferred and custom" string)) > :group 'notmuch-show) It would be convenient if this was a list of regexps. > (defcustom notmuch-show-indent-messages-width 1 > @@ -513,7 +515,9 @@ current buffer, if possible." > ;; should be chosen if there are more than one that match? > (mapc (lambda (inner-part) > (let ((inner-type (plist-get inner-part :content-type))) > - (if (or notmuch-show-all-multipart/alternative-parts > + (if (or (equal notmuch-show-all-multipart/alternative-parts t) > + (member inner-type > + notmuch-show-all-multipart/alternative-parts) > (string=3D chosen-type inner-type)) > (notmuch-show-insert-bodypart msg inner-part depth) > (notmuch-show-insert-part-header (plist-get inner-part :id) inner-type= inner-type nil " (not shown)")))) > --=20 > 1.7.1 >=20 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8yq2MACgkQaezQq/BJZRajrQCeMK9QtMd4s5nKpcPleoKB/y6r nwUAn3A4etEY/XCwUiIC3bHknCPkSLLM =f2D7 -----END PGP SIGNATURE----- --=-=-=--