Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration is not took in account when using --enable-filters #40

Open
np opened this issue Sep 3, 2012 · 7 comments
Open

Configuration is not took in account when using --enable-filters #40

np opened this issue Sep 3, 2012 · 7 comments

Comments

@np
Copy link

np commented Sep 3, 2012

For instance when using:

afew -e ArchiveSentMailsFilter -a

I found no way to set the sent_tag option. In particular putting it in the config was useless.

@teythoon
Copy link
Collaborator

Yes, that's a problem. FWIW I consider just dropping the -e command line switch b/c I do not believe that it provides a real benefit. Do you see a reason to keep it and fix the behavior?

@np
Copy link
Author

np commented Sep 17, 2012

On Mon 17 Sep 2012 - 04:32:57 [-0700], Justus Winter wrote:

Yes, that's a problem. FWIW I consider just dropping the -e command line switch b/c I do not believe that it provides a real benefit. Do you see a reason to keep it and fix the behavior?

I don't mind. I found it convenient but then lost quite a long time figuring
what is issue was. So I agree that it is better to remove it than to keep it
buggy.

A compromise would be to have a switch to filter out some filters. In this
case the semantic is simpler and this also fulfill my use case.

Nicolas Pouillard
http://nicolaspouillard.fr

@mjg
Copy link
Contributor

mjg commented Jun 20, 2018

-e is still not useful, especially with a filter like FolderNameFilter which makes no sense without config. I do think that the config should be taken into account.

My use case would be: notmuch new does not set any special tag (neither new nor renew) on renamed messages, so that afew -t -n misses out on running FolderNameFilter when you move messages to a different folder using IMAP or so. Which, again, defeats the purpose. Running afew -t -e FolderNameFilter query:myCleverQuery would be a way to work around.

Alternative approach: patch notmuch...

@matclab
Copy link

matclab commented Jun 25, 2018

-e looks usefull when you want to apply some filters to all mails, (not only new one), but you do not want to run all other filters on not new mails.

For example, I'm writing a filer to snooze mails, and it had to work on old mail. So my notmuch post-new hook looks like:

#!/bin/sh
/usr/bin/afew --tag --new
/usr/bin/afew --tag -e SnoozeFilter tag:pending
/usr/bin/afew --move --all

@varac
Copy link

varac commented Jul 5, 2018

I ran into the same issue. Please fix it, it also took me quite some time to realise that this is indeed a bug and not me.

@mjg
Copy link
Contributor

mjg commented Jul 6, 2018

Update: I have a patch for notmuch that tags renamed (moved) messages, I'll try to upstream it shortly.

This would support the mentioned use case: run afew -e FolderFilter tag:renamed to adjust the tags. Well, if afew heeds the config, of course.

@muradm
Copy link

muradm commented May 18, 2019

Agreed with @matclab, ability to run single filter without relaying on config file is useful.

Also relates to #237, in the way that, if it would be possible to run afew with different configurations, then dropping of -e flag won't hurt. If we can use different configs for every execution, that effectively will cover case of -e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants