Re: [Patch v5 4/8] lib: add "verbose" versions of notmuch_database_{open,create}
authorDavid Bremner <david@tethera.net>
Wed, 25 Mar 2015 16:47:06 +0000 (12:47 +2000)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:48:36 +0000 (14:48 -0700)
a7/94715d68fa496951bacc5711094e9f8460ba53 [new file with mode: 0644]

diff --git a/a7/94715d68fa496951bacc5711094e9f8460ba53 b/a7/94715d68fa496951bacc5711094e9f8460ba53
new file mode 100644 (file)
index 0000000..d17188d
--- /dev/null
@@ -0,0 +1,79 @@
+Return-Path: <david@tethera.net>\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 F0DAE431FDE\r
+       for <notmuch@notmuchmail.org>; Wed, 25 Mar 2015 09:48:20 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.438\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
+       tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 ASEK+0ywZvc9 for <notmuch@notmuchmail.org>;\r
+       Wed, 25 Mar 2015 09:48:18 -0700 (PDT)\r
+Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net\r
+       [87.98.215.224])\r
+       (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 6A0B5431E62\r
+       for <notmuch@notmuchmail.org>; Wed, 25 Mar 2015 09:48:17 -0700 (PDT)\r
+Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim\r
+       4.80) (envelope-from <david@tethera.net>)\r
+       id 1YaoSc-0005jp-CB; Wed, 25 Mar 2015 16:47:18 +0000\r
+Received: (nullmailer pid 18353 invoked by uid 1000); Wed, 25 Mar 2015\r
+       16:47:06 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
+Subject: Re: [Patch v5 4/8] lib: add "verbose" versions of\r
+       notmuch_database_{open,create}\r
+In-Reply-To: <m2bnjhuj43.fsf@guru.guru-group.fi>\r
+References: <1426352554-4383-10-git-send-email-david@tethera.net>\r
+       <1427203451-1540-1-git-send-email-david@tethera.net>\r
+       <1427203451-1540-5-git-send-email-david@tethera.net>\r
+       <m2bnjhuj43.fsf@guru.guru-group.fi>\r
+User-Agent: Notmuch/0.19+86~gbed8b67 (http://notmuchmail.org) Emacs/24.4.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Wed, 25 Mar 2015 12:47:06 -0400\r
+Message-ID: <87a8z1owhh.fsf@maritornes.cs.unb.ca>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\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, 25 Mar 2015 16:48:21 -0000\r
+\r
+Tomi Ollila <tomi.ollila@iki.fi> writes:\r
+\r
+>> +    ret = notmuch_database_open_verbose (path,\r
+>> +                                    NOTMUCH_DATABASE_MODE_READ_WRITE,\r
+>> +                                    &notmuch,\r
+>> +                                    &message);\r
+>>      if (ret) {\r
+>> +   if (status_cb) status_cb (message, closure);\r
+>>     goto DONE;\r
+>>      }\r
+>\r
+> Is this ever printing the message (if any?)\r
+\r
+Printing messages is the whole point of status_cb. It does switch the\r
+output from the current stderr to stdout, which is weird.  On the other\r
+hand it avoids changing the api by adding\r
+notmuch_database_compact_verbose.\r
+\r
+And of course if we care this should free message after calling\r
+status_cb, like the other places.\r
+\r
+d\r
+\r