Re: [PATCH] emacs: add function to toggle display of all multipart/alternative parts
authorJameson Graef Rollins <jrollins@finestructure.net>
Thu, 9 Aug 2012 20:52:47 +0000 (13:52 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:01 +0000 (09:49 -0800)
2f/38240a7b0dc18ca42076e4ec3407a47bdff624 [new file with mode: 0644]

diff --git a/2f/38240a7b0dc18ca42076e4ec3407a47bdff624 b/2f/38240a7b0dc18ca42076e4ec3407a47bdff624
new file mode 100644 (file)
index 0000000..fb000eb
--- /dev/null
@@ -0,0 +1,115 @@
+Return-Path: <jrollins@finestructure.net>\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 B821D431FAF\r
+       for <notmuch@notmuchmail.org>; Thu,  9 Aug 2012 13:53:06 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.29\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] 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 IcUBgqHf7Yuq for <notmuch@notmuchmail.org>;\r
+       Thu,  9 Aug 2012 13:53:06 -0700 (PDT)\r
+Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
+       [131.215.239.19])\r
+       by olra.theworths.org (Postfix) with ESMTP id 41A80431FAE\r
+       for <notmuch@notmuchmail.org>; Thu,  9 Aug 2012 13:53:06 -0700 (PDT)\r
+Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
+       by fire-doxen-postvirus (Postfix) with ESMTP id 98A2D32802C;\r
+       Thu,  9 Aug 2012 13:53:01 -0700 (PDT)\r
+X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new\r
+Received: from finestructure.net (gwave-123.ligo.caltech.edu\r
+ [131.215.114.123])    (Authenticated sender: jrollins)        by fire-doxen-submit\r
+ (Postfix) with ESMTP id BD2FF328012;  Thu,  9 Aug 2012 13:52:57 -0700 (PDT)\r
+Received: by finestructure.net (Postfix, from userid 1000)\r
+       id 9CF492E8; Thu,  9 Aug 2012 13:52:57 -0700 (PDT)\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: Mark Walters <markwalters1009@gmail.com>, Jani Nikula <jani@nikula.org>,\r
+       notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] emacs: add function to toggle display of all\r
+       multipart/alternative parts\r
+In-Reply-To: <87pq8vokmp.fsf@qmul.ac.uk>\r
+References: <1339775751-18002-1-git-send-email-jani@nikula.org>\r
+       <87zk80gvmb.fsf@servo.finestructure.net>\r
+       <87pq8vokmp.fsf@qmul.ac.uk>\r
+User-Agent: Notmuch/0.13.2+137~ge34ed71 (http://notmuchmail.org) Emacs/23.4.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Thu, 09 Aug 2012 13:52:47 -0700\r
+Message-ID: <87ipcrvlcw.fsf@servo.finestructure.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha256; protocol="application/pgp-signature"\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 Aug 2012 20:53:06 -0000\r
+\r
+--=-=-=\r
+\r
+On Mon, Jun 18 2012, Mark Walters <markwalters1009@gmail.com> wrote:\r
+> I agree with this cycling approach but I think it needs to be per\r
+> message rather than per buffer. I attach a rather hacky attempt at this\r
+> below: on minimal testing it seems to work. But the lisp is really a bit\r
+> gross. In particular  I have no idea if I should be escaping the message\r
+> ids (so this could break in unfortunate/insecure ways)\r
+\r
+Thanks to broken Apple mail clients, I'm getting more and more messages\r
+that have attachments hidden in multipart/"alternatives" to text/plain\r
+parts.  So I would really like to revive this patch.\r
+\r
+I just tested it and it still applies to current master, and actually\r
+seems to work great.  'W' cycles through which part is displayed in the\r
+current message.  Pretty much exactly what I want.\r
+\r
+Mark seems to think this patch is less than ideal.  One issue is that\r
+it's trying to store a setting for a single displayed message in a\r
+variable of full buffer scope.  So he's storing a list of message ids\r
+there:\r
+\r
+> +(defvar notmuch-show-message-multipart/alternative nil)\r
+> +(make-variable-buffer-local 'notmuch-show-message-multipart/alternative)\r
+> +(put 'notmuch-show-message-multipart/alternative 'permanent-local t)\r
+...\r
+> +        (lax-plist-put notmuch-show-message-multipart/alternative (plist-get msg :id) 0)))\r
+\r
+I can see that might get a little hairy.  Can any elisp experts out\r
+there think of a better way to do this?  (actually, this is making me\r
+again want a show mode that only displays one message at a time (which I\r
+guess means I need to try pick again)).\r
+\r
+jamie.\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.12 (GNU/Linux)\r
+\r
+iQIcBAEBCAAGBQJQJCMfAAoJEO00zqvie6q8sk4P/3RPLH7RkOj1kag7HKQdfYgN\r
+RbkfPDmigCq3hOYuk4af4WkIMnHt6wK7Hi+vv/DoP1NPjp1azFu52MmrTRxYK01u\r
+OCbfzR4ov8Lt1KD5VOCert7krzZR8wMmsD2wrLiyhLtTfpb/s5YyFSJ1KLlodfPD\r
+Xn725Q86bQPFINYNCY8ClJRvgNPcXEpIgj0t/imXII7T3Tc5/PYhXGR93lnhkIfh\r
+4iIgr0qD3cP+ayYvuGJK8zwZW+DnTVMNaVNPv7XNgxfOdaern/o+MKYwKvdWZ2+q\r
+io1li+POi1RrLwyU18Uzads5z76woGq6sDs8u2oz4bXJc7xh45exAmmUfPjwmoRL\r
+pifyOLytd+RQvlJJ6yQ8PiUzc32TQ37NYcbIBOyVGfJ1eoYmbfH8qc9cH1e+TGXb\r
+XxhnsOSopHrPOhQ25/JrHO5As9gfcc6LdlX5E4e9oHcW71mLkcsnq3+R8BnAGnhD\r
+JtXgI8xEvoOMigs1WjmmYD4kXJDqnagqzH224Fi4al2SmNGuCcD4qIOqHXFZ50nY\r
+/Eoz2z+wjpCvPNLL576j7k9ri1ShnzYObDpjHI232KE0aXF0gJOA9tkj7NwiKRv5\r
+E8t6mQxuOGSb8JSk+ZNe2/+RM1MGRNDsHNUUwSNFpK37SDZri0Qj2QK6Etn/N6ph\r
+Gw8z7l9WE8Ynr7rR2mYC\r
+=7D/x\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r