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