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