unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Strange behavior on manually files moving
@ 2013-03-20  9:02 kedals0
  2013-03-29 22:15 ` Jani Nikula
  0 siblings, 1 reply; 2+ messages in thread
From: kedals0 @ 2013-03-20  9:02 UTC (permalink / raw)
  To: notmuch

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 ?

Thx,
Dal.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Strange behavior on manually files moving
  2013-03-20  9:02 Strange behavior on manually files moving kedals0
@ 2013-03-29 22:15 ` Jani Nikula
  0 siblings, 0 replies; 2+ messages in thread
From: Jani Nikula @ 2013-03-29 22:15 UTC (permalink / raw)
  To: kedals0, notmuch

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-29 22:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-20  9:02 Strange behavior on manually files moving kedals0
2013-03-29 22:15 ` Jani Nikula

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).