From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 922E66DE1454 for ; Fri, 17 Mar 2017 03:14:42 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.59 X-Spam-Level: X-Spam-Status: No, score=-0.59 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, RCVD_IN_DNSWL_LOW=-0.7, T_DKIM_INVALID=0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WbjElyOOevVq for ; Fri, 17 Mar 2017 03:14:41 -0700 (PDT) X-Greylist: delayed 969 seconds by postgrey-1.35 at arlo; Fri, 17 Mar 2017 03:14:41 PDT Received: from us402.directrouter.com (us402.directrouter.com [72.249.48.120]) by arlo.cworth.org (Postfix) with ESMTPS id 0998D6DE1452 for ; Fri, 17 Mar 2017 03:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smriti.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Qrwu1scy+nAQBfRErZ6OT+a8rdq2o76FPyom3kqQ8uI=; b=jVCqpWR96+0RB0qZ/87mheRhvA hUcN8JtuiFY0vGjentbCDTn5GRxKMs7Hpl1zoAYmjG7ePHPq8GE8a0Poo9VdfPDaIK9o76S/X6Y05 Yg8yPDS1lZgdBPiM71H2YZmr3RTjYzV8ehKLJAzNlnZa9yMi3Ff5HpnAmvT8gk04DicCyDe1FaRxt e08D24NGwramPFcyI0ZkdVCBtbCzAsvJfSO8ReHLivrHgHg/kO7bBzK5TSEm83i5FTdeOeEvRnf/H WG7usU6S89cny7Ij/480LQomsMfzTK6fyPSNbHerACJax8fBMKviUXRLKStWvnQVf+xArvy5x6OeS Am80cWYA==; Received: from [171.50.193.179] (port=34078 helo=smriti.com) by us402.directrouter.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88) (envelope-from ) id 1cooeO-001qhN-Bd for notmuch@notmuchmail.org; Fri, 17 Mar 2017 04:58:24 -0500 Received: by smriti.com (Postfix, from userid 1001) id 2034E180FF0; Fri, 17 Mar 2017 15:28:25 +0530 (IST) From: Navin Kabra To: notmuch@notmuchmail.org Subject: Inconsistency between tag database and notmuch search Date: Fri, 17 Mar 2017 15:28:25 +0530 Message-ID: <86efxw2pj2.fsf@smriti.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - us402.directrouter.com X-AntiAbuse: Original Domain - notmuchmail.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - smriti.com X-Get-Message-Sender-Via: us402.directrouter.com: authenticated_id: navin@smriti.com X-Authenticated-Sender: us402.directrouter.com: navin@smriti.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Fri, 17 Mar 2017 10:14:42 -0000 I've managed to get my notmuch tag database in an inconsistent state and can't figure out how to fix it. Because of this I have "unread" messages sitting in my inbox permanently and I can't get rid of them. Specifically, I have a few threads/messages that don't have any tags, but still show up in notmuch search for those tags. And using notmuch tag to remove (or add) any tags on these threads has no effect. Doing a `notmuch compact` does not fix this issue. (I believe I managed to do this by running some notmuch commands while a `xapian-compact` was running in the background.) Here are some commands that demonstrate the problem: ~$ notmuch --version notmuch 0.23.5 ~$ notmuch search thread:0000000000058ca0 thread:0000000000058ca0 February 22 [1/1] Mandar Joshi; Announcing TiECon Pune 2017 - Pune's largest, most energizing startup event! () ~$ notmuch search thread:0000000000058ca0 and tag:inbox thread:0000000000058ca0 February 22 [1/1] Mandar Joshi; Announcing TiECon Pune 2017 - Pune's largest, most energizing startup event! () ~$ notmuch tag -inbox thread:0000000000058ca0 ~$ notmuch search thread:0000000000058ca0 thread:0000000000058ca0 February 22 [1/1] Mandar Joshi; Announcing TiECon Pune 2017 - Pune's largest, most energizing startup event! () ~$ notmuch tag +inbox thread:0000000000058ca0 ~$ notmuch search thread:0000000000058ca0 thread:0000000000058ca0 February 22 [1/1] Mandar Joshi; Announcing TiECon Pune 2017 - Pune's largest, most energizing startup event! () As you can see from the `()` at the end of the notmuch search output, this thread has no tags associated with it. And still, it is showing up in the notmuch search output. What should I do to get rid of these messages from the notmuch search output?