unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/2] lib: Allow read-only messages to be synchronized to a writable database
@ 2012-12-11  6:54 Michael Forney
  2012-12-11  6:54 ` [PATCH 1/2] lib: Replace freeze/thaw functionality with single sync function Michael Forney
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Forney @ 2012-12-11  6:54 UTC (permalink / raw)
  To: notmuch

In developing ner (a notmuch ui), I open a read-only database connection so I
don't interfere with other notmuch programs, but this makes it difficult to
make modifications to the tags of messages I open.

The first patch replaces the freeze/thaw functionality with a single sync
function. This way, read-only messages can be modified just as writable ones
can be, but the notmuch_message_sync operation requires a writable database
connection.

The second patch adds a function `notmuch_database_sync_message' which will
perform the synchronization using the given database (and does not care if the
modified message was opened with a read-only database).

I've attempted to make these changes in the notmuch bindings as well, but
haven't tested them.

Feedback is welcome!

Michael Forney (2):
  lib: Replace freeze/thaw functionality with single sync function
  lib: Allow synchronizing message changes with a separate database
    connection

 bindings/go/src/notmuch/notmuch.go      |  70 ++++------------
 bindings/python/docs/source/message.rst |   4 +-
 bindings/python/notmuch/__init__.py     |   1 -
 bindings/python/notmuch/errors.py       |   7 --
 bindings/python/notmuch/message.py      | 141 ++++++++------------------------
 bindings/ruby/defs.h                    |   6 +-
 bindings/ruby/init.c                    |  12 +--
 bindings/ruby/message.c                 |  27 +-----
 bindings/ruby/status.c                  |   2 -
 contrib/notmuch-deliver/src/main.c      |  10 +++
 lib/database.cc                         |  21 +++--
 lib/message.cc                          |  92 +++++----------------
 lib/notmuch-private.h                   |   7 +-
 lib/notmuch.h                           | 107 ++++++++++--------------
 notmuch-new.c                           |   4 +-
 notmuch-tag.c                           |   4 +-
 tag-util.c                              |  10 +--
 17 files changed, 153 insertions(+), 372 deletions(-)

-- 
1.8.0

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

end of thread, other threads:[~2012-12-12  2:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11  6:54 [PATCH 0/2] lib: Allow read-only messages to be synchronized to a writable database Michael Forney
2012-12-11  6:54 ` [PATCH 1/2] lib: Replace freeze/thaw functionality with single sync function Michael Forney
2012-12-11  6:54 ` [PATCH 2/2] lib: Allow synchronizing message changes with a separate database connection Michael Forney
2012-12-12  2:19 ` [PATCH 0/2] lib: Allow read-only messages to be synchronized to a writable database Jameson Graef Rollins

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).