--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id BDC986DE0173\r
+ for <notmuch@notmuchmail.org>; Wed, 30 Mar 2016 13:50:27 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.627\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.627 tagged_above=-999 required=5 tests=[AWL=-0.025,\r
+ SPF_NEUTRAL=0.652] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id zBk0bOeRv9CZ for <notmuch@notmuchmail.org>;\r
+ Wed, 30 Mar 2016 13:50:19 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 42AA96DE00DF\r
+ for <notmuch@notmuchmail.org>; Wed, 30 Mar 2016 13:50:18 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id ED6A81000CA;\r
+ Wed, 30 Mar 2016 23:50:39 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 1/2] CLI: add print_status_database\r
+In-Reply-To: <1459303814-31988-2-git-send-email-david@tethera.net>\r
+References: <1459303814-31988-1-git-send-email-david@tethera.net>\r
+ <1459303814-31988-2-git-send-email-david@tethera.net>\r
+User-Agent: Notmuch/0.21+99~g7cbc880 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Wed, 30 Mar 2016 23:50:39 +0300\r
+Message-ID: <m2oa9vofkw.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 30 Mar 2016 20:50:27 -0000\r
+\r
+On Wed, Mar 30 2016, David Bremner <david@tethera.net> wrote:\r
+\r
+> This could probably be used at quite a few places in the existing code,\r
+> but in the immediate future I plan to use in some new code in\r
+> notmuch-dump\r
+> ---\r
+> notmuch-client.h | 5 +++++\r
+> status.c | 17 +++++++++++++++++\r
+> 2 files changed, 22 insertions(+)\r
+>\r
+> diff --git a/notmuch-client.h b/notmuch-client.h\r
+> index 18e6c60..b3d0b66 100644\r
+> --- a/notmuch-client.h\r
+> +++ b/notmuch-client.h\r
+> @@ -462,6 +462,11 @@ print_status_query (const char *loc,\r
+> const notmuch_query_t *query,\r
+> notmuch_status_t status);\r
+> \r
+> +notmuch_status_t\r
+> +print_status_database (const char *loc,\r
+> + const notmuch_database_t *database,\r
+> + notmuch_status_t status);\r
+> +\r
+> #include "command-line-arguments.h"\r
+> \r
+> extern char *notmuch_requested_db_uuid;\r
+> diff --git a/status.c b/status.c\r
+> index 8fa81cb..45d3fb4 100644\r
+> --- a/status.c\r
+> +++ b/status.c\r
+> @@ -19,3 +19,20 @@ print_status_query (const char *loc,\r
+> }\r
+> return status;\r
+> }\r
+> +\r
+> +notmuch_status_t\r
+> +print_status_database (const char *loc,\r
+> + const notmuch_database_t *notmuch,\r
+> + notmuch_status_t status)\r
+> +{\r
+> + if (status) {\r
+> + const char *msg;\r
+> +\r
+> + fprintf (stderr, "%s: %s\n", loc,\r
+> + notmuch_status_to_string (status));\r
+> + msg = notmuch_database_status_string (notmuch);\r
+> + if (msg)\r
+> + fputs (msg, stderr);\r
+> + }\r
+> + return status;\r
+\r
+LGTM (whole series).\r
+\r
+I was going to complain about the naming of 'print_status_database()' \r
+but David already got through (in 39c54df2) print_status_query() so\r
+that ship sailed already (perhaps that it happened is good :).\r
+\r
+> +}\r
+> -- \r
+> 2.8.0.rc3\r