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 27534429E44 for ; Sat, 10 Jan 2015 06:22:56 -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 lCz34+Y2tCNj for ; Sat, 10 Jan 2015 06:22:53 -0800 (PST) Received: from s75.web-hosting.com (s75.web-hosting.com [198.187.31.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id EB41E429E40 for ; Sat, 10 Jan 2015 06:22:52 -0800 (PST) Received: from user-69-73-37-128.knology.net ([69.73.37.128]:33454 helo=tz-lab) by server75.web-hosting.com with esmtpsa (UNKNOWN:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1Y9wwC-003wv9-2f; Sat, 10 Jan 2015 09:22:48 -0500 From: Todd To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] Index Content-Type of attachments with a contenttype prefix In-Reply-To: <87ppanj9i9.fsf@maritornes.cs.unb.ca> Message-ID: <87k30u90nv.fsf@electricoding.com> References: <1420849787-4401-1-git-send-email-todd@electricoding.com> <87ppanj9i9.fsf@maritornes.cs.unb.ca> User-Agent: Notmuch/0.19+17~gd8b219d (http://notmuchmail.org) Emacs/24.4.1 (x86_64-unknown-linux-gnu) Date: Sat, 10 Jan 2015 08:22:25 -0600 MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server75.web-hosting.com X-AntiAbuse: Original Domain - notmuchmail.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - electricoding.com X-Get-Message-Sender-Via: server75.web-hosting.com: authenticated_id: todd@electricoding.com X-Source: X-Source-Args: X-Source-Dir: 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 14:22:56 -0000 >>>>> "DB" == David Bremner writes: DB> 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 DB> The main issue, that I won't really address in this message (because I'm DB> hoping Austin finds time to comment) is upgrading the database. The short DB> version is that a new "database feature" needs to be created. I just discovered and starting using notmuch this week, so I'm not entirely familiar with the project yet. I had suspected there might be more work :) I'll look into the "database feature". My other thought was to just index the content-type with the attachment prefix. This would have made the first search that I attempted (without reading the docs/source) work (e.g. attachment:text/calendar or attachment:application/ics). Is this preferred to adding a new search term? >> --- a/NEWS >> +++ b/NEWS >> @@ -15,6 +15,12 @@ keyboard shortcuts to saved searches. >> Command-Line Interface >> ---------------------- DB> Minor point, 0.19 was released, you should start a new NEWS section for DB> 0.20 with date UNRELEASED I'll make that change. >> --- a/completion/notmuch-completion.bash >> +++ b/completion/notmuch-completion.bash DB> If you can without too much suffering, it would be nice to update the zsh completion at the same DB> time. I don't use zsh, but I'll look into what's needed. >> +The **contenttype:** prefix can be used to search for specific >> +content-types of attachments to email messages (as specified by the >> +sender). >> + DB> I'm not 100% sure, but I did wonder if the docs should mention MIME DB> somewhere, for people searching. Agreed. >> { "attachment", "XATTACHMENT" }, >> + { "contenttype", "XCONTENTTYPE"}, >> { "subject", "XSUBJECT"}, DB> I didn't work through all the details, but I did wonder if it was in DB> some sense redundant to be indexing contenttype and also the existing DB> attachement and encrypted pseudotags. I guess this might be one of DB> those cases where we are stuck with the extra indexing for now, until we DB> sort out some query parsing issues. DB> d - Todd