Re: [PATCH v4 11/16] add --try-decrypt to notmuch insert
authorDavid Bremner <david@tethera.net>
Sun, 14 Aug 2016 00:16:54 +0000 (09:16 +0900)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:22:26 +0000 (16:22 -0700)
d8/c434dbcf5553c75a84a747cd1b7f1976b0b996 [new file with mode: 0644]

diff --git a/d8/c434dbcf5553c75a84a747cd1b7f1976b0b996 b/d8/c434dbcf5553c75a84a747cd1b7f1976b0b996
new file mode 100644 (file)
index 0000000..faa6d4e
--- /dev/null
@@ -0,0 +1,69 @@
+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 arlo.cworth.org (Postfix) with ESMTP id 55BCF6DE4EA2\r
+ for <notmuch@notmuchmail.org>; Sat, 13 Aug 2016 17:19:28 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.007\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.007 tagged_above=-999 required=5 tests=[AWL=0.004,\r
+  SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 Jxu7BtBBU7dU for <notmuch@notmuchmail.org>;\r
+ Sat, 13 Aug 2016 17:19:20 -0700 (PDT)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id B281D6DE4998\r
+ for <notmuch@notmuchmail.org>; Sat, 13 Aug 2016 17:17:00 -0700 (PDT)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1bYj72-0004zT-FL; Sat, 13 Aug 2016 20:17:12 -0400\r
+Received: (nullmailer pid 30838 invoked by uid 1000);\r
+ Sun, 14 Aug 2016 00:16:54 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,\r
+ Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: [PATCH v4 11/16] add --try-decrypt to notmuch insert\r
+In-Reply-To: <1467970047-8013-12-git-send-email-dkg@fifthhorseman.net>\r
+References: <1467970047-8013-1-git-send-email-dkg@fifthhorseman.net>\r
+ <1467970047-8013-12-git-send-email-dkg@fifthhorseman.net>\r
+User-Agent: Notmuch/0.22.1+61~g2ce0f13 (https://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Sun, 14 Aug 2016 09:16:54 +0900\r
+Message-ID: <871t1s5hmx.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.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: Sun, 14 Aug 2016 00:19:28 -0000\r
+\r
+Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:\r
+\r
+> +    status = notmuch_indexopts_set_try_decrypt (indexopts, try_decrypt);\r
+> +    if (status != NOTMUCH_STATUS_SUCCESS) {\r
+> +    fprintf (stderr, "Error: Failed to set try_decrypt to %s. (%s)\n",\r
+> +             try_decrypt ? "True" : "False", notmuch_status_to_string (status));\r
+> +    notmuch_indexopts_destroy (indexopts);\r
+> +    return EXIT_FAILURE;\r
+> +    }\r
+\r
+This patch looks fine. I wondered whether it might be useful to add a\r
+"print_status_indexopts" function to status.c to reduce some of the\r
+boilerplate. I think the current way is only a bit longer, so probably\r
+not worth the extra obfuscation, but feel free to add such a function if\r
+you like; it's mainly interesting if there is potential secondary info\r
+from notmuch_database_status_string.\r
+\r
+d\r