[PATCH] Index Content-Type of attachments with a contenttype prefix
Todd
todd at electricoding.com
Sat Jan 10 06:22:25 PST 2015
>>>>> "DB" == David Bremner <david at tethera.net> writes:
DB> Todd <todd at electricoding.com> 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
More information about the notmuch
mailing list