Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 66 / 9fb74960831d9420eb891481741a6a2e9cb92c
1 Return-Path: <markwalters1009@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 5E4AA431FC2\r
6         for <notmuch@notmuchmail.org>; Fri,  5 Jul 2013 11:11:46 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id KBeQgltsSpUO for <notmuch@notmuchmail.org>;\r
18         Fri,  5 Jul 2013 11:11:40 -0700 (PDT)\r
19 Received: from mail-ea0-f180.google.com (mail-ea0-f180.google.com\r
20         [209.85.215.180]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 89558431FAE\r
23         for <notmuch@notmuchmail.org>; Fri,  5 Jul 2013 11:11:35 -0700 (PDT)\r
24 Received: by mail-ea0-f180.google.com with SMTP id k10so1638361eaj.25\r
25         for <notmuch@notmuchmail.org>; Fri, 05 Jul 2013 11:11:34 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
28         bh=o4/hlSSp0f3JwFkmee7H5vDLLetaaaieKVFRt9JSZrA=;\r
29         b=GHu7r2vrZcCek3m1JZnBei66bvjqBvf/5c1qj5rD97/qZTSw61hJvTcmyqKOwzxOBf\r
30         kQ+99RNrCgv2hpATNdYcopDtNifgTn7rp0qNnRnK6G0bQpjeFjPyGjxavG3ha0DUpQj8\r
31         gnoBBTxXuwAVJppBoy+7ngEa6nE7dg1nZlzT2/E897zZsHOHRH8js+9WemJ+8kJHboWi\r
32         p3S+6t+ER/ximv5m6P7F02IKCxupwEHKQtXs6tTZyFN2YEB6E4xV5Wics5zBdI52BXwm\r
33         11FFbAdVjdCZXWctryggya8C5Z9uUzH26F5wEmzZwBi7C1IYtVhhqtyxDiRxeMGk2P0V\r
34         iVAw==\r
35 X-Received: by 10.14.48.77 with SMTP id u53mr13160639eeb.154.1373047894391;\r
36         Fri, 05 Jul 2013 11:11:34 -0700 (PDT)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPSA id\r
39         n42sm15853841eeh.15.2013.07.05.11.11.33 for <multiple recipients>\r
40         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
41         Fri, 05 Jul 2013 11:11:33 -0700 (PDT)\r
42 From: Mark Walters <markwalters1009@gmail.com>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH 05/11] contrib: pick: add in to-message-window function\r
45 Date: Fri,  5 Jul 2013 19:11:12 +0100\r
46 Message-Id: <1373047878-20822-6-git-send-email-markwalters1009@gmail.com>\r
47 X-Mailer: git-send-email 1.7.9.1\r
48 In-Reply-To: <1373047878-20822-1-git-send-email-markwalters1009@gmail.com>\r
49 References: <1373047878-20822-1-git-send-email-markwalters1009@gmail.com>\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Fri, 05 Jul 2013 18:11:46 -0000\r
63 \r
64 This would be very simple but we want to get a useful doc string (so\r
65 we get useful help messages).\r
66 \r
67 We use this for tabbing between and activate buttons in the message\r
68 pane but it is trivial for pick or the user to link in other\r
69 functions. For example\r
70 \r
71 (define-key map "h" (notmuch-pick-to-message-pane #'notmuch-show-toggle-visibility-headers))\r
72 \r
73 Other plausible functions for linking are\r
74 \r
75 notmuch-show-toggle-elide-non-matching\r
76 notmuch-show-toggle-process-crypto\r
77 notmuch-show-toggle-thread-indentation\r
78 toggle-truncate-lines\r
79 ---\r
80  contrib/notmuch-pick/notmuch-pick.el |   13 +++++++++++++\r
81  1 files changed, 13 insertions(+), 0 deletions(-)\r
82 \r
83 diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
84 index 7313100..8251b35 100644\r
85 --- a/contrib/notmuch-pick/notmuch-pick.el\r
86 +++ b/contrib/notmuch-pick/notmuch-pick.el\r
87 @@ -187,6 +187,19 @@ if the user has loaded a different buffer in that window.")\r
88  (make-variable-buffer-local 'notmuch-pick-message-buffer)\r
89  (put 'notmuch-pick-message-buffer 'permanent-local t)\r
90  \r
91 +(defun notmuch-pick-to-message-pane (func)\r
92 +  "Execute FUNC in message pane.\r
93 +\r
94 +This function returns a function (so can be used as a keybinding)\r
95 +which executes function FUNC in the message pane if it is\r
96 +open (if the message pane is closed it does nothing)."\r
97 +  `(lambda ()\r
98 +      ,(concat "(In message pane) " (documentation func t))\r
99 +     (interactive)\r
100 +     (when (window-live-p notmuch-pick-message-window)\r
101 +       (with-selected-window notmuch-pick-message-window\r
102 +        (funcall #',func)))))\r
103 +\r
104  (defvar notmuch-pick-mode-map\r
105    (let ((map (make-sparse-keymap)))\r
106      (define-key map [mouse-1] 'notmuch-pick-show-message)\r
107 -- \r
108 1.7.9.1\r
109 \r