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 34E4F431FBC for ; Fri, 5 Jul 2013 11:12:30 -0700 (PDT) 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 8OPfR2gB3DEi for ; Fri, 5 Jul 2013 11:12:24 -0700 (PDT) Received: from mail-ea0-f176.google.com (mail-ea0-f176.google.com [209.85.215.176]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 3A4DA431FAE for ; Fri, 5 Jul 2013 11:11:48 -0700 (PDT) Received: by mail-ea0-f176.google.com with SMTP id z15so1604547ead.21 for ; Fri, 05 Jul 2013 11:11:47 -0700 (PDT) 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=pHBWks/KIZ8DUV2zp8eCEos3AE3UX5uw7q2VeEnGz3Q=; b=aRl0Kn2xHnQFFsmKwWRqStcR3Dnudej5/VhYYbd8JozAvQA70GGIpzGwVz00rXnEYy GZDcSDAj/Wi1KlOSQngQr0rW/hXce/gzhfWrJJBrV4q1fBScC0a+novkfdhYwr/wSx3R F3OUSrXyrYD81jkaODeW11MyyG1CGKJnsFfTzcu21ZQzDfZo+BnQy4r3ss9/ZRfeuwkd X7plL2y/q3F/ZTaa0gxu58Iyo3gy2nq2kas4TFBgW590rymg5CnsSFm+8GMp/6Zqozw6 Q3pWmtyNz+m8nfoNrsccRCEDZKNWO/5qcmhHT/jHcGZgb84uCb/D/0O/W7QvPGqlKi22 mDzg== X-Received: by 10.15.35.129 with SMTP id g1mr13628798eev.2.1373047907078; Fri, 05 Jul 2013 11:11:47 -0700 (PDT) Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) by mx.google.com with ESMTPSA id o5sm15984252eef.5.2013.07.05.11.11.46 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 05 Jul 2013 11:11:46 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH 08/11] contrib: pick: close window function Date: Fri, 5 Jul 2013 19:11:15 +0100 Message-Id: <1373047878-20822-9-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1373047878-20822-1-git-send-email-markwalters1009@gmail.com> References: <1373047878-20822-1-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: Fri, 05 Jul 2013 18:12:30 -0000 --- contrib/notmuch-pick/notmuch-pick.el | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el index 77b257d..4ad6ef6 100644 --- a/contrib/notmuch-pick/notmuch-pick.el +++ b/contrib/notmuch-pick/notmuch-pick.el @@ -208,6 +208,18 @@ This function does not give an error if there is no button." (let ((button (or button (button-at (point))))) (when button (button-activate button)))) +(defun notmuch-pick-close-message-pane-and (func) + "Close message pane and execute FUNC. + +This function returns a function (so can be used as a keybinding) +which closes the message pane if open and then executes function +FUNC." + `(lambda () + ,(concat "(Close message pane and) " (documentation func t)) + (interactive) + (notmuch-pick-close-message-window) + (funcall #',func))) + (defvar notmuch-pick-mode-map (let ((map (make-sparse-keymap))) (define-key map [mouse-1] 'notmuch-pick-show-message) -- 1.7.9.1