Re: Inconsistent output from "notmuch search --output=<foo>"
authorCarl Worth <cworth@cworth.org>
Wed, 24 Nov 2010 19:40:46 +0000 (11:40 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:36 +0000 (09:37 -0800)
82/9398e17b0550b9a27ff2e2674cd9754008e207 [new file with mode: 0644]

diff --git a/82/9398e17b0550b9a27ff2e2674cd9754008e207 b/82/9398e17b0550b9a27ff2e2674cd9754008e207
new file mode 100644 (file)
index 0000000..f3f2257
--- /dev/null
@@ -0,0 +1,104 @@
+Return-Path: <cworth@cworth.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id BC333431FD0\r
+       for <notmuch@notmuchmail.org>; Wed, 24 Nov 2010 11:40:47 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.99\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.99 tagged_above=-999 required=5\r
+       tests=[ALL_TRUSTED=-1, T_MIME_NO_TEXT=0.01] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id Yk2xgEuDywS8; Wed, 24 Nov 2010 11:40:47 -0800 (PST)\r
+Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 3F26F431FB5;\r
+       Wed, 24 Nov 2010 11:40:47 -0800 (PST)\r
+Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
+       id AF54E25412B; Wed, 24 Nov 2010 11:40:46 -0800 (PST)\r
+From: Carl Worth <cworth@cworth.org>\r
+To: Sebastian Spaeth <Sebastian@SSpaeth.de>, notmuch@notmuchmail.org\r
+Subject: Re: Inconsistent output from "notmuch search --output=<foo>"\r
+In-Reply-To: <87fwurjeuh.fsf@SSpaeth.de>\r
+References: <871v6b79s0.fsf@yoom.home.cworth.org> <87fwurjeuh.fsf@SSpaeth.de>\r
+User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.2.1\r
+       (i486-pc-linux-gnu)\r
+Date: Wed, 24 Nov 2010 11:40:46 -0800\r
+Message-ID: <87bp5e5x35.fsf@yoom.home.cworth.org>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 24 Nov 2010 19:40:47 -0000\r
+\r
+--=-=-=\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Wed, 24 Nov 2010 09:38:46 +0100, Sebastian Spaeth <Sebastian@SSpaeth.de>=\r
+ wrote:\r
+> On Tue, 23 Nov 2010 18:09:03 -0800, Carl Worth wrote:\r
+> > The inconsistency is the presence of the "thread:" and "id:" prefixes in\r
+> > the first two cases, (note that there isn't any "tag:" prefix in the\r
+> > last case). I can't find any good justification for these.\r
+>=20\r
+> I use the output of notmuch search --format=3Dthreads to feed to another\r
+> notmuch tag operation, and if the thread: prefix vanishes, I'll have to f=\r
+ind other\r
+> ways to do that. :)\r
+\r
+Right. The inconsistency is that we don't have output such as:\r
+\r
+       tag:attachment\r
+       tag:unread\r
+        ...\r
+\r
+From=20notmuch search --output=3Dtags. While that output would be useful if\r
+you were using the tags to construct a search string, it gets in the way\r
+if you are doing something else with the tag names.\r
+\r
+And I can't come up with a strong, objective distinction for the threads\r
+and messages output differing here. (Thread and message IDs are "mostly"\r
+used for searching? How could we define that?)\r
+\r
+It is easy to say that a command like "search --output=3D" is designed\r
+primarily for automated use in scripts, and usage like that does benefit\r
+From=20consistency. This is in contrast to the various "stash" commands in\r
+the emacs interface which are designed primarily for interactive use,\r
+and there, convenience is more important than consistency.\r
+\r
+So my inclination is to remove the prefixes and then recommend that you\r
+do:\r
+\r
+       notmuch search --output=3Dthreads | sed -e 's/^/thread:'\r
+\r
+in your script.\r
+\r
+=2DCarl\r
+\r
+=2D-=20\r
+carl.d.worth@intel.com\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.10 (GNU/Linux)\r
+\r
+iD8DBQFM7Wo+6JDdNq8qSWgRAta6AJ4nF8WUMRzfdayz6p1vUdE0h5E/zACfSRdr\r
+lVvTkDFHys7XmhpO2bmNTJQ=\r
+=tbGz\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r