teythoon/afew — pull request #88 by mnick (2014-08-18 17:05:43+00:00)
Title: Change semnatics of MailMover

Hi,
I would like to propose a slight change in the semantics of `MailMover` rules. Right now, `MailMover` requires a fixed source folder for which a query applies. However, I find this very inconvenient for rules like

```
Inbox = 'tag:deleted':Trash
```

since it requires to manually enter this rule for each maildir folder separately. This is especially inconvenient since notmuch also doesn't sync the deleted flag anymore.

The proposed patch changes the semantics of MailMover, such that `Trash =` in

```
Trash = 'tag:deleted AND NOT folder:Trash':Trash
```

only specifies the ID of the rule, but not the source folder. If a source folder is required, this could be added to the query separately, e.g.

```
Trash = 'tag:deleted AND folder:Inbox':Trash
````

I find this much more flexible then the previous semantics of `MailMover`.

However, I understand that this might break the setup for all users that currently rely on the old semantics. To fix this, the proposed `MailMover` could be added as an additional mover, e.g. `QueryBasedMailMover`.

Cheers,
Max