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 585B4429E35 for ; Sat, 10 Jan 2015 01:00:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 2.438 X-Spam-Level: ** X-Spam-Status: No, score=2.438 tagged_above=-999 required=5 tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 5TnOY4DIpZuV for ; Sat, 10 Jan 2015 01:00:22 -0800 (PST) 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 A0D99431E84 for ; Sat, 10 Jan 2015 01:00:22 -0800 (PST) Received: from remotemail by yantan.tethera.net with local (Exim 4.80) (envelope-from ) id 1Y9ru7-0002My-To; Sat, 10 Jan 2015 05:00:19 -0400 Received: (nullmailer pid 28192 invoked by uid 1000); Sat, 10 Jan 2015 09:00:14 -0000 From: David Bremner To: Todd , notmuch@notmuchmail.org Subject: Re: [PATCH] Index Content-Type of attachments with a contenttype prefix In-Reply-To: <1420849787-4401-1-git-send-email-todd@electricoding.com> References: <1420849787-4401-1-git-send-email-todd@electricoding.com> User-Agent: Notmuch/0.19+10~g215de26 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Sat, 10 Jan 2015 10:00:14 +0100 Message-ID: <87ppanj9i9.fsf@maritornes.cs.unb.ca> MIME-Version: 1.0 Content-Type: text/plain Cc: Austin Clements 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, 10 Jan 2015 09:00:25 -0000 Todd writes: > I wanted to tag messages with calendar invitations, but couldn't as > the information wasn't indexed. > > This patch allows for queries for like: > > Find calendar invites > - contenttype:text/calendar or contenttype:applicaton/ics > > Find any image attachments > - contenttype:image > > Find all patches > - contenttype:text/x-patch The main issue, that I won't really address in this message (because I'm hoping Austin finds time to comment) is upgrading the database. The short version is that a new "database feature" needs to be created. > --- a/NEWS > +++ b/NEWS > @@ -15,6 +15,12 @@ keyboard shortcuts to saved searches. > Command-Line Interface > ---------------------- Minor point, 0.19 was released, you should start a new NEWS section for 0.20 with date UNRELEASED > --- a/completion/notmuch-completion.bash > +++ b/completion/notmuch-completion.bash If you can without too much suffering, it would be nice to update the zsh completion at the same time. > +The **contenttype:** prefix can be used to search for specific > +content-types of attachments to email messages (as specified by the > +sender). > + I'm not 100% sure, but I did wonder if the docs should mention MIME somewhere, for people searching. > { "attachment", "XATTACHMENT" }, > + { "contenttype", "XCONTENTTYPE"}, > { "subject", "XSUBJECT"}, I didn't work through all the details, but I did wonder if it was in some sense redundant to be indexing contenttype and also the existing attachement and encrypted pseudotags. I guess this might be one of those cases where we are stuck with the extra indexing for now, until we sort out some query parsing issues. d