unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Synchronising mail and notmuch tags between machines
@ 2014-11-12 21:37 Edward Betts
  2014-11-13  8:30 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: Edward Betts @ 2014-11-12 21:37 UTC (permalink / raw)
  To: notmuch

I've written some code to synchronise mail between my server and laptop. I
have notmuch running on both machine, whenever mail is added to notmuch, it is
tagged as needing to be copied to the other machine, the tags are
sync-to-laptop and sync-to-server. Whenever I modify the tags on a mail I'm
careful to add the sync tag. My mail reader is configured to add the sync tag
whenever I make any changes to a mail.

Here is the code:

https://github.com/EdwardBetts/notmuch-pushy/

The synchronise code opens each database and checks for messages that need to
be synchronised, the tags are copied to the other database, if the mail is new
then content is copied as well. Then the sync tag is removed from the source
message.

I'm using a Python RPC module called pushy, it provides a simple way to
connect two python interpreters on different machines. Pushy provides proxy
objects to access remote objects as if they are local. These means I can
access the local and remote notmuch databases from within the same piece of
code.  All the communication happens over ssh, and pushy even provides methods
for copying files between the machines.

https://pythonhosted.org/pushy/
https://github.com/pushyrpc/pushy

My main todo item is reducing the amount of time that the write lock is held.
I should copy messages back and forth before grabbing the write lock to update
the tags.

It would be helpful if the notmuch would always add the sync tag when a
message was modified, unless the sync tag is explicitly being removed. That
way there is no risk of me forgetting to add the sync tag when I'm modifying
tags using the command line tools.
-- 
Edward.

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

* Re: Synchronising mail and notmuch tags between machines
  2014-11-12 21:37 Synchronising mail and notmuch tags between machines Edward Betts
@ 2014-11-13  8:30 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2014-11-13  8:30 UTC (permalink / raw)
  To: Edward Betts, notmuch

Edward Betts <edward@4angle.com> writes:
>
> It would be helpful if the notmuch would always add the sync tag when a
> message was modified, unless the sync tag is explicitly being removed. That
> way there is no risk of me forgetting to add the sync tag when I'm modifying
> tags using the command line tools.
> -- 

Hi Edward;

You may want to look at the patch series

    id:1413181203-1676-1-git-send-email-aclements@csail.mit.edu

If it helps your tool, you might even want to help polish the series so
that it can be merged upstream.

Cheers,

d

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

end of thread, other threads:[~2014-11-13  8:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-12 21:37 Synchronising mail and notmuch tags between machines Edward Betts
2014-11-13  8:30 ` 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).