From: Nathan Clapham Date: Tue, 11 Jun 2013 21:34:24 +0000 (+1000) Subject: Searching with prefix :folder and --output=files X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=260480c65c949a8f44a86d05fc04cecaeeb353d4;p=notmuch-archives.git Searching with prefix :folder and --output=files --- diff --git a/3a/add2e2bbd46ca5f5efcc18815fb1992b9201e9 b/3a/add2e2bbd46ca5f5efcc18815fb1992b9201e9 new file mode 100644 index 000000000..876b670d8 --- /dev/null +++ b/3a/add2e2bbd46ca5f5efcc18815fb1992b9201e9 @@ -0,0 +1,141 @@ +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 A8053431FD6 + for ; Tue, 11 Jun 2013 14:34:41 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.699 +X-Spam-Level: +X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7] 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 Zxp8VWcuZRGH for ; + Tue, 11 Jun 2013 14:34:34 -0700 (PDT) +Received: from mail-pb0-f49.google.com (mail-pb0-f49.google.com + [209.85.160.49]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 10B8C431FC7 + for ; Tue, 11 Jun 2013 14:34:33 -0700 (PDT) +Received: by mail-pb0-f49.google.com with SMTP id jt11so8851033pbb.8 + for ; Tue, 11 Jun 2013 14:34:33 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=sender:date:from:to:subject:message-id:mime-version:content-type + :content-disposition:user-agent; + bh=Or23COc4aSdxC5DiNBCxJ610sOkEOUF3JvVRFnrKWZU=; + b=LkypH50O9/vavtTkD2dIWVefKZMpCDyTeRupB88sPs3qd8KX7fxJKJdP7MTC1vv6It + Y5K7A8bZKTxBhSUuOBYQO+ohcPk9x6lmWQUD/KL/uzikc/Aaa724NPyC9Fr6PvlwUk/3 + KPxK5c0+kSwcMOTmK3DXqhoosLr3sLcgNwAs3KA4CYSKURixmUSDf2e58a20bL4Allse + W7TFyaWOFD2znS1SQrvFH41okQPuK9ccvqh2WMwZlSFOL3s/XBwZEoTF0kI1DfObzXUP + bA2RbjqH704zyIYPqYRG2anT3LjK0vylJwCA3osXSBOUmlGMZRAxon4OZpyLfcjEiJvt + 3ZNQ== +X-Received: by 10.66.27.196 with SMTP id v4mr20618320pag.97.1370986472183; + Tue, 11 Jun 2013 14:34:32 -0700 (PDT) +Received: from Nathans-MacBook-Air.local (220-244-175-164.static.tpgi.com.au. + [220.244.175.164]) by mx.google.com with ESMTPSA id + vb8sm16175328pbc.11.2013.06.11.14.34.28 for + (version=TLSv1 cipher=RC4-SHA bits=128/128); + Tue, 11 Jun 2013 14:34:30 -0700 (PDT) +Sender: Nathan Clapham +Received: by Nathans-MacBook-Air.local (Postfix, from userid 501) + id 54BD27CED96; Wed, 12 Jun 2013 07:34:24 +1000 (EST) +Date: Wed, 12 Jun 2013 07:34:24 +1000 +From: Nathan Clapham +To: notmuch@notmuchmail.org +Subject: Searching with prefix :folder and --output=files +Message-ID: <20130611213424.GA5028@Nathans-MacBook-Air.local> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii; format=flowed +Content-Disposition: inline +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Mailman-Approved-At: Tue, 11 Jun 2013 23:57:18 -0700 +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, 11 Jun 2013 21:34:41 -0000 + +Hi Everyone, + +Thanks for notmuch mail, it is a great program! + +I am having an issue searching with --output=files and the folder prefix. + +Could you please tell me if I've misunderstood something or perhaps there is +something wrong with my setup. Details of 2 examples below: + +$ notmuch --version +notmuch 0.15.2 + +---- +1. Archive folder + +Archive message #: 1356 +Directory: $HOME/Mail/Gmail/[Gmail].Archive + +$ notmuch count folder:Archive +1356 + +$ notmuch search --output=messages folder:Archive | wc -l +1356 + +$ notmuch search --output=files folder:Archive | wc -l +1572 + +I wondered why I was getting more files listed in the last example. It turns out +some files are included from other folders. For example: + +Mail/Gmail/[Gmail].Sent Mail/cur/137075610...28e65ad90fc4f:2,S + +If I then do this: + +$ notmuch search --output=files folder:Archive | grep Archive | wc -l +1356 + +I get the correct count again. + +Different folders have a similar issue: + +2. INBOX folder + +INBOX message #: 87 +Directory: $HOME/Mail/Gmail/INBOX + +$ notmuch count folder:INBOX +87 + +$ notmuch search --output=messages folder:INBOX | wc -l +87 + +$ notmuch search --output=files folder:INBOX | wc -l +97 + +This time some messages from Archive are included: + +Mail/Gmail/[Gmail].Archive/cur/137077654...d7c877e152f72dd5ddbc11f:2,S + +$ notmuch search --output=files folder:INBOX | grep INBOX | wc -l +87 +---- + +I think this illustrates the problem I'm having. Maybe I don't understand how +the folder: prefix works? Perhaps it is my folder structure - the inclusion of +the imap prefix [Gmail].?? It seems the search is matching the correct messages +though, but the output of files includes messages from another folder. + +Any advice would be appreciated. + +Thanks, +Nathan. +