Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 5CA904196F2 for ; Thu, 8 Apr 2010 08:13:37 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jABjXoYgMuk7 for ; Thu, 8 Apr 2010 08:13:36 -0700 (PDT) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id 82505431FC1 for ; Thu, 8 Apr 2010 08:13:36 -0700 (PDT) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id DC32219F3375; Thu, 8 Apr 2010 17:13:35 +0200 (CEST) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id nCOIWizay5T5; Thu, 8 Apr 2010 17:13:34 +0200 (CEST) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 915B519F3391; Thu, 8 Apr 2010 17:13:34 +0200 (CEST) Received: from steelpick.2x.cz (k335-30.felk.cvut.cz [147.32.86.30]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id 8C79415C062; Thu, 8 Apr 2010 17:13:34 +0200 (CEST) Received: from wsh by steelpick.2x.cz with local (Exim 4.71) (envelope-from ) id 1NztQE-0007sw-BM; Thu, 08 Apr 2010 17:13:34 +0200 From: Michal Sojka To: notmuch@notmuchmail.org Subject: [PATCH] Mailstore abstraction v4 - part 2 (maildir synchronization) Date: Thu, 8 Apr 2010 17:13:11 +0200 Message-Id: <1270739592-30280-1-git-send-email-sojkam1@fel.cvut.cz> X-Mailer: git-send-email 1.7.0.2 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 15:13:37 -0000 This is the second part of mailstore abstraction patches. I do not want this to be merged yet, but there might be some people interested in testing this. This patch adds a mailstore, which bi-directionally synchronizes certain tags with maildir flags. I use it already four weeks and it works quite well. There are the following know bugs: 1) Viewing/storing of attachments of unread messages doesn't work. The reason is that when you view the message its unread tag is removed by elisp code. This leads to rename of the file, but Emacs still uses the original name to access message with the attachment. Workaround: close the message and open it again. I'm working on the solution - if the mailstore cannot open the message with the name passed, it tries different names with different maildir flags. 2) If there several messages with the same ID (e.g. one in sent folder and one sent back by mailing list), the flags are synchronized to only one of these files. I plan to do this: - When a tag is added/removed in notmuch, flags of all files corresponding to the message will be updated. - If we detect (during notmuch new) that flags of one file were changed by somebody else, we also change the flags for the other files corresponding to the message. - If we detect (during notmuch new) that flags of two or more files were changed by somebody else, we have to solve the conflict somehow, but I didn't invent how, yet. The full series is available at http://rtime.felk.cvut.cz/gitweb/notmuch.git/shortlog/refs/heads/mailstore-abstraction-v4 and can be pulled by git pull git://rtime.felk.cvut.cz/notmuch.git mailstore-abstraction-v4 Besides the patch sent here, there are also tests for the maildir mailstore and a not finished implementation of the solution for 1) above. --Michal