unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Carl Worth <cworth@cworth.org>
To: notmuch@notmuchmail.org
Subject: Folder-based searching
Date: Sat, 15 Jan 2011 14:46:53 -0800	[thread overview]
Message-ID: <87tyh9wzs2.fsf@yoom.home.cworth.org> (raw)

I'm as sad as anyone to see that I let more than a month go by without
committing to the notmuch repository.

But I've just now committed the much-desired folder-based search
feature.

This should be a handy feature for people bringing mail in from a system
that stores information in the directories in which mail is stored, (one
common case is users fetching mail from gmail via imap---in this case
all gmail tags will be represented as directories).

Someone bringing in mail from such a system might want to migrate from
information in directory names to instead be information in notmuch
tags. That might look something like this:

	notmuch tag +important folder:important

Or it might be useful to run on several directories:

	for dir in *; do notmuch tag +"$dir"; folder:"$dir"; done

etc.

Please note that with the code in git currently, only newly incorporated
mail will be searchable via the "folder:" specification. So if you're
wanting to search your entire email collection, you may want to rebuild
your entire notmuch database. As a reminder, that process is something
like the following:

    notmuch dump > notmuch.dump
    rm -rf ~/mail/.notmuch	# Careful with this! Have backups in place!
    notmuch new			# Of course, this can take a long time
    notmuch restore notmuch.dump

Before the next release, I plan to increment the database version so
that users will be notified of the need to do an upgrade like this. (But
before I do that, I plan to implement a few more database changes---and
some of them are likely to be much more invasive than this one).

Have fun out there!

-Carl

             reply	other threads:[~2011-01-15 22:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-15 22:46 Carl Worth [this message]
2011-01-17  6:17 ` Folder-based searching Xavier Maillard
2011-01-17 12:43 ` Sebastian Spaeth
2011-01-17 13:00   ` Sebastian Spaeth
2011-03-12 23:44     ` [PATCH] test: "search-by-folder" single-word search terms should be updated correctly when directories are renamed Pieter Praet
2011-05-12 13:22       ` Pieter Praet
2011-05-12 16:04         ` Jameson Graef Rollins
2011-05-13  8:06           ` [PATCH] test: do folder-based search with a single-term path after moving message Pieter Praet
2011-01-17 18:48 ` Folder-based searching Rob Browning
2011-01-18 19:09   ` Carl Worth
2011-01-18 19:54     ` Rob Browning
2011-01-18 20:16       ` Carl Worth
2011-01-19  7:29       ` Austin Clements
  -- strict thread matches above, loose matches on Subject: below --
2011-01-21 10:45 mazieres-6kd3dvy8f9kx6dc7vcsytfvnai
2011-01-21 16:59 ` Carl Worth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tyh9wzs2.fsf@yoom.home.cworth.org \
    --to=cworth@cworth.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).