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 E7DA8431FD4 for ; Mon, 16 Jan 2012 12:12:10 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 t4wJKQFE4PNC for ; Mon, 16 Jan 2012 12:12:10 -0800 (PST) Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU [18.9.25.15]) by olra.theworths.org (Postfix) with ESMTP id 5D644431FB6 for ; Mon, 16 Jan 2012 12:12:10 -0800 (PST) X-AuditID: 1209190f-b7f8a6d000000914-af-4f1484995b3e Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP id AC.F6.02324.994841F4; Mon, 16 Jan 2012 15:12:09 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q0GKC8cE023611; Mon, 16 Jan 2012 15:12:09 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q0GKC7dQ005377 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Mon, 16 Jan 2012 15:12:08 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1RmsuN-00065p-3t; Mon, 16 Jan 2012 15:11:59 -0500 Date: Mon, 16 Jan 2012 15:11:59 -0500 From: Austin Clements To: Jameson Graef Rollins Subject: Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving Message-ID: <20120116201159.GD16740@mit.edu> References: <1326629796-11436-1-git-send-email-markwalters1009@gmail.com> <1326629796-11436-2-git-send-email-markwalters1009@gmail.com> <87wr8r5trv.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wr8r5trv.fsf@servo.finestructure.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42IR4hTV1p3ZIuJvcHCGicWefV4Wq+fyWFy/ OZPZgdnj7mkuj52z7rJ7PFt1izmAOYrLJiU1J7MstUjfLoErY8O/h8wFl4QquleuZWxg/MLb xcjJISFgInFs32dWCFtM4sK99WxdjFwcQgL7GCUWdL5hhnA2MEq8Or2LFcI5ySQxb/MVqLIl jBKTb3cyg/SzCKhK7H62mwnEZhPQkNi2fzkjiC0iYCbR8+UPmM0s4Cox48IusBphgXCJO3cW sIPYvAI6EvdOb4HasAVo6J9XjBAJQYmTM5+wQDRrSdz49xKomQPIlpZY/o8DJMwpYCpx/VIj WImogIrElJPb2CYwCs1C0j0LSfcshO4FjMyrGGVTcqt0cxMzc4pTk3WLkxPz8lKLdE30cjNL 9FJTSjcxggNdkn8H47eDSocYBTgYlXh4b3qL+AuxJpYVV+YeYpTkYFIS5Y1tBArxJeWnVGYk FmfEF5XmpBYfYpTgYFYS4RX0AcrxpiRWVqUW5cOkpDlYlMR51bTe+QkJpCeWpGanphakFsFk ZTg4lCR4fzQDNQoWpaanVqRl5pQgpJk4OEGG8wAN/wNSw1tckJhbnJkOkT/FqCglznsIJCEA ksgozYPrhSWiV4ziQK8I834AqeIBJjG47ldAg5mABue0CoEMLklESEk1MGa92ea13iiogn8D e+zvzb92d4RW8Olqr5Y6cO6vdZ/y0Zt7j1zzn3O2/KWk5tzVv/sUrhhH5V0N2yLC22LzPT7E tJrZZ42NWSO3x+4JUyWfpJ948Jl5V8m/ld/r3hpfOdgusMZ6aonNjlvVhgYadc9uzMhU+R53 9jCXhAPDlDn/K/2KOOd371NiKc5INNRiLipOBACs4oeCHwMAAA== Cc: notmuch@notmuchmail.org 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 20:12:11 -0000 Quoth Jameson Graef Rollins on Jan 16 at 11:31 am: > On Sun, 15 Jan 2012 12:16:36 +0000, Mark Walters wrote: > > Define a keymap for attachment buttons to allow multiple actions. > > Define 3 possible actions: > > save attachment: exactly as currently, > > view attachment: uses mailcap entry, > > view attachment with user chosen program > > Great improvement, Mark! Thanks for this. I've been wanting this kind > of functionality for a while, actually, and this is a really great > implementation. It works like a charm, and the code looks good to me, > modulo a couple small comments below. > > > 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. Jamie's defcustom doesn't work for me either (apparently it works even less for me than it does for Jamie), but the following works for me (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 (const :tag "Save part" notmuch-show-part-button-save) (const :tag "View part" notmuch-show-part-button-view) (const :tag "View interactively" notmuch-show-part-button-interactively-view)))