--- /dev/null
+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 E98AF431FBF\r
+ for <notmuch@notmuchmail.org>; Sun, 2 Dec 2012 16:59:01 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 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
+ 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 K3UU2YS+kOiV for <notmuch@notmuchmail.org>;\r
+ Sun, 2 Dec 2012 16:59:00 -0800 (PST)\r
+Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com\r
+ [209.85.212.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id C76E4431FC2\r
+ for <notmuch@notmuchmail.org>; Sun, 2 Dec 2012 16:58:54 -0800 (PST)\r
+Received: by mail-wi0-f175.google.com with SMTP id hm11so787414wib.2\r
+ for <notmuch@notmuchmail.org>; Sun, 02 Dec 2012 16:58:53 -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:in-reply-to:references;\r
+ bh=HdN992WXFL0vFdWmuse2Rzc4MGBvDeSS60jD4jI8RPA=;\r
+ b=t7+6hvKDHok4RQz5Zz5qHni5c4N5JZUUoruVBMgH3g3OmUwAICkCONKDbPc6MISrpk\r
+ r+EtWIFfCr+4GBH7ZTpDYc9vqaByEY/vTreh+3CZPjhc46OnMqgnGErbP1i++j36NNL+\r
+ DciJSYUMQGK90YVPx7EpWKYocSLYpinl7eF5fQZ+v61INOpu8p4PKlT+wg4wsXwmb5th\r
+ 8DPEBWLq5m4YOwdeZ1qT1/92Z8X7DFyI51FetyhgqVEis5a0Sbzw188uaqTeZ3FUm5Uq\r
+ kZMyZTnZ++JB8nmld8lguGbLP18siphVfMBzyNCfbCTXRaarErvhpt1jho26eB0hzAgX\r
+ AFKg==\r
+Received: by 10.216.209.130 with SMTP id s2mr2933166weo.86.1354496333581;\r
+ Sun, 02 Dec 2012 16:58:53 -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 d9sm9334493wiw.0.2012.12.02.16.58.52\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Sun, 02 Dec 2012 16:58:52 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 3/3] emacs: show make default part button toggle view when\r
+ sensible\r
+Date: Mon, 3 Dec 2012 00:58:37 +0000\r
+Message-Id: <1354496317-24564-4-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1354496317-24564-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1354496317-24564-1-git-send-email-markwalters1009@gmail.com>\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, 03 Dec 2012 00:59:02 -0000\r
+\r
+When the part has no filename it is reasonable to guess it is not a\r
+part for saving or other normal attachment things so default to\r
+toggling viewability. Possibly this should be customisable but the 4\r
+main actions (save, view, open with, toggle viewability) all force\r
+that particular action so it is easy for the user to get round if we\r
+do make a mistake.\r
+---\r
+ emacs/notmuch-show.el | 7 ++++++-\r
+ 1 files changed, 6 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 9a33d28..c8c1657 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -1988,7 +1988,12 @@ the user (see `notmuch-show-stash-mlarchive-link-alist')."\r
+ \r
+ (defun notmuch-show-part-button-default (&optional button)\r
+ (interactive)\r
+- (notmuch-show-part-button-internal button notmuch-show-part-button-default-action))\r
++ (let* ((button (or button (button-at (point))))\r
++ (filename (and button (button-get button :notmuch-filename)))\r
++ (handler (if filename\r
++ notmuch-show-part-button-default-action\r
++ #'notmuch-show-internally-show-part)))\r
++ (notmuch-show-part-button-internal button handler)))\r
+ \r
+ (defun notmuch-show-part-button-save (&optional button)\r
+ (interactive)\r
+-- \r
+1.7.9.1\r
+\r