Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id BFC4F431FAF for ; Wed, 19 Dec 2012 13:39:27 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5rJoA43xMx9h for ; Wed, 19 Dec 2012 13:39:25 -0800 (PST) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id 70901431FAE for ; Wed, 19 Dec 2012 13:39:25 -0800 (PST) Received: from localhost (unknown [192.168.200.7]) by max.feld.cvut.cz (Postfix) with ESMTP id E0D683CFE88; Wed, 19 Dec 2012 22:39:24 +0100 (CET) X-Virus-Scanned: IMAP STYX AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, port 10044) with ESMTP id yi_hg2MnMMbp; Wed, 19 Dec 2012 22:39:23 +0100 (CET) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 3716719F30DA; Wed, 19 Dec 2012 22:39:23 +0100 (CET) Received: from steelpick.2x.cz (unknown [213.29.198.144]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id 080D8660904; Wed, 19 Dec 2012 22:39:23 +0100 (CET) Received: from wsh by steelpick.2x.cz with local (Exim 4.80) (envelope-from ) id 1TlRMD-00079N-KE; Wed, 19 Dec 2012 22:39:17 +0100 From: Michal Sojka To: Jani Nikula , david@tethera.net, notmuch@notmuchmail.org Subject: Re: [PATCH] test: Adding non-maildir tags does not move message from new to cur In-Reply-To: <87vcccp4y3.fsf@nikula.org> References: <1316039001-32602-5-git-send-email-l.rilling@av7.net> <1354994132-866-1-git-send-email-david@tethera.net> <87vcccp4y3.fsf@nikula.org> User-Agent: Notmuch/0.14+107~g342038e (http://notmuchmail.org) Emacs/24.2.1 (x86_64-pc-linux-gnu) Date: Wed, 19 Dec 2012 22:39:17 +0100 Message-ID: <87mwx9g1ru.fsf@steelpick.2x.cz> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2012 21:39:27 -0000 Hello Jani, On Sat, Dec 08 2012, Jani Nikula wrote: > On Sat, 08 Dec 2012, david@tethera.net wrote: >> From: Michal Sojka >> >> Some MUA's like mutt show the difference between "new" emails living in maildir >> directory new/, and "old" emails living in maildir directory cur/. However >> notmuch tag unconditionally moves selected messages from new/ to cur/, even if >> no maildir synchronized tag is changed. >> >> While maildir specification forbids messages with tags living in new/, there is >> no need to move messages to cur/ when no maildir synchronized tag is changed. >> Thus notmuch can remain transparent with respect to other MUA's. >> >> [ Edited commit log to better describe the intended changes, and tag the >> test as broken until the actual changes are implemented -- Louis Rilling ] >> >> Signed-off-by: Louis Rilling >> >> [ Converted to use test_subtest_known_broken, David Bremner ] >> --- >> >> Do we agree that the behaviour of moving messages to ./cur on tagging >> is broken? If so, maybe it's worth tidying up and applying this. The >> use of cd and ls strikes me as slightly suspect, but I welcome other >> opinions. > > I think I would narrow down the special case a bit: I think messages in > ./new that have no maildir flags, and have no ":2," in the end of the > filename, and and the tag change(s) will not affect maildir flags, > should stay in ./new. Files in ./new should not have ":2," or maildir > flags, and I see no reason to support having them there. > > Thus any messages in ./new that do have maildir flags, or have ":2," in > the end of the filename should probably be moved to ./cur, even if the > tag change(s) do not affect maildir flags. The patch in this thread > fails here. It also changes the behaviour for messages in ./cur by not > appending ":2," to them. I agree with you. In id:1355952747-27350-1-git-send-email-sojkam1@fel.cvut.cz I sent the tests for the cases descried above as well as the updated patch for tag to maildir synchronization. > As to the test, I think it should do something along the lines of (based > on search-output test): > > notmuch search --output=files subject:"Message to stay in new" | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT > cat <EXPECTED > MAIL_DIR/new/message-to-stay-in-new > EOF > test_expect_equal_file OUTPUT EXPECTED With this you test what notmuch thinks about the file names of messages, not whether the files have actually been renamed. For this reason I kept the previous way of testing in the new patches. Cheers, -Michal