Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 46 / 98991dd9e89b3c9115ca7bf6231bb863857491
1 Return-Path: <sojkam1@fel.cvut.cz>\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 02E01431FC7\r
6         for <notmuch@notmuchmail.org>; Sun, 14 Dec 2014 06:25:02 -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: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id rOqkO1S-asPJ for <notmuch@notmuchmail.org>;\r
16         Sun, 14 Dec 2014 06:24:58 -0800 (PST)\r
17 Received: from smtp.nextra.cz (smtp.nextra.cz [212.65.193.3])\r
18         by olra.theworths.org (Postfix) with ESMTP id 83057431FB6\r
19         for <notmuch@notmuchmail.org>; Sun, 14 Dec 2014 06:24:58 -0800 (PST)\r
20 Received: from resox (unknown [213.29.198.144])\r
21         by smtp.nextra.cz (Postfix) with ESMTP id BA27A1903B;\r
22         Sun, 14 Dec 2014 15:24:53 +0100 (CET)\r
23 Received: from wsh by resox with local (Exim 4.84)\r
24         (envelope-from <sojkam1@fel.cvut.cz>)\r
25         id 1Y0A6P-0000ti-Fw; Sun, 14 Dec 2014 15:24:53 +0100\r
26 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
27 To: Lele Gaifax <lele@metapensiero.it>, notmuch@notmuchmail.org\r
28 Subject: Re: New "notmuch address" command\r
29 In-Reply-To: <874mt19iho.fsf@nautilus.nautilus>\r
30 References: <878uid9qjl.fsf@nautilus.nautilus>\r
31  <87ppbpf8yy.fsf@steelpick.2x.cz>       <874mt19iho.fsf@nautilus.nautilus>\r
32 User-Agent: Notmuch/0.19~rc1+7~gdb5e73a (http://notmuchmail.org) Emacs/24.4.1\r
33         (x86_64-pc-linux-gnu)\r
34 Date: Sun, 14 Dec 2014 15:24:53 +0100\r
35 Message-ID: <87388inway.fsf@resox.2x.cz>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain; charset=utf-8\r
38 Content-Transfer-Encoding: quoted-printable\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Sun, 14 Dec 2014 14:25:02 -0000\r
52 \r
53 On P=C3=A1, pro 12 2014, Lele Gaifax wrote:\r
54 > Michal Sojka <sojkam1@fel.cvut.cz> writes:\r
55 >\r
56 >>> An (almost) equivalent of "notmuch-addrlookup foo" could be "notmuch\r
57 >>> address to:foo* OR from:foo*", but it has at least one indesiderable\r
58 >>> difference: it seems considering the "CC" field, but always emits the\r
59 >>> "TO" content (i.e., assuming I have a message I sent to "john@doe.com"\r
60 >>> and CCed to "foo@bar.com", "notmuch address to:foo" emits\r
61 >>> "john@doe.com", not "foo@bar.com") so the candidates it generates are\r
62 >>> way too much.\r
63 >>>\r
64 >>> I don't know it that's done on purpose (I clearly miss the use case if\r
65 >>> so).\r
66 >>\r
67 >> Yes, this is expected behavior. Notmuch address is basically a wrapper\r
68 >> around search command. The command does not interpret the query at all,\r
69 >> because there might be no from:/to: term. The use case was to SIMPLIFY\r
70 >> address completers.\r
71 >\r
72 > Ok, even if I still miss the point of searching for an address and\r
73 > obtaining (only, see below) something (apparently) unrelated.\r
74 >\r
75 >>> I wonder if it would be reasonable adding a "--complete" flag to the\r
76 >>> "address" command that selects a more specific behaviour, so that\r
77 >>> "notmuch address --complete foo":\r
78 >> ...\r
79 >>> b) searches the given text only in the related headers (hiding the\r
80 >>>    difference between "incoming" and "outgoing" messages,=20\r
81 >>\r
82 >> This should be configurable, because --output=3Dsender is much faster th=\r
83 an\r
84 >> --output=3Drecipients. I think that ideal address completion should offer\r
85 >> you the addresses you have already written to, i.e.\r
86 >>\r
87 >>     notmuch address --output=3Drecipient from:my@address to:"prefix*"\r
88 >>\r
89 >> But this may be too slow on non-SSD disks. Some users may therefore pref=\r
90 er\r
91 >>\r
92 >>     notmuch address --output=3Dsender to:my@address from:"prefix*"\r
93 >>\r
94 >> which would be faster, but also includes every spammer/robot/... who\r
95 >> sends anything to you.\r
96 >\r
97 > Yes, seems reasonable!\r
98 >\r
99 >>> and not\r
100 >>>    considering the body at all)\r
101 >>\r
102 >> What considers body now?\r
103 >\r
104 > Well, "notmuch address foo" currently does that, and that sounds useful,\r
105 > to obtain a list of recipients who talked about "foo".\r
106 >\r
107 >>> c) avoids the "bug"/"feature" explained above\r
108 >>\r
109 >> Yes, if you know the substring you are looking for, implementing a\r
110 >> filter would be trivial.\r
111 >\r
112 > It's not just a matter of filtering, but rather *which* address is\r
113 > emitted: trying it out, in the case above the "foo@bar.com" is not even\r
114 > mentioned in the output, because it appears only as a CCed recipient.\r
115 \r
116 Are you saying that Cc address is not printed or that you want it not to\r
117 be printed? If the former than it is a bug. The following test passes\r
118 for me, i.e. foo@bar.com is printed.\r
119 \r
120 diff --git a/test/T095-address.sh b/test/T095-address.sh\r
121 index ed0cac7..17a7b08 100755\r
122 --- a/test/T095-address.sh\r
123 +++ b/test/T095-address.sh\r
124 @@ -145,4 +145,13 @@ cat <<EOF >EXPECTED\r
125  EOF\r
126  test_expect_equal_file OUTPUT EXPECTED\r
127 =20\r
128 +test_begin_subtest "Cc address is printed while searching for To address"\r
129 +add_message [to]=3Djohn@doe.com [cc]=3Dfoo@bar.com\r
130 +notmuch address --output=3Drecipients to:john@doe.com > OUTPUT\r
131 +cat <<EOF >EXPECTED\r
132 +john@doe.com\r
133 +foo@bar.com\r
134 +EOF\r
135 +test_expect_equal_file OUTPUT EXPECTED\r
136 +\r
137  test_done\r
138 \r
139 Cheers,\r
140 -Michal\r