On Wed, 20 Mar 2013, kedals0@gmail.com wrote: > Hello, > > When I manually move some messages, these changes are detected by > notmuch but it doesn't remove these files of its database. > I think, it's more clear to show you an example: > > 1) Initialisation > toto@compaq:~$ notmuch new > No new mail. > > 2) I show you the initial location of the message that we will move > toto@compaq:~$ ls /home/toto/mail/drafts/cur/#*message*-20130312-163131#:2,DS > /home/toto/mail/drafts/cur/#*message*-20130312-163131#:2,DS > > 3) we move this message > toto@compaq:~$ mv /home/toto/mail/drafts/cur/#*message*-20130312-163131#:2,DS /home/toto/mail/local/trash/cur/ > > 4) we update notmuch database > toto@compaq:~$ notmuch new > Processed 1 file in almost no time. > No new mail. Removed 1 message. > > 5) we can observe that old message location still exist in the db > toto@compaq:~$ notmuch search --output=files tag:draft folder:local/trash/ > /home/toto/mail/local/trash/cur/#*message*-20130312-163131#:2,DS > /home/toto/mail/drafts/cur/#*message*-20130312-163131#:2,DS > > 6) but no file exist at this location. > toto@compaq:~$ ls /home/toto/mail/drafts/cur/#*message*-20130312-163131#:2,DS > ls: impossible d'accéder à /home/toto/mail/drafts/cur/#*message*-20130312-163131#:2,DS: Aucun fichier ou dossier de ce type > > > I don't understand this problem because this usecase is close from a > file deletion which works. > > Would anyone have an idea ? What do you have in 'notmuch config get new.ignore'? Have you changed this setting recently? I could reproduce something similar by adding an ignore on a folder that had files indexed by notmuch: $ cd /path/to/maildir $ mkdir foo $ mkdir bar $ # deliver a message to foo/baz $ notmuch new Processed 1 file in almost no time. Added 1 new message to the database. $ notmuch config set new.ignore foo $ mv foo/baz bar $ notmuch new --debug (D) add_files_recursive, pass 1: explicitly ignoring /path/to/maildir/foo Processed 1 file in almost no time. No new mail. $ notmuch search --output=files folder:bar /path/to/maildir/foo/baz /path/to/maildir/bar/baz Note that the last search finds messages that have at least one associated file in a folder matching bar, and then outputs *all* the associated files for the messages. Here, the ignore has caused notmuch to not notice the file in foo has been deleted. BR, Jani.