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 6401E431FB6 for ; Tue, 9 Jul 2013 11:38:02 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.098 X-Spam-Level: X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, 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 MUh9D5mRF4ft for ; Tue, 9 Jul 2013 11:37:55 -0700 (PDT) Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 1865B431FAE for ; Tue, 9 Jul 2013 11:37:55 -0700 (PDT) Received: from smtp.qmul.ac.uk ([138.37.6.40]) by mail2.qmul.ac.uk with esmtp (Exim 4.71) (envelope-from ) id 1UwcnM-0002Kn-Dw; Tue, 09 Jul 2013 19:37:51 +0100 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) (envelope-from ) id 1UwcnM-0004cR-5l; Tue, 09 Jul 2013 19:37:48 +0100 From: Mark Walters To: Ingo Hohmann , notmuch@notmuchmail.org Subject: Re: notmuch search --output=files error with AND NOT search terms In-Reply-To: <51DC0A16.5080704@2b1.de> References: <51DC0A16.5080704@2b1.de> User-Agent: Notmuch/0.15.2+192~g8222af3 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu) Date: Tue, 09 Jul 2013 19:37:46 +0100 Message-ID: <87mwpvd1fp.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Sender-Host-Address: 93.97.24.31 X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: 1d3f1ed18b338575d78a58cfd1301790 (of first 20000 bytes) X-SpamAssassin-Score: 0.0 X-SpamAssassin-SpamBar: / X-SpamAssassin-Report: The QM spam filters have analysed this message to determine if it is spam. We require at least 5.0 points to mark a message as spam. This message scored 0.0 points. Summary of the scoring: * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (markwalters1009[at]gmail.com) * 0.0 AWL AWL: From: address is in the auto white-list X-QM-Scan-Virus: ClamAV says the message is clean 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: Tue, 09 Jul 2013 18:38:02 -0000 Hi > Hi list, > > I am trying to check for mails, that are tagged differently from their > mailfolder. > > So I am searching like this, for example: > > notmuch search folder:1_Personal AND NOT tag:1_Personal > thread:0000000000005613 2008-01-15 [1/1] KIKIDAN News; kikidan > news 2008/01: Willkommen im neuen Jahr (inbox to-me) > > That's OK, but if I want to get the file name of the message, suddenly > get another message, which isn't located in the 1_Personal folder at all. > > notmuch search --output=files folder:1_Personal AND NOT > tag:1_Personal > /home/ianus/Mail/ingo-2b1-de/INBOX/cur/1362131239_2.9026.cordraconis,U=33535,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S > /home/ianus/Mail/ingo-2b1-de/1_Personal/cur/1361052415_0.30588.cordraconis,U=755,FMD5=2bd412d62930ab474a218128a61bdb68:2,S > The most likely cause is that these two messagefiles have the same message-ids (so in notmuch's view are the same message). Try notmuch search --output=messages folder:1_Personal AND NOT tag:1_Personal If you only see one message-id then notmuch thinks there is a single message that matches the search. The way notmuch works is that it first finds which messages match and then prints the requested information for those messages. So in this case it finds the matching message(s) then prints all filenames for those matching messages. There are some patches floating around for improvements to the manpage but they haven't been applied/reviewed yet. Best wishes Mark > > Kind regards, > > Ingo > > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch