--- /dev/null
+Return-Path: <m.walters@qmul.ac.uk>\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 D95BF429E3B\r
+ for <notmuch@notmuchmail.org>; Mon, 16 Jan 2012 13:44:54 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.401\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.401 tagged_above=-999 required=5\r
+ tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+ FREEMAIL_REPLY=2.499, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3]\r
+ 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 6nK2x43g60Vl for <notmuch@notmuchmail.org>;\r
+ Mon, 16 Jan 2012 13:44:54 -0800 (PST)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 15569429E35\r
+ for <notmuch@notmuchmail.org>; Mon, 16 Jan 2012 13:44:54 -0800 (PST)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+ by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1RmuMG-0008O8-Gy; Mon, 16 Jan 2012 21:44:52 +0000\r
+Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
+ helo=localhost)\r
+ by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1RmuMG-0001dM-96; Mon, 16 Jan 2012 21:44:52 +0000\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as\r
+ saving\r
+In-Reply-To: <87wr8r5trv.fsf@servo.finestructure.net>\r
+References: <1326629796-11436-1-git-send-email-markwalters1009@gmail.com>\r
+ <1326629796-11436-2-git-send-email-markwalters1009@gmail.com>\r
+ <87wr8r5trv.fsf@servo.finestructure.net>\r
+User-Agent: Notmuch/0.11~rc2+73~g1ea2b60 (http://notmuchmail.org) Emacs/23.3.1\r
+ (i486-pc-linux-gnu)\r
+Date: Mon, 16 Jan 2012 21:44:51 +0000\r
+Message-ID: <87lip7fhkc.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 94.192.233.223\r
+X-QM-SPAM-Info: Sender has good ham record. :)\r
+X-QM-Body-MD5: f3908cd95a58dcdd320142c460123eab (of first 20000 bytes)\r
+X-SpamAssassin-Score: -1.2\r
+X-SpamAssassin-SpamBar: -\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+ determine if it is\r
+ spam. We require at least 5.0 points to mark a message as spam.\r
+ This message scored -1.2 points.\r
+ Summary of the scoring: \r
+ * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
+ * medium trust\r
+ * [138.37.6.40 listed in list.dnswl.org]\r
+ * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+ provider * (markwalters1009[at]gmail.com)\r
+ * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
+ * domain\r
+ * 1.0 FREEMAIL_REPLY From and body contain different freemails\r
+ * 0.2 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\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, 16 Jan 2012 21:44:55 -0000\r
+\r
+\r
+(My apologies, owing to various errors on my part the patch has ended up\r
+in a separate thread:\r
+id:"1326749910-30437-1-git-send-email-markwalters1009@gmail.com")\r
+\r
+On Mon, 16 Jan 2012 11:31:16 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:\r
+> > Keymap on a button is: s for save, v for view and o for view with\r
+> > other program. Default (i.e. enter or mouse button) is save but is\r
+> > easily configurable e.g. set to view with\r
+> > (setq notmuch-show-part-button-default-action 'notmuch-show-part-view-action)\r
+> \r
+> Actually, this should really be a defcustom. Maybe something like this:\r
+> \r
+> (defcustom notmuch-show-part-button-default-action 'notmuch-show-part-button-save\r
+> "Default part header button action (on ENTER or mouse click)."\r
+> :group 'notmuch\r
+> :type '(choice (function :tag "Save part"\r
+> :value notmuch-show-part-button-save)\r
+> (function :tag "View part"\r
+> :value notmuch-show-part-button-view)\r
+> (function :tag "View interactively"\r
+> :value notmuch-show-part-button-interactively-view))\r
+> \r
+> Unfortunately this isn't quite working right, since it's not setting the\r
+> default properly, but if someone can help me figure out what I'm doing\r
+> wrong, I think this is at least the right idea.\r
+\r
+This did not work for me, nor did Austin's suggestion but the following\r
+does\r
++(defcustom notmuch-show-part-button-default-action 'notmuch-show-part-save-action\r
++ "Default part header button action (on ENTER or mouse click)."\r
++ :group 'notmuch\r
++ :type '(choice (const :tag "Save part"\r
++ notmuch-show-part-save-action)\r
++ (const :tag "View part"\r
++ notmuch-show-part-view-action)\r
++ (const :tag "View interactively"\r
++ notmuch-show-part-interactively-view-action)))\r
+\r
+I wonder if the "problem" comes from me doing things in a non-lispy\r
+fashion (I am completely new to lisp). Thus\r
+notmuch-show-part-button-default-action is a variable that gets passed\r
+around rather than a function.\r
+\r
+> There's a white space at the end of this line, which produces the\r
+> following git warning:\r
+> \r
+> Applying: Make buttons for attachments allow viewing as well as saving\r
+> /home/jrollins/src/notmuch/git/.git/rebase-apply/patch:96: trailing whitespace.\r
+> (defvar notmuch-show-part-button-default-action 'notmuch-show-part-save-action)\r
+> warning: 1 line adds whitespace errors.\r
+> \r
+> So if you go with (an improved version of) my defcustom suggestion above\r
+> you can kill two birds with one stone:\r
+\r
+Right I have fixed this as above and think the whitespace is ok now (it\r
+passes git diff --check). I intended to send the patch as a reply to\r
+this email but it has ended up here:\r
+id:"1326749910-30437-1-git-send-email-markwalters1009@gmail.com"\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r