From: Michael Forney <mforney@mforney.org>
To: notmuch@notmuchmail.org
Subject: [PATCH 0/2] lib: Allow read-only messages to be synchronized to a writable database
Date: Mon, 10 Dec 2012 22:54:51 -0800 [thread overview]
Message-ID: <1355208893-16122-1-git-send-email-mforney@mforney.org> (raw)
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
next reply other threads:[~2012-12-11 6:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-11 6:54 Michael Forney [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355208893-16122-1-git-send-email-mforney@mforney.org \
--to=mforney@mforney.org \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).