From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 90164431FB6 for ; Sat, 6 Apr 2013 04:55:07 -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 HBz4t5RxMy8o for ; Sat, 6 Apr 2013 04:55:07 -0700 (PDT) Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 0E78F431FAE for ; Sat, 6 Apr 2013 04:55:07 -0700 (PDT) Received: from fctnnbsc30w-156034082078.dhcp-dynamic.fibreop.nb.bellaliant.net ([156.34.82.78] helo=zancas.localnet) by tesseract.cs.unb.ca with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1UORi5-0008BB-Kw; Sat, 06 Apr 2013 08:55:06 -0300 Received: from bremner by zancas.localnet with local (Exim 4.80) (envelope-from ) id 1UORhz-00061H-Pc; Sat, 06 Apr 2013 08:54:59 -0300 From: David Bremner To: "Alexey I. Froloff" , notmuch@notmuchmail.org Subject: Re: [PATCH] lib: Add a new prefix "list" to the search-terms syntax In-Reply-To: <1364996763-19718-1-git-send-email-raorn@raorn.name> References: <1364996763-19718-1-git-send-email-raorn@raorn.name> User-Agent: Notmuch/0.15.2+73~g1c450ec (http://notmuchmail.org) Emacs/24.2.1 (x86_64-pc-linux-gnu) Date: Sat, 06 Apr 2013 08:54:59 -0300 Message-ID: <874nfjj2lo.fsf@zancas.localnet> MIME-Version: 1.0 Content-Type: text/plain X-Spam_bar: - 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, 06 Apr 2013 11:55:07 -0000 "Alexey I. Froloff" writes: > + > + /* Description may be RFC2047 encoded */ > + char *decoded_desc = g_mime_utils_header_decode_phrase(description); Surprisingly, the docs claim g_mime_utils_header_decode_phrase has no error conditions, so I guess this is OK. > + > + _notmuch_message_gen_terms(message, "list", list_id); > + > + if (decoded_desc) > + _notmuch_message_gen_terms(message, "list", decoded_desc); > On the other hand, _notmuch_message_gen_terms does return a status. I agree that currently this status is not useful, but that could change in the future. I also agree that the existing code does the same thing in a few places, but I think it's better not to introduce more. We'll need a test or two before we introduce a core change. Any objections to the list: syntax? The only issue I see is that at some point we will probably add a generic header search syntax, and this implicitly says list-id is more important/common than other headers. d