unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* notmuch-lazysync -- synchronizing tags using dropbox
@ 2015-07-21 18:41 Daniel Schoepe
  2015-07-22  0:16 ` David Mazieres
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Schoepe @ 2015-07-21 18:41 UTC (permalink / raw)
  To: notmuch

Hi,

I needed a way to synchronize notmuch tags between machines without
having to sync all my mail as well (à la muchsync) and without using
Gmail labels for this. As a result, I ended up writing a small tool to
do this by using normal file synchronizers like seafile[1] or dropbox to
do the actual synchronization (since I was too lazy to (re)implement
this).

Since it's impractical to have the entire notmuch database synchronized
through dropbox, the tool uses a small sqlite database to record tag
commands performed on one machine and replay them on the others. This
works well if mail sorting is done on each machine separately and only
tag modifications performed in the frontend need to be recorded. The way
tag changes are logged is a bit of a hack, but it could be improved in
the future by adding a post-tag hook to notmuch.

More information can be found on github:

https://github.com/dschoepe/notmuch-lazysync

I hope someone else finds this useful as well.

Best regards,
Daniel

[1] https://www.seafile.com/en/home/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: notmuch-lazysync -- synchronizing tags using dropbox
  2015-07-21 18:41 notmuch-lazysync -- synchronizing tags using dropbox Daniel Schoepe
@ 2015-07-22  0:16 ` David Mazieres
  2015-07-22  9:19   ` David Bremner
  0 siblings, 1 reply; 3+ messages in thread
From: David Mazieres @ 2015-07-22  0:16 UTC (permalink / raw)
  To: Daniel Schoepe, notmuch

Daniel Schoepe <daniel@schoepe.org> writes:

> The way tag changes are logged is a bit of a hack, but it could be
> improved in the future by adding a post-tag hook to notmuch.

One thing to look into, if you are thinking of a better logging
mechanism, is that Xapian itself has a change logging mechanism for
replicating databases (http://xapian.org/docs/replication.html).

I do think it would be cleaner to do this in a way that is integrated
with notmuch, but I think the best way to do this is to integrate a
"modtime" value into the Xapian database.  Having a modtime for each
record would not only allow incremental transfers (just record the
highest timestamp sent to each replica), it would also solve this
terrible problem that in emacs you can end up tagging messages you don't
see (because you apply a tag to the query result, when new mail has come
in--which would be solved by tagging only through the higest modtime
actually displayed).

When you have one mechanism (modtime) that solves multiple problems, it
is likely the right thing to use...

David

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: notmuch-lazysync -- synchronizing tags using dropbox
  2015-07-22  0:16 ` David Mazieres
@ 2015-07-22  9:19   ` David Bremner
  0 siblings, 0 replies; 3+ messages in thread
From: David Bremner @ 2015-07-22  9:19 UTC (permalink / raw)
  To: David Mazieres expires 2015-10-19 PDT, Daniel Schoepe, notmuch

David Mazieres <dm-list-email-notmuch@scs.stanford.edu> writes:

>
> When you have one mechanism (modtime) that solves multiple problems, it
> is likely the right thing to use...
>

someone (TM) just needs to review the patches at

        id:1433525318-23756-1-git-send-email-david@tethera.net

d

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-22  9:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-21 18:41 notmuch-lazysync -- synchronizing tags using dropbox Daniel Schoepe
2015-07-22  0:16 ` David Mazieres
2015-07-22  9:19   ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).