Tag duplicate messages with notmuch insert

classic Classic list List threaded Threaded
5 messages Options
Thomas Schneider Thomas Schneider
Reply | Threaded
Open this post in threaded view
|

Tag duplicate messages with notmuch insert

From notmuch-insert(1):

> If the new message is a duplicate of an existing message in the
> database (it has same Message-ID), it will be added to the maildir
> folder and notmuch database, but the tags will not be changed.

It might however be desired to apply the new tags even when the message
is a duplicate.  How complicated would it be to implement this?
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: Tag duplicate messages with notmuch insert

Thomas Schneider <[hidden email]> writes:

> From notmuch-insert(1):
>
>> If the new message is a duplicate of an existing message in the
>> database (it has same Message-ID), it will be added to the maildir
>> folder and notmuch database, but the tags will not be changed.
>
> It might however be desired to apply the new tags even when the message
> is a duplicate.  How complicated would it be to implement this?

It doesn't look especially hard, assuming the obvious small change to
add_file() in notmuch-insert.c works. I didn't look at the equivalent
code path in notmuch-new.c. Presumably you'd want them both to behave
the same way.

d

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: Tag duplicate messages with notmuch insert

David Bremner <[hidden email]> writes:

> Thomas Schneider <[hidden email]> writes:
>
>> From notmuch-insert(1):
>>
>>> If the new message is a duplicate of an existing message in the
>>> database (it has same Message-ID), it will be added to the maildir
>>> folder and notmuch database, but the tags will not be changed.
>>
>> It might however be desired to apply the new tags even when the message
>> is a duplicate.  How complicated would it be to implement this?
>
> It doesn't look especially hard, assuming the obvious small change to
> add_file() in notmuch-insert.c works. I didn't look at the equivalent
> code path in notmuch-new.c. Presumably you'd want them both to behave
> the same way.

Just to be clear, I wasn't commenting on whether it was the right thing
to do or not, just whether it would be hard. It seems likely to be
annoying to at least some people to have messages show up as unread
again (or whatever the tags are) when new copies arrive.

d
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Thomas Schneider Thomas Schneider
Reply | Threaded
Open this post in threaded view
|

Re: Tag duplicate messages with notmuch insert

David Bremner <[hidden email]> writes:

> Just to be clear, I wasn't commenting on whether it was the right thing
> to do or not, just whether it would be hard. It seems likely to be
> annoying to at least some people to have messages show up as unread
> again (or whatever the tags are) when new copies arrive.

Oh, I meant as an option of course, with a default to keep the current
behaviour.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Martin Jambor Martin Jambor
Reply | Threaded
Open this post in threaded view
|

Re: Tag duplicate messages with notmuch insert

In reply to this post by David Bremner-2
Hi,

On Mon, Oct 15 2018, David Bremner wrote:

> David Bremner <[hidden email]> writes:
>
>> Thomas Schneider <[hidden email]> writes:
>>
>>> From notmuch-insert(1):
>>>
>>>> If the new message is a duplicate of an existing message in the
>>>> database (it has same Message-ID), it will be added to the maildir
>>>> folder and notmuch database, but the tags will not be changed.
>>>
>>> It might however be desired to apply the new tags even when the message
>>> is a duplicate.  How complicated would it be to implement this?
>>
>> It doesn't look especially hard, assuming the obvious small change to
>> add_file() in notmuch-insert.c works. I didn't look at the equivalent
>> code path in notmuch-new.c. Presumably you'd want them both to behave
>> the same way.
>
> Just to be clear, I wasn't commenting on whether it was the right thing
> to do or not, just whether it would be hard. It seems likely to be
> annoying to at least some people to have messages show up as unread
> again (or whatever the tags are) when new copies arrive.
>

[If enabled,] such messages should get only the +new tag, not the +unread
tag.  Or whatever the user configured, of course.

Martin
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch