Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 5a / 1ace23a217a08fa3851fc4c9b9b755c786a7a4
1 Return-Path: <uli@scholler.net>\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 arlo.cworth.org (Postfix) with ESMTP id 0B12A6DE0FF8\r
6  for <notmuch@notmuchmail.org>; Wed,  2 Sep 2015 15:07:37 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12  autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id qtExqUGSYogw for <notmuch@notmuchmail.org>;\r
16  Wed,  2 Sep 2015 15:07:34 -0700 (PDT)\r
17 X-Greylist: delayed 501 seconds by postgrey-1.35 at arlo;\r
18  Wed, 02 Sep 2015 15:07:34 PDT\r
19 Received: from idun.ftbfs.de (idun.ftbfs.de [78.47.2.106])\r
20  by arlo.cworth.org (Postfix) with ESMTP id AFD2F6DE0FB1\r
21  for <notmuch@notmuchmail.org>; Wed,  2 Sep 2015 15:07:34 -0700 (PDT)\r
22 Received: from localhost (localidun [10.0.0.76])\r
23  by idun.ftbfs.de (Postfix) with ESMTP id B16B9EC379\r
24  for <notmuch@notmuchmail.org>; Wed,  2 Sep 2015 23:59:09 +0200 (CEST)\r
25 Received: from localhost ([10.0.0.76])\r
26  by localhost (idun.ftbfs.de [10.0.0.76]) (amavisd-new, port 2525)\r
27  with SMTP id 14779-18 for <notmuch@notmuchmail.org>;\r
28  Wed, 2 Sep 2015 23:58:10 +0200 (CEST)\r
29 Received: from saga.ftbfs.de (unknown [10.0.0.77])\r
30  by idun.ftbfs.de (Postfix) with ESMTP id EB221EC377;\r
31  Wed,  2 Sep 2015 23:58:07 +0200 (CEST)\r
32 Received: by saga.ftbfs.de (Postfix, from userid 10)\r
33  id 365231AC0A5; Wed,  2 Sep 2015 23:58:07 +0200 (CEST)\r
34 Received: by tardis.scholler.priv (Postfix, from userid 1000)\r
35  id 3019B104; Wed,  2 Sep 2015 23:57:29 +0200 (CEST)\r
36 From: Uli Scholler <uli@scholler.net>\r
37 To: notmuch@notmuchmail.org\r
38 Subject: [PATCH] emacs: wrap current search in parens when filtering\r
39 Date: Wed,  2 Sep 2015 23:57:14 +0200\r
40 Message-Id: <1441231034-9413-1-git-send-email-uli@scholler.net>\r
41 X-Mailer: git-send-email 2.1.4\r
42 X-Virus-Scanned: at idun.ftbfs.de with p-bank undefined\r
43 X-Mailman-Approved-At: Thu, 03 Sep 2015 00:24:54 -0700\r
44 Cc: Uli Scholler <uli@scholler.net>\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.18\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49  <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Wed, 02 Sep 2015 22:07:37 -0000\r
58 \r
59 When filtering the current search further with notmuch-search-filter,\r
60 wrap the current search in parens.\r
61 \r
62 This fixes unexpected behavior when the current search is\r
63 complex (like "(tag:this and date:one_week_ago..) or tag:that").\r
64 ---\r
65  emacs/notmuch.el | 2 +-\r
66  1 file changed, 1 insertion(+), 1 deletion(-)\r
67 \r
68 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
69 index 5284e77..a98ec96 100644\r
70 --- a/emacs/notmuch.el\r
71 +++ b/emacs/notmuch.el\r
72 @@ -989,7 +989,7 @@ current search results AND the additional query string provided."\r
73                          query)))\r
74      (notmuch-search (if (string= notmuch-search-query-string "*")\r
75                         grouped-query\r
76 -                     (concat notmuch-search-query-string " and " grouped-query)) notmuch-search-oldest-first)))\r
77 +                     (concat "(" notmuch-search-query-string ") and " grouped-query)) notmuch-search-oldest-first)))\r
78  \r
79  (defun notmuch-search-filter-by-tag (tag)\r
80    "Filter the current search results based on a single tag.\r
81 -- \r
82 2.1.4\r
83 \r
84 \r