Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A6DEE40BC41 for ; Thu, 12 Aug 2010 08:26:23 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id As9+MLORtjGk for ; Thu, 12 Aug 2010 08:26:13 -0700 (PDT) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id 2947140BC40 for ; Thu, 12 Aug 2010 08:26:13 -0700 (PDT) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id 2D7D219F3310; Thu, 12 Aug 2010 17:26:08 +0200 (CEST) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id Or70ivRkcH4G; Thu, 12 Aug 2010 17:26:06 +0200 (CEST) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id E0F9719F2F45; Thu, 12 Aug 2010 17:26:06 +0200 (CEST) Received: from steelpick.2x.cz (note-sojka.felk.cvut.cz [147.32.86.30]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id D2036FA00B; Thu, 12 Aug 2010 17:26:06 +0200 (CEST) Received: from wsh by steelpick.2x.cz with local (Exim 4.72) (envelope-from ) id 1OjZfS-0005JW-Bi; Thu, 12 Aug 2010 17:26:06 +0200 From: Michal Sojka To: Stephen Paul Weber Subject: Re: Can't get notmuch to find mail In-Reply-To: <20100812145421.GA1531@singpolyma-svelti> References: <20100805175511.GA1494@singpolyma-svelti> <87r5i3gail.fsf@steelpick.2x.cz> <20100812145421.GA1531@singpolyma-svelti> User-Agent: Notmuch/0.3.1-80-g86b7c46 (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Thu, 12 Aug 2010 17:26:06 +0200 Message-ID: <87iq3fg8dt.fsf@steelpick.2x.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2010 15:26:23 -0000 On Thu, 12 Aug 2010, Stephen Paul Weber wrote: > For me: >=20 > $ delve -t XFROMsingpolyma xapian > term `XFROMsingpolyma' not in database > $ delve -t XFROMdenver xapian > term `XFROMdenver' not in database > $ delve -V -r 1 xapian > Values for record #1: 0:=C3=A0\=C3=86.=C2=BEp > Term List for record #1: XDIRECTORY > $ delve -V -r 2 xapian > Values for record #2: > Error: DocNotFoundError: Document 2 not found. Hmm, so you do not have the messages in the database. On which platform (and filesystem) you are? Could you run notmuch new through strace and/or apply the patch bellow and send the output? -Michal diff --git a/notmuch-new.c b/notmuch-new.c index 8818728..2fef9d1 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -298,6 +298,9 @@ add_files_recursive (notmuch_database_t *notmuch, } =20 next =3D talloc_asprintf (notmuch, "%s/%s", path, entry->d_name); + + printf ("Pass 1 recursing into : %s =3D %s\n", entry->d_name, next); + status =3D add_files_recursive (notmuch, next, state); if (status && ret =3D=3D NOTMUCH_STATUS_SUCCESS) ret =3D status; @@ -307,8 +310,10 @@ add_files_recursive (notmuch_database_t *notmuch, =20 /* If this directory hasn't been modified since the last * "notmuch new", then we can skip the second pass entirely. */ - if (fs_mtime <=3D db_mtime) + if (fs_mtime <=3D db_mtime) { + printf ("Skipping pass 2 (old mtime)\n"); goto DONE; + } =20 /* Pass 2: Scan for new files, removed files, and removed directories.= */ for (i =3D 0; i < num_fs_entries; i++) @@ -318,6 +323,8 @@ add_files_recursive (notmuch_database_t *notmuch, =20 entry =3D fs_entries[i]; =20 + printf ("Pass 2 looking at: %s\n", entry->d_name); + /* Check if we've walked past any names in db_files or * db_subdirs. If so, these have been deleted. */ while (notmuch_filenames_valid (db_files) && @@ -380,6 +387,7 @@ add_files_recursive (notmuch_database_t *notmuch, if (notmuch_filenames_valid (db_files) && strcmp (notmuch_filenames_get (db_files), entry->d_name) =3D=3D= 0) { + printf ("Pass 2 skipping: %s (already added)\n", entry->d_name); notmuch_filenames_move_to_next (db_files); continue; }