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 C1350431FD0 for ; Tue, 23 Nov 2010 18:09:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1] 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 1xbUC3DHyRY0; Tue, 23 Nov 2010 18:09:03 -0800 (PST) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D3495431FB5; Tue, 23 Nov 2010 18:09:03 -0800 (PST) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id 5090825412B; Tue, 23 Nov 2010 18:09:03 -0800 (PST) From: Carl Worth To: notmuch@notmuchmail.org Subject: Inconsistent output from "notmuch search --output=" User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) Date: Tue, 23 Nov 2010 18:09:03 -0800 Message-ID: <871v6b79s0.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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, 24 Nov 2010 02:09:04 -0000 I just committed a bug fix for the missing final newline from "notmuch search --output=tags". I don't recall who reported the bug, but thanks! Michal, in trying to add a test for that bug, I found that the current test suite infrastructure can't catch it because the shell's $() construct doesn't distinguish whether that final newline is present or not. I don't see an easy way to fix this, (other than making all tests put results into files and making test_expect_equal accept those filenames). Do you see any easy fix? Meanwhile, while adding the --output= test, I noticed some inconsistency in the output: $ notmuch search --output=threads ... | head -1 thread:0000000000000c3c $ notmuch search --output=messages ... | head -1 id:1272355278.3878.111.camel@thor.local $ notmuch search --output=files ... | head -1 /path/to/maildir/1272355352.M909256P19063V18F0_0,S=9415 $ notmuch search --output=tags ... | head -1 attachment The inconsistency is the presence of the "thread:" and "id:" prefixes in the first two cases, (note that there isn't any "tag:" prefix in the last case). I can't find any good justification for these. I think the right answer is to drop those prefixes in the output. Does anybody disagree? Does anyone have any scripts that are already consuming the output of "notmuch search --output=threads" or "notmuch search --output=messages" yet? Note that the --format=json output won't be affected by the change I'm proposing here. -Carl -- carl.d.worth@intel.com