From 37505b95943ed5b6942718d1ddab874067be3ab8 Mon Sep 17 00:00:00 2001 From: Ronny Chevalier Date: Tue, 21 Apr 2015 14:22:07 +0200 Subject: [PATCH] Re: notmuch_thread_get_authors --- 74/56726e1cabb2ba117926d1f3bc59f09987afe7 | 108 ++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 74/56726e1cabb2ba117926d1f3bc59f09987afe7 diff --git a/74/56726e1cabb2ba117926d1f3bc59f09987afe7 b/74/56726e1cabb2ba117926d1f3bc59f09987afe7 new file mode 100644 index 000000000..2633a9aa7 --- /dev/null +++ b/74/56726e1cabb2ba117926d1f3bc59f09987afe7 @@ -0,0 +1,108 @@ +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 8EA846DE13EA + for ; Tue, 21 Apr 2015 05:22:10 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.239 +X-Spam-Level: +X-Spam-Status: No, score=-0.239 tagged_above=-999 required=5 tests=[AWL=0.581, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, + SPF_PASS=-0.001] 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 LlrCLHrLb0ZU for ; + Tue, 21 Apr 2015 05:22:08 -0700 (PDT) +Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com + [209.85.218.51]) + by arlo.cworth.org (Postfix) with ESMTPS id 1AE3A6DE0AC2 + for ; Tue, 21 Apr 2015 05:22:08 -0700 (PDT) +Received: by oica37 with SMTP id a37so148553987oic.0 + for ; Tue, 21 Apr 2015 05:22:07 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=mime-version:in-reply-to:references:date:message-id:subject:from:to + :cc:content-type; + bh=WKJ92D6kBa8x3vfZ+mz65JHb1i4VqGWyDEZzLk1ko+0=; + b=M+fRfai4U02kEM+6rjWcHnlv8ssee+4wxHEjhX8OHdQrTTskdHK99s9ZfXlRv7O4qh + Muw0qDbLY8HrU7+mL4tdpg3FzdFA8fxa06RI1dvcSVapj4mjH93mh3FcRPB4lc7WdVOV + 5tryJMsNQ7Ufkcv+mgRwLPBgeQYsPBNz9LVF1OchPXFuCILyvfe8uYg2RUOvpDXZFoCN + PHimeTN4G84NnHgS3hA+1MANEkYteLU9iJIR2adY6eAJLZwr4pkAcL+sOb7yJdTEszlV + 5pQkG6OPeKzPjhwAcUlcElfAd5po8PH4htE5HqRZDO7M41dwS1O41drchYINsQcp8Dqo + EXvg== +MIME-Version: 1.0 +X-Received: by 10.202.64.195 with SMTP id n186mr17614843oia.53.1429618927246; + Tue, 21 Apr 2015 05:22:07 -0700 (PDT) +Received: by 10.202.216.5 with HTTP; Tue, 21 Apr 2015 05:22:07 -0700 (PDT) +In-Reply-To: <87618qfk5l.fsf@maritornes.cs.unb.ca> +References: + + <87618qfk5l.fsf@maritornes.cs.unb.ca> +Date: Tue, 21 Apr 2015 14:22:07 +0200 +Message-ID: + +Subject: Re: notmuch_thread_get_authors +From: Ronny Chevalier +To: David Bremner +Content-Type: text/plain; charset=UTF-8 +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +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: Tue, 21 Apr 2015 12:22:10 -0000 + +On Tue, Apr 21, 2015 at 1:35 AM, David Bremner wrote: +> Ronny Chevalier writes: +> +>> Hi, +>> +>> I would like to know the reason behind the way we get authors from a +>> thread, with notmuch_thread_get_authors. +>> +> +> there is some related patches/discussion at +> +> http://thread.gmane.org/gmane.mail.notmuch.general/19422 + +Ok thanks. + +Since I just subscribed to the mailing list, I can't reply to this the +thread so I reply here. + +Austin Clements wrote: +> And I think there's a fairly easy way to do it in C code that will +> also prevent library interface bloat: instead of introducing new +> library APIs to get at this information, just use the existing +> notmuch_thread_get_messages API and construct the matched and +> non-matched lists in the CLI. Doing it in the CLI wouldn't require +> the library to export yet another string list structure, which is +> always a huge pain (thanks C!), and wouldn't introduce more "helper" +> functions into the library API. + +I disagree with what Austin said. Because this does not solve the +issue at all (or I misunderstood). The issue is with the notmuch API, +if someone is using this library there no way it can parse properly +the authors. +In my case I am not using the CLI but the notmuch library, fixing this +in the CLI is just an hack, and it does not fix the issue for the +library users. + +Furthermore, I do not see why providing a string list NULL-terminated +in C is a huge pain? + +Otherwise, I agree with Mark Walters comments on the patch. + +If no one is working to fix this at the moment, I can send a patch? + +Ronny -- 2.26.2