Re: [PATCH v2 1/2] lib: Use email address instead of empty real name.
authorJani Nikula <jani@nikula.org>
Sat, 22 Nov 2014 11:29:38 +0000 (13:29 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:46:49 +0000 (14:46 -0700)
55/cf9d8d7aa40f7775d1f00aecc8138a2396f70c [new file with mode: 0644]

diff --git a/55/cf9d8d7aa40f7775d1f00aecc8138a2396f70c b/55/cf9d8d7aa40f7775d1f00aecc8138a2396f70c
new file mode 100644 (file)
index 0000000..45edf54
--- /dev/null
@@ -0,0 +1,120 @@
+Return-Path: <jani@nikula.org>\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 445D6431FBF\r
+       for <notmuch@notmuchmail.org>; Sat, 22 Nov 2014 03:29:49 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 BsaJKE9U9wi4 for <notmuch@notmuchmail.org>;\r
+       Sat, 22 Nov 2014 03:29:43 -0800 (PST)\r
+Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com\r
+       [209.85.212.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 878AA431FBC\r
+       for <notmuch@notmuchmail.org>; Sat, 22 Nov 2014 03:29:43 -0800 (PST)\r
+Received: by mail-wi0-f182.google.com with SMTP id h11so1609629wiw.9\r
+       for <notmuch@notmuchmail.org>; Sat, 22 Nov 2014 03:29:42 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:from:to:subject:in-reply-to:references\r
+       :user-agent:date:message-id:mime-version:content-type;\r
+       bh=DrgbaI5zAsYjaFMHfB7+ZEWlTBTRnTgdRye55tvw6S4=;\r
+       b=EqsbVYUaDDyXcxGBhC9vvnI+ZDpmiGoV0w+nQQYPaIlm0JVaFOnMJ9OiAP3ZeVatmN\r
+       xHDywBJFpuslfpKLt5+DovCrZbg6FW9G+InYm25QWqgCB/e1SunQs+eJpKYnv2Fu+4EJ\r
+       UynQ0M7wvXlpf56bnzs5ufx0U97xPifnELhvvbvtC6jpCTWF3CHRgow3BiVZdH343A/z\r
+       Vp9651lDrniaBazU6ykv4fp8l1Nh4frA4+Mj6q3f5th0tPIMjkqQPgGVLiNI6oeAM12Z\r
+       sIpKGRMZcFrngRfzJZEdPZExXUVLQTIKUjpFZNR0uXH9e0w9I6RQQD5EWgMEINyu7xcm\r
+       HjoQ==\r
+X-Gm-Message-State:\r
+ ALoCoQlLvrX3pFf3z9/YMdkPI2B8Es3Ivru4W61iv9CumWKQWYtzQTzIPtpWFPGxY71OWNpIxtDd\r
+X-Received: by 10.194.5.227 with SMTP id v3mr16827917wjv.63.1416655782310;\r
+       Sat, 22 Nov 2014 03:29:42 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw2-58c362-144.dhcp.inet.fi.\r
+       [88.195.98.144])\r
+       by mx.google.com with ESMTPSA id ud1sm11882740wjc.7.2014.11.22.03.29.40\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+       Sat, 22 Nov 2014 03:29:41 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Jesse Rosenthal <jrosenthal@jhu.edu>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 1/2] lib: Use email address instead of empty real name.\r
+In-Reply-To: <1416585462-24558-2-git-send-email-jrosenthal@jhu.edu>\r
+References: <1416585462-24558-1-git-send-email-jrosenthal@jhu.edu>\r
+       <1416585462-24558-2-git-send-email-jrosenthal@jhu.edu>\r
+User-Agent: Notmuch/0.19+1~gcffa3cf (http://notmuchmail.org) Emacs/24.4.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Sat, 22 Nov 2014 13:29:38 +0200\r
+Message-ID: <87ppcfqxr1.fsf@nikula.org>\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: Sat, 22 Nov 2014 11:29:49 -0000\r
+\r
+On Fri, 21 Nov 2014, Jesse Rosenthal <jrosenthal@jhu.edu> wrote:\r
+> Currently, if a From-header is of the form:\r
+>\r
+>     "" <address@example.com>\r
+>\r
+> the empty string will be treated as a valid real-name, and the entry\r
+> in the search results will be empty.\r
+>\r
+> The new behavior here is that we treat an empty real-name field as if\r
+> it were null, so that the email address will be used in the search\r
+> results instead.\r
+\r
+Makes sense.\r
+\r
+> Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>\r
+> ---\r
+>  lib/thread.cc | 3 ++-\r
+>  1 file changed, 2 insertions(+), 1 deletion(-)\r
+>\r
+> diff --git a/lib/thread.cc b/lib/thread.cc\r
+> index 8922403..68b2b94 100644\r
+> --- a/lib/thread.cc\r
+> +++ b/lib/thread.cc\r
+> @@ -277,7 +277,8 @@ _thread_add_message (notmuch_thread_t *thread,\r
+>      address = internet_address_list_get_address (list, 0);\r
+>      if (address) {\r
+>          author = internet_address_get_name (address);\r
+> -        if (author == NULL) {\r
+> +        // We treat quoted empty names as if they were empty.\r
+\r
+Nitpick, we don't use // style comments.\r
+\r
+> +        if (author == NULL || author[0]=='\0' ) {\r
+\r
+Nitpick, please add spaces around "==" but no space before closing ")".\r
+\r
+\r
+BR,\r
+Jani.\r
+\r
+>              InternetAddressMailbox *mailbox;\r
+>              mailbox = INTERNET_ADDRESS_MAILBOX (address);\r
+>              author = internet_address_mailbox_get_addr (mailbox);\r
+> -- \r
+> 2.1.3\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r