github mirror

Austin Clements amdragon at MIT.EDU
Sun Apr 27 15:37:17 PDT 2014


Quoth Sam Halliday on Apr 27 at 12:09 pm:
> But in any case, my RFE/question was this: how hard would it be to have
> an optional mode of behaviour where tags are stored in the message
> itself, so that syncing with an IMAP server (e.g. via offlineimap)
> would make the tags available on all devices. This would negate the need
> for workarounds, such as shared notmuch databases, when users have
> multiple machines.
> 
> It would also allow applications like offlineimap to introduce a gmail
> plugin that would copy the message into a folder according to its tags,
> so gmail labels and notmuch tags would be in sync.

FWIW, we've discussed being able to configure a bi-directional mapping
between folders and notmuch tags, using hard links (or simply message
copies) to map messages with multiple tags to multiple file system
folders.  There's been some prototyping [1], though no serious code.
If this did happen, you'd be able to sync Gmail labels with notmuch
tags without any help from OfflineIMAP (OfflineIMAP could perform
better and use less disk space if it knew how to set up hard links
when talking to Gmail, but this would be entirely independent of
notmuch).  You might also be able to work out cross-device sync, using
IMAP folder synchronization as a channel for tag synchronization.

As for storing this information directly in messages, in general, the
notmuch community is opposed to modifying messages.  This causes many
problems, and immutable messages are more robust and simplify so many
things.  IMAP assumes messages are immutable.  Maildir assumes
messages are immutable.  Notmuch new would get dramatically slower if
it had to check for messages modifications.  What do you do if you
change a tag and there are multiple copies of a message?  What do you
do if there are multiple copies and they disagree about the tags?  How
do you atomically update the tags stored in a message?  From an
engineering standpoint, it's much better to avoid mutable messages.

[1] id:874nk8v9zw.fsf at zancas.localnet


More information about the notmuch mailing list