Re: [notmuch] Mailstore abstraction & maildir synchronization
On Sat, 27 Mar 2010, Michal Sojka wrote: > On Fri, 26 Mar 2010, Michal Sojka wrote: > > On Wed, 24 Mar 2010, Stewart Smith wrote: > > > On Thu, 18 Mar 2010 16:39:36 +0100, Michal Sojka > > > wrote: > > > > - Only file-based storage is suported. Notmuch access the files > > > > directly, and not via the mailstore interface. > > > > > > It'll be great when this is fixed... should be trivial to add a git > > > backend then. > > > > Yes, it seems to be quite trivial. I'll probably look at this tomorrow. > > Here it is. It was not so trivial, because it was needed to change > absolute paths to relative ones at several places. I forgot to mention that this is also available in git://rtime.felk.cvut.cz/notmuch.git branch mailstore-abstraction-v3 and can be viewed online at http://rtime.felk.cvut.cz/gitweb/notmuch.git. Michal ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [notmuch] Mailstore abstraction & maildir synchronization
On Fri, 26 Mar 2010, Michal Sojka wrote: > On Wed, 24 Mar 2010, Stewart Smith wrote: > > On Thu, 18 Mar 2010 16:39:36 +0100, Michal Sojka > > wrote: > > > - Only file-based storage is suported. Notmuch access the files > > > directly, and not via the mailstore interface. > > > > It'll be great when this is fixed... should be trivial to add a git > > backend then. > > Yes, it seems to be quite trivial. I'll probably look at this tomorrow. Here it is. It was not so trivial, because it was needed to change absolute paths to relative ones at several places. So the changes since v2 are: - "Tests for maildir-based mailstore": removed absolute paths as found on my computer. - Added "Access messages through mail store interface" - Added "Add 'cat' subcommand" Michal Sojka (6): Mailstore abstraction interface Conversion to mailstore abstraction Add maildir-based mailstore Tests for maildir-based mailstore Access messages through mail store interface Add 'cat' subcommand emacs/notmuch.el|8 +- lib/Makefile.local |2 + lib/database-private.h |1 + lib/database.cc | 36 ++- lib/index.cc|8 +- lib/mailstore-files.c | 831 +++ lib/mailstore-private.h | 59 lib/mailstore.c | 78 + lib/message-file.c |8 +- lib/message.cc | 85 +- lib/notmuch-private.h | 10 +- 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 | 646 - notmuch-reply.c | 13 +- notmuch-restore.c |3 +- notmuch-search-tags.c |3 +- notmuch-search.c|3 +- notmuch-show.c | 79 +- notmuch-tag.c |3 +- notmuch.c |4 + show-message.c | 14 +- test/t0006-maildir.sh | 208 test/test-lib.sh|7 +- 28 files changed, 1611 insertions(+), 654 deletions(-) create mode 100644 lib/mailstore-files.c create mode 100644 lib/mailstore-private.h create mode 100644 lib/mailstore.c create mode 100755 test/t0006-maildir.sh ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [notmuch] Mailstore abstraction & maildir synchronization
On Wed, 24 Mar 2010, Stewart Smith wrote: > On Thu, 18 Mar 2010 16:39:36 +0100, Michal Sojka wrote: > > - Only file-based storage is suported. Notmuch access the files > > directly, and not via the mailstore interface. > > It'll be great when this is fixed... should be trivial to add a git > backend then. Yes, it seems to be quite trivial. I'll probably look at this tomorrow. > > (i have in no way been looking at tags in git though... doesn't really > interest me and git aint a database) My aim is only to store tags in git for the purpose of synchronization. I'm not interested in searching by tags. The idea is that for every message there will be an additional blob containging tags - one tag per line. > > > - (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. > > What about migrating from a maildir that's turned into notmuch back to > this maildir backend? What will be authoritive: maildir or notmuch > database? Maildir is authoritative, but only for tags corresponding to maildir flags. Other tags are never touched by this code. See also the updated commit message in "[PATCH v2 3/4] Add maildir-based mailstore". If you want to sync your maildirs with the databse the following should work (not tested): notmuch dump > dump cat <> ~/.notmuch-config [mailstore] type=maildir EOF notmuch restore dump --Michal ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [notmuch] Mailstore abstraction & maildir synchronization
On Thu, 18 Mar 2010 16:39:36 +0100, Michal Sojka wrote: > - Only file-based storage is suported. Notmuch access the files > directly, and not via the mailstore interface. It'll be great when this is fixed... should be trivial to add a git backend then. (i have in no way been looking at tags in git though... doesn't really interest me and git aint a database) > - (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. What about migrating from a maildir that's turned into notmuch back to this maildir backend? What will be authoritive: maildir or notmuch database? -- Stewart Smith ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch