Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 25 / 5e9b020275866def92f2df5df9b7bb8e9bd8da
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 49C8C431FB6\r
6         for <notmuch@notmuchmail.org>; Sat,  8 Dec 2012 04:44:35 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 2.7\r
10 X-Spam-Level: **\r
11 X-Spam-Status: No, score=2.7 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         FREEMAIL_REPLY=2.499, 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 PNblZuD5BeQU for <notmuch@notmuchmail.org>;\r
18         Sat,  8 Dec 2012 04:44:34 -0800 (PST)\r
19 Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com\r
20         [209.85.212.175]) (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 A8EA8431FAE\r
23         for <notmuch@notmuchmail.org>; Sat,  8 Dec 2012 04:44:34 -0800 (PST)\r
24 Received: by mail-wi0-f175.google.com with SMTP id hm11so190829wib.2\r
25         for <notmuch@notmuchmail.org>; Sat, 08 Dec 2012 04:44:33 -0800 (PST)\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;\r
28         bh=PzmNXBgBtx+Kl8rgpsIjdngHlrjp9L2M6AUrIHpR2As=;\r
29         b=xOopKgPOI9oL9E6OaUpLfn5tnaz99dN8wKJzFc37+G24BHVeWUDRje07AvGD84fHnW\r
30         phgx/Th+mApqjkKoNGamXLPu8I0CeFlvqw/caUdkgg4YYM6V/74GvrVjbsHMOQhorwAL\r
31         ZviDoGDBT/xrnseT92m0yVnQ531VBpCHypIZzHDHEhRuCG+WNym47B0BFRWPcvA1P0xU\r
32         S/VHji/0A6vaDK4g0CLaJR0obGI/MN+i1GwaQ0tmUhay2d01ARVdxQ/+yoxVgnOhg9qI\r
33         0StZT96UG8KXfZzE75PTZIAgFYKAhqhHpe4LzaturhfOHchq/49VyIlwJ5M15E4b1jyt\r
34         Y3rw==\r
35 Received: by 10.180.87.225 with SMTP id bb1mr2907782wib.20.1354970673405;\r
36         Sat, 08 Dec 2012 04:44:33 -0800 (PST)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPS id bd7sm2403136wib.8.2012.12.08.04.44.31\r
39         (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Sat, 08 Dec 2012 04:44:32 -0800 (PST)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH] contrib: pick: slightly tweak running search and pick from\r
44         pick buffer\r
45 Date: Sat,  8 Dec 2012 12:44:34 +0000\r
46 Message-Id: <1354970674-18136-1-git-send-email-markwalters1009@gmail.com>\r
47 X-Mailer: git-send-email 1.7.9.1\r
48 X-BeenThere: notmuch@notmuchmail.org\r
49 X-Mailman-Version: 2.1.13\r
50 Precedence: list\r
51 List-Id: "Use and development of the notmuch mail system."\r
52         <notmuch.notmuchmail.org>\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
56 List-Post: <mailto:notmuch@notmuchmail.org>\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
60 X-List-Received-Date: Sat, 08 Dec 2012 12:44:35 -0000\r
61 \r
62 Previously running search or pick from the pick buffer did not close\r
63 the message pane (if open). This meant that then new search ends up in\r
64 a very small window. Fix this so that the message pane is\r
65 shut. However, make it so that the pane is shut after the search\r
66 string is entered in case the user is basing the search on something\r
67 in the current message.\r
68 ---\r
69 \r
70 This is essentially an independent patch but the context clashes with\r
71 id:1354970494-18050-1-git-send-email-markwalters1009@gmail.com so that\r
72 should be applied first for testing.\r
73 \r
74 If there is any problem with the first patch I can trivially rebase\r
75 this one.\r
76 \r
77 Best wishes\r
78 \r
79 Mark\r
80 \r
81 \r
82  contrib/notmuch-pick/notmuch-pick.el |   23 +++++++++++++++++++++--\r
83  1 files changed, 21 insertions(+), 2 deletions(-)\r
84 \r
85 diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
86 index 36587a6..b474231 100644\r
87 --- a/contrib/notmuch-pick/notmuch-pick.el\r
88 +++ b/contrib/notmuch-pick/notmuch-pick.el\r
89 @@ -175,8 +175,8 @@\r
90      (define-key map "?" 'notmuch-help)\r
91      (define-key map "a" 'notmuch-pick-archive-message-then-next)\r
92      (define-key map "=" 'notmuch-pick-refresh-view)\r
93 -    (define-key map "s" 'notmuch-search)\r
94 -    (define-key map "z" 'notmuch-pick)\r
95 +    (define-key map "s" 'notmuch-pick-to-search)\r
96 +    (define-key map "z" 'notmuch-pick-to-pick)\r
97      (define-key map "m" 'notmuch-pick-new-mail)\r
98      (define-key map "f" 'notmuch-pick-forward-message)\r
99      (define-key map "r" 'notmuch-pick-reply-sender)\r
100 @@ -289,6 +289,25 @@ Does NOT change the database."\r
101    (interactive)\r
102    (notmuch-pick-tag "-"))\r
103  \r
104 +;; The next two functions close the message window before searching or\r
105 +;; picking but they do so after the user has entered the query (in\r
106 +;; case the user was basing the query on something in the message\r
107 +;; window).\r
108 +\r
109 +(defun notmuch-pick-to-search ()\r
110 +  "Run \"notmuch search\" with the given `query' and display results."\r
111 +  (interactive)\r
112 +  (let ((query (notmuch-read-query "Notmuch search: ")))\r
113 +    (notmuch-pick-close-message-window)\r
114 +    (notmuch-search query)))\r
115 +\r
116 +(defun notmuch-pick-to-pick ()\r
117 +  "Run a query and display results in experimental notmuch-pick mode"\r
118 +  (interactive)\r
119 +  (let ((query (notmuch-read-query "Notmuch pick: ")))\r
120 +    (notmuch-pick-close-message-window)\r
121 +    (notmuch-pick query)))\r
122 +\r
123  ;; This function should be in notmuch-hello.el but we are trying to\r
124  ;; minimise impact on the rest of the codebase.\r
125  (defun notmuch-pick-from-hello (&optional search)\r
126 -- \r
127 1.7.9.1\r
128 \r