-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Allow to tag sent messages with same tags as message being replied to #581
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good, see inline comment.
|
||
if (!parent_mid.empty () && | ||
find(additional_sent_tags.begin(), additional_sent_tags.end(), "*") != additional_sent_tags.end()) { | ||
notmuch_message_t * parent_msg; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to use on_message
here, takes care of cleaning up the parent_msg. Might also be better to instantiate a NotmuchMessage
on parent_msg
, there is already a get_tags
function which is more robust. NotmuchMessage
should be cheap objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll have a look at that.
Lars Kotthoff writes on October 20, 2018 21:56:
This PR introduces special values to `accounts.<account>.additional_sent_tags`, namely '*' (apply all tags that the message being replied to, if any, has), and '-<tag>' (to exclude tags from being applied). For example, the option "foo,*,-attachment" applies the tag "foo" and any tags the message being replied to has, except for "attachment".
Does the syntax also work for the general `mail.sent_tags`?
|
Good idea, I'll add that. |
I've changed the code to use |
Lars Kotthoff writes on October 22, 2018 18:04:
I've changed the code to use `NotmuchMessage`. Turns out that this syntax for the general `mail.sent_tags` was already supported because I'm doing the processing after merging in those tags.
Merged, thanks. Sorry for the delay. Could you please update the
configuration reference for the two relevant config options?
|
Thanks, done! |
This PR introduces special values to
accounts.<account>.additional_sent_tags
, namely*
(apply all tags that the message being replied to, if any, has), and-<tag>
(to exclude tags from being applied). For example, the option "foo,*,-attachment" applies the tag "foo" and any tags the message being replied to has, except for "attachment".