unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/4] Mailstore abstraction v4
@ 2010-04-08 14:42 Michal Sojka
  2010-04-08 14:42 ` [PATCH 1/4] Mailstore abstraction interface Michal Sojka
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Michal Sojka @ 2010-04-08 14:42 UTC (permalink / raw)
  To: notmuch

Hi all,

this is the fourth version of my mailstore abstraction series. I split
it into two parts, with the first part being sent here. I think that
this part becomes mostly ready for merging.

From the user's point of view, it adds only the 'cat' subcommand and
modifies the .el to use it. Thanks to this change it is easy to use
Emacs client with the database accessed remotely over SSH. The only
additional patch that must be applied is
id:m1my03gsmu.fsf@watt.gilman.jhu.edu. The rebased version is at
http://rtime.felk.cvut.cz/gitweb/notmuch.git/shortlog/refs/heads/jr/quote-args-in-notmuch-show
and can be pulled by 'git pull git://rtime.felk.cvut.cz/notmuch.git
jr/quote-args-in-notmuch-show').

More importantly, there are bigger changes for developers. Since it
might be quite painful to rebase these patches to quickly changing
master (as of the last few days) I'd like to have these merged ASAP.

So the patches here are the following:

Michal Sojka (4):
  Mailstore abstraction interface
  Conversion to mailstore abstraction
  Access messages through mail store interface
  Add 'cat' subcommand

My biggest question relates to the first patch, which does an
incompatible change to libnotmuch API. After reading RELEASING file, I
found that this change is probably not what Carl wants to merge (and I
understand that) so I'd like to get some feedback on my suggestion in
that patch.

The subsequent patches are quite straightforward and the comments
there should describe what these patches do.

These patches are also located at git://rtime.felk.cvut.cz/notmuch.git
and tagged by mailstore-abstraction-v4-part1.

This is the overall diffstat:
 NEWS                                   |    3 +
 emacs/notmuch-show.el                  |   11 +-
 lib/Makefile.local                     |    2 +
 lib/database-private.h                 |    1 +
 lib/database.cc                        |   29 +-
 lib/index.cc                           |    8 +-
 notmuch-new.c => lib/mailstore-files.c |  418 +++++----------------
 lib/mailstore-private.h                |   59 +++
 lib/mailstore.c                        |   80 ++++
 lib/message-file.c                     |    8 +-
 lib/message.cc                         |   46 ++-
 lib/notmuch-private.h                  |    6 +-
 lib/notmuch.h                          |   98 +++++-
 lib/sha1.c                             |    6 +-
 notmuch-client.h                       |   12 +-
 notmuch-config.c                       |   34 ++
 notmuch-count.c                        |    3 +-
 notmuch-dump.c                         |    3 +-
 notmuch-new.c                          |  658 +++-----------------------------
 notmuch-reply.c                        |   13 +-
 notmuch-restore.c                      |    3 +-
 notmuch-search-tags.c                  |    3 +-
 notmuch-search.c                       |    3 +-
 notmuch-show.c                         |   82 ++++-
 notmuch-tag.c                          |    3 +-
 notmuch.c                              |    4 +
 show-message.c                         |   14 +-
 27 files changed, 621 insertions(+), 989 deletions(-)
 copy notmuch-new.c => lib/mailstore-files.c (61%)
 create mode 100644 lib/mailstore-private.h
 create mode 100644 lib/mailstore.c

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Mailstore abstraction & maildir synchronization
@ 2010-03-18 15:39 Michal Sojka
  2010-03-18 15:39 ` [PATCH 1/4] Mailstore abstraction interface Michal Sojka
  0 siblings, 1 reply; 10+ messages in thread
From: Michal Sojka @ 2010-03-18 15:39 UTC (permalink / raw)
  To: notmuch

Hi all,

I've finally found some time to implement the mailstore abstraction
was initially described in id:87ljecmnbd.fsf@steelpick.localdomain and
id:87eijqlz54.fsf@steelpick.localdomain.

The idea is to allow notmuch operate on different types of mail
storage (e.g. mail in git repositories) and to store the tags in the
storage together with mails. The aim is the ability to synchronize
mails and tags between computers. The following patch series is the
first version which I'm able to use on daily basis so I'd like to get
some feedback.

In the current form, the patch series implements two mail stores:
1. plain files (compatible with the current notmuch)
2. maildir (synchronizes certain tags with maildir flags)

The series passes the test suite. For the maildir store, there are
additional tests, but you need need the modularized testsuite (taken
from git). The whole patch series is also available from
git://rtime.felk.cvut.cz/notmuch.git mailstore-abstraction-v1 (this
branch wont be rebased).

Known bugs and limitations:

- Only file-based storage is suported. Notmuch access the files
  directly, and not via the mailstore interface.

- (maildir) Viewing/storing of attachments of unread messages doesn't
  work. The reason is that when you view the message it its unread tag
  is removed which leads to rename of the file, but Emacs still uses
  the original name to access the attachment.

  Workaround: close the message and open it again.

Maildir howto:

1. Backup you emails
2. Apply the patches (at least 1-3)
3. Configure notmuch to use maildir store
cat > ~/.notmuch-config <<EOF
[mailstore]
type=maildir
EOF
4. Enjoy

Advantages for me:

- Whenever I read a message my mobile phone gets that information
  since I run offlineimap periodically on background.
- My mailsync script (notmuch new + tagging) is much faster because it
  does not call offlineimap and notmuchsync (two times). I call it
  manually, because I want to decide when new mail should appear.

Cheers,
-Michal

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

end of thread, other threads:[~2010-04-14 14:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-08 14:42 [PATCH 0/4] Mailstore abstraction v4 Michal Sojka
2010-04-08 14:42 ` [PATCH 1/4] Mailstore abstraction interface Michal Sojka
2010-04-13 17:53   ` Carl Worth
2010-04-13 21:49     ` Stewart Smith
2010-04-14  8:50     ` Michal Sojka
2010-04-08 14:42 ` [PATCH 2/4] Conversion to mailstore abstraction Michal Sojka
2010-04-08 14:42 ` [PATCH 3/4] Access messages through mail store interface Michal Sojka
2010-04-08 14:42 ` [PATCH 4/4] Add 'cat' subcommand Michal Sojka
2010-04-13 18:43 ` [PATCH 0/4] Mailstore abstraction v4 Carl Worth
  -- strict thread matches above, loose matches on Subject: below --
2010-03-18 15:39 Mailstore abstraction & maildir synchronization Michal Sojka
2010-03-18 15:39 ` [PATCH 1/4] Mailstore abstraction interface Michal Sojka

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