1 Return-Path: <jani@nikula.org>
\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 519FF431FAF
\r
6 for <notmuch@notmuchmail.org>; Sat, 8 Dec 2012 14:14:20 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 lIvwBY0jOfrY for <notmuch@notmuchmail.org>;
\r
16 Sat, 8 Dec 2012 14:14:19 -0800 (PST)
\r
17 Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com
\r
18 [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 5AFFA431FAE
\r
21 for <notmuch@notmuchmail.org>; Sat, 8 Dec 2012 14:14:19 -0800 (PST)
\r
22 Received: by mail-lb0-f181.google.com with SMTP id ge1so1292017lbb.26
\r
23 for <notmuch@notmuchmail.org>; Sat, 08 Dec 2012 14:14:17 -0800 (PST)
\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
25 d=google.com; s=20120113;
\r
26 h=from:to:cc:subject:in-reply-to:references:user-agent:date
\r
27 :message-id:mime-version:content-type:x-gm-message-state;
\r
28 bh=xtr0k5xT7dzVC0gyUqvbFJS2p0J5d+g3iUJUitbtx3g=;
\r
29 b=evlaUMGQ647EiFreEJn/ezxN8MYPy/vgOfFB5QTrA7YoyvyOoykBA/pVzKBMWzltjc
\r
30 +F8S9x3W+fOa/ElWFAhozSKzed2VNH25lAAwVOECoo2xzJTmjLT9Hc5ea/XH9Erpuytj
\r
31 QIbF+Sd2X+GSBuCzs7IGyMqgWTEHO/gwl4oecL7mvpQOUBZe2s6oiAEgR4Ou7iu7nv/q
\r
32 fddF01jQH1lPQQsfBcKvB3iuDXPCNZyBggRO0ebav3UI3suEzPYTI+WlXJxXAb7bkf71
\r
33 ZZUmJ9zK2W554ilnugVdOAk9SWzdOCz9ed05r3Wdc1Ed/CClA99vp7nuh4YmvfQfzjp+
\r
35 Received: by 10.152.110.18 with SMTP id hw18mr35004lab.22.1355004856499;
\r
36 Sat, 08 Dec 2012 14:14:16 -0800 (PST)
\r
37 Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.
\r
39 by mx.google.com with ESMTPS id s9sm2392215lbc.12.2012.12.08.14.14.14
\r
40 (version=SSLv3 cipher=OTHER); Sat, 08 Dec 2012 14:14:15 -0800 (PST)
\r
41 From: Jani Nikula <jani@nikula.org>
\r
42 To: david@tethera.net, notmuch@notmuchmail.org
\r
43 Subject: Re: [PATCH] test: Adding non-maildir tags does not move message from
\r
45 In-Reply-To: <1354994132-866-1-git-send-email-david@tethera.net>
\r
46 References: <1316039001-32602-5-git-send-email-l.rilling@av7.net>
\r
47 <1354994132-866-1-git-send-email-david@tethera.net>
\r
48 User-Agent: Notmuch/0.14+138~g7041c56 (http://notmuchmail.org) Emacs/23.4.1
\r
50 Date: Sun, 09 Dec 2012 00:14:12 +0200
\r
51 Message-ID: <87vcccp4y3.fsf@nikula.org>
\r
53 Content-Type: text/plain; charset=us-ascii
\r
55 ALoCoQncgJ6bgfhSeZDLfJTz/lm7Xs/Lx9odzK+y1Hn8qDQralGHI8xOVwUoFKqasozctAWeY6Ku
\r
56 Cc: Michal Sojka <sojka@os.inf.tu-dresden.de>
\r
57 X-BeenThere: notmuch@notmuchmail.org
\r
58 X-Mailman-Version: 2.1.13
\r
60 List-Id: "Use and development of the notmuch mail system."
\r
61 <notmuch.notmuchmail.org>
\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
65 List-Post: <mailto:notmuch@notmuchmail.org>
\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
69 X-List-Received-Date: Sat, 08 Dec 2012 22:14:20 -0000
\r
71 On Sat, 08 Dec 2012, david@tethera.net wrote:
\r
72 > From: Michal Sojka <sojka@os.inf.tu-dresden.de>
\r
74 > Some MUA's like mutt show the difference between "new" emails living in maildir
\r
75 > directory new/, and "old" emails living in maildir directory cur/. However
\r
76 > notmuch tag unconditionally moves selected messages from new/ to cur/, even if
\r
77 > no maildir synchronized tag is changed.
\r
79 > While maildir specification forbids messages with tags living in new/, there is
\r
80 > no need to move messages to cur/ when no maildir synchronized tag is changed.
\r
81 > Thus notmuch can remain transparent with respect to other MUA's.
\r
83 > [ Edited commit log to better describe the intended changes, and tag the
\r
84 > test as broken until the actual changes are implemented -- Louis Rilling ]
\r
86 > Signed-off-by: Louis Rilling <l.rilling@av7.net>
\r
88 > [ Converted to use test_subtest_known_broken, David Bremner ]
\r
91 > Do we agree that the behaviour of moving messages to ./cur on tagging
\r
92 > is broken? If so, maybe it's worth tidying up and applying this. The
\r
93 > use of cd and ls strikes me as slightly suspect, but I welcome other
\r
96 I think I would narrow down the special case a bit: I think messages in
\r
97 ./new that have no maildir flags, and have no ":2," in the end of the
\r
98 filename, and and the tag change(s) will not affect maildir flags,
\r
99 should stay in ./new. Files in ./new should not have ":2," or maildir
\r
100 flags, and I see no reason to support having them there.
\r
102 Thus any messages in ./new that do have maildir flags, or have ":2," in
\r
103 the end of the filename should probably be moved to ./cur, even if the
\r
104 tag change(s) do not affect maildir flags. The patch in this thread
\r
105 fails here. It also changes the behaviour for messages in ./cur by not
\r
106 appending ":2," to them.
\r
108 As to the test, I think it should do something along the lines of (based
\r
109 on search-output test):
\r
111 notmuch search --output=files subject:"Message to stay in new" | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT
\r
112 cat <<EOF >EXPECTED
\r
113 MAIL_DIR/new/message-to-stay-in-new
\r
115 test_expect_equal_file OUTPUT EXPECTED
\r
117 And would be nice to have similar tests for the other things I mentioned
\r
118 above. If people agree with narrowing down the special case as I
\r
126 > test/maildir-sync | 9 +++++++++
\r
127 > 1 file changed, 9 insertions(+)
\r
129 > diff --git a/test/maildir-sync b/test/maildir-sync
\r
130 > index 0fc742a..6165782 100755
\r
131 > --- a/test/maildir-sync
\r
132 > +++ b/test/maildir-sync
\r
133 > @@ -83,6 +83,15 @@ test_expect_equal "$output" "No new mail."
\r
134 > # creating new directories in the mail store, then it should be
\r
135 > # creating all necessary database state for those directories.
\r
137 > +test_begin_subtest "Adding non-maildir tags does not move message from new to cur"
\r
138 > +test_subtest_known_broken
\r
139 > +add_message [subject]='"Message to stay in new"' \
\r
140 > + [date]='"Sat, 01 Jan 2000 12:00:00 -0000"' \
\r
141 > + [filename]='message-to-stay-in-new' [dir]=new
\r
142 > +notmuch tag +donotmove subject:"Message to stay in new"
\r
143 > +output=$(cd "$MAIL_DIR"; ls */message-to-stay-in-new*)
\r
144 > +test_expect_equal "$output" "new/message-to-stay-in-new"
\r
146 > test_begin_subtest "Removing 'S' flag from existing filename adds 'unread' tag"
\r
147 > add_message [subject]='"Removing S flag"' [filename]='removing-s-flag:2,S' [dir]=cur
\r
148 > output=$(notmuch search subject:"Removing S flag" | notmuch_search_sanitize)
\r
152 > _______________________________________________
\r
153 > notmuch mailing list
\r
154 > notmuch@notmuchmail.org
\r
155 > http://notmuchmail.org/mailman/listinfo/notmuch
\r