Synchronise tags to flags#148
Open
paretje wants to merge 1 commit into
Open
Conversation
Contributor
Contributor
|
Pulled into branch: devel/notmuch-sync-flags |
Owner
|
Sounds good, but as suggested by @flatcap it would be better to continue in neomutt. |
flatcap
pushed a commit
to neomutt/neomutt
that referenced
this pull request
Oct 6, 2016
Currently, flags are synced to tags, but the reverse isn't true. If you mark a mail as unread "the mutt way", you'll be able to find this mail using tag:unread, however if you remove the tag unread, the flags aren't adjusted, and it's still marked unread in mutt. This functionality is provided by notmuch, but means that any mail has to be synced to disc when the labels are modified, which conflicts with the way synchronisation to disk works in mutt. To solve this properly, it's best to just check if the changes performed in the tags involve some flags handled by mutt, and if so, update the header in mutt. When mutt syncs to disc, the flags will be adjusted on disc as well. Some remarks: - The parsing code is currently duplicated. I'll fix this. - The labels are currently hard-coded. It seems like notmuch doesn't allow customisation of these labels, but mutt-kz does for unread. - The draft and passed labels are currently ignored, as they aren't handled by mutt. Closes: karelzak/mutt-kz#148
Contributor
|
Thanks, merged into NeoMutt. |
flatcap
pushed a commit
to neomutt/neomutt
that referenced
this pull request
Oct 6, 2016
Currently, flags are synced to tags, but the reverse isn't true. If you mark a mail as unread "the mutt way", you'll be able to find this mail using tag:unread, however if you remove the tag unread, the flags aren't adjusted, and it's still marked unread in mutt. This functionality is provided by notmuch, but means that any mail has to be synced to disc when the labels are modified, which conflicts with the way synchronisation to disk works in mutt. To solve this properly, it's best to just check if the changes performed in the tags involve some flags handled by mutt, and if so, update the header in mutt. When mutt syncs to disc, the flags will be adjusted on disc as well. Some remarks: - The parsing code is currently duplicated. I'll fix this. - The labels are currently hard-coded. It seems like notmuch doesn't allow customisation of these labels, but mutt-kz does for unread. - The draft and passed labels are currently ignored, as they aren't handled by mutt. Closes: karelzak/mutt-kz#148
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, flags are synced to tags, but the reverse isn't true. If you mark a mail as unread "the mutt way", you'll be able to find this mail using
tag:unread, however if you remove the tagunread, the flags aren't adjusted, and it's still marked unread in mutt.This functionality is provided by notmuch, but means that any mail has to be synced to disc when the labels are modified, which conflicts with the way synchronisation to disk works in mutt.
To solve this properly, it's best to just check if the changes performed in the tags involve some flags handled by mutt, and if so, update the header in mutt. When mutt syncs to disc, the flags will be adjusted on disc as well.
Some remarks:
unread. Would you prefer if I added and used configuration variables for the other labels?draftandpassedlabels are currently ignored, as they aren't handled by mutt.