Re: [notmuch] [PATCHv2] Preserve folder information when indexing

Subject: Re: [notmuch] [PATCHv2] Preserve folder information when indexing

Date: Tue, 02 Feb 2010 11:20:02 -0500

To: Michal Sojka,


From: Jameson Rollins

On Tue,  2 Feb 2010 16:01:08 +0100, Michal Sojka <> wrote:
> Stores the folder (directory name) of the message in the database as a
> term with folder prefix.
> This patch was originally sent by Andreas Klöckner. The differences
> from the original patch are:
> - Folder name is taken from strings generated during travesal. It no
>   longer uses glib nor it allocates additional memory to determine the
>   base name. The same approach as in
> was used.
> - Removed unrelated change which was submitted separately as
> - Changed the comment describing database schema.
> TODO (see the previous Carl's email):
> - Support hierarchical folders

Hey, Michal.  Thank you very much for this patch!  This is right on with
what I mentioned as high-priority improvements.

I just gave it a try, though, and it seemed to be behaving a little
strangely.  I currently have two subdirectories, "inbox" and "sent".
However, new mail to either directory was showing up under the search:

notmuch search folder:inbox

and nothing was showing up under the search:

notmuch search folder:sent

I wonder if there's a problem with the logic it uses to determine the
folder naming?  Do you think you could look into this?  I would really
like to push to have a patch like this applied upstream soon.

part-000.sig (application/pgp-signature)