[PATCH v4 0/5] Use invisibility to toggle display of all parts including multipart
authorMark Walters <markwalters1009@gmail.com>
Mon, 17 Dec 2012 21:54:42 +0000 (21:54 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:52:29 +0000 (09:52 -0800)
70/02d44dbdeec581a346f9c53250b080e6096f5d [new file with mode: 0644]

diff --git a/70/02d44dbdeec581a346f9c53250b080e6096f5d b/70/02d44dbdeec581a346f9c53250b080e6096f5d
new file mode 100644 (file)
index 0000000..8dd35eb
--- /dev/null
@@ -0,0 +1,115 @@
+Return-Path: <markwalters1009@gmail.com>\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 421D8431FB6\r
+       for <notmuch@notmuchmail.org>; Mon, 17 Dec 2012 13:55:01 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.7\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.7 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       FREEMAIL_REPLY=2.499, 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 gfeJ-RxV94rj for <notmuch@notmuchmail.org>;\r
+       Mon, 17 Dec 2012 13:55:00 -0800 (PST)\r
+Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
+       [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 58F91431FAE\r
+       for <notmuch@notmuchmail.org>; Mon, 17 Dec 2012 13:55:00 -0800 (PST)\r
+Received: by mail-we0-f181.google.com with SMTP id t11so2875994wey.26\r
+       for <notmuch@notmuchmail.org>; Mon, 17 Dec 2012 13:54:57 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer;\r
+       bh=6BRPqmAXvnnPrCdX9vUsEbm2LRR7pnwW/MCZ+baktqc=;\r
+       b=NUlo7n1wh0hNnUHozrn6JzLLBYC30k6+AU4P/3m7xqXCpJ2VQw4tSOg0v2uLi13H8v\r
+       UphxIS4HpNcTtM5PGLLf7J7/1aQf+C0L0skf98ozfkpd3bOgiy489HbqVp0/ACC+jw+A\r
+       hdknCNAQW5U/oq4l5MpNB2GVp3wLHTlDKqy8CjyqQ+KBYLFpFgggIy6l94ZHGGyH9WMw\r
+       lSPsTXqLfb1Lc7BZGIifXJ8mVY1ED51JFOFpwjsxzZ/dVHa+1gW3+89UsI9G6iE2zFgx\r
+       OppeIdLJEURQ4F/jqjHQclsWoyuRvFq5OqbeJadHXx2JYgBn5p6TSsYvn3fhrykbNmrL\r
+       5V+w==\r
+Received: by 10.194.235.100 with SMTP id ul4mr20109446wjc.7.1355781297838;\r
+       Mon, 17 Dec 2012 13:54:57 -0800 (PST)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+       by mx.google.com with ESMTPS id cf6sm14591602wib.3.2012.12.17.13.54.55\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 17 Dec 2012 13:54:56 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v4 0/5] Use invisibility to toggle display of all parts\r
+       including multipart\r
+Date: Mon, 17 Dec 2012 21:54:42 +0000\r
+Message-Id: <1355781287-6010-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\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: Mon, 17 Dec 2012 21:55:01 -0000\r
+\r
+This is version 4 of this series (previous version at\r
+id:1355559338-14313-1-git-send-email-markwalters1009@gmail.com).\r
+\r
+The only change should be a bugfix which, for reasons I don't\r
+understand, only causes a problem on emacs 24. The problem is that the\r
+part invisibility code looks for a part button at the start of the\r
+region. This gets confused if there is a part with no part button\r
+(this is the case for the first part if it is text/plain) and the part\r
+starts with a button (as can happen if the message starts with the\r
+reply as in the first test in test/emacs-show).\r
+\r
+This checks that the button is a part button before creating the part\r
+overlay.\r
+\r
+The diff is below the diffstat. \r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+\r
+\r
+Mark Walters (5):\r
+  emacs: show: modify insert-part-header to save the button text\r
+  emacs: show: add overlays for each part\r
+  emacs: show: add invisibility button action\r
+  emacs: wash: fix fake-diff part to include msg parameter\r
+  emacs: show: set default show-all-multipart/alternatives to nil\r
+\r
+ emacs/notmuch-show.el |  115 ++++++++++++++++++++++++++++++++++++++-----------\r
+ emacs/notmuch-wash.el |    2 +-\r
+ 2 files changed, 90 insertions(+), 27 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 5ca6fe2..3816e32 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -865,8 +865,10 @@ message at DEPTH in the current thread."\r
+   (let* ((button (button-at beg))\r
+        (part-beg (and button (1+ (button-end button)))))\r
\r
+-    ;; If the part contains no text we do not make it toggleable.\r
+-    (when (and button (/= part-beg end))\r
++    ;; If the part contains no text we do not make it toggleable. We\r
++    ;; also need to check that the button is a genuine part button not\r
++    ;; a notmuch-wash button.\r
++    (when (and button (/= part-beg end) (button-get button :base-label))\r
+       (let ((base-label (button-get button :base-label))\r
+           (overlay (make-overlay part-beg end))\r
+           (message-invis-spec (plist-get msg :message-invis-spec))\r
+-- \r
+1.7.9.1\r
+\r
+\r