Re: [FEATURE] Purge ignored messages from index

2018-11-23 Thread Markus Weimar
Thanks for your reply! I only installed notmuch today, so please take this into 
account when considering my thoughts.

On Thu, 2018-11-22 13:33:06 -0400, David Bremner wrote:
> My first instinct would be to leave new as is, but change reindex to pay
> attention to some ignore parameter.

´new´ already removes messages from the index if the files are gone. Removing 
those but keeping newly ignored messages seems inconsistent to me and it did 
confuse me.

Why would I ever want to keep an ignored email in the index? In regard to 
indexing, I don’t see much of a difference between deleted and ignored. I don’t 
want search results for either.

I’d guess setting up notmuch and creating a ´notmuch new´ cronjob is not that 
uncommon. If a user later adds ignores, they are likely to run into this issue. 
If the indexing followed the config by purging anything ignored, this would 
“just work.”

Best wishes,
Markus
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [FEATURE] Purge ignored messages from index

2018-11-23 Thread Markus Weimar
On Thu, 2018-11-22 16:49:56 -0400, David Bremner wrote:
> Notmuch new works very hard to not visit files that haven't
> changed. Changing this would have a big negative performance impact, afaik.

I see. I thought it might be possible to purge the entries without looking at 
any files by doing a cheap comparison of indexed file path against ignored 
patterns. If that’s not possible, I agree that ´new´ shouldn’t be slowed down 
for this edge case.

> I care less about the performance of reindex; also it already
> rescans all the relevant messages, so I guess the performance impact
> would not be that bad.

Makes sense to me. Short notes in the docs and config file to run ´reindex 
'folder:'´ after adding new ignore patterns would prevent any such 
confusion.

Take care,
Markus
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[FEATURE] Purge ignored messages from index

2018-11-22 Thread Markus Weimar
Indexed but subsequently ignored messages remain indexed. I suggest to  purge 
them from the index as if the files were removed.

Example:

* Create index including spam directory
* Add spam directory to ignore list
* Neither ´new´ nor ´reindex 'folder:spam'´ purges the spam messages from the 
index

Markus
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch