unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Michal Sojka <sojkam1@fel.cvut.cz>
To: Arvid Picciani <aep@exys.org>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCHv2] Preserve folder information when indexing
Date: Tue, 2 Feb 2010 21:43:27 +0100	[thread overview]
Message-ID: <201002022143.27708.sojkam1@fel.cvut.cz> (raw)
In-Reply-To: <4B686569.7030408@exys.org>

On Tuesday 02 February 2010 18:48:25 Arvid Picciani wrote:
> On Tue,  2 Feb 2010 16:01:08 +0100, Michal Sojka<sojkam1@fel.cvut.cz>
> 
> wrote:
> > Stores the folder (directory name) of the message in the database as a
> > term with folder prefix.

Hi,

I've just made several experiments. I tested both Maildir layout (your case)
and non-Maildir layout and both layouts work correctly.

Then I tried to create notmuch database without this patch and then add new mails
and run notmuch new with the patch. It seems that in that case no folder terms
are added to the database. 

Probably DATABASE_VERSION should be increased by this patch, but I do not want
to do it until it is clear that this patch will be merged. Otherwise, there 
might be collision with other patches.
> 
> unfortunately it doesnt do anything here :/
> i rebuilt the entire index, but no folder: field is added.

How did you rebuild it? I deleted the .notmuch directory and run notmuch new.

> can anyone who got it working tell me their directory layout?
> mine would be something like:

If the above didn't help, try to apply this patch. If you see your folder names
during notmuch new, it should work.

Michal

---- 8< ------
diff --git a/lib/database.cc b/lib/database.cc
index ba2aa16..a22e226 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -1436,6 +1436,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
            date = notmuch_message_file_get_header (message_file, "date");
            _notmuch_message_set_date (message, date);
 
+           printf("folder=%s\n", folder_name);
            if (folder_name != NULL)
                _notmuch_message_gen_terms (message, "folder", folder_name);
 

  parent reply	other threads:[~2010-02-02 20:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-14 19:21 [patch] store folder information Andreas Klöckner
2009-12-15 12:16 ` Ruben Pollan
2009-12-15 19:57   ` Marten Veldthuis
2009-12-15 21:22 ` Carl Worth
2010-01-27 15:55 ` micah anderson
2010-01-28 15:24   ` Michal Sojka
2010-01-28 15:25     ` [PATCH 1/2] Skip German "aw:" prefix in subjects Michal Sojka
2010-01-28 15:25     ` [PATCH 2/2] Preserve folder information when indexing Michal Sojka
2010-01-28 17:13       ` micah anderson
2010-01-29  9:49         ` Michal Sojka
2010-02-02 15:01           ` [PATCHv2] " Michal Sojka
2010-02-02 16:20             ` Jameson Rollins
2010-02-02 16:52               ` Jameson Rollins
2010-02-02 17:48               ` Arvid Picciani
2010-02-02 18:22                 ` Jameson Rollins
2010-02-02 18:42                   ` Arvid Picciani
2010-02-02 21:31                   ` micah anderson
2010-02-02 22:25                     ` Michal Sojka
2010-02-02 22:36                       ` Jameson Rollins
2010-02-03  9:58                       ` Sebastian Spaeth
2010-02-02 20:43                 ` Michal Sojka [this message]
2010-02-03  7:56                 ` Sebastian Spaeth

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=201002022143.27708.sojkam1@fel.cvut.cz \
    --to=sojkam1@fel.cvut.cz \
    --cc=aep@exys.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).