[PATCH] Index Content-Type of attachments with a contenttype prefix
David Bremner
david at tethera.net
Sat Jan 10 01:00:14 PST 2015
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
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
More information about the notmuch
mailing list