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 ECCED431FB6 for ; Wed, 5 Dec 2012 01:41:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.201 X-Spam-Level: X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, 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 uL1ACpaykkKq for ; Wed, 5 Dec 2012 01:41:25 -0800 (PST) Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6249C431FAE for ; Wed, 5 Dec 2012 01:41:25 -0800 (PST) Received: by mail-wi0-f175.google.com with SMTP id hm11so1355659wib.2 for ; Wed, 05 Dec 2012 01:41:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=PKvCYjag89RxiAXAkKp8mCrdOdYG8Wa4Nn+9GMYutM4=; b=AGtHjuLNlmWwUJy3fg2437qUMVfdST9mDDlYfQWeKvVOJHtPp3cwRZGzZ25xkc8reT w1e4rbCPXQjJJ5BYh8GaNfpoG5fLFV5aludk+bVeKImkNGtvWhzg64P4AfVz87gt76/q 1mMAEyX5KFM6WnjSng7fEmeSCTOYXEmIbqEVvNFIwd2Gd3Y29wE9ssd/Lf8Gf/2NxYvP mOBh2ukXB9+RxNIxuqEzcIZ1MOTkesW3sYL+F+hl+NRakBtkPiCPH6vsutGAjTbDFv8e wha7HhjKxaenb6bWxqKFuzV/Ioo/gS/3Ju+dBZiuZHqdyNvJiVn1dBkEaEuE19h90gbj 9lEA== Received: by 10.180.106.34 with SMTP id gr2mr1993203wib.18.1354700484282; Wed, 05 Dec 2012 01:41:24 -0800 (PST) Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) by mx.google.com with ESMTPS id w5sm5611252wiz.10.2012.12.05.01.41.22 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Dec 2012 01:41:23 -0800 (PST) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH] emacs: show: make RET always toggle parts where plausible Date: Wed, 5 Dec 2012 09:41:20 +0000 Message-Id: <1354700480-5170-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1354663662-20524-4-git-send-email-markwalters1009@gmail.com> References: <1354663662-20524-4-git-send-email-markwalters1009@gmail.com> 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: Wed, 05 Dec 2012 09:41:26 -0000 This makes RET toggle the visibility of any part which has a component that can be displayed in the buffer. This included text parts (plain/ html/ x-tex etc) and images. Parts which cannot be displayed (eg pdf) RET acts as before and saves/views etc. Definite actions can always be accessed with s,v and o (eg v to view a text/html part in a browser). --- This is a slight tweak at Jani's suggestion on irc. Applies on top of the previous series. emacs/notmuch-show.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index a4daff8..e319e5c 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -2028,7 +2028,7 @@ the user (see `notmuch-show-stash-mlarchive-link-alist')." (defun notmuch-show-part-button-default (&optional button) (interactive) (let ((button (or button (button-at (point))))) - (if (invisible-p (button-get button 'invisibility-spec)) + (if (button-get button 'invisibility-spec) (notmuch-show-toggle-invisible-part-action button) (notmuch-show-part-button-internal button notmuch-show-part-button-default-action)))) -- 1.7.9.1