Re: [PATCH v2 3/5] Add indexing for the mimetype term
authorJani Nikula <jani@nikula.org>
Thu, 15 Jan 2015 17:16:17 +0000 (19:16 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:47:23 +0000 (14:47 -0700)
bb/1d663fe460b05182e3c729e7dfebf61729e2ac [new file with mode: 0644]

diff --git a/bb/1d663fe460b05182e3c729e7dfebf61729e2ac b/bb/1d663fe460b05182e3c729e7dfebf61729e2ac
new file mode 100644 (file)
index 0000000..0f9af8f
--- /dev/null
@@ -0,0 +1,128 @@
+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 7D00F431FD6\r
+       for <notmuch@notmuchmail.org>; Thu, 15 Jan 2015 09:16:10 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.738\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.738 tagged_above=-999 required=5\r
+       tests=[DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_LOW=-0.7]\r
+       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 tyOWUoktZpWF for <notmuch@notmuchmail.org>;\r
+       Thu, 15 Jan 2015 09:16:07 -0800 (PST)\r
+Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com\r
+       [209.85.212.176]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 1910B431FBC\r
+       for <notmuch@notmuchmail.org>; Thu, 15 Jan 2015 09:16:07 -0800 (PST)\r
+Received: by mail-wi0-f176.google.com with SMTP id z2so10879169wiv.3\r
+       for <notmuch@notmuchmail.org>; Thu, 15 Jan 2015 09:16:06 -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=8oSH/4shRj56nAIqB4r7Mwz07uD1DCMO20eEPGkXvfo=;\r
+       b=CRi5PhJHqkHyi1sGe4rtyBIERABM+ej/bqOeJWWPSYkDXp9Xvw77667jI8ky0LKh6x\r
+       h4CZ6Ydjd+h0K5SnFxw9MDr6zY1O0PwaaSs/D4BkCWRQ1ywMxE/cUkytcWR9rwdmAWP7\r
+       x60hiUDhUyxA05ononSNBVUrTz96woVvV+lkbW4Sm/yO1ZGUIQa2w7fhY/jrsOd36WeJ\r
+       uj3HM3fV1dSe/bbgZvrX/BUQLqnfp1AKa27E6h8OEWvg0B8XdtpwneQWryYuT4wUrdLL\r
+       6o3Q90Mx/AVx+evkYUYQNWoc6Kw6PUVev17NyOWbtEN4ADbXnYtx5RwkYcAnIj/mnksW\r
+       IFfQ==\r
+X-Gm-Message-State:\r
+ ALoCoQn2cYYFTK1uHhi9VLGRC4nAFMJUxhyLnY4LJpVnQgfXyYViPZS+Zct5h9Jtok9kEAdJSO6r\r
+X-Received: by 10.180.103.6 with SMTP id fs6mr28725130wib.11.1421342165836;\r
+       Thu, 15 Jan 2015 09:16:05 -0800 (PST)\r
+Received: from localhost (mobile-internet-bcee14-89.dhcp.inet.fi.\r
+       [188.238.20.89])\r
+       by mx.google.com with ESMTPSA id pl1sm8230607wic.16.2015.01.15.09.16.04\r
+       (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+       Thu, 15 Jan 2015 09:16:05 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Todd <todd@electricoding.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 3/5] Add indexing for the mimetype term\r
+In-Reply-To: <1421193628-2699-4-git-send-email-todd@electricoding.com>\r
+References: <1421193628-2699-1-git-send-email-todd@electricoding.com>\r
+       <1421193628-2699-4-git-send-email-todd@electricoding.com>\r
+User-Agent: Notmuch/0.19+19~g9060a1f (http://notmuchmail.org) Emacs/24.4.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Thu, 15 Jan 2015 19:16:17 +0200\r
+Message-ID: <877fwo9d7i.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: Thu, 15 Jan 2015 17:16:10 -0000\r
+\r
+\r
+Please add a commit message.\r
+\r
+On Wed, 14 Jan 2015, Todd <todd@electricoding.com> wrote:\r
+> ---\r
+>  lib/database.cc | 1 +\r
+>  lib/index.cc    | 6 ++++++\r
+>  2 files changed, 7 insertions(+)\r
+>\r
+> diff --git a/lib/database.cc b/lib/database.cc\r
+> index 2de60f8..7c7a267 100644\r
+> --- a/lib/database.cc\r
+> +++ b/lib/database.cc\r
+> @@ -254,6 +254,7 @@ static prefix_t PROBABILISTIC_PREFIX[]= {\r
+>      { "from",                       "XFROM" },\r
+>      { "to",                 "XTO" },\r
+>      { "attachment",         "XATTACHMENT" },\r
+> +    { "mimetype",           "XMIMETYPE"},\r
+>      { "subject",            "XSUBJECT"},\r
+>  };\r
+>  \r
+> diff --git a/lib/index.cc b/lib/index.cc\r
+> index 1a2e63d..2e27558 100644\r
+> --- a/lib/index.cc\r
+> +++ b/lib/index.cc\r
+> @@ -318,6 +318,12 @@ _index_mime_part (notmuch_message_t *message,\r
+>      return;\r
+>      }\r
+>  \r
+> +\r
+\r
+Superfluous newline.\r
+\r
+> +    GMimeContentType*  content_type = g_mime_object_get_content_type(part);\r
+\r
+Please replace "*  " with " *".\r
+\r
+> +    if (content_type) {\r
+> +    _notmuch_message_gen_terms (message, "mimetype", g_mime_content_type_to_string(content_type));\r
+> +    }\r
+\r
+Check g_mime_content_type_to_string return value, and g_free the result\r
+afterwards.\r
+\r
+BR,\r
+Jani.\r
+\r
+> +\r
+>      if (GMIME_IS_MULTIPART (part)) {\r
+>      GMimeMultipart *multipart = GMIME_MULTIPART (part);\r
+>      int i;\r
+> -- \r
+> 1.9.1\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r