Re: [PATCH] emacs: add function to toggle display of all multipart/alternative parts
authorJani Nikula <jani@nikula.org>
Tue, 19 Jun 2012 06:57:17 +0000 (06:57 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:47:43 +0000 (09:47 -0800)
28/3bc48aba4dd5debbf691b51d921da431911e92 [new file with mode: 0644]

diff --git a/28/3bc48aba4dd5debbf691b51d921da431911e92 b/28/3bc48aba4dd5debbf691b51d921da431911e92
new file mode 100644 (file)
index 0000000..e0a5d36
--- /dev/null
@@ -0,0 +1,108 @@
+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 123D1431FBC\r
+       for <notmuch@notmuchmail.org>; Mon, 18 Jun 2012 23:57:21 -0700 (PDT)\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 rjTsEoPguXfA for <notmuch@notmuchmail.org>;\r
+       Mon, 18 Jun 2012 23:57:20 -0700 (PDT)\r
+Received: from mail-gh0-f181.google.com (mail-gh0-f181.google.com\r
+       [209.85.160.181]) (using TLSv1 with cipher RC4-MD5 (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 72A7F431FAF\r
+       for <notmuch@notmuchmail.org>; Mon, 18 Jun 2012 23:57:20 -0700 (PDT)\r
+Received: by ghbz13 with SMTP id z13so5720770ghb.26\r
+       for <notmuch@notmuchmail.org>; Mon, 18 Jun 2012 23:57:20 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+       :mime-version:content-type:x-gm-message-state;\r
+       bh=VOKSaaw517yLSz6MMLvf8IrWemPzMg4Xkfv92QCMvRQ=;\r
+       b=oIBGGtM+SPmLFnHE8YkIZndrZpQu8AQPuAsHNpVwFEy9a7RttdLZlfrEtiUXrAj/ut\r
+       kloX5JJRUNfZBQ3Zlv+vLe6u0WDkJmFv99iRM9Dk7M7MYoClZsxnqWkVMRebxyOz5cDd\r
+       4gpFmEuCUYPkkUuUWfjjdCG2Ejs9oDPosDUtxompwI1Otn/UevZ/4XRYw9tehuB3FcM2\r
+       flXHVGbC3dtW/2VTOV9aMAw+9YyIOVeb9Zj8OrK9HsupnSacCX+B3Ic3Aiyhq9RgkEzl\r
+       HgZlxDfQl4TJrbyoQPnXALax6qHQhi/xdJhYulfF0NT6pfQ2FF+oCHmpHI92Hp//O+tZ\r
+       4a8w==\r
+Received: by 10.236.73.4 with SMTP id u4mr21277675yhd.78.1340089039973;\r
+       Mon, 18 Jun 2012 23:57:19 -0700 (PDT)\r
+Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3])\r
+       by mx.google.com with ESMTPS id j34sm33728870ani.14.2012.06.18.23.57.19\r
+       (version=SSLv3 cipher=OTHER); Mon, 18 Jun 2012 23:57:19 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
+ notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] emacs: add function to toggle display of all\r
+       multipart/alternative parts\r
+In-Reply-To: <87zk80gvmb.fsf@servo.finestructure.net>\r
+References: <1339775751-18002-1-git-send-email-jani@nikula.org>\r
+       <87zk80gvmb.fsf@servo.finestructure.net>\r
+User-Agent: Notmuch/0.13.2+60~g0f46448 (http://notmuchmail.org) Emacs/23.1.1\r
+       (i686-pc-linux-gnu)\r
+Date: Tue, 19 Jun 2012 06:57:17 +0000\r
+Message-ID: <87ehpbyek2.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQl+1NhA6AEEp+RbUIIj+DQfu7YdC5o7jbwp4Jsor+4KlWAnyYR6w/QnxJb3rz7a8BbY3LBj\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, 19 Jun 2012 06:57:21 -0000\r
+\r
+On Mon, 18 Jun 2012, Jameson Graef Rollins <jrollins@finestructure.net> wrote:\r
+> On Fri, Jun 15 2012, Jani Nikula <jani@nikula.org> wrote:\r
+>> Add function notmuch-show-toggle-multipart-alternative to make\r
+>> notmuch-show-all-multipart/alternative-parts buffer local, toggle its\r
+>> value in the buffer, and redisplay the thread with either all or\r
+>> preferred alternative parts expanded.\r
+>\r
+> This is a very cool feature.  I haven't looked closely at this but can't\r
+> this mechanism work the same as the other show-mode toggles, like crypto\r
+> or indenting?  I wouldn't think it would require any more extra variable\r
+> stuff than what is used for those other toggles.\r
+\r
+I don't know how I missed those - thanks for pointing them out to\r
+me. They seem to do the extra variable stuff at the top level, alongside\r
+the defvar, rather than in the toggle function like I do. I should\r
+rearrange this toggle to be in line with the others.\r
+\r
+> Also, the *really* sweet thing would be if the toggle actually cycled\r
+> through display of the alternatives, only displaying one at a time.\r
+> That would be very swank.\r
+\r
+It is easy to agree with that. At a glance, it looks like it needs a\r
+bunch more work than the simple toggle in this patch, though. One\r
+difficulty is choosing the parts to cycle, as we may have multiple\r
+messages with different sets of multipart/alternative in the same show\r
+buffer. And the cycle would be buffer local, not "message local".\r
+\r
+I think it would be possible to have show/hide buttons for the parts,\r
+and the buttons could add/remove the part type from a buffer local list\r
+of alternative parts to show, and then refresh view. But that too would\r
+affect all messages in the buffer, not just one part of one message.\r
+\r
+In short, with my limited elisp skills and even more limited time, I\r
+don't see a nice solution this. That doesn't say anything about the\r
+possible existence of a nice solution, though. ;)\r
+\r
+\r
+BR,\r
+Jani.\r