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