unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Michal Sojka <sojkam1@fel.cvut.cz>
To: Stephen Paul Weber <singpolyma@singpolyma.net>
Cc: notmuch@notmuchmail.org
Subject: Re: Can't get notmuch to find mail
Date: Thu, 12 Aug 2010 17:26:06 +0200	[thread overview]
Message-ID: <87iq3fg8dt.fsf@steelpick.2x.cz> (raw)
In-Reply-To: <20100812145421.GA1531@singpolyma-svelti>

On Thu, 12 Aug 2010, Stephen Paul Weber wrote:
> For me:
> 
> $ 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:à\Æ.¾p
> 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,
        }
 
        next = talloc_asprintf (notmuch, "%s/%s", path, entry->d_name);
+
+       printf ("Pass 1 recursing into : %s = %s\n", entry->d_name, next);
+
        status = add_files_recursive (notmuch, next, state);
        if (status && ret == NOTMUCH_STATUS_SUCCESS)
            ret = status;
@@ -307,8 +310,10 @@ add_files_recursive (notmuch_database_t *notmuch,
 
     /* If this directory hasn't been modified since the last
      * "notmuch new", then we can skip the second pass entirely. */
-    if (fs_mtime <= db_mtime)
+    if (fs_mtime <= db_mtime) {
+       printf ("Skipping pass 2 (old mtime)\n");
        goto DONE;
+    }
 
     /* Pass 2: Scan for new files, removed files, and removed directories. */
     for (i = 0; i < num_fs_entries; i++)
@@ -318,6 +323,8 @@ add_files_recursive (notmuch_database_t *notmuch,
 
         entry = fs_entries[i];
 
+       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) == 0)
        {
+           printf ("Pass 2 skipping: %s (already added)\n", entry->d_name);
            notmuch_filenames_move_to_next (db_files);
            continue;
        }

  reply	other threads:[~2010-08-12 15:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-05 17:55 Can't get notmuch to find mail Stephen Paul Weber
2010-08-11 13:07 ` Bryan Hunt
2010-08-12 14:40 ` Michal Sojka
2010-08-12 14:54   ` Stephen Paul Weber
2010-08-12 15:26     ` Michal Sojka [this message]
     [not found]       ` <20100812153324.GB1531@singpolyma-svelti>
2010-08-12 21:16         ` Michal Sojka
2010-08-12 21:29           ` Stephen Paul Weber
2010-08-12 22:46             ` Michael Hudson

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=87iq3fg8dt.fsf@steelpick.2x.cz \
    --to=sojkam1@fel.cvut.cz \
    --cc=notmuch@notmuchmail.org \
    --cc=singpolyma@singpolyma.net \
    /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).