From: Mark Walters Date: Sun, 18 Aug 2013 12:14:33 +0000 (+0100) Subject: [PATCH v2 05/11] contrib: pick: add in to-message-window function X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=033ed57d67a43a66e09fd06e9540e0668545ed2b;p=notmuch-archives.git [PATCH v2 05/11] contrib: pick: add in to-message-window function --- diff --git a/f5/60d0fd7c5aef48847d31bf374a67e273f0c2c3 b/f5/60d0fd7c5aef48847d31bf374a67e273f0c2c3 new file mode 100644 index 000000000..66887daf4 --- /dev/null +++ b/f5/60d0fd7c5aef48847d31bf374a67e273f0c2c3 @@ -0,0 +1,93 @@ +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 C0620421161 + for ; Sun, 18 Aug 2013 05:15:18 -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 KkcynWGB9JHj for ; + Sun, 18 Aug 2013 05:15:13 -0700 (PDT) +Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com + [74.125.82.44]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 778B9421163 for ; Sun, 18 Aug 2013 05:14:55 -0700 + (PDT) +Received: by mail-wg0-f44.google.com with SMTP id l18so2649748wgh.11 + for ; Sun, 18 Aug 2013 05:14:53 -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:in-reply-to:references; + bh=4HeM+PEb9on8KlvcECJ3JoDY7fdmG16ZJmA4eu2aA2E=; + b=DC9VQdvvs1LrodUbfOWYVJTHr11Kpb3XDDBSfkOqD6XBXO0GIqT9d3v2m6CUZejz8l + FhrgUR4PNJLKiKG13vsyCEz7yuyK8Um+D+Go8z1qEcOiKT0NAJLUOGaxUlMTOs0JFu1k + wq5SPWWCnt6E2EPcDuH9DjmIZ9uh62FG01WwwtiMVr79UUhJedbMU1cPqJBTJn24kspq + qqCJqgadc3T8z7T9KMi6Cs5OitKCwnyWFhOVOsxqm8kIIKZswdlZRFWDS4nMgCPLMhlh + WSAo1oV6J47UgSxqjRHy01kaGTYtwaJr6Ta8EtDrD+EgAFKMYYCzH0OX1+cSxziLQU8o + 42JQ== +X-Received: by 10.180.208.49 with SMTP id mb17mr4494162wic.64.1376828092987; + Sun, 18 Aug 2013 05:14:52 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id a4sm9673393wik.11.1969.12.31.16.00.00 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sun, 18 Aug 2013 05:14:52 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH v2 05/11] contrib: pick: add in to-message-window function +Date: Sun, 18 Aug 2013 13:14:33 +0100 +Message-Id: <1376828079-21455-6-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1376828079-21455-1-git-send-email-markwalters1009@gmail.com> +References: <1376828079-21455-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: Sun, 18 Aug 2013 12:15:19 -0000 + +--- + contrib/notmuch-pick/notmuch-pick.el | 13 +++++++++++++ + 1 files changed, 13 insertions(+), 0 deletions(-) + +diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el +index 89e6d4b..d00d324 100644 +--- a/contrib/notmuch-pick/notmuch-pick.el ++++ b/contrib/notmuch-pick/notmuch-pick.el +@@ -187,6 +187,19 @@ if the user has loaded a different buffer in that window.") + (make-variable-buffer-local 'notmuch-pick-message-buffer) + (put 'notmuch-pick-message-buffer 'permanent-local t) + ++(defun notmuch-pick-to-message-pane (func) ++ "Execute FUNC in message pane. ++ ++This function returns a function (so can be used as a keybinding) ++which executes function FUNC in the message pane if it is ++open (if the message pane is closed it does nothing)." ++ `(lambda () ++ ,(concat "(In message pane) " (documentation func t)) ++ (interactive) ++ (when (window-live-p notmuch-pick-message-window) ++ (with-selected-window notmuch-pick-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 +