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 C42AA431FC3 for ; Mon, 1 Mar 2010 10:43:37 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.992 X-Spam-Level: X-Spam-Status: No, score=-0.992 tagged_above=-999 required=5 tests=[AWL=-0.807, BAYES_40=-0.185] 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 owhqKfkkMH+y for ; Mon, 1 Mar 2010 10:43:37 -0800 (PST) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by olra.theworths.org (Postfix) with ESMTP id D6F38431FBD for ; Mon, 1 Mar 2010 10:43:36 -0800 (PST) Received: by fg-out-1718.google.com with SMTP id e21so52424fga.2 for ; Mon, 01 Mar 2010 10:43:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:cc:subject:from :to:in-reply-to:references:date:message-id:user-agent :content-transfer-encoding; bh=FpPW3fXAdcu5Uza5ZSsSviAWiD3XN55Q5pBvJe59f1o=; b=qCw7AFPVO762soCv3HNxcFCtOK7OKJaD1EB5hGNclpamm4Ixfvsxg5JUrhiMPRPcBJ bbl066vBCRoxM6WXVHAiyXxpd+Yv3v/q9IEwrAbwoPC74XD1P9Fi2/2esRPJgVieo9hi 2FTrbrAbQMo0rV4/+JRdcsQCEhpyVAaUxEgss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:cc:subject:from:to:in-reply-to:references:date :message-id:user-agent:content-transfer-encoding; b=a53iGfYOkRYe+OJP9dEKXnUwEomgPrFyPrrIGKNkguOR36/yfx9jhysaFMSgzJpMet l1gh29YPfD2GkMJz+z/ZIojX1haVrrD/stITVbZlBQi9vgOsYW877hB9AmzxlHCCM6ay RlToDIPnIoK9I8LMO5/wSA3tFRa3qKV0hBLok= Received: by 10.87.38.5 with SMTP id q5mr7974813fgj.45.1267469007567; Mon, 01 Mar 2010 10:43:27 -0800 (PST) Received: from localhost (physnat56.physics.umass.edu [128.119.50.56]) by mx.google.com with ESMTPS id 15sm2347572fxm.12.2010.03.01.10.43.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Mar 2010 10:43:26 -0800 (PST) Content-Type: text/plain; charset=UTF-8 From: Ben Gamari To: Michal Sojka In-reply-to: <87bpf82c5c.fsf@steelpick.localdomain> References: <87pr57jvkz.fsf@SSpaeth.de> <87wry2wl7p.fsf@yoom.home.cworth.org> <87ljecmnbd.fsf@steelpick.localdomain> <1267459947-sup-6640@ben-laptop> <87bpf82c5c.fsf@steelpick.localdomain> Date: Mon, 01 Mar 2010 13:43:24 -0500 Message-Id: <1267468550-sup-8956@ben-laptop> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Cc: notmuch Subject: Re: Introducing notmuchsync 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: Mon, 01 Mar 2010 18:43:37 -0000 Excerpts from Michal Sojka's message of Mon Mar 01 12:18:55 -0500 2010: > > Is this really necessary? Another option (which I believe has been > > mentioned here in the past) is to simply pass notmuch new a list of > > message "paths" to add (although I'm not sure if many mail delivery > > programs give you that sort of information). > > This could also be possible, but now, you say "notmuch new" and notmuch > itself figure out what to index. If passing notmuch a list on files to > index will be the only supported way, it might be hard for new users to > start with notmuch. A nice thing on notmuch is that it can be used > almost without any configuration. It seems like a script in contrib/ would suffice. > > > How do you propose that the backends keep track of what mail has been > > indexed? > > For example by using Xapian metadata: > notmuch->xapian_db->set_metadata ("git-head", sha1); However, this means that the backend would need to know about the indexing database, which seems to me like a implementation detail that should be hidden from the backend (perhaps? Maybe not, I suppose). I guess this all depends upon how much we want to abstract out the backends. > > > > Now, if we have this, it would be very easy to add support for > > > Maildir-based mail-store. The implementation of the first two methods > > > would be the same as what is currently in notmuch and the third method > > > would rename files in mailstore if certain tags (such as unread) are > > > added or removed. In case of rename, notmuch database would be > > > immediately updated to reflect the change. > > > > > The interface here seems a little vague. How would the backend notify > > notmuch that the filename has changed? > > notmuch new > > The idea is that tags changed by notmuch are stored immediately (and > database is updated accordingly), whereas when the mail store is changed > by an external tool, you must explicitly ask notmuch to notice that. > Certainly, I understand that and believe that that is the only sane approach. However, you currently have no mechanism in your interface to allow the backend to notify notmuch that the file name has changed. Considering this is the sole value identifying the message to notmuch, you definitely need to tell notmuch about the change. > > Don't forget mbox. It seems like it would be pretty trivial to > > implement (although I'm not sure what performance would look like). > > I personally do not use mboxes, so I'm not interested in them. Fair enough. Just figured it wouldn't be too difficult (although I know very little about the format). > > With all of this infrastructure, it seems like it wouldn't be too > > difficult to support messages from multiple backends in a single index. > > Not sure if people would be interested enough to warrant the added > > complexity though. > > I'm currently not interested in such a functionality, but we can add it > later if there is a need. Certainly. Just throwing out ideas. - Ben