From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8411B431FBC for ; Sun, 1 Jul 2012 09:40:19 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.061 X-Spam-Level: * X-Spam-Status: No, score=1.061 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_BL_SPAMCOP_NET=1.246, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_SORBS_WEB=0.614] autolearn=disabled 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 dU4Y8dfgucAE for ; Sun, 1 Jul 2012 09:40:19 -0700 (PDT) Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id C206D431FAE for ; Sun, 1 Jul 2012 09:40:18 -0700 (PDT) Received: by wgbdt14 with SMTP id dt14so3718702wgb.2 for ; Sun, 01 Jul 2012 09:40:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; bh=4DpI0eDxkxX4K2lpcUiJxHAhLd/N98dUJ1d1DmIysLw=; b=Ct/uxqo6z5a5jWtyZA8WaXMVvf6TV9UL9FkrABSbjrs4jJMe9Zk5om5uYhsuwq5IWc O0OP90SjBCze0f/J30YNyIp7MBaKFRjTklQbo/+2SybVhFdfFSx+366fWWiAzZ6mw7Ky d/qSrg28GHCLAwD8Q0eD5MXcw1NDptgvZLfZVZEEX0yn+kr/DAz/R/gFygfu1u0Nn3V3 2wVe71BEko7lzk3v1n6tup20q9a5UpeVDb/SGhaxkJxZGnAMf7RViCWSyz1VocTB+qs5 6jlRDlYNKPM932iKU4pGaipKguaGMmK02QtzQ96aVTi+mqbnh2hL6RMH9TbucHZBFL4r X3UQ== Received: by 10.180.103.4 with SMTP id fs4mr11193008wib.16.1341160816022; Sun, 01 Jul 2012 09:40:16 -0700 (PDT) Received: from localhost ([195.24.209.21]) by mx.google.com with ESMTPS id fu8sm19686504wib.5.2012.07.01.09.40.06 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Jul 2012 09:40:15 -0700 (PDT) From: Ethan Glasser-Camp To: notmuch@notmuchmail.org Subject: [PATCH v2 0/8] URI-based modular mail stores Date: Sun, 1 Jul 2012 12:39:42 -0400 Message-Id: <1341160790-14525-1-git-send-email-ethan@betacantrips.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: 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: Sun, 01 Jul 2012 16:40:19 -0000 Hi guys, Based on the feedback from the last patch series (thanks a lot to Mark Walters and Jani Nikula for taking the time to look at it!) I revised this patch series to not change the handling of maildir filenames at all. This meant not having to give up relocatability, and also simplified the patch series a great deal (down to 8 patches instead of 14). I also noticed that there is only one use of notmuch_sha1_of_file and it is only used on messages, so instead of splitting the function as in the last patch series, I just renamed it. As a reminder, this patch series proposes a mailstore.c module, which is responsible for accessing "filenames" which, in addition to ordinary filenames, can also be URIs. - Patches 1-5 add the mailstore module and complementary interfaces, such as a new.scan option that tell notmuch-new where to look for other mail. - Patches 6-8 prove the validity of this interface by using it to add mbox support. I know this is still pretty big and does two different things, but mbox support relies on URI support, and URI support is meaningless without some new kind of mail store. There are a few missing features in this patch series, but I was hesitant to add them because I didn't want to make the series any more complex. To wit, future series could include: - notmuch-new.c: some code is shared between add_files_recursive and add_files_mbox{,_file}, specifically the code that scans directories for subdirectories and then recurses, and the code that scans directories for regular files and then does something else. Some guidance on how best to refactor that, or whether to even bother, would be appreciated. - notmuch-config.c: I think instead of one option for new.scan, it would be good to have a section called [urls], for which each entry is name=url. This would also allow relocatability for mail not located in the central maildir (store the name in Xapian, and translate it to the URL on the way in/out). - notmuch-new.c: code could be added to notice when we "walked past" a message in an mbox file and mark it as deleted, as is currently done with maildir. - notmuch-new.c: no support for count_files kinds of operations exists. Unlike the previous patch series, I would appreciate it if you reviewed this one :) Thanks for your time! Ethan