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 39611431FBF for ; Tue, 19 Nov 2013 04:40:32 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.699 X-Spam-Level: X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 Y0BH+nfC8Cnj for ; Tue, 19 Nov 2013 04:40:08 -0800 (PST) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com [209.85.217.180]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 91D96431FBC for ; Tue, 19 Nov 2013 04:40:08 -0800 (PST) Received: by mail-lb0-f180.google.com with SMTP id w6so2532651lbh.39 for ; Tue, 19 Nov 2013 04:40:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=Y2pzQekBi6H7thor2D/iNVHkMUzKVPGYE9sLSx/8Mf4=; b=ux9Z4rZtyjWJ77FzTC7oJgQGg3DV4zf8sKI3aD4UOtuRca4agsaxqrXs23m/QzeQRq OZZYhCMQLSHOrfQr/HwD3jTbYnKZmNQcC7HQNJIUE5RkpL9EmsrYA08JINDAuPsxxZJe DbA2QLLL6XWiaX9dzWIlGuvUKGnb3HncYefybIp8AcMvIsG/SY20crLY7SG3cCyYq4Fd ekrhqtKXoGb3JbD3QAh9FTtvrnycFiHEqrNcfY/6MjIqBJr00rSrsD4L7nuu3SjXnHV0 EBCKgf0ftwCXpa1s+0d5KekrMiMSuFqTcOdlDwT+OO4ygvbwoQxoQptTx6lzxvZPcwiy hB+Q== X-Received: by 10.112.73.3 with SMTP id h3mr18029116lbv.4.1384864802092; Tue, 19 Nov 2013 04:40:02 -0800 (PST) Received: from [192.168.1.3] (a91-156-160-115.elisa-laajakaista.fi. [91.156.160.115]) by mx.google.com with ESMTPSA id xc10sm15735270lbb.6.2013.11.19.04.39.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Nov 2013 04:40:00 -0800 (PST) Sender: Tomi Valkeinen Message-ID: <528B5C1F.4050908@iki.fi> Date: Tue, 19 Nov 2013 14:39:59 +0200 From: Tomi Valkeinen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Jani Nikula , notmuch@notmuchmail.org Subject: Re: notmuch-lib questions and observations References: <528A26F4.3040006@iki.fi> <87bo1gio9c.fsf@nikula.org> In-Reply-To: <87bo1gio9c.fsf@nikula.org> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oxINwwJVIHxoqmI1oHjGuBQ3Al986pbba" 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: Tue, 19 Nov 2013 12:40:32 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --oxINwwJVIHxoqmI1oHjGuBQ3Al986pbba Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2013-11-19 14:12, Jani Nikula wrote: > On Mon, 18 Nov 2013, Tomi Valkeinen wrote: >> Hi, >> >> I found out about notmuch quite recently, and now I've been tinkering >> with it, prototyping a GUI client. I have some questions and observati= ons: >=20 > Hello Tomi, glad you've found notmuch too! ;) Well, I'm still using Thunderbird... ;) >> 3. >> >> How is a client using notmuch supposed to find out there are new >> messages, and which messages are new? >=20 > 'notmuch new' tags any new messages it finds with tags specified in > new.tags config option (man notmuch-config), "inbox" and "unread" by > default. Some people like to change that to "new", and run a post-new > hook (man notmuch-hooks) that looks at messages matching tag:new, > retagging as desired. >=20 >> My current thought is to make 'notmuch new' run a script that tags the= >> messages, and make it add a 'new-gui' or such tag to all new messages.= >> The client would then periodically make a query for that tag, and at t= he >> same time remove the tag for any returned messages. >=20 > As said, 'notmuch new' does that, and it can also run a script for you.= I think I wasn't very clear on what I meant. I was thinking about the behavior that graphical mail clients have: they periodically refresh the emails, showing new ones if there are any, and they'll show some icon or such which tells the user this email is "new" (which could mean received in the last periodic refresh). So with notmuch, the client would somehow need to know that there has been changes in the database, and then know which emails are new. For the former, I have no good idea as there doesn't seem to be any way to find out the db was changed since the last open. For the latter, I guess the tagging method I mentioned above should work. If the xapian document id was available, I believe it could also be used for the latter, as it should always be increasing. >> 5. >> >> This one is just a vague thought that came to my mind. At the moment >> notmuch hides Xapian totally behind notmuch's interface, which probabl= y >> makes things simpler (and gives a nice C API), but also (afaik) preven= ts >> using Xapian features that are not at the moment supported in the >> notmuch API. >> >> I wonder how would an approach work where notmuch would be a bit more >> like a helper library, allowing full use of Xapian's features but maki= ng >> it simple to manage notmuch database. So, for example, when making a >> query, you'd create a Xapian query with notmuch, and then use Xapian t= o >> run the query. >> >> I don't have anything clear in mind, and obviously Xapian being C++ >> might make the whole idea unimplementable. >=20 > I think the database implementation has been abstracted on purpose, so > we could, at least in theory, switch from xapian to something else. I > don't know how feasible that would be though. I think Austin has > experimented with that. Ah, a valid point, I didn't think of that. Tomi --oxINwwJVIHxoqmI1oHjGuBQ3Al986pbba Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSi1wfAAoJEPo9qoy8lh71+UUP/j6LEk8MvjGaLXzx9Wm1x2DI PqFtZH/dFXjKwYOi4PJjVTmJdocCR+O0e+V3CijjufsZubANSoHYLt+OLXBuCmoW lfpZ5t8SLe/JNErCwJaQTjtyUeAfiPlmc/6uiui1sFaktmC3Gs5CbHlyEBoclSah M2XXFedYcAg7IUTzTJLy6ML1GiCakJpFSMnI5MPnc5Lper/mGZ56B3Sp4kT4FzKu c7+XnbItzcBJBf4pRM2AwBly3Ha1i2B6OaKfn4mn+6sWwoXYJtUqxqND72H00B6+ ok2OpYzojLMSVwN3iXDG54oOkBrisSkiqLlWyqnuvy9ZaIGEr0s3A2QTQzD+d69J X8YpolAP919difctmFDEVizoOXartpQDO+Sn9nwmZX05PwZcPlA51qWMiQdgYQwK 7EvwLfvAbYEFPR7FCuC2ar45DQguGANDW0+5M1RU1wF22V5XqO9svSxGWF3T/vjH M+NFf2M9vvF9FkCaHHF6CowVr7eIMlSKQwhwvTQSgLwxEu0ZCbRLnTMMr3pL9gYC 3WJ6EepSUimunQT8g5uBXKaXUOk9Dhbt+f/HCDyVy1x3bNrp3J2zAJsJsTf92s6D cRrNxO3uu1dX65q4lJDR0Ll1Iit0Zfsf2rM5FUGoIiLGY5Fuwo3tsveb3nfyNsCQ pfqN+B2DpF3FIjXWVyR2 =zxrZ -----END PGP SIGNATURE----- --oxINwwJVIHxoqmI1oHjGuBQ3Al986pbba--