From 6e7a0efc7cadbda05096abe3c4f766a008e25063 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Fri, 19 Sep 2014 21:57:40 +0200 Subject: [PATCH] Re: [PATCH] cli: add --output=address-{from,to,all} to notmuch search --- 8d/e50b7dde6b7e074bb0a461b377ca16fa1e57ca | 74 +++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 8d/e50b7dde6b7e074bb0a461b377ca16fa1e57ca diff --git a/8d/e50b7dde6b7e074bb0a461b377ca16fa1e57ca b/8d/e50b7dde6b7e074bb0a461b377ca16fa1e57ca new file mode 100644 index 000000000..61770f41f --- /dev/null +++ b/8d/e50b7dde6b7e074bb0a461b377ca16fa1e57ca @@ -0,0 +1,74 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id F2A87431FBC + for ; Fri, 19 Sep 2014 12:57:56 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id kAReeLGY+PCs for ; + Fri, 19 Sep 2014 12:57:51 -0700 (PDT) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 1042F431FAE + for ; Fri, 19 Sep 2014 12:57:51 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1XV4JN-0007A3-Ki; Fri, 19 Sep 2014 16:57:45 -0300 +Received: (nullmailer pid 8606 invoked by uid 1000); Fri, 19 Sep 2014 + 19:57:40 -0000 +From: David Bremner +To: Jani Nikula , notmuch@notmuchmail.org +Subject: Re: [PATCH] cli: add --output=address-{from,to,all} to notmuch search +In-Reply-To: <1410021689-15901-1-git-send-email-jani@nikula.org> +References: <871troub1v.fsf@qmul.ac.uk> + <1410021689-15901-1-git-send-email-jani@nikula.org> +User-Agent: Notmuch/0.18.1+97~g56c48dc (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Fri, 19 Sep 2014 21:57:40 +0200 +Message-ID: <87k34zbcy3.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Fri, 19 Sep 2014 19:57:57 -0000 + +Jani Nikula writes: + +> + if (name && *name) +> + full_address = talloc_asprintf (NULL, "%s <%s>", name, addr); +> + else +> + full_address = talloc_asprintf (NULL, "<%s>", addr + +Is there some reason not to use sprinter as a talloc context here? + +> + +> + if (!full_address) +> + break; + +Is the error here out of memory? Maybe an error message would be a good +idea. + + +Obviously the docs need to be updated as well, and ideally the tests. I +think Jani was hinting that he didn't want to be the person to do +that. Any volunteers? + +d -- 2.26.2