From dottedmag@dottedmag.net Tue Nov 17 07:28:42 2009 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 966D9431FBF for ; Tue, 17 Nov 2009 07:28:42 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 T6gZjMwgV4Pb for ; Tue, 17 Nov 2009 07:28:41 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id AF4F7431FBC for ; Tue, 17 Nov 2009 07:28:41 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 44E938C57C for ; Tue, 17 Nov 2009 16:28:40 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NAPyw-0001lu-7S for notmuch@notmuchmail.org; Tue, 17 Nov 2009 21:28:38 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org Date: Tue, 17 Nov 2009 21:28:37 +0600 Message-Id: <1258471718-6781-1-git-send-email-dottedmag@dottedmag.net> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH 1/2] Close message file after parsing message headers X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 15:28:42 -0000 Keeping unused files open helps to see "Too many open files" often. Signed-off-by: Mikhail Gusarov --- lib/message-file.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/message-file.c b/lib/message-file.c index 8a3f8ee..197ab01 100644 --- a/lib/message-file.c +++ b/lib/message-file.c @@ -325,6 +325,11 @@ notmuch_message_file_get_header (notmuch_message_file_t *message, return decoded_value; } + if (message->parsing_finished) { + fclose (message->file); + message->file = NULL; + } + if (message->line) free (message->line); message->line = NULL; -- 1.6.3.3 From dottedmag@dottedmag.net Tue Nov 17 07:28:42 2009 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 E9F44431FBC for ; Tue, 17 Nov 2009 07:28:42 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 G-eHc3Vkyh9s for ; Tue, 17 Nov 2009 07:28:41 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id AD998431FAE for ; Tue, 17 Nov 2009 07:28:41 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 4052D8C575 for ; Tue, 17 Nov 2009 16:28:40 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NAPyw-0001lw-Ay for notmuch@notmuchmail.org; Tue, 17 Nov 2009 21:28:38 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org Date: Tue, 17 Nov 2009 21:28:38 +0600 Message-Id: <1258471718-6781-2-git-send-email-dottedmag@dottedmag.net> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1258471718-6781-1-git-send-email-dottedmag@dottedmag.net> References: <1258471718-6781-1-git-send-email-dottedmag@dottedmag.net> Subject: [notmuch] [PATCH 2/2] Include to get uint32_t in C++ file with gcc 4.4 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 15:28:43 -0000 Signed-off-by: Mikhail Gusarov --- lib/message.cc | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index 72c350f..a4b090b 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -21,6 +21,8 @@ #include "notmuch-private.h" #include "database-private.h" +#include + #include #include -- 1.6.3.3 From lars@seas.harvard.edu Tue Nov 17 11:01:09 2009 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 EE00F431FBC for ; Tue, 17 Nov 2009 11:01:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 KZZsxgOA6eN0 for ; Tue, 17 Nov 2009 11:01:08 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by olra.theworths.org (Postfix) with ESMTP id 5AB69431FAE for ; Tue, 17 Nov 2009 11:01:08 -0800 (PST) Received: from smtp-outbound.seas.harvard.edu (smtp-outbound.seas.harvard.edu [140.247.51.171]) by mx.perfora.net (node=mxus0) with ESMTP (Nemesis) id 0Lkvt7-1NkuZw0tAz-00bLK6 for notmuch@notmuchmail.org; Tue, 17 Nov 2009 14:01:05 -0500 Received: from dottiness.seas.harvard.edu (dottiness.seas.harvard.edu [140.247.52.224]) by smtp-outbound.seas.harvard.edu (8.13.8/8.13.8) with SMTP id nAHJ0s4H016733 for ; Tue, 17 Nov 2009 14:00:54 -0500 Received: by dottiness.seas.harvard.edu (sSMTP sendmail emulation); Tue, 17 Nov 2009 14:00:54 -0500 Date: Tue, 17 Nov 2009 14:00:54 -0500 From: Lars Kellogg-Stedman To: notmuch@notmuchmail.org Message-ID: <20091117190054.GU3165@dottiness.seas.harvard.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5Dr6Wqe9hdyl7LAI" Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Subject: [notmuch] Working with Maildir storage? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 19:01:09 -0000 --5Dr6Wqe9hdyl7LAI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I saw the LWN article and decided to take a look at notmuch. I'm currently using mutt and mairix to index and read a collection of Maildir mail folders (around 40,000 messages total). notmuch indexed the messages without complaint, but my attempt at searching bombed out. Running, for example: notmuch search storage Resulted in 4604 lines of errors along the lines of: Error opening /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U= =3D3026:2,S: Too many open files I'm curious if this is expected behavior (i.e., notmuch does not work with Maildir) or if something else is going on. Cheers, --=20 Lars Kellogg-Stedman Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences --5Dr6Wqe9hdyl7LAI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQEcBAEBCAAGBQJLAvLmAAoJENdGlQYxQazYRtcH/0usClQ1Z+EoTsA+URwIK6hD FsZUxFxRjMuOQRn2idZ/zhhg5jJj11ZaHjqxSkDvi2ywkTKUf1vX9LLzVy5hSR9M E6XQUd5QWAQXo1VsTeKkukIL0YqsPjdgrT8+Yt+OS2NvhEncql23oxnL2/pHkIFq r0NdTmVV5Jcar7w9J6X1Mi9m229a/9jV5FImsWISkIhIWznXU5SiU6zIw8xhP4E0 xhvVSNJnFryjVHtva870aSQduhHfeLPzpYhqbkMPvlq+bcz6Q/Q2SwxJcGLNMPHa os9s9FGhCvFKUhVzezHWPgXNCcNT8qK89rcUldb5Oq4jaJb8RCZCYABplfoyaFs= =vO4s -----END PGP SIGNATURE----- --5Dr6Wqe9hdyl7LAI-- From dottedmag@dottedmag.net Tue Nov 17 11:02:44 2009 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 8F34D431FBC for ; Tue, 17 Nov 2009 11:02:44 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 F6q08k1tfPb1 for ; Tue, 17 Nov 2009 11:02:43 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id A93A2431FAE for ; Tue, 17 Nov 2009 11:02:43 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id EB9208C03E for ; Tue, 17 Nov 2009 20:02:42 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NATK4-0002yx-Um for notmuch@notmuchmail.org; Wed, 18 Nov 2009 01:02:40 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org References: <20091117190054.GU3165@dottiness.seas.harvard.edu> Date: Wed, 18 Nov 2009 01:02:38 +0600 In-Reply-To: <20091117190054.GU3165@dottiness.seas.harvard.edu> (Lars Kellogg-Stedman's message of "Tue, 17 Nov 2009 14:00:54 -0500") Message-ID: <87iqd9rn3l.fsf@vertex.dottedmag> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] Working with Maildir storage? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 19:02:44 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars@seas.harvard.edu did g= yre and gimble: LK> Resulted in 4604 lines of errors along the lines of: LK> Error opening LK> /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostna= me,U=3D3026:2,S: LK> Too many open files See the patch just posted here. =2D-=20 http://fossarchy.blogspot.com/ --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAEBAgAGBQJLAvNOAAoJEJ0g9lA+M4iIjLYQAKp0PXEgl3JMOEBisH52AsIK CzzfP4Fzd41K9VH/c1EdQWDYR6FCAA4IUSNICnJhITsYUb0eC5AKJiey3JP0+rmd s4qEFBKH2iuphv8Llltcv2Q8DyPuJBkVa3mO9XCCeABZ6v4UvnTSWRVG12csSEih ScgienU8sMrM9LwvvVI1ZB2flm2TzsH2hWi30jIgmtBntIKJaTgbFXB50FYFwULa gGL/oH3u+YpumedWzPZdCJrw2q7nMvYx8aQ29EDCNLZibAZe+6oDTa6Fv6/0ldpQ U+DptR0nJGbJTWa26OTSvmyeIORjAfM+TEI68n7KO9VHYPmVh6awcf0MNKYh2xWk eRQNBcKyQNWxeKyCCpT/rrTlpxBWahpvg+V8lkDH2W09wjRp6CUKvifK3Sz3am9m 5ZUMpvXbwkZD6Ci6l/QytbYK50e8UpvFSu5DBaxBz59ykoypuNg2ayO5Kdi6IF5d T+Sw6wo8UKn9a33+vheIc0fkhZXbeSotEmDm7huazm6CgM3dcWXUpTuJvik1cSWp 4buv98gY6IKWKoUTXODWUr+7VR4gei8du8qOsKem+QDfNX7tmaIRjhrbB24B91Wy td3MTJD7GjMNid0INqRY1CRMLo8YlPaq6NBZfcYtYgwa6gpJijz1/MAn8+GMrfhF 9LI8b9jopNP+pMYBohLA =/ksP -----END PGP SIGNATURE----- --=-=-=-- From alex.boterolowry@gmail.com Tue Nov 17 11:36:16 2009 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 93512431FBC for ; Tue, 17 Nov 2009 11:36:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 kZBOSJkg8HUp for ; Tue, 17 Nov 2009 11:36:14 -0800 (PST) Received: from mail-pw0-f51.google.com (mail-pw0-f51.google.com [209.85.160.51]) by olra.theworths.org (Postfix) with ESMTP id 97F88431FAE for ; Tue, 17 Nov 2009 11:36:14 -0800 (PST) Received: by pwj10 with SMTP id 10so181713pwj.30 for ; Tue, 17 Nov 2009 11:36:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=WkALQ7xcwXfC2PRBDFoNkkMv2fR+opuFak4fTMbFETA=; b=beZOWf3rXiqG2Q3nZVDQPOP8JaJAElaSzEBEzbaxbQZ8MLffVuQQN75f8EbuwYoB/D 8y1igTvWrWZ+izgzlrBArO2CB6LSKF0OOFmW9lQFmt6qI64FwqCvVDIzeM70V+kvLyYX soGU4Px/9QMq9a5cwC+/SxR+0/6g49niqCkps= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=EuIvjlj55KndkXlRFejdQMbLNY+CHYaR24wu8w4FnC2ddz4TOaSoDM3RKwM9x2lljY QclpHbqsV4GhGanr0eB8XJdNl4VICEK0mLRnTePt825FOF4PLgIuCr5Jix/ETD4LGSCI qeAbP9b+n/3TOqlLxR4ldCd+iDa0QMHCiWxfw= MIME-Version: 1.0 Received: by 10.114.253.23 with SMTP id a23mr1109744wai.155.1258486574067; Tue, 17 Nov 2009 11:36:14 -0800 (PST) Date: Tue, 17 Nov 2009 11:36:14 -0800 Message-ID: From: Alex Botero-Lowry To: notmuch@notmuchmail.org Content-Type: multipart/mixed; boundary=0016e687869333b1570478963d35 Subject: [notmuch] preliminary FreeBSD support X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 19:36:16 -0000 --0016e687869333b1570478963d35 Content-Type: multipart/alternative; boundary=0016e687869333b14e0478963d33 --0016e687869333b14e0478963d33 Content-Type: text/plain; charset=ISO-8859-1 I saw the announcement this morning, and was very excited, as I had been hoping sup would be turned into a library, since I like the concept more than the UI (I'd rather an emacs interface). I did a preliminary compile which worked out fine, but sysconf(_SC_SC_GETPW_R_SIZE_MAX) returns -1 on FreeBSD, so notmuch_config_open segfaulted. Attached is a patch that supplies a default buffer size of 64 in cases where -1 is returned. http://www.opengroup.org/austin/docs/austin_328.txt - seems to indicate this is acceptable behavior, and http://mail-index.netbsd.org/pkgsrc-bugs/2006/06/07/msg016808.htmlspecifically uses 64 as the buffer size. --0016e687869333b14e0478963d33 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I saw the announcement this morning, and was very excited, as I had been ho= ping sup would be turned into a library,
since I like the concept more t= han the UI (I'd rather an emacs interface).

I did a preliminary = compile which worked out fine, but sysconf(_SC_SC_GETPW_R_SIZE_MAX) returns= -1 on
FreeBSD, so notmuch_config_open segfaulted.

Attached is a patch that= supplies a default buffer size of 64 in cases where -1 is returned.
http://www= .opengroup.org/austin/docs/austin_328.txt - seems to indicate this is a= cceptable behavior,
and http://mail-index.netbsd.org/pkgsrc-bugs/2006/06/07/msg016808.html<= /a> specifically uses 64 as the
buffer size.


--0016e687869333b14e0478963d33-- --0016e687869333b1570478963d35 Content-Type: application/octet-stream; name="0001-Deal-with-situation-where-sysconf-_SC_GETPW_R_SIZE_M.patch" Content-Disposition: attachment; filename="0001-Deal-with-situation-where-sysconf-_SC_GETPW_R_SIZE_M.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g252e6gs0 RnJvbSBlM2JjNGJiZDdiOWQwZDA4NjgxNmFiNWY4ZjJkNmZmZWExZGQzZWE0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbGV4YW5kZXIgQm90ZXJvLUxvd3J5IDxhbGV4LmJvdGVyb2xv d3J5QGdtYWlsLmNvbT4KRGF0ZTogVHVlLCAxNyBOb3YgMjAwOSAxMTozMDozOSAtMDgwMApTdWJq ZWN0OiBbUEFUQ0hdIERlYWwgd2l0aCBzaXR1YXRpb24gd2hlcmUgc3lzY29uZihfU0NfR0VUUFdf Ul9TSVpFX01BWCkgcmV0dXJucyAtMQoKLS0tCiBub3RtdWNoLWNvbmZpZy5jIHwgICAgMiArKwog MSBmaWxlcyBjaGFuZ2VkLCAyIGluc2VydGlvbnMoKyksIDAgZGVsZXRpb25zKC0pCgpkaWZmIC0t Z2l0IGEvbm90bXVjaC1jb25maWcuYyBiL25vdG11Y2gtY29uZmlnLmMKaW5kZXggMjQ4MTQ5Yy4u ZTcyMjBkOCAxMDA2NDQKLS0tIGEvbm90bXVjaC1jb25maWcuYworKysgYi9ub3RtdWNoLWNvbmZp Zy5jCkBAIC03Nyw2ICs3Nyw3IEBAIHN0YXRpYyBjaGFyICoKIGdldF9uYW1lX2Zyb21fcGFzc3dk X2ZpbGUgKHZvaWQgKmN0eCkKIHsKICAgICBsb25nIHB3X2J1Zl9zaXplID0gc3lzY29uZihfU0Nf R0VUUFdfUl9TSVpFX01BWCk7CisgICAgaWYgKHB3X2J1Zl9zaXplID09IC0xKSBwd19idWZfc2l6 ZSA9IDY0OwogICAgIGNoYXIgKnB3X2J1ZiA9IHRhbGxvY196ZXJvX3NpemUgKGN0eCwgcHdfYnVm X3NpemUpOwogICAgIHN0cnVjdCBwYXNzd2QgcGFzc3dkLCAqaWdub3JlZDsKICAgICBjaGFyICpu YW1lOwpAQCAtMTAxLDYgKzEwMiw3IEBAIHN0YXRpYyBjaGFyICoKIGdldF91c2VybmFtZV9mcm9t X3Bhc3N3ZF9maWxlICh2b2lkICpjdHgpCiB7CiAgICAgbG9uZyBwd19idWZfc2l6ZSA9IHN5c2Nv bmYoX1NDX0dFVFBXX1JfU0laRV9NQVgpOworICAgIGlmIChwd19idWZfc2l6ZSA9PSAtMSkgcHdf YnVmX3NpemUgPSA2NDsKICAgICBjaGFyICpwd19idWYgPSB0YWxsb2NfemVyb19zaXplIChjdHgs IHB3X2J1Zl9zaXplKTsKICAgICBzdHJ1Y3QgcGFzc3dkIHBhc3N3ZCwgKmlnbm9yZWQ7CiAgICAg Y2hhciAqbmFtZTsKLS0gCjEuNi41LjIKCg== --0016e687869333b1570478963d35-- From cworth@cworth.org Tue Nov 17 12:19:41 2009 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 60724431FBF; Tue, 17 Nov 2009 12:19:41 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 j+ZeUopdCH+8; Tue, 17 Nov 2009 12:19:40 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 58221431FAE; Tue, 17 Nov 2009 12:19:39 -0800 (PST) From: Carl Worth To: Alex Botero-Lowry , notmuch@notmuchmail.org In-Reply-To: References: Date: Tue, 17 Nov 2009 12:19:24 -0800 Message-ID: <87lji4lx9v.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] preliminary FreeBSD support X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 20:19:41 -0000 On Tue, 17 Nov 2009 11:36:14 -0800, Alex Botero-Lowry wrote: > I saw the announcement this morning, and was very excited, as I had been > hoping sup would be turned into a library, > since I like the concept more than the UI (I'd rather an emacs interface). Hi Alex, That's great! It's good to hear that there are like-minded people out there. I hope that Notmuch will be useful for you. > I did a preliminary compile which worked out fine, but > sysconf(_SC_SC_GETPW_R_SIZE_MAX) returns -1 on > FreeBSD, so notmuch_config_open segfaulted. > > Attached is a patch that supplies a default buffer size of 64 in cases where > -1 is returned. Thanks for the patch. As we discussed in IRC[*], we should probably do the correct thing and check for ERANGE and loop as necessary (even if sysconf returns a positive value). Example code here: http://www.opengroup.org/austin/docs/austin_328.txt -Carl [*] #notmuch on irc.freenode.net for those who didn't just guess that already, (and I'll add that to the website soon). From cworth@cworth.org Tue Nov 17 12:22:26 2009 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 7C278431FBF; Tue, 17 Nov 2009 12:22:26 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 nOTYdHxKQfjQ; Tue, 17 Nov 2009 12:22:26 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 44BFE431FAE; Tue, 17 Nov 2009 12:22:24 -0800 (PST) From: Carl Worth To: Mikhail Gusarov , notmuch@notmuchmail.org In-Reply-To: <1258471718-6781-1-git-send-email-dottedmag@dottedmag.net> Date: Tue, 17 Nov 2009 09:13:27 -0800 Message-ID: <87lji5cbwo.fsf@yoom.home.cworth.org> References: <1258471718-6781-1-git-send-email-dottedmag@dottedmag.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH 1/2] Close message file after parsing message headers X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 20:22:26 -0000 On Tue, 17 Nov 2009 21:28:37 +0600, Mikhail Gusarov wrote: > Keeping unused files open helps to see "Too many open files" often. > > Signed-off-by: Mikhail Gusarov ... On Tue, 17 Nov 2009 21:28:38 +0600, Mikhail Gusarov wrote: > > Signed-off-by: Mikhail Gusarov > --- > lib/message.cc | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) Hi Mikhail, Welcome to notmuch, and thanks for these patches! I've pushed both of them out now. Keith ran into the same problem of "too many open files" and wrote a more complex fix, (which included what you did here). His code can be seen at: git://keithp.com/git/notmuch I didn't apply Keith's fix yet, because I think I'd rather just fix the indexer to store the In-Reply-To header in a separate term prefix from the term used for the References header[*]. That will then let us lookup the in-reply-to value later for thread constructions without having to open the original email file at all. -Carl [*] Yes, this is my first post to our new mailing list and I'm already spouting off about "terms" and "prefixes" without any definitions. I apologize for that. I hope that people will ask questions freely here on the list whenever anything is not clear, and I'll be glad to explain things as needed. (Then when can shove answers into a HACKING document.) PS. This reply is a great example of a feature that notmuch *almost* supports already---repling to multiple messages at once. The "notmuch reply" command line does everything necessary to make this work, but we haven't yet hooked up any keybindings for this in the emacs client yet. Obviously, 'r' from the search view could reply to the entire thread. But when viewing a thread, anyone have a good keybinding suggestion? (There's obviously 'R' as opposed to 'r', but I think we'll probably want to distinguish "reply to sender" from "reply to all" before trying to distinguish "reply to message" from "reply to thread" (which I imagine is more rare of an operation). From lars@seas.harvard.edu Tue Nov 17 12:33:05 2009 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 7081C431FBC for ; Tue, 17 Nov 2009 12:33:05 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 9Bzx4PeYoggl for ; Tue, 17 Nov 2009 12:33:04 -0800 (PST) X-Greylist: delayed 5520 seconds by postgrey-1.32 at olra; Tue, 17 Nov 2009 12:33:04 PST Received: from smtp-outbound.seas.harvard.edu (smtp-outbound.seas.harvard.edu [140.247.51.171]) by olra.theworths.org (Postfix) with ESMTP id CD630431FAE for ; Tue, 17 Nov 2009 12:33:04 -0800 (PST) Received: from dottiness.seas.harvard.edu (dottiness.seas.harvard.edu [140.247.52.224]) by smtp-outbound.seas.harvard.edu (8.13.8/8.13.8) with SMTP id nAHKX1ar024287; Tue, 17 Nov 2009 15:33:01 -0500 Received: by dottiness.seas.harvard.edu (sSMTP sendmail emulation); Tue, 17 Nov 2009 15:33:01 -0500 Date: Tue, 17 Nov 2009 15:33:01 -0500 From: Lars Kellogg-Stedman To: Mikhail Gusarov Message-ID: <20091117203301.GV3165@dottiness.seas.harvard.edu> References: <20091117190054.GU3165@dottiness.seas.harvard.edu> <87iqd9rn3l.fsf@vertex.dottedmag> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GGxZz/e2pmGePzrA" Content-Disposition: inline In-Reply-To: <87iqd9rn3l.fsf@vertex.dottedmag> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Working with Maildir storage? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 20:33:05 -0000 --GGxZz/e2pmGePzrA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > See the patch just posted here. Is the list archived anywhere? The obvious archives (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I think I subscribed too late to get the patch (I only just saw the discussion about it). It doesn't look like the patch is in git yet. -- Lars --=20 Lars Kellogg-Stedman Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences --GGxZz/e2pmGePzrA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQEcBAEBCAAGBQJLAwh9AAoJENdGlQYxQazYHJMIAI+XTPOyBTZIxEGTdgVKd2fR k27ucKs6lXozfMIIGchNUDXQho+KmiuTfX1XFJeBkqOlhrd9zlGjBGoBM0YBq/Gs aStPdonREzsHORjmyQCCpjg4AcqCRTXFbDXzAeXlxMPOrZ3P0XNPzTEM1mVksbmg mBBDLdHncy4sSCfFgXwRGGgLv9z5Acqm8xGYr68c9PIXY939ozIKV9LVUhxiNz9g We2a9rLDhfwxUqDlGdiNwZZimiKvD/fsYSrBZMDb5HgIYkeNZ4SD8Xu+OgB550wN OFfwGi3o8WFK2AyDe5QJDh9Ub+euPNlVzePoGpkltZEHuCcLFJqCHv5XYpbxcjA= =GO2Q -----END PGP SIGNATURE----- --GGxZz/e2pmGePzrA-- From dottedmag@dottedmag.net Tue Nov 17 12:50:55 2009 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 13A57431FBC for ; Tue, 17 Nov 2009 12:50:55 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 JvRtB2LCMsRi for ; Tue, 17 Nov 2009 12:50:54 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id 4B5DD431FAE for ; Tue, 17 Nov 2009 12:50:54 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 6CAA38C06C for ; Tue, 17 Nov 2009 21:50:53 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NAV0k-0007h8-W0 for notmuch@notmuchmail.org; Wed, 18 Nov 2009 02:50:51 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org References: <20091117190054.GU3165@dottiness.seas.harvard.edu> <87iqd9rn3l.fsf@vertex.dottedmag> <20091117203301.GV3165@dottiness.seas.harvard.edu> Date: Wed, 18 Nov 2009 02:50:48 +0600 In-Reply-To: <20091117203301.GV3165@dottiness.seas.harvard.edu> (Lars Kellogg-Stedman's message of "Tue, 17 Nov 2009 15:33:01 -0500") Message-ID: <87fx8can9z.fsf@vertex.dottedmag> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] Working with Maildir storage? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 20:50:55 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Twas brillig at 15:33:01 17.11.2009 UTC-05 when lars@seas.harvard.edu did g= yre and gimble: LK> Is the list archived anywhere? The obvious archives LK> (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I LK> think I subscribed too late to get the patch (I only just saw the LK> discussion about it). LK> It doesn't look like the patch is in git yet. Just has been pushed =2D-=20 http://fossarchy.blogspot.com/ --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAEBAgAGBQJLAwyoAAoJEJ0g9lA+M4iIeSQP/07tLHYQO48dEumLbNGdvDQt XWOtutPbGiId2ffs/rpe4uDPIMHrgXSeSj9l0TGjLA7uVp70mwyZ+5XZZgViJZye pKLuw7HTtWebcP95LJ/RgyMt9bEIGqzLOy0LKv8QsFJR1bQQk4bRfa4hQ7ZkZJWG yFHa2wT3obVZocaGnkpB+yPV/UwSnUpUA35qy8fe1JstBYGJMbOWW8SxttVSTgrY Q07nP+kwva6nUHxxM9jAwBawOApjwQcHN/Z69KvLCA5bES72u7cNv7Agy4cmhE7b vplJn1cQfgz8c9LXXIdCvT4uHygH0oS2VBvRJhVQU5yWbyGH5CnQxgpbZix6Hp+o cHm1n3YkgmbRhu/KTnZAQZ4aqj5vF31lX6sRa2hkJUOPPNn+887hC7zwIyoaCmXz oYqY1gSR7E+x6AMHQL+z7byhrjHiHCjzsqusNbltU2pTAJY4zgPaZArFrriv2oef 9Y9KB78F7Q+ccBCEZJvpiEfWJVOkVM3UgmP+BBQwvq3+vWGGU8P+0P/+jNec+/rZ pHXRBuroa5Z5cL+ZX2eBuMsPmChf2FvPwhm2LisDgrSr8ApIEWpmDNJkuuTqn2Wg 7zSreN0q2aQl96j80FBXszL5y8gXXIHVS9BcJIFF52Ww1h19LDnBpYS9j6kE3u8f Sll+C+7x4vUJk2mmA+K8 =AxP3 -----END PGP SIGNATURE----- --=-=-=-- From dottedmag@dottedmag.net Tue Nov 17 12:51:20 2009 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 DE52D431FBC for ; Tue, 17 Nov 2009 12:51:20 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 vSNyQAFba5ed for ; Tue, 17 Nov 2009 12:51:20 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id 40D02431FAE for ; Tue, 17 Nov 2009 12:51:20 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 923208C03E for ; Tue, 17 Nov 2009 21:51:19 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NAV1C-0007is-8Z for notmuch@notmuchmail.org; Wed, 18 Nov 2009 02:51:18 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 02:51:18 +0600 Message-Id: <1258491078-29658-1-git-send-email-dottedmag@dottedmag.net> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] Handle rename of message file X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 20:51:21 -0000 If message file has been renamed, just update filename in the DB. Signed-off-by: Mikhail Gusarov --- lib/database.cc | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 3c8d626..c4eb8b6 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -925,20 +925,23 @@ notmuch_database_add_message (notmuch_database_t *notmuch, if (private_status == NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND) { _notmuch_message_set_filename (message, filename); _notmuch_message_add_term (message, "type", "mail"); + + ret = _notmuch_database_link_message (notmuch, message, message_file); + if (ret) + goto DONE; + + date = notmuch_message_file_get_header (message_file, "date"); + _notmuch_message_set_date (message, date); + + _notmuch_message_index_file (message, filename); + } else if (strcmp(notmuch_message_get_filename(message), filename)) { + /* Message file has been moved/renamed */ + _notmuch_message_set_filename (message, filename); } else { ret = NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID; goto DONE; } - ret = _notmuch_database_link_message (notmuch, message, message_file); - if (ret) - goto DONE; - - date = notmuch_message_file_get_header (message_file, "date"); - _notmuch_message_set_date (message, date); - - _notmuch_message_index_file (message, filename); - _notmuch_message_sync (message); } catch (const Xapian::Error &error) { fprintf (stderr, "A Xapian exception occurred: %s.\n", -- 1.6.3.3 From keithp@keithp.com Tue Nov 17 13:15:31 2009 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 F1E1A431FAE for ; Tue, 17 Nov 2009 13:15:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 iCUsOU61POSG for ; Tue, 17 Nov 2009 13:15:29 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 77B24431FBF for ; Tue, 17 Nov 2009 13:15:29 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 95C46760129; Tue, 17 Nov 2009 13:15:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zJkWoUraovYM; Tue, 17 Nov 2009 13:15:25 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 723E276012A; Tue, 17 Nov 2009 13:15:25 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 64A17760129; Tue, 17 Nov 2009 13:15:25 -0800 (PST) From: Keith Packard To: Carl Worth , Mikhail Gusarov , notmuch@notmuchmail.org In-Reply-To: <87lji5cbwo.fsf@yoom.home.cworth.org> References: <1258471718-6781-1-git-send-email-dottedmag@dottedmag.net> <87lji5cbwo.fsf@yoom.home.cworth.org> Date: Tue, 17 Nov 2009 13:15:25 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH 1/2] Close message file after parsing message headers X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 21:15:31 -0000 On Tue, 17 Nov 2009 09:13:27 -0800, Carl Worth wrote: > I didn't apply Keith's fix yet, because I think I'd rather just fix the > indexer to store the In-Reply-To header in a separate term prefix from > the term used for the References header[*]. That will then let us lookup > the in-reply-to value later for thread constructions without having to > open the original email file at all. Threading the message also involves displaying the from and to contents, which requires opening the message file. The alternative to the fix I provided is to just parse all of the message headers when first opening the message; it could then be immediately closed and the hash referred to for all header data. Given the choice, just having the caller say when it has finished with a message is probably a reasonable option... -keith From keithp@keithp.com Tue Nov 17 13:24:18 2009 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 B3344431FBC for ; Tue, 17 Nov 2009 13:24:18 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 gwgyjmmErduK for ; Tue, 17 Nov 2009 13:24:18 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 0608E431FAE for ; Tue, 17 Nov 2009 13:24:18 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 6E5A2760129; Tue, 17 Nov 2009 13:24:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vwKvm85blN7E; Tue, 17 Nov 2009 13:24:14 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 4744E76012A; Tue, 17 Nov 2009 13:24:14 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 3A637760129; Tue, 17 Nov 2009 13:24:14 -0800 (PST) From: Keith Packard To: Lars Kellogg-Stedman , Mikhail Gusarov In-Reply-To: <20091117203301.GV3165@dottiness.seas.harvard.edu> References: <20091117190054.GU3165@dottiness.seas.harvard.edu> <87iqd9rn3l.fsf@vertex.dottedmag> <20091117203301.GV3165@dottiness.seas.harvard.edu> Date: Tue, 17 Nov 2009 13:24:13 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Working with Maildir storage? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 21:24:18 -0000 On Tue, 17 Nov 2009 15:33:01 -0500, Lars Kellogg-Stedman wrote: > > See the patch just posted here. I've also pushed a slightly more complicated (and complete) fix to my private notmuch repository git://keithp.com/git/notmuch > Is the list archived anywhere? Oops. Looks like Carl's mail server is broken. He's traveling to Barcelona today and so it won't get fixed for a while. Thanks to everyone for trying out notmuch! -keith From keithp@keithp.com Tue Nov 17 13:32:52 2009 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 5827D431FBC for ; Tue, 17 Nov 2009 13:32:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 54mHbuHofMwV for ; Tue, 17 Nov 2009 13:32:51 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id D7D39431FAE for ; Tue, 17 Nov 2009 13:32:50 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 52D6876012B for ; Tue, 17 Nov 2009 13:32:50 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00yCjq0CwzdJ; Tue, 17 Nov 2009 13:32:46 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id E225276012A; Tue, 17 Nov 2009 13:32:46 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id DF203760129; Tue, 17 Nov 2009 13:32:46 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id 887CD318131; Tue, 17 Nov 2009 13:32:46 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Tue, 17 Nov 2009 13:32:45 -0800 Message-Id: <1258493565-13508-1-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 21:32:52 -0000 When closing a thread view, mark the thread as archived by removing the "inbox" tag, and for the 'x' variant, the "unread" tag as well, then kill the buffer and update the search window view as well. This makes 'x' much the same as 'a', but instead of taking you to the next message, it takes you back to the search window instead. Signed-off-by: Keith Packard --- notmuch.el | 86 ++++++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 67 insertions(+), 19 deletions(-) diff --git a/notmuch.el b/notmuch.el index 638d49d..7b0d72c 100644 --- a/notmuch.el +++ b/notmuch.el @@ -31,8 +31,8 @@ ; Will be much preferable to switch to direct manipulation for ; toggling visibility of these components. Probably using ; overlays-at to query and manipulate the current overlay. - (define-key map "a" 'notmuch-show-archive-thread) - (define-key map "A" 'notmuch-show-mark-read-then-archive-thread) + (define-key map "a" 'notmuch-show-mark-read-archive-thread-next-thread) + (define-key map "A" 'notmuch-show-archive-thread-next-thread) (define-key map "b" 'notmuch-show-toggle-body-read-visible) (define-key map "c" 'notmuch-show-toggle-citations-visible) (define-key map "h" 'notmuch-show-toggle-headers-visible) @@ -47,7 +47,8 @@ (define-key map "s" 'notmuch-show-toggle-signatures-visible) (define-key map "v" 'notmuch-show-view-all-mime-parts) (define-key map "w" 'notmuch-show-view-raw-message) - (define-key map "x" 'kill-this-buffer) + (define-key map "x" 'notmuch-show-mark-read-archive-thread-kill-buffer) + (define-key map "X" 'notmuch-show-archive-thread-kill-buffer) (define-key map "+" 'notmuch-show-add-tag) (define-key map "-" 'notmuch-show-remove-tag) (define-key map (kbd "DEL") 'notmuch-show-rewind) @@ -183,7 +184,33 @@ Unlike builtin `next-line' this version accepts no arguments." (cons (notmuch-show-get-message-id) nil))) (notmuch-show-set-tags (sort (set-difference tags toremove :test 'string=) 'string<)))))) -(defun notmuch-show-archive-thread-maybe-mark-read (markread) +(defun notmuch-show-next-thread (markread) + (let ((parent-buffer notmuch-show-parent-buffer)) + (kill-this-buffer) + (if parent-buffer + (progn + (switch-to-buffer parent-buffer) + (forward-line) + (notmuch-search-show-thread))))) + +(defun notmuch-delete-tags (to-remove from) + (if to-remove + (delete (car to-remove) (notmuch-delete-tags (cdr to-remove) from)) + from)) + +(defun notmuch-kill-message-buffer (markread) + (let ((parent-buffer notmuch-show-parent-buffer)) + (kill-this-buffer) + (if parent-buffer + (progn + (switch-to-buffer parent-buffer) + (let ((tags (notmuch-search-get-tags))) + (setq tags (delete "inbox" tags)) + (if markread (setq tags (delete "unread" tags))) + (notmuch-search-set-tags tags)) + (forward-line))))) + +(defun notmuch-show-archive-thread-maybe-mark-read (markread shownext) (save-excursion (goto-char (point-min)) (while (not (eobp)) @@ -194,15 +221,9 @@ Unlike builtin `next-line' this version accepts no arguments." (forward-char)) (if (not (re-search-forward notmuch-show-message-begin-regexp nil t)) (goto-char (point-max))))) - (let ((parent-buffer notmuch-show-parent-buffer)) - (kill-this-buffer) - (if parent-buffer - (progn - (switch-to-buffer parent-buffer) - (forward-line) - (notmuch-search-show-thread))))) + (if shownext (notmuch-show-next-thread markread) (notmuch-kill-message-buffer markread))) -(defun notmuch-show-mark-read-then-archive-thread () +(defun notmuch-show-mark-read-archive-thread-next-thread () "Remove \"unread\" tag from each message, then archive and show next thread. Archive each message currrently shown by removing the \"unread\" @@ -215,9 +236,22 @@ being delivered to the same thread. It does not archive the entire thread, but only the messages shown in the current buffer." (interactive) - (notmuch-show-archive-thread-maybe-mark-read t)) + (notmuch-show-archive-thread-maybe-mark-read t t)) + +(defun notmuch-show-mark-read-archive-thread-kill-buffer () + "Remove \"unread\" tag from each message, then archive and kill the buffer. + +Archive each message currrently shown by removing the \"unread\" +and \"inbox\" tag from each. Then kill this buffer. + +Note: This command is safe from any race condition of new messages +being delivered to the same thread. It does not archive the +entire thread, but only the messages shown in the current +buffer." + (interactive) + (notmuch-show-archive-thread-maybe-mark-read t nil)) -(defun notmuch-show-archive-thread () +(defun notmuch-show-archive-thread-next-thread () "Archive each message in thread, and show next thread from search. Archive each message currrently shown by removing the \"inbox\" @@ -229,7 +263,20 @@ being delivered to the same thread. It does not archive the entire thread, but only the messages shown in the current buffer." (interactive) - (notmuch-show-archive-thread-maybe-mark-read nil)) + (notmuch-show-archive-thread-maybe-mark-read nil t)) + +(defun notmuch-show-archive-thread-kill-buffer () + "Archive each message in thread, and kill the thread buffer. + +Archive each message currrently shown by removing the \"inbox\" +tag from each. Then kill this buffer. + +Note: This command is safe from any race condition of new messages +being delivered to the same thread. It does not archive the +entire thread, but only the messages shown in the current +buffer." + (interactive) + (notmuch-show-archive-thread-maybe-mark-read nil t)) (defun notmuch-show-view-raw-message () "View the raw email of the current message." @@ -297,7 +344,7 @@ by searching backward)." (not (re-search-forward notmuch-show-message-begin-regexp nil t))))) (defun notmuch-show-message-unread-p () - "Preficate testing whether current message is unread." + "Predicate testing whether current message is unread." (member "unread" (notmuch-show-get-tags))) (defun notmuch-show-next-message () @@ -434,7 +481,7 @@ which this thread was originally shown." (let ((last (notmuch-show-last-message-p))) (notmuch-show-mark-read-then-next-open-message) (if last - (notmuch-show-archive-thread)))))) + (notmuch-show-archive-thread-next-thread)))))) (defun notmuch-show-markup-citations-region (beg end depth) (goto-char beg) @@ -618,8 +665,9 @@ messages. Each time you navigate away from a message with You can add or remove tags from the current message with '+' and '-'. You can also archive all messages in the current -view, (remove the \"inbox\" tag from each), with -`notmuch-show-archive-thread' (bound to 'a' by default). +view, (remove the \"inbox\" tag from each), with either +`notmuch-show-archive-thread-next-thread' (bound to 'a' by default) or +`notmuch-show-archive-thread-kill-buffer' (bound to 'x' by default). \\{notmuch-show-mode-map}" (interactive) -- 1.6.5.2 From SRS0=5erb=HF=iptel.org=jan@srs.perfora.net Tue Nov 17 14:18:52 2009 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 D80FF431FBC for ; Tue, 17 Nov 2009 14:18:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 AsNMzDlVNaaJ for ; Tue, 17 Nov 2009 14:18:52 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by olra.theworths.org (Postfix) with ESMTP id 7BAF2431FAE for ; Tue, 17 Nov 2009 14:18:52 -0800 (PST) Received-SPF: pass (mxus1: domain of iptel.org designates 213.192.59.67 as permitted sender) client-ip=213.192.59.67; envelope-from=jan@iptel.org; helo=mail.iptel.org; Received: from mail.iptel.org ([213.192.59.67]) by mx.perfora.net (node=mxus1) with ESMTP (Nemesis) id 0Lsjs9-1OCDpK2DRx-012Hui for notmuch@notmuchmail.org; Tue, 17 Nov 2009 17:18:51 -0500 Received: by mail.iptel.org (Postfix, from userid 103) id 08FDF3707CE; Tue, 17 Nov 2009 23:18:49 +0100 (CET) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.iptel.org (Postfix) with ESMTPSA id B0B2C370753 for ; Tue, 17 Nov 2009 23:18:48 +0100 (CET) Received: by x61s.janakj (Postfix, from userid 1000) id 8A1C5440655; Tue, 17 Nov 2009 23:18:47 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Tue, 17 Nov 2009 23:18:47 +0100 Message-Id: <1258496327-12086-1-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] Older versions of install do not support -C. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 22:18:53 -0000 Do not use -C cmdline option of install, older versions, commonly found in distributions like Debian, do not seem to support it. Running make install on such systems (tested on Debian Lenny) fails. Signed-off-by: Jan Janak --- Makefile.local | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.local b/Makefile.local index f824bed..f51f1d1 100644 --- a/Makefile.local +++ b/Makefile.local @@ -27,11 +27,11 @@ install: all notmuch.1.gz for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \ $(DESTDIR)/etc/bash_completion.d/ ; \ do \ - install -C -d $$d ; \ + install -d $$d ; \ done ; - install -C notmuch $(DESTDIR)$(prefix)/bin/ - install -C -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/ - install -C notmuch-completion.bash \ + install notmuch $(DESTDIR)$(prefix)/bin/ + install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/ + install notmuch-completion.bash \ $(DESTDIR)/etc/bash_completion.d/notmuch SRCS := $(SRCS) $(notmuch_client_srcs) -- 1.6.3.3 From jan@ryngle.com Tue Nov 17 14:35:34 2009 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 4684C431FBC for ; Tue, 17 Nov 2009 14:35:34 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 TO35WhIVbKwN for ; Tue, 17 Nov 2009 14:35:33 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 753FA431FAE for ; Tue, 17 Nov 2009 14:35:33 -0800 (PST) Received: by bwz24 with SMTP id 24so557414bwz.30 for ; Tue, 17 Nov 2009 14:35:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.4.137 with SMTP id 9mr652133far.95.1258497330937; Tue, 17 Nov 2009 14:35:30 -0800 (PST) Date: Tue, 17 Nov 2009 23:35:30 +0100 Message-ID: From: Jan Janak To: notmuch@notmuchmail.org Content-Type: text/plain; charset=UTF-8 Subject: [notmuch] What a great idea! X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 22:35:34 -0000 Hello, First of all, notmuch is a wonderful idea, both the cmdline tool and the emacs interface! Thanks a lot for writing it, I was really excited when I read the announcement today. Have you considered sending an announcement to the org-mode mailing list? http://org-mode.org Various ways of searching/referencing emails from emacs were discussed there several times and none of them were as elegant as notmuch (not even close). Maybe notmuch would attract some of the developers there.. -- Jan From jan@ryngle.com Tue Nov 17 14:38:49 2009 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 29D87431FBC for ; Tue, 17 Nov 2009 14:38:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 OjDOE2bXWLFC for ; Tue, 17 Nov 2009 14:38:48 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 6B5A6431FAE for ; Tue, 17 Nov 2009 14:38:48 -0800 (PST) Received: by bwz24 with SMTP id 24so560700bwz.30 for ; Tue, 17 Nov 2009 14:38:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.73.20 with SMTP id o20mr272190faj.71.1258497527101; Tue, 17 Nov 2009 14:38:47 -0800 (PST) In-Reply-To: References: Date: Tue, 17 Nov 2009 23:38:47 +0100 Message-ID: From: Jan Janak To: notmuch@notmuchmail.org Content-Type: text/plain; charset=UTF-8 Subject: Re: [notmuch] What a great idea! X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 22:38:49 -0000 On Tue, Nov 17, 2009 at 11:35 PM, Jan Janak wrote: > Hello, > > First of all, notmuch is a wonderful idea, both the cmdline tool and > the emacs interface! Thanks a lot for writing it, I was really excited > when I read the announcement today. > > Have you considered sending an announcement to the org-mode mailing list? > http://org-mode.org Sorry, wrong URL, the correct one is: http://orgmode.org > Various ways of searching/referencing emails from emacs were discussed > there several times and none of them were as elegant as notmuch (not > even close). Maybe notmuch would attract some of the developers > there.. -- Jan From israel.herraiz@gmail.com Tue Nov 17 14:57:32 2009 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 E1B99431FBF for ; Tue, 17 Nov 2009 14:57:32 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 iTH78-v7lLQ5 for ; Tue, 17 Nov 2009 14:57:32 -0800 (PST) Received: from mail-fx0-f217.google.com (mail-fx0-f217.google.com [209.85.220.217]) by olra.theworths.org (Postfix) with ESMTP id 0ED04431FBC for ; Tue, 17 Nov 2009 14:57:31 -0800 (PST) Received: by fxm9 with SMTP id 9so570698fxm.30 for ; Tue, 17 Nov 2009 14:57:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:content-type:subject :from:to:date:message-id:user-agent:content-transfer-encoding; bh=O9/ySCYjTYIgD8jXr7zbMIgUmg26FtTED0VCBEcEj8c=; b=F98j7qAmg9XhNroX1+Y46hQjSFPioTZQ9tWohIYR4oKJ8fJwzwzx0bDZlJkB85JAHL kllYYsLBIlF68gRQJOL5jC7VS/tQiCH+zqM9gMPUxS0HyPuuUQ4rVzgWUb+0ERTj26mt ETrRwmBD2zcoinUpUdbd31/Ndz7bmdN2OatUA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:content-type:subject:from:to:date:message-id:user-agent :content-transfer-encoding; b=Dd+6EmwL6ZtEgaCfG4XQ4msOWHrH5w3wWSMc8kFz82zxMPJZ41tBT/+jknucnx2jbA oMn3/v2aGZMt+ryzezhLq3j8NM89v5ZgcOagX8oNL1GVzh59BcF30QKCQGQmruJEMFG9 zcqG7/8+jiSNff5oEZBx9WzPJ+sjSoahY+plQ= Received: by 10.103.127.35 with SMTP id e35mr4780839mun.106.1258498651061; Tue, 17 Nov 2009 14:57:31 -0800 (PST) Received: from elly (80.174.22.182.dyn.user.ono.com [80.174.22.182]) by mx.google.com with ESMTPS id n10sm2993969mue.47.2009.11.17.14.57.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 17 Nov 2009 14:57:30 -0800 (PST) Sender: Israel Herraiz Content-Type: text/plain; charset=utf8 From: Israel Herraiz To: notmuch Date: Tue, 17 Nov 2009 23:57:18 +0100 Message-Id: <1258498485-sup-142@elly> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Subject: [notmuch] New to the list X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 22:57:33 -0000 Hi all, I have subscribed to the list. As suggested by the welcome message, I am introducing myself. My name is Israel Herraiz, and I have done a couple of contributions to Sup, the probably well-known here e-mail client. "Not much" sounds interesting, and I wonder whether it could be integrated with the views of Sup (inbox, threads, etc). So I have subscribed to the list to keep an eye on what's going on here. I have just heard of "Not much". I have not even tried to download the code yet. Cheers, Israel From agriffis@ivy.griffis1.net Tue Nov 17 15:21:41 2009 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 D9C09431FBC for ; Tue, 17 Nov 2009 15:21:41 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 NAeXqva21AfD for ; Tue, 17 Nov 2009 15:21:41 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.195]) by olra.theworths.org (Postfix) with ESMTP id 5703F431FAE for ; Tue, 17 Nov 2009 15:21:41 -0800 (PST) Received: from ivy.griffis1.net ([38.99.250.175]) by mx.perfora.net (node=mxus0) with ESMTP (Nemesis) id 0MHHy7-1NMraB3ayp-00Dbce for notmuch@notmuchmail.org; Tue, 17 Nov 2009 18:21:41 -0500 Received: by ivy.griffis1.net (Postfix, from userid 1002) id 6DCA198C5D; Tue, 17 Nov 2009 15:21:42 -0800 (PST) X-IMAP-Sender: agriffis Date: Tue, 17 Nov 2009 18:21:38 -0500 From: Aron Griffis To: notmuch Message-ID: <20091117232137.GA7669@griffis1.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-08-17) Subject: [notmuch] archive X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 23:21:42 -0000 Just subscribed, I'd like to catch up on the previous postings, but the archive link seems to be bogus? Thanks, Aron From ingmar@exherbo.org Tue Nov 17 15:23:54 2009 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 13AF8431FBC for ; Tue, 17 Nov 2009 15:23:54 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Ob2qfkmzy1uM for ; Tue, 17 Nov 2009 15:23:52 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.195]) by olra.theworths.org (Postfix) with ESMTP id 364C9431FAE for ; Tue, 17 Nov 2009 15:23:52 -0800 (PST) Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by mx.perfora.net (node=mxus2) with ESMTP (Nemesis) id 0MKobQ-1NAXOo3mDo-000PV3 for notmuch@notmuchmail.org; Tue, 17 Nov 2009 18:23:51 -0500 Received: from [83.101.72.69] (helo=localhost) by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NAXOm-0001SR-MD; Tue, 17 Nov 2009 23:23:49 +0000 From: Ingmar Vanhassel To: Date: Wed, 18 Nov 2009 00:23:42 +0100 Message-Id: <1258500222-32066-1-git-send-email-ingmar@exherbo.org> X-Mailer: git-send-email 1.6.5.2.433.g23cdb Subject: [notmuch] [PATCH] Typsos X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 23:23:54 -0000 --- Makefile | 4 ++-- README | 6 +++--- gmime-filter-reply.h | 2 +- lib/database.cc | 2 +- lib/index.cc | 2 +- lib/message.cc | 2 +- lib/messages.c | 2 +- lib/notmuch-private.h | 2 +- lib/notmuch.h | 10 +++++----- lib/sha1.c | 2 +- lib/thread.cc | 2 +- notmuch-completion.bash | 2 +- notmuch-new.c | 4 ++-- notmuch-search.c | 2 +- notmuch.1 | 4 ++-- notmuch.el | 10 +++++----- show-message.c | 2 +- 17 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index 436dacf..96aaa73 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Default FLAGS, (can be overriden by user such as "make CFLAGS=-O2") +# Default FLAGS, (can be overridden by user such as "make CFLAGS=-O2") WARN_FLAGS=-Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum CFLAGS=-O2 @@ -14,7 +14,7 @@ override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags) override LDFLAGS += `pkg-config --libs glib-2.0 gmime-2.4 talloc` \ `xapian-config --libs` -# Include our local Makfile.local first so that its first target is default +# Include our local Makefile.local first so that its first target is default include Makefile.local include lib/Makefile.local diff --git a/README b/README index 40f05ab..27af77f 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ Notmuch - thread-based email index, search and tagging. Notmuch is a system for indexing, searching, reading, and tagging large collections of email messages. It uses the Xapian library to provide fast, full-text search of very large collection of email with -a very convenient search syntas. +a very convenient search syntax. Notmuch is free software, released under the GNU General Public License version 3 (or later). @@ -45,7 +45,7 @@ obtaining a more sophisticated interface: notmuch.el file in this distribution. If someone were to write a curses-based interface, or similar, - it might also be reasonable to buil on the "notmuch" + it might also be reasonable to build on the "notmuch" command-line interface. 2. Build on top of the notmuch library interface. @@ -67,4 +67,4 @@ still in development. We would appreciate any contributions to these efforts. - \ No newline at end of file + diff --git a/gmime-filter-reply.h b/gmime-filter-reply.h index 41cbc13..b7cbc6b 100644 --- a/gmime-filter-reply.h +++ b/gmime-filter-reply.h @@ -40,7 +40,7 @@ typedef struct _GMimeFilterReplyClass GMimeFilterReplyClass; * @saw_nl: previous char was a \n * @saw_angle: previous char was a > * - * A filter to insert/remove reply markers (lines begining with >) + * A filter to insert/remove reply markers (lines beginning with >) **/ struct _GMimeFilterReply { GMimeFilter parent_object; diff --git a/lib/database.cc b/lib/database.cc index 3c8d626..27597cf 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -180,7 +180,7 @@ notmuch_status_to_string (notmuch_status_t status) case NOTMUCH_STATUS_TAG_TOO_LONG: return "Tag value is too long (exceeds NOTMUCH_TAG_MAX)"; case NOTMUCH_STATUS_UNBALANCED_FREEZE_THAW: - return "Unblanced number of calls to notmuch_message_freeze/thaw"; + return "Unbalanced number of calls to notmuch_message_freeze/thaw"; default: case NOTMUCH_STATUS_LAST_STATUS: return "Unknown error status value"; diff --git a/lib/index.cc b/lib/index.cc index 65b83b3..80df64b 100644 --- a/lib/index.cc +++ b/lib/index.cc @@ -198,7 +198,7 @@ _index_mime_part (notmuch_message_t *message, if (i == 1) continue; if (i > 1) - fprintf (stderr, "Warning: Unexpected extra parts of mutlipart/signed. Indexing anyway.\n"); + fprintf (stderr, "Warning: Unexpected extra parts of multipart/signed. Indexing anyway.\n"); } _index_mime_part (message, g_mime_multipart_get_part (multipart, i)); diff --git a/lib/message.cc b/lib/message.cc index a4b090b..1d6623f 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -144,7 +144,7 @@ _notmuch_message_create (const void *talloc_owner, } /* Create a new notmuch_message_t object for a specific message ID, - * (which may or may not already exist in the databas). + * (which may or may not already exist in the database). * * Here, 'talloc owner' is an optional talloc context to which the new * message will belong. This allows for the caller to not bother diff --git a/lib/messages.c b/lib/messages.c index a588f8f..2f7c283 100644 --- a/lib/messages.c +++ b/lib/messages.c @@ -47,7 +47,7 @@ _notmuch_message_list_create (const void *ctx) return list; } -/* Append 'node' (which can of course point to an aribtrarily long +/* Append 'node' (which can of course point to an arbitrarily long * list of nodes) to the end of 'list'. */ void diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index 6036ce4..af82e58 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -235,7 +235,7 @@ notmuch_message_file_open (const char *filename); notmuch_message_file_t * _notmuch_message_file_open_ctx (void *ctx, const char *filename); -/* Close a notmuch message preivously opened with notmuch_message_open. */ +/* Close a notmuch message previously opened with notmuch_message_open. */ void notmuch_message_file_close (notmuch_message_file_t *message); diff --git a/lib/notmuch.h b/lib/notmuch.h index 32b5332..384c177 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -222,7 +222,7 @@ notmuch_database_get_timestamp (notmuch_database_t *database, /* Add a new message to the given notmuch database. * - * Here,'filename' should be a path relative to the the path of + * Here,'filename' should be a path relative to the path of * 'database' (see notmuch_database_get_path), or else should be an * absolute filename with initial components that match the path of * 'database'. @@ -258,7 +258,7 @@ notmuch_database_add_message (notmuch_database_t *database, const char *filename, notmuch_message_t **message); -/* Find a message with the given messsage_id. +/* Find a message with the given message_id. * * If the database contains a message with the given message_id, then * a new notmuch_message_t object is returned. The caller should call @@ -620,7 +620,7 @@ notmuch_messages_advance (notmuch_messages_t *messages); /* Destroy a notmuch_messages_t object. * * It's not strictly necessary to call this function. All memory from - * the notmuch_messages_t object will be reclaimed when the containg + * the notmuch_messages_t object will be reclaimed when the containing * query object is destroyed. */ void @@ -865,7 +865,7 @@ notmuch_tags_has_more (notmuch_tags_t *tags); /* Get the current tag from 'tags' as a string. * * Note: The returned string belongs to 'tags' and has a lifetime - * identical to it (and the query to which it utlimately belongs). + * identical to it (and the query to which it ultimately belongs). * * See the documentation of notmuch_message_get_tags for example code * showing how to iterate over a notmuch_tags_t object. @@ -884,7 +884,7 @@ notmuch_tags_advance (notmuch_tags_t *tags); /* Destroy a notmuch_tags_t object. * * It's not strictly necessary to call this function. All memory from - * the notmuch_tags_t object will be reclaimed when the containg + * the notmuch_tags_t object will be reclaimed when the containing * message or query objects are destroyed. */ void diff --git a/lib/sha1.c b/lib/sha1.c index ff4dd16..cc48108 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -43,7 +43,7 @@ _hex_of_sha1_digest (const unsigned char digest[SHA1_DIGEST_SIZE]) return result; } -/* Create a hexadcimal string version of the SHA-1 digest of 'str' +/* Create a hexadecimal string version of the SHA-1 digest of 'str' * (including its null terminating character). * * This function returns a newly allocated string which the caller diff --git a/lib/thread.cc b/lib/thread.cc index 4411d64..da58edc 100644 --- a/lib/thread.cc +++ b/lib/thread.cc @@ -190,7 +190,7 @@ _resolve_thread_relationships (unused (notmuch_thread_t *thread)) * subject line, the total count of messages, and all authors). The * second search is for all messages that are in the thread and that * also match the given query_string. This is to allow for a separate - * count of matched messages, and to allow a viewer to diplay these + * count of matched messages, and to allow a viewer to display these * messages differently. * * Here, 'ctx' is talloc context for the resulting thread object. diff --git a/notmuch-completion.bash b/notmuch-completion.bash index ad55f6d..cdad05d 100644 --- a/notmuch-completion.bash +++ b/notmuch-completion.bash @@ -1,4 +1,4 @@ -# Bash completion for notmutch +# Bash completion for notmuch # # Copyright © 2009 Carl Worth # diff --git a/notmuch-new.c b/notmuch-new.c index 83a05ba..5405a9f 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -303,7 +303,7 @@ add_files (notmuch_database_t *notmuch, /* XXX: This should be merged with the add_files function since it * shares a lot of logic with it. */ -/* Recursively count all regular files in path and all sub-direcotries +/* Recursively count all regular files in path and all sub-directories * of path. The result is added to *count (which should be * initialized to zero by the top-level caller before calling * count_files). */ @@ -469,7 +469,7 @@ notmuch_new_command (void *ctx, if (elapsed > 1 && ! add_files_state.saw_read_only_directory) { printf ("\nTip: If you have any sub-directories that are archives (that is,\n" - "they will never receive new mail), marking these directores as\n" + "they will never receive new mail), marking these directories as\n" "read-only (chmod u-w /path/to/dir) will make \"notmuch new\"\n" "much more efficient (it won't even look in those directories).\n"); } diff --git a/notmuch-search.c b/notmuch-search.c index 8db09c7..ac81372 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -76,7 +76,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[]) query_str = query_string_from_args (ctx, argc, argv); if (query_str == NULL) { - fprintf (stderr, "Out of moemory.\n"); + fprintf (stderr, "Out of memory.\n"); return 1; } diff --git a/notmuch.1 b/notmuch.1 index 6c3d10f..86d5f59 100644 --- a/notmuch.1 +++ b/notmuch.1 @@ -60,7 +60,7 @@ archives, and will then proceed to build a database that indexes the mail to allow for fast search of the archive. This directory can contain any number of sub-directories and should -primarily contain only files with indvidual email messages +primarily contain only files with individual email messages (eg. maildir or mh archives are perfect). If there are other, non-email files (such as indexes maintained by other email programs) then notmuch will do its best to detect those and ignore them. @@ -173,7 +173,7 @@ Constructs a reply template for a set of messages. See the documentation of .B search -for deatils of the supported syntax of search terms. +for details of the supported syntax of search terms. To make replying to email easier, .B notmuch reply diff --git a/notmuch.el b/notmuch.el index 8894a8e..7e01ed6 100644 --- a/notmuch.el +++ b/notmuch.el @@ -205,7 +205,7 @@ Unlike builtin `next-line' this version accepts no arguments." (defun notmuch-show-mark-read-then-archive-thread () "Remove \"unread\" tag from each message, then archive and show next thread. -Archive each message currrently shown by removing the \"unread\" +Archive each message currently shown by removing the \"unread\" and \"inbox\" tag from each. Then kill this buffer and show the next thread from the search from which this thread was originally shown. @@ -220,7 +220,7 @@ buffer." (defun notmuch-show-archive-thread () "Archive each message in thread, and show next thread from search. -Archive each message currrently shown by removing the \"inbox\" +Archive each message currently shown by removing the \"inbox\" tag from each. Then kill this buffer and show the next thread from the search from which this thread was originally shown. @@ -340,7 +340,7 @@ there are no more unread messages past the current point." (notmuch-show-next-message))) (defun notmuch-show-next-open-message () - "Advance to the the next message which is not hidden. + "Advance to the next message which is not hidden. If read messages are currently hidden, advance to the next unread message. Otherwise, advance to the next message." @@ -674,7 +674,7 @@ thread from that buffer can be show when done with this one)." ))) (defvar notmuch-search-authors-width 40 - "Number of columns to use to diplay authors in a notmuch-search buffer.") + "Number of columns to use to display authors in a notmuch-search buffer.") (defvar notmuch-search-mode-map (let ((map (make-sparse-keymap))) @@ -910,7 +910,7 @@ the beginning of the buffer). This command toggles the sort order for the current search. -Note that any fitlered searches created by +Note that any filtered searches created by `notmuch-search-filter' retain the search order of the parent search." (interactive) diff --git a/show-message.c b/show-message.c index 79b02e2..38f5897 100644 --- a/show-message.c +++ b/show-message.c @@ -38,7 +38,7 @@ show_message_part (GMimeObject *part, int *part_count, if (i == 1) continue; if (i > 1) - fprintf (stderr, "Warning: Unexpected extra parts of mutlipart/signed. Continuing.\n"); + fprintf (stderr, "Warning: Unexpected extra parts of multipart/signed. Continuing.\n"); } show_message_part (g_mime_multipart_get_part (multipart, i), part_count, show_part); -- 1.6.5.2.433.g23cdb From aperez@igalia.com Tue Nov 17 15:27:50 2009 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 4A9F8431FBC for ; Tue, 17 Nov 2009 15:27:50 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 kzGwR3bVw-B6 for ; Tue, 17 Nov 2009 15:27:49 -0800 (PST) X-Greylist: delayed 401 seconds by postgrey-1.32 at olra; Tue, 17 Nov 2009 15:27:49 PST Received: from alice.connectical.com (alice.connectical.com [208.89.208.235]) by olra.theworths.org (Postfix) with ESMTP id 8D319431FAE for ; Tue, 17 Nov 2009 15:27:49 -0800 (PST) Received: (qmail 16286 invoked from network); 17 Nov 2009 23:21:06 -0000 Received: from 97.126.60.213.dynamic.mundo-r.com (HELO hikari.localdomain) (aperez@213.60.126.97) by alice.connectical.com with ESMTPA; 17 Nov 2009 23:21:06 -0000 Received: from hikari (localhost [127.0.0.1]) by hikari.localdomain (Postfix) with ESMTP id 298DE30C35C2 for ; Wed, 18 Nov 2009 00:21:05 +0100 (CET) Date: Wed, 18 Nov 2009 00:20:59 +0100 From: Adrian Perez de Castro To: notmuch@notmuchmail.org Message-ID: <20091118002059.067214ed@hikari> Organization: Igalia X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.3; x86_64-redhat-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAADBQTFRFBwcHFhYWKCgoNzc3SEhIV1dXaGhod3d3iIiIlpaWqKiouLi4x8fH2NjY5+fn/v7+rSjDkgAAAjVJREFUOE9l07tvE0EQwOHfrkV9O+eko7g701BBfECJsIigT2IpooIqaSiRUEB0REj00FBQgYSCkhry+gecUPJybJeIxLumTbilsH2PMNXufDOa3ZVW+1JkpbUmD/8+vXR3c7or4Gz93mH309Kz8/C9/RQge7VfhW/LW+PF8IkrQ7Z6OKmQr1tl+LU/yWP9mxJka9O88fZHPwf/7u0kLyCnX3I4fQhgjAgIfi+HHw5A1Y2ggIMcFKAEnRoL0M3BosI4TI2IATjuT8DvSNJoNNJgkIhxlr9TUHeSpDnfohlIrMBlU+BGmsZqfr69FMfGMw4NoG835+J62riWyjQ/uXlTQjNUIoYegMsBM0pCD8oDas7n4HQsBghXFxJTW42KDs+4XLfjsN0wOYgABqARjMKIHIaAQnmHjsI5Cvi9Cf6k03OoWBkpIP3Q7354+dEimFBKHbMP9oKjwfd9gbrxR5KDToczK4uPF8UgNomKU2GaENRi77zyDKICxKBS4xXYbONPMQMdYZTBwMiMWiUg9g6UJ3OBogzjV8E7sBVwyvfAOYdQhsABzuOxI1MGZbs98Q6Md5UOfbbR2R0eWOesrnRw5ajT6f60LrNhWIHZpBnUWv2s14ukArWWTqTes3YQxRXgFkcMu70TPYqqUBs0YwmO967OVIdTG4bY4a7WLaqgLm5vbHdH5np0Dri//fmg7y8scB4u3+zsuNlH0X+g19bby69b+TYH6isvns8VdQWgxj9tHP8AR5/hSdYqkwsAAAAASUVORK5CYII= Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/ayZz9m37AOMROJCyUudvXvZ"; protocol="application/pgp-signature" Subject: [notmuch] Introducing myself X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 17 Nov 2009 23:27:50 -0000 --Sig_/ayZz9m37AOMROJCyUudvXvZ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello to all, I have just heard about Not Much today in some random Linux-related news site (LWN?), my name is Adrian Perez and I work as systems administrator (although I can do some code as well :P). I have always thought that the ideas behind Sup were great, but after some time using it, I got tired of the oddities that it has. I also do not like doing things like having to install Ruby just for reading and sorting mails. Some time ago I thought about doing something like Not Much and in fact I played a bit with the Python+Xapian and the Python+Whoosh combinations, because I find relaxing to code things in Python when I am not working and also it is installed by default on most distribution. I got to have some mailboxes indexed and basic searching working a couple of months ago. Lately I have been very busy and had no time for coding, and them... boom! Not Much appears -- and it is almost exactly what I was trying to do, but faster. I have been playing a bit with Not Much today, and I think it has potential. Also, I would like to share one idea I had in mind, that you might find interesting: One thing I have found very annoying is having to re-tag my mail when the indexes get b0rked (it happened a couple of times to me while using Sup), so I was planning to mails as read/unread and adding the tags not just to the index, but to the mail text itself, e.g. by adding a "X-Tags" header field or by reusing the "Keywords" one. This way, the index could be totally recreated by re-reading the mail directories, and this would also allow to a tools like OfflineIMAP [1] to get the mails into a local maildir, tagging and indexing the mails with the e-mail reader and then syncing back the messages with the "X-Tags" header to the IMAP server. This would allow to use the mail reader from a different computer and still have everything tagged finely. Best regards, --- [1] http://software.complete.org/software/projects/show/offlineimap --=20 Adrian Perez de Castro Igalia - Free Software Engineering --Sig_/ayZz9m37AOMROJCyUudvXvZ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (GNU/Linux) iEYEARECAAYFAksDL+AACgkQkcVZ2+TJEjtsuQCfXmilW8WpMQHCnwwJjRE1PWZy oFAAn3MmXC5sW7MvCFjs7ks6U16zgMEg =eL9p -----END PGP SIGNATURE----- --Sig_/ayZz9m37AOMROJCyUudvXvZ-- From alex.boterolowry@gmail.com Tue Nov 17 16:23:55 2009 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 5E2AC431FBC for ; Tue, 17 Nov 2009 16:23:55 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ORtmZOcBYcSH for ; Tue, 17 Nov 2009 16:23:54 -0800 (PST) Received: from mail-pw0-f51.google.com (mail-pw0-f51.google.com [209.85.160.51]) by olra.theworths.org (Postfix) with ESMTP id 53BC2431FAE for ; Tue, 17 Nov 2009 16:23:54 -0800 (PST) Received: by pwj10 with SMTP id 10so330396pwj.30 for ; Tue, 17 Nov 2009 16:23:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=y05RtVbdTG7OYYRov2eQDLEBYICZsfRA3FRPP9nrMMQ=; b=AkNoq9jCKNbJaqh+bELYXMD1a1lsj4PTCJKOhL1EiNKvEvJrwRrNn55CKMUBHOfQ75 CvJVgWygDHA2AYMtFIik0Axn3Svztf71+Ls9jiQymS9zP9IcLGCsm+SUR9dun74iWxvf QNU1N0xXlnUqADRq/hoVrui4VbBf1sjA5EGBE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=IXTiRksVsYYe71DPwZoAj1ou5XZOWuX1cGCf/CD8lyEf1V6bVDsO0v2efuJizBuzgs gZoU02whndlOIl1kwkgoCp+poe7xw7onwPeySJ2DY/QMsXQhwsnYTaYOKrANVBm3x3Ca 75GT4xQKVIUUhLtlD97OAGfOuC+WxuIfabeYQ= MIME-Version: 1.0 Received: by 10.114.186.37 with SMTP id j37mr5424456waf.36.1258503833548; Tue, 17 Nov 2009 16:23:53 -0800 (PST) Date: Tue, 17 Nov 2009 16:23:53 -0800 Message-ID: From: Alex Botero-Lowry To: notmuch@notmuchmail.org Content-Type: multipart/mixed; boundary=0016e64ca4d8f27a4804789a4139 Subject: [notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 00:23:55 -0000 --0016e64ca4d8f27a4804789a4139 Content-Type: multipart/alternative; boundary=0016e64ca4d8f27a3604789a4137 --0016e64ca4d8f27a3604789a4137 Content-Type: text/plain; charset=ISO-8859-1 In this case error out when no query is supplied. There seems to be an infinite-loop casued by i think notmuch_query_search_threads having an exception: A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND I'll look into that bug specifically a bit later. It might be better to do a usage instead of just throwing an error here? alex --0016e64ca4d8f27a3604789a4137 Content-Type: text/html; charset=ISO-8859-1 In this case error out when no query is supplied. There seems to be an infinite-loop casued by i think notmuch_query_search_threads having
an exception:

A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>

I'll look into that bug specifically a bit later.

It might be better to do a usage instead of just throwing an error here?

alex
--0016e64ca4d8f27a3604789a4137-- --0016e64ca4d8f27a4804789a4139 Content-Type: application/octet-stream; name="0001-Error-out-if-no-query-is-supplied-to-search-instead-.patch" Content-Disposition: attachment; filename="0001-Error-out-if-no-query-is-supplied-to-search-instead-.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g25cms190 RnJvbSAzZjk0MzFmNzRhNWZmNjZjODRjODY5YTNlMjZjMmJhZDQyYmVkMWIxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbGV4YW5kZXIgQm90ZXJvLUxvd3J5IDxhbGV4LmJvdGVyb2xv d3J5QGdtYWlsLmNvbT4KRGF0ZTogVHVlLCAxNyBOb3YgMjAwOSAxNjoyMDoyOCAtMDgwMApTdWJq ZWN0OiBbUEFUQ0hdIEVycm9yIG91dCBpZiBubyBxdWVyeSBpcyBzdXBwbGllZCB0byBzZWFyY2gg aW5zdGVhZCBvZiBnb2luZyBpbnRvIGFuIGluZmluaXRlIGxvb3AKCi0tLQogbm90bXVjaC1zZWFy Y2guYyB8ICAgIDUgKysrKysKIDEgZmlsZXMgY2hhbmdlZCwgNSBpbnNlcnRpb25zKCspLCAwIGRl bGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL25vdG11Y2gtc2VhcmNoLmMgYi9ub3RtdWNoLXNlYXJj aC5jCmluZGV4IDhkYjA5YzcuLmQ5NGZjY2QgMTAwNjQ0Ci0tLSBhL25vdG11Y2gtc2VhcmNoLmMK KysrIGIvbm90bXVjaC1zZWFyY2guYwpAQCAtNjYsNiArNjYsMTEgQEAgbm90bXVjaF9zZWFyY2hf Y29tbWFuZCAodm9pZCAqY3R4LCBpbnQgYXJnYywgY2hhciAqYXJndltdKQogICAgIGFyZ2MgLT0g aTsKICAgICBhcmd2ICs9IGk7CiAKKyAgICBpZiAoYXJnYyA9PSAwKSB7CisgICAgICAgIGZwcmlu dGYgKHN0ZGVyciwgIk5vIHF1ZXJ5IHByb3ZpZGVkXG4iKTsKKyAgICAgICAgcmV0dXJuIDE7Cisg ICAgfQorCiAgICAgY29uZmlnID0gbm90bXVjaF9jb25maWdfb3BlbiAoY3R4LCBOVUxMLCBOVUxM KTsKICAgICBpZiAoY29uZmlnID09IE5VTEwpCiAJcmV0dXJuIDE7Ci0tIAoxLjYuNS4yCgo= --0016e64ca4d8f27a4804789a4139-- From lars@seas.harvard.edu Tue Nov 17 16:50:49 2009 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 BA607431FBC for ; Tue, 17 Nov 2009 16:50:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 k8tlhxyZ8ALL for ; Tue, 17 Nov 2009 16:50:49 -0800 (PST) Received: from smtp-outbound.seas.harvard.edu (smtp-outbound.seas.harvard.edu [140.247.51.171]) by olra.theworths.org (Postfix) with ESMTP id 102C0431FAE for ; Tue, 17 Nov 2009 16:50:48 -0800 (PST) Received: from dottiness.seas.harvard.edu (dottiness.seas.harvard.edu [140.247.52.224]) by smtp-outbound.seas.harvard.edu (8.13.8/8.13.8) with SMTP id nAI0oeNh008204; Tue, 17 Nov 2009 19:50:40 -0500 Received: by dottiness.seas.harvard.edu (sSMTP sendmail emulation); Tue, 17 Nov 2009 19:50:40 -0500 Date: Tue, 17 Nov 2009 19:50:40 -0500 From: Lars Kellogg-Stedman To: Keith Packard Message-ID: <20091118005040.GA25380@dottiness.seas.harvard.edu> References: <20091117190054.GU3165@dottiness.seas.harvard.edu> <87iqd9rn3l.fsf@vertex.dottedmag> <20091117203301.GV3165@dottiness.seas.harvard.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Working with Maildir storage? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 00:50:49 -0000 --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > I've also pushed a slightly more complicated (and complete) fix to my > private notmuch repository The version of lib/messages.cc in your repo doesn't build because it's missing "#include " (for the uint32_t on line 466). --=20 Lars Kellogg-Stedman Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences --9amGYk9869ThD9tj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQEcBAEBCAAGBQJLA0TgAAoJENdGlQYxQazYsG0IAJ1t9h4Q3ma8z8ejeKR22Xh0 WcuRX2x9yEXy/+aG9W7Mot0mqUQCiLdmHM/2h5N9BFHyJvfOUf8lmssrJ5OS/kp5 j7FIx3GUELBmEZqFUPjRSQPk1hZURYdRsloKkrbQ2kAivjjb50zAAQ8Av4Cgj6cS 3HvNNmeVfJt1NS75vm+/wn48M8Vrcdv4gvNlSOhgFOixknvRoxSyNDOHYBKvHnSV 2HnO0GzhAQzDZAwdHBzJtb8vRmglrH33TVdrE7OW+sojYB3Wyz8r9+HIt8Q8ovzX nQ8p0Nf5DlF7tye3JYo0EeNm5EQJ4q0YyVYInhmtpi3A5Cyu50GcB/GZ5Sd6ajo= =WULe -----END PGP SIGNATURE----- --9amGYk9869ThD9tj-- From lars@seas.harvard.edu Tue Nov 17 16:58:31 2009 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 382FC431FBC for ; Tue, 17 Nov 2009 16:58:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 SP9jWc9RTkoz for ; Tue, 17 Nov 2009 16:58:30 -0800 (PST) Received: from smtp-outbound.seas.harvard.edu (smtp-outbound.seas.harvard.edu [140.247.51.171]) by olra.theworths.org (Postfix) with ESMTP id 80C56431FAE for ; Tue, 17 Nov 2009 16:58:30 -0800 (PST) Received: from dottiness.seas.harvard.edu (dottiness.seas.harvard.edu [140.247.52.224]) by smtp-outbound.seas.harvard.edu (8.13.8/8.13.8) with SMTP id nAI0wTmG008606 for ; Tue, 17 Nov 2009 19:58:29 -0500 Received: by dottiness.seas.harvard.edu (sSMTP sendmail emulation); Tue, 17 Nov 2009 19:58:29 -0500 Date: Tue, 17 Nov 2009 19:58:29 -0500 From: Lars Kellogg-Stedman To: notmuch Message-ID: <20091118005829.GB25380@dottiness.seas.harvard.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="L6iaP+gRLNZHKoI4" Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Subject: [notmuch] "notmuch help" outputs to stderr? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 00:58:31 -0000 --L6iaP+gRLNZHKoI4 Content-Type: multipart/mixed; boundary="z6Eq5LdranGa6ru8" Content-Disposition: inline --z6Eq5LdranGa6ru8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm just noticing that 'notmuch help ...' outputs to stderr, which isn't terribly intuitive. For example, the obvious invocation: notmuch help | less =2E..isn't terribly helpful. I've attached a patch that lets usage() take a FILE * argument so that you can output to stderr in response to usage errors, and stdout in response to an explicit request. --=20 Lars Kellogg-Stedman Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences --z6Eq5LdranGa6ru8 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="notmuch-help.patch" Content-Transfer-Encoding: quoted-printable diff --git a/notmuch.c b/notmuch.c index c47e640..a35cb99 100644 --- a/notmuch.c +++ b/notmuch.c @@ -157,23 +157,23 @@ command_t commands[] =3D { }; =20 static void -usage (void) +usage (FILE *out) { command_t *command; unsigned int i; =20 - fprintf (stderr, "Usage: notmuch [args...]\n"); - fprintf (stderr, "\n"); - fprintf (stderr, "Where and [args...] are as follows:\n"); - fprintf (stderr, "\n"); + fprintf (out, "Usage: notmuch [args...]\n"); + fprintf (out, "\n"); + fprintf (out, "Where and [args...] are as follows:\n"); + fprintf (out, "\n"); =20 for (i =3D 0; i < ARRAY_SIZE (commands); i++) { command =3D &commands[i]; =20 - fprintf (stderr, "\t%s\t%s\n\n", command->name, command->summary); + fprintf (out, "\t%s\t%s\n\n", command->name, command->summary); } =20 - fprintf (stderr, "Use \"notmuch help \" for more details on e= ach command.\n\n"); + fprintf (out, "Use \"notmuch help \" for more details on each= command.\n\n"); } =20 static int @@ -183,8 +183,8 @@ notmuch_help_command (unused (void *ctx), int argc, cha= r *argv[]) unsigned int i; =20 if (argc =3D=3D 0) { - fprintf (stderr, "The notmuch mail system.\n\n"); - usage (); + fprintf (stdout, "The notmuch mail system.\n\n"); + usage (stdout); return 0; } =20 --z6Eq5LdranGa6ru8-- --L6iaP+gRLNZHKoI4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQEcBAEBCAAGBQJLA0a1AAoJENdGlQYxQazYr78IAJtqTWIpBqSdOWqTzt/r4XNn KJ5mWAoNfq4H+3kx3xoWOFYS7qAYeJoHQWCDbMdb+zEXvPX6hMFn9+OxRN+N5FdQ uxGTugSG9xSsK28oGDCQUtr5uheo+tH0jygPjI+LTD97vjUYS4K2qzhLGFJmpLcj 1akMJXM0gSdPZT8dJyjxvC15pgboLspE4+b6jexXmd4UoFvXgqvjkYHeV4Wk+s0L xu+HkCGXL9WHYc3t171fFAru4Zd1AUxFQl4BZ2Y+OqRZUrD28Mtz3zGQxbJQoifl JFrgPAWioLN71SkVq/y+efjvGSl0osPpKU5dftMmyY1zV7k7mMlO08ZSJU+wANA= =Iijt -----END PGP SIGNATURE----- --L6iaP+gRLNZHKoI4-- From lars@seas.harvard.edu Tue Nov 17 17:01:19 2009 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 75784431FBC for ; Tue, 17 Nov 2009 17:01:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 IoYHzHoKBskU for ; Tue, 17 Nov 2009 17:01:18 -0800 (PST) Received: from smtp-outbound.seas.harvard.edu (smtp-outbound.seas.harvard.edu [140.247.51.171]) by olra.theworths.org (Postfix) with ESMTP id 7E033431FAE for ; Tue, 17 Nov 2009 17:01:18 -0800 (PST) Received: from dottiness.seas.harvard.edu (dottiness.seas.harvard.edu [140.247.52.224]) by smtp-outbound.seas.harvard.edu (8.13.8/8.13.8) with SMTP id nAI11Gkj008772 for ; Tue, 17 Nov 2009 20:01:16 -0500 Received: by dottiness.seas.harvard.edu (sSMTP sendmail emulation); Tue, 17 Nov 2009 20:01:16 -0500 Date: Tue, 17 Nov 2009 20:01:16 -0500 From: Lars Kellogg-Stedman To: notmuch Message-ID: <20091118010116.GC25380@dottiness.seas.harvard.edu> References: <20091118005829.GB25380@dottiness.seas.harvard.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZInfyf7laFu/Kiw7" Content-Disposition: inline In-Reply-To: <20091118005829.GB25380@dottiness.seas.harvard.edu> User-Agent: Mutt/1.5.19 (2009-01-05) Subject: Re: [notmuch] "notmuch help" outputs to stderr? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 01:01:19 -0000 --ZInfyf7laFu/Kiw7 Content-Type: multipart/mixed; boundary="KdquIMZPjGJQvRdI" Content-Disposition: inline --KdquIMZPjGJQvRdI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > I've attached a patch that lets usage() take a FILE * argument so that > you can output to stderr in response to usage errors, and stdout in > response to an explicit request. Whoops, missed a couple of stderr's in that last patch. New one attached. --=20 Lars Kellogg-Stedman Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences --KdquIMZPjGJQvRdI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="notmuch-help.patch" Content-Transfer-Encoding: quoted-printable diff --git a/notmuch.c b/notmuch.c index c47e640..446c810 100644 --- a/notmuch.c +++ b/notmuch.c @@ -157,23 +157,23 @@ command_t commands[] =3D { }; =20 static void -usage (void) +usage (FILE *out) { command_t *command; unsigned int i; =20 - fprintf (stderr, "Usage: notmuch [args...]\n"); - fprintf (stderr, "\n"); - fprintf (stderr, "Where and [args...] are as follows:\n"); - fprintf (stderr, "\n"); + fprintf (out, "Usage: notmuch [args...]\n"); + fprintf (out, "\n"); + fprintf (out, "Where and [args...] are as follows:\n"); + fprintf (out, "\n"); =20 for (i =3D 0; i < ARRAY_SIZE (commands); i++) { command =3D &commands[i]; =20 - fprintf (stderr, "\t%s\t%s\n\n", command->name, command->summary); + fprintf (out, "\t%s\t%s\n\n", command->name, command->summary); } =20 - fprintf (stderr, "Use \"notmuch help \" for more details on e= ach command.\n\n"); + fprintf (out, "Use \"notmuch help \" for more details on each= command.\n\n"); } =20 static int @@ -183,8 +183,8 @@ notmuch_help_command (unused (void *ctx), int argc, cha= r *argv[]) unsigned int i; =20 if (argc =3D=3D 0) { - fprintf (stderr, "The notmuch mail system.\n\n"); - usage (); + fprintf (stdout, "The notmuch mail system.\n\n"); + usage (stdout); return 0; } =20 @@ -192,8 +192,8 @@ notmuch_help_command (unused (void *ctx), int argc, cha= r *argv[]) command =3D &commands[i]; =20 if (strcmp (argv[0], command->name) =3D=3D 0) { - fprintf (stderr, "Help for \"notmuch %s\":\n\n", argv[0]); - fprintf (stderr, "\t%s\t%s\n\n%s\n\n", command->name, + fprintf (stdout, "Help for \"notmuch %s\":\n\n", argv[0]); + fprintf (stdout, "\t%s\t%s\n\n%s\n\n", command->name, command->summary, command->documentation); return 0; } --KdquIMZPjGJQvRdI-- --ZInfyf7laFu/Kiw7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQEcBAEBCAAGBQJLA0dcAAoJENdGlQYxQazY4nIIAIBCds86/uTmnouvyoPruUUR Bg5mXcnjuopz1Nwotl9s9U5sGeZuZngxyEvDz1Z1aTEjwab8ndNTf1xCwIoqBs+l i/sc4nPYubLdy1Ab/84DKVtCSbj+v5rtqhegwUWV7S1BY7t8dKNPNv7YBg7P0Azs 6s3CUxDV5eJCcxCGxxWHH8JDKRf7rDs6vzDwyPWLxlg1Xb1lEM/sRgPCKiShPdO3 Ak2hECusjskALhSDYX8/FLMd9HwLBC13sfWuSi/pHUAIOI2jru2p5sXrVSlTnFIJ fiMbPhKWiEaJj2kmm4pRwAhbTWp/J8ZvXWp0AyosxXQhQUWqujiyxgfiXS70SdQ= =t3Yc -----END PGP SIGNATURE----- --ZInfyf7laFu/Kiw7-- From stewart@flamingspork.com Tue Nov 17 17:06:13 2009 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 28F2E431FBC for ; Tue, 17 Nov 2009 17:06:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 NooLWEvN2Gmf for ; Tue, 17 Nov 2009 17:06:12 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by olra.theworths.org (Postfix) with ESMTP id 81798431FAE for ; Tue, 17 Nov 2009 17:06:12 -0800 (PST) Received: from kaylee.flamingspork.com (kaylee.flamingspork.com [74.207.245.61]) by mx.perfora.net (node=mxus1) with ESMTP (Nemesis) id 0MCK5p-1NJ7ic2t5V-0095KU for notmuch@notmuchmail.org; Tue, 17 Nov 2009 20:06:12 -0500 Received: from willster (localhost [127.0.0.1]) by kaylee.flamingspork.com (Postfix) with ESMTPS id 6FE636333; Wed, 18 Nov 2009 01:05:48 +0000 (UTC) Received: by willster (Postfix, from userid 1000) id 85CA410F5D86; Wed, 18 Nov 2009 12:06:08 +1100 (EST) From: Stewart Smith To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 12:05:53 +1100 Message-Id: <1258506353-20352-1-git-send-email-stewart@flamingspork.com> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] Fix linking with gcc to use g++ to link in C++ libs. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 01:06:13 -0000 Previously, Ubuntu 9.10, gcc 4.4.1 was getting: ccache gcc `pkg-config --libs glib-2.0 gmime-2.4 talloc` `xapian-config --libs` notmuch.o notmuch-config.o notmuch-dump.o notmuch-new.o notmuch-reply.o notmuch-restore.o notmuch-search.o notmuch-setup.o notmuch-show.o notmuch-tag.o notmuch-time.o gmime-filter-reply.o query-string.o show-message.o lib/notmuch.a -o notmuch /usr/bin/ld: lib/notmuch.a(database.o): in function global constructors keyed to BOOLEAN_PREFIX_INTERNAL:database.cc(.text+0x3a): error: undefined reference to 'std::ios_base::Init::Init()' --- Makefile.local | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile.local b/Makefile.local index f824bed..dbd3e20 100644 --- a/Makefile.local +++ b/Makefile.local @@ -18,7 +18,7 @@ notmuch_client_srcs = \ notmuch_client_modules = $(notmuch_client_srcs:.c=.o) notmuch: $(notmuch_client_modules) lib/notmuch.a - $(CC) $(LDFLAGS) $^ -o $@ + $(CXX) $(LDFLAGS) $^ -o $@ notmuch.1.gz: gzip --stdout notmuch.1 > notmuch.1.gz -- 1.6.3.3 From stewart@flamingspork.com Tue Nov 17 17:56:50 2009 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 AE743431FBC for ; Tue, 17 Nov 2009 17:56:50 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 48J5iP+XseiQ for ; Tue, 17 Nov 2009 17:56:49 -0800 (PST) X-Greylist: delayed 3037 seconds by postgrey-1.32 at olra; Tue, 17 Nov 2009 17:56:48 PST Received: from kaylee.flamingspork.com (kaylee.flamingspork.com [74.207.245.61]) by olra.theworths.org (Postfix) with ESMTP id E59B3431FAE for ; Tue, 17 Nov 2009 17:56:48 -0800 (PST) Received: from willster (localhost [127.0.0.1]) by kaylee.flamingspork.com (Postfix) with ESMTPS id 348C16333; Wed, 18 Nov 2009 01:56:26 +0000 (UTC) Received: by willster (Postfix, from userid 1000) id 186B710F5D9A; Wed, 18 Nov 2009 12:56:46 +1100 (EST) From: Stewart Smith To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 12:56:40 +1100 Message-Id: <1258509400-32511-1-git-send-email-stewart@flamingspork.com> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH 2/2] Read mail directory in inode number order X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 01:56:50 -0000 This gives a rather decent reduction in number of seeks required when reading a Maildir that isn't in pagecache. Most filesystems give some locality on disk based on inode numbers. In ext[234] this is the inode tables, in XFS groups of sequential inode numbers are together on disk and the most significant bits indicate allocation group (i.e inode 1,000,000 is always after inode 1,000). With this patch, we read in the whole directory, sort by inode number before stat()ing the contents. Ideally, directory is sequential and then we make one scan through the file system stat()ing. Since the universe is not ideal, we'll probably seek during reading the directory and a fair bit while reading the inodes themselves. However... with readahead, and stat()ing in inode order, we should be in the best place possible to hit the cache. In a (not very good) benchmark of "how long does it take to find the first 15,000 messages in my Maildir after 'echo 3 > /proc/sys/vm/drop_caches'", this patch consistently cut at least 8 seconds off the scan time. Without patch: 50 seconds With patch: 38-42 seconds. (I did this in a previous maildir reading project and saw large improvements too) --- notmuch-new.c | 32 +++++++++++++++----------------- 1 files changed, 15 insertions(+), 17 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 83a05ba..11fad8c 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -73,6 +73,11 @@ add_files_print_progress (add_files_state_t *state) fflush (stdout); } +static int ino_cmp(const struct dirent **a, const struct dirent **b) +{ + return ((*a)->d_ino < (*b)->d_ino)? -1: 1; +} + /* Examine 'path' recursively as follows: * * o Ask the filesystem for the mtime of 'path' (path_mtime) @@ -100,13 +105,12 @@ add_files_recursive (notmuch_database_t *notmuch, add_files_state_t *state) { DIR *dir = NULL; - struct dirent *e, *entry = NULL; - int entry_length; - int err; + struct dirent *entry = NULL; char *next = NULL; time_t path_mtime, path_dbtime; notmuch_status_t status, ret = NOTMUCH_STATUS_SUCCESS; notmuch_message_t *message = NULL; + struct dirent **namelist = NULL; /* If we're told to, we bail out on encountering a read-only * directory, (with this being a clear clue from the user to @@ -122,31 +126,23 @@ add_files_recursive (notmuch_database_t *notmuch, path_mtime = st->st_mtime; path_dbtime = notmuch_database_get_timestamp (notmuch, path); + int n_entries= scandir(path, &namelist, 0, ino_cmp); - dir = opendir (path); - if (dir == NULL) { + if (n_entries == -1) { fprintf (stderr, "Error opening directory %s: %s\n", path, strerror (errno)); ret = NOTMUCH_STATUS_FILE_ERROR; goto DONE; } - entry_length = offsetof (struct dirent, d_name) + - pathconf (path, _PC_NAME_MAX) + 1; - entry = malloc (entry_length); + int i=0; while (!interrupted) { - err = readdir_r (dir, entry, &e); - if (err) { - fprintf (stderr, "Error reading directory: %s\n", - strerror (errno)); - ret = NOTMUCH_STATUS_FILE_ERROR; - goto DONE; - } - - if (e == NULL) + if (i == n_entries) break; + entry= namelist[i++]; + /* If this directory hasn't been modified since the last * add_files, then we only need to look further for * sub-directories. */ @@ -243,6 +239,8 @@ add_files_recursive (notmuch_database_t *notmuch, free (entry); if (dir) closedir (dir); + if (namelist) + free (namelist); return ret; } -- 1.6.3.3 From keithp@keithp.com Tue Nov 17 17:59:55 2009 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 BC045431FBC for ; Tue, 17 Nov 2009 17:59:55 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 0Rle6kj9qJfY for ; Tue, 17 Nov 2009 17:59:53 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 7F758431FAE for ; Tue, 17 Nov 2009 17:59:53 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id A5E62760129; Tue, 17 Nov 2009 17:59:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OxbFdtLC7kgM; Tue, 17 Nov 2009 17:59:49 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id D8C1576012A; Tue, 17 Nov 2009 17:59:49 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id CA9B3760129; Tue, 17 Nov 2009 17:59:49 -0800 (PST) From: Keith Packard To: Israel Herraiz , notmuch In-Reply-To: <1258498485-sup-142@elly> References: <1258498485-sup-142@elly> Date: Tue, 17 Nov 2009 17:59:49 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] New to the list X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 01:59:56 -0000 On Tue, 17 Nov 2009 23:57:18 +0100, Israel Herraiz wrote: > "Not much" sounds interesting, and I wonder whether it could be > integrated with the views of Sup (inbox, threads, etc). So I have > subscribed to the list to keep an eye on what's going on here. We've tried to clone much of the sup UI inside emacs, including the inbox and threaded message presentation. Of course, we had to "improve" it a bit, as much due to the differences between curses and emacs as due to personal preferences... -keith From keithp@keithp.com Tue Nov 17 18:03:22 2009 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 8B5BE431FBF for ; Tue, 17 Nov 2009 18:03:22 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 X6Xn9sVeXoGk for ; Tue, 17 Nov 2009 18:03:22 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id C9043431FAE for ; Tue, 17 Nov 2009 18:03:21 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 23EC7760129; Tue, 17 Nov 2009 18:03:21 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BU4FCcQv1E0k; Tue, 17 Nov 2009 18:03:18 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 2118976012A; Tue, 17 Nov 2009 18:03:18 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 14437760129; Tue, 17 Nov 2009 18:03:18 -0800 (PST) From: Keith Packard To: Adrian Perez de Castro , notmuch@notmuchmail.org In-Reply-To: <20091118002059.067214ed@hikari> References: <20091118002059.067214ed@hikari> Date: Tue, 17 Nov 2009 18:03:17 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Introducing myself X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 02:03:22 -0000 On Wed, 18 Nov 2009 00:20:59 +0100, Adrian Perez de Castro wrote: > Some time ago I thought > about doing something like Not Much and in fact I played a bit with the > Python+Xapian and the Python+Whoosh combinations, because I find relaxing > to code things in Python when I am not working and also it is installed > by default on most distribution. I got to have some mailboxes indexed and > basic searching working a couple of months ago. Sup certainly started a lot of people thinking... > Also, I would like to share one idea I had in mind, that you might find > interesting: One thing I have found very annoying is having to re-tag my > mail when the indexes get b0rked (it happened a couple of times to me while > using Sup), so I was planning to mails as read/unread and adding the tags > not just to the index, but to the mail text itself, e.g. by adding a > "X-Tags" header field or by reusing the "Keywords" one. Easier than that, notmuch (and sup too), provide a 'dump' command which just lists all of the message IDs and their associated tags. Makes saving tags easy and doesn't involve rewriting messages. I do this once a day just before my computer is backed up to an external drive. If the index is destroyed, you can reindex the messages and then reapply all of the tags with 'notmuch restore'. -- keith.packard@intel.com From keithp@keithp.com Tue Nov 17 18:04:36 2009 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 1B9BF431FBC for ; Tue, 17 Nov 2009 18:04:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 3jRnQSdUykmm for ; Tue, 17 Nov 2009 18:04:35 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 7E0A0431FAE for ; Tue, 17 Nov 2009 18:04:35 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id F2EA776012B; Tue, 17 Nov 2009 18:04:34 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id B6XhHCkLIZrh; Tue, 17 Nov 2009 18:04:32 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 47DC376012A; Tue, 17 Nov 2009 18:04:32 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 3CF8C760129; Tue, 17 Nov 2009 18:04:32 -0800 (PST) From: Keith Packard To: Aron Griffis , notmuch In-Reply-To: <20091117232137.GA7669@griffis1.net> References: <20091117232137.GA7669@griffis1.net> Date: Tue, 17 Nov 2009 18:04:31 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] archive X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 02:04:36 -0000 On Tue, 17 Nov 2009 18:21:38 -0500, Aron Griffis wrote: > Just subscribed, I'd like to catch up on the previous postings, > but the archive link seems to be bogus? Yeah, the archive appears broken and will need to wait until Carl arrives in Barcelona to get fixed. -- keith.packard@intel.com From stewart@flamingspork.com Tue Nov 17 18:22:25 2009 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 B0EF3431FBC for ; Tue, 17 Nov 2009 18:22:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 o-waKGygo4MD for ; Tue, 17 Nov 2009 18:22:25 -0800 (PST) Received: from kaylee.flamingspork.com (kaylee.flamingspork.com [74.207.245.61]) by olra.theworths.org (Postfix) with ESMTP id 1AEA9431FAE for ; Tue, 17 Nov 2009 18:22:25 -0800 (PST) Received: from willster (localhost [127.0.0.1]) by kaylee.flamingspork.com (Postfix) with ESMTPS id 9B6F46333; Wed, 18 Nov 2009 02:22:02 +0000 (UTC) Received: by willster (Postfix, from userid 1000) id 0029810F5D92; Wed, 18 Nov 2009 13:22:21 +1100 (EST) From: Stewart Smith To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 13:22:20 +1100 Message-Id: <1258510940-7018-1-git-send-email-stewart@flamingspork.com> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] count_files: sort directory in inode order before statting X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 02:22:25 -0000 --- notmuch-new.c | 30 ++++++++++-------------------- 1 files changed, 10 insertions(+), 20 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 11fad8c..c5f841a 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -308,36 +308,26 @@ add_files (notmuch_database_t *notmuch, static void count_files (const char *path, int *count) { - DIR *dir; - struct dirent *e, *entry = NULL; - int entry_length; - int err; + struct dirent *entry = NULL; char *next; struct stat st; + struct dirent **namelist = NULL; - dir = opendir (path); + int n_entries= scandir(path, &namelist, 0, ino_cmp); - if (dir == NULL) { + if (n_entries == -1) { fprintf (stderr, "Warning: failed to open directory %s: %s\n", path, strerror (errno)); goto DONE; } - entry_length = offsetof (struct dirent, d_name) + - pathconf (path, _PC_NAME_MAX) + 1; - entry = malloc (entry_length); + int i=0; while (!interrupted) { - err = readdir_r (dir, entry, &e); - if (err) { - fprintf (stderr, "Error reading directory: %s\n", - strerror (errno)); - free (entry); - goto DONE; - } + if (i == n_entries) + break; - if (e == NULL) - break; + entry= namelist[i++]; /* Ignore special directories to avoid infinite recursion. * Also ignore the .notmuch directory. @@ -376,8 +366,8 @@ count_files (const char *path, int *count) DONE: if (entry) free (entry); - - closedir (dir); + if (namelist) + free (namelist); } int -- 1.6.3.3 From gzjjgod@gmail.com Tue Nov 17 19:50:18 2009 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 7E5C4431FBC for ; Tue, 17 Nov 2009 19:50:18 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 tjKRftIw+Uaz for ; Tue, 17 Nov 2009 19:50:18 -0800 (PST) Received: from mail-pw0-f51.google.com (mail-pw0-f51.google.com [209.85.160.51]) by olra.theworths.org (Postfix) with ESMTP id D476C431FAE for ; Tue, 17 Nov 2009 19:50:17 -0800 (PST) Received: by pwj10 with SMTP id 10so428706pwj.30 for ; Tue, 17 Nov 2009 19:50:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=UxorCAHmz8fcwlbcgw02L136i9g0fH9uqR+jpiJh4a0=; b=GfVWg/IHguZMuP08Q6OyBVO87H8yiKjXxmtCrtqqveWu91JKdHf5g3/ZnHEwjkupcP Nrd6qpf1a7p8xR4IHJK0JnmahiEI/vOsUaAAf54a2idsmlqT8rctYkJ6z4MC6+tKsx3c TsFpNKebLtFgsi25hY1jBQIea9kyVhnVff5U4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=eDHkm9Aqgs7nKVogFhC3JS2J+zHJyTzE/TkzAgg8Z85BSo16Spimug/tkhXgeqF9IN lduF8jgEhglbGK0RFUu6wwZQ7Z1rPJHtybn6NPpkP8KCgGu9lZALIFIxWSgwgNwH8nPo 0mYT7/FZvCGn91FLlPL8nv/VCuCa+elUISsCs= MIME-Version: 1.0 Received: by 10.114.7.10 with SMTP id 10mr11064999wag.90.1258516217264; Tue, 17 Nov 2009 19:50:17 -0800 (PST) Date: Wed, 18 Nov 2009 11:50:17 +0800 Message-ID: From: Jjgod Jiang To: notmuch@notmuchmail.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [notmuch] Mac OS X/Darwin compatibility issues X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 03:50:18 -0000 Hi, When I tried to compile notmuch under Mac OS X 10.6, several issues arisen: 1. g++ reports 'warning: command line option "-Wmissing-declarations" is valid for C/ObjC but not for C++' 2. notmuch-reply.c: In function =E2=80=98address_is_users=E2=80=99: notmuch-reply.c:87: warning: passing argument 2 of =E2=80=98notmuch_config_get_user_other_email=E2=80=99 from incompatible poi= nter type That's due to the size incompatibility of 'unsigned int' and 'size_t' (size_t is uint64_t in Mac OS X). 3. Several errors about missing GNU extensions like getline() and strndup()= : warning: implicit declaration of function =E2=80=98getline=E2=80=99 error: =E2=80=98strndup=E2=80=99 was not declared in this scope We can implement these with fgets() and strncpy() though. - Jiang From jan@iptel.org Tue Nov 17 20:57:08 2009 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 A77AB431FBC for ; Tue, 17 Nov 2009 20:57:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 5GfykVyL0XQe for ; Tue, 17 Nov 2009 20:57:08 -0800 (PST) X-Greylist: delayed 23897 seconds by postgrey-1.32 at olra; Tue, 17 Nov 2009 20:57:07 PST Received: from mail.iptel.org (smtp.iptel.org [213.192.59.67]) by olra.theworths.org (Postfix) with ESMTP id AFF89431FAE for ; Tue, 17 Nov 2009 20:57:07 -0800 (PST) Received: by mail.iptel.org (Postfix, from userid 103) id 6A03E370823; Wed, 18 Nov 2009 05:57:06 +0100 (CET) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.iptel.org (Postfix) with ESMTPSA id 9A42937082E for ; Wed, 18 Nov 2009 05:57:05 +0100 (CET) Received: by x61s.janakj (Postfix, from userid 1000) id CA6AC440655; Wed, 18 Nov 2009 05:57:03 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 05:57:03 +0100 Message-Id: <1258520223-15328-1-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] notmuch new: Support for conversion of spool subdirectories into tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 04:57:08 -0000 This patch makes it possible to convert subdirectory names inside the spool directory into message tags. Messages stored in subdirectory "foo" will be marked with tag "foo". Message duplicates found in several subdirectories will be given one tag per subdirectory. This feature can be used to synchronize notmuch's tags with with gmail tags, for example. Gmail IMAP servers convert tags to IMAP subdirectories and those subdirectories can be converted back to tags in notmuch. The patch modifies notmuch_database_add_message function to return a pointer to the message even if a message duplicate was found in the database. This is needed if we want to add a tag for each subdirectory in which a message duplicate was found. In addition to that, it makes the pointer to notmuch_config_t global (previously it was a local variable in notmuch_new_command). The configuration data structure is used by the function which converts subdirectory names to tags. Finally, there is a new function called subdir_to_tag. The function extracts the name of the subdirectory inside the spool from the full path of the message (also removing Maildir's cur,dir,and tmp subdirectories) and adds it as a new tag to the message. Signed-off-by: Jan Janak --- lib/database.cc | 3 +- notmuch-new.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 3 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 3c8d626..f7799d2 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -949,7 +949,8 @@ notmuch_database_add_message (notmuch_database_t *notmuch, DONE: if (message) { - if (ret == NOTMUCH_STATUS_SUCCESS && message_ret) + if ((ret == NOTMUCH_STATUS_SUCCESS || + ret == NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID) && message_ret) *message_ret = message; else notmuch_message_destroy (message); diff --git a/notmuch-new.c b/notmuch-new.c index 83a05ba..d94ce16 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -19,6 +19,9 @@ */ #include "notmuch-client.h" +#include + +static notmuch_config_t *config = 0; static volatile sig_atomic_t do_add_files_print_progress = 0; @@ -45,6 +48,69 @@ tag_inbox_and_unread (notmuch_message_t *message) notmuch_message_add_tag (message, "unread"); } +/* + * Extracts the sub-directory from the filename and adds it as a new tag to + * the message. The filename must begin with the database directory configured + * in the configuration file. This prefix is then removed. If the remaining + * sub-directory ends with one of the Maildir special directories (/tmp, /new, + * /cur) then they are removed as well. If there is anything left then the + * function adds it as a new tag to the message. + * + * The function does nothing if it cannot extract a sub-directory from + * filename. + */ +static void +subdir_to_tag (char* filename, notmuch_message_t *message) +{ + const char* db_path; + char *msg_dir, *tmp; + int db_path_len, msg_dir_len; + + if (config == NULL) return; + db_path = notmuch_config_get_database_path (config); + if (db_path == NULL) return; + db_path_len = strlen(db_path); + + /* Make a copy of the string as dirname may need to modify it. */ + tmp = talloc_strdup(message, filename); + msg_dir = dirname(tmp); + msg_dir_len = strlen(msg_dir); + + /* If msg_dir starts with db_path, remove it, including the / which delimits + * it from the rest of the directory name. */ + if (db_path_len < msg_dir_len && + !strncmp(db_path, msg_dir, db_path_len)) { + msg_dir += db_path_len + 1; + msg_dir_len -= db_path_len + 1; + } else { + /* If we get here, either the message filename is not inside the + * database directory configured in the configuration file, or it is a + * file in the root directory of the database. Either way we just skip + * it because we do not know how to convert it to a meaningful + * subdirectory string that we could add as tag. */ + goto out; + } + + /* Special conditioning for Maildirs. If the remainder of the directory + * name ends with /new, /cur, or /tmp then remove it. */ + if ((msg_dir_len >= 4) && + (!strncmp(msg_dir + msg_dir_len - 4, "/new", 4) || + !strncmp(msg_dir + msg_dir_len - 4, "/cur", 4) || + !strncmp(msg_dir + msg_dir_len - 4, "/tmp", 4))) { + msg_dir[msg_dir_len - 4] = '\0'; + } + + /* If, after all the modifications, we still have a subdirectory, add it + * as tag. */ + if (strlen(msg_dir)) { + notmuch_message_add_tag (message, msg_dir); + } + +out: + talloc_free(tmp); +} + + static void add_files_print_progress (add_files_state_t *state) { @@ -186,10 +252,15 @@ add_files_recursive (notmuch_database_t *notmuch, case NOTMUCH_STATUS_SUCCESS: state->added_messages++; tag_inbox_and_unread (message); + subdir_to_tag(next, message); break; /* Non-fatal issues (go on to next file) */ case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: - /* Stay silent on this one. */ + /* Stay silent on this one. The message already exists in the + * database, that means we may have found a duplicate in + * another directory. If that's the case then we add another + * tag to the message with the sub-directory. */ + subdir_to_tag(next, message); break; case NOTMUCH_STATUS_FILE_NOT_EMAIL: fprintf (stderr, "Note: Ignoring non-mail file: %s\n", @@ -386,7 +457,6 @@ int notmuch_new_command (void *ctx, unused (int argc), unused (char *argv[])) { - notmuch_config_t *config; notmuch_database_t *notmuch; add_files_state_t add_files_state; double elapsed; -- 1.6.3.3 From rollandsantimano@yahoo.com Tue Nov 17 21:12:25 2009 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 1C6A2431FBC for ; Tue, 17 Nov 2009 21:12:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 zeviMyPxaBjN for ; Tue, 17 Nov 2009 21:12:24 -0800 (PST) Received: from web113505.mail.gq1.yahoo.com (web113505.mail.gq1.yahoo.com [98.136.167.45]) by olra.theworths.org (Postfix) with SMTP id 7528B431FAE for ; Tue, 17 Nov 2009 21:12:24 -0800 (PST) Received: (qmail 52894 invoked by uid 60001); 18 Nov 2009 05:12:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1258521143; bh=8otilBP5M4lCcgp3Q5IxDzOltPpjKF8q4F8D91Z1wqs=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=tL5lHs0/OQs8VN5FEr4JQXnDlHWOotX9QTIe8TUBQT4i6JBGKHVlr8Zgh3SaGRx40qWPVS/9/nYYnIoqXenruhaOI62Dvqo4sdO4OoEvH8kOso/f5mxbc2Gy4fTFIH56RwcOLqPpz5jKSPSJnOGVi4jPNWCv9i3VeGEvEt/IRSo= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=wCHPM6KpWJYKhKgAiWB5tHyf+iFe+pUj26pqS1/WXW88aV/uaSHlKnuw076Ci+vIwjyMUlqzrPhaXkRJLjemG0p5RG61WdCHB240VTc+CcB/R35qQkXhaJvbQYH7s0aSd1s86gP8MIaM/J+0e5qe1NCL6fQpttMbW7Qbo5OvTiQ=; Message-ID: <736613.51770.qm@web113505.mail.gq1.yahoo.com> X-YMail-OSG: hXlzzSYVM1nxJFnk0nWVqPUUxYp4NrkDULXGlNojDbhDnCcg4Wz2PsYWj2_BHK9kxHGkAetocGFA52PSlPLRkL5wCFvFoayO2CQmzxVSrpo0fYI2MbGt3qCTEQXn9zojhvPm8Dv9dsaaWekIlwyhO3gQLScNNdFxrJuj.hmU30.8eczB29vGlCSTpYDIpxEUjJPNbzIsWYUdkaMcn.F4awmEfwkRGvv9Uhe5eTwDbW60xMup1nsn4T.BGLAELwklBw5pSonpUB5iE4UM27Bsf39VpLyTxJHFI7Djclx4_LWbof08os5ZqSLFfmnhkmveZihCn_NXzKsWmwAJCeDP5AREUL2OObKjmx07pHV_dqhJtKgjT7fsB_74Og.SQxWVTWBB97BxhiSeGSs9soP58s92RcLq7It6 Received: from [202.3.120.9] by web113505.mail.gq1.yahoo.com via HTTP; Tue, 17 Nov 2009 21:12:23 PST X-Mailer: YahooMailRC/211.6 YahooMailWebService/0.8.100.260964 Date: Tue, 17 Nov 2009 21:12:23 -0800 (PST) From: Rolland Santimano To: notmuch@notmuchmail.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [notmuch] Link to mailing list archives ? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 05:12:25 -0000 The link[1] provided on the list page[2] is broken: [1] http://notmuchmail.org/pipermail/notmuch/ [2] http://notmuchmail.org/mailman/listinfo/notmuch From alex.boterolowry@gmail.com Tue Nov 17 22:04:17 2009 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 1D544431FBC for ; Tue, 17 Nov 2009 22:04:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 UO74-BodVXUw for ; Tue, 17 Nov 2009 22:04:16 -0800 (PST) Received: from mail-pz0-f197.google.com (mail-pz0-f197.google.com [209.85.222.197]) by olra.theworths.org (Postfix) with ESMTP id 03454431FAE for ; Tue, 17 Nov 2009 22:04:15 -0800 (PST) Received: by pzk35 with SMTP id 35so601314pzk.22 for ; Tue, 17 Nov 2009 22:04:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type :content-transfer-encoding; bh=K7hwaZwFTl9x5Nnf7sR6HBvmJ5Hy8CSXoIQ2VXG95dI=; b=v33IvTbqyUiADGv0eSg1EMHzTtT1rogTgwWcsh5Dy/2ZhIivZxTfqD7hfcFRKKu3Ja cPDWmQW59ecL1YAIP/Cf4KZ8si71jTgu4kOyOo+5RQcxmYFueR49X3CiS36JIwtCA+bR Fc9oU1kFD9aE7LU+70cIxCX8p/h5HwPxFBCno= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-type:content-transfer-encoding; b=fSJJmp+PTTd0PsEldkwJVRqOq39RGlYBNwPkZycPMsHt4apQJhfSC/CNoagje46uWc kzgt7qPKAWsOSuRiiqYBTfwGkeI+P45ObUmKfaJW44txIxQ2mv4CIB4+L0QamGvhWZVy xaqdg6yXkPDl7/hMcUS8I+H4rCAZ2sjMd3DZk= Received: by 10.114.3.15 with SMTP id 15mr1935536wac.181.1258524255404; Tue, 17 Nov 2009 22:04:15 -0800 (PST) Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85]) by mx.google.com with ESMTPS id 22sm1771538pxi.14.2009.11.17.22.04.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 17 Nov 2009 22:04:14 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo.i-did-not-set--mail-host-address--so-tickle-me) id 7287 by fortitudo (DragonFly Mail Agent) Tue, 17 Nov 2009 21:45:36 -0800 From: Alexander Botero-Lowry To: Jjgod Jiang , notmuch@notmuchmail.org In-Reply-To: References: Date: Tue, 17 Nov 2009 21:45:36 -0800 Message-ID: <86einw2xof.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [notmuch] Mac OS X/Darwin compatibility issues X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 06:04:17 -0000 On Wed, 18 Nov 2009 11:50:17 +0800, Jjgod Jiang wrote: > Hi, >=20 > When I tried to compile notmuch under Mac OS X 10.6, several issues > arisen: >=20 > 1. g++ reports 'warning: command line option "-Wmissing-declarations" > is valid for C/ObjC but not for C++' >=20 I got that too. I presume it's newly supported in GCC4.4? > 3. Several errors about missing GNU extensions like getline() and strndup= (): >=20 strndup from V8: char* strndup(char* str, size_t n) { // Stupid implementation of strndup since macos isn't born with // one. size_t len =3D strlen(str); if (len <=3D n) return StrDup(str); char* result =3D new char[n+1]; size_t i; for (i =3D 0; i <=3D n; i++) result[i] =3D str[i]; result[i] =3D '\0'; return result; } > warning: implicit declaration of function =E2=80=98getline=E2=80=99 > error: =E2=80=98strndup=E2=80=99 was not declared in this scope >=20 for getline do you mind trying #define _GNU_SOURCE 1 before #include in the offending files? The FreeBSD man pages mentions that as a way of enabling the GNU version of getline(). Alex From gzjjgod@gmail.com Tue Nov 17 22:14:28 2009 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 A376B431FBC for ; Tue, 17 Nov 2009 22:14:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 0Xyz2-oZMadI for ; Tue, 17 Nov 2009 22:14:27 -0800 (PST) Received: from mail-px0-f173.google.com (mail-px0-f173.google.com [209.85.216.173]) by olra.theworths.org (Postfix) with ESMTP id B34D8431FAE for ; Tue, 17 Nov 2009 22:14:27 -0800 (PST) Received: by pxi3 with SMTP id 3so607848pxi.22 for ; Tue, 17 Nov 2009 22:14:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=FkL6Oyv8O4rZcbwr7ZacO0zJEDLECbhUxHJe1ICXCeU=; b=OaYFLpTlBcq+CPdTUPCBkJ5319I7H3blAC6043oPqEMy+tpiTwbSnExqNhGCXFXKV7 g2YvSv+lyviZZdFKAXqERqdtgZmHkacdBeEfkvqeGNy+ur9gbbpDC6F7VUFhDk4NE4a0 Eqx3GLxNFr4ot3mpRPGHpXiTHy96aSkBPzrzg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Ddek1En7VrEW0nlu5SUAlX1aHPUMD3K+vQUenIUak0VndRTk2r7kWsukWZCoQw+/Cl J5RtDJVH64fQG4BKcGAFgmvKWZ4bP1ItNb4/QG3T5KrYtF18/qCdUw2q886xUY+q9J1E /3KgYX7Zwj15gKzzpLTGZ9Iha9OBVeXcatjsk= MIME-Version: 1.0 Received: by 10.115.85.6 with SMTP id n6mr2213140wal.74.1258524867121; Tue, 17 Nov 2009 22:14:27 -0800 (PST) In-Reply-To: <86einw2xof.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> References: <86einw2xof.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> Date: Wed, 18 Nov 2009 14:14:27 +0800 Message-ID: From: Jjgod Jiang To: Alexander Botero-Lowry Content-Type: text/plain; charset=UTF-8 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Mac OS X/Darwin compatibility issues X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 06:14:28 -0000 Hi, On Wed, Nov 18, 2009 at 1:45 PM, Alexander Botero-Lowry wrote: > for getline do you mind trying #define _GNU_SOURCE 1 > before #include in the offending files? The FreeBSD man pages > mentions that as a way of enabling the GNU version of getline(). It seems even _GNU_SOURCE is defined, getline is still not present. the C lib in Mac OS X simply doesn't have it. See also [1]. - Jiang [1] http://stackoverflow.com/questions/1117108/compiling-c-code-using-gnu-c-getline-on-mac-osx From alex.boterolowry@gmail.com Tue Nov 17 22:19:31 2009 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 6F59F431FBC for ; Tue, 17 Nov 2009 22:19:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 nnGn01K-kUHd for ; Tue, 17 Nov 2009 22:19:30 -0800 (PST) Received: from mail-gx0-f221.google.com (mail-gx0-f221.google.com [209.85.217.221]) by olra.theworths.org (Postfix) with ESMTP id D35CA431FAE for ; Tue, 17 Nov 2009 22:19:30 -0800 (PST) Received: by gxk21 with SMTP id 21so776862gxk.10 for ; Tue, 17 Nov 2009 22:19:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=b0TThtmQWUbIN6r+buvp9/ZPXPOkHlXNNrw468CSDC0=; b=H2qV/CajPum4GaxEDW+hSNZEIUfP4qlbgRztEPgh4khbrU3P6x0WnlN0ohlB34os9m a48loeRITNysoEh9trwBMJoFQNYtiRzcrIb35X788R5z/AWOpULHB2IUvyY3Cs8FYx4X dXoBln2PtpT0zVm+uklJRPFcsRCiHlAEUQRTU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=L4CE1CShr6vusyhXFFO+mCZZTi0memRC5Murv8pv1RQru1WSntxr/zPwcktKg8D9NB fvu1ENBS7/Pdw5lmHsiCU9NIQaFyNwaS5Fuozj3clUuSqrfIshmji08Bfn3C5nW8mu96 h/HLai+/E9FJhWqKJPqhfDjcVNDR0+vyu6s0s= Received: by 10.91.199.3 with SMTP id b3mr1521224agq.88.1258525170504; Tue, 17 Nov 2009 22:19:30 -0800 (PST) Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85]) by mx.google.com with ESMTPS id 5sm219122yxg.46.2009.11.17.22.19.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 17 Nov 2009 22:19:30 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo.i-did-not-set--mail-host-address--so-tickle-me) id 7292 by fortitudo (DragonFly Mail Agent) Tue, 17 Nov 2009 22:19:29 -0800 From: Alexander Botero-Lowry To: Jjgod Jiang In-Reply-To: References: <86einw2xof.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> Date: Tue, 17 Nov 2009 22:19:29 -0800 Message-ID: <86d43g2w3y.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Mac OS X/Darwin compatibility issues X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 06:19:31 -0000 On Wed, 18 Nov 2009 14:14:27 +0800, Jjgod Jiang wrote: > Hi, > > On Wed, Nov 18, 2009 at 1:45 PM, Alexander Botero-Lowry > wrote: > > for getline do you mind trying #define _GNU_SOURCE 1 > > before #include in the offending files? The FreeBSD man pages > > mentions that as a way of enabling the GNU version of getline(). > > It seems even _GNU_SOURCE is defined, getline is still not present. > the C lib in Mac OS X simply doesn't have it. See also [1]. > Alas. Since it's ostensibly based on the FreeBSD one, I figured there was a chance that would fix the problem. :/ From alex.boterolowry@gmail.com Wed Nov 18 00:02:58 2009 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 ADAD1431FBC for ; Wed, 18 Nov 2009 00:02:58 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 vKz9CaWUJ8nn for ; Wed, 18 Nov 2009 00:02:58 -0800 (PST) Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com [209.85.210.204]) by olra.theworths.org (Postfix) with ESMTP id 13034431FAE for ; Wed, 18 Nov 2009 00:02:58 -0800 (PST) Received: by yxe42 with SMTP id 42so968976yxe.22 for ; Wed, 18 Nov 2009 00:02:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:subject:date :message-id:mime-version:content-type; bh=1s6t0weK58IOHc6IvPSDrpdejY5lnCtQKPWlFBKxDUo=; b=etYkPPlf1oR38jEjQvPiZmBLpvPrFl2brD7DxldachiVGIcpMCd0FlqASVx+AyXYX8 zToH7qE85bGrIhINCrCviPoKc4OvOJJXEZTuQFu08Rd3tN3k4UxytOQOvhtOLPxoq4qD I85kdg5nDJ97DeSoltSTuCaYv9J24sZ6W064s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type; b=ifHw5Efu6B9avLxnW2lxh0et0WUgvfjN74KOcmdqlPl3SntQWikYsUk5KP7ECUUQrA hgZkk4toNBxAcxRircOfPJCptGKUNtOM4x3J2cFsAlVb55vBrpHolz88W7deLL7augTm QFZrb4DqkeIm6PU1W2lT6bvi4j3vsxNxsP8JA= Received: by 10.150.28.5 with SMTP id b5mr1682370ybb.232.1258531377544; Wed, 18 Nov 2009 00:02:57 -0800 (PST) Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85]) by mx.google.com with ESMTPS id 14sm1168121gxk.2.2009.11.18.00.02.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Nov 2009 00:02:56 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo.i-did-not-set--mail-host-address--so-tickle-me) id 72b8 by fortitudo (DragonFly Mail Agent) Wed, 18 Nov 2009 00:02:56 -0800 From: Alexander Botero-Lowry To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 00:02:56 -0800 Message-ID: <86aayk2rbj.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [notmuch] request for pull X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 08:02:58 -0000 The following changes since commit e8c9c3e6a534fc6c2919c2c1de63cea7250eb488: Ingmar Vanhassel (1): Makefile: Manual pages shouldn't be executable are available in the git repository at: git://alexbl.net/notmuch.git master Alexander Botero-Lowry (2): Error out if no query is supplied to search instead of going into an infinite loop set a local truncate-line variable in notmuch-search-mode, so that subjects don't wrap and make the output look weird notmuch-search.c | 5 +++++ notmuch.el | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) From keithp@keithp.com Wed Nov 18 00:30:05 2009 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 6CCEE431FBC for ; Wed, 18 Nov 2009 00:30:05 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 5JoDiArpbwe9 for ; Wed, 18 Nov 2009 00:30:04 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id A2E46431FAE for ; Wed, 18 Nov 2009 00:30:04 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 909D876012B for ; Wed, 18 Nov 2009 00:30:03 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nprqy3XbpY7A; Wed, 18 Nov 2009 00:30:00 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id A2B8A76012A; Wed, 18 Nov 2009 00:30:00 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id A057E760129; Wed, 18 Nov 2009 00:30:00 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id 4C6041581A5; Wed, 18 Nov 2009 00:30:00 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 00:29:59 -0800 Message-Id: <1258532999-9316-1-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 08:30:05 -0000 I created the notmuch-show-hook precisely so I could add these two options, but I suspect most people will want them, so I just made them the default. If you don't want them, you can use remove-hook to get rid of this. Signed-off-by: Keith Packard --- notmuch.el | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/notmuch.el b/notmuch.el index 1bb1294..c95cb43 100644 --- a/notmuch.el +++ b/notmuch.el @@ -698,6 +698,14 @@ view, (remove the \"inbox\" tag from each), with either :options '(goto-address) :group 'notmuch) +; Make show mode a bit prettier, highlighting URLs and using word wrap + +(defun notmuch-show-pretty-hook () + (goto-address-mode 1) + (visual-line-mode)) + +(add-hook 'notmuch-show-hook 'notmuch-show-pretty-hook) + (defun notmuch-show (thread-id &optional parent-buffer) "Run \"notmuch show\" with the given thread ID and display results. -- 1.6.5.2 From alex.boterolowry@gmail.com Wed Nov 18 00:52:40 2009 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 8B22B431FBC for ; Wed, 18 Nov 2009 00:52:40 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 MWMHpYN7UOv3 for ; Wed, 18 Nov 2009 00:52:39 -0800 (PST) Received: from mail-yw0-f173.google.com (mail-yw0-f173.google.com [209.85.211.173]) by olra.theworths.org (Postfix) with ESMTP id 9A6B9431FAE for ; Wed, 18 Nov 2009 00:52:38 -0800 (PST) Received: by ywh3 with SMTP id 3so965069ywh.22 for ; Wed, 18 Nov 2009 00:52:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=PWRKB1lFxfwuMdaDZrKVnPeqezy1hztkiBoWMBjSnkI=; b=XGw7CAOTwT7b59grUOary3IwxbMjY6hgY2u8Tp7KDBWqqujXeq7Sv+RygOpRqg+6o3 P5GUtrez9tDDqKeNRyqd24Ysz8NRqus4bm5/3Av3hK9wPptTVDTHdWLMe9i6CSFTnS+X +/doJBdg8fGiqrOAQ91J82qIRTuf6ahf6Cco0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-type; b=tYsfCK02F6v/9WfgHdVgre9ASITCbNl3wntuuC+peCsiFpZo5Zhd/b6Zn2uWsC4F4u Zdg0euFRg6kWdBYvF4ZpdWKNvhbjFbSCiZ/jTRTed1jdvjNl0SnQ+PRO0eUatQCjcGDI UUMVy2kBoutsYk0VjUWUile41edPHbMXjaxqk= Received: by 10.91.144.16 with SMTP id w16mr1802322agn.21.1258534356431; Wed, 18 Nov 2009 00:52:36 -0800 (PST) Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85]) by mx.google.com with ESMTPS id 7sm382759yxg.68.2009.11.18.00.52.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Nov 2009 00:52:36 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo.i-did-not-set--mail-host-address--so-tickle-me) id 72c1 by fortitudo (DragonFly Mail Agent) Wed, 18 Nov 2009 00:52:34 -0800 From: Alexander Botero-Lowry To: Keith Packard , notmuch@notmuchmail.org In-Reply-To: <1258532999-9316-1-git-send-email-keithp@keithp.com> References: <1258532999-9316-1-git-send-email-keithp@keithp.com> Date: Wed, 18 Nov 2009 00:52:34 -0800 Message-ID: <867hto2p0t.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 08:52:40 -0000 On Wed, 18 Nov 2009 00:29:59 -0800, Keith Packard wrote: > I created the notmuch-show-hook precisely so I could add these two > options, but I suspect most people will want them, so I just made them > the default. If you don't want them, you can use remove-hook to get > rid of this. > Yes, hooks should be added for search as well. :) > +; Make show mode a bit prettier, highlighting URLs and using word wrap > + > +(defun notmuch-show-pretty-hook () > + (goto-address-mode 1) > + (visual-line-mode)) > + visual-line-mode turns out to make subject look pretty ugly if there is a continuation. It doesn't do much good for the citation headers either. We probably need to do our own intelligent wrapping rather then use visual-line-mode to make this actually look right. goto-address-mode is important though. :) alex From cworth@cworth.org Wed Nov 18 01:42:17 2009 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 59BC3431FBF; Wed, 18 Nov 2009 01:42:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 j-W1SQlJ7v4j; Wed, 18 Nov 2009 01:42:16 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6C6B8431FAE; Wed, 18 Nov 2009 01:42:16 -0800 (PST) From: Carl Worth To: Keith Packard , Mikhail Gusarov , notmuch@notmuchmail.org In-Reply-To: References: <1258471718-6781-1-git-send-email-dottedmag@dottedmag.net> <87lji5cbwo.fsf@yoom.home.cworth.org> Date: Wed, 18 Nov 2009 01:42:02 -0800 Message-ID: <87pr7gqidx.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH 1/2] Close message file after parsing message headers X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 09:42:17 -0000 On Tue, 17 Nov 2009 13:15:25 -0800, Keith Packard wrote: > Threading the message also involves displaying the from and to contents, > which requires opening the message file. The alternative to the fix I > provided is to just parse all of the message headers when first opening > the message; it could then be immediately closed and the hash referred > to for all header data. Given the choice, just having the caller say > when it has finished with a message is probably a reasonable option... Hi Keith, Once I finally got back on the ground again, I pushed out a revised version of your patch, (didn't need the reply-to stuff anymore since I had fixed that differently in the meantime). I'm pretty happy with the state of this portion of the code now. Thanks Keith and Mikhail for your input on and code to fix this bug. -Carl From cworth@cworth.org Wed Nov 18 02:08:24 2009 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 D7335431FBF; Wed, 18 Nov 2009 02:08:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 7n8Z4n49br0P; Wed, 18 Nov 2009 02:08:24 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8B556431FAE; Wed, 18 Nov 2009 02:08:23 -0800 (PST) From: Carl Worth To: Lars Kellogg-Stedman , notmuch@notmuchmail.org In-Reply-To: <20091117190054.GU3165@dottiness.seas.harvard.edu> References: <20091117190054.GU3165@dottiness.seas.harvard.edu> Date: Wed, 18 Nov 2009 02:08:10 -0800 Message-ID: <87ocn0qh6d.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Working with Maildir storage? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 10:08:25 -0000 On Tue, 17 Nov 2009 14:00:54 -0500, Lars Kellogg-Stedman wrote: > I saw the LWN article and decided to take a look at notmuch. I'm > currently using mutt and mairix to index and read a collection of > Maildir mail folders (around 40,000 messages total). Welcome, Lars! I hadn't even seen that Keith's blog post had been picked up by lwn.net. That's very interesting. So, thanks for coming and trying out notmuch. > Error opening > /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: > Too many open files Sadly, the lwn article coincided with me having just introduced this bug, and then getting on a Trans-Atlantic flight. So I fixed the bug fairly quickly, but there was quite a bit of latency before I could push the fix out. It should be fixed now. > I'm curious if this is expected behavior (i.e., notmuch does not work > with Maildir) or if something else is going on. Notmuch works just fine with maildir---it's one of the things that it likes the best. Happy hacking, -Carl From cworth@cworth.org Wed Nov 18 02:19:41 2009 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 0C28D431FC0; Wed, 18 Nov 2009 02:19:41 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 rHvOVeab1ieM; Wed, 18 Nov 2009 02:19:40 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id AD2A7431FAE; Wed, 18 Nov 2009 02:19:39 -0800 (PST) From: Carl Worth To: Keith Packard , notmuch@notmuchmail.org In-Reply-To: <1258493565-13508-1-git-send-email-keithp@keithp.com> References: <1258493565-13508-1-git-send-email-keithp@keithp.com> Date: Wed, 18 Nov 2009 02:19:26 -0800 Message-ID: <87k4xoqgnl.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 10:19:41 -0000 On Tue, 17 Nov 2009 13:32:45 -0800, Keith Packard wrote: > When closing a thread view, mark the thread as archived by removing > the "inbox" tag, and for the 'x' variant, the "unread" tag as well, > then kill the buffer and update the search window view as well. > > This makes 'x' much the same as 'a', but instead of taking you to the > next message, it takes you back to the search window instead. I don't like this---but that's because I use 'x' precisely *because* it preserves these tags. Otherwise, you might as well just remove inbox and unread as soon as the message is presented to the user. And that's a bug in a lot of other email programs that I'm unwilling to replicate. We may run into a need to define different ways that people like to work with their email here. (I know that so far I've just been coding up the way I want my mail to work.) -Carl From cworth@cworth.org Wed Nov 18 02:22:27 2009 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 78333431FC0; Wed, 18 Nov 2009 02:22:27 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 tKniijFRKHay; Wed, 18 Nov 2009 02:22:27 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 91669431FAE; Wed, 18 Nov 2009 02:22:26 -0800 (PST) From: Carl Worth To: Keith Packard , Aron Griffis , notmuch In-Reply-To: References: <20091117232137.GA7669@griffis1.net> Date: Wed, 18 Nov 2009 02:22:12 -0800 Message-ID: <87iqd8qgiz.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] archive X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 10:22:27 -0000 On Tue, 17 Nov 2009 18:04:31 -0800, Keith Packard wrote: > On Tue, 17 Nov 2009 18:21:38 -0500, Aron Griffis wrote: > > > Just subscribed, I'd like to catch up on the previous postings, > > but the archive link seems to be bogus? > > Yeah, the archive appears broken and will need to wait until Carl > arrives in Barcelona to get fixed. Fixed it in transit in Frankfurt---with only moments to spare on my battery and no outlets in sight. Thanks for the report, Aron. And welcome to notmuch! -Carl (who wants to reply to a lot more mail, but will have to wait until later for that) From cworth@cworth.org Wed Nov 18 02:44:05 2009 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 CC0F4431FBF; Wed, 18 Nov 2009 02:44:05 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 7cfQHxTxtpso; Wed, 18 Nov 2009 02:44:04 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 817A4431FAE; Wed, 18 Nov 2009 02:44:04 -0800 (PST) From: Carl Worth To: Jan Janak , notmuch@notmuchmail.org In-Reply-To: <1258496327-12086-1-git-send-email-jan@ryngle.com> References: <1258496327-12086-1-git-send-email-jan@ryngle.com> Date: Wed, 18 Nov 2009 02:43:50 -0800 Message-ID: <87hbssqfix.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Older versions of install do not support -C. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 10:44:06 -0000 On Tue, 17 Nov 2009 23:18:47 +0100, Jan Janak wrote: > Do not use -C cmdline option of install, older versions, commonly found in > distributions like Debian, do not seem to support it. Running make install > on such systems (tested on Debian Lenny) fails. > > Signed-off-by: Jan Janak Thanks, Jan. This is pushed now. And did I say welcome to notmuch yet? (It's easy to lose track with all the newcomers---which I'm not complaining about---especially since so many are sharing code.) -Carl PS. I actually really like the behavior of -C (especially when installing a low-level library to avoid big waterfalls of needless recompiles). But since we're *not* actually installing a library (yet) I'm happy with this patch rather than writing code in configure to check if "install -C" works or not. From cworth@cworth.org Wed Nov 18 02:50:07 2009 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 119B7431FBF; Wed, 18 Nov 2009 02:50:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 D97l+zjsIpSC; Wed, 18 Nov 2009 02:50:06 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 9F83C431FAE; Wed, 18 Nov 2009 02:50:05 -0800 (PST) From: Carl Worth To: Jan Janak , notmuch@notmuchmail.org In-Reply-To: References: Date: Wed, 18 Nov 2009 02:49:52 -0800 Message-ID: <87fx8cqf8v.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] What a great idea! X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 10:50:07 -0000 On Tue, 17 Nov 2009 23:35:30 +0100, Jan Janak wrote: > First of all, notmuch is a wonderful idea, both the cmdline tool and > the emacs interface! Thanks a lot for writing it, I was really excited > when I read the announcement today. Ah, here's where I planned a nice welcome. So welcome (again), Jan! :-) I've been having a lot of fun with notmuch already, (though there have been some days of pain before it was functional enough and my email-reply latency went way up). But regardless---I got through that, and I'm able to work more efficiently with notmuch now than I could with sup before. So I'm happy. And I'm delighted when other people find this interesting as well. > Have you considered sending an announcement to the org-mode mailing list? > http://orgmode.org Thanks for the idea. I think I may have looked into org-mode years ago, (when I was investigating planner-mode and various emacs "personal wiki" systems for keeping random notes and what-not). > Various ways of searching/referencing emails from emacs were discussed > there several times and none of them were as elegant as notmuch (not > even close). Maybe notmuch would attract some of the developers > there.. Yeah. I'll drop them a mail. Having a real emacs wizard on board would be nice. (I'm afraid the elisp I've written so far for this project is fairly grim.) -Carl From cworth@cworth.org Wed Nov 18 03:02:59 2009 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 1F9AE431FBF; Wed, 18 Nov 2009 03:02:59 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 X1HDQnaxp0hs; Wed, 18 Nov 2009 03:02:58 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 13CAB431FAE; Wed, 18 Nov 2009 03:02:57 -0800 (PST) From: Carl Worth To: Israel Herraiz , notmuch In-Reply-To: <1258498485-sup-142@elly> References: <1258498485-sup-142@elly> Date: Wed, 18 Nov 2009 03:02:43 -0800 Message-ID: <87bpj0qeng.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] New to the list X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 11:02:59 -0000 On Tue, 17 Nov 2009 23:57:18 +0100, Israel Herraiz wrote: > I have subscribed to the list. As suggested by the welcome message, I > am introducing myself. My name is Israel Herraiz, and I have done a > couple of contributions to Sup, the probably well-known here e-mail > client. Welcome, Israel! I'm glad people read that little bit of text in the welcome email and are introducing themselves. I like to think of our new notmuch community as a very personable place. > "Not much" sounds interesting, and I wonder whether it could be > integrated with the views of Sup (inbox, threads, etc). So I have > subscribed to the list to keep an eye on what's going on here. > > I have just heard of "Not much". I have not even tried to download the > code yet. Yes, take a look. If you're already an emacs user, then you'll find the interface of notmuch very comfortable, (looks a lot like sup, but lives inside of emacs). Even outside of emacs, the command line interface of notmuch gives view *fairly* similar to those of sup: notmuch search tag:inbox # Very much like sup's inbox notmuch show thread:some-thread-id # A lot like sup's thread -view The command-line output right now isn't nearly as neat as sup's, (it doesn't elide comments--it doesn't do the indenting of threads, etc.), even though the command-line interface has all the information it needs to do that. The reason for that is to let the emacs code own most of the formatting, (so that it can be more flexible--such as making hidden things visible, changing column widths, etc.). But one thing I wonder is if there would be situations where it would make sense to get the cleaner output directly out of the command-line tool. For example, for someone who isn't an emacs user, the command-line interface might be their only introduction to what the "notmuch experience" is like. So maybe "notmuch show" should give nice clean output by default and then the emacs code could call "notmuch show --format=emacs-friendly" or something to get the current output. That's an idea anyway. -Carl From cworth@cworth.org Wed Nov 18 03:15:46 2009 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 D754F431FBF; Wed, 18 Nov 2009 03:15:46 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ylkT+u1j2Xno; Wed, 18 Nov 2009 03:15:45 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 66155431FAE; Wed, 18 Nov 2009 03:15:45 -0800 (PST) From: Carl Worth To: Adrian Perez de Castro , notmuch@notmuchmail.org In-Reply-To: <20091118002059.067214ed@hikari> References: <20091118002059.067214ed@hikari> Date: Wed, 18 Nov 2009 03:15:31 -0800 Message-ID: <87aaykqe24.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Introducing myself X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 11:15:47 -0000 On Wed, 18 Nov 2009 00:20:59 +0100, Adrian Perez de Castro wrote: > I have just heard about Not Much today in some random Linux-related news > site (LWN?), my name is Adrian Perez and I work as systems administrator Welcome to notmuch, Adrian! We're glad to have you here. > by default on most distribution. I got to have some mailboxes indexed and > basic searching working a couple of months ago. Lately I have been very > busy and had no time for coding, and them... boom! Not Much appears -- and > it is almost exactly what I was trying to do, but faster. I have been > playing a bit with Not Much today, and I think it has potential. It's funny, because I had the exact same experience with sup a couple of months ago. I had been frustrated for years with email programs, and had been thinking about how I'd like things to work n the back of my mind for a long time, (but never *quite* getting to the point where I would commit to writing an email system myself). And then... boom! I found sup and was instantly hooked. It had so much of what I had imagined, (and much of what I hadn't yet imagined) that I was quite delighted. It was really quite by accident that I ended up inventing a different system. I had started out just trying to speedup index creation for sup. If I hadn't run into the problem that it was very difficult[*] to create a sup-compatible index from C code, I might have stopped there. So I'd written a bunch of functional code, only to find myself stuck at the very last step, (hooking it up to the existing sup interface). Then Keith suggested emacs and it all seemed pretty easy since I'd already done all the Xapian work. So it's funny, I was only willing to commit to this project because I wasn't consciously aware I was working on it. Otherwise it would have seemed to overwhelming to start. :-) Anyway, that's a lot of off-topic rambling off of your introduction. But I'm glad that notmuch can now give that same "boom!" to others, and I'm glad you see potential in it. > Also, I would like to share one idea I had in mind, that you might find > interesting: One thing I have found very annoying is having to re-tag my > mail when the indexes get b0rked (it happened a couple of times to me while > using Sup), so I was planning to mails as read/unread and adding the tags > not just to the index, but to the mail text itself, e.g. by adding a > "X-Tags" header field or by reusing the "Keywords" one. This way, the index > could be totally recreated by re-reading the mail directories, and this > would also allow to a tools like OfflineIMAP [1] to get the mails into a > local maildir, tagging and indexing the mails with the e-mail reader and > then syncing back the messages with the "X-Tags" header to the IMAP server. > This would allow to use the mail reader from a different computer and still > have everything tagged finely. It is an interesting idea. But there's also something really comforting about the email indexed never modifying the mail files. If you're reading the notmuch commit logs closely you'll see that I'm not actually careful enough to be trusted with your mail (but I try). So I like that I don't even have to trust myself---the worst that happens is that I have to recreate my index. And as Keith mentioned, we've got the "notmuch dump; notmuch restore" idea working exactly as it did in sup. (Though I am thinking of also adding thread IDs to that now---more on that later.) The big annoyance I had with sup index creation, (I ended up having to do it more than once too), was that it takes *forever*. Right now, notmuch is a little bit faster, but not a lot faster. And I've got some ideas to fix that. It would be really nice if index creation were pain free. (And maybe it is for some user with small amounts of mail---oh, to have only 40000 messages to have to index!). -Carl [*] The problem here is that sup puts serialized ruby data structures into the data field of its Xapian documents. So being compatible with sup means being able to recreate serialized data structures for a particular version of ruby. From cworth@cworth.org Wed Nov 18 03:22:46 2009 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 94E71431FBF; Wed, 18 Nov 2009 03:22:46 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 tyu8Yhj5nJ27; Wed, 18 Nov 2009 03:22:46 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id B550F431FAE; Wed, 18 Nov 2009 03:22:45 -0800 (PST) From: Carl Worth To: Ingmar Vanhassel , notmuch@notmuchmail.org In-Reply-To: <1258500222-32066-1-git-send-email-ingmar@exherbo.org> References: <1258500222-32066-1-git-send-email-ingmar@exherbo.org> Date: Wed, 18 Nov 2009 03:22:32 -0800 Message-ID: <878we4qdqf.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Typsos X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 11:22:46 -0000 On Wed, 18 Nov 2009 00:23:42 +0100, Ingmar Vanhassel wrote: > 17 files changed, 30 insertions(+), 30 deletions(-) Yikes. That's a lot of typos. Thanks Ingmar, for cleaning up after my sloppy keyboarding. Pushed. -Carl From cworth@cworth.org Wed Nov 18 03:31:38 2009 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 9A7CD431FBF; Wed, 18 Nov 2009 03:31:38 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 lIkozQzDmLNW; Wed, 18 Nov 2009 03:31:37 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 51CE8431FAE; Wed, 18 Nov 2009 03:31:37 -0800 (PST) From: Carl Worth To: Alex Botero-Lowry , notmuch@notmuchmail.org In-Reply-To: References: Date: Wed, 18 Nov 2009 03:31:23 -0800 Message-ID: <877htoqdbo.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 11:31:38 -0000 On Tue, 17 Nov 2009 16:23:53 -0800, Alex Botero-Lowry wrote: > In this case error out when no query is supplied. There seems to be an > infinite-loop casued by i think notmuch_query_search_threads having > an exception: > A Xapian exception occurred: Syntax: AND > A Xapian exception occurred: Syntax: AND > A Xapian exception occurred: Syntax: AND > > I'll look into that bug specifically a bit later. > > It might be better to do a usage instead of just throwing an error here? Definitely. Priit Laes reported the same thing in IRC and I've just committed a patch to give a nice error message: $ ./notmuch search Error: notmuch search requires at least one search term. Thanks for the report! -Carl From chris@chris-wilson.co.uk Wed Nov 18 03:36:40 2009 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 04C3E431FBC for ; Wed, 18 Nov 2009 03:36:40 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 EK1EJVf3FXp4 for ; Wed, 18 Nov 2009 03:36:39 -0800 (PST) Received: from orsmga101.jf.intel.com (mga06.intel.com [134.134.136.21]) by olra.theworths.org (Postfix) with ESMTP id 3EC64431FAE for ; Wed, 18 Nov 2009 03:36:39 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 18 Nov 2009 03:22:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,764,1249282800"; d="scan'208";a="570709306" Received: from unknown (HELO localhost.localdomain) ([10.255.16.119]) by orsmga001.jf.intel.com with ESMTP; 18 Nov 2009 03:36:28 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 11:34:54 +0000 Message-Id: <1258544095-16616-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 11:36:40 -0000 Currently the same `pkg-config ...` is executed for every target, so just store the results in a variable. --- Makefile | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 96aaa73..023b2ec 100644 --- a/Makefile +++ b/Makefile @@ -4,15 +4,16 @@ CFLAGS=-O2 # Additional flags that we will append to whatever the user set. # These aren't intended for the user to manipulate. -extra_cflags = `pkg-config --cflags glib-2.0 gmime-2.4 talloc` -extra_cxxflags = `xapian-config --cxxflags` +extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc) +extra_cxxflags := $(shell xapian-config --cxxflags) # Now smash together user's values with our extra values override CFLAGS += $(WARN_FLAGS) $(extra_cflags) override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags) -override LDFLAGS += `pkg-config --libs glib-2.0 gmime-2.4 talloc` \ - `xapian-config --libs` +override LDFLAGS += \ + $(shell pkg-config --libs glib-2.0 gmime-2.4 talloc) \ + $(shell xapian-config --libs) # Include our local Makefile.local first so that its first target is default include Makefile.local -- 1.6.5.2 From chris@chris-wilson.co.uk Wed Nov 18 03:36:43 2009 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 8DCC7431FC2 for ; Wed, 18 Nov 2009 03:36:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 8pJlIDckt9RA for ; Wed, 18 Nov 2009 03:36:42 -0800 (PST) Received: from orsmga101.jf.intel.com (mga06.intel.com [134.134.136.21]) by olra.theworths.org (Postfix) with ESMTP id BA043431FBC for ; Wed, 18 Nov 2009 03:36:40 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 18 Nov 2009 03:22:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,764,1249282800"; d="scan'208";a="570709311" Received: from unknown (HELO localhost.localdomain) ([10.255.16.119]) by orsmga001.jf.intel.com with ESMTP; 18 Nov 2009 03:36:30 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 11:34:55 +0000 Message-Id: <1258544095-16616-2-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1258544095-16616-1-git-send-email-chris@chris-wilson.co.uk> References: <1258544095-16616-1-git-send-email-chris@chris-wilson.co.uk> Subject: [notmuch] [PATCH 2/2] reply: Pointer mismatch. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 11:36:43 -0000 Apparently typeof (size_t) != unsigned int on my x86-64. --- notmuch-reply.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index 4a4a782..344b6e3 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -78,7 +78,7 @@ address_is_users (const char *address, notmuch_config_t *config) { const char *primary; char **other; - unsigned int i, other_len; + size_t i, other_len; primary = notmuch_config_get_user_primary_email (config); if (strcmp (primary, address) == 0) -- 1.6.5.2 From jan@ryngle.com Wed Nov 18 06:36:53 2009 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 94657431FBC for ; Wed, 18 Nov 2009 06:36:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 XsRRfXFzUd6y for ; Wed, 18 Nov 2009 06:36:53 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id D8FDA431FAE for ; Wed, 18 Nov 2009 06:36:52 -0800 (PST) Received: by bwz24 with SMTP id 24so127170bwz.30 for ; Wed, 18 Nov 2009 06:36:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.34.201 with SMTP id m9mr6601936bkd.77.1258555011799; Wed, 18 Nov 2009 06:36:51 -0800 (PST) Date: Wed, 18 Nov 2009 15:36:51 +0100 Message-ID: From: Jan Janak To: notmuch@notmuchmail.org Content-Type: text/plain; charset=UTF-8 Subject: [notmuch] Why is no. of files from count_files reset to 0? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 14:36:53 -0000 Hello, The function count_file returns the total number of files to be processed, the result is then stored in add_files_state.total_files. But that variable is reset back to 0 in notmuch_new_command. When I comment out the following line (before add_files is called): add_files_state.total_files = 0; The progress indicator shows the total number of files to be processed, as well as the time remaining. This is, IMHO, much better, especially if you process a large collection of emails. Is there any reason for having the variable reset to 0 before calling add_files? Thanks! -- Jan From aneesh.kumar@linux.vnet.ibm.com Wed Nov 18 07:05:37 2009 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 786E0431FBC for ; Wed, 18 Nov 2009 07:05:37 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 iiAWNFdOWcrU for ; Wed, 18 Nov 2009 07:05:36 -0800 (PST) Received: from e23smtp02.au.ibm.com (e23smtp02.au.ibm.com [202.81.31.144]) by olra.theworths.org (Postfix) with ESMTP id 6B77D431FAE for ; Wed, 18 Nov 2009 07:05:36 -0800 (PST) Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp02.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAIF2w6I009588 for ; Thu, 19 Nov 2009 02:02:58 +1100 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAIF2BVc1667100 for ; Thu, 19 Nov 2009 02:02:11 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAIF5XFb019025 for ; Thu, 19 Nov 2009 02:05:33 +1100 Received: from skywalker.linux.vnet.ibm.com ([9.77.125.7]) by d23av03.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAIF5VFJ018941 for ; Thu, 19 Nov 2009 02:05:32 +1100 From: aneesh.kumar@linux.vnet.ibm.com (Aneesh Kumar K.V) To: notmuch Date: Wed, 18 Nov 2009 20:35:26 +0530 Message-ID: <87pr7f6fgp.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [notmuch] How to list archived mails X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 15:05:37 -0000 Hi, Once i mark the mail as archived how do i search for them ? Right now with notmuch.el i am adding a tag "archive" when i am archiving the mail. I am just wondering is this the right way ? -aneesh From aneesh.kumar@linux.vnet.ibm.com Wed Nov 18 07:15:04 2009 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 7DD8E431FBC for ; Wed, 18 Nov 2009 07:15:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 bvGyeqzC8e89 for ; Wed, 18 Nov 2009 07:15:03 -0800 (PST) Received: from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148]) by olra.theworths.org (Postfix) with ESMTP id 23E0A431FAE for ; Wed, 18 Nov 2009 07:15:02 -0800 (PST) Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246]) by e23smtp06.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAIFExRC018885 for ; Thu, 19 Nov 2009 02:14:59 +1100 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAIFBhIi1585350 for ; Thu, 19 Nov 2009 02:11:43 +1100 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAIFF0Bf028507 for ; Thu, 19 Nov 2009 02:15:01 +1100 Received: from skywalker.linux.vnet.ibm.com ([9.77.125.7]) by d23av01.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAIFEwlt028394 for ; Thu, 19 Nov 2009 02:15:00 +1100 From: aneesh.kumar@linux.vnet.ibm.com (Aneesh Kumar K.V) To: notmuch Date: Wed, 18 Nov 2009 20:44:58 +0530 Message-ID: <87my2jrhjh.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [notmuch] [PATCH] notmuch: Add hooks for show-mode and search-mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 15:15:04 -0000 >From e3a801c90ed5e037b68bd16807606388e6dbe6e8 Mon Sep 17 00:00:00 2001 From: Aneesh Kumar K.V Date: Wed, 18 Nov 2009 20:43:13 +0530 Subject: [PATCH] notmuch: Add hooks for show-mode and search-mode This enables to do things like (add-hook 'notmuch-search-mode-hook (lambda() (hl-line-mode 1) )) Signed-off-by: Aneesh Kumar K.V --- notmuch.el | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/notmuch.el b/notmuch.el index 014d15b..87116f9 100644 --- a/notmuch.el +++ b/notmuch.el @@ -57,6 +57,12 @@ "Keymap for \"notmuch show\" buffers.") (fset 'notmuch-show-mode-map notmuch-show-mode-map) +(defvar notmuch-show-mode-hook nil + "Hooks run when notmuch-show-mode is enabled") + +(defvar notmuch-search-mode-hook nil + "Hooks run when notmuch-search-mode is enabled") + (defvar notmuch-show-signature-regexp "\\(-- ?\\|_+\\)$" "Pattern to match a line that separates content from signature. @@ -636,7 +642,8 @@ view, (remove the \"inbox\" tag from each), with (use-local-map notmuch-show-mode-map) (setq major-mode 'notmuch-show-mode mode-name "notmuch-show") - (setq buffer-read-only t)) + (setq buffer-read-only t) + (run-hooks 'notmuch-show-mode-hook)) (defun notmuch-show (thread-id &optional parent-buffer) "Run \"notmuch show\" with the given thread ID and display results. @@ -759,7 +766,8 @@ global search. (use-local-map notmuch-search-mode-map) (setq major-mode 'notmuch-search-mode mode-name "notmuch-search") - (setq buffer-read-only t)) + (setq buffer-read-only t) + (run-hooks 'notmuch-search-mode-hook)) (defun notmuch-search-find-thread-id () (save-excursion -- 1.6.5.2.74.g610f9 From aneesh.kumar@linux.vnet.ibm.com Wed Nov 18 07:17:19 2009 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 7591A431FBC for ; Wed, 18 Nov 2009 07:17:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 3arCpMP4J6k9 for ; Wed, 18 Nov 2009 07:17:18 -0800 (PST) Received: from e28smtp05.in.ibm.com (e28smtp05.in.ibm.com [122.248.162.5]) by olra.theworths.org (Postfix) with ESMTP id 3E5FF431FAE for ; Wed, 18 Nov 2009 07:17:17 -0800 (PST) Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp05.in.ibm.com (8.14.3/8.13.1) with ESMTP id nAIFHG7s003833 for ; Wed, 18 Nov 2009 20:47:16 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAIFHGSI2715758 for ; Wed, 18 Nov 2009 20:47:16 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAIFHGSn005478 for ; Thu, 19 Nov 2009 02:17:16 +1100 Received: from skywalker.linux.vnet.ibm.com ([9.77.125.7]) by d28av05.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAIFHF0e005470 for ; Thu, 19 Nov 2009 02:17:15 +1100 From: aneesh.kumar@linux.vnet.ibm.com (Aneesh Kumar K.V) To: notmuch Date: Wed, 18 Nov 2009 20:47:14 +0530 Message-ID: <87k4xnrhfp.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [notmuch] [PATCH] notmuch: Add tag archive when archiving the mails X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 15:17:19 -0000 >From a2325b950016f39290a0c6f0d6aa3417584eb4e8 Mon Sep 17 00:00:00 2001 From: Aneesh Kumar K.V Date: Wed, 18 Nov 2009 20:45:45 +0530 Subject: [PATCH] notmuch: Add tag archive when archiving the mails This enables us to search for archived mails later Signed-off-by: Aneesh Kumar K.V --- notmuch.el | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/notmuch.el b/notmuch.el index 87116f9..ec2155a 100644 --- a/notmuch.el +++ b/notmuch.el @@ -196,6 +196,7 @@ Unlike builtin `next-line' this version accepts no arguments." (if markread (notmuch-show-remove-tag "unread" "inbox") (notmuch-show-remove-tag "inbox")) + (notmuch-show-add-tag "archive") (if (not (eobp)) (forward-char)) (if (not (re-search-forward notmuch-show-message-begin-regexp nil t)) -- 1.6.5.2.74.g610f9 From aneesh.kumar@linux.vnet.ibm.com Wed Nov 18 07:55:35 2009 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 4F8FF431FBC for ; Wed, 18 Nov 2009 07:55:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 N50h8iyRuDGV for ; Wed, 18 Nov 2009 07:55:34 -0800 (PST) Received: from e23smtp04.au.ibm.com (e23smtp04.au.ibm.com [202.81.31.146]) by olra.theworths.org (Postfix) with ESMTP id EEE52431FAE for ; Wed, 18 Nov 2009 07:55:33 -0800 (PST) Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246]) by e23smtp04.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAIFqMx7015553 for ; Thu, 19 Nov 2009 02:52:22 +1100 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAIFqDHn1667326 for ; Thu, 19 Nov 2009 02:52:13 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAIFtVNl024406 for ; Thu, 19 Nov 2009 02:55:31 +1100 Received: from skywalker.linux.vnet.ibm.com ([9.77.125.7]) by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAIFtT4s024387 for ; Thu, 19 Nov 2009 02:55:30 +1100 From: aneesh.kumar@linux.vnet.ibm.com (Aneesh Kumar K.V) To: notmuch Date: Wed, 18 Nov 2009 21:25:28 +0530 Message-ID: <87fx8bygi7.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [notmuch] [PATCH] notmuch: Add Maildir directory name as tag name for messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 15:55:35 -0000 >From 24711481dfe770417aa0a13308a9bb842dfb03f4 Mon Sep 17 00:00:00 2001 From: Aneesh Kumar K.V Date: Wed, 18 Nov 2009 21:20:12 +0530 Subject: [PATCH] notmuch: Add Maildir directory name as tag name for messages This patch adds maildir directory name as the tag name for messages. This helps in adding tags using filtering already provided by procmail. Signed-off-by: Aneesh Kumar K.V --- notmuch-new.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 5405a9f..50d0a5a 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -96,6 +96,7 @@ add_files_print_progress (add_files_state_t *state) static notmuch_status_t add_files_recursive (notmuch_database_t *notmuch, const char *path, + const char *tag, struct stat *st, add_files_state_t *state) { @@ -186,6 +187,7 @@ add_files_recursive (notmuch_database_t *notmuch, case NOTMUCH_STATUS_SUCCESS: state->added_messages++; tag_inbox_and_unread (message); + notmuch_message_add_tag (message, tag); break; /* Non-fatal issues (go on to next file) */ case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: @@ -223,7 +225,13 @@ add_files_recursive (notmuch_database_t *notmuch, } } } else if (S_ISDIR (st->st_mode)) { - status = add_files_recursive (notmuch, next, st, state); + if ((strcmp (entry->d_name, "cur") == 0) || + (strcmp (entry->d_name, "new") == 0) || + (strcmp (entry->d_name, "tmp") == 0)) { + status = add_files_recursive (notmuch, next, tag, st, state); + } else { + status = add_files_recursive (notmuch, next, entry->d_name, st, state); + } if (status && ret == NOTMUCH_STATUS_SUCCESS) ret = status; } @@ -285,7 +293,7 @@ add_files (notmuch_database_t *notmuch, timerval.it_value.tv_usec = 0; setitimer (ITIMER_REAL, &timerval, NULL); - status = add_files_recursive (notmuch, path, &st, state); + status = add_files_recursive (notmuch, path, basename(path), &st, state); /* Now stop the timer. */ timerval.it_interval.tv_sec = 0; -- 1.6.5.2.74.g610f9 From cworth@cworth.org Wed Nov 18 08:29:37 2009 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 086BC431FC2; Wed, 18 Nov 2009 08:29:37 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 DsOqqwEWzYp2; Wed, 18 Nov 2009 08:29:36 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A961F431FBF; Wed, 18 Nov 2009 08:29:35 -0800 (PST) From: Carl Worth To: Lars Kellogg-Stedman , notmuch In-Reply-To: <20091118010116.GC25380@dottiness.seas.harvard.edu> References: <20091118005829.GB25380@dottiness.seas.harvard.edu> <20091118010116.GC25380@dottiness.seas.harvard.edu> Date: Wed, 18 Nov 2009 08:29:20 -0800 Message-ID: <874ooraja7.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] "notmuch help" outputs to stderr? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 16:29:37 -0000 On Tue, 17 Nov 2009 20:01:16 -0500, Lars Kellogg-Stedman wrote: > > I've attached a patch that lets usage() take a FILE * argument so that > > you can output to stderr in response to usage errors, and stdout in > > response to an explicit request. > > Whoops, missed a couple of stderr's in that last patch. New one > attached. > > -- > Lars Kellogg-Stedman > Senior Technologist, Computing and Information Technology > Harvard University School of Engineering and Applied Sciences Thanks Lars! That was obviously a bug, so I really appreciate both your report and your fix. BTW, for future patches, it would be easier for me, (and hopefully not too much harder for you), if you could format your mails so that "git am" will find a good commit message in them. There are a few different ways you can do that: Option (1) takes more work upfront to get comfortable with it and to make sure it works, but it's probably less work (particuarly 1.b with "git send-email) once you get into the flow of it. Option (2) is probably the least different from what you're currently doing. 1. Make a commit locally with the commit message. Then run "git format-patch", (with "git format-patch HEAD~N" where N is the number of commits you want to generate), to generate formatted email messages, (or even an entire mbox). a. Suck those messages up into an email program. Add any commentary (to not be part of the commit message) after the --- separator and send. b. Use "git send-email" to fire the messages off. 2. Just attach the "git diff" output like you did, but then carefully word the subject and body of the email message to look like a commit message. You can again use a --- separator for commentary that's not part of the patch. For example, option (2) would have looked like the below to generate the commit message I ended up using for your commit. Anyway, thanks again, -Carl Subject: [Patch] notmuch help: Print to stdout, not to stderr. Let usage() take a FILE * argument so that you can output to stderr in response to usage errors, and stdout in response to an explicit request. --- Whoops, missed a couple of stderr's in that last patch. New one attached. -- Lars Kellogg-Stedman Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences From cworth@cworth.org Wed Nov 18 08:29:43 2009 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 D3612431FC2; Wed, 18 Nov 2009 08:29:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 l0M9j6ZpENyt; Wed, 18 Nov 2009 08:29:43 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id EAD2D431FAE; Wed, 18 Nov 2009 08:29:42 -0800 (PST) From: Carl Worth To: Stewart Smith , notmuch@notmuchmail.org In-Reply-To: <1258506353-20352-1-git-send-email-stewart@flamingspork.com> References: <1258506353-20352-1-git-send-email-stewart@flamingspork.com> Date: Wed, 18 Nov 2009 08:29:28 -0800 Message-ID: <873a4baj9z.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Fix linking with gcc to use g++ to link in C++ libs. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 16:29:44 -0000 On Wed, 18 Nov 2009 12:05:53 +1100, Stewart Smith wrote: > Previously, Ubuntu 9.10, gcc 4.4.1 was getting: Thanks, Stewart! It's always nice to get portability fixes. This should have beeen pushed by the time I will have been able to send this email. :-) -Carl From cworth@cworth.org Wed Nov 18 08:29:49 2009 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 F2D2F431FCB; Wed, 18 Nov 2009 08:29:48 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 HTI6i3TkYLZB; Wed, 18 Nov 2009 08:29:48 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 21BD7431FAE; Wed, 18 Nov 2009 08:29:47 -0800 (PST) From: Carl Worth To: Rolland Santimano , notmuch@notmuchmail.org In-Reply-To: <736613.51770.qm@web113505.mail.gq1.yahoo.com> References: <736613.51770.qm@web113505.mail.gq1.yahoo.com> Date: Wed, 18 Nov 2009 08:29:33 -0800 Message-ID: <871vjvaj9u.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Link to mailing list archives ? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 16:29:49 -0000 On Tue, 17 Nov 2009 21:12:23 -0800 (PST), Rolland Santimano wrote: > The link[1] provided on the list page[2] is broken: Hi Rolland, Welcome to the notmuch community. Thanks for the report. This should be fixed now. Do let me know if you run into any further problems. -Carl From cworth@cworth.org Wed Nov 18 08:30:09 2009 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 C8723431FBF; Wed, 18 Nov 2009 08:30:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 6KfrsRF4F0Sb; Wed, 18 Nov 2009 08:30:09 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C4B8F431FAE; Wed, 18 Nov 2009 08:30:08 -0800 (PST) From: Carl Worth To: Alexander Botero-Lowry , notmuch@notmuchmail.org In-Reply-To: <86aayk2rbj.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> References: <86aayk2rbj.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> Date: Wed, 18 Nov 2009 08:29:41 -0800 Message-ID: <87zl6j94p6.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] request for pull X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 16:30:10 -0000 On Wed, 18 Nov 2009 00:02:56 -0800, Alexander Botero-Lowry wrote: > The following changes since commit e8c9c3e6a534fc6c2919c2c1de63cea7250eb488: > > are available in the git repository at: > > git://alexbl.net/notmuch.git master > > Alexander Botero-Lowry (2): > Error out if no query is supplied to search instead of going into an infinite loop > set a local truncate-line variable in notmuch-search-mode, so that subjects don't wrap and make the output look weird Hmm... I used to think pull requests were the best, (and it's true that they still do things better than mail---"git am" and even "git am -3" seem to put git into useless states in some merge-conflict cases). But now that I'm working through this list of patches while I'm on a plane I'm wishing the patches were actually here with me. :-) Well, that's what I have a "todo" tag for. So I'll look at this later when I've got internet access again. (But I believe the first commit is already addressed independently.) BTW, thanks for the patches! -Carl From aperez@igalia.com Wed Nov 18 08:47:28 2009 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 C2E19431FBC for ; Wed, 18 Nov 2009 08:47:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 GoflEpQLBiFf for ; Wed, 18 Nov 2009 08:47:28 -0800 (PST) Received: from smtp2.mundo-r.com (smtp3.mundo-r.com [212.51.32.191]) by olra.theworths.org (Postfix) with ESMTP id AB98B431FAE for ; Wed, 18 Nov 2009 08:47:27 -0800 (PST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYEAIRzdkpbdWOb/2dsb2JhbACBUsAwCI10CYI8CIFLBQ X-IronPort-AV: E=Sophos;i="4.44,766,1249250400"; d="asc'?scan'208";a="158833161" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp2.mundo-r.com with ESMTP; 18 Nov 2009 17:47:26 +0100 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim) id 1NAngk-0005aJ-7r for ; Wed, 18 Nov 2009 17:47:26 +0100 Received: from ip129.dynamic.igalia.com ([192.168.10.129] helo=hikari.localdomain) by mail.igalia.com with esmtp (Exim) id 1NAngj-0001w6-00 for ; Wed, 18 Nov 2009 17:47:25 +0100 Received: from hikari (localhost [127.0.0.1]) by hikari.localdomain (Postfix) with ESMTP id D05E331CAD21 for ; Wed, 18 Nov 2009 17:47:25 +0100 (CET) Date: Wed, 18 Nov 2009 17:47:25 +0100 From: Adrian Perez de Castro To: notmuch@notmuchmail.org Message-ID: <20091118174725.7d023544@hikari> In-Reply-To: References: <20091118002059.067214ed@hikari> Organization: Igalia X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.3; x86_64-redhat-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAADBQTFRFBwcHFhYWKCgoNzc3SEhIV1dXaGhod3d3iIiIlpaWqKiouLi4x8fH2NjY5+fn/v7+rSjDkgAAAjVJREFUOE9l07tvE0EQwOHfrkV9O+eko7g701BBfECJsIigT2IpooIqaSiRUEB0REj00FBQgYSCkhry+gecUPJybJeIxLumTbilsH2PMNXufDOa3ZVW+1JkpbUmD/8+vXR3c7or4Gz93mH309Kz8/C9/RQge7VfhW/LW+PF8IkrQ7Z6OKmQr1tl+LU/yWP9mxJka9O88fZHPwf/7u0kLyCnX3I4fQhgjAgIfi+HHw5A1Y2ggIMcFKAEnRoL0M3BosI4TI2IATjuT8DvSNJoNNJgkIhxlr9TUHeSpDnfohlIrMBlU+BGmsZqfr69FMfGMw4NoG835+J62riWyjQ/uXlTQjNUIoYegMsBM0pCD8oDas7n4HQsBghXFxJTW42KDs+4XLfjsN0wOYgABqARjMKIHIaAQnmHjsI5Cvi9Cf6k03OoWBkpIP3Q7354+dEimFBKHbMP9oKjwfd9gbrxR5KDToczK4uPF8UgNomKU2GaENRi77zyDKICxKBS4xXYbONPMQMdYZTBwMiMWiUg9g6UJ3OBogzjV8E7sBVwyvfAOYdQhsABzuOxI1MGZbs98Q6Md5UOfbbR2R0eWOesrnRw5ajT6f60LrNhWIHZpBnUWv2s14ukArWWTqTes3YQxRXgFkcMu70TPYqqUBs0YwmO967OVIdTG4bY4a7WLaqgLm5vbHdH5np0Dri//fmg7y8scB4u3+zsuNlH0X+g19bby69b+TYH6isvns8VdQWgxj9tHP8AR5/hSdYqkwsAAAAASUVORK5CYII= Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/GRjMqWnaYuAAn71Dfh5/d=C"; protocol="application/pgp-signature" Subject: Re: [notmuch] Introducing myself X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 16:47:28 -0000 --Sig_/GRjMqWnaYuAAn71Dfh5/d=C Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 17 Nov 2009 18:03:17 -0800, Keith wrote: > On Wed, 18 Nov 2009 00:20:59 +0100, Adrian Perez de Castro wrote: > > > Also, I would like to share one idea I had in mind, that you might find > > interesting: One thing I have found very annoying is having to re-tag my > > mail when the indexes get b0rked (it happened a couple of times to me w= hile > > using Sup), so I was planning to mails as read/unread and adding the ta= gs > > not just to the index, but to the mail text itself, e.g. by adding a > > "X-Tags" header field or by reusing the "Keywords" one. >=20 > Easier than that, notmuch (and sup too), provide a 'dump' command which > just lists all of the message IDs and their associated tags. Makes > saving tags easy and doesn't involve rewriting messages. I do this once > a day just before my computer is backed up to an external drive. >=20 > If the index is destroyed, you can reindex the messages and then reapply > all of the tags with 'notmuch restore'. I already knew about "dump" and "restore", just wanted to share my (wild) thought. I have been thinking a bit more, and if I understand correctly the philosophy of Not Much is that it will only read my mail and that it will never write to my mailboxes. So my idea makes no sense. The nice thing is that I could make a script to read the index (or the output of "notmuch dump") to add the "X-Tags" headers and mark mail :P Taking into account this and the "do one thing well" motto: there is no point in adding that to Not Much :) Regards, --=20 Adrian Perez de Castro Igalia - Free Software Engineering --Sig_/GRjMqWnaYuAAn71Dfh5/d=C Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (GNU/Linux) iEYEARECAAYFAksEJR0ACgkQkcVZ2+TJEjupQACaAjOI0kOZ/K9gPiZcg/7rCdES J4cAnRiseq2eCnXw+81Sfs0jKXz7WtFD =N3jk -----END PGP SIGNATURE----- --Sig_/GRjMqWnaYuAAn71Dfh5/d=C-- From aperez@igalia.com Wed Nov 18 08:47:36 2009 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 E2BEF431FC2 for ; Wed, 18 Nov 2009 08:47:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 eyyRR6KkCiRY for ; Wed, 18 Nov 2009 08:47:36 -0800 (PST) Received: from smtp2.mundo-r.com (smtp3.mundo-r.com [212.51.32.191]) by olra.theworths.org (Postfix) with ESMTP id 631BE431FBC for ; Wed, 18 Nov 2009 08:47:35 -0800 (PST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYEAIRzdkpbdWOb/2dsb2JhbACBUs4sCYQPBQ X-IronPort-AV: E=Sophos;i="4.44,766,1249250400"; d="asc'?scan'208";a="158833199" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp2.mundo-r.com with ESMTP; 18 Nov 2009 17:47:33 +0100 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim) id 1NAngr-0005ag-Po for ; Wed, 18 Nov 2009 17:47:33 +0100 Received: from ip129.dynamic.igalia.com ([192.168.10.129] helo=hikari.localdomain) by mail.igalia.com with esmtp (Exim) id 1NAngr-0001wH-00 for ; Wed, 18 Nov 2009 17:47:33 +0100 Received: from hikari (localhost [127.0.0.1]) by hikari.localdomain (Postfix) with ESMTP id 6719E31CAD21 for ; Wed, 18 Nov 2009 17:47:33 +0100 (CET) Date: Wed, 18 Nov 2009 17:47:32 +0100 From: Adrian Perez de Castro To: notmuch@notmuchmail.org Message-ID: <20091118174732.371ae432@hikari> In-Reply-To: <87aaykqe24.fsf@yoom.home.cworth.org> References: <20091118002059.067214ed@hikari> <87aaykqe24.fsf@yoom.home.cworth.org> Organization: Igalia X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.3; x86_64-redhat-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAADBQTFRFBwcHFhYWKCgoNzc3SEhIV1dXaGhod3d3iIiIlpaWqKiouLi4x8fH2NjY5+fn/v7+rSjDkgAAAjVJREFUOE9l07tvE0EQwOHfrkV9O+eko7g701BBfECJsIigT2IpooIqaSiRUEB0REj00FBQgYSCkhry+gecUPJybJeIxLumTbilsH2PMNXufDOa3ZVW+1JkpbUmD/8+vXR3c7or4Gz93mH309Kz8/C9/RQge7VfhW/LW+PF8IkrQ7Z6OKmQr1tl+LU/yWP9mxJka9O88fZHPwf/7u0kLyCnX3I4fQhgjAgIfi+HHw5A1Y2ggIMcFKAEnRoL0M3BosI4TI2IATjuT8DvSNJoNNJgkIhxlr9TUHeSpDnfohlIrMBlU+BGmsZqfr69FMfGMw4NoG835+J62riWyjQ/uXlTQjNUIoYegMsBM0pCD8oDas7n4HQsBghXFxJTW42KDs+4XLfjsN0wOYgABqARjMKIHIaAQnmHjsI5Cvi9Cf6k03OoWBkpIP3Q7354+dEimFBKHbMP9oKjwfd9gbrxR5KDToczK4uPF8UgNomKU2GaENRi77zyDKICxKBS4xXYbONPMQMdYZTBwMiMWiUg9g6UJ3OBogzjV8E7sBVwyvfAOYdQhsABzuOxI1MGZbs98Q6Md5UOfbbR2R0eWOesrnRw5ajT6f60LrNhWIHZpBnUWv2s14ukArWWTqTes3YQxRXgFkcMu70TPYqqUBs0YwmO967OVIdTG4bY4a7WLaqgLm5vbHdH5np0Dri//fmg7y8scB4u3+zsuNlH0X+g19bby69b+TYH6isvns8VdQWgxj9tHP8AR5/hSdYqkwsAAAAASUVORK5CYII= Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/T7w99KBq38_NHN42rs0naPD"; protocol="application/pgp-signature" Subject: Re: [notmuch] Introducing myself X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 16:47:37 -0000 --Sig_/T7w99KBq38_NHN42rs0naPD Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 18 Nov 2009 03:15:31 -0800, Carl wrote: > So I'd written a bunch of functional code, only to find myself stuck at > the very last step, (hooking it up to the existing sup interface). Then > Keith suggested emacs and it all seemed pretty easy since I'd already > done all the Xapian work. So it's funny, I was only willing to commit to > this project because I wasn't consciously aware I was working on it. > Otherwise it would have seemed to overwhelming to start. :-) I tried the "notmuch.el" Emacs mode, and have just installed Emacs in order to be able to try it out. As I have been using Vim for the last ~9 years, probably that was the reason why I found it not very comfortable. Even so, I am able of searching, sending and tagging mail quite happily. Apart from it being a bit Spartan, the only issue I have found so far is that I keep pushing the Escape key a lot -- which is my fault as that is a compulsive behaviour derived of using a Vi-like editor :D (Side note: I would not like to start an editor-religion debate, I just want you to know that most probably it is my fault when I say that I am not very comfortable with the Emacs mode) I showed the thing to my work mates this morning and most of them said that they would like to have Mutt-like keybindings *with* Not Much's search and tagging running behind it. I also think it would be great to have a curses-based UI, so this may be a good opportunity to start doing some serious coding with it in my spare time. =20 > > Also, I would like to share one idea [...] adding a "X-Tags" header > > field or by reusing the "Keywords" one. This way, the index could > > be totally recreated by re-reading the mail directories, and this > > would also allow to a tools like OfflineIMAP [1] to get the mails into a > > local maildir, tagging and indexing the mails with the e-mail reader and > > then syncing back the messages with the "X-Tags" header to the IMAP ser= ver. > > This would allow to use the mail reader from a different computer and s= till > > have everything tagged finely. >=20 > It is an interesting idea. But there's also something really comforting > about the email indexed never modifying the mail files. If you're > reading the notmuch commit logs closely you'll see that I'm not actually > careful enough to be trusted with your mail (but I try). So I like that > I don't even have to trust myself---the worst that happens is that I > have to recreate my index. I already made a comment about this in another reply, I could make the modifications e.g. from a script, so no need to add this in Not Much. Moreover, I agree that if one of the goals is to never modify mailboxes, then the current behaviour is just perfect. > And as Keith mentioned, we've got the "notmuch dump; notmuch restore" > idea working exactly as it did in sup. (Though I am thinking of also > adding thread IDs to that now---more on that later.) >=20 > The big annoyance I had with sup index creation, (I ended up having to > do it more than once too), was that it takes *forever*. Right now, > notmuch is a little bit faster, but not a lot faster. And I've got some > ideas to fix that. It would be really nice if index creation were pain > free. (And maybe it is for some user with small amounts of mail---oh, to > have only 40000 messages to have to index!). Wow, that is a lot of mail. Definitely people having as much mail as you (er... I mean "_not much_ mail as you") would benefit from faster indexing. > [*] The problem here is that sup puts serialized ruby data structures > into the data field of its Xapian documents. So being compatible with > sup means being able to recreate serialized data structures for a > particular version of ruby. Scary... --=20 Adrian Perez de Castro Igalia - Free Software Engineering --Sig_/T7w99KBq38_NHN42rs0naPD Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (GNU/Linux) iEYEARECAAYFAksEJSQACgkQkcVZ2+TJEjt33wCeNsaa/01Bbt03as7LhdLsfSJY TVQAn38tGcD1RjMl2xCZAU8p9rxhf3qx =zA5/ -----END PGP SIGNATURE----- --Sig_/T7w99KBq38_NHN42rs0naPD-- From keithp@keithp.com Wed Nov 18 09:34:57 2009 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 E1386431FBC for ; Wed, 18 Nov 2009 09:34:57 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 646zd5mDcETm for ; Wed, 18 Nov 2009 09:34:57 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 31ADC431FAE for ; Wed, 18 Nov 2009 09:34:57 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 4FB81B94048 for ; Wed, 18 Nov 2009 09:34:56 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id m7qKpHm0mT0O; Wed, 18 Nov 2009 09:34:53 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 35D30B9402F; Wed, 18 Nov 2009 09:34:53 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 31C5DB88003; Wed, 18 Nov 2009 09:34:53 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id C587B1581A5; Wed, 18 Nov 2009 09:34:52 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 09:34:51 -0800 Message-Id: <1258565691-17252-1-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] We use the message mail system for new mail, let emacs know. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 17:34:58 -0000 This makes things like the goto-address system bring up the right message composition window. Signed-off-by: Keith Packard --- notmuch.el | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/notmuch.el b/notmuch.el index c95cb43..4498200 100644 --- a/notmuch.el +++ b/notmuch.el @@ -1008,4 +1008,6 @@ current search results AND that are tagged with the given tag." (interactive) (notmuch-search "tag:inbox" t)) +(setq mail-user-agent 'message-user-agent) + (provide 'notmuch) -- 1.6.5.2 From keithp@keithp.com Wed Nov 18 09:45:07 2009 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 06674431FBF for ; Wed, 18 Nov 2009 09:45:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Lh0r83L3alJ3 for ; Wed, 18 Nov 2009 09:45:06 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 2A3DA431FAE for ; Wed, 18 Nov 2009 09:45:06 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 7ECC6B94046; Wed, 18 Nov 2009 09:45:05 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id IRWGnEXbVMKT; Wed, 18 Nov 2009 09:45:02 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 4C1A5B9402F; Wed, 18 Nov 2009 09:45:02 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 3EA9EB88003; Wed, 18 Nov 2009 09:45:02 -0800 (PST) From: Keith Packard To: Carl Worth , notmuch@notmuchmail.org In-Reply-To: <87k4xoqgnl.fsf@yoom.home.cworth.org> References: <1258493565-13508-1-git-send-email-keithp@keithp.com> <87k4xoqgnl.fsf@yoom.home.cworth.org> Date: Wed, 18 Nov 2009 09:45:01 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 17:45:07 -0000 --=-=-= On Wed, 18 Nov 2009 02:19:26 -0800, Carl Worth wrote: > I don't like this---but that's because I use 'x' precisely *because* it > preserves these tags. You can use kill-buffer directly (C-X k); adding a new special binding for that command seems unnecessary to me. > Otherwise, you might as well just remove inbox and unread as soon as the > message is presented to the user. And that's a bug in a lot of other > email programs that I'm unwilling to replicate. My mail flow doesn't involve moving directly from one message to the next; I go back to the index after reviewing each one; there isn't a way to mark a buffer as read/archived and *not* view another message -- keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLBDKdQp8BWwlsTdMRAiOOAJ9t4AssqTWThl9pHdQPapHK72onkQCgiSe6 tPRvo9MOlR1xNgicmzRd0Iw= =RWhs -----END PGP SIGNATURE----- --=-=-=-- From saptarshi.guha@gmail.com Wed Nov 18 09:47:52 2009 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 36F6E431FBC for ; Wed, 18 Nov 2009 09:47:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 oOCAz+mbxrA6 for ; Wed, 18 Nov 2009 09:47:50 -0800 (PST) Received: from qw-out-1920.google.com (qw-out-1920.google.com [74.125.92.144]) by olra.theworths.org (Postfix) with ESMTP id 779FF431FAE for ; Wed, 18 Nov 2009 09:47:50 -0800 (PST) Received: by qw-out-1920.google.com with SMTP id 5so286669qwc.32 for ; Wed, 18 Nov 2009 09:47:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=M5R4ArfWAmpdD2mxp1Rsi72bvnTMsudKeuYow+uqmvw=; b=mQXOesETb4BzObI/7YV4VSygNsKzyom8I7rvURm6ctExcLTjNWZZ9ri8DJstf1uHvM IKWU00FY0n1uU6ru8nqfaxbNCqyjJkKU/3apR76106FJ8UHSTVCoCw7MAhjW47pjNyLZ PzWQDGwMh8UflcbZgXRvMc0e90DyaQLFFPf6E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=FjdEMeAetWO15uz7vQ0UlK0EDinjUmHttrhW0YyDJX21/tjddr2PDHgT2ljAnHuqlR N91AJZ0uFm+7+78GMdnOZaaaCab6TO9+X0uNx7sEn+ylzibOEk6qnqs2BHY4ir9t9eca lvWnvGj/PEaCW4/4gAjBrgmZtm3+Orcmm2L7k= Received: by 10.224.81.138 with SMTP id x10mr6576321qak.299.1258566470040; Wed, 18 Nov 2009 09:47:50 -0800 (PST) Received: from dhcp-196-232.stat.purdue.edu (dhcp-196-232.stat.purdue.edu [128.210.196.232]) by mx.google.com with ESMTPS id 21sm203428qyk.12.2009.11.18.09.47.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Nov 2009 09:47:49 -0800 (PST) Message-Id: From: Saptarshi Guha To: notmuch@notmuchmail.org Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v936) Date: Wed, 18 Nov 2009 12:47:47 -0500 X-Mailer: Apple Mail (2.936) Subject: [notmuch] Problem Building on OSX leopard 10.5.8 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 17:47:52 -0000 Hello, Having given up on most email clients yet trapped by them, I came =20 across notmuch. Quite eager to build, 1.download xapian, A suggestion : In the INSTALL/README file, mention that xapian-config should be on path and that it be called xapian-config. When I installed the latest, it was installed in /usr/local/bin (not =20 in my path) at xapian-config-1.1 2. download gmime (no problem here) 3. Install talloc (the makefile has errors in it) Problem Building notmuch: I got this error: lib/index.cc: In function =91void =20 _index_address_mailbox(notmuch_message_t*, const char*, =20 InternetAddress*)=92: lib/index.cc:46: error: =91strndup=92 was not declared in this scope Any ideas? Thank you Saptarshi From jeff@ocjtech.us Wed Nov 18 10:00:12 2009 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 9A62B431FBC for ; Wed, 18 Nov 2009 10:00:12 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 qiqjcXbLyIWA for ; Wed, 18 Nov 2009 10:00:12 -0800 (PST) Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com [209.85.210.204]) by olra.theworths.org (Postfix) with ESMTP id 38392431FAE for ; Wed, 18 Nov 2009 10:00:12 -0800 (PST) Received: by yxe42 with SMTP id 42so1466551yxe.22 for ; Wed, 18 Nov 2009 10:00:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.91.26.5 with SMTP id d5mr2700164agj.16.1258567210434; Wed, 18 Nov 2009 10:00:10 -0800 (PST) Date: Wed, 18 Nov 2009 12:00:10 -0600 Message-ID: <935ead450911181000w2cddfe95qe9efd5bea9f9209d@mail.gmail.com> From: Jeffrey Ollie To: notmuch@notmuchmail.org Content-Type: text/plain; charset=UTF-8 Subject: [notmuch] Segfault searching for tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 18:00:12 -0000 Getting the following segfault with 306635c2 on Fedora 12. Seems to be happening with any 'tag:' search that returns results. For example, 'notmuch search tag:inbox' and 'notmuch search tag:unread' segfault but 'notmuch search tag:nosuchtag', 'notmuch search subject:logwatch' and 'notmuch search video' seem to work fine. Core was generated by `/usr/bin/notmuch search --sort=oldest-first tag:inbox'. Program terminated with signal 11, Segmentation fault. \#0 Xapian::TermIterator::operator* (this=) at api/omtermlistiterator.cc:78 78 RETURN(internal->get_termname()); Current language: auto The current source language is "auto; currently c++". Thread 1 (Thread 15005): \#0 Xapian::TermIterator::operator* (this=) at api/omtermlistiterator.cc:78 No locals. \#1 0x000000000040d213 in _notmuch_message_get_in_reply_to (message=0x1594f70) at lib/message.cc:288 prefix = 0x415b77 "XREPLYTO" prefix_len = 0 i = {internal = {dest = 0x0}} in_reply_to = "" \#2 0x000000000040f842 in _resolve_thread_relationships (thread=0x1595a00) at lib/thread.cc:157 node = 0x1596130 message = 0x1594f70 parent = 0x7fff2cade9c8 prev = 0x1595cd0 in_reply_to = \#3 _notmuch_thread_create (thread=0x1595a00) at lib/thread.cc:285 thread = 0x1595a00 thread_id_query = 0x158beb0 matched_query = messages = 0x7fff2cade948 message = thread_id_query_string = matched_query_string = \#4 0x000000000040f3d0 in notmuch_query_search_threads ( query=, first=, max_threads=) at lib/query.cc:217 threads = 0x158b5f0 thread = 0x6e00000077 messages = 0x158b7c0 message = 0x158c580 thread_id = 0x158b890 "2065b08615b4cbbb22d9ee874bb84d3e" seen = 0x15454a0 messages_seen = 0 threads_seen = 0 \#5 0x00000000004089a1 in do_search_threads (ctx=0x1543140, query= 0x7fff2cade8a0, sort=NOTMUCH_SORT_OLDEST_FIRST, first=, max_threads=) at notmuch-search.c:40 thread = threads = 0x1551290 tags = 0x2 date = relative_date = 0x2
\#6 0x0000000000408ddd in notmuch_search_command (ctx=, argc=1, argv=) at notmuch-search.c:156 config = query = 0x158b510 query_str = i = 1 first = max_threads = opt = end = 0x0 sort = \#7 0x000000000040636f in main (argc=4, argv=0x7fff2cadec98) at notmuch.c:400 local = 0x1543140 command = -- Jeff Ollie From keithp@keithp.com Wed Nov 18 11:07:13 2009 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 4D9EE431FBC for ; Wed, 18 Nov 2009 11:07:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 QwyDkBKZrcFf for ; Wed, 18 Nov 2009 11:07:12 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 97B62431FAE for ; Wed, 18 Nov 2009 11:07:12 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id CFEBEB9404C; Wed, 18 Nov 2009 11:07:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id yVh897pirz72; Wed, 18 Nov 2009 11:07:07 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id E327FB9402F; Wed, 18 Nov 2009 11:07:07 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id D8CAEB88003; Wed, 18 Nov 2009 11:07:07 -0800 (PST) From: Keith Packard To: "Aneesh Kumar K.V" , notmuch In-Reply-To: <87k4xnrhfp.fsf@linux.vnet.ibm.com> References: <87k4xnrhfp.fsf@linux.vnet.ibm.com> Date: Wed, 18 Nov 2009 11:07:07 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] notmuch: Add tag archive when archiving the mails X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 19:07:13 -0000 --=-=-= > This enables us to search for archived mails later I think you can just use 'not tag:inbox' as 'archived' really just means 'doesn't have the inbox tag'. -- keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLBEXbQp8BWwlsTdMRAo2gAKCGWHZULh7ZM2cRbkTxZbEvZ3r2ewCfUpeR UL3n2kzFyObEgqzacPflf6Q= =JUk2 -----END PGP SIGNATURE----- --=-=-=-- From jroys3@sis-JRR.stl.gtri.gatech.edu Wed Nov 18 11:43:26 2009 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 DBF92431FBC for ; Wed, 18 Nov 2009 11:43:26 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 FkEICRHpxRlg for ; Wed, 18 Nov 2009 11:43:26 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by olra.theworths.org (Postfix) with ESMTP id 53D7C431FAE for ; Wed, 18 Nov 2009 11:43:26 -0800 (PST) Received: from sis-JRR.stl.gtri.gatech.edu (sis-JRR.stl.gtri.gatech.edu [130.207.197.190]) by mx.perfora.net (node=mxus2) with ESMTP (Nemesis) id 0LmJ46-1NkjDb2CxO-00a2L0 for notmuch@notmuchmail.org; Wed, 18 Nov 2009 14:43:25 -0500 Received: from sis-JRR.stl.gtri.gatech.edu (sis-JRR.stl.gtri.gatech.edu [127.0.0.1]) by sis-JRR.stl.gtri.gatech.edu (8.14.3/8.14.3) with ESMTP id nAIJhN0a017220; Wed, 18 Nov 2009 14:43:23 -0500 Received: (from jroys3@localhost) by sis-JRR.stl.gtri.gatech.edu (8.14.3/8.14.3/Submit) id nAIJhMC9017215; Wed, 18 Nov 2009 14:43:22 -0500 From: Joshua Roys To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 14:43:22 -0500 Message-Id: <1258573402-16750-1-git-send-email-roysjosh@gmail.com> X-Mailer: git-send-email 1.6.2.5 Subject: [notmuch] [PATCH] Fix a compile warning under gcc-4.4.1 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 19:43:27 -0000 --- Hello, This fixes the following for me: notmuch-reply.c: In function ‘address_is_users’: notmuch-reply.c:87: warning: passing argument 2 of ‘notmuch_config_get_user_other_email’ from incompatible pointer type notmuch-client.h:174: note: expected ‘size_t *’ but argument is of type ‘unsigned int *’ notmuch-reply.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index 4a4a782..344b6e3 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -78,7 +78,7 @@ address_is_users (const char *address, notmuch_config_t *config) { const char *primary; char **other; - unsigned int i, other_len; + size_t i, other_len; primary = notmuch_config_get_user_primary_email (config); if (strcmp (primary, address) == 0) -- 1.6.2.5 From jeff@ocjtech.us Wed Nov 18 11:51:01 2009 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 5C25E431FBC for ; Wed, 18 Nov 2009 11:51:01 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 tH+w2PLeG+4r for ; Wed, 18 Nov 2009 11:51:00 -0800 (PST) Received: from mail-gx0-f221.google.com (mail-gx0-f221.google.com [209.85.217.221]) by olra.theworths.org (Postfix) with ESMTP id CE297431FAE for ; Wed, 18 Nov 2009 11:51:00 -0800 (PST) Received: by gxk21 with SMTP id 21so1372980gxk.10 for ; Wed, 18 Nov 2009 11:50:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.91.18.5 with SMTP id v5mr2776139agi.91.1258573858716; Wed, 18 Nov 2009 11:50:58 -0800 (PST) In-Reply-To: References: <87k4xnrhfp.fsf@linux.vnet.ibm.com> Date: Wed, 18 Nov 2009 13:50:58 -0600 Message-ID: <935ead450911181150i4bda379bhcebc3ef52844a0a@mail.gmail.com> From: Jeffrey Ollie To: Not Much Mail Content-Type: text/plain; charset=UTF-8 Subject: Re: [notmuch] [PATCH] notmuch: Add tag archive when archiving the mails X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 19:51:01 -0000 On Wed, Nov 18, 2009 at 1:07 PM, Keith Packard wrote: > >> This enables us to search for archived mails later > > I think you can just use 'not tag:inbox' as 'archived' really just means > 'doesn't have the inbox tag'. That resulted in an error for me: $ notmuch search not tag:inbox A Xapian exception occurred: Syntax: NOT A Xapian exception occurred: Syntax: NOT -- Jeff Ollie From keithp@keithp.com Wed Nov 18 11:56:24 2009 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 D8CA8431FBC for ; Wed, 18 Nov 2009 11:56:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 aRx-6oOVOCf5 for ; Wed, 18 Nov 2009 11:56:23 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 12328431FAE for ; Wed, 18 Nov 2009 11:56:23 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 150DEB9404C for ; Wed, 18 Nov 2009 11:56:21 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id wCZMnIzscRaV; Wed, 18 Nov 2009 11:56:15 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 47B3DB9402F; Wed, 18 Nov 2009 11:56:15 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 3B1A1B88003; Wed, 18 Nov 2009 11:56:15 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id CE9901581A5; Wed, 18 Nov 2009 11:56:14 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 11:56:13 -0800 Message-Id: <1258574173-19911-1-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Filter out carriage-returns in show and reply output. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 19:56:25 -0000 Thanks, windows mail clients. Signed-off-by: Keith Packard --- gmime-filter-reply.c | 7 ++++--- notmuch-show.c | 21 +++++++++++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/gmime-filter-reply.c b/gmime-filter-reply.c index 3e298e1..b269db4 100644 --- a/gmime-filter-reply.c +++ b/gmime-filter-reply.c @@ -130,8 +130,9 @@ filter_filter (GMimeFilter *filter, char *inbuf, size_t inlen, size_t prespace, reply->saw_nl = TRUE; else reply->saw_nl = FALSE; - - *outptr++ = *inptr++; + if (*inptr != '\r') + *outptr++ = *inptr; + inptr++; } } else { g_mime_filter_set_size (filter, inlen + 1, FALSE); @@ -150,7 +151,7 @@ filter_filter (GMimeFilter *filter, char *inbuf, size_t inlen, size_t prespace, else *outptr++ = *inptr; reply->saw_angle = FALSE; - } else { + } else if (*inptr != '\r') { if (*inptr == '\n') reply->saw_nl = TRUE; *outptr++ = *inptr; diff --git a/notmuch-show.c b/notmuch-show.c index 7749dbc..4c377e1 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -99,14 +99,23 @@ show_part (GMimeObject *part, int *part_count) if (g_mime_content_type_is_type (content_type, "text", "*") && !g_mime_content_type_is_type (content_type, "text", "html")) { - GMimeStream *stream = g_mime_stream_file_new (stdout); - g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream), FALSE); + GMimeStream *stream_stdout = g_mime_stream_file_new (stdout); + GMimeStream *stream_filter = NULL; + + if (stream_stdout) { + g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE); + stream_filter = g_mime_stream_filter_new(stream_stdout); + g_mime_stream_filter_add(GMIME_STREAM_FILTER(stream_filter), + g_mime_filter_crlf_new(FALSE, FALSE)); + } wrapper = g_mime_part_get_content_object (GMIME_PART (part)); - if (wrapper && stream) - g_mime_data_wrapper_write_to_stream (wrapper, stream); - if (stream) - g_object_unref(stream); + if (wrapper && stream_filter) + g_mime_data_wrapper_write_to_stream (wrapper, stream_filter); + if (stream_filter) + g_object_unref(stream_filter); + if (stream_stdout) + g_object_unref(stream_stdout); } else { -- 1.6.5.2 From keithp@keithp.com Wed Nov 18 11:57:18 2009 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 8F790431FBC for ; Wed, 18 Nov 2009 11:57:18 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 qIkAWy2ll9he for ; Wed, 18 Nov 2009 11:57:17 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id BAB96431FAE for ; Wed, 18 Nov 2009 11:57:17 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 2D5C9B9404C for ; Wed, 18 Nov 2009 11:57:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 9e8mFTHKGrJN; Wed, 18 Nov 2009 11:57:14 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id F1E9EB9402F; Wed, 18 Nov 2009 11:57:13 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id EFA4BB88003; Wed, 18 Nov 2009 11:57:13 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id 990871581A5; Wed, 18 Nov 2009 11:57:13 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 11:57:12 -0800 Message-Id: <1258574232-19966-1-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Limit reverse searches to 100 threads. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 19:57:18 -0000 Yes, this is a lame default, but it serves my purposes. Signed-off-by: Keith Packard --- notmuch.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch.el b/notmuch.el index 4498200..91ed073 100644 --- a/notmuch.el +++ b/notmuch.el @@ -945,7 +945,7 @@ This function advances point to the next line when finished." (save-excursion (if oldest-first (call-process "notmuch" nil t nil "search" query) - (call-process "notmuch" nil t nil "search" "--reverse" query)) + (call-process "notmuch" nil t nil "search" "--max-threads=100" "--reverse" query)) (notmuch-search-markup-thread-ids) )))) -- 1.6.5.2 From keithp@keithp.com Wed Nov 18 11:58:15 2009 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 8F299431FBF for ; Wed, 18 Nov 2009 11:58:15 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 OrfvwKO5MBzg for ; Wed, 18 Nov 2009 11:58:15 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id AC26C431FBC for ; Wed, 18 Nov 2009 11:58:14 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id E3CECB9404C for ; Wed, 18 Nov 2009 11:58:12 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YGBypFG9hQVa; Wed, 18 Nov 2009 11:58:07 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 5EA5AB9402F; Wed, 18 Nov 2009 11:58:07 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 581C1B88003; Wed, 18 Nov 2009 11:58:07 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id 00E8E1581A5; Wed, 18 Nov 2009 11:58:07 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 11:58:06 -0800 Message-Id: <1258574286-20087-1-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Have git ignore etags file X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 19:58:15 -0000 --- .gitignore | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index d277c5a..367caa6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +TAGS .deps notmuch notmuch.1.gz -- 1.6.5.2 From keithp@keithp.com Wed Nov 18 12:17:51 2009 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 6ACD6431FBF for ; Wed, 18 Nov 2009 12:17:51 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 3SP-uoRhYx2q for ; Wed, 18 Nov 2009 12:17:50 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id B3F63431FBC for ; Wed, 18 Nov 2009 12:17:50 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 190C6B9404C; Wed, 18 Nov 2009 12:17:50 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Rmr5hkjvx-Rg; Wed, 18 Nov 2009 12:17:46 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id DACAAB9402F; Wed, 18 Nov 2009 12:17:46 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id CC3E5B88003; Wed, 18 Nov 2009 12:17:46 -0800 (PST) From: Keith Packard To: Jeffrey Ollie , Not Much Mail In-Reply-To: <935ead450911181150i4bda379bhcebc3ef52844a0a@mail.gmail.com> References: <87k4xnrhfp.fsf@linux.vnet.ibm.com> <935ead450911181150i4bda379bhcebc3ef52844a0a@mail.gmail.com> Date: Wed, 18 Nov 2009 12:17:46 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] notmuch: Add tag archive when archiving the mails X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 20:17:51 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Wed, 18 Nov 2009 13:50:58 -0600, Jeffrey Ollie wrote: > That resulted in an error for me: >=20 > $ notmuch search not tag:inbox > A Xapian exception occurred: Syntax: NOT > A Xapian exception occurred: Syntax: NOT Yeah, NOT isn't a unary operator in xapian; it's a binary operator that means 'AND NOT'. The Xapian docs say that if you set the FLAG_PURE_NOT flag, you'll get the unary behaviour, but I haven't tried that. =2D- keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLBFZqQp8BWwlsTdMRAtMIAKCggiR6ySGe2douMOogoc81jixh5wCfUv2N inG5v6kdH1qT9SGI40uQe+U= =lVmk -----END PGP SIGNATURE----- --=-=-=-- From jeff@ocjtech.us Wed Nov 18 13:23:03 2009 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 1B06F431FBF for ; Wed, 18 Nov 2009 13:23:03 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 8Oi79r4YnJJM for ; Wed, 18 Nov 2009 13:23:02 -0800 (PST) Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com [209.85.210.204]) by olra.theworths.org (Postfix) with ESMTP id 7113C431FBC for ; Wed, 18 Nov 2009 13:23:02 -0800 (PST) Received: by yxe42 with SMTP id 42so1686954yxe.22 for ; Wed, 18 Nov 2009 13:23:02 -0800 (PST) Received: by 10.100.230.20 with SMTP id c20mr4293136anh.152.1258579382085; Wed, 18 Nov 2009 13:23:02 -0800 (PST) Received: from lt26923.campus.dmacc.edu ([69.57.47.215]) by mx.google.com with ESMTPS id 15sm178981yxh.58.2009.11.18.13.23.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Nov 2009 13:23:01 -0800 (PST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by lt26923.campus.dmacc.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NApK3-0004Bn-9o for notmuch@notmuchmail.org; Wed, 18 Nov 2009 12:32:07 -0600 From: "Jeffrey C. Ollie" To: Not Much Mail Date: Wed, 18 Nov 2009 12:31:53 -0600 Message-Id: <1258569114-16034-1-git-send-email-jeff@ocjtech.us> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] RPM spec file X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 21:23:03 -0000 I prefere managing all of the software on my system with RPM, so I came up with a quick spec file for building RPMS. Once notmuch settles down and I continue using it I may submit notmuch to Fedora as an official package. If you'd like your own RPMS build your own, I don't plan on offering a repository of binary packages. From jeff@ocjtech.us Wed Nov 18 13:23:06 2009 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 B83BF431FC0 for ; Wed, 18 Nov 2009 13:23:06 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 69Et9SgpYeSG for ; Wed, 18 Nov 2009 13:23:05 -0800 (PST) Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com [209.85.210.204]) by olra.theworths.org (Postfix) with ESMTP id A7B79431FC4 for ; Wed, 18 Nov 2009 13:23:04 -0800 (PST) Received: by mail-yx0-f204.google.com with SMTP id 42so1686954yxe.22 for ; Wed, 18 Nov 2009 13:23:04 -0800 (PST) Received: by 10.101.72.16 with SMTP id z16mr3865306ank.90.1258579384054; Wed, 18 Nov 2009 13:23:04 -0800 (PST) Received: from lt26923.campus.dmacc.edu ([69.57.47.215]) by mx.google.com with ESMTPS id 36sm180609yxh.31.2009.11.18.13.23.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Nov 2009 13:23:03 -0800 (PST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by lt26923.campus.dmacc.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NApKA-0004Bn-67; Wed, 18 Nov 2009 12:32:14 -0600 From: "Jeffrey C. Ollie" To: Not Much Mail Date: Wed, 18 Nov 2009 12:31:54 -0600 Message-Id: <1258569114-16034-2-git-send-email-jeff@ocjtech.us> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1258569114-16034-1-git-send-email-jeff@ocjtech.us> References: <1258569114-16034-1-git-send-email-jeff@ocjtech.us> Subject: [notmuch] [PATCH] notmuch build: add a RPM spec file X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 21:23:07 -0000 Add a spec file for building RPM packages. Signed-off-by: Jeffrey C. Ollie --- notmuch.spec | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 110 insertions(+), 0 deletions(-) create mode 100644 notmuch.spec diff --git a/notmuch.spec b/notmuch.spec new file mode 100644 index 0000000..cca3a1b --- /dev/null +++ b/notmuch.spec @@ -0,0 +1,110 @@ +%global git 306635c2 + +%if %($(pkg-config emacs) ; echo $?) +%global emacs_version 23.1 +%global emacs_lispdir %{_datadir}/emacs/site-lisp +%global emacs_startdir %{_datadir}/emacs/site-lisp/site-start.d +%else +%global emacs_version %(pkg-config emacs --modversion) +%global emacs_lispdir %(pkg-config emacs --variable sitepkglispdir) +%global emacs_startdir %(pkg-config emacs --variable sitestartdir) +%endif + +Name: notmuch +Version: 0.0 +Release: 0.3.%{git}%{?dist} +Summary: Not much of an email program + +Group: Applications/Internet +License: GPLv3+ +URL: http://notmuchmail.org/ + +# +# To create a tarball: +# +# git clone git://notmuchmail.org/git/notmuch +# cd notmuch +# git archive --format=tar --prefix=notmuch/ HEAD | bzip2 > notmuch-`git show-ref --hash=8 HEAD`.tar.bz2 +# +Source0: notmuch-%{git}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: xapian-core-devel +BuildRequires: gmime-devel +BuildRequires: libtalloc-devel +BuildRequires: zlib-devel +BuildRequires: emacs-el +BuildRequires: emacs-nox + +Requires: emacs(bin) >= %{emacs_version} + +%description +* "Not much mail" is what Notmuch thinks about your email + collection. Even if you receive 12000 messages per month or have on + the order of millions of messages that you've been saving for + decades. Regardless, Notmuch will be able to quickly search all of + it. It's just plain not much mail. + +* "Not much mail" is also what you should have in your inbox at any + time. Notmuch gives you what you need, (tags and fast search), so + that you can keep your inbox tamed and focus on what really matters + in your life, (which is surely not email). + +* Notmuch is an answer to Sup. Sup is a very good email program + written by William Morgan (and others) and is the direct inspiration + for Notmuch. Notmuch began as an effort to rewrite + performance-critical pieces of Sup in C rather than ruby. From + there, it grew into a separate project. One significant contribution + Notmuch makes compared to Sup is the separation of the + indexer/searcher from the user interface. (Notmuch provides a + library interface so that its indexing/searching/tagging features + can be integrated into any email program.) + +* Notmuch is not much of an email program. It doesn't receive messages + (no POP or IMAP suport). It doesn't send messages (no mail composer, + no network code at all). And for what it does do (email search) that + work is provided by an external library, Xapian. So if Notmuch + provides no user interface and Xapian does all the heavy lifting, + then what's left here? Not much. + +Notmuch is still in the early stages of development, but it does +include one user interface, (implemented within emacs), which has at +least two users using it for reading all of their incoming mail. If +you've been looking for a fast, global-search and tag-based email +reader to use within emacs, then Notmuch may be exactly what you've +been looking for. + +Otherwise, if you're a developer of an existing email program and +would love a good library interface for fast, global search with +support for arbitrary tags, then Notmuch also may be exactly what +you've been looking for. + +%prep +%setup -q -n notmuch + +%build +make %{?_smp_mflags} CFLAGS="%{optflags}" +emacs -batch -f batch-byte-compile notmuch.el + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} prefix=%{_prefix} +mkdir -p %{buildroot}%{emacs_startdir} +install -m0644 -p notmuch.el* %{buildroot}%{emacs_startdir} + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc AUTHORS COPYING COPYING-GPL-3 INSTALL README TODO + +%{_sysconfdir}/bash_completion.d/notmuch +%{_bindir}/notmuch +%{_mandir}/man1/notmuch.1* +%{emacs_startdir}/notmuch.el* + +%changelog +* Wed Nov 18 2009 Jeffrey C. Ollie - 0.0-0.3.306635c2 +- First version + -- 1.6.5.2 From keithp@keithp.com Wed Nov 18 13:46:04 2009 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 A3F0C431FBF for ; Wed, 18 Nov 2009 13:46:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Na4UJR2xWfHB for ; Wed, 18 Nov 2009 13:46:03 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 90B99431FBC for ; Wed, 18 Nov 2009 13:46:03 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 0665EB9404C for ; Wed, 18 Nov 2009 13:46:03 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id PNyzIBrT-lJf; Wed, 18 Nov 2009 13:46:00 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 1609BB9402F; Wed, 18 Nov 2009 13:46:00 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 13B6EB88003; Wed, 18 Nov 2009 13:46:00 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id B11841581A5; Wed, 18 Nov 2009 13:45:59 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 13:45:58 -0800 Message-Id: <1258580758-24474-1-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Make reply/show/tag all require at least one search term X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 21:46:04 -0000 In particular, notmuch tag -inbox "" tended to take a long time to run, happened if you hit 'a' on a blank line in the search view and probably didn't have the desired effect. Signed-off-by: Keith Packard --- notmuch-reply.c | 13 +++++++++---- notmuch-show.c | 13 +++++++++---- notmuch-tag.c | 8 ++++---- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index 4a4a782..31e2c87 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -196,16 +196,21 @@ notmuch_reply_command (void *ctx, int argc, char *argv[]) if (config == NULL) return 1; - notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); - if (notmuch == NULL) - return 1; - query_string = query_string_from_args (ctx, argc, argv); if (query_string == NULL) { fprintf (stderr, "Out of memory\n"); return 1; } + if (*query_string == '\0') { + fprintf (stderr, "Error: notmuch reply requires at least one search term.\n"); + return 1; + } + + notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + if (notmuch == NULL) + return 1; + query = notmuch_query_create (notmuch, query_string); if (query == NULL) { fprintf (stderr, "Out of memory\n"); diff --git a/notmuch-show.c b/notmuch-show.c index 59a58c2..c0c3ca3 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -196,16 +196,21 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) if (config == NULL) return 1; - notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); - if (notmuch == NULL) - return 1; - query_string = query_string_from_args (ctx, argc, argv); if (query_string == NULL) { fprintf (stderr, "Out of memory\n"); return 1; } + if (*query_string == '\0') { + fprintf (stderr, "Error: notmuch show requires at least one search term.\n"); + return 1; + } + + notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + if (notmuch == NULL) + return 1; + query = notmuch_query_create (notmuch, query_string); if (query == NULL) { fprintf (stderr, "Out of memory\n"); diff --git a/notmuch-tag.c b/notmuch-tag.c index 7d92ec4..12ab86c 100644 --- a/notmuch-tag.c +++ b/notmuch-tag.c @@ -83,8 +83,10 @@ notmuch_tag_command (void *ctx, unused (int argc), unused (char *argv[])) return 1; } - if (i == argc) { - fprintf (stderr, "Error: 'notmuch tag' requires at least one search term.\n"); + query_string = query_string_from_args (ctx, argc - i, &argv[i]); + + if (*query_string == '\0') { + fprintf (stderr, "Error: notmuch tag requires at least one search term.\n"); return 1; } @@ -96,8 +98,6 @@ notmuch_tag_command (void *ctx, unused (int argc), unused (char *argv[])) if (notmuch == NULL) return 1; - query_string = query_string_from_args (ctx, argc - i, &argv[i]); - query = notmuch_query_create (notmuch, query_string); if (query == NULL) { fprintf (stderr, "Out of memory.\n"); -- 1.6.5.2 From cworth@cworth.org Wed Nov 18 14:27:37 2009 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 4A34F431FC0; Wed, 18 Nov 2009 14:27:37 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 2H3gZ5qNkzph; Wed, 18 Nov 2009 14:27:36 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E3B13431FBC; Wed, 18 Nov 2009 14:27:35 -0800 (PST) From: Carl Worth To: Jjgod Jiang , notmuch@notmuchmail.org In-Reply-To: References: Date: Wed, 18 Nov 2009 23:27:20 +0100 Message-ID: <874oorfozb.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [notmuch] Mac OS X/Darwin compatibility issues X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 22:27:37 -0000 On Wed, 18 Nov 2009 11:50:17 +0800, Jjgod Jiang wrote: > 1. g++ reports 'warning: command line option "-Wmissing-declarations" > is valid for C/ObjC but not for C++' In cairo, what we do is have a huge list of desired warnings and then test each one in turn with a test-compile in the configure script. That's probably what we should do here, (I recently established a Makefile.config for this purpose that should be generated by the configure script.) > 2. > notmuch-reply.c: In function =E2=80=98address_is_users=E2=80=99: > notmuch-reply.c:87: warning: passing argument 2 of > =E2=80=98notmuch_config_get_user_other_email=E2=80=99 from incompatible p= ointer type Thanks for the report. I think I saw a fix for this in a commit from Chris Wilson that's in my queue. (Though from a quick glance I'm not sure where the size_t type got started in the code and propagated throught this part). > 3. Several errors about missing GNU extensions like getline() and strndup= (): >=20 > warning: implicit declaration of function =E2=80=98getline=E2=80=99 > error: =E2=80=98strndup=E2=80=99 was not declared in this scope >=20 > We can implement these with fgets() and strncpy() though. Yes. I knew I was "cheating" by using some GNU extensions here. I'm happy to accept portability patches for these things, but it's hard for me to get excited about writing them myself. Care to take a whack at these? -Carl From ingmar@exherbo.org Wed Nov 18 14:50:58 2009 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 A7733431FBF for ; Wed, 18 Nov 2009 14:50:58 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 SgJqAi+RQrD7 for ; Wed, 18 Nov 2009 14:50:57 -0800 (PST) X-Greylist: delayed 84428 seconds by postgrey-1.32 at olra; Wed, 18 Nov 2009 14:50:57 PST Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by olra.theworths.org (Postfix) with ESMTP id A6D2D431FBC for ; Wed, 18 Nov 2009 14:50:57 -0800 (PST) Received: from [83.101.72.69] (helo=localhost) by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NAtMV-0005Kc-2e; Wed, 18 Nov 2009 22:50:55 +0000 From: Ingmar Vanhassel To: Date: Wed, 18 Nov 2009 23:50:40 +0100 Message-Id: <1258584640-29221-1-git-send-email-ingmar@exherbo.org> X-Mailer: git-send-email 1.6.5.2.433.g23cdb Subject: [notmuch] [PATCH 1/2] zsh: Initial zsh-completion for notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 22:50:58 -0000 Signed-off-by: Ingmar Vanhassel --- _notmuch | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 74 insertions(+), 0 deletions(-) create mode 100644 _notmuch diff --git a/_notmuch b/_notmuch new file mode 100644 index 0000000..00c9248 --- /dev/null +++ b/_notmuch @@ -0,0 +1,74 @@ +#compdef notmuch + +# ZSH completion for `notmuch` +# Copyright 2009 Ingmar Vanhassel + +_notmuch_commands() +{ + local -a notmuch_commands + notmuch_commands=( + 'setup:interactively set up notmuch for first use' + 'new:find and import any new message to the database' + 'search:search for messages matching the search terms, display matching threads as results' + 'reply:constructs a reply template for a set of messages' + 'show:show all messages matching the search terms' + 'tag:add or remove tags for all messages matching the search terms' + 'dump:creates a plain-text dump of the tags of each message' + 'restore:restores the tags from the given file' + 'help:show details on a command' + ) + + _describe -t command 'command' notmuch_commands +} + +_notmuch_dump() +{ + _files +} + +_notmuch_help_topics() +{ + local -a notmuch_help_topics + notmuch_help_topics=( + 'search-terms:show common search-terms syntax' + ) + _describe -t notmuch-help-topics 'topic' notmuch_help_topics +} + +_notmuch_help() +{ + _alternative \ + _notmuch_commands \ + _notmuch_help_topics +} + +_notmuch_restore() +{ + _files +} + +_notmuch_search() +{ + _arguments -s : \ + '--max-threads=[display only the first x threads from the search results]:number of threads to show: ' \ + '--first=[omit the first x threads from the search results]:number of threads to omit: ' \ + '--sort=[sort results]:sorting:((newest-first\:"reverse chronological order" oldest-first\:"chronological order"))' +} + +_notmuch() +{ + if (( CURRENT > 2 )) ; then + local cmd=${words[2]} + curcontext="${curcontext%:*:*}:notmuch-$cmd" + (( CURRENT-- )) + shift words + _call_function ret _notmuch_$cmd + return ret + else + _notmuch_commands + fi +} + +_notmuch "$@" + +# vim: set sw=2 sts=2 ts=2 et ft=zsh : -- 1.6.5.2.433.g23cdb From ingmar@exherbo.org Wed Nov 18 14:51:36 2009 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 E4F54431FBF for ; Wed, 18 Nov 2009 14:51:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 AmnpbjwTN0KH for ; Wed, 18 Nov 2009 14:51:36 -0800 (PST) Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by olra.theworths.org (Postfix) with ESMTP id 418CE431FBC for ; Wed, 18 Nov 2009 14:51:36 -0800 (PST) Received: from [83.101.72.69] (helo=localhost) by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NAtN9-0005Kt-JW; Wed, 18 Nov 2009 22:51:35 +0000 From: Ingmar Vanhassel To: Date: Wed, 18 Nov 2009 23:51:31 +0100 Message-Id: <1258584691-29260-1-git-send-email-ingmar@exherbo.org> X-Mailer: git-send-email 1.6.5.2.433.g23cdb Subject: [notmuch] [PATCH 2/2] .gitignore: Add common editor droppings X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 22:51:37 -0000 --- .gitignore | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index d277c5a..a210779 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ notmuch notmuch.1.gz *.[ao] +*~ +.*.swp -- 1.6.5.2.433.g23cdb From cworth@cworth.org Wed Nov 18 15:06:07 2009 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 7E8FF431FC0; Wed, 18 Nov 2009 15:06:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 pEd0TkiwL2bo; Wed, 18 Nov 2009 15:06:07 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6FDA2431FBC; Wed, 18 Nov 2009 15:06:06 -0800 (PST) From: Carl Worth To: Alexander Botero-Lowry , Keith Packard , notmuch@notmuchmail.org In-Reply-To: <1258532999-9316-1-git-send-email-keithp@keithp.com> References: <1258532999-9316-1-git-send-email-keithp@keithp.com> <867hto2p0t.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> Date: Thu, 19 Nov 2009 00:05:51 +0100 Message-ID: <87ws1nmo1c.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 23:06:07 -0000 On Wed, 18 Nov 2009 00:29:59 -0800, Keith Packard wrote: > I created the notmuch-show-hook precisely so I could add these two > options, but I suspect most people will want them, so I just made them > the default. If you don't want them, you can use remove-hook to get > rid of this. Thanks, Keith! I had actually held off on pushing your original commit to add the hook because I didn't like that it wasn't documenting what the hook was good for. But now that we've got some good, suggested behavior there, I'm much happier. So both are pushed now. On Wed, 18 Nov 2009 00:52:34 -0800, Alexander Botero-Lowry wrote: > Yes, hooks should be added for search as well. :) Not a bad idea at all. > visual-line-mode turns out to make subject look pretty ugly if there is a > continuation. It doesn't do much good for the citation headers > either. We probably need to do our own intelligent wrapping rather then > use visual-line-mode to make this actually look right. Yes, this stuff isn't perfect yet, but I think it's better than nothing. We can do our own wrapping if these things get too annoying. -Carl From cworth@cworth.org Wed Nov 18 15:22:54 2009 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 1C07E431FBF; Wed, 18 Nov 2009 15:22:54 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ReKN0pUpv+Wg; Wed, 18 Nov 2009 15:22:53 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 0F0D8431FBC; Wed, 18 Nov 2009 15:22:53 -0800 (PST) From: Carl Worth To: Chris Wilson , notmuch@notmuchmail.org In-Reply-To: <1258544095-16616-1-git-send-email-chris@chris-wilson.co.uk> References: <1258544095-16616-1-git-send-email-chris@chris-wilson.co.uk> <1258544095-16616-2-git-send-email-chris@chris-wilson.co.uk> Date: Thu, 19 Nov 2009 00:22:38 +0100 Message-ID: <87skcbmn9d.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH 2/2] reply: Pointer mismatch. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 23:22:54 -0000 On Wed, 18 Nov 2009 11:34:54 +0000, Chris Wilson wrote: > Currently the same `pkg-config ...` is executed for every target, so > just store the results in a variable. On Wed, 18 Nov 2009 11:34:55 +0000, Chris Wilson wrote: > Apparently typeof (size_t) != unsigned int on my x86-64. Thanks! Both pushed. -Carl From cworth@cworth.org Wed Nov 18 15:30:23 2009 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 DB03C431FC0; Wed, 18 Nov 2009 15:30:23 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 RPwLLvpFU5z9; Wed, 18 Nov 2009 15:30:23 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 7EDA2431FBC; Wed, 18 Nov 2009 15:30:20 -0800 (PST) From: Carl Worth To: Jan Janak , notmuch@notmuchmail.org In-Reply-To: References: Date: Thu, 19 Nov 2009 00:29:47 +0100 Message-ID: <87r5rvmmxg.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Why is no. of files from count_files reset to 0? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 23:30:24 -0000 On Wed, 18 Nov 2009 15:36:51 +0100, Jan Janak wrote: > When I comment out the following line (before add_files is called): > > add_files_state.total_files = 0; > > The progress indicator shows the total number of files to be > processed, as well as the time remaining. This is, IMHO, much better, > especially if you process a large collection of emails. > > Is there any reason for having the variable reset to 0 before calling > add_files? Thanks! Just a bug. Thanks for pointing this out. It's fixed now---and it will be nice for new users to have the countdown working once again. -Carl From cworth@cworth.org Wed Nov 18 15:38:17 2009 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 2ECAD431FC0; Wed, 18 Nov 2009 15:38:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 DuCMP4s-wqtd; Wed, 18 Nov 2009 15:38:16 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2CA94431FBC; Wed, 18 Nov 2009 15:38:15 -0800 (PST) From: Carl Worth To: "Aneesh Kumar K.V" , notmuch In-Reply-To: <87pr7f6fgp.fsf@linux.vnet.ibm.com> References: <87pr7f6fgp.fsf@linux.vnet.ibm.com> Date: Thu, 19 Nov 2009 00:38:01 +0100 Message-ID: <878we376au.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] How to list archived mails X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 23:38:17 -0000 On Wed, 18 Nov 2009 20:35:26 +0530, aneesh.kumar@linux.vnet.ibm.com (Aneesh Kumar K.V) wrote: > Once i mark the mail as archived how do i search for them ? > Right now with notmuch.el i am adding a tag "archive" when > i am archiving the mail. I am just wondering is this the right > way ? You might expect to be able to find all archived messages with: notmuch search not tag:inbox (And if I had written the query parser that would work fine.) But oddly, that fails because in Xapian's query parser the NOT operator is not a unary operator but is instead a binary operator of AND_NOT. I think the lack of a unary not is a bug in Xapian. In the meantime, what we could use here is some syntax for a query that is guaranteed to match all messages. Anyone have any ideas? Meanwhile, if it's not that you're trying to list all archived messages, (which I think would be a rare thing to want), but instead you want all archived messages matching then you can simply do: notmuch search and not tag:inbox I hope that helps. Happy hacking, -Carl From cworth@cworth.org Wed Nov 18 15:44:22 2009 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 34178431FC0; Wed, 18 Nov 2009 15:44:22 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 W3K2jjCxsG4p; Wed, 18 Nov 2009 15:44:21 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 3F0E7431FBC; Wed, 18 Nov 2009 15:44:21 -0800 (PST) From: Carl Worth To: "Aneesh Kumar K.V" , notmuch In-Reply-To: <87my2jrhjh.fsf@linux.vnet.ibm.com> References: <87my2jrhjh.fsf@linux.vnet.ibm.com> Date: Thu, 19 Nov 2009 00:44:07 +0100 Message-ID: <877htn760o.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] notmuch: Add hooks for show-mode and search-mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 23:44:22 -0000 On Wed, 18 Nov 2009 20:44:58 +0530, aneesh.kumar@linux.vnet.ibm.com (Aneesh Kumar K.V) wrote: > From: Aneesh Kumar K.V > Date: Wed, 18 Nov 2009 20:43:13 +0530 > Subject: [PATCH] notmuch: Add hooks for show-mode and search-mode > > This enables to do things like > > (add-hook 'notmuch-search-mode-hook > (lambda() > (hl-line-mode 1) )) Hi Aneesh, Thanks for the patch. I think the hooks will be genuinely useful. I haven't pushed this yet for two questions: 1. I recently merged an independent patch from Keith to add one hook already. (And it looks like Keith got fancy and used defcustom instead of defvar.) Could you re-do your patch on top of master and match the style he used? [*] 2. If this hl-line-mode thing is interesting for you, might it not be interesting for all users? (What does it do anyway?) One concern I have with hooks is that people will use them to fix things locally and prevent the defaults getting fixed to improve things for everybody. (Granted, sometimes there's an honest difference of opinion, so the defaults can't always satisfy everyone, and we'll want the hooks.) I guess I'm just hoping that people will at least attempt to get improvements to be integrated into the defaults instead of just changing local hooks. -Carl [*] Independently, it might be nice to switch all of our variables intended to be tweaked by the user from defvar to defcustom. From cworth@cworth.org Wed Nov 18 15:51:36 2009 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 00B50431FC0; Wed, 18 Nov 2009 15:51:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 lLfhSiItCObh; Wed, 18 Nov 2009 15:51:35 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 04249431FBC; Wed, 18 Nov 2009 15:51:34 -0800 (PST) From: Carl Worth To: Jeffrey Ollie , Not Much Mail In-Reply-To: <935ead450911181150i4bda379bhcebc3ef52844a0a@mail.gmail.com> References: <87k4xnrhfp.fsf@linux.vnet.ibm.com> <935ead450911181150i4bda379bhcebc3ef52844a0a@mail.gmail.com> Date: Thu, 19 Nov 2009 00:51:20 +0100 Message-ID: <87639775on.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] notmuch: Add tag archive when archiving the mails X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 23:51:36 -0000 On Wed, 18 Nov 2009 13:50:58 -0600, Jeffrey Ollie wrote: > On Wed, Nov 18, 2009 at 1:07 PM, Keith Packard wrote: > > I think you can just use 'not tag:inbox' as 'archived' really just means > > 'doesn't have the inbox tag'. > > That resulted in an error for me: > > $ notmuch search not tag:inbox > A Xapian exception occurred: Syntax: NOT > A Xapian exception occurred: Syntax: NOT Like I said earlier. I think that's a bug we should report to the Xapian folks. Meanwhile, it just occurred to me that we can make "notmuch search not tag:inbox" work without any change to Xapian. For every document we store in the database we put a special term on it to indicate its type. (We mostly just have documents of type "mail" but we also have documents of type "timestamp"---see the comment at the top of lib/database.cc for details.) So if we take the string "not tag:inbox" and turn it into "type:mail and not tag:inbox" then that will work just fine. (That's close to what we're doing currently, but different. Right now we try to parse the query "not tag:inbox" on its own and then combine the result with another query generated from a term representing the "mail" type.) -Carl From stewart@flamingspork.com Wed Nov 18 15:52:51 2009 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 26706431FC0 for ; Wed, 18 Nov 2009 15:52:51 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 yoIukPwqu2ye for ; Wed, 18 Nov 2009 15:52:50 -0800 (PST) Received: from kaylee.flamingspork.com (kaylee.flamingspork.com [74.207.245.61]) by olra.theworths.org (Postfix) with ESMTP id 38913431FBF for ; Wed, 18 Nov 2009 15:52:50 -0800 (PST) Received: from willster (localhost [127.0.0.1]) by kaylee.flamingspork.com (Postfix) with ESMTPS id 4DA6C6333; Wed, 18 Nov 2009 23:52:25 +0000 (UTC) Received: from flamingspork.com (localhost.localdomain [127.0.0.1]) by willster (Postfix) with ESMTPS id E07351002045; Thu, 19 Nov 2009 10:45:30 +1100 (EST) Date: Thu, 19 Nov 2009 10:45:28 +1100 From: Stewart Smith To: Carl Worth Message-ID: <20091118234527.GO9315@flamingspork.com> References: <874oorfozb.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874oorfozb.fsf@yoom.home.cworth.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Mac OS X/Darwin compatibility issues X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 23:52:51 -0000 On Wed, Nov 18, 2009 at 11:27:20PM +0100, Carl Worth wrote: > Yes. I knew I was "cheating" by using some GNU extensions here. I'm > happy to accept portability patches for these things, but it's hard for > me to get excited about writing them myself. > > Care to take a whack at these? http://www.gnu.org/software/gnulib/ could be a partial answer. We've taken to using it where needed for Drizzle and seems to work fine. -- Stewart Smith From cworth@cworth.org Wed Nov 18 16:02:30 2009 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 5D0FF431FC2; Wed, 18 Nov 2009 16:02:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 M5c-AKJEuygs; Wed, 18 Nov 2009 16:02:29 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 72B6A431FBC; Wed, 18 Nov 2009 16:02:29 -0800 (PST) From: Carl Worth To: Keith Packard , notmuch@notmuchmail.org In-Reply-To: <1258565691-17252-1-git-send-email-keithp@keithp.com> References: <1258565691-17252-1-git-send-email-keithp@keithp.com> Date: Thu, 19 Nov 2009 01:02:15 +0100 Message-ID: <873a4b756g.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] We use the message mail system for new mail, let emacs know. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 00:02:30 -0000 On Wed, 18 Nov 2009 09:34:51 -0800, Keith Packard wrote: > This makes things like the goto-address system bring up the right > message composition window. Thanks. Pushed. -Carl From aperez@hikari.localdomain Wed Nov 18 16:08:48 2009 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 11FAC431FBF for ; Wed, 18 Nov 2009 16:08:48 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 r9eENtqtINSZ for ; Wed, 18 Nov 2009 16:08:46 -0800 (PST) Received: from alice.connectical.com (alice.connectical.com [208.89.208.235]) by olra.theworths.org (Postfix) with ESMTP id 4BC42431FBC for ; Wed, 18 Nov 2009 16:08:46 -0800 (PST) Received: (qmail 23577 invoked from network); 19 Nov 2009 00:08:13 -0000 Received: from 97.126.60.213.dynamic.mundo-r.com (HELO hikari.localdomain) (aperez@213.60.126.97) by alice.connectical.com with ESMTPA; 19 Nov 2009 00:08:13 -0000 Received: by hikari.localdomain (Postfix, from userid 500) id E573D31DCB60; Thu, 19 Nov 2009 01:07:22 +0100 (CET) From: Adrian Perez To: notmuch@notmuchmail.org Date: Thu, 19 Nov 2009 01:07:22 +0100 Message-Id: <1258589242-4871-1-git-send-email-aperez@igalia.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Allow lone "not" search operators X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 00:08:48 -0000 As suggested by Keith in FLAG_PURE_NOT allows for expressions like: notmuch search NOT tag:inbox Note that this way a search like: notmuch search foobar NOT tag:inbox should not be written instead: notmuch search foobar AND NOT tag:inbox In my opinion, the latter feels more natural and is somewhat more explicit. It gives a better clue of what the search is about instead of assuming that an implicit AND operator is there. --- lib/query.cc | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/query.cc b/lib/query.cc index a869f3e..75f22b3 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -97,7 +97,8 @@ notmuch_query_search_messages (notmuch_query_t *query, Xapian::QueryParser::FLAG_PHRASE | Xapian::QueryParser::FLAG_LOVEHATE | Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE | - Xapian::QueryParser::FLAG_WILDCARD); + Xapian::QueryParser::FLAG_WILDCARD | + Xapian::QueryParser::FLAG_PURE_NOT); if (strcmp (query_string, "") == 0) { final_query = mail_query; -- 1.6.5.2 From alex.boterolowry@gmail.com Wed Nov 18 16:24:55 2009 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 399FA431FBF for ; Wed, 18 Nov 2009 16:24:55 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 eWKv8uBeEQOD for ; Wed, 18 Nov 2009 16:24:55 -0800 (PST) Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com [209.85.210.204]) by olra.theworths.org (Postfix) with ESMTP id 134E4431FBC for ; Wed, 18 Nov 2009 16:24:55 -0800 (PST) Received: by yxe42 with SMTP id 42so1832481yxe.22 for ; Wed, 18 Nov 2009 16:24:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=iMDsajYVtWPzRe7bSXRYP2yksbB58Z0NZ2/1KXFwrcQ=; b=WZMzgB7L6xTSPCwd7Si3SxFplMbWJ/bWyNqF3DZF3o3t9epp5wzdkmia59BpJMERt4 7a/PHPq8KCr70c/khBjdbo39uXBgLj8cKMAu/6qXk9usLlGdrwX1B0vZuqpnQWH682wK 9AjclevV1whVjHMvnBVfeMp/2wBNRJ8lq0j1U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=MRmVuOt/X/5BcyN7zW3o1iqaGzYADp3+qu3NWVPlansyDd+bD6/M5Uzl5b6wZVBJOQ 4o3eKzY2c3o5+kSceWY4rUP8ZpYP/rtYwIP8QcNvtVZO59cljxnKZs2Z06e+bd6srGIA WVkooLQAhHxeGlPRLo+DfAkJUEBVtmfAImjAY= Received: by 10.90.12.19 with SMTP id 19mr3199213agl.96.1258590284428; Wed, 18 Nov 2009 16:24:44 -0800 (PST) Received: from fortitudo (nat09.metaweb.com [208.68.111.136]) by mx.google.com with ESMTPS id 6sm12307yxg.12.2009.11.18.16.24.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Nov 2009 16:24:43 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo.i-did-not-set--mail-host-address--so-tickle-me) id 7091 by fortitudo (DragonFly Mail Agent) Wed, 18 Nov 2009 16:24:42 -0800 From: Alexander Botero-Lowry To: Stewart Smith , Carl Worth In-Reply-To: <20091118234527.GO9315@flamingspork.com> References: <874oorfozb.fsf@yoom.home.cworth.org> <20091118234527.GO9315@flamingspork.com> Date: Wed, 18 Nov 2009 16:24:42 -0800 Message-ID: <86vdh7cqet.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Mac OS X/Darwin compatibility issues X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 00:24:55 -0000 On Thu, 19 Nov 2009 10:45:28 +1100, Stewart Smith wrote: > On Wed, Nov 18, 2009 at 11:27:20PM +0100, Carl Worth wrote: > > Yes. I knew I was "cheating" by using some GNU extensions here. I'm > > happy to accept portability patches for these things, but it's hard for > > me to get excited about writing them myself. > > > > Care to take a whack at these? > > http://www.gnu.org/software/gnulib/ > > could be a partial answer. > Why add yet another dependency for a couple of functions? Especially considering how notmuch already depends on glib which includes portability functions for various things. alex From cworth@cworth.org Wed Nov 18 16:25:50 2009 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 C454D431FC0; Wed, 18 Nov 2009 16:25:50 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ifeMnPN6BzE3; Wed, 18 Nov 2009 16:25:50 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 32941431FBC; Wed, 18 Nov 2009 16:25:49 -0800 (PST) From: Carl Worth To: Keith Packard , notmuch@notmuchmail.org In-Reply-To: References: <1258493565-13508-1-git-send-email-keithp@keithp.com> <87k4xoqgnl.fsf@yoom.home.cworth.org> Date: Thu, 19 Nov 2009 01:25:34 +0100 Message-ID: <87y6m35pj5.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 00:25:51 -0000 On Wed, 18 Nov 2009 09:45:01 -0800, Keith Packard wrote: > On Wed, 18 Nov 2009 02:19:26 -0800, Carl Worth wrote: > You can use kill-buffer directly (C-X k); adding a new special binding > for that command seems unnecessary to me. Well, that's "Control, X, K, Enter", so quite a bit harder than just 'x'. :-) But fine, I could move my convenience for "kill buffer" to just 'k'. I think I'd like to see a better mapping for "archive and kill buffer" to a key other than 'x'. Any ideas? > My mail flow doesn't involve moving directly from one message to the > next; I go back to the index after reviewing each one; there isn't a way > to mark a buffer as read/archived and *not* view another message OK, that's definitely different than me. Let me at least explain a couple of parts of my flow, (not intended to try to convince you to use it---just to explain): 1. Before I go into "read a bunch of messages with spacebar" mode I first arrange for filtered search results that I know I want to read all together. Most frequently this involves bringing up the inbox, and then hitting 't' for filter-to-tag and choosing a tag of mail that's all interesting, (like the "to-me" tag that gets applied automatically[*] to all mail addressed to me individually). 2. When I archive a thread with 'a', I'm not necessarily always planning to read the next message (just because notmuch is presenting it to me). And if not, I'll just press 'x' right away. a. An important point here is that that "undesired" presentation of a message results in no state changes. In far too many other email programs I've used, deleting one message causes another one to be displayed and *that* message gets immediately marked "unread" forcing me to read it immediately or risk losing it. Not nice. b. Sometimes, even if I wasn't really planning in advance to read the mail, just having it appear does encourage me to read it, (but with no risk if I choose not to---unlike the broken mailer I described above). So here's one way that notmuch encourages me to mow through my pending mail quickly. 3. There's one entirely different mode I use. The above is for a collection of "mostly interesting" messages where I want to at least see them all. The other mode is "mostly uninteresting" messages where I can take care of most everything from the search view, (and maybe just pop into one or two messages). Here your, 'archive and exit' key might be useful, but my 'exit without archiving' works fine too. The reason is that after I look at the one or two interesting messages, the next thing I'll do is to archive away all the messages from the search view. Of course, for this I need an "archive all" binding that doesn't exist yet. And I also really need to fix the Xapian bug so that archiving 100 threads doesn't take *forever* like it does currently. Anyway, thanks for letting me ramble a bit about how I deal with mail. -Carl [*] I'm currently getting "automatic" tags via a script (which I've named notmuch-poll) that calls "notmuch new" and then calls a bunch of "notmuch tag" commands not unlike the following: notmuch tag +notmuch to:notmuchmail.org and not tag:notmuch From cworth@cworth.org Wed Nov 18 16:31:39 2009 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 8D3D3431FC0; Wed, 18 Nov 2009 16:31:39 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 gWHHkHIbO-6l; Wed, 18 Nov 2009 16:31:38 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 64CDF431FBC; Wed, 18 Nov 2009 16:31:38 -0800 (PST) From: Carl Worth To: Joshua Roys , notmuch@notmuchmail.org In-Reply-To: <1258573402-16750-1-git-send-email-roysjosh@gmail.com> References: <1258573402-16750-1-git-send-email-roysjosh@gmail.com> Date: Thu, 19 Nov 2009 01:31:24 +0100 Message-ID: <87ws1n5p9f.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Fix a compile warning under gcc-4.4.1 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 00:31:39 -0000 On Wed, 18 Nov 2009 14:43:22 -0500, Joshua Roys wrote: > --- > Hello, > This fixes the following for me: Thanks so much for the report and patch, Joshua. This bug was recently fixed in a commit pushed out to the notmuch repository. Happy hacking, -Carl From cworth@cworth.org Wed Nov 18 16:32:11 2009 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 55B69431FC0; Wed, 18 Nov 2009 16:32:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 M+fRQsA6oIX1; Wed, 18 Nov 2009 16:32:10 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4779C431FBC; Wed, 18 Nov 2009 16:32:10 -0800 (PST) From: Carl Worth To: Keith Packard , notmuch@notmuchmail.org In-Reply-To: <1258574173-19911-1-git-send-email-keithp@keithp.com> References: <1258574173-19911-1-git-send-email-keithp@keithp.com> Date: Thu, 19 Nov 2009 01:31:56 +0100 Message-ID: <87vdh75p8j.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Filter out carriage-returns in show and reply output. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 00:32:11 -0000 On Wed, 18 Nov 2009 11:56:13 -0800, Keith Packard wrote: > Thanks, windows mail clients. Very nice to have. Pushed. -Carl From aperez@igalia.com Wed Nov 18 16:32:44 2009 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 6B71B431FBF for ; Wed, 18 Nov 2009 16:32:44 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 joOtlurkbY1w for ; Wed, 18 Nov 2009 16:32:43 -0800 (PST) Received: from alice.connectical.com (alice.connectical.com [208.89.208.235]) by olra.theworths.org (Postfix) with ESMTP id B3BAA431FBC for ; Wed, 18 Nov 2009 16:32:43 -0800 (PST) Received: (qmail 17967 invoked from network); 19 Nov 2009 00:32:42 -0000 Received: from 97.126.60.213.dynamic.mundo-r.com (HELO hikari.localdomain) (aperez@213.60.126.97) by alice.connectical.com with ESMTPA; 19 Nov 2009 00:32:42 -0000 Received: from hikari (localhost [127.0.0.1]) by hikari.localdomain (Postfix) with ESMTP id DF16631DCB60 for ; Thu, 19 Nov 2009 01:32:40 +0100 (CET) Date: Thu, 19 Nov 2009 01:32:30 +0100 From: Adrian Perez de Castro To: notmuch@notmuchmail.org Message-ID: <20091119013230.5a9c29e5@hikari> Organization: Igalia X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.3; x86_64-redhat-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAADBQTFRFBwcHFhYWKCgoNzc3SEhIV1dXaGhod3d3iIiIlpaWqKiouLi4x8fH2NjY5+fn/v7+rSjDkgAAAjVJREFUOE9l07tvE0EQwOHfrkV9O+eko7g701BBfECJsIigT2IpooIqaSiRUEB0REj00FBQgYSCkhry+gecUPJybJeIxLumTbilsH2PMNXufDOa3ZVW+1JkpbUmD/8+vXR3c7or4Gz93mH309Kz8/C9/RQge7VfhW/LW+PF8IkrQ7Z6OKmQr1tl+LU/yWP9mxJka9O88fZHPwf/7u0kLyCnX3I4fQhgjAgIfi+HHw5A1Y2ggIMcFKAEnRoL0M3BosI4TI2IATjuT8DvSNJoNNJgkIhxlr9TUHeSpDnfohlIrMBlU+BGmsZqfr69FMfGMw4NoG835+J62riWyjQ/uXlTQjNUIoYegMsBM0pCD8oDas7n4HQsBghXFxJTW42KDs+4XLfjsN0wOYgABqARjMKIHIaAQnmHjsI5Cvi9Cf6k03OoWBkpIP3Q7354+dEimFBKHbMP9oKjwfd9gbrxR5KDToczK4uPF8UgNomKU2GaENRi77zyDKICxKBS4xXYbONPMQMdYZTBwMiMWiUg9g6UJ3OBogzjV8E7sBVwyvfAOYdQhsABzuOxI1MGZbs98Q6Md5UOfbbR2R0eWOesrnRw5ajT6f60LrNhWIHZpBnUWv2s14ukArWWTqTes3YQxRXgFkcMu70TPYqqUBs0YwmO967OVIdTG4bY4a7WLaqgLm5vbHdH5np0Dri//fmg7y8scB4u3+zsuNlH0X+g19bby69b+TYH6isvns8VdQWgxj9tHP8AR5/hSdYqkwsAAAAASUVORK5CYII= Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/hI/8O=bEOMJudOaPx/zdDH4"; protocol="application/pgp-signature" Subject: [notmuch] Fw: Introducing myself X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 00:32:44 -0000 --Sig_/hI/8O=bEOMJudOaPx/zdDH4 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable (Re-injecting this one in the list... it was my fault in reality because I sent two copies, one to the list and another to Carl, so he replied to me directly. It would have been enough to send my mail to the list -- I am sorry a lot for the noise) Begin forwarded message: Date: Thu, 19 Nov 2009 00:58:38 +0100 From: Carl Worth To: Adrian Perez de Castro Subject: Re: [notmuch] Introducing myself On Wed, 18 Nov 2009 16:47:06 +0100, Adrian Perez de Castro wrote: > On Wed, 18 Nov 2009 03:15:31 -0800, Carl wrote: > > I tried the "notmuch.el" Emacs mode, and have just installed Emacs in > order to be able to try it out. As I have been using Vim for the last ~9 > years, probably that was the reason why I found it not very comfortable. Wow, you're brave to give it a shot. And I'm glad that you were able to work your way through it. > I showed the thing to my work mates this morning and most of them said > that they would like to have Mutt-like keybindings *with* Not Much's > search and tagging running behind it. Any long-time mutt users want to suggest keybindings? I've mostly been making stuff up as I go (with some influence from sup), but I think it's early enough that I could still re-train my muscles. Get your votes in now for your favorite keybindings. > I also think it would be great to have a curses-based UI, so this may > be a good opportunity to start doing some serious coding with it in my > spare time. Sounds great. I would feel just fine seeing lots of interfaces built up around the notmuch search and tagging. I do hope people doing custom interfaces will consider implementing some of the things that I happen to consider part of the "notmuch experience", (viewing an entire, nested thread at once with citations/signatures elided---this feature comes exactly from sup; and my magic space-bar for reading lots of mail with only one key---though the most important part here is to not archive a message until it is paged *off* the screen---as opposed to many emailers that mark a message as "read" as soon as any of the message appears on the screen). Of course, if you're doing your own interface, then you get to do whatever you want. But I hope you might at least consider those ideas. Happy hacking! -Carl --=20 Adrian Perez de Castro Igalia - Free Software Engineering --Sig_/hI/8O=bEOMJudOaPx/zdDH4 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (GNU/Linux) iEYEARECAAYFAksEkicACgkQkcVZ2+TJEjuMIACfd4GFhEiHDhj1r7Vjz/CalcBJ ymcAnA/ZaqxKvdhmvrCbQMUvWVnp3e9+ =1tVh -----END PGP SIGNATURE----- --Sig_/hI/8O=bEOMJudOaPx/zdDH4-- From cworth@cworth.org Wed Nov 18 16:35:09 2009 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 67FE1431FC0; Wed, 18 Nov 2009 16:35:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 MQAKwGb5WXTC; Wed, 18 Nov 2009 16:35:08 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 80A9C431FBC; Wed, 18 Nov 2009 16:35:08 -0800 (PST) From: Carl Worth To: Keith Packard , notmuch@notmuchmail.org In-Reply-To: <1258580758-24474-1-git-send-email-keithp@keithp.com> References: <1258580758-24474-1-git-send-email-keithp@keithp.com> Date: Thu, 19 Nov 2009 01:34:54 +0100 Message-ID: <87tywr5p3l.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Make reply/show/tag all require at least one search term X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 00:35:09 -0000 On Wed, 18 Nov 2009 13:45:58 -0800, Keith Packard wrote: > In particular, notmuch tag -inbox "" tended to take a long time to > run, happened if you hit 'a' on a blank line in the search view and > probably didn't have the desired effect. Another nice fix. Thanks again. This is pushed. -Carl From jan@iptel.org Wed Nov 18 16:37:31 2009 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 710FC431FBF for ; Wed, 18 Nov 2009 16:37:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 FxVeyo4NEuzX for ; Wed, 18 Nov 2009 16:37:30 -0800 (PST) Received: from mail.iptel.org (smtp.iptel.org [213.192.59.67]) by olra.theworths.org (Postfix) with ESMTP id ACF0D431FBC for ; Wed, 18 Nov 2009 16:37:30 -0800 (PST) Received: by mail.iptel.org (Postfix, from userid 103) id 1EAA63707E1; Thu, 19 Nov 2009 01:37:27 +0100 (CET) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.iptel.org (Postfix) with ESMTPSA id B33C03707BE for ; Thu, 19 Nov 2009 01:37:26 +0100 (CET) Received: by x61s.janakj (Postfix, from userid 1000) id DF4B3440655; Thu, 19 Nov 2009 01:37:25 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Thu, 19 Nov 2009 01:37:25 +0100 Message-Id: <1258591045-16494-1-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] Makefile: Make object targets depend on Makefiles X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 00:37:31 -0000 All objects need to be recompiled when any of the Makefiles changes, so we make them all depend on all the Makefiles. Signed-off-by: Jan Janak --- Makefile | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 96aaa73..2787aff 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,9 @@ CFLAGS=-O2 extra_cflags = `pkg-config --cflags glib-2.0 gmime-2.4 talloc` extra_cxxflags = `xapian-config --cxxflags` +all_deps = Makefile Makefile.local Makefile.config \ + lib/Makefile lib/Makefile.local + # Now smash together user's values with our extra values override CFLAGS += $(WARN_FLAGS) $(extra_cflags) override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags) @@ -21,19 +24,19 @@ include lib/Makefile.local # And get user settings from the output of configure include Makefile.config -%.o: %.cc +%.o: %.cc $(all_deps) $(CXX) -c $(CFLAGS) $(CXXFLAGS) $< -o $@ -%.o: %.c +%.o: %.c $(all_deps) $(CC) -c $(CFLAGS) $< -o $@ -.deps/%.d: %.c +.deps/%.d: %.c $(all_deps) @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ -.deps/%.d: %.cc +.deps/%.d: %.cc $(all_deps) @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CXX) -M $(CPPFLAGS) $(CXXFLAGS) $< > $@.$$$$; \ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ -- 1.6.3.3 From keithp@keithp.com Wed Nov 18 16:43:24 2009 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 75AF6431FC0 for ; Wed, 18 Nov 2009 16:43:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Wfu-wHj0+CxM for ; Wed, 18 Nov 2009 16:43:23 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 97CAD431FBF for ; Wed, 18 Nov 2009 16:43:23 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id C38F3B9404B; Wed, 18 Nov 2009 16:43:22 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uz4avRnoGR2I; Wed, 18 Nov 2009 16:43:19 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 95E6EB9402F; Wed, 18 Nov 2009 16:43:19 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 8A3A2B88003; Wed, 18 Nov 2009 16:43:19 -0800 (PST) From: Keith Packard To: Carl Worth , notmuch@notmuchmail.org In-Reply-To: <87y6m35pj5.fsf@yoom.home.cworth.org> References: <1258493565-13508-1-git-send-email-keithp@keithp.com> <87k4xoqgnl.fsf@yoom.home.cworth.org> <87y6m35pj5.fsf@yoom.home.cworth.org> Date: Wed, 18 Nov 2009 16:43:18 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 00:43:24 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Thu, 19 Nov 2009 01:25:34 +0100, Carl Worth wrote: > On Wed, 18 Nov 2009 09:45:01 -0800, Keith Packard wro= te: > > On Wed, 18 Nov 2009 02:19:26 -0800, Carl Worth wrot= e: > > You can use kill-buffer directly (C-X k); adding a new special binding > > for that command seems unnecessary to me. >=20 > Well, that's "Control, X, K, Enter", so quite a bit harder than just > 'x'. :-) I'd forgotten about the 'q' binding, which used to be the same as 'x' and is now different. Similar to how fdisk differentiates between 'q'uit without saving changes and 'w'rite table to disk and exit. > But fine, I could move my convenience for "kill buffer" to just 'k'. You've got 'q' already :-) > I think I'd like to see a better mapping for "archive and kill buffer" > to a key other than 'x'. Any ideas? I'm up for almost anything; but I'd have to retrain my fingers to use it instead of 'x' :-) > 1. Before I go into "read a bunch of messages with spacebar" mode I > first arrange for filtered search results that I know I want to read > all together. I generally do the same, but don't read mail in time sequence. One of the reasons I like the threaded reading mode is that I don't *have* to read mail in time sequence as I can review a thread and see the time ordering of the messages within that. > 2. When I archive a thread with 'a', I'm not necessarily always planning > to read the next message (just because notmuch is presenting it to > me). And if not, I'll just press 'x' right away. Right, if you use the 'a' key to flip to a new message, you probably don't want to use 'x' on the final (and still essentially ignored) message. > Of course, for this I need an "archive all" binding that > doesn't exist yet. And I also really need to fix the Xapian bug so > that archiving 100 threads doesn't take *forever* like it does > currently. yes, please! I'd even be willing to wait at this point... =2D- keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLBJSnQp8BWwlsTdMRAmtPAJ0Rr8LJsShAhO+foO4DOYsL0KOQLwCfQdBG FQGvhpS+dFNK5SU5Lzwox1A= =ED0n -----END PGP SIGNATURE----- --=-=-=-- From cworth@cworth.org Wed Nov 18 16:46:03 2009 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 57FFB431FC0; Wed, 18 Nov 2009 16:46:03 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 5K+ndKzBOXmA; Wed, 18 Nov 2009 16:46:02 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 0D74D431FBC; Wed, 18 Nov 2009 16:46:02 -0800 (PST) From: Carl Worth To: Adrian Perez , notmuch@notmuchmail.org In-Reply-To: <1258589242-4871-1-git-send-email-aperez@igalia.com> References: <1258589242-4871-1-git-send-email-aperez@igalia.com> Date: Thu, 19 Nov 2009 01:45:47 +0100 Message-ID: <87skcb5olg.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Allow lone "not" search operators X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 00:46:03 -0000 On Thu, 19 Nov 2009 01:07:22 +0100, Adrian Perez wrote: > As suggested by Keith in FLAG_PURE_NOT allows for expressions like: > > notmuch search NOT tag:inbox Oh, fantastic! I guess I'd run into enough QueryParser bugs recently that I was willing to blame it without cause this time. And I *thought* I had looked carefully at all the QueryParser tags to choose all the useful ones, but clearly I missed this one. Anyway, thanks for the research and the fix. This is pushed now. Happy hacking, -Carl From cworth@cworth.org Wed Nov 18 16:50:47 2009 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 310EE431FC0; Wed, 18 Nov 2009 16:50:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 dax1k1G4914d; Wed, 18 Nov 2009 16:50:46 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E4886431FBC; Wed, 18 Nov 2009 16:50:45 -0800 (PST) From: Carl Worth To: "Aneesh Kumar K.V" , notmuch In-Reply-To: <878we376au.fsf@yoom.home.cworth.org> References: <87pr7f6fgp.fsf@linux.vnet.ibm.com> <878we376au.fsf@yoom.home.cworth.org> Date: Thu, 19 Nov 2009 01:50:31 +0100 Message-ID: <87hbsr72y0.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] How to list archived mails X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 00:50:47 -0000 On Thu, 19 Nov 2009 00:38:01 +0100, Carl Worth wrote: > On Wed, 18 Nov 2009 20:35:26 +0530, aneesh.kumar@linux.vnet.ibm.com (Aneesh Kumar K.V) wrote: > > Once i mark the mail as archived how do i search for them ? > > Right now with notmuch.el i am adding a tag "archive" when > > i am archiving the mail. I am just wondering is this the right > > way ? > > You might expect to be able to find all archived messages with: > > notmuch search not tag:inbox And now you can ignore everything else I said after this. Adrian Perez just discovered that we just weren't enabling an option in Xapian to allow this syntax to work. His commit is pushed, so now if you update your source *can* you use the above syntax and it should work just fine. Happy hacking, -Carl From cworth@cworth.org Wed Nov 18 16:52:06 2009 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 C282A431FC0; Wed, 18 Nov 2009 16:52:06 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 haI9EDumoZlB; Wed, 18 Nov 2009 16:52:06 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D70E2431FBC; Wed, 18 Nov 2009 16:52:05 -0800 (PST) From: Carl Worth To: Ingmar Vanhassel , notmuch@notmuchmail.org In-Reply-To: <1258584640-29221-1-git-send-email-ingmar@exherbo.org> References: <1258584640-29221-1-git-send-email-ingmar@exherbo.org> Date: Thu, 19 Nov 2009 01:51:51 +0100 Message-ID: <87fx8b72vs.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH 1/2] zsh: Initial zsh-completion for notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 00:52:06 -0000 On Wed, 18 Nov 2009 23:50:40 +0100, Ingmar Vanhassel wrote: > Signed-off-by: Ingmar Vanhassel > --- > _notmuch | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 74 insertions(+), 0 deletions(-) > create mode 100644 _notmuch Looks nice. Could you also add a Makefile.local target to install this in the right place so that it actually does something? And I'd like it to have a more descriptive name in the source tree (such as notmuch-completion.zsh). Thanks, -Carl From aperez@igalia.com Wed Nov 18 16:57:11 2009 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 9C1F7431FBF for ; Wed, 18 Nov 2009 16:57:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 fU-v00vpw+PA for ; Wed, 18 Nov 2009 16:57:11 -0800 (PST) Received: from alice.connectical.com (alice.connectical.com [208.89.208.235]) by olra.theworths.org (Postfix) with ESMTP id 04869431FBC for ; Wed, 18 Nov 2009 16:57:11 -0800 (PST) Received: (qmail 13555 invoked from network); 19 Nov 2009 00:57:09 -0000 Received: from 97.126.60.213.dynamic.mundo-r.com (HELO hikari.localdomain) (aperez@213.60.126.97) by alice.connectical.com with ESMTPA; 19 Nov 2009 00:57:09 -0000 Received: from hikari (localhost [127.0.0.1]) by hikari.localdomain (Postfix) with ESMTP id 7712C31DCB60 for ; Thu, 19 Nov 2009 01:57:08 +0100 (CET) Date: Thu, 19 Nov 2009 01:57:07 +0100 From: Adrian Perez de Castro To: notmuch@notmuchmail.org Message-ID: <20091119015707.1ab22e66@hikari> In-Reply-To: <20091119013230.5a9c29e5@hikari> References: <20091119013230.5a9c29e5@hikari> Organization: Igalia X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.3; x86_64-redhat-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAADBQTFRFBwcHFhYWKCgoNzc3SEhIV1dXaGhod3d3iIiIlpaWqKiouLi4x8fH2NjY5+fn/v7+rSjDkgAAAjVJREFUOE9l07tvE0EQwOHfrkV9O+eko7g701BBfECJsIigT2IpooIqaSiRUEB0REj00FBQgYSCkhry+gecUPJybJeIxLumTbilsH2PMNXufDOa3ZVW+1JkpbUmD/8+vXR3c7or4Gz93mH309Kz8/C9/RQge7VfhW/LW+PF8IkrQ7Z6OKmQr1tl+LU/yWP9mxJka9O88fZHPwf/7u0kLyCnX3I4fQhgjAgIfi+HHw5A1Y2ggIMcFKAEnRoL0M3BosI4TI2IATjuT8DvSNJoNNJgkIhxlr9TUHeSpDnfohlIrMBlU+BGmsZqfr69FMfGMw4NoG835+J62riWyjQ/uXlTQjNUIoYegMsBM0pCD8oDas7n4HQsBghXFxJTW42KDs+4XLfjsN0wOYgABqARjMKIHIaAQnmHjsI5Cvi9Cf6k03OoWBkpIP3Q7354+dEimFBKHbMP9oKjwfd9gbrxR5KDToczK4uPF8UgNomKU2GaENRi77zyDKICxKBS4xXYbONPMQMdYZTBwMiMWiUg9g6UJ3OBogzjV8E7sBVwyvfAOYdQhsABzuOxI1MGZbs98Q6Md5UOfbbR2R0eWOesrnRw5ajT6f60LrNhWIHZpBnUWv2s14ukArWWTqTes3YQxRXgFkcMu70TPYqqUBs0YwmO967OVIdTG4bY4a7WLaqgLm5vbHdH5np0Dri//fmg7y8scB4u3+zsuNlH0X+g19bby69b+TYH6isvns8VdQWgxj9tHP8AR5/hSdYqkwsAAAAASUVORK5CYII= Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/1qwewv7g0WBV+i+el+Mq2Bf"; protocol="application/pgp-signature" Subject: Re: [notmuch] Fw: Introducing myself X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 00:57:11 -0000 --Sig_/1qwewv7g0WBV+i+el+Mq2Bf Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 19 Nov 2009 01:32:30 +0100, Adrian wrote: > (Re-injecting this one in the list... it was my fault in reality because I > sent two copies, one to the list and another to Carl, so he replied to me > directly. It would have been enough to send my mail to the list -- I am > sorry a lot for the noise) >=20 > Begin forwarded message: >=20 > Date: Thu, 19 Nov 2009 00:58:38 +0100 > From: Carl Worth > To: Adrian Perez de Castro > Subject: Re: [notmuch] Introducing myself >=20 >=20 > On Wed, 18 Nov 2009 16:47:06 +0100, Adrian Perez de Castro > wrote: > > On Wed, 18 Nov 2009 03:15:31 -0800, Carl wrote: > > > > I tried the "notmuch.el" Emacs mode, and have just installed Emacs in > > order to be able to try it out. As I have been using Vim for the last ~9 > > years, probably that was the reason why I found it not very comfortable. >=20 > Wow, you're brave to give it a shot. And I'm glad that you were able to > work your way through it. After trying things a bit with some copied mailboxes, I am planning now on moving away from Claws-Mail... so Emacs will be sitting here for a while :D > > I also think it would be great to have a curses-based UI, so this may > > be a good opportunity to start doing some serious coding with it in my > > spare time. >=20 > Sounds great. I would feel just fine seeing lots of interfaces built up > around the notmuch search and tagging. Me too, and all sharing the same index. > [...] I do hope people doing custom > interfaces will consider implementing some of the things that I happen > to consider part of the "notmuch experience", (viewing an entire, nested > thread at once with citations/signatures elided---this feature comes > exactly from sup; and my magic space-bar for reading lots of mail with > only one key---though the most important part here is to not archive a > message until it is paged *off* the screen---as opposed to many emailers > that mark a message as "read" as soon as any of the message appears on > the screen). >=20 > Of course, if you're doing your own interface, then you get to do > whatever you want. But I hope you might at least consider those ideas. I am not totally sure about the elusion of citation and signatures, but that can be an user setting. My favourite feature is not marking messages as read until one decides to do so. For the rest of the lot, I agree that they should be there as well. Best regards, [1] http://fdm.sourceforge.net/ --=20 Adrian Perez de Castro Igalia - Free Software Engineering --Sig_/1qwewv7g0WBV+i+el+Mq2Bf Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (GNU/Linux) iEYEARECAAYFAksEl+MACgkQkcVZ2+TJEjs1kACfQ9ZPm7m2pM2ZVRWt0OW8DPAc LmQAnjqWAjc8wjM+BGexUxiKClmTuZiu =MZuJ -----END PGP SIGNATURE----- --Sig_/1qwewv7g0WBV+i+el+Mq2Bf-- From ingmar@exherbo.org Wed Nov 18 17:00:57 2009 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 67349431FBF for ; Wed, 18 Nov 2009 17:00:57 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 RRCUbNuIas-U for ; Wed, 18 Nov 2009 17:00:56 -0800 (PST) Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by olra.theworths.org (Postfix) with ESMTP id EAE60431FBC for ; Wed, 18 Nov 2009 17:00:55 -0800 (PST) Received: from [83.101.72.69] (helo=localhost) by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NAvOI-0005hS-HQ; Thu, 19 Nov 2009 01:00:55 +0000 Content-Type: text/plain; charset=utf8 From: Ingmar Vanhassel To: Carl Worth In-reply-to: <87fx8b72vs.fsf@yoom.home.cworth.org> References: <1258584640-29221-1-git-send-email-ingmar@exherbo.org> <87fx8b72vs.fsf@yoom.home.cworth.org> Date: Thu, 19 Nov 2009 02:00:48 +0100 Message-Id: <1258592310-sup-6625@cannonball> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Cc: notmuch Subject: Re: [notmuch] [PATCH 1/2] zsh: Initial zsh-completion for notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 01:00:57 -0000 Excerpts from Carl Worth's message of Thu Nov 19 01:51:51 +0100 2009: > On Wed, 18 Nov 2009 23:50:40 +0100, Ingmar Vanhassel wrote: > > Signed-off-by: Ingmar Vanhassel > > --- > > _notmuch | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > 1 files changed, 74 insertions(+), 0 deletions(-) > > create mode 100644 _notmuch > > Looks nice. Could you also add a Makefile.local target to install this > in the right place so that it actually does something? Sure, any suggestions on the name? Or did you mean to add it to the install target? > And I'd like it to have a more descriptive name in the source tree (such > as notmuch-completion.zsh). Alright, will do. I just named it what it'll be installed as, but either works. > Thanks, > > -Carl -- Exherbo KDE, X.org maintainer From cworth@cworth.org Wed Nov 18 17:03:31 2009 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 C5B47431FC2; Wed, 18 Nov 2009 17:03:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 rBxDkWoglNXZ; Wed, 18 Nov 2009 17:03:31 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id DFC49431FBF; Wed, 18 Nov 2009 17:03:30 -0800 (PST) From: Carl Worth To: "Jeffrey C. Ollie" , Not Much Mail In-Reply-To: <1258569114-16034-1-git-send-email-jeff@ocjtech.us> References: <1258569114-16034-1-git-send-email-jeff@ocjtech.us> Date: Thu, 19 Nov 2009 02:03:16 +0100 Message-ID: <87einv72cr.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] RPM spec file X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 01:03:32 -0000 On Wed, 18 Nov 2009 12:31:53 -0600, "Jeffrey C. Ollie" wrote: > I prefere managing all of the software on my system with RPM, so I > came up with a quick spec file for building RPMS. Once notmuch > settles down and I continue using it I may submit notmuch to Fedora as > an official package. If you'd like your own RPMS build your own, I > don't plan on offering a repository of binary packages. This sounds great, Jeffrey. What makes the most sense for this file? Shall we just leave it in the central repository? Or put it in its own rpm branch? I'm open to your suggestions here. -Carl From cworth@cworth.org Wed Nov 18 17:06:56 2009 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 25380431FC0; Wed, 18 Nov 2009 17:06:56 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 krKsjJWkmAJM; Wed, 18 Nov 2009 17:06:55 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C5119431FAE; Wed, 18 Nov 2009 17:06:54 -0800 (PST) From: Carl Worth To: Alexander Botero-Lowry , notmuch@notmuchmail.org In-Reply-To: <87zl6j94p6.fsf@yoom.home.cworth.org> References: <86aayk2rbj.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> <87zl6j94p6.fsf@yoom.home.cworth.org> Date: Thu, 19 Nov 2009 02:06:40 +0100 Message-ID: <87d43f7273.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] request for pull X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 01:06:56 -0000 On Wed, 18 Nov 2009 08:29:41 -0800, Carl Worth wrote: > On Wed, 18 Nov 2009 00:02:56 -0800, Alexander Botero-Lowry wrote: > > The following changes since commit e8c9c3e6a534fc6c2919c2c1de63cea7250eb488: > > > > are available in the git repository at: > > > > git://alexbl.net/notmuch.git master ... > Well, that's what I have a "todo" tag for. So I'll look at this later > when I've got internet access again. (But I believe the first commit is > already addressed independently.) > > BTW, thanks for the patches! Looks like by the time I got back there's nothing left to get here, (presumably the changes got pushed up separately). But I've at least got your repository as a "git remote" now, and after I'm done travelling this week I'll have a stable internet connection and pull requests will be easier to handle. Happy hacking, -Carl From cworth@cworth.org Wed Nov 18 17:08:30 2009 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 D87DC431FC7; Wed, 18 Nov 2009 17:08:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 6tlv959k5CTc; Wed, 18 Nov 2009 17:08:30 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id AEF69431FAE; Wed, 18 Nov 2009 17:08:29 -0800 (PST) From: Carl Worth To: Mikhail Gusarov , notmuch@notmuchmail.org In-Reply-To: <1258491078-29658-1-git-send-email-dottedmag@dottedmag.net> References: <1258491078-29658-1-git-send-email-dottedmag@dottedmag.net> Date: Thu, 19 Nov 2009 02:08:15 +0100 Message-ID: <87bpiz724g.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Handle rename of message file X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 01:08:31 -0000 On Wed, 18 Nov 2009 02:51:18 +0600, Mikhail Gusarov wrote: > If message file has been renamed, just update filename in the DB. > > Signed-off-by: Mikhail Gusarov I believe you said in IRC that this patch is not ready yet. I'd love to hear more from you on any experiments/ideas you have in this area. It would be a really nice feature to have, (particularly for people who are experimenting with notmuch while still using some other primary email program that keeps fiddling with the filenames). -Carl From dottedmag@dottedmag.net Wed Nov 18 17:14:49 2009 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 782F0431FAE for ; Wed, 18 Nov 2009 17:14:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 m2SQx2dY4mjr for ; Wed, 18 Nov 2009 17:14:48 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id B91AA431FC7 for ; Wed, 18 Nov 2009 17:14:48 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 479E18C009; Thu, 19 Nov 2009 02:14:47 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NAvbg-0005o9-P5; Thu, 19 Nov 2009 07:14:44 +0600 From: Mikhail Gusarov To: Carl Worth References: <1258491078-29658-1-git-send-email-dottedmag@dottedmag.net> <87bpiz724g.fsf@yoom.home.cworth.org> Date: Thu, 19 Nov 2009 07:14:41 +0600 In-Reply-To: <87bpiz724g.fsf@yoom.home.cworth.org> (Carl Worth's message of "Thu, 19 Nov 2009 02:08:15 +0100") Message-ID: <87tywr2u4e.fsf@vertex.dottedmag> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] Handle rename of message file X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 01:14:49 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Twas brillig at 02:08:15 19.11.2009 UTC+01 when cworth@cworth.org did gyre = and gimble: CW> I believe you said in IRC that this patch is not ready yet. Yes. CW> I'd love to hear more from you on any experiments/ideas you have in CW> this area. It would be a really nice feature to have, (particularly CW> for people who are experimenting with notmuch while still using CW> some other primary email program that keeps fiddling with the CW> filenames). Did not have time to work on it further yet. The only dumb idea I have in mind is hardlinking all mail to separate directory in order to make a "pristine copy" which does not change as time goes. This directory could be cleaned up: if some file has only 1 link, then it was deleted from main mail spool and should be deleted From=20copy too. =2D-=20 http://fossarchy.blogspot.com/ --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAEBAgAGBQJLBJwBAAoJEJ0g9lA+M4iI+TQP/3qUMxvh5n5ewvMHetcz6cIg iU/suxI6DFAUImRaOBJvTrYjV6agSgXnTh3Q00J7pE7Jlm/x9ThVueVEG3VUJZfV mql5oRJQAKYy/QqsVfjeMC/Zf80QbACpeC9T92J8pvN/yD/WapzzV4hflZr6Cs8W CBeZZwXMkhl2qCRvJPbjzXhC6lUKF8uX1TWAAdxboTbwAKLTOYJEd8bV9OIHaCgV iMMcCf/Vhfn+EWB2VXu6xA2kppbwNhxsjWamvcnjCNSFS10yIJzornKg+RnnhPiK OagWjmGqS6wLKCimx/efU2o5KSaWJgGridWAAdbdyFlQsXFGsiKwsnQJxnjZfyxf tZHbJZ3Y93bU1glb4Xi/DeYZ4bUz0kyCqBUskTZEVkx9OrKtkMrbkLA1L/D1ZZ3k 2b7OY3Nn6FfpIn364JsjjcR4ocZDXbuLVOEAoOFcGn5za+kOGGLOBAbcoYU9+6E1 YaEg4OTap0hmGPpeYzS/I4Q8CX674+ecldiAxTt0lPOpbI/0J+kae60w14XKC+DB dCV6+37Hrw80JZ7beTc/eElEPo5O/wy1gkgh56uPAwuiavZXEhHiuOseeJC7iOk9 KV9hJ+wv1KORZ9lv64x8SvSO4JcINsHOjJpR815AWVHLRr92ZSkfmGbnWdFsYSXX Em5ahwY8Cqi7oZZVebv+ =kWdd -----END PGP SIGNATURE----- --=-=-=-- From alex.boterolowry@gmail.com Wed Nov 18 17:16:08 2009 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 20FDC431FCB for ; Wed, 18 Nov 2009 17:16:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 SvxW1mSAiuNS for ; Wed, 18 Nov 2009 17:16:07 -0800 (PST) Received: from mail-gx0-f221.google.com (mail-gx0-f221.google.com [209.85.217.221]) by olra.theworths.org (Postfix) with ESMTP id 8A962431FAE for ; Wed, 18 Nov 2009 17:16:07 -0800 (PST) Received: by gxk21 with SMTP id 21so1611563gxk.10 for ; Wed, 18 Nov 2009 17:16:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :date:message-id:x-mailer; bh=OXwWeGmsa6u0ti/prKSwxP4Ott3nilbE01/77WF5pXI=; b=NpypCSWqkXWY0yXVmbAnD2H6iGumhHHzcIUHXy6uyo0qA9nCNtoEAl3z5+IQuXHDOu hfcf8YjxFkbdOT1di/UuhAHEbQlMTwbuRiLSGc77/F2aHyk4Sd409Lh7SoEqCKRoDeBD +Nd74k5Ujd9gArvXxB5nikX9SnCpbnKVScKF4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=TUNc8YgCLTl/1+Y7WOW1NsKCGKUNPelL1++OYsvf4rAVDW+gOwEwfQtcucLlPY/o0g o2SJywzAD7WNGwtgQ+JMF3bmaP05gHyDa+NeeR62Ptbpx2KwQ1khAifUSloPu5Xp0aiB p8d4ATKqH8OxI2y8whMpy1TVRP4sScmCLaO5I= Received: by 10.101.202.1 with SMTP id e1mr1500030anq.69.1258593367171; Wed, 18 Nov 2009 17:16:07 -0800 (PST) Received: from fortitudo (nat09.metaweb.com [208.68.111.136]) by mx.google.com with ESMTPS id 9sm29874yxf.41.2009.11.18.17.16.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Nov 2009 17:16:06 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo) id 70a8 by fortitudo (DragonFly Mail Agent) Wed, 18 Nov 2009 17:16:05 -0800 From: Alexander Botero-Lowry To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 17:15:43 -0800 Message-Id: <1258593343-7972-1-git-send-email-alex.boterolowry@gmail.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Checkin some command-only tcsh completions X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 01:16:08 -0000 --- notmuch-completion.tcsh | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) create mode 100644 notmuch-completion.tcsh diff --git a/notmuch-completion.tcsh b/notmuch-completion.tcsh new file mode 100644 index 0000000..c0d3a44 --- /dev/null +++ b/notmuch-completion.tcsh @@ -0,0 +1,2 @@ +set NOTMUCH_CMD=`notmuch help | awk '/\t/' | cut -f2 |grep -v '^$'` +complete notmuch 'p/1/$NOTMUCH_CMD/' -- 1.6.5.2 From ingmar@exherbo.org Wed Nov 18 17:45:47 2009 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 589FA431FBC for ; Wed, 18 Nov 2009 17:45:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 xi1Ul4dIfBHr for ; Wed, 18 Nov 2009 17:45:46 -0800 (PST) Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by olra.theworths.org (Postfix) with ESMTP id ABF44431FAE for ; Wed, 18 Nov 2009 17:45:46 -0800 (PST) Received: from [83.101.72.69] (helo=localhost) by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NAw5h-0005oe-Uf; Thu, 19 Nov 2009 01:45:46 +0000 From: Ingmar Vanhassel To: Date: Thu, 19 Nov 2009 02:45:44 +0100 Message-Id: <1258595144-15258-1-git-send-email-ingmar@exherbo.org> X-Mailer: git-send-email 1.6.5.2.433.g23cdb Subject: [notmuch] [PATCH] Makefile: Create elisp install directory explicitly X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 01:45:47 -0000 When doing a DESTDIR install, this directory likely won't exist, and installing notmuch.el will fail. See 0d4b5292 --- Makefile.local | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile.local b/Makefile.local index 27e42ba..6bc01a5 100644 --- a/Makefile.local +++ b/Makefile.local @@ -25,7 +25,7 @@ notmuch.1.gz: notmuch.1 install: all notmuch.1.gz for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \ - $(DESTDIR)/etc/bash_completion.d/ ; \ + $(DESTDIR)/$(prefix)/share/emacs/site-lisp/ $(DESTDIR)/etc/bash_completion.d/ ; \ do \ install -d $$d ; \ done ; -- 1.6.5.2.433.g23cdb From keithp@keithp.com Wed Nov 18 18:06:14 2009 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 53AA5431FBF for ; Wed, 18 Nov 2009 18:06:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 iVJKlNhevjVV for ; Wed, 18 Nov 2009 18:06:13 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 85302431FAE for ; Wed, 18 Nov 2009 18:06:13 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id DDAD7B9404B; Wed, 18 Nov 2009 18:06:12 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RLGF+ev2-qwi; Wed, 18 Nov 2009 18:06:10 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 20C02B9402F; Wed, 18 Nov 2009 18:06:10 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 169B1B88003; Wed, 18 Nov 2009 18:06:10 -0800 (PST) From: Keith Packard To: Carl Worth , Mikhail Gusarov , notmuch@notmuchmail.org In-Reply-To: <87bpiz724g.fsf@yoom.home.cworth.org> References: <1258491078-29658-1-git-send-email-dottedmag@dottedmag.net> <87bpiz724g.fsf@yoom.home.cworth.org> Date: Wed, 18 Nov 2009 18:06:09 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] Handle rename of message file X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 02:06:14 -0000 --=-=-= On Thu, 19 Nov 2009 02:08:15 +0100, Carl Worth wrote: > I'd love to hear more from you on any experiments/ideas you have in this > area. It would be a really nice feature to have, (particularly for > people who are experimenting with notmuch while still using some other > primary email program that keeps fiddling with the filenames). Checking for new files is easy; notmuch already does that, and so handling renames doesn't seem all that difficult. The hard part to me is detecting deleted messages; about the only thing I can imagine being at all efficient is to use inotify in a daemon. Starting that daemon up would entail scanning the database for all messages in a particular directory and then looking for those files to see if they were still around. Ick. -- keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLBKgRQp8BWwlsTdMRAtITAJ4viqi56Nt7vAP+uz0y1J4gI4eelgCfXdtO BfxwuhfJp5A07BzFFiozpds= =ZFBX -----END PGP SIGNATURE----- --=-=-=-- From dottedmag@dottedmag.net Wed Nov 18 18:11:24 2009 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 105F4431FBC for ; Wed, 18 Nov 2009 18:11:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 G7EbhQD1H9Rk for ; Wed, 18 Nov 2009 18:11:23 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id 12BF0431FAE for ; Wed, 18 Nov 2009 18:11:23 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 56B3A8C069 for ; Thu, 19 Nov 2009 03:11:22 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NAwUS-00060n-Ag for notmuch@notmuchmail.org; Thu, 19 Nov 2009 08:11:20 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org References: <1258491078-29658-1-git-send-email-dottedmag@dottedmag.net> <87bpiz724g.fsf@yoom.home.cworth.org> Date: Thu, 19 Nov 2009 08:11:12 +0600 In-Reply-To: (Keith Packard's message of "Wed, 18 Nov 2009 18:06:09 -0800") Message-ID: <87pr7f1cxr.fsf@vertex.dottedmag> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] Handle rename of message file X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 02:11:24 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Twas brillig at 18:06:09 18.11.2009 UTC-08 when keithp@keithp.com did gyre = and gimble: KP> Checking for new files is easy; notmuch already does that, and so KP> handling renames doesn't seem all that difficult. Except rename does not change mtime of file, and so it won't be picked up by 'notmuch new'. =2D-=20 http://fossarchy.blogspot.com/ --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAEBAgAGBQJLBKlAAAoJEJ0g9lA+M4iISNAP/jdbpi0z2wBWNY62gG+76/Rx DyNFPW7OF738/m2vZ5YYz8uSoAWOhdBT5aHrB5ZOR/skENzd4Ay41mkKMbHaYn1X 8VyrFFDYMXf+luvMEHoFfNvXtQVAiHNuaVDq1/zk1Lp58BbBa7Vkp3+zQQuugl4L p7hROwIiJ3hxNFn0IAeFoWhV09bvRdrY2OH0RnJxY4ooYbt8rv9JMxuWv1WZmUdk HjQ8fZWtkf4NomQxhnM51AFfrbU8vKfn9T0BwSvtGjsT426fVJE8s0Z3lmj/0tH4 enxkt3hIlttbuOARIrZ7BHwrCmsqaysX6WW5MjLjx015PFi2WsRI12cwEs5/zanr txb7ukm2RTtQXsbMIQxVhOA0Mwp1Ph9QM9Uq9UswQTvWDia3UQ2s9gKRdZWyzOh6 5o+yqGeP0kORsx/lBIYxk33m82breBvaAwnNKb9IUrzdRF3MthJ2kJqGKr/G16HS aXbLZ1Df1hVgot3UPjuc7VMcW2cZhxB6zbDLK/LXCV9lbEgHjP5y1Fm43f4cytAD iV2WPyxlo6qNaplQGHX/3Yrrn7xRuA2eF6MgZKEHhy8+/dk/y+4YW/vvsWsXPkuQ nbGkY4jtwpndqjAWzhKOg9TahkRR7Idv/JpDrKzu2NDZccclg2AP5duQF2dM8D6c TC/D3krYLLg9fhEfWbF4 =tOJB -----END PGP SIGNATURE----- --=-=-=-- From keithp@keithp.com Wed Nov 18 19:12:57 2009 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 29971431FBC for ; Wed, 18 Nov 2009 19:12:57 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 bOy5lBsTIy7p for ; Wed, 18 Nov 2009 19:12:56 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 095B5431FAE for ; Wed, 18 Nov 2009 19:12:55 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id E15EDB9404B; Wed, 18 Nov 2009 19:12:54 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id XNAiTOzyxEem; Wed, 18 Nov 2009 19:12:51 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id E9A37B9402F; Wed, 18 Nov 2009 19:12:50 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id D9CCBB88003; Wed, 18 Nov 2009 19:12:50 -0800 (PST) From: Keith Packard To: Mikhail Gusarov , notmuch@notmuchmail.org In-Reply-To: <87pr7f1cxr.fsf@vertex.dottedmag> References: <1258491078-29658-1-git-send-email-dottedmag@dottedmag.net> <87bpiz724g.fsf@yoom.home.cworth.org> <87pr7f1cxr.fsf@vertex.dottedmag> Date: Wed, 18 Nov 2009 19:12:50 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] Handle rename of message file X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 03:12:57 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Thu, 19 Nov 2009 08:11:12 +0600, Mikhail Gusarov wrote: >=20 > Twas brillig at 18:06:09 18.11.2009 UTC-08 when keithp@keithp.com did gyr= e and gimble: >=20 > KP> Checking for new files is easy; notmuch already does that, and so > KP> handling renames doesn't seem all that difficult. >=20 > Except rename does not change mtime of file, and so it won't be picked > up by 'notmuch new'. Yeah, good point -- notmuch new doesn't make sure each file it finds is already in the database. Again, some kind of inotify-based daemon would make that efficient, while starting up that daemon could take some time while the database was searched for new or missing files. Alternatively, we could record the contents of the directory after scanning it and then use that to track file changes. It seems like the current database just doesn't have enough information to make this tractable. =2D- keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLBLeyQp8BWwlsTdMRAmxLAJ4+BQImlglHeuavWEYbXTIx5/LjtQCg2cT5 et6G1DjH8pAlDxMzDFnspiY= =33s2 -----END PGP SIGNATURE----- --=-=-=-- From aneesh.kumar@linux.vnet.ibm.com Wed Nov 18 20:55:48 2009 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 421CE431FBC for ; Wed, 18 Nov 2009 20:55:48 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 IBcWxqFRjtjy for ; Wed, 18 Nov 2009 20:55:47 -0800 (PST) Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141]) by olra.theworths.org (Postfix) with ESMTP id 1639E431FAE for ; Wed, 18 Nov 2009 20:55:46 -0800 (PST) Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246]) by e23smtp08.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAJ4tj0I001237 for ; Thu, 19 Nov 2009 15:55:45 +1100 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAJ4qQsN856092 for ; Thu, 19 Nov 2009 15:52:26 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAJ4tis2031704 for ; Thu, 19 Nov 2009 15:55:45 +1100 Received: from localhost.localdomain (N20wks267599wss.in.ibm.com [9.124.31.111]) by d23av03.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAJ4th5Y031698; Thu, 19 Nov 2009 15:55:44 +1100 From: "Aneesh Kumar K.V" To: notmuch@notmuchmail.org Date: Thu, 19 Nov 2009 10:25:37 +0530 Message-Id: <1258606537-12566-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.6.5.2.74.g610f9 Subject: [notmuch] [PATCH] notmuch: Add search mode hook X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 04:55:48 -0000 This patch add notmuch-search-mode-hook and rename notmuch-show-hook to notmuch-show-mode-hook. This also runs notmuch-show-mode-hook when we enable notmuch-show-mode Signed-off-by: Aneesh Kumar K.V CC:Keith Packard --- notmuch.el | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/notmuch.el b/notmuch.el index 706e9f3..2f11b2b 100644 --- a/notmuch.el +++ b/notmuch.el @@ -640,7 +640,8 @@ view, (remove the \"inbox\" tag from each), with (use-local-map notmuch-show-mode-map) (setq major-mode 'notmuch-show-mode mode-name "notmuch-show") - (setq buffer-read-only t)) + (setq buffer-read-only t) + (run-hooks 'notmuch-show-mode-hook)) ;;;###autoload @@ -648,19 +649,28 @@ view, (remove the \"inbox\" tag from each), with "Notmuch mail reader for Emacs." :group 'mail) -(defcustom notmuch-show-hook nil +(defcustom notmuch-show-mode-hook nil "List of functions to call when notmuch displays a message." :type 'hook :options '(goto-address) :group 'notmuch) +(defcustom notmuch-search-mode-hook nil + "List of functions to call when notmuch displays the search results." + :type 'hook + :options '(hl-line-mode) + :group 'notmuch) + ; Make show mode a bit prettier, highlighting URLs and using word wrap (defun notmuch-show-pretty-hook () (goto-address-mode 1) (visual-line-mode)) -(add-hook 'notmuch-show-hook 'notmuch-show-pretty-hook) +(add-hook 'notmuch-show-mode-hook 'notmuch-show-pretty-hook) +(add-hook 'notmuch-search-mode-hook + (lambda() + (hl-line-mode 1) )) (defun notmuch-show (thread-id &optional parent-buffer) "Run \"notmuch show\" with the given thread ID and display results. @@ -684,7 +694,6 @@ thread from that buffer can be show when done with this one)." (call-process "notmuch" nil t nil "show" thread-id) (notmuch-show-markup-messages) ) - (run-hooks 'notmuch-show-hook) ; Move straight to the first unread message (if (not (notmuch-show-message-unread-p)) (progn @@ -787,7 +796,8 @@ global search. (setq truncate-lines t) (setq major-mode 'notmuch-search-mode mode-name "notmuch-search") - (setq buffer-read-only t)) + (setq buffer-read-only t) + (run-hooks 'notmuch-search-mode-hook)) (defun notmuch-search-find-thread-id () (save-excursion -- 1.6.5.2.74.g610f9 From keithp@keithp.com Wed Nov 18 21:21:17 2009 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 38CB9431FBC for ; Wed, 18 Nov 2009 21:21:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 zyQ3LFn74Tku for ; Wed, 18 Nov 2009 21:21:16 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 7F408431FAE for ; Wed, 18 Nov 2009 21:21:16 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 9E420B9404C; Wed, 18 Nov 2009 21:21:15 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7cK+yR466poj; Wed, 18 Nov 2009 21:21:12 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 86D35B9402F; Wed, 18 Nov 2009 21:21:12 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 79A08B88003; Wed, 18 Nov 2009 21:21:12 -0800 (PST) From: Keith Packard To: "Aneesh Kumar K.V" , notmuch@notmuchmail.org In-Reply-To: <1258606537-12566-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1258606537-12566-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Date: Wed, 18 Nov 2009 21:21:11 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] notmuch: Add search mode hook X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 05:21:17 -0000 --=-=-= On Thu, 19 Nov 2009 10:25:37 +0530, "Aneesh Kumar K.V" wrote: > This patch add notmuch-search-mode-hook and rename > notmuch-show-hook to notmuch-show-mode-hook. This > also runs notmuch-show-mode-hook when we enable > notmuch-show-mode I'm not sure we want to run the hooks that early; I can easily imagine hooks that want to be run after the message has been loaded. -- keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLBNXIQp8BWwlsTdMRApTlAKCs+UL/i+ctYfv1nYi2ZK8HpgOKIgCgvLRt IRgLDxRO1aicg6t7U/C0H+8= =QGmR -----END PGP SIGNATURE----- --=-=-=-- From kha@treskal.com Wed Nov 18 21:39:55 2009 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 A6542431FBC for ; Wed, 18 Nov 2009 21:39:55 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ezMT80SN9mUz for ; Wed, 18 Nov 2009 21:39:55 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by olra.theworths.org (Postfix) with ESMTP id 51CB8431FAE for ; Wed, 18 Nov 2009 21:39:55 -0800 (PST) Received: from mail1.space2u.com ([62.20.1.135]) by mx.perfora.net (node=mxus2) with ESMTP (Nemesis) id 0LhPFg-1NxGvK0hrk-00mjWH for notmuch@notmuchmail.org; Thu, 19 Nov 2009 00:39:54 -0500 Received: from mail-fx0-f217.google.com (mail-fx0-f217.google.com [209.85.220.217]) (authenticated bits=0) by mail1.space2u.com (8.14.3/8.14.3) with ESMTP id nAJ5dkeL016684 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NOT) for ; Thu, 19 Nov 2009 06:39:46 +0100 Received: by fxm9 with SMTP id 9so2026943fxm.30 for ; Wed, 18 Nov 2009 21:39:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.126.12 with SMTP id d12mr3807334mun.40.1258609190671; Wed, 18 Nov 2009 21:39:50 -0800 (PST) In-Reply-To: <1258584691-29260-1-git-send-email-ingmar@exherbo.org> References: <1258584691-29260-1-git-send-email-ingmar@exherbo.org> Date: Thu, 19 Nov 2009 06:39:50 +0100 Message-ID: From: Karl Wiberg To: Ingmar Vanhassel Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 2/2] .gitignore: Add common editor droppings X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 05:39:55 -0000 On Wed, Nov 18, 2009 at 11:51 PM, Ingmar Vanhassel wro= te: > diff --git a/.gitignore b/.gitignore > index d277c5a..a210779 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -2,4 +2,6 @@ > =C2=A0notmuch > =C2=A0notmuch.1.gz > =C2=A0*.[ao] > +*~ > +.*.swp Since these patterns are specific to a user rather than a project, shouldn't they go in the user's ignore file (~/.gitignore) rather than the project's? --=20 Karl Wiberg, kha@treskal.com subrabbit.wordpress.com www.treskal.com/kalle From stewart@flamingspork.com Wed Nov 18 21:42:46 2009 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 C59C0431FBF for ; Wed, 18 Nov 2009 21:42:46 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 n4ehyCIZA0Qc for ; Wed, 18 Nov 2009 21:42:46 -0800 (PST) Received: from kaylee.flamingspork.com (kaylee.flamingspork.com [74.207.245.61]) by olra.theworths.org (Postfix) with ESMTP id 11364431FAE for ; Wed, 18 Nov 2009 21:42:46 -0800 (PST) Received: from willster (localhost [127.0.0.1]) by kaylee.flamingspork.com (Postfix) with ESMTPS id BD4316333; Thu, 19 Nov 2009 05:42:20 +0000 (UTC) Received: from flamingspork.com (localhost.localdomain [127.0.0.1]) by willster (Postfix) with ESMTPS id ADF3310F5D89; Thu, 19 Nov 2009 16:42:43 +1100 (EST) Date: Thu, 19 Nov 2009 16:42:42 +1100 From: Stewart Smith To: Alexander Botero-Lowry Message-ID: <20091119054242.GA11080@flamingspork.com> References: <874oorfozb.fsf@yoom.home.cworth.org> <20091118234527.GO9315@flamingspork.com> <86vdh7cqet.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86vdh7cqet.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Mac OS X/Darwin compatibility issues X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 05:42:46 -0000 On Wed, Nov 18, 2009 at 04:24:42PM -0800, Alexander Botero-Lowry wrote: > On Thu, 19 Nov 2009 10:45:28 +1100, Stewart Smith wrote: > > On Wed, Nov 18, 2009 at 11:27:20PM +0100, Carl Worth wrote: > > > Yes. I knew I was "cheating" by using some GNU extensions here. I'm > > > happy to accept portability patches for these things, but it's hard for > > > me to get excited about writing them myself. > > > > > > Care to take a whack at these? > > > > http://www.gnu.org/software/gnulib/ > > > > could be a partial answer. > > > Why add yet another dependency for a couple of functions? Especially > considering how notmuch already depends on glib which includes portability > functions for various things. The idea with gnulib (at least what we've done with drizzle) is to just copy the bits you need into the tree. Does work pretty well for those small things that you just don't need to depend on a giant like glib for. -- Stewart Smith From aneesh.kumar@linux.vnet.ibm.com Wed Nov 18 21:56:52 2009 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 B5DBC431FBC for ; Wed, 18 Nov 2009 21:56:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 xKkSzZYPnTVX for ; Wed, 18 Nov 2009 21:56:50 -0800 (PST) Received: from e23smtp09.au.ibm.com (e23smtp09.au.ibm.com [202.81.31.142]) by olra.theworths.org (Postfix) with ESMTP id 41F95431FAE for ; Wed, 18 Nov 2009 21:56:49 -0800 (PST) Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246]) by e23smtp09.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAJ5umTZ017237 for ; Thu, 19 Nov 2009 16:56:48 +1100 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAJ5rTmR1294450 for ; Thu, 19 Nov 2009 16:53:29 +1100 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAJ5umJu017976 for ; Thu, 19 Nov 2009 16:56:48 +1100 Received: from skywalker.linux.vnet.ibm.com (N20wks267599wss.in.ibm.com [9.124.31.111]) by d23av01.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAJ5uihJ017921 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 19 Nov 2009 16:56:47 +1100 Date: Thu, 19 Nov 2009 11:26:43 +0530 From: "Aneesh Kumar K.V" To: Keith Packard Message-ID: <20091119055643.GA2778@skywalker.linux.vnet.ibm.com> References: <1258606537-12566-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] notmuch: Add search mode hook X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 05:56:52 -0000 On Wed, Nov 18, 2009 at 09:21:11PM -0800, Keith Packard wrote: > On Thu, 19 Nov 2009 10:25:37 +0530, "Aneesh Kumar K.V" wrote: > > > This patch add notmuch-search-mode-hook and rename > > notmuch-show-hook to notmuch-show-mode-hook. This > > also runs notmuch-show-mode-hook when we enable > > notmuch-show-mode > > I'm not sure we want to run the hooks that early; I can easily imagine > hooks that want to be run after the message has been loaded. Ok i will move them and send another patch -aneesh From aneesh.kumar@linux.vnet.ibm.com Wed Nov 18 22:11:03 2009 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 9B5B0431FBC for ; Wed, 18 Nov 2009 22:11:03 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 AEB7q4sH0JGN for ; Wed, 18 Nov 2009 22:11:02 -0800 (PST) Received: from e23smtp04.au.ibm.com (e23smtp04.au.ibm.com [202.81.31.146]) by olra.theworths.org (Postfix) with ESMTP id 4939B431FAE for ; Wed, 18 Nov 2009 22:11:02 -0800 (PST) Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp04.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAJ67oWS006270 for ; Thu, 19 Nov 2009 17:07:50 +1100 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAJ67b5t1298602 for ; Thu, 19 Nov 2009 17:07:37 +1100 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAJ6AxE9031821 for ; Thu, 19 Nov 2009 17:11:00 +1100 Received: from localhost.localdomain (N20wks267599wss.in.ibm.com [9.124.31.111]) by d23av02.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAJ6AvUh031796; Thu, 19 Nov 2009 17:10:58 +1100 From: "Aneesh Kumar K.V" To: notmuch@notmuchmail.org Date: Thu, 19 Nov 2009 11:40:54 +0530 Message-Id: <1258611054-3888-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.6.5.2.74.g610f9 Subject: [notmuch] [PATCH -V3] notmuch: Add search mode hook X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 06:11:03 -0000 This patch add notmuch-search-hook that gets run when we after displaying search results Signed-off-by: Aneesh Kumar K.V Cc:Keith Packard --- notmuch.el | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/notmuch.el b/notmuch.el index 706e9f3..1fc54c3 100644 --- a/notmuch.el +++ b/notmuch.el @@ -654,6 +654,12 @@ view, (remove the \"inbox\" tag from each), with :options '(goto-address) :group 'notmuch) +(defcustom notmuch-search-hook nil + "List of functions to call when notmuch displays the search results." + :type 'hook + :options '(hl-line-mode) + :group 'notmuch) + ; Make show mode a bit prettier, highlighting URLs and using word wrap (defun notmuch-show-pretty-hook () @@ -661,6 +667,9 @@ view, (remove the \"inbox\" tag from each), with (visual-line-mode)) (add-hook 'notmuch-show-hook 'notmuch-show-pretty-hook) +(add-hook 'notmuch-search-hook + (lambda() + (hl-line-mode 1) )) (defun notmuch-show (thread-id &optional parent-buffer) "Run \"notmuch show\" with the given thread ID and display results. @@ -911,7 +920,8 @@ This function advances point to the next line when finished." (call-process "notmuch" nil t nil "search" "--sort=oldest-first" query) (call-process "notmuch" nil t nil "search" "--sort=newest-first" query)) (notmuch-search-markup-thread-ids) - )))) + )) + (run-hooks 'notmuch-search-hook))) (defun notmuch-search-refresh-view () "Refresh the current view. -- 1.6.5.2.74.g610f9 From jeff@ocjtech.us Wed Nov 18 22:19:10 2009 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 35B60431FBC for ; Wed, 18 Nov 2009 22:19:10 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Iskz+3gEbkxO for ; Wed, 18 Nov 2009 22:19:09 -0800 (PST) Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com [209.85.210.204]) by olra.theworths.org (Postfix) with ESMTP id 4228F431FAE for ; Wed, 18 Nov 2009 22:19:09 -0800 (PST) Received: by yxe42 with SMTP id 42so2053491yxe.22 for ; Wed, 18 Nov 2009 22:19:09 -0800 (PST) Received: by 10.150.112.17 with SMTP id k17mr4058039ybc.257.1258611545687; Wed, 18 Nov 2009 22:19:05 -0800 (PST) Received: from lt26923.campus.dmacc.edu ([69.57.47.215]) by mx.google.com with ESMTPS id 16sm149669gxk.15.2009.11.18.22.19.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Nov 2009 22:19:05 -0800 (PST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by lt26923.campus.dmacc.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NB0MB-0005Os-9Y; Thu, 19 Nov 2009 00:19:03 -0600 From: "Jeffrey C. Ollie" To: Not Much Mail Date: Thu, 19 Nov 2009 00:18:50 -0600 Message-Id: <1258611530-20719-1-git-send-email-jeff@ocjtech.us> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] notmuch: improve installation of emacs mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 06:19:10 -0000 1) Don't hardcode the installation directory, instead use emacs' pkg-config module. 2) Install a byte compiled version of the emacs mode. 3) Install the emacs mode in emacs' site-start directory so that it gets loaded automatically. --- Makefile | 6 ++++++ Makefile.local | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 023b2ec..17fa4a2 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,9 @@ CFLAGS=-O2 extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc) extra_cxxflags := $(shell xapian-config --cxxflags) +emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir) +emacs_startdir := $(shell pkg-config emacs --variable sitestartdir) + # Now smash together user's values with our extra values override CFLAGS += $(WARN_FLAGS) $(extra_cflags) override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags) @@ -28,6 +31,9 @@ include Makefile.config %.o: %.c $(CC) -c $(CFLAGS) $< -o $@ +%.elc: %.el + emacs -batch -f batch-byte-compile $< + .deps/%.d: %.c @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \ diff --git a/Makefile.local b/Makefile.local index 27e42ba..8aac201 100644 --- a/Makefile.local +++ b/Makefile.local @@ -1,4 +1,4 @@ -all: notmuch notmuch.1.gz +all: notmuch notmuch.1.gz notmuch.elc notmuch_client_srcs = \ notmuch.c \ @@ -23,15 +23,16 @@ notmuch: $(notmuch_client_modules) lib/notmuch.a notmuch.1.gz: notmuch.1 gzip --stdout notmuch.1 > notmuch.1.gz -install: all notmuch.1.gz +install: all notmuch.1.gz notmuch.elc for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \ - $(DESTDIR)/etc/bash_completion.d/ ; \ + $(DESTDIR)/etc/bash_completion.d/ $(DESTDIR)$(emacs_startdir) ; \ do \ install -d $$d ; \ done ; install notmuch $(DESTDIR)$(prefix)/bin/ install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/ - install -m0644 notmuch.el $(DESTDIR)$(prefix)/share/emacs/site-lisp/ + install -m0644 notmuch.el $(DESTDIR)$(emacs_startdir) + install -m0644 notmuch.elc $(DESTDIR)$(emacs_startdir) install notmuch-completion.bash \ $(DESTDIR)/etc/bash_completion.d/notmuch -- 1.6.5.2 From jeff@ocjtech.us Wed Nov 18 22:56:25 2009 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 82434431FBC for ; Wed, 18 Nov 2009 22:56:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 jLE8I9KLB7JF for ; Wed, 18 Nov 2009 22:56:23 -0800 (PST) Received: from mail-pw0-f51.google.com (mail-pw0-f51.google.com [209.85.160.51]) by olra.theworths.org (Postfix) with ESMTP id 43FD4431FAE for ; Wed, 18 Nov 2009 22:56:23 -0800 (PST) Received: by pwj10 with SMTP id 10so1231944pwj.30 for ; Wed, 18 Nov 2009 22:56:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.214.36 with SMTP id m36mr33965wag.172.1258613782661; Wed, 18 Nov 2009 22:56:22 -0800 (PST) In-Reply-To: <87einv72cr.fsf@yoom.home.cworth.org> References: <1258569114-16034-1-git-send-email-jeff@ocjtech.us> <87einv72cr.fsf@yoom.home.cworth.org> Date: Thu, 19 Nov 2009 00:56:22 -0600 Message-ID: <935ead450911182256j14722a61k7f24a971e0f81756@mail.gmail.com> From: Jeffrey Ollie To: Not Much Mail Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [notmuch] RPM spec file X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 06:56:25 -0000 On Wed, Nov 18, 2009 at 7:03 PM, Carl Worth wrote: > On Wed, 18 Nov 2009 12:31:53 -0600, "Jeffrey C. Ollie" = wrote: >> I prefere managing all of the software on my system with RPM, so I >> came up with a quick spec file for building RPMS. =C2=A0Once notmuch >> settles down and I continue using it I may submit notmuch to Fedora as >> an official package. =C2=A0If you'd like your own RPMS build your own, I >> don't plan on offering a repository of binary packages. > > This sounds great, Jeffrey. > > What makes the most sense for this file? Shall we just leave it in the > central repository? Or put it in its own rpm branch? I'm open to your > suggestions here. I don't think that a separate Git branch makes sense, but maybe stuff like this should be in a subdirectory like "packaging/fedora", since I imagine that there will eventually be a need for "packaging/debian" etc. as well. --=20 Jeff Ollie From jnrowe@gmail.com Thu Nov 19 00:11:50 2009 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 E0922431FBC for ; Thu, 19 Nov 2009 00:11:50 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 6CUrFsObEIYs for ; Thu, 19 Nov 2009 00:11:49 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 980CB431FAE for ; Thu, 19 Nov 2009 00:11:49 -0800 (PST) Received: by bwz24 with SMTP id 24so970747bwz.30 for ; Thu, 19 Nov 2009 00:11:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-disposition:x-face:face; bh=fGwrp4zCrMbEtYjhmLsfifqNvQmgr5X5o9uTpRGlohM=; b=o1zzIlck6rrIOcHnPgHfWMz0xUWz/Z3gizvMIcT97C/YT6HMImgvAnHImKtIyA8fZj s3LFlZfo3JZP7lwlzDj5MLZecT16QvCm79UOe2WkiByAwnBcG8cSdhvXd+pcd9MMb25Y VhR8FW7hTSG3V+0krVhWDqZ0zOeJcj52SdN6E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-disposition:x-face:face; b=BhbKT1SAghEK3rYBwrmXkhMQ23D51NfZANVDBvrcTGZKHimc7bksL5yTkRCln9+GKD thvDuG2HqtfEV161wr5YrNEvtmX+GOTsAZ1na9TQpOJRo2bvA2DsJpP9a0MswUYkYD1y U/8Z/rlAaYXmsWVIJvJ9mFq/dWapC4imwnfDE= Received: by 10.216.87.66 with SMTP id x44mr2218295wee.96.1258618307670; Thu, 19 Nov 2009 00:11:47 -0800 (PST) Received: from localhost (94.197.240.90.threembb.co.uk [94.197.240.90]) by mx.google.com with ESMTPS id p37sm547556gvf.23.2009.11.19.00.11.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 19 Nov 2009 00:11:46 -0800 (PST) Message-ID: <4b04fdc2.25c0100a.68f2.ffffc8bf@mx.google.com> Date: Thu, 19 Nov 2009 00:11:46 -0800 (PST) From: James Rowe To: notmuch@notmuchmail.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline X-Face: "B/4c#}1Iv9Z5ZZw+I9Aj[W?j->Zc>!`2:[g3A2um!s`b+Tm4iSRRQgrrR1V.'QZ26TQf&\ GFu5:<:`x}o+JTEYw0)L%nYLT$J; (+4%12bvt*(,-yx?29]b7DUvQC4J*@!Ln#jL+{2K^:1`J)2?)q uzx|M7aMI._8'*KwoM|S#y^Bwgs>rXI|Qp[cIm-, lc'L8~sHes14QOR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 08:11:51 -0000 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hi, Just in case other Gentoo users are trying notmuch out I thought I'd post my ebuild(perhaps you'll make it better for me too :). It is working well up to at least e5da2b70. I won't bother the list if it requires changes, as it is available from my main overlay[1] if you wish to check for updated versions. Thanks, James 1. http://github.com/JNRowe/misc-overlay/tree/master/mail-client/notmuch/ --UugvWAfsgieZRqgk Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="notmuch-9999.ebuild" # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit toolchain-funcs elisp-common bash-completion git EGIT_REPO_URI="git://notmuchmail.org/git/${PN}" DESCRIPTION="Thread-based email index, search and tagging." HOMEPAGE="http://notmuchmail.org/" SRC_URI="" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="emacs" DEPEND="dev-util/pkgconfig ${RDEPEND}" RDEPEND="sys-libs/talloc dev-libs/gmime dev-libs/xapian emacs? ( virtual/emacs )" SITEFILE="50${PN}-gentoo.el" src_prepare() { # Change ordering in case people are using as-needed sed -i 's,\($(LDFLAGS)\)\(.*\),\2 \1,' Makefile.local } src_compile() { emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" CFLAGS="${CFLAGS}" \ || die "emake failed" if use emacs; then elisp-compile ${PN}.el || die "elisp-compile failed" fi } src_install() { # Don't use make install, because it installs compressed man pages, # bash-completion in the wrong location and emacs files unconditionally. # Three commands are quicker than patching Makefile.local locally. dobin ${PN} doman ${PN}.1 dobashcompletion notmuch-completion.bash ${PN} dodoc AUTHORS README TODO if use emacs; then elisp-install ${PN}{,.el} elisp-site-file-install "${FILESDIR}/${SITEFILE}" fi } --UugvWAfsgieZRqgk Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="50notmuch-gentoo.el" ; notmuch site-list config (add-to-list 'load-path "@SITELISP@") (autoload 'notmuch "notmuch" "Start notmuch" t) --UugvWAfsgieZRqgk-- From SRS0=HQNk=HH=exemail.com.au=tjaden@srs.perfora.net Thu Nov 19 00:13:42 2009 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 569B0431FBC for ; Thu, 19 Nov 2009 00:13:42 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 50oXjrO5Jor0 for ; Thu, 19 Nov 2009 00:13:40 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.195]) by olra.theworths.org (Postfix) with ESMTP id CC016431FAE for ; Thu, 19 Nov 2009 00:13:40 -0800 (PST) Received-SPF: pass (mxus2: domain of exemail.com.au designates 220.233.0.17 as permitted sender) client-ip=220.233.0.17; envelope-from=tjaden@exemail.com.au; helo=smtp.po.exetel.com.au; Received: from smtp.po.exetel.com.au (pecan.exetel.com.au [220.233.0.17]) by mx.perfora.net (node=mxus2) with ESMTP (Nemesis) id 0M55zq-1O7dsK3y06-00zPLh for notmuch@notmuchmail.org; Thu, 19 Nov 2009 03:13:39 -0500 Received: from 27.133.70.115.static.exetel.com.au ([115.70.133.27] helo=localhost) by smtp.po.exetel.com.au with esmtp (Exim 4.68) (envelope-from ) id 1NB291-0002ND-Tk; Thu, 19 Nov 2009 19:13:36 +1100 Date: Thu, 19 Nov 2009 19:13:35 +1100 From: Peter Wang To: notmuch@notmuchmail.org Message-ID: <20091119081335.GI27626@plug.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: [notmuch] link error X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 08:13:42 -0000 Hi, Linking fails on my system for some reason (undefined references to talloc functions). Putting $(LDFLAGS) after the object list solves it. Peter diff --git a/Makefile.local b/Makefile.local index 27e42ba..c2fbe21 100644 --- a/Makefile.local +++ b/Makefile.local @@ -18,7 +18,7 @@ notmuch_client_srcs = \ notmuch_client_modules = $(notmuch_client_srcs:.c=.o) notmuch: $(notmuch_client_modules) lib/notmuch.a - $(CXX) $(LDFLAGS) $^ -o $@ + $(CXX) $^ $(LDFLAGS) -o $@ notmuch.1.gz: notmuch.1 gzip --stdout notmuch.1 > notmuch.1.gz From jnrowe@gmail.com Thu Nov 19 01:41:35 2009 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 D638B431FBC for ; Thu, 19 Nov 2009 01:41:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Ng0k4xWN16n0 for ; Thu, 19 Nov 2009 01:41:35 -0800 (PST) Received: from mail-fx0-f217.google.com (mail-fx0-f217.google.com [209.85.220.217]) by olra.theworths.org (Postfix) with ESMTP id DC514431FAE for ; Thu, 19 Nov 2009 01:41:34 -0800 (PST) Received: by fxm9 with SMTP id 9so2172081fxm.30 for ; Thu, 19 Nov 2009 01:41:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:references:mime-version:content-type:content-disposition :in-reply-to:x-face:face; bh=hAsGXKWDcEYlJP+ySnWcRs0Xasjeah7LtzGk/A+Srf8=; b=BBxWiKIJvXiSS86gZ0BCquOeUYY4iXBHARDPFzPIdWKNqrVjRR7v29FnG+MBs24G/F JRWqpFC9SIQdyOcfsm+4mibF81V/P29h5rTEJxaW6m+cHZbOEZlNBEW4LKNtk04Ep6hH 08CC+xvCRiu0AdutXyO5xBjj1+bmqXUg5V8kQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:references:mime-version :content-type:content-disposition:in-reply-to:x-face:face; b=lIiTBlYxmhcDenWPN0o7Efnpb8AWBx13wUFj37ceRljN3wD3mCpsyQ7AnuuYFmHiLl /wopDVV8hZi7uhrBN+Fm8gzD+h78z5dVY3hwKTM9hGTVILa5kgj2/3K+qduLSvOnH31e faa6B79FF3cITMAjEjNRff/T3HhMkKdNWuI2I= Received: by 10.216.91.12 with SMTP id g12mr953827wef.33.1258623693594; Thu, 19 Nov 2009 01:41:33 -0800 (PST) Received: from localhost (94.197.240.90.threembb.co.uk [94.197.240.90]) by mx.google.com with ESMTPS id i35sm682357gve.11.2009.11.19.01.41.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 19 Nov 2009 01:41:32 -0800 (PST) Message-ID: <4b0512cc.23a0100a.27b2.0a48@mx.google.com> Date: Thu, 19 Nov 2009 01:41:32 -0800 (PST) From: James Rowe To: notmuch@notmuchmail.org References: <20091119081335.GI27626@plug.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20091119081335.GI27626@plug.localdomain> X-Face: "B/4c#}1Iv9Z5ZZw+I9Aj[W?j->Zc>!`2:[g3A2um!s`b+Tm4iSRRQgrrR1V.'QZ26TQf&\ GFu5:<:`x}o+JTEYw0)L%nYLT$J; (+4%12bvt*(,-yx?29]b7DUvQC4J*@!Ln#jL+{2K^:1`J)2?)q uzx|M7aMI._8'*KwoM|S#y^Bwgs>rXI|Qp[cIm-, lc'L8~sHes14QOR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 09:41:36 -0000 * Peter Wang (novalazy@gmail.com) wrote: > Linking fails on my system for some reason (undefined references to > talloc functions). Putting $(LDFLAGS) after the object list solves it. I have a similar ordering change in the ebuild I posted earlier as a workaround for people using ld's --as-needed option. Thanks, James From ingmar@exherbo.org Thu Nov 19 03:11:14 2009 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 6E5E3431FBC for ; Thu, 19 Nov 2009 03:11:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 1t0SaCmcIKYE for ; Thu, 19 Nov 2009 03:11:10 -0800 (PST) Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by olra.theworths.org (Postfix) with ESMTP id 88D4E431FAE for ; Thu, 19 Nov 2009 03:11:10 -0800 (PST) Received: from [83.101.72.69] (helo=localhost) by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NB4ur-0006rh-J6 for notmuch@notmuchmail.org; Thu, 19 Nov 2009 11:11:09 +0000 Content-Type: text/plain; charset=utf8 From: Ingmar Vanhassel To: notmuch In-reply-to: <1258611530-20719-1-git-send-email-jeff@ocjtech.us> References: <1258611530-20719-1-git-send-email-jeff@ocjtech.us> Date: Thu, 19 Nov 2009 12:11:08 +0100 Message-Id: <1258628956-sup-8884@cannonball> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Subject: Re: [notmuch] [PATCH] notmuch: improve installation of emacs mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 11:11:14 -0000 Excerpts from Jeffrey C. Ollie's message of Thu Nov 19 07:18:50 +0100 2009: > 1) Don't hardcode the installation directory, instead use emacs' > pkg-config module. > > 2) Install a byte compiled version of the emacs mode. > > 3) Install the emacs mode in emacs' site-start directory so that it > gets loaded automatically. Your patch makes emacs required to do make install, which is a no-go imo. Notmuch can be used without emacs. Shouldn't installing the emac mode be a seperate target? -- Exherbo KDE, X.org maintainer From cworth@cworth.org Thu Nov 19 03:25:02 2009 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 9A0A0431FBF; Thu, 19 Nov 2009 03:25:02 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 D3p-KbHeKC-W; Thu, 19 Nov 2009 03:25:02 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id ACAE4431FAE; Thu, 19 Nov 2009 03:25:01 -0800 (PST) From: Carl Worth To: Ingmar Vanhassel , notmuch@notmuchmail.org In-Reply-To: <1258595144-15258-1-git-send-email-ingmar@exherbo.org> References: <1258595144-15258-1-git-send-email-ingmar@exherbo.org> Date: Thu, 19 Nov 2009 12:24:48 +0100 Message-ID: <878we2sqnz.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Makefile: Create elisp install directory explicitly X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 11:25:02 -0000 On Thu, 19 Nov 2009 02:45:44 +0100, Ingmar Vanhassel wrote: > When doing a DESTDIR install, this directory likely won't exist, and > installing notmuch.el will fail. Thanks. Pushed. -Carl From rollandsantimano@yahoo.com Wed Nov 18 21:16:59 2009 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 B5C0E431FBC for ; Wed, 18 Nov 2009 21:16:59 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 7izCurrvHBe3 for ; Wed, 18 Nov 2009 21:16:59 -0800 (PST) Received: from web113506.mail.gq1.yahoo.com (web113506.mail.gq1.yahoo.com [98.136.167.46]) by olra.theworths.org (Postfix) with SMTP id D98BB431FAE for ; Wed, 18 Nov 2009 21:16:58 -0800 (PST) Received: (qmail 52066 invoked by uid 60001); 19 Nov 2009 05:16:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1258607818; bh=LX9NlFTvhTgo4qsO30G2HtdUtnbq3kRdaBHWECrCnGU=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=uvVGr6xRDz/K9zhr4Wkug9Bvc+zDY+UDKPRjCJwR/cYzUkbuwRJ3F66EV+fJr5PUl8983pwKm2AWe1cJzMpRdvFkoku5czNiNtINYAAf6VNxRg71Su8XTytLh/V2LmeN9bcj/U5/S9PJUfIx0PHI7CO+CYIE7KHC/bx8s5duVSo= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=1/3BJciVflcxJAE/4usVC7AAU4WgTkmcgpU60q+ymEPY0KeESDpPF5FPCuZuEElgiJ7yUtTEkI6XcibQl6I6CKtJeeFl982qIiAE5YhJELHaoMQzqNv7hdkZ88QdAzJ6eYH8yx2LJWE0rIwAsj1Hr4q3CdxRtr8s/Q4+xY7ccpQ=; Message-ID: <376345.51284.qm@web113506.mail.gq1.yahoo.com> X-YMail-OSG: QF48prgVM1k0nMIGeHCx4mj9xRCe_vk7dUBoP44ayRkb6b0PTjKI1A6iYRKxtjxpHeJnLKN_2apkYXA107YGCoX.0O.uzrF78MIRbrC0o_k58LX_K5JF35gywYxlA.yzZOcUqf8wCVlMFEKiJdEG37nuVZhCEQCqiXorFV1tKQS6DZBS5GJdeO5Sa_tcg0EBkFu3WFJYyQcbe6xvXixVeb2grPbddIq_.49pPr7kWU9VNH_Szn1__GV47UmPxqwul.FssMGr2K7flmKR7B2BpR8.jW7NGcKgnB8CicBAlPEqOSX2YuHVa3IxlOwFo0fkX_wtTNhPvzs.Ei06vtBtMA-- Received: from [202.3.120.9] by web113506.mail.gq1.yahoo.com via HTTP; Wed, 18 Nov 2009 21:16:58 PST X-Mailer: YahooMailRC/211.6 YahooMailWebService/0.8.100.260964 References: <1258574286-20087-1-git-send-email-keithp@keithp.com> Date: Wed, 18 Nov 2009 21:16:58 -0800 (PST) From: Rolland Santimano To: Keith Packard , notmuch@notmuchmail.org In-Reply-To: <1258574286-20087-1-git-send-email-keithp@keithp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailman-Approved-At: Thu, 19 Nov 2009 03:27:44 -0800 Subject: Re: [notmuch] [PATCH] Have git ignore tags & cscope files X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 05:16:59 -0000 --- .gitignore | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 8417d60..ef515f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ TAGS +tags +*cscope* .deps notmuch notmuch.1.gz -- 1.5.4.3 From jan@iptel.org Thu Nov 19 03:35:07 2009 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 3966C431FBF for ; Thu, 19 Nov 2009 03:35:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 r5UMGTB+G9l7 for ; Thu, 19 Nov 2009 03:35:06 -0800 (PST) Received: from mail.iptel.org (smtp.iptel.org [213.192.59.67]) by olra.theworths.org (Postfix) with ESMTP id DEAC8431FAE for ; Thu, 19 Nov 2009 03:35:05 -0800 (PST) Received: by mail.iptel.org (Postfix, from userid 103) id B27F2370667; Thu, 19 Nov 2009 12:34:42 +0100 (CET) Received: from x61s.janakj (nat.sip-server.net [213.192.30.130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.iptel.org (Postfix) with ESMTPSA id B9041370659 for ; Thu, 19 Nov 2009 12:34:41 +0100 (CET) Received: by x61s.janakj (Postfix, from userid 1000) id 89305440651; Thu, 19 Nov 2009 12:34:41 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Thu, 19 Nov 2009 12:34:40 +0100 Message-Id: <1258630481-5133-1-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH 1/2] notmuch: Support for notmuch_database_get_tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 11:35:07 -0000 This patch adds a new function called notmuch_database_get_tags which can be used to obtain a list of all tags defined in the database (that is, the list all tags from all messages). The function produces an alphabetically sorted list. To add support for the new function, we rip the guts off of notmuch_message_get_tags and put them in a new generic function called _notmuch_convert_tags. The generic function takes a TermIterator as argument and produces a notmuch_tags_t list of tags. Function notmuch_message_get_tags is then reimplemented to call the generic function with message->doc.termlist_begin() as argument. Similarly, we implement notmuch_message_database_tags, the function calls the generic function with db->xapian_db->allterms_begin() as argument. Finally, notmuch_database_get_tags is exported through lib/notmuch.h Signed-off-by: Jan Janak --- lib/database.cc | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ lib/message.cc | 38 ++++++-------------------------------- lib/notmuch.h | 4 ++++ 3 files changed, 58 insertions(+), 32 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 4998fc9..b1c15c3 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -983,3 +983,51 @@ notmuch_database_add_message (notmuch_database_t *notmuch, return ret; } + +notmuch_tags_t * +_notmuch_convert_tags (void* ctx, Xapian::TermIterator i); + +/* Converts tags from the format used in Xapian to a list in + notmuch_tags_t. */ +notmuch_tags_t * +_notmuch_convert_tags (void* ctx, Xapian::TermIterator i) +{ + const char *prefix = _find_prefix ("tag"); + notmuch_tags_t *tags; + std::string tag; + + /* Currently this iteration is written with the assumption that + * "tag" has a single-character prefix. */ + assert (strlen (prefix) == 1); + + tags = _notmuch_tags_create (ctx); + if (unlikely (tags == NULL)) + return NULL; + + i.skip_to (prefix); + + while (1) { + tag = *i; + + if (tag.empty () || tag[0] != *prefix) + break; + + _notmuch_tags_add_tag (tags, tag.c_str () + 1); + + i++; + } + + _notmuch_tags_prepare_iterator (tags); + + return tags; +} + +/* + * Returns a list of all tags defined in a notmuch database. The resulting + * list is sorted alphabetically. + */ +notmuch_tags_t * +notmuch_database_get_tags (notmuch_database_t *db) +{ + return _notmuch_convert_tags(db, db->xapian_db->allterms_begin()); +} diff --git a/lib/message.cc b/lib/message.cc index 9488fb6..af23bb2 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -41,6 +41,9 @@ struct _notmuch_message { Xapian::Document doc; }; +extern notmuch_tags_t * +_notmuch_convert_tags (void* ctx, Xapian::TermIterator i); + /* "128 bits of thread-id ought to be enough for anybody" */ #define NOTMUCH_THREAD_ID_BITS 128 #define NOTMUCH_THREAD_ID_DIGITS (NOTMUCH_THREAD_ID_BITS / 4) @@ -445,43 +448,14 @@ notmuch_message_get_date (notmuch_message_t *message) return Xapian::sortable_unserialise (value); } + notmuch_tags_t * notmuch_message_get_tags (notmuch_message_t *message) { - const char *prefix = _find_prefix ("tag"); - Xapian::TermIterator i, end; - notmuch_tags_t *tags; - std::string tag; - - /* Currently this iteration is written with the assumption that - * "tag" has a single-character prefix. */ - assert (strlen (prefix) == 1); - - tags = _notmuch_tags_create (message); - if (unlikely (tags == NULL)) - return NULL; - - i = message->doc.termlist_begin (); - end = message->doc.termlist_end (); - - i.skip_to (prefix); - - while (1) { - tag = *i; - - if (tag.empty () || tag[0] != *prefix) - break; - - _notmuch_tags_add_tag (tags, tag.c_str () + 1); - - i++; - } - - _notmuch_tags_prepare_iterator (tags); - - return tags; + return _notmuch_convert_tags(message, message->doc.termlist_begin()); } + void _notmuch_message_set_date (notmuch_message_t *message, const char *date) diff --git a/lib/notmuch.h b/lib/notmuch.h index cc713a3..1edcfd6 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -271,6 +271,10 @@ notmuch_message_t * notmuch_database_find_message (notmuch_database_t *database, const char *message_id); +notmuch_tags_t * +notmuch_database_get_tags (notmuch_database_t *database); + + /* Create a new query for 'database'. * * Here, 'database' should be an open database, (see -- 1.6.3.3 From jan@iptel.org Thu Nov 19 03:35:08 2009 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 2FEE8431FC2 for ; Thu, 19 Nov 2009 03:35:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 jRTSbjETWAVj for ; Thu, 19 Nov 2009 03:35:06 -0800 (PST) Received: from mail.iptel.org (smtp.iptel.org [213.192.59.67]) by olra.theworths.org (Postfix) with ESMTP id 9A28A431FBC for ; Thu, 19 Nov 2009 03:35:06 -0800 (PST) Received: by mail.iptel.org (Postfix, from userid 103) id 0160C37065E; Thu, 19 Nov 2009 12:34:43 +0100 (CET) Received: from x61s.janakj (nat.sip-server.net [213.192.30.130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.iptel.org (Postfix) with ESMTPSA id C683E37065F for ; Thu, 19 Nov 2009 12:34:41 +0100 (CET) Received: by x61s.janakj (Postfix, from userid 1000) id 9A39D440656; Thu, 19 Nov 2009 12:34:41 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Thu, 19 Nov 2009 12:34:41 +0100 Message-Id: <1258630481-5133-2-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1258630481-5133-1-git-send-email-jan@ryngle.com> References: <1258630481-5133-1-git-send-email-jan@ryngle.com> Subject: [notmuch] [PATCH 2/2] notmuch list: A new command to produce various lists. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 11:35:08 -0000 Here we create a new notmuch command called list. The purpose of the command is to produce various lists from the notmuch database. At the moment we support only one command, notmuch list tags. This command creates a list of all tags found in the database. Signed-off-by: Jan Janak --- Makefile.local | 1 + notmuch-client.h | 3 ++ notmuch-list.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ notmuch.c | 10 +++++ 4 files changed, 112 insertions(+), 0 deletions(-) create mode 100644 notmuch-list.c diff --git a/Makefile.local b/Makefile.local index 27e42ba..fb6d5c3 100644 --- a/Makefile.local +++ b/Makefile.local @@ -12,6 +12,7 @@ notmuch_client_srcs = \ notmuch-show.c \ notmuch-tag.c \ notmuch-time.c \ + notmuch-list.c \ gmime-filter-reply.c \ query-string.c \ show-message.c diff --git a/notmuch-client.h b/notmuch-client.h index b65aa77..ae876b5 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -114,6 +114,9 @@ notmuch_show_command (void *ctx, int argc, char *argv[]); int notmuch_tag_command (void *ctx, int argc, char *argv[]); +int +notmuch_list_command (void *ctx, int argc, char *argv[]); + const char * notmuch_time_relative_date (const void *ctx, time_t then); diff --git a/notmuch-list.c b/notmuch-list.c new file mode 100644 index 0000000..fe71108 --- /dev/null +++ b/notmuch-list.c @@ -0,0 +1,98 @@ +/* notmuch - Not much of an email program, (just index and search) + * + * Copyright © 2009 Carl Worth + * Copyright © 2009 Jan Janak + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/ . + * + * Authors: Carl Worth + * Jan Janak + */ + +#include "notmuch-client.h" + +enum list_cmd { + LIST_TAGS +}; + + +static int +list_all_tags(notmuch_database_t* db) +{ + notmuch_tags_t* tags; + const char* t; + + if ((tags = notmuch_database_get_tags(db)) == NULL) { + fprintf(stderr, "Error while obtaining tags from the database.\n"); + return 1; + } + + while((t = notmuch_tags_get(tags))) { + printf("%s\n", t); + notmuch_tags_advance(tags); + } + + notmuch_tags_destroy(tags); + return 0; +} + +int +notmuch_list_command (void *ctx, int argc, char *argv[]) +{ + notmuch_config_t *config; + notmuch_database_t *db; + enum list_cmd cmd; + + config = NULL; + db = NULL; + + if (argc < 1) { + fprintf(stderr, "Error: notmuch list requires at least one parameter.\n"); + fprintf(stderr, "(See notmuch help list)\n"); + goto error; + } + + if (!strcmp(argv[0], "tags")) { + cmd = LIST_TAGS; + } else { + fprintf(stderr, "Sub-command '%s' not supported.\n", argv[0]); + goto error; + } + + if ((config = notmuch_config_open (ctx, NULL, NULL)) == NULL) { + goto error; + } + + db = notmuch_database_open (notmuch_config_get_database_path (config)); + if (db == NULL) { + goto error; + } + + switch(cmd) { + case LIST_TAGS: + if (list_all_tags(db) != 0) goto error; + break; + + default: + fprintf(stderr, "Unsupported command: bug in notmuch_list_command.\n"); + goto error; + } + + notmuch_database_close (db); + return 0; + +error: + if (db) notmuch_database_close(db); + return 1; +} diff --git a/notmuch.c b/notmuch.c index 5cc8e4c..1baa22d 100644 --- a/notmuch.c +++ b/notmuch.c @@ -230,6 +230,16 @@ command_t commands[] = { "\t\tSo if you've previously been using sup for mail, then the\n" "\t\t\"notmuch restore\" command provides you a way to import\n" "\t\tall of your tags (or labels as sup calls them)." }, + { "list", notmuch_list_command, + "", + "\t\tShow additional information about the database.", + "\t\tThe following sub-commands are supported:" + "\n\n" + "\t\ttags\n" + "\n" + "\t\t\tGenerate a list of all tags available in the database.\n" + "\t\t\tThe list will be sorted alphabetically." + }, { "help", notmuch_help_command, "[]", "\t\tThis message, or more detailed help for the named command.", -- 1.6.3.3 From cworth@cworth.org Thu Nov 19 03:35:13 2009 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 4EB75431FC7; Thu, 19 Nov 2009 03:35:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 8bif+rFnRovd; Thu, 19 Nov 2009 03:35:12 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4F456431FBC; Thu, 19 Nov 2009 03:35:10 -0800 (PST) From: Carl Worth To: Stewart Smith , Alexander Botero-Lowry In-Reply-To: <20091119054242.GA11080@flamingspork.com> References: <874oorfozb.fsf@yoom.home.cworth.org> <20091118234527.GO9315@flamingspork.com> <86vdh7cqet.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> <20091119054242.GA11080@flamingspork.com> Date: Thu, 19 Nov 2009 12:34:56 +0100 Message-ID: <877htmsq73.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Mac OS X/Darwin compatibility issues X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 11:35:13 -0000 On Thu, 19 Nov 2009 16:42:42 +1100, Stewart Smith wrote: > > The idea with gnulib (at least what we've done with drizzle) is to > just copy the bits you need into the tree. Does work pretty well for > those small things that you just don't need to depend on a giant like > glib for. Looks like that's the intended mode of usage for gnulib: Its components are intended to be shared at the source level, rather than being a library that gets built, installed, and linked against. Thus, there is no distribution tarball; the idea is to copy files from Gnulib into your own source tree. That does sound like exactly what we need for getting portable implementations of the few GNU-extension functions we're using here. So thanks for sharing this. -Carl From jan@ryngle.com Thu Nov 19 03:52:52 2009 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 A659C431FBC for ; Thu, 19 Nov 2009 03:52:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 5Lxw47OPei1z for ; Thu, 19 Nov 2009 03:52:51 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 1BCB0431FAE for ; Thu, 19 Nov 2009 03:52:50 -0800 (PST) Received: by bwz24 with SMTP id 24so1174476bwz.30 for ; Thu, 19 Nov 2009 03:52:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.160.73 with SMTP id m9mr6106300bkx.214.1258631569649; Thu, 19 Nov 2009 03:52:49 -0800 (PST) In-Reply-To: <1258630481-5133-2-git-send-email-jan@ryngle.com> References: <1258630481-5133-1-git-send-email-jan@ryngle.com> <1258630481-5133-2-git-send-email-jan@ryngle.com> Date: Thu, 19 Nov 2009 12:52:49 +0100 Message-ID: From: Jan Janak To: notmuch@notmuchmail.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [notmuch] [PATCH 2/2] notmuch list: A new command to produce various lists. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 11:52:52 -0000 Carl and others, I implemented a new notmuch command that can be used to list all tags present in the database: $ notmuch list tags If you run this, you'll get an alphabetically sorted list of all tags--one tag per line. The main reason why I implemented this is because I am also working on adding the tag completion feature to the Emacs mode. This is very useful if you have a large collection of tags--it can save you some typing and, perhaps more importantly, it minimizes the risk of having typos in tag names. I'll send a patch for that later too. Let me know what do you think. -- Jan On Thu, Nov 19, 2009 at 12:34 PM, Jan Janak wrote: > Here we create a new notmuch command called list. The purpose of the > command is to produce various lists from the notmuch database. > > At the moment we support only one command, notmuch list tags. This > command creates a list of all tags found in the database. > > Signed-off-by: Jan Janak > --- > =C2=A0Makefile.local =C2=A0 | =C2=A0 =C2=A01 + > =C2=A0notmuch-client.h | =C2=A0 =C2=A03 ++ > =C2=A0notmuch-list.c =C2=A0 | =C2=A0 98 +++++++++++++++++++++++++++++++++= +++++++++++++++++++++ > =C2=A0notmuch.c =C2=A0 =C2=A0 =C2=A0 =C2=A0| =C2=A0 10 +++++ > =C2=A04 files changed, 112 insertions(+), 0 deletions(-) > =C2=A0create mode 100644 notmuch-list.c > > diff --git a/Makefile.local b/Makefile.local > index 27e42ba..fb6d5c3 100644 > --- a/Makefile.local > +++ b/Makefile.local > @@ -12,6 +12,7 @@ notmuch_client_srcs =3D =C2=A0 =C2=A0 =C2=A0 =C2=A0 \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0notmuch-show.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0\ > =C2=A0 =C2=A0 =C2=A0 =C2=A0notmuch-tag.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0notmuch-time.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0\ > + =C2=A0 =C2=A0notmuch-list.c =C2=A0 =C2=A0 =C2=A0\ > =C2=A0 =C2=A0 =C2=A0 =C2=A0gmime-filter-reply.c =C2=A0 =C2=A0\ > =C2=A0 =C2=A0 =C2=A0 =C2=A0query-string.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0\ > =C2=A0 =C2=A0 =C2=A0 =C2=A0show-message.c > diff --git a/notmuch-client.h b/notmuch-client.h > index b65aa77..ae876b5 100644 > --- a/notmuch-client.h > +++ b/notmuch-client.h > @@ -114,6 +114,9 @@ notmuch_show_command (void *ctx, int argc, char *argv= []); > =C2=A0int > =C2=A0notmuch_tag_command (void *ctx, int argc, char *argv[]); > > +int > +notmuch_list_command (void *ctx, int argc, char *argv[]); > + > =C2=A0const char * > =C2=A0notmuch_time_relative_date (const void *ctx, time_t then); > > diff --git a/notmuch-list.c b/notmuch-list.c > new file mode 100644 > index 0000000..fe71108 > --- /dev/null > +++ b/notmuch-list.c > @@ -0,0 +1,98 @@ > +/* notmuch - Not much of an email program, (just index and search) > + * > + * Copyright =C2=A9 2009 Carl Worth > + * Copyright =C2=A9 2009 Jan Janak > + * > + * This program is free software: you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation, either version 3 of the License, or > + * (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. =C2=A0See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program. =C2=A0If not, see http://www.gnu.org/license= s/ . > + * > + * Authors: Carl Worth > + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Jan Janak > + */ > + > +#include "notmuch-client.h" > + > +enum list_cmd { > + =C2=A0 =C2=A0 =C2=A0 LIST_TAGS > +}; > + > + > +static int > +list_all_tags(notmuch_database_t* db) > +{ > + =C2=A0 =C2=A0 =C2=A0 notmuch_tags_t* tags; > + =C2=A0 =C2=A0 =C2=A0 const char* t; > + > + =C2=A0 =C2=A0 =C2=A0 if ((tags =3D notmuch_database_get_tags(db)) =3D= =3D NULL) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fprintf(stderr, "Error= while obtaining tags from the database.\n"); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return 1; > + =C2=A0 =C2=A0 =C2=A0 } > + > + =C2=A0 =C2=A0 =C2=A0 while((t =3D notmuch_tags_get(tags))) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("%s\n", t); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 notmuch_tags_advance(t= ags); > + =C2=A0 =C2=A0 =C2=A0 } > + > + =C2=A0 =C2=A0 =C2=A0 notmuch_tags_destroy(tags); > + =C2=A0 =C2=A0 =C2=A0 return 0; > +} > + > +int > +notmuch_list_command (void *ctx, int argc, char *argv[]) > +{ > + =C2=A0 =C2=A0notmuch_config_t *config; > + =C2=A0 =C2=A0notmuch_database_t *db; > + =C2=A0 =C2=A0 =C2=A0 enum list_cmd cmd; > + > + =C2=A0 =C2=A0 =C2=A0 config =3D NULL; > + =C2=A0 =C2=A0 =C2=A0 db =3D NULL; > + > + =C2=A0 =C2=A0 =C2=A0 if (argc < 1) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fprintf(stderr, "Error= : notmuch list requires at least one parameter.\n"); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fprintf(stderr, "(See = notmuch help list)\n"); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto error; > + =C2=A0 =C2=A0 =C2=A0 } > + > + =C2=A0 =C2=A0 =C2=A0 if (!strcmp(argv[0], "tags")) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cmd =3D LIST_TAGS; > + =C2=A0 =C2=A0 =C2=A0 } else { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fprintf(stderr, "Sub-c= ommand '%s' not supported.\n", argv[0]); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto error; > + =C2=A0 =C2=A0 =C2=A0 } > + > + =C2=A0 =C2=A0if ((config =3D notmuch_config_open (ctx, NULL, NULL)) =3D= =3D NULL) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto error; > + =C2=A0 =C2=A0 =C2=A0 } > + > + =C2=A0 =C2=A0db =3D notmuch_database_open (notmuch_config_get_database_= path (config)); > + =C2=A0 =C2=A0if (db =3D=3D NULL) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto error; > + =C2=A0 =C2=A0 =C2=A0 } > + > + =C2=A0 =C2=A0 =C2=A0 switch(cmd) { > + =C2=A0 =C2=A0 =C2=A0 case LIST_TAGS: > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (list_all_tags(db) = !=3D 0) goto error; > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; > + > + =C2=A0 =C2=A0 =C2=A0 default: > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fprintf(stderr, "Unsup= ported command: bug in notmuch_list_command.\n"); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto error; > + =C2=A0 =C2=A0 =C2=A0 } > + > + =C2=A0 =C2=A0notmuch_database_close (db); > + =C2=A0 =C2=A0return 0; > + > +error: > + =C2=A0 =C2=A0 =C2=A0 if (db) notmuch_database_close(db); > + =C2=A0 =C2=A0 =C2=A0 return 1; > +} > diff --git a/notmuch.c b/notmuch.c > index 5cc8e4c..1baa22d 100644 > --- a/notmuch.c > +++ b/notmuch.c > @@ -230,6 +230,16 @@ command_t commands[] =3D { > =C2=A0 =C2=A0 =C2=A0 "\t\tSo if you've previously been using sup for mail= , then the\n" > =C2=A0 =C2=A0 =C2=A0 "\t\t\"notmuch restore\" command provides you a way = to import\n" > =C2=A0 =C2=A0 =C2=A0 "\t\tall of your tags (or labels as sup calls them).= " }, > + =C2=A0 =C2=A0 =C2=A0 { "list", notmuch_list_command, > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 "", > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 "\t\tShow additional information about the = database.", > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 "\t\tThe following sub-commands are support= ed:" > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 "\n\n" > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 "\t\ttags\n" > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 "\n" > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 "\t\t\tGenerate a list of all tags availabl= e in the database.\n" > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 "\t\t\tThe list will be sorted alphabetical= ly." > + =C2=A0 =C2=A0 =C2=A0 }, > =C2=A0 =C2=A0 { "help", notmuch_help_command, > =C2=A0 =C2=A0 =C2=A0 "[]", > =C2=A0 =C2=A0 =C2=A0 "\t\tThis message, or more detailed help for the nam= ed command.", > -- > 1.6.3.3 > > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch > > From jeff@ocjtech.us Thu Nov 19 05:13:12 2009 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 30B90431FBC for ; Thu, 19 Nov 2009 05:13:12 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 3S3mZmet+ORs for ; Thu, 19 Nov 2009 05:13:11 -0800 (PST) Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com [209.85.210.204]) by olra.theworths.org (Postfix) with ESMTP id 364C4431FAE for ; Thu, 19 Nov 2009 05:13:11 -0800 (PST) Received: by yxe42 with SMTP id 42so2273393yxe.22 for ; Thu, 19 Nov 2009 05:13:10 -0800 (PST) Received: by 10.150.246.3 with SMTP id t3mr34648ybh.256.1258636389821; Thu, 19 Nov 2009 05:13:09 -0800 (PST) Received: from lt26923.campus.dmacc.edu ([69.57.47.215]) by mx.google.com with ESMTPS id 14sm281818gxk.2.2009.11.19.05.13.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 19 Nov 2009 05:13:08 -0800 (PST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by lt26923.campus.dmacc.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NB6ot-000220-4D; Thu, 19 Nov 2009 07:13:07 -0600 From: "Jeffrey C. Ollie" To: Not Much Mail Date: Thu, 19 Nov 2009 07:12:48 -0600 Message-Id: <1258636368-7778-1-git-send-email-jeff@ocjtech.us> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1258628956-sup-8884@cannonball> References: <1258628956-sup-8884@cannonball> Subject: [notmuch] [PATCH] notmuch: improve installation of emacs mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 13:13:12 -0000 1) Add a separate install target to install emacs mode. 2) Don't hardcode the installation directory, instead use emacs' pkg-config module. 3) Install a byte compiled version of the emacs mode. 4) Install the emacs mode in emacs' site-start directory so that it gets loaded automatically. Signed-off-by: Jeffrey C. Ollie --- Makefile | 6 ++++++ Makefile.local | 13 ++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 023b2ec..17fa4a2 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,9 @@ CFLAGS=-O2 extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc) extra_cxxflags := $(shell xapian-config --cxxflags) +emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir) +emacs_startdir := $(shell pkg-config emacs --variable sitestartdir) + # Now smash together user's values with our extra values override CFLAGS += $(WARN_FLAGS) $(extra_cflags) override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags) @@ -28,6 +31,9 @@ include Makefile.config %.o: %.c $(CC) -c $(CFLAGS) $< -o $@ +%.elc: %.el + emacs -batch -f batch-byte-compile $< + .deps/%.d: %.c @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \ diff --git a/Makefile.local b/Makefile.local index 6bc01a5..e4a27e5 100644 --- a/Makefile.local +++ b/Makefile.local @@ -1,4 +1,4 @@ -all: notmuch notmuch.1.gz +all: notmuch notmuch.1.gz notmuch.elc notmuch_client_srcs = \ notmuch.c \ @@ -25,15 +25,22 @@ notmuch.1.gz: notmuch.1 install: all notmuch.1.gz for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \ - $(DESTDIR)/$(prefix)/share/emacs/site-lisp/ $(DESTDIR)/etc/bash_completion.d/ ; \ + $(DESTDIR)/etc/bash_completion.d/ ; \ do \ install -d $$d ; \ done ; install notmuch $(DESTDIR)$(prefix)/bin/ install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/ - install -m0644 notmuch.el $(DESTDIR)$(prefix)/share/emacs/site-lisp/ install notmuch-completion.bash \ $(DESTDIR)/etc/bash_completion.d/notmuch +install-emacs: install notmuch.elc + for d in $(DESTDIR)/$(emacs_startdir) ; \ + do \ + install -d $$d ; \ + done ; + install -m0644 notmuch.el $(DESTDIR)$(emacs_startdir) + install -m0644 notmuch.elc $(DESTDIR)$(emacs_startdir) + SRCS := $(SRCS) $(notmuch_client_srcs) CLEAN := $(CLEAN) notmuch $(notmuch_client_modules) -- 1.6.5.2 From ingmar@exherbo.org Thu Nov 19 05:19:02 2009 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 7D068431FBC for ; Thu, 19 Nov 2009 05:19:02 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 CZxC3AF+ToZh for ; Thu, 19 Nov 2009 05:18:58 -0800 (PST) Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by olra.theworths.org (Postfix) with ESMTP id 2CC21431FAE for ; Thu, 19 Nov 2009 05:18:58 -0800 (PST) Received: from [83.101.72.69] (helo=localhost) by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NB6uX-0000LT-CK for notmuch@notmuchmail.org; Thu, 19 Nov 2009 13:18:57 +0000 Content-Type: text/plain; charset=utf8 From: Ingmar Vanhassel To: notmuch In-reply-to: <1258636368-7778-1-git-send-email-jeff@ocjtech.us> References: <1258628956-sup-8884@cannonball> <1258636368-7778-1-git-send-email-jeff@ocjtech.us> Date: Thu, 19 Nov 2009 14:18:55 +0100 Message-Id: <1258636656-sup-8390@cannonball> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Subject: Re: [notmuch] [PATCH] notmuch: improve installation of emacs mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 13:19:02 -0000 Excerpts from Jeffrey C. Ollie's message of Thu Nov 19 14:12:48 +0100 2009: > 1) Add a separate install target to install emacs mode. Thanks > 2) Don't hardcode the installation directory, instead use emacs' > pkg-config module. > > 3) Install a byte compiled version of the emacs mode. > > 4) Install the emacs mode in emacs' site-start directory so that it > gets loaded automatically. > > Signed-off-by: Jeffrey C. Ollie > --- > Makefile | 6 ++++++ > Makefile.local | 13 ++++++++++--- > 2 files changed, 16 insertions(+), 3 deletions(-) > > diff --git a/Makefile b/Makefile > index 023b2ec..17fa4a2 100644 > --- a/Makefile > +++ b/Makefile > @@ -7,6 +7,9 @@ CFLAGS=-O2 > extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc) > extra_cxxflags := $(shell xapian-config --cxxflags) > > +emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir) > +emacs_startdir := $(shell pkg-config emacs --variable sitestartdir) > + > # Now smash together user's values with our extra values > override CFLAGS += $(WARN_FLAGS) $(extra_cflags) > override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags) > @@ -28,6 +31,9 @@ include Makefile.config > %.o: %.c > $(CC) -c $(CFLAGS) $< -o $@ > > +%.elc: %.el > + emacs -batch -f batch-byte-compile $< > + Looking at this .. > .deps/%.d: %.c > @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ > $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \ > diff --git a/Makefile.local b/Makefile.local > index 6bc01a5..e4a27e5 100644 > --- a/Makefile.local > +++ b/Makefile.local > @@ -1,4 +1,4 @@ > -all: notmuch notmuch.1.gz > +all: notmuch notmuch.1.gz notmuch.elc .. notmuch.elc requires emacs to build Maybe make emacs && make install-emacs? > > notmuch_client_srcs = \ > notmuch.c \ > @@ -25,15 +25,22 @@ notmuch.1.gz: notmuch.1 > > install: all notmuch.1.gz > for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \ > - $(DESTDIR)/$(prefix)/share/emacs/site-lisp/ > $(DESTDIR)/etc/bash_completion.d/ ; \ > + $(DESTDIR)/etc/bash_completion.d/ ; \ > do \ > install -d $$d ; \ > done ; > install notmuch $(DESTDIR)$(prefix)/bin/ > install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/ > - install -m0644 notmuch.el $(DESTDIR)$(prefix)/share/emacs/site-lisp/ > install notmuch-completion.bash \ > $(DESTDIR)/etc/bash_completion.d/notmuch > > +install-emacs: install notmuch.elc > + for d in $(DESTDIR)/$(emacs_startdir) ; \ > + do \ > + install -d $$d ; \ > + done ; > + install -m0644 notmuch.el $(DESTDIR)$(emacs_startdir) > + install -m0644 notmuch.elc $(DESTDIR)$(emacs_startdir) > + > SRCS := $(SRCS) $(notmuch_client_srcs) > CLEAN := $(CLEAN) notmuch $(notmuch_client_modules) -- Exherbo KDE, X.org maintainer From jan@ryngle.com Thu Nov 19 06:18:27 2009 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 F3A3C431FBC for ; Thu, 19 Nov 2009 06:18:26 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 IPStITc4mskd for ; Thu, 19 Nov 2009 06:18:26 -0800 (PST) Received: from mail-fx0-f217.google.com (mail-fx0-f217.google.com [209.85.220.217]) by olra.theworths.org (Postfix) with ESMTP id 1B326431FAE for ; Thu, 19 Nov 2009 06:18:25 -0800 (PST) Received: by fxm9 with SMTP id 9so2462065fxm.30 for ; Thu, 19 Nov 2009 06:18:21 -0800 (PST) Received: by 10.204.36.206 with SMTP id u14mr4153887bkd.199.1258640301348; Thu, 19 Nov 2009 06:18:21 -0800 (PST) Received: from x61s.janakj (nat.sip-server.net [213.192.30.130]) by mx.google.com with ESMTPS id f31sm734135fkf.42.2009.11.19.06.18.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 19 Nov 2009 06:18:20 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id 9B2C8440651; Thu, 19 Nov 2009 15:18:19 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Thu, 19 Nov 2009 15:18:19 +0100 Message-Id: <1258640299-6012-1-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] notmuch.el: Completion for tag names. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 14:18:27 -0000 Add support for completion of tag names. Several commands ask the user for a tag name. With this feature the user can just press tab and emacs automatically retrieves the list of all existing tags from notmuch database with 'notmuch list tags' and presents a completion buffer to the user. Signed-off-by: Jan Janak --- notmuch.el | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/notmuch.el b/notmuch.el index 706e9f3..587e093 100644 --- a/notmuch.el +++ b/notmuch.el @@ -165,7 +165,8 @@ Unlike builtin `next-line' this version accepts no arguments." (defun notmuch-show-add-tag (&rest toadd) "Add a tag to the current message." - (interactive "sTag to add: ") + (interactive + (list (notmuch-tag-with-completion "Tag to add: "))) (apply 'notmuch-call-notmuch-process (append (cons "tag" (mapcar (lambda (s) (concat "+" s)) toadd)) @@ -174,7 +175,8 @@ Unlike builtin `next-line' this version accepts no arguments." (defun notmuch-show-remove-tag (&rest toremove) "Remove a tag from the current message." - (interactive "sTag to remove: ") + (interactive + (list (notmuch-tag-with-completion "Tag to remove: "))) (let ((tags (notmuch-show-get-tags))) (if (intersection tags toremove :test 'string=) (progn @@ -873,13 +875,22 @@ and will also appear in a buffer named \"*Notmuch errors*\"." (let ((end (- (point) 1))) (split-string (buffer-substring beg end)))))) +(defun notmuch-tag-with-completion (prompt) + (let ((tag-list + (with-output-to-string + (with-current-buffer standard-output + (call-process "notmuch" nil t nil "list" "tags"))))) + (completing-read prompt (split-string tag-list "\n+" t) nil nil nil))) + (defun notmuch-search-add-tag (tag) - (interactive "sTag to add: ") + (interactive + (list (notmuch-tag-with-completion "Tag to add: "))) (notmuch-call-notmuch-process "tag" (concat "+" tag) (notmuch-search-find-thread-id)) (notmuch-search-set-tags (delete-dups (sort (cons tag (notmuch-search-get-tags)) 'string<)))) (defun notmuch-search-remove-tag (tag) - (interactive "sTag to remove: ") + (interactive + (list (notmuch-tag-with-completion "Tag to remove: "))) (notmuch-call-notmuch-process "tag" (concat "-" tag) (notmuch-search-find-thread-id)) (notmuch-search-set-tags (delete tag (notmuch-search-get-tags)))) @@ -964,7 +975,8 @@ current search results AND the additional query string provided." Runs a new search matching only messages that match both the current search results AND that are tagged with the given tag." - (interactive "sFilter by tag: ") + (interactive + (list (notmuch-tag-with-completion "Filter by tag: "))) (notmuch-search (concat notmuch-search-query-string " and tag:" tag) notmuch-search-oldest-first)) (defun notmuch () -- 1.6.3.3 From jeff@ocjtech.us Thu Nov 19 06:27:28 2009 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 887B3431FBC for ; Thu, 19 Nov 2009 06:27:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 xGqVpb-09FmG for ; Thu, 19 Nov 2009 06:27:27 -0800 (PST) Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com [209.85.210.204]) by olra.theworths.org (Postfix) with ESMTP id A0C94431FAE for ; Thu, 19 Nov 2009 06:27:27 -0800 (PST) Received: by yxe42 with SMTP id 42so2346340yxe.22 for ; Thu, 19 Nov 2009 06:27:25 -0800 (PST) Received: by 10.150.28.4 with SMTP id b4mr238825ybb.124.1258640844305; Thu, 19 Nov 2009 06:27:24 -0800 (PST) Received: from lt26923.campus.dmacc.edu ([161.210.45.123]) by mx.google.com with ESMTPS id 13sm324247gxk.13.2009.11.19.06.27.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 19 Nov 2009 06:27:23 -0800 (PST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by lt26923.campus.dmacc.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NB7yk-00015R-CD; Thu, 19 Nov 2009 08:27:22 -0600 From: "Jeffrey C. Ollie" To: Not Much Mail Date: Thu, 19 Nov 2009 08:27:02 -0600 Message-Id: <1258640822-4146-1-git-send-email-jeff@ocjtech.us> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1258636656-sup-8390@cannonball> References: <1258636656-sup-8390@cannonball> Subject: [notmuch] [PATCH] notmuch: improve installation of emacs mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 14:27:28 -0000 1) Add a separate targets to build and install emacs mode. 2) Don't hardcode the installation directory, instead use emacs' pkg-config module. 3) Install a byte compiled version of the emacs mode. 4) Install the emacs mode in emacs' site-start directory so that it gets loaded automatically. 5) Ignore byte-compiled emacs files. Signed-off-by: Jeffrey C. Ollie --- .gitignore | 2 +- Makefile | 6 ++++++ Makefile.local | 15 ++++++++++++--- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 8417d60..7d3c543 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ notmuch.1.gz *.[ao] *~ .*.swp - +*.elc diff --git a/Makefile b/Makefile index 023b2ec..17fa4a2 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,9 @@ CFLAGS=-O2 extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc) extra_cxxflags := $(shell xapian-config --cxxflags) +emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir) +emacs_startdir := $(shell pkg-config emacs --variable sitestartdir) + # Now smash together user's values with our extra values override CFLAGS += $(WARN_FLAGS) $(extra_cflags) override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags) @@ -28,6 +31,9 @@ include Makefile.config %.o: %.c $(CC) -c $(CFLAGS) $< -o $@ +%.elc: %.el + emacs -batch -f batch-byte-compile $< + .deps/%.d: %.c @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \ diff --git a/Makefile.local b/Makefile.local index 6bc01a5..2bb4521 100644 --- a/Makefile.local +++ b/Makefile.local @@ -1,5 +1,7 @@ all: notmuch notmuch.1.gz +emacs: notmuch.elc + notmuch_client_srcs = \ notmuch.c \ notmuch-config.c \ @@ -25,15 +27,22 @@ notmuch.1.gz: notmuch.1 install: all notmuch.1.gz for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \ - $(DESTDIR)/$(prefix)/share/emacs/site-lisp/ $(DESTDIR)/etc/bash_completion.d/ ; \ + $(DESTDIR)/etc/bash_completion.d/ ; \ do \ install -d $$d ; \ done ; install notmuch $(DESTDIR)$(prefix)/bin/ install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/ - install -m0644 notmuch.el $(DESTDIR)$(prefix)/share/emacs/site-lisp/ install notmuch-completion.bash \ $(DESTDIR)/etc/bash_completion.d/notmuch +install-emacs: install emacs + for d in $(DESTDIR)/$(emacs_startdir) ; \ + do \ + install -d $$d ; \ + done ; + install -m0644 notmuch.el $(DESTDIR)$(emacs_startdir) + install -m0644 notmuch.elc $(DESTDIR)$(emacs_startdir) + SRCS := $(SRCS) $(notmuch_client_srcs) -CLEAN := $(CLEAN) notmuch $(notmuch_client_modules) +CLEAN := $(CLEAN) notmuch $(notmuch_client_modules) notmuch.elc -- 1.6.5.2 From cworth@cworth.org Thu Nov 19 06:41:25 2009 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 621F3431FC0; Thu, 19 Nov 2009 06:41:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 dbw8IyXvoDAj; Thu, 19 Nov 2009 06:41:24 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2861D431FAE; Thu, 19 Nov 2009 06:41:23 -0800 (PST) From: Carl Worth To: Jan Janak , notmuch@notmuchmail.org In-Reply-To: References: <1258630481-5133-1-git-send-email-jan@ryngle.com> <1258630481-5133-2-git-send-email-jan@ryngle.com> Date: Thu, 19 Nov 2009 15:41:12 +0100 Message-ID: <87lji2bmrb.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH 2/2] notmuch list: A new command to produce various lists. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 14:41:25 -0000 On Thu, 19 Nov 2009 12:52:49 +0100, Jan Janak wrote: > I implemented a new notmuch command that can be used to list all tags > present in the database: Ah, very very interesting! I'd been planning on doing something like this soon. And I was just thinking of "notmuch tags" as the command line. What other ideas do you have in mind for "notmuch list" ? One way we could possibly do "notmuch tags" is to have it accept search terms and then return the list of all tags from the matched messages. Then of course we'd need a syntax for a search term to match all messages, (which we want in any case). > The main reason why I implemented this is because I am also working on > adding the tag completion feature to the Emacs mode. This is very > useful if you have a large collection of tags--it can save you some > typing and, perhaps more importantly, it minimizes the risk of having > typos in tag names. I'll send a patch for that later too. That will be a very nice feature to have, yes. The other reason I've wanted this is have something like a "folder view" that would show a list of tags and a number of messages with each tag, (or a number of messages with that tag and the inbox tag). I know that Keith said he'd prefer to use a view like that as his primary way of reading mail. Actual review of the patch later. -Carl From keithp@keithp.com Thu Nov 19 07:09:59 2009 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 DCDD6431FBF for ; Thu, 19 Nov 2009 07:09:59 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 OzlUptpA2BQN for ; Thu, 19 Nov 2009 07:09:59 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 1A55D431FAE for ; Thu, 19 Nov 2009 07:09:58 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 2AE51B9404C; Thu, 19 Nov 2009 07:09:54 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8-VPkSRCaAdO; Thu, 19 Nov 2009 07:09:48 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 6D54CB9402F; Thu, 19 Nov 2009 07:09:48 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 5B494B88014; Thu, 19 Nov 2009 07:09:48 -0800 (PST) From: Keith Packard To: "Aneesh Kumar K.V" , notmuch@notmuchmail.org In-Reply-To: <1258611054-3888-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1258611054-3888-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Date: Thu, 19 Nov 2009 07:09:47 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH -V3] notmuch: Add search mode hook X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 15:10:00 -0000 --=-=-= On Thu, 19 Nov 2009 11:40:54 +0530, "Aneesh Kumar K.V" wrote: > This patch add notmuch-search-hook that gets run when we > after displaying search results Looks good. > Signed-off-by: Aneesh Kumar K.V Reviewed-by: Keith Packard -- keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLBV+8Qp8BWwlsTdMRAr1lAKDD+wB4Z64EWK0IB1gvThf0ZQ0S8QCfSbMz 8b6epkJNFX0h+n7wnyL3WnM= =saJS -----END PGP SIGNATURE----- --=-=-=-- From jan@ryngle.com Thu Nov 19 07:40:34 2009 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 D4A3A431FBF for ; Thu, 19 Nov 2009 07:40:34 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 kHnsMSVR0zol for ; Thu, 19 Nov 2009 07:40:34 -0800 (PST) Received: from mail-fx0-f217.google.com (mail-fx0-f217.google.com [209.85.220.217]) by olra.theworths.org (Postfix) with ESMTP id 14706431FAE for ; Thu, 19 Nov 2009 07:40:33 -0800 (PST) Received: by fxm9 with SMTP id 9so2551475fxm.30 for ; Thu, 19 Nov 2009 07:40:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.155.92 with SMTP id r28mr131734bkw.121.1258645232952; Thu, 19 Nov 2009 07:40:32 -0800 (PST) In-Reply-To: <87lji2bmrb.fsf@yoom.home.cworth.org> References: <1258630481-5133-1-git-send-email-jan@ryngle.com> <1258630481-5133-2-git-send-email-jan@ryngle.com> <87lji2bmrb.fsf@yoom.home.cworth.org> Date: Thu, 19 Nov 2009 16:40:32 +0100 Message-ID: From: Jan Janak To: Carl Worth Content-Type: text/plain; charset=UTF-8 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 2/2] notmuch list: A new command to produce various lists. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 15:40:35 -0000 On Thu, Nov 19, 2009 at 3:41 PM, Carl Worth wrote: > On Thu, 19 Nov 2009 12:52:49 +0100, Jan Janak wrote: >> I implemented a new notmuch command that can be used to list all tags >> present in the database: > > Ah, very very interesting! I'd been planning on doing something like > this soon. And I was just thinking of "notmuch tags" as the command > line. What other ideas do you have in mind for "notmuch list" ? Yes, I considered "notmuch tags" too, but then I realized that we already have "notmuch tag" and I was worried that having both tag and tags as commands could be confusing. I was also thinking that "notmuch list" could be extended to list other terms than just tags, but I currently have no use-case for that. In any case, this is just an initial proposal, I can change it to use some other command name if you prefer that. > One way we could possibly do "notmuch tags" is to have it accept search > terms and then return the list of all tags from the matched messages. > Then of course we'd need a syntax for a search term to match all > messages, (which we want in any case). That sounds like a good idea. If the user does not provide any search terms then we could return all tags from the database like we do now. If there is a search term then we could iterate through all the messages that match it, collect their tags, sort them and present to the user. >> The main reason why I implemented this is because I am also working on >> adding the tag completion feature to the Emacs mode. This is very >> useful if you have a large collection of tags--it can save you some >> typing and, perhaps more importantly, it minimizes the risk of having >> typos in tag names. I'll send a patch for that later too. > > That will be a very nice feature to have, yes. > > The other reason I've wanted this is have something like a "folder view" > that would show a list of tags and a number of messages with each tag, > (or a number of messages with that tag and the inbox tag). Yeah, I would want that too :-). I've already looked into this and it seems like it should be easy to implement. At least it seems to be easy to get the numbers from Xapian. So we would just need to come up with a format for the list of tags with message counts, read it into emacs and present in a buffer. -- Jan From aperez@igalia.com Thu Nov 19 07:44:36 2009 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 BA141431FBC for ; Thu, 19 Nov 2009 07:44:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 aZC+1VpyH2wF for ; Thu, 19 Nov 2009 07:44:36 -0800 (PST) Received: from alice.connectical.com (alice.connectical.com [208.89.208.235]) by olra.theworths.org (Postfix) with ESMTP id 249B0431FAE for ; Thu, 19 Nov 2009 07:44:36 -0800 (PST) Received: (qmail 5647 invoked from network); 19 Nov 2009 15:44:34 -0000 Received: from 155.99.117.91.static.mundo-r.com (HELO hikari.localdomain) (aperez@91.117.99.155) by alice.connectical.com with ESMTPA; 19 Nov 2009 15:44:34 -0000 Received: from hikari (localhost [127.0.0.1]) by hikari.localdomain (Postfix) with ESMTP id 40C8F300FCFD for ; Thu, 19 Nov 2009 16:45:47 +0100 (CET) Date: Thu, 19 Nov 2009 16:45:43 +0100 From: Adrian Perez de Castro To: notmuch@notmuchmail.org Message-ID: <20091119164543.25e7afe5@hikari> In-Reply-To: <935ead450911181000w2cddfe95qe9efd5bea9f9209d@mail.gmail.com> References: <935ead450911181000w2cddfe95qe9efd5bea9f9209d@mail.gmail.com> Organization: Igalia X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.3; x86_64-redhat-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAADBQTFRFBwcHFhYWKCgoNzc3SEhIV1dXaGhod3d3iIiIlpaWqKiouLi4x8fH2NjY5+fn/v7+rSjDkgAAAjVJREFUOE9l07tvE0EQwOHfrkV9O+eko7g701BBfECJsIigT2IpooIqaSiRUEB0REj00FBQgYSCkhry+gecUPJybJeIxLumTbilsH2PMNXufDOa3ZVW+1JkpbUmD/8+vXR3c7or4Gz93mH309Kz8/C9/RQge7VfhW/LW+PF8IkrQ7Z6OKmQr1tl+LU/yWP9mxJka9O88fZHPwf/7u0kLyCnX3I4fQhgjAgIfi+HHw5A1Y2ggIMcFKAEnRoL0M3BosI4TI2IATjuT8DvSNJoNNJgkIhxlr9TUHeSpDnfohlIrMBlU+BGmsZqfr69FMfGMw4NoG835+J62riWyjQ/uXlTQjNUIoYegMsBM0pCD8oDas7n4HQsBghXFxJTW42KDs+4XLfjsN0wOYgABqARjMKIHIaAQnmHjsI5Cvi9Cf6k03OoWBkpIP3Q7354+dEimFBKHbMP9oKjwfd9gbrxR5KDToczK4uPF8UgNomKU2GaENRi77zyDKICxKBS4xXYbONPMQMdYZTBwMiMWiUg9g6UJ3OBogzjV8E7sBVwyvfAOYdQhsABzuOxI1MGZbs98Q6Md5UOfbbR2R0eWOesrnRw5ajT6f60LrNhWIHZpBnUWv2s14ukArWWTqTes3YQxRXgFkcMu70TPYqqUBs0YwmO967OVIdTG4bY4a7WLaqgLm5vbHdH5np0Dri//fmg7y8scB4u3+zsuNlH0X+g19bby69b+TYH6isvns8VdQWgxj9tHP8AR5/hSdYqkwsAAAAASUVORK5CYII= Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/K8jLgvOapC4j66Shw8d14a6"; protocol="application/pgp-signature" Subject: Re: [notmuch] Segfault searching for tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 15:44:36 -0000 --Sig_/K8jLgvOapC4j66Shw8d14a6 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 18 Nov 2009 12:00:10 -0600, Jeffrey wrote: > Getting the following segfault with 306635c2 on Fedora 12. Seems to > be happening with any 'tag:' search that returns results. For > example, 'notmuch search tag:inbox' and 'notmuch search tag:unread' > segfault but 'notmuch search tag:nosuchtag', 'notmuch search > subject:logwatch' and 'notmuch search video' seem to work fine. >=20 > Core was generated by `/usr/bin/notmuch search --sort=3Doldest-first tag:= inbox'. > Program terminated with signal 11, Segmentation fault. > \#0 Xapian::TermIterator::operator* (this=3D) > at api/omtermlistiterator.cc:78 > 78 RETURN(internal->get_termname()); > Current language: auto > The current source language is "auto; currently c++". I have hit what I believe is exactly the same problem. In my case, some results are printed when I execute "notmuch search tag:inbox", and then the program crashes in the same exact place. The thing is that in notmuch_message_get_in_reply_to(), line 288, a NULL instance of Xapian::TermIterator is dereferenced. In my particular case, the culpript is a cache file of Claws-Mail, as seen in the following GDB session: Program received signal SIGSEGV, Segmentation fault. Xapian::TermIterator::operator* (this=3D) at api/omter= mlistiterator.cc:78 78 RETURN(internal->get_termname()); Current language: auto The current source language is "auto; currently c++". (gdb) bt #0 Xapian::TermIterator::operator* (this=3D) at api/o= mtermlistiterator.cc:78 #1 0x000000000040f611 in _notmuch_message_get_in_reply_to(message=3D0x76dc= d0) at lib/message.cc:288 #2 0x0000000000412030 in _resolve_thread_relationships (thread=3D0x6a8b80)= at lib/thread.cc:157 #3 0x0000000000412454 in _notmuch_thread_create (ctx=3D0x65f1b0, notmuch= =3D0x62d320, thread_id=3D 0x765530 "01b17ddb4479a0dc0b416bb63b92c43d", quer= y_string=3D0x65f220 "tag:inbox") at lib/thread.cc:285 #4 0x0000000000411982 in notmuch_query_search_threads (query=3D0x65f1b0, f= irst=3D100, max_threads=3D-1) at lib/query.cc:218 #5 0x000000000040924d in do_search_threads (ctx=3D0x61f140, query=3D0x65f1= b0, sort=3DNOTMUCH_SORT_NEWEST_FIRST, first=3D100, max_threads=3D-1) at not= much-search.c:40 #6 0x00000000004097ef in notmuch_search_command (ctx=3D0x61f140, argc=3D1,= argv=3D0x7fffffffe188) at notmuch-search.c:164 #7 0x00000000004066f1 in main (argc=3D3, argv=3D0x7fffffffe178) at notmuch= .c:400 (gdb) frame 1 #1 0x000000000040f611 in _notmuch_message_get_in_reply_to (message=3D0x76d= cd0) at lib/message.cc:288 288 in_reply_to =3D *i; (gdb) p *message $1 =3D {notmuch =3D 0x62d320, doc_id =3D 1, frozen =3D 0, message_id =3D 0x= 76db60 "", thread_id =3D 0x0,=20 in_reply_to =3D 0x0, filename =3D 0x76dc50 "/home/aperez/.mail/inbox/.cla= ws_cache", message_file =3D 0x0,=20 replies =3D 0x76d250, doc =3D {internal =3D {dest =3D 0x76d450}}} As you can see, there "filename" points to a Claws-Mail cache file, which is a binary file (I can provide a copy if needed). I suspect that this is related to the fact that the iterator ends up being NULL somehow. I will experiment a bit more with this issue -- maybe just avoiding adding files whose name starts with a dot will suffice as temporary fix. Cheers, --=20 Adrian Perez de Castro Igalia - Free Software Engineering --Sig_/K8jLgvOapC4j66Shw8d14a6 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (GNU/Linux) iEYEARECAAYFAksFaCsACgkQkcVZ2+TJEjuf/ACcDkUJCZFAPp20YPLGP+R/g0n2 k8IAn0qbqWnBm+33Wq4kOP4tGE5jixlm =Pn2T -----END PGP SIGNATURE----- --Sig_/K8jLgvOapC4j66Shw8d14a6-- From bdale@gag.com Thu Nov 19 09:59:20 2009 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 282BF431FAE for ; Thu, 19 Nov 2009 09:59:20 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 AkJRKq5FUvS7 for ; Thu, 19 Nov 2009 09:59:19 -0800 (PST) Received: from winfree.gag.com (winfree.gag.com [192.133.104.8]) by olra.theworths.org (Postfix) with ESMTP id 1B061431FBC for ; Thu, 19 Nov 2009 09:59:19 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by winfree.gag.com (Postfix) with ESMTP id 5228D3027; Thu, 19 Nov 2009 10:59:18 -0700 (MST) X-Virus-Scanned: Debian amavisd-new at gag.com Received: from winfree.gag.com ([127.0.0.1]) by localhost (winfree.gag.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gu-weZJMXeZ0; Thu, 19 Nov 2009 10:59:17 -0700 (MST) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by winfree.gag.com (Postfix) with ESMTP id 23AFF3025; Thu, 19 Nov 2009 10:59:17 -0700 (MST) From: Bdale Garbee To: Carl Worth In-Reply-To: <87lji2bmrb.fsf@yoom.home.cworth.org> References: <1258630481-5133-1-git-send-email-jan@ryngle.com> <1258630481-5133-2-git-send-email-jan@ryngle.com> <87lji2bmrb.fsf@yoom.home.cworth.org> Content-Type: text/plain; charset="UTF-8" Date: Thu, 19 Nov 2009 10:59:13 -0700 Message-ID: <1258653555.13952.13.camel@rover> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 2/2] notmuch list: A new command to produce various lists. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 17:59:20 -0000 On Thu, 2009-11-19 at 15:41 +0100, Carl Worth wrote: > The other reason I've wanted this is have something like a "folder view" > that would show a list of tags and a number of messages with each tag, > (or a number of messages with that tag and the inbox tag). > > I know that Keith said he'd prefer to use a view like that as his > primary way of reading mail. Yes. I've been pondering approaches to prioritizing the pool of unread messages. Most of my thinking so far is along the lines of the ability to automatically apply tags to new messages on various criteria combined with the ability to manipulate the order in which tags are presented in a view like what you're describing. For better or worse, with about 45k messages hitting my inbox per year *after* most of the list traffic gets peeled off and fed to a private NNTP server, it's not about reading all of my email any more... it's about finding and reading the stuff that actually matters *to me*. Can't tell you how excited I am about what's happening here! Bdale From keithp@keithp.com Thu Nov 19 11:25:37 2009 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 D618F431FBC for ; Thu, 19 Nov 2009 11:25:37 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ecef8lZ4eOd9 for ; Thu, 19 Nov 2009 11:25:37 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id E1827431FAE for ; Thu, 19 Nov 2009 11:25:36 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 37FCCB9404C; Thu, 19 Nov 2009 11:25:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id MTnGo3kgEIyf; Thu, 19 Nov 2009 11:25:33 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 230CCB9402F; Thu, 19 Nov 2009 11:25:33 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id DA5D5B88003; Thu, 19 Nov 2009 11:25:32 -0800 (PST) From: Keith Packard To: "Jeffrey C. Ollie" , Not Much Mail In-Reply-To: <1258611530-20719-1-git-send-email-jeff@ocjtech.us> References: <1258611530-20719-1-git-send-email-jeff@ocjtech.us> Date: Thu, 19 Nov 2009 11:25:30 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] notmuch: improve installation of emacs mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 19:25:38 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Thu, 19 Nov 2009 00:18:50 -0600, "Jeffrey C. Ollie" wr= ote: > 1) Don't hardcode the installation directory, instead use emacs' > pkg-config module. >=20 > 2) Install a byte compiled version of the emacs mode. yes, both of these seem reasonable > 3) Install the emacs mode in emacs' site-start directory so that it > gets loaded automatically. I'd say anyone using notmuch should just use (require 'notmuch) instead; that way you don't abuse people not using this system. This is similar to most other package usage with emacs... =2D- keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLBZuqQp8BWwlsTdMRAnOhAKCI/jSQdG3cEiYgqcycYDluQzBTXgCeOS1n V9kGgF7fbV2K6zkXWRsT+hs= =0EsZ -----END PGP SIGNATURE----- --=-=-=-- From ingmar@exherbo.org Thu Nov 19 11:32:33 2009 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 95450431FBC for ; Thu, 19 Nov 2009 11:32:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 R5Zh77vdZtx5 for ; Thu, 19 Nov 2009 11:32:33 -0800 (PST) Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by olra.theworths.org (Postfix) with ESMTP id AEC14431FAE for ; Thu, 19 Nov 2009 11:32:32 -0800 (PST) Received: from [83.101.72.69] (helo=localhost) by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NBCjz-0001RW-H8 for notmuch@notmuchmail.org; Thu, 19 Nov 2009 19:32:28 +0000 Content-Type: text/plain; charset=utf8 From: Ingmar Vanhassel To: notmuch In-reply-to: <1258640822-4146-1-git-send-email-jeff@ocjtech.us> References: <1258636656-sup-8390@cannonball> <1258640822-4146-1-git-send-email-jeff@ocjtech.us> Date: Thu, 19 Nov 2009 20:32:22 +0100 Message-Id: <1258648185-sup-3691@cannonball> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Subject: Re: [notmuch] [PATCH] notmuch: improve installation of emacs mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 19:32:33 -0000 Excerpts from Jeffrey C. Ollie's message of Thu Nov 19 15:27:02 +0100 2009: > 1) Add a separate targets to build and install emacs mode. > > 2) Don't hardcode the installation directory, instead use emacs' > pkg-config module. > > 3) Install a byte compiled version of the emacs mode. > > 4) Install the emacs mode in emacs' site-start directory so that it > gets loaded automatically. > > 5) Ignore byte-compiled emacs files. > > Signed-off-by: Jeffrey C. Ollie Reviewed-by: Ingmar Vanhassel Thanks again! > --- > .gitignore | 2 +- > Makefile | 6 ++++++ > Makefile.local | 15 ++++++++++++--- > 3 files changed, 19 insertions(+), 4 deletions(-) > > diff --git a/.gitignore b/.gitignore > index 8417d60..7d3c543 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -5,4 +5,4 @@ notmuch.1.gz > *.[ao] > *~ > .*.swp > - > +*.elc > diff --git a/Makefile b/Makefile > index 023b2ec..17fa4a2 100644 > --- a/Makefile > +++ b/Makefile > @@ -7,6 +7,9 @@ CFLAGS=-O2 > extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc) > extra_cxxflags := $(shell xapian-config --cxxflags) > > +emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir) > +emacs_startdir := $(shell pkg-config emacs --variable sitestartdir) > + > # Now smash together user's values with our extra values > override CFLAGS += $(WARN_FLAGS) $(extra_cflags) > override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags) > @@ -28,6 +31,9 @@ include Makefile.config > %.o: %.c > $(CC) -c $(CFLAGS) $< -o $@ > > +%.elc: %.el > + emacs -batch -f batch-byte-compile $< > + > .deps/%.d: %.c > @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ > $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \ > diff --git a/Makefile.local b/Makefile.local > index 6bc01a5..2bb4521 100644 > --- a/Makefile.local > +++ b/Makefile.local > @@ -1,5 +1,7 @@ > all: notmuch notmuch.1.gz > > +emacs: notmuch.elc > + > notmuch_client_srcs = \ > notmuch.c \ > notmuch-config.c \ > @@ -25,15 +27,22 @@ notmuch.1.gz: notmuch.1 > > install: all notmuch.1.gz > for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \ > - $(DESTDIR)/$(prefix)/share/emacs/site-lisp/ > $(DESTDIR)/etc/bash_completion.d/ ; \ > + $(DESTDIR)/etc/bash_completion.d/ ; \ > do \ > install -d $$d ; \ > done ; > install notmuch $(DESTDIR)$(prefix)/bin/ > install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/ > - install -m0644 notmuch.el $(DESTDIR)$(prefix)/share/emacs/site-lisp/ > install notmuch-completion.bash \ > $(DESTDIR)/etc/bash_completion.d/notmuch > > +install-emacs: install emacs > + for d in $(DESTDIR)/$(emacs_startdir) ; \ > + do \ > + install -d $$d ; \ > + done ; > + install -m0644 notmuch.el $(DESTDIR)$(emacs_startdir) > + install -m0644 notmuch.elc $(DESTDIR)$(emacs_startdir) > + > SRCS := $(SRCS) $(notmuch_client_srcs) > -CLEAN := $(CLEAN) notmuch $(notmuch_client_modules) > +CLEAN := $(CLEAN) notmuch $(notmuch_client_modules) notmuch.elc -- Exherbo KDE, X.org maintainer From jeff@ocjtech.us Thu Nov 19 13:20:27 2009 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 4342E431FBC for ; Thu, 19 Nov 2009 13:20:27 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 aS9oiwhF2RZh for ; Thu, 19 Nov 2009 13:20:26 -0800 (PST) Received: from ey-out-1920.google.com (ey-out-1920.google.com [74.125.78.149]) by olra.theworths.org (Postfix) with ESMTP id 283B0431FAE for ; Thu, 19 Nov 2009 13:20:26 -0800 (PST) Received: by ey-out-1920.google.com with SMTP id 26so833174eyw.6 for ; Thu, 19 Nov 2009 13:20:20 -0800 (PST) Received: by 10.213.23.213 with SMTP id s21mr1996972ebb.76.1258665619940; Thu, 19 Nov 2009 13:20:19 -0800 (PST) Received: from lt26923.campus.dmacc.edu ([161.210.45.123]) by mx.google.com with ESMTPS id 14sm419165ewy.3.2009.11.19.13.20.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 19 Nov 2009 13:20:18 -0800 (PST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by lt26923.campus.dmacc.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NBEQJ-0000C2-88; Thu, 19 Nov 2009 15:20:15 -0600 From: "Jeffrey C. Ollie" To: Not Much Mail Date: Thu, 19 Nov 2009 15:20:01 -0600 Message-Id: <1258665602-700-1-git-send-email-jeff@ocjtech.us> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: References: Subject: [notmuch] [PATCH 1/2] Improve installation of emacs mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 21:20:27 -0000 1) Add a separate targets to build and install emacs mode. 2) Don't hardcode the installation directory, instead use emacs' pkg-config module. 3) Install a byte compiled version of the emacs mode. 4) Install the emacs mode in emacs' site-lisp directory. Put "(require 'notmuch)" in your .emacs to load it automatically. 5) Ignore byte-compiled emacs files. Signed-off-by: Jeffrey C. Ollie --- .gitignore | 2 +- Makefile | 6 ++++++ Makefile.local | 15 ++++++++++++--- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 8417d60..7d3c543 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ notmuch.1.gz *.[ao] *~ .*.swp - +*.elc diff --git a/Makefile b/Makefile index 023b2ec..17fa4a2 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,9 @@ CFLAGS=-O2 extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc) extra_cxxflags := $(shell xapian-config --cxxflags) +emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir) +emacs_startdir := $(shell pkg-config emacs --variable sitestartdir) + # Now smash together user's values with our extra values override CFLAGS += $(WARN_FLAGS) $(extra_cflags) override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags) @@ -28,6 +31,9 @@ include Makefile.config %.o: %.c $(CC) -c $(CFLAGS) $< -o $@ +%.elc: %.el + emacs -batch -f batch-byte-compile $< + .deps/%.d: %.c @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \ diff --git a/Makefile.local b/Makefile.local index c44d160..ecd4ceb 100644 --- a/Makefile.local +++ b/Makefile.local @@ -1,5 +1,7 @@ all: notmuch notmuch.1.gz +emacs: notmuch.elc + notmuch_client_srcs = \ notmuch.c \ notmuch-config.c \ @@ -25,15 +27,22 @@ notmuch.1.gz: notmuch.1 install: all notmuch.1.gz for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \ - $(DESTDIR)/$(prefix)/share/emacs/site-lisp/ $(DESTDIR)/etc/bash_completion.d/ ; \ + $(DESTDIR)/etc/bash_completion.d/ ; \ do \ install -d $$d ; \ done ; install notmuch $(DESTDIR)$(prefix)/bin/ install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/ - install -m0644 notmuch.el $(DESTDIR)$(prefix)/share/emacs/site-lisp/ install notmuch-completion.bash \ $(DESTDIR)/etc/bash_completion.d/notmuch +install-emacs: install emacs + for d in $(DESTDIR)/$(emacs_lispdir) ; \ + do \ + install -d $$d ; \ + done ; + install -m0644 notmuch.el $(DESTDIR)$(emacs_lispdir) + install -m0644 notmuch.elc $(DESTDIR)$(emacs_lispdir) + SRCS := $(SRCS) $(notmuch_client_srcs) -CLEAN := $(CLEAN) notmuch $(notmuch_client_modules) +CLEAN := $(CLEAN) notmuch $(notmuch_client_modules) notmuch.elc -- 1.6.5.2 From jeff@ocjtech.us Thu Nov 19 13:20:30 2009 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 522F5431FBF for ; Thu, 19 Nov 2009 13:20:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Ux5MP480xaB1 for ; Thu, 19 Nov 2009 13:20:29 -0800 (PST) Received: from ey-out-1920.google.com (ey-out-1920.google.com [74.125.78.149]) by olra.theworths.org (Postfix) with ESMTP id C4AF0431FC3 for ; Thu, 19 Nov 2009 13:20:28 -0800 (PST) Received: by ey-out-1920.google.com with SMTP id 26so833174eyw.6 for ; Thu, 19 Nov 2009 13:20:28 -0800 (PST) Received: by 10.213.24.9 with SMTP id t9mr526405ebb.4.1258665627700; Thu, 19 Nov 2009 13:20:27 -0800 (PST) Received: from lt26923.campus.dmacc.edu ([161.210.45.123]) by mx.google.com with ESMTPS id 15sm420134ewy.4.2009.11.19.13.20.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 19 Nov 2009 13:20:25 -0800 (PST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by lt26923.campus.dmacc.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NBEQR-0000C2-EE; Thu, 19 Nov 2009 15:20:23 -0600 From: "Jeffrey C. Ollie" To: Not Much Mail Date: Thu, 19 Nov 2009 15:20:02 -0600 Message-Id: <1258665602-700-2-git-send-email-jeff@ocjtech.us> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1258665602-700-1-git-send-email-jeff@ocjtech.us> References: <1258665602-700-1-git-send-email-jeff@ocjtech.us> Subject: [notmuch] [PATCH 2/2] Add a .desktop file entry. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 21:20:30 -0000 This will add an entry in your window manager's menus that will create up a new emacs process and start notmuch. Signed-off-by: Jeffrey C. Ollie --- notmuch.desktop | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) create mode 100644 notmuch.desktop diff --git a/notmuch.desktop b/notmuch.desktop new file mode 100644 index 0000000..d29dff6 --- /dev/null +++ b/notmuch.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Not Much Mail +Exec=emacs -f notmuch +Icon=emblem-mail +Terminal=false +Type=Application +Categories=Network;Email -- 1.6.5.2 From jeff@ocjtech.us Thu Nov 19 13:45:21 2009 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 C811A431FBC for ; Thu, 19 Nov 2009 13:45:21 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 2FUTTpA21xgg for ; Thu, 19 Nov 2009 13:45:21 -0800 (PST) Received: from mail-yw0-f173.google.com (mail-yw0-f173.google.com [209.85.211.173]) by olra.theworths.org (Postfix) with ESMTP id 2F555431FAE for ; Thu, 19 Nov 2009 13:45:21 -0800 (PST) Received: by ywh3 with SMTP id 3so2789396ywh.22 for ; Thu, 19 Nov 2009 13:45:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.91.164.17 with SMTP id r17mr832544ago.92.1258666624923; Thu, 19 Nov 2009 13:37:04 -0800 (PST) In-Reply-To: References: <1258584691-29260-1-git-send-email-ingmar@exherbo.org> Date: Thu, 19 Nov 2009 15:37:04 -0600 Message-ID: <935ead450911191337o4d6737e0g85b59fe081aeb07@mail.gmail.com> From: Jeffrey Ollie To: Karl Wiberg Content-Type: text/plain; charset=UTF-8 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 2/2] .gitignore: Add common editor droppings X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 21:45:21 -0000 On Wed, Nov 18, 2009 at 11:39 PM, Karl Wiberg wrote: > > Since these patterns are specific to a user rather than a project, > shouldn't they go in the user's ignore file (~/.gitignore) rather than > the project's? If every user could be counted on to put them in their personal .gitignore probably not, but I think that it's good practice to at least ignore the stuff that emacs and vim use for temporary files and backups. -- Jeff Ollie From alex.boterolowry@gmail.com Thu Nov 19 14:21:17 2009 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 60A10431FBC for ; Thu, 19 Nov 2009 14:21:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ZGm8NCtpcajm for ; Thu, 19 Nov 2009 14:21:17 -0800 (PST) Received: from mail-fx0-f169.google.com (mail-fx0-f169.google.com [209.85.220.169]) by olra.theworths.org (Postfix) with ESMTP id DA708431FAE for ; Thu, 19 Nov 2009 14:21:16 -0800 (PST) Received: by fxm9 with SMTP id 9so851759fxm.10 for ; Thu, 19 Nov 2009 14:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :date:message-id:x-mailer; bh=0GXWWFjbqCA3I34YbAr3xJSMcZsKafDnRmZletBkGsE=; b=jc0Ar3oNUAvAIr62jtgQvHXzDh6XagVFJjlJL1pirNZsAiz+Pub41JpL7ld2bLSs9J v9yBKTXH1y+ddnfnweHLnlKexSYoMeuOHrqKc/ixGLKL0Pgm0u8fcV6LpHYN0CLD3hui lfg6si5qBBFfmMHHTgukxdceDeuV+MNOVUE7o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=i2TB5cDfWNPKw9/8HvjbAWy5d4dYDdSfQFVycOCUFinEw1tH0/94b5bMK8/DtV69B2 IT6pIjoirLVMU2duhQ2KJurmOdq/IVtlKkwP4a8il/5THYJojsxTcAnDrWjnX7NF7DQ7 uYdUuOxFLQ7lDMIcz9OIPsglBtywUgbAkpNfU= Received: by 10.216.93.14 with SMTP id k14mr155546wef.152.1258669273138; Thu, 19 Nov 2009 14:21:13 -0800 (PST) Received: from fortitudo (nat08.metaweb.com [208.68.111.135]) by mx.google.com with ESMTPS id t2sm1605867gve.9.2009.11.19.14.21.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 19 Nov 2009 14:21:12 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo) id 717e by fortitudo (DragonFly Mail Agent) Thu, 19 Nov 2009 14:21:10 -0800 From: Alexander Botero-Lowry To: notmuch@notmuchmail.org Date: Thu, 19 Nov 2009 14:20:56 -0800 Message-Id: <1258669256-13807-1-git-send-email-alex.boterolowry@gmail.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Buttonize citation expander. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 19 Nov 2009 22:21:17 -0000 Currently the button has no action or special handling at all. --- notmuch.el | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/notmuch.el b/notmuch.el index 1fc54c3..6a34282 100644 --- a/notmuch.el +++ b/notmuch.el @@ -453,10 +453,17 @@ which this thread was originally shown." (forward-line)) (let ((overlay (make-overlay beg-sub (point)))) (overlay-put overlay 'invisible 'notmuch-show-citation) - (overlay-put overlay 'before-string - (concat indent - "[" (number-to-string (count-lines beg-sub (point))) - "-line citation. Press 'c' to show.]\n"))))) + (let ( + (p (point)) + (cite-button-text (concat "[" (number-to-string (count-lines beg-sub (point))) + "-line citation. Press 'c' to show.]")) + ) + (goto-char (- beg-sub 1)) + (insert (concat "\n" indent)) + (insert-button cite-button-text) + (insert "\n") + (goto-char (+ (length cite-button-text) p)) + )))) (move-to-column depth) (if (looking-at notmuch-show-signature-regexp) (let ((sig-lines (- (count-lines beg-sub end) 1))) -- 1.6.5.2 From cworth@cworth.org Thu Nov 19 16:27:09 2009 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 55B30431FBF; Thu, 19 Nov 2009 16:27:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 AE5vFlhXPRUX; Thu, 19 Nov 2009 16:27:08 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 554AC431FAE; Thu, 19 Nov 2009 16:27:08 -0800 (PST) From: Carl Worth To: Bdale Garbee In-Reply-To: <1258653555.13952.13.camel@rover> References: <1258630481-5133-1-git-send-email-jan@ryngle.com> <1258630481-5133-2-git-send-email-jan@ryngle.com> <87lji2bmrb.fsf@yoom.home.cworth.org> <1258653555.13952.13.camel@rover> Date: Fri, 20 Nov 2009 01:26:57 +0100 Message-ID: <87k4xmavn2.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 2/2] notmuch list: A new command to produce various lists. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 00:27:09 -0000 On Thu, 19 Nov 2009 10:59:13 -0700, Bdale Garbee wrote: > I've been pondering approaches to prioritizing the pool of unread > messages. Most of my thinking so far is along the lines of the ability > to automatically apply tags to new messages on various criteria combined > with the ability to manipulate the order in which tags are presented in > a view like what you're describing. Yes. There's definitely a lot of room for experimenting here to figure out how to make things work. > For better or worse, with about 45k messages hitting my inbox per year > *after* most of the list traffic gets peeled off and fed to a private > NNTP server, it's not about reading all of my email any more... it's > about finding and reading the stuff that actually matters *to me*. I totally understand that, (even if I've got an order of magnitude less of non-list mail coming to me). And I hope we can figure out how to support that mode well. > Can't tell you how excited I am about what's happening here! Thanks so much. And it's a pleasure to have you as part of the community here. I'll look forward to your input. -Carl From dottedmag@dottedmag.net Thu Nov 19 17:15:48 2009 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 5C732431FBC for ; Thu, 19 Nov 2009 17:15:48 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 cIKEImhfHliC for ; Thu, 19 Nov 2009 17:15:47 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id 83CE7431FAE for ; Thu, 19 Nov 2009 17:15:47 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 17EAE8C069 for ; Fri, 20 Nov 2009 02:15:46 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NBI68-0005kv-PN for notmuch@notmuchmail.org; Fri, 20 Nov 2009 07:15:40 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 07:15:40 +0600 Message-Id: <1258679740-22089-1-git-send-email-dottedmag@dottedmag.net> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] Allow to redefine notmuch binary name and path in elisp mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 01:15:48 -0000 Signed-off-by: Mikhail Gusarov --- notmuch.el | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/notmuch.el b/notmuch.el index 1fc54c3..f97950f 100644 --- a/notmuch.el +++ b/notmuch.el @@ -71,6 +71,9 @@ pattern can still test against the entire line).") (defvar notmuch-show-signature-lines-max 12 "Maximum length of signature that will be hidden by default.") +(defvar notmuch-command "notmuch" + "Notmuch binary location") + (set 'notmuch-show-message-begin-regexp " message{") (set 'notmuch-show-message-end-regexp " message}") (set 'notmuch-show-header-begin-regexp " header{") @@ -251,7 +254,7 @@ buffer." (defun notmuch-reply (query-string) (switch-to-buffer (generate-new-buffer "notmuch-draft")) - (call-process "notmuch" nil t nil "reply" query-string) + (call-process notmuch-command nil t nil "reply" query-string) (goto-char (point-min)) (if (re-search-forward "^$" nil t) (progn @@ -690,7 +693,7 @@ thread from that buffer can be show when done with this one)." (erase-buffer) (goto-char (point-min)) (save-excursion - (call-process "notmuch" nil t nil "show" thread-id) + (call-process notmuch-command nil t nil "show" thread-id) (notmuch-show-markup-messages) ) (run-hooks 'notmuch-show-hook) @@ -851,7 +854,7 @@ and will also appear in a buffer named \"*Notmuch errors*\"." (let ((error-buffer (get-buffer-create "*Notmuch errors*"))) (with-current-buffer error-buffer (erase-buffer)) - (if (eq (apply 'call-process "notmuch" nil error-buffer nil args) 0) + (if (eq (apply 'call-process notmuch-command nil error-buffer nil args) 0) (point) (progn (with-current-buffer error-buffer @@ -917,8 +920,8 @@ This function advances point to the next line when finished." (goto-char (point-min)) (save-excursion (if oldest-first - (call-process "notmuch" nil t nil "search" "--sort=oldest-first" query) - (call-process "notmuch" nil t nil "search" "--sort=newest-first" query)) + (call-process notmuch-command nil t nil "search" "--sort=oldest-first" query) + (call-process notmuch-command nil t nil "search" "--sort=newest-first" query)) (notmuch-search-markup-thread-ids) )) (run-hooks 'notmuch-search-hook))) -- 1.6.3.3 From cworth@cworth.org Thu Nov 19 17:33:09 2009 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 D14B7431FBF; Thu, 19 Nov 2009 17:33:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 1RDNo7657CrX; Thu, 19 Nov 2009 17:33:09 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E3B4D431FAE; Thu, 19 Nov 2009 17:33:08 -0800 (PST) From: Carl Worth To: Peter Wang , notmuch@notmuchmail.org In-Reply-To: <20091119081335.GI27626@plug.localdomain> References: <20091119081335.GI27626@plug.localdomain> Date: Fri, 20 Nov 2009 02:32:57 +0100 Message-ID: <87hbsqasl2.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] link error X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 01:33:10 -0000 On Thu, 19 Nov 2009 19:13:35 +1100, Peter Wang wrote: > Linking fails on my system for some reason (undefined references to > talloc functions). Putting $(LDFLAGS) after the object list solves > it. Thanks Peter. I've pushed this now. -Carl From jeff@ocjtech.us Thu Nov 19 18:23:17 2009 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 E7460431FBC for ; Thu, 19 Nov 2009 18:23:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 cAwZbeAWudvm for ; Thu, 19 Nov 2009 18:23:17 -0800 (PST) Received: from mail-yw0-f173.google.com (mail-yw0-f173.google.com [209.85.211.173]) by olra.theworths.org (Postfix) with ESMTP id 7A5C2431FAE for ; Thu, 19 Nov 2009 18:23:17 -0800 (PST) Received: by ywh3 with SMTP id 3so2990218ywh.22 for ; Thu, 19 Nov 2009 18:23:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.91.162.31 with SMTP id p31mr1265194ago.121.1258683795742; Thu, 19 Nov 2009 18:23:15 -0800 (PST) In-Reply-To: <20091119164543.25e7afe5@hikari> References: <935ead450911181000w2cddfe95qe9efd5bea9f9209d@mail.gmail.com> <20091119164543.25e7afe5@hikari> Date: Thu, 19 Nov 2009 20:23:15 -0600 Message-ID: <935ead450911191823s776fda6eyb6f6949ac982bd03@mail.gmail.com> From: Jeffrey Ollie To: Not Much Mail Content-Type: multipart/mixed; boundary=0016e640867c879f2e0478c42866 Subject: Re: [notmuch] Segfault searching for tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 02:23:18 -0000 --0016e640867c879f2e0478c42866 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Nov 19, 2009 at 9:45 AM, Adrian Perez de Castro wrote: > On Wed, 18 Nov 2009 12:00:10 -0600, Jeffrey wrote: > >> Getting the following segfault with 306635c2 on Fedora 12. =C2=A0Seems t= o >> be happening with any 'tag:' search that returns results. =C2=A0For >> example, 'notmuch search tag:inbox' and 'notmuch search tag:unread' >> segfault but 'notmuch search tag:nosuchtag', 'notmuch search >> subject:logwatch' and 'notmuch search video' seem to work fine. >> >> Core was generated by `/usr/bin/notmuch search --sort=3Doldest-first tag= :inbox'. >> Program terminated with signal 11, Segmentation fault. >> \#0 =C2=A0Xapian::TermIterator::operator* (this=3D) >> =C2=A0 =C2=A0 at api/omtermlistiterator.cc:78 >> 78 =C2=A0 =C2=A0 =C2=A0 =C2=A0RETURN(internal->get_termname()); >> Current language: =C2=A0auto >> The current source language is "auto; currently c++". > > I have hit what I believe is exactly the same problem. In my case, some > results are printed when I execute "notmuch search tag:inbox", and then > the program crashes in the same exact place. > > The thing is that in notmuch_message_get_in_reply_to(), line 288, a NULL > instance of Xapian::TermIterator is dereferenced. In my particular case, > the culpript is a cache file of Claws-Mail, as seen in the following GDB > session: > [...] > As you can see, there "filename" points to a Claws-Mail cache file, which > is a binary file (I can provide a copy if needed). I suspect that this is > related to the fact that the iterator ends up being NULL somehow. I straced some of the crashes, and the last file that was read before the crash was a malformed message. I've attached one of the messages. I've been using offlineimap to sync my gmail mailbox to my laptop so that I can use notmuch. offlineimap isn't the most stable program, but I'm not sure yet if offlineimap is causing the problem or if that's the way the message is in gmail. --=20 Jeff Ollie --0016e640867c879f2e0478c42866 Content-Type: text/plain; charset=US-ASCII; name="message.txt" Content-Disposition: attachment; filename="message.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g28bmh331 RGVsaXZlcmVkLVRvOiBqZWZmQG9sbGllLmNsaXZlLmlhLnVzClJlY2VpdmVkOiBieSAxMC45MC44 Ni4xOCB3aXRoIFNNVFAgaWQgajE4Y3MyMjg1NTZhZ2I7CiAgICAgICAgVGh1LCA1IE5vdiAyMDA5 IDIyOjIzOjUwIC0wODAwIChQU1QpClJlY2VpdmVkOiBieSAxMC45MC4xNi4zOCB3aXRoIFNNVFAg aWQgMzhtcjc0NjgyOTBhZ3AuMTEyLjEyNTc0ODg2MjAzNzQ7CiAgICAgICAgVGh1LCAwNSBOb3Yg MjAwOSAyMjoyMzo0MCAtMDgwMCAoUFNUKQpSZXR1cm4tUGF0aDogPHhodXR0ZWVzampAeWFob28u Y29tLmF1PgpSZWNlaXZlZDogZnJvbSAyMDkuODUuMjIzLjEwMSAoWzExNi4yMDguNjQuMTAwXSkK ICAgICAgICBieSBteC5nb29nbGUuY29tIHdpdGggU01UUCBpZCA0MXNpOTA0NjIwM2l3bi4xMTIu MjAwOS4xMS4wNS4yMi4yMy4zODsKICAgICAgICBUaHUsIDA1IE5vdiAyMDA5IDIyOjIzOjQwIC0w ODAwIChQU1QpClJlY2VpdmVkLVNQRjogbmV1dHJhbCAoZ29vZ2xlLmNvbTogMTE2LjIwOC42NC4x MDAgaXMgbmVpdGhlciBwZXJtaXR0ZWQgbm9yIGRlbmllZCBieSBiZXN0IGd1ZXNzIHJlY29yZCBm b3IgZG9tYWluIG9mIHhodXR0ZWVzampAeWFob28uY29tLmF1KSBjbGllbnQtaXA9MTE2LjIwOC42 NC4xMDA7CkF1dGhlbnRpY2F0aW9uLVJlc3VsdHM6IG14Lmdvb2dsZS5jb207IHNwZj1uZXV0cmFs IChnb29nbGUuY29tOiAxMTYuMjA4LjY0LjEwMCBpcyBuZWl0aGVyIHBlcm1pdHRlZCBub3IgZGVu aWVkIGJ5IGJlc3QgZ3Vlc3MgcmVjb3JkIGZvciBkb21haW4gb2YgeGh1dHRlZXNqakB5YWhvby5j b20uYXUpIHNtdHAubWFpbD14aHV0dGVlc2pqQHlhaG9vLmNvbS5hdQpEYXRlOiBUaHUsIDA1IE5v diAyMDA5IDIyOjIzOjQwIC0wODAwIChQU1QpClJlY2VpdmVkOiBmcm9tIDE0Ni4yLjc2LjExOCBi eSAxMTYuMjA4LjY0LjEwMDsgRnJpLCAwNiBOb3YgMjAwOSAwMzoyMDo0MiAtMDMwMApNZXNzYWdl LUlEOiA8Q1syMAo= --0016e640867c879f2e0478c42866-- From alex.boterolowry@gmail.com Fri Nov 20 00:26:36 2009 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 194E8431FBC for ; Fri, 20 Nov 2009 00:26:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 kqo8Kvv93fUt for ; Fri, 20 Nov 2009 00:26:35 -0800 (PST) Received: from mail-gx0-f221.google.com (mail-gx0-f221.google.com [209.85.217.221]) by olra.theworths.org (Postfix) with ESMTP id 08BE0431FAE for ; Fri, 20 Nov 2009 00:26:34 -0800 (PST) Received: by gxk21 with SMTP id 21so2777245gxk.10 for ; Fri, 20 Nov 2009 00:26:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:subject:date :message-id:mime-version:content-type; bh=iHTsHuix2LBK8/vR0wCnp53HdBz5w3m9zkRqaLQlnhc=; b=LlthhjX8MWk9Qa+J+FrL67iUED+wp7/OTF7vyh/FQjDrZ3rs1beu1Z5iKbF6oSG94I 6VHYSiVc6ydhAbL0iNjFvrigWKYnFkaRI2fHDbGJH6vClR+AMtVXc8Z0fNCi+BPSxaRm kDn98mEFB3tAmxJsw6U97eEgGBV6KLXZA/05o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type; b=JOPk3uNbWB49ldjee15FlKQVVLVTti5rwSzdSveL0rzN/BNokX7zaXcW5oKp0+ZAVy 4+abbImyVf6g9kE1dC4UF8+uOnivYNyoMEJg/YIohTMiOJJGztQ94/91Y/5bwhbMRQZt X8Pu9glA3xwF+g+7W/7lchEl08DJoseay/Qdc= Received: by 10.150.19.5 with SMTP id 5mr2098693ybs.103.1258705594592; Fri, 20 Nov 2009 00:26:34 -0800 (PST) Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85]) by mx.google.com with ESMTPS id 14sm695028gxk.6.2009.11.20.00.26.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 20 Nov 2009 00:26:33 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo.i-did-not-set--mail-host-address--so-tickle-me) id 7053 by fortitudo (DragonFly Mail Agent) Fri, 20 Nov 2009 00:26:33 -0800 From: Alexander Botero-Lowry To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 00:26:33 -0800 Message-ID: <86ws1lioue.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [notmuch] lots of emacs mode enhancements X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 08:26:36 -0000 I've just been diving into the elisp, and have added a bunch of useful features. 1) buttonized citation and signature expanders and made them locally collapsable instead of globally (this could take some cleanup to remove the global key-map binding or make it work again) 2) fixed an annoying warning about cons not being a face name 3) made header names bold to make it easier to distingush them from their value My next target is to carry the buttonization through to threads and headers, and then I'm going to look into doing better mime-handling in general. also, RFP includes a -p argument that gives a patch :) alex ---- The following changes since commit 9b560fb3eb87b2a4f9d092bc1b124ccb6d11c975: Alexander Botero-Lowry (1): Checkin some command-only tcsh completions are available in the git repository at: git://alexbl.net/notmuch.git master Alexander Botero-Lowry (5): Buttonize citation expander. buttonize signatures as well fix the message about cons not being a valid face attribute Make expanding/collapsing signatures and citations local to them make header names bold in show-mode notmuch.el | 72 +++++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 57 insertions(+), 15 deletions(-) diff --git a/notmuch.el b/notmuch.el index 1fc54c3..bb69aa3 100644 --- a/notmuch.el +++ b/notmuch.el @@ -440,6 +440,14 @@ which this thread was originally shown." (if last (notmuch-show-archive-thread)))))) +(defun notmuch-toggle-invisible-action (cite-button) + (let ((invis-spec (button-get button 'invisibility-spec))) + (if (invisible-p invis-spec) + (remove-from-invisibility-spec invis-spec) + (add-to-invisibility-spec invis-spec) + )) + (goto-char (button-end cite-button))) + (defun notmuch-show-markup-citations-region (beg end depth) (goto-char beg) (beginning-of-line) @@ -451,25 +459,51 @@ which this thread was originally shown." (progn (while (looking-at citation) (forward-line)) - (let ((overlay (make-overlay beg-sub (point)))) - (overlay-put overlay 'invisible 'notmuch-show-citation) - (overlay-put overlay 'before-string - (concat indent - "[" (number-to-string (count-lines beg-sub (point))) - "-line citation. Press 'c' to show.]\n"))))) + (let ((overlay (make-overlay beg-sub (point))) + (invis-spec (make-symbol "notmuch-citation-region"))) + (add-to-invisibility-spec invis-spec) + (overlay-put overlay 'invisible invis-spec) + (let ( + (p (point)) + (cite-button-text + (concat "[" (number-to-string (count-lines beg-sub (point))) + "-line citation.]")) + ) + (goto-char (- beg-sub 1)) + (insert (concat "\n" indent)) + (let ((cite-button (insert-button cite-button-text))) + (button-put cite-button 'invisibility-spec invis-spec) + (button-put cite-button 'action 'notmuch-toggle-invisible-action) + (button-put cite-button 'help-echo + "mouse-2, RET: Show citation") + + ) + (insert "\n") + (goto-char (+ (length cite-button-text) p)) + )))) (move-to-column depth) (if (looking-at notmuch-show-signature-regexp) (let ((sig-lines (- (count-lines beg-sub end) 1))) (if (<= sig-lines notmuch-show-signature-lines-max) (progn - (overlay-put (make-overlay beg-sub end) - 'invisible 'notmuch-show-signature) - (overlay-put (make-overlay beg (- beg-sub 1)) - 'after-string - (concat "\n" indent - "[" (number-to-string sig-lines) - "-line signature. Press 's' to show.]")) - (goto-char end))))) + (let ((invis-spec (make-symbol "notmuch-signature-region"))) + (add-to-invisibility-spec invis-spec) + (overlay-put (make-overlay beg-sub end) + 'invisible invis-spec) + + (goto-char (- beg-sub 1)) + (insert (concat "\n" indent)) + (let ((sig-button (insert-button + (concat "[" (number-to-string sig-lines) + "-line signature.]")))) + (button-put sig-button 'invisibility-spec invis-spec) + (button-put sig-button 'action + 'notmuch-toggle-invisible-action) + (button-put sig-button 'help-echo + "mouse-2, RET: Show signature") + ) + (insert "\n") + (goto-char end)))))) (forward-line)))) (defun notmuch-show-markup-part (beg end depth) @@ -516,12 +550,20 @@ which this thread was originally shown." (let ((beg (point-marker))) (end-of-line) ; Inverse video for subject - (overlay-put (make-overlay beg (point)) 'face '((cons :inverse-video t))) + (overlay-put (make-overlay beg (point)) 'face '(:inverse-video t)) (forward-line 2) (let ((beg-hidden (point-marker))) (re-search-forward notmuch-show-header-end-regexp) (beginning-of-line) (let ((end (point-marker))) + (goto-char beg) + (forward-line) + (while (looking-at "[A-Za-z][-A-Za-z0-9]*:") + (beginning-of-line) + (overlay-put (make-overlay (point) (re-search-forward ":")) + 'face 'bold) + (forward-line) + ) (indent-rigidly beg end depth) (overlay-put (make-overlay beg-hidden end) 'invisible 'notmuch-show-header) From dominik.epple@googlemail.com Fri Nov 20 00:56:52 2009 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 4B83C431FBC for ; Fri, 20 Nov 2009 00:56:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 WdvK4XtJQOWn for ; Fri, 20 Nov 2009 00:56:51 -0800 (PST) Received: from mail-gx0-f221.google.com (mail-gx0-f221.google.com [209.85.217.221]) by olra.theworths.org (Postfix) with ESMTP id A3958431FAE for ; Fri, 20 Nov 2009 00:56:51 -0800 (PST) Received: by gxk21 with SMTP id 21so2788409gxk.10 for ; Fri, 20 Nov 2009 00:56:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=WaEPqsVjgtKq8/IVA0grA4EqxtQn+sDg+SUue/+u3cU=; b=gjfzrUR8xsQCYU52lZ1tLJiIs8b5f1oBiWFbTWRNz02WsreYRZVe0DAgLJjuWVrFXB JxuQjxnym4iNEwnuKVLVI2GQHfqDKsMZXkgthOD5X4o/ebIXvvP9Antb9M1lOTghpYx0 QrOTGB6oBMHJpIMxK6VQpkPS1cgTYmT8iwtEI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ZzqI1cMqpuoaq0LlvXrKCwnU2myrDMrxsCG+vCwUfveU9/EZTzTU0Nc2CHcMtc2/tt jqjub2M0obCTE5r5ImGEoJPb9GZTATiNzFzzFv68fyWRFyv4INCLgWphnNVpT7bpqpui 3ZHfy0GvblHEDW7WIWN7byjDK9yoBEl0e7JEQ= MIME-Version: 1.0 Received: by 10.90.42.39 with SMTP id p39mr1814139agp.86.1258707410471; Fri, 20 Nov 2009 00:56:50 -0800 (PST) Date: Fri, 20 Nov 2009 09:56:50 +0100 Message-ID: <123554aa0911200056h73def158pb0db64a2a78ed687@mail.gmail.com> From: Dominik Epple To: notmuch@notmuchmail.org Content-Type: text/plain; charset=ISO-8859-1 Subject: [notmuch] notmuch new: Memory problem X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 08:56:52 -0000 Hi, I am strongly interested in giving notmuch a try. But I fail setting it up. The problem is that during "notmuch new", memory consumption and system load increases to values that make my system unusable. I then killed "notmuch new" at a memory consumption of 2.7G and at a system load of 7. After hitting Ctrl-C, it says "Stopping" but does not stop. I then killed "notmuch new" after some minutes with signal KILL. Is there a problem with the number of my mails? I currently have over 40.000 Mails... they live currently in mbox files, I created a Maildir with mb2md-3.20.pl. OS is SuSE Linux 11.1, kernel 2.6.27.29-0.1-default, notmuch pulled today from git, compiled manually, dependencies also downloaded and installed manually, in the following versions: gmime-2.4.11.tar.bz2 talloc-2.0.0.tar.gz xapian-core-1.0.17.tar.gz Any help? Thanks Dominik From cworth@cworth.org Fri Nov 20 01:36:11 2009 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 9DC88431FBF; Fri, 20 Nov 2009 01:36:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 onRCebeJpiJi; Fri, 20 Nov 2009 01:36:10 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 64DF7431FAE; Fri, 20 Nov 2009 01:36:10 -0800 (PST) From: Carl Worth To: "Jeffrey C. Ollie" , Not Much Mail In-Reply-To: <1258665602-700-1-git-send-email-jeff@ocjtech.us> References: <1258665602-700-1-git-send-email-jeff@ocjtech.us> Date: Fri, 20 Nov 2009 10:35:58 +0100 Message-ID: <87ocmxk075.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH 1/2] Improve installation of emacs mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 09:36:11 -0000 On Thu, 19 Nov 2009 15:20:01 -0600, "Jeffrey C. Ollie" wrote: > 1) Add a separate targets to build and install emacs mode. > > 2) Don't hardcode the installation directory, instead use emacs' > pkg-config module. > > 3) Install a byte compiled version of the emacs mode. > > 4) Install the emacs mode in emacs' site-lisp directory. Put > "(require 'notmuch)" in your .emacs to load it automatically. > > 5) Ignore byte-compiled emacs files. Thanks, Jeffrey! This is pushed now. -Carl From cworth@cworth.org Fri Nov 20 01:38:30 2009 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 562D3431FBF; Fri, 20 Nov 2009 01:38:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 n2t3fATXMNjH; Fri, 20 Nov 2009 01:38:29 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 5DCED431FAE; Fri, 20 Nov 2009 01:38:29 -0800 (PST) From: Carl Worth To: Jeffrey Ollie , Not Much Mail In-Reply-To: <935ead450911182256j14722a61k7f24a971e0f81756@mail.gmail.com> References: <1258569114-16034-1-git-send-email-jeff@ocjtech.us> <87einv72cr.fsf@yoom.home.cworth.org> <935ead450911182256j14722a61k7f24a971e0f81756@mail.gmail.com> Date: Fri, 20 Nov 2009 10:38:18 +0100 Message-ID: <87my2hk039.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] RPM spec file X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 09:38:30 -0000 On Thu, 19 Nov 2009 00:56:22 -0600, Jeffrey Ollie wrote: > I don't think that a separate Git branch makes sense, but maybe stuff > like this should be in a subdirectory like "packaging/fedora", since I > imagine that there will eventually be a need for "packaging/debian" > etc. as well. OK, Done. Thanks again! -Carl From cworth@cworth.org Fri Nov 20 01:39:47 2009 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 9403D431FBF; Fri, 20 Nov 2009 01:39:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 mhChakiMwqQb; Fri, 20 Nov 2009 01:39:47 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id B786D431FAE; Fri, 20 Nov 2009 01:39:46 -0800 (PST) From: Carl Worth To: James Rowe , notmuch@notmuchmail.org In-Reply-To: <4b04fdc2.25c0100a.68f2.ffffc8bf@mx.google.com> References: <4b04fdc2.25c0100a.68f2.ffffc8bf@mx.google.com> Date: Fri, 20 Nov 2009 10:39:35 +0100 Message-ID: <87lji1k014.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Gentoo ebuild for notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 09:39:47 -0000 On Thu, 19 Nov 2009 00:11:46 -0800 (PST), James Rowe wrote: > Just in case other Gentoo users are trying notmuch out I thought I'd post my > ebuild(perhaps you'll make it better for me too :). It is working well up to > at least e5da2b70. Hi James, Thanks for your contribution. > I won't bother the list if it requires changes, as it is available from my > main overlay[1] if you wish to check for updated versions. If you think it makes sense, I can add this to the notmuch repository in a packaging/gentoo directory. Just let me know if you'd like that. -Carl From cworth@cworth.org Fri Nov 20 03:32:53 2009 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 C159A431FBF; Fri, 20 Nov 2009 03:32:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 6-J3w3sPASPE; Fri, 20 Nov 2009 03:32:52 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4092D431FAE; Fri, 20 Nov 2009 03:32:52 -0800 (PST) From: Carl Worth To: Adrian Perez de Castro , notmuch@notmuchmail.org, Jeffrey Ollie , Not Much Mail In-Reply-To: <935ead450911191823s776fda6eyb6f6949ac982bd03@mail.gmail.com> References: <935ead450911181000w2cddfe95qe9efd5bea9f9209d@mail.gmail.com> <20091119164543.25e7afe5@hikari> <935ead450911191823s776fda6eyb6f6949ac982bd03@mail.gmail.com> Date: Fri, 20 Nov 2009 12:32:41 +0100 Message-ID: <87lji11leu.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Segfault searching for tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 11:32:53 -0000 On Thu, 19 Nov 2009 16:45:43 +0100, Adrian Perez de Castro wrote: > The thing is that in notmuch_message_get_in_reply_to(), line 288, a NULL > instance of Xapian::TermIterator is dereferenced. In my particular case, > the culpript is a cache file of Claws-Mail, as seen in the following GDB > session: Not quite NULL, (nor is it quite dereferencing---this is nasty C++ overloading), but yeah, the idea is the same. We need to protect all of our "calls" to this overloaded operator to not call it when the iterator is equal to the value returned by termlist_end (). On Thu, 19 Nov 2009 20:23:15 -0600, Jeffrey Ollie wrote: > I straced some of the crashes, and the last file that was read before > the crash was a malformed message. I've attached one of the messages. > I've been using offlineimap to sync my gmail mailbox to my laptop so > that I can use notmuch. offlineimap isn't the most stable program, > but I'm not sure yet if offlineimap is causing the problem or if > that's the way the message is in gmail. Thanks for the file. I never like to push code that I haven't tested, so this was very helpful. Below is the patch that I just pushed which seems to do the trick. -Carl commit 31b54bc78735c628035a046e526ac4c596d830cf Author: Carl Worth Date: Fri Nov 20 12:06:11 2009 +0100 Avoid access of a Xapian iterator's object when there's nothing there. This eliminates a crash when a message (either corrupted or a non-mail file that wasn't properly detected as not being mail) has no In-Reply-To header, (and so few terms that trying to skip to the prefix of the In-Reply-To terms actually brings us to the end of the termlist). diff --git a/lib/message.cc b/lib/message.cc index 9488fb6..41dddd0 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -285,7 +285,8 @@ _notmuch_message_get_in_reply_to (notmuch_message_t *message i = message->doc.termlist_begin (); i.skip_to (prefix); - in_reply_to = *i; + if (i != message->doc.termlist_end ()) + in_reply_to = *i; /* It's perfectly valid for a message to have no In-Reply-To * header. For these cases, we return an empty string. */ @@ -332,10 +333,10 @@ notmuch_message_get_thread_id (notmuch_message_t *message) return message->thread_id; i = message->doc.termlist_begin (); - i.skip_to (prefix); - id = *i; + if (i != message->doc.termlist_end ()) + id = *i; if (i == message->doc.termlist_end () || id[0] != *prefix) INTERNAL_ERROR ("Message with document ID of %d has no thread ID.\n", @@ -466,7 +467,7 @@ notmuch_message_get_tags (notmuch_message_t *message) i.skip_to (prefix); - while (1) { + while (i != end) { tag = *i; if (tag.empty () || tag[0] != *prefix) From cworth@cworth.org Fri Nov 20 04:41:31 2009 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 249AE431FBF; Fri, 20 Nov 2009 04:41:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 x7vXOVmmI5Tl; Fri, 20 Nov 2009 04:41:30 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E7187431FAE; Fri, 20 Nov 2009 04:41:29 -0800 (PST) From: Carl Worth To: Mikhail Gusarov , notmuch@notmuchmail.org In-Reply-To: <1258679740-22089-1-git-send-email-dottedmag@dottedmag.net> References: <1258679740-22089-1-git-send-email-dottedmag@dottedmag.net> Date: Fri, 20 Nov 2009 13:41:18 +0100 Message-ID: <87aayhmkr5.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Allow to redefine notmuch binary name and path in elisp mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 12:41:31 -0000 On Fri, 20 Nov 2009 07:15:40 +0600, Mikhail Gusarov wrote: > Signed-off-by: Mikhail Gusarov Thanks for the patch, Mikhail! This is pushed now. -Carl PS. Some people may have noticed that the original mail from Mikhail put notmuch-show-mode into an infinite loop. The bug is triggered by the mail message containing a notmuch message marker, "^lmessage{" in the body, (but with a literal ^L). I haven't fixed the infinite loop yet, and it would be good to come up with a way to do ignore delimiters internal to the body of a message. Until then, I've changed the notmuch.el code to use "\f" instead of literal ^L so we at least won't hit this bug with patches to notmuch.el anymore. From cworth@cworth.org Fri Nov 20 04:44:59 2009 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 CAE71431FBF; Fri, 20 Nov 2009 04:44:59 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 I+IzAfZ6EuVZ; Fri, 20 Nov 2009 04:44:59 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id B24F8431FAE; Fri, 20 Nov 2009 04:44:58 -0800 (PST) From: Carl Worth To: Jan Janak , notmuch@notmuchmail.org In-Reply-To: <1258591045-16494-1-git-send-email-jan@ryngle.com> References: <1258591045-16494-1-git-send-email-jan@ryngle.com> Date: Fri, 20 Nov 2009 13:44:47 +0100 Message-ID: <878we1mklc.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Makefile: Make object targets depend on Makefiles X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 12:45:00 -0000 On Thu, 19 Nov 2009 01:37:25 +0100, Jan Janak wrote: > All objects need to be recompiled when any of the Makefiles changes, so > we make them all depend on all the Makefiles. An excellent fix, Jan. Pushed! -Carl From dottedmag@dottedmag.net Fri Nov 20 04:58:52 2009 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 CE3CD431FBF for ; Fri, 20 Nov 2009 04:58:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 EsFUgdk+e9NO for ; Fri, 20 Nov 2009 04:58:52 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id 30831431FAE for ; Fri, 20 Nov 2009 04:58:52 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 757F48C009 for ; Fri, 20 Nov 2009 13:58:50 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NBT4R-0002Pu-W7 for notmuch@notmuchmail.org; Fri, 20 Nov 2009 18:58:40 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 18:58:39 +0600 Message-Id: <1258721919-9254-1-git-send-email-dottedmag@dottedmag.net> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] Add notmuch.1.gz to files to be cleaned X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 12:58:53 -0000 Signed-off-by: Mikhail Gusarov --- Makefile.local | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile.local b/Makefile.local index ecd4ceb..bf81c03 100644 --- a/Makefile.local +++ b/Makefile.local @@ -45,4 +45,4 @@ install-emacs: install emacs install -m0644 notmuch.elc $(DESTDIR)$(emacs_lispdir) SRCS := $(SRCS) $(notmuch_client_srcs) -CLEAN := $(CLEAN) notmuch $(notmuch_client_modules) notmuch.elc +CLEAN := $(CLEAN) notmuch $(notmuch_client_modules) notmuch.elc notmuch.1.gz -- 1.6.3.3 From jeff@ocjtech.us Fri Nov 20 05:10:45 2009 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 A6E1E431FBC for ; Fri, 20 Nov 2009 05:10:45 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 8eAt24QTgx7c for ; Fri, 20 Nov 2009 05:10:44 -0800 (PST) Received: from mail-gx0-f221.google.com (mail-gx0-f221.google.com [209.85.217.221]) by olra.theworths.org (Postfix) with ESMTP id 05B0D431FAE for ; Fri, 20 Nov 2009 05:10:43 -0800 (PST) Received: by gxk21 with SMTP id 21so2903468gxk.10 for ; Fri, 20 Nov 2009 05:10:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.91.26.14 with SMTP id d14mr2210236agj.84.1258722638421; Fri, 20 Nov 2009 05:10:38 -0800 (PST) In-Reply-To: <87lji11leu.fsf@yoom.home.cworth.org> References: <935ead450911181000w2cddfe95qe9efd5bea9f9209d@mail.gmail.com> <20091119164543.25e7afe5@hikari> <935ead450911191823s776fda6eyb6f6949ac982bd03@mail.gmail.com> <87lji11leu.fsf@yoom.home.cworth.org> Date: Fri, 20 Nov 2009 07:10:38 -0600 Message-ID: <935ead450911200510ie80d28dv1d82ccbd11803128@mail.gmail.com> From: Jeffrey Ollie To: Carl Worth Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Not Much Mail Subject: Re: [notmuch] Segfault searching for tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 13:10:45 -0000 On Fri, Nov 20, 2009 at 5:32 AM, Carl Worth wrote: > On Thu, 19 Nov 2009 16:45:43 +0100, Adrian Perez de Castro wrote: >> The thing is that in notmuch_message_get_in_reply_to(), line 288, a NULL >> instance of Xapian::TermIterator is dereferenced. In my particular case, >> the culpript is a cache file of Claws-Mail, as seen in the following GDB >> session: > > Not quite NULL, (nor is it quite dereferencing---this is nasty C++ > overloading), but yeah, the idea is the same. We need to protect all of > our "calls" to this overloaded operator to not call it when the iterator > is equal to the value returned by termlist_end (). > > On Thu, 19 Nov 2009 20:23:15 -0600, Jeffrey Ollie wrote= : >> I straced some of the crashes, and the last file that was read before >> the crash was a malformed message. =C2=A0I've attached one of the messag= es. > > Thanks for the file. I never like to push code that I haven't tested, so > this was very helpful. > > Below is the patch that I just pushed which seems to do the trick. Ah, excellent! This does indeed seem to prevent the crash. Now I just need to figure out how to get all my mail out of GMail. --=20 Jeff Ollie From dottedmag@dottedmag.net Fri Nov 20 05:18:39 2009 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 19308431FBC for ; Fri, 20 Nov 2009 05:18:39 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 9F+E0v2X3ljI for ; Fri, 20 Nov 2009 05:18:38 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id 23C86431FAE for ; Fri, 20 Nov 2009 05:18:38 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 9ADC98C069 for ; Fri, 20 Nov 2009 14:18:36 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NBTNb-0003pl-95 for notmuch@notmuchmail.org; Fri, 20 Nov 2009 19:18:27 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 19:18:27 +0600 Message-Id: <1258723107-14704-1-git-send-email-dottedmag@dottedmag.net> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] RFC: quiet make X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 13:18:39 -0000 I don't entirely like duplicating every command line in makefile, so this patch is RFC. Someone with bigger Make-fu than mine probably knows a better way. Signed-off-by: Mikhail Gusarov --- Makefile | 36 ++++++++++++++++++++++++++++++++++++ Makefile.local | 10 ++++++++++ lib/Makefile.local | 5 +++++ 3 files changed, 51 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index b6861e9..72a72ae 100644 --- a/Makefile +++ b/Makefile @@ -32,29 +32,65 @@ include lib/Makefile.local include Makefile.config %.o: %.cc $(all_deps) +ifeq ($(V),1) $(CXX) -c $(CFLAGS) $(CXXFLAGS) $< -o $@ +else + @echo CXX $< + @$(CXX) -c $(CFLAGS) $(CXXFLAGS) $< -o $@ +endif %.o: %.c $(all_deps) +ifeq ($(V),1) $(CC) -c $(CFLAGS) $< -o $@ +else + @echo CC $< + @$(CC) -c $(CFLAGS) $< -o $@ +endif %.elc: %.el +ifeq ($(V),1) emacs -batch -f batch-byte-compile $< +else + @echo ELCOMPILE $< + @emacs -batch -f batch-byte-compile $< +endif .deps/%.d: %.c $(all_deps) +ifeq ($(V),1) + set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ + $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \ + sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ + rm -f $@.$$$$ +else + @echo DEPCXX $< @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ +endif .deps/%.d: %.cc $(all_deps) +ifeq ($(V),1) + set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ + $(CXX) -M $(CPPFLAGS) $(CXXFLAGS) $< > $@.$$$$; \ + sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ + rm -f $@.$$$$ +else + @echo DEPCC $< @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CXX) -M $(CPPFLAGS) $(CXXFLAGS) $< > $@.$$$$; \ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ +endif DEPS := $(SRCS:%.c=.deps/%.d) DEPS := $(DEPS:%.cc=.deps/%.d) -include $(DEPS) clean: +ifeq ($(V),1) rm -f $(CLEAN); rm -rf .deps +else + @echo CLEAN + @rm -f $(CLEAN); rm -rf .deps +endif diff --git a/Makefile.local b/Makefile.local index bf81c03..0addfed 100644 --- a/Makefile.local +++ b/Makefile.local @@ -20,10 +20,20 @@ notmuch_client_srcs = \ notmuch_client_modules = $(notmuch_client_srcs:.c=.o) notmuch: $(notmuch_client_modules) lib/notmuch.a +ifeq ($(V),1) $(CXX) $^ $(LDFLAGS) -o $@ +else + @echo LINK $^ + @$(CXX) $^ $(LDFLAGS) -o $@ +endif notmuch.1.gz: notmuch.1 +ifeq ($(V),1) gzip --stdout notmuch.1 > notmuch.1.gz +else + @echo GZIP $< + @gzip --stdout notmuch.1 > notmuch.1.gz +endif install: all notmuch.1.gz for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \ diff --git a/lib/Makefile.local b/lib/Makefile.local index 79f7b0b..5a66716 100644 --- a/lib/Makefile.local +++ b/lib/Makefile.local @@ -18,7 +18,12 @@ libnotmuch_cxx_srcs = \ libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o) $(dir)/notmuch.a: $(libnotmuch_modules) +ifeq ($(V),1) $(AR) rcs $@ $^ +else + @echo AR $^ + @$(AR) rcs $@ $^ +endif SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs) CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.a -- 1.6.3.3 From jan@ryngle.com Fri Nov 20 05:20:49 2009 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 CB30E431FBC for ; Fri, 20 Nov 2009 05:20:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ZPXbS1YgfrpS for ; Fri, 20 Nov 2009 05:20:47 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 7BA1E431FAE for ; Fri, 20 Nov 2009 05:20:47 -0800 (PST) Received: by bwz24 with SMTP id 24so2261612bwz.30 for ; Fri, 20 Nov 2009 05:20:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.155.92 with SMTP id r28mr1360381bkw.121.1258723245238; Fri, 20 Nov 2009 05:20:45 -0800 (PST) In-Reply-To: <935ead450911200510ie80d28dv1d82ccbd11803128@mail.gmail.com> References: <935ead450911181000w2cddfe95qe9efd5bea9f9209d@mail.gmail.com> <20091119164543.25e7afe5@hikari> <935ead450911191823s776fda6eyb6f6949ac982bd03@mail.gmail.com> <87lji11leu.fsf@yoom.home.cworth.org> <935ead450911200510ie80d28dv1d82ccbd11803128@mail.gmail.com> Date: Fri, 20 Nov 2009 14:20:45 +0100 Message-ID: From: Jan Janak To: Jeffrey Ollie Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Not Much Mail Subject: Re: [notmuch] Segfault searching for tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 13:20:50 -0000 On Fri, Nov 20, 2009 at 2:10 PM, Jeffrey Ollie wrote: > On Fri, Nov 20, 2009 at 5:32 AM, Carl Worth wrote: >> On Thu, 19 Nov 2009 16:45:43 +0100, Adrian Perez de Castro wrote: >>> The thing is that in notmuch_message_get_in_reply_to(), line 288, a NUL= L >>> instance of Xapian::TermIterator is dereferenced. In my particular case= , >>> the culpript is a cache file of Claws-Mail, as seen in the following GD= B >>> session: >> >> Not quite NULL, (nor is it quite dereferencing---this is nasty C++ >> overloading), but yeah, the idea is the same. We need to protect all of >> our "calls" to this overloaded operator to not call it when the iterator >> is equal to the value returned by termlist_end (). >> >> On Thu, 19 Nov 2009 20:23:15 -0600, Jeffrey Ollie wrot= e: >>> I straced some of the crashes, and the last file that was read before >>> the crash was a malformed message. =C2=A0I've attached one of the messa= ges. >> >> Thanks for the file. I never like to push code that I haven't tested, so >> this was very helpful. >> >> Below is the patch that I just pushed which seems to do the trick. > > Ah, excellent! =C2=A0This does indeed seem to prevent the crash. =C2=A0No= w I > just need to figure out how to get all my mail out of GMail. I did exactly that with offlineimap. It crashes from time to time, but then you can just restart it and continue. A few days ago I sent a patch which converts mail subdirectories to tags and because Gmail IMAP server converts labels to subdirectories, you can use that to convert gmail's labels to notmuch tags automatically. -- Jan From mh@glandium.org Fri Nov 20 05:27:04 2009 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 506BC431FBC for ; Fri, 20 Nov 2009 05:27:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 5GtjFInyAT36 for ; Fri, 20 Nov 2009 05:27:04 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.195]) by olra.theworths.org (Postfix) with ESMTP id 3426C431FAE for ; Fri, 20 Nov 2009 05:27:04 -0800 (PST) Received: from vuizook.err.no (vuizook.err.no [85.19.221.46]) by mx.perfora.net (node=mxus1) with ESMTP (Nemesis) id 0MGjw9-1NOxuB44DR-00DUaZ for notmuch@notmuchmail.org; Fri, 20 Nov 2009 08:27:03 -0500 Received: from cha92-13-88-165-248-19.fbx.proxad.net ([88.165.248.19] helo=jigen) by vuizook.err.no with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NBTVq-0005pr-Tf for notmuch@notmuchmail.org; Fri, 20 Nov 2009 14:27:01 +0100 Received: from mh by jigen with local (Exim 4.69) (envelope-from ) id 1NBTVJ-00050w-DR for notmuch@notmuchmail.org; Fri, 20 Nov 2009 14:26:25 +0100 Date: Fri, 20 Nov 2009 14:26:25 +0100 From: Mike Hommey To: notmuch@notmuchmail.org Message-ID: <20091120132625.GA19246@glandium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GPG-Fingerprint: A479 A824 265C B2A5 FC54 8D1E DE4B DA2C 54FD 2A58 User-Agent: Mutt/1.5.20 (2009-06-14) Subject: [notmuch] Segfault with weird Message-ID X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 13:27:04 -0000 Hi, I got a segfault when importing my maildir. It happened because of an old weird email, where the message-id is the following: Message-ID: <000022b17a1f$00004fbe$00000550@myrop (ew6.southwind.net [216.53.98.70]) by onyx.southwind.net from homepage.com (114.230.197.216) by newmail.spectraweb.ch from default (m202.2-25.warwick.net [ 218.242.202.80]) by host.warwick.net (8.10.0.Beta10/8.10.0.Beta10) with SMTP id e9GKEKk19201> I have absolutely no idea how it got this value, but the mail being an archived 8 years old spam, I'm not exactly sure if anyone would still expect such message id to occur. Anyways, the stack dump is the following: #0 0x00007ffff6d1e598 in Xapian::Document::add_term(std::string const&, unsigned int) () from /usr/lib/libxapian.so.15 #1 0x000000000040f5ff in _notmuch_message_add_term (message=0x0, prefix_name=0x41ad7f "tag", value=0x4191b0 "inbox") at lib/message.cc:587 #2 0x000000000040f827 in notmuch_message_add_tag (message=0x0, tag=0x4191b0 "inbox") at lib/message.cc:668 #3 0x0000000000407bc8 in tag_inbox_and_unread (message=0x0) at notmuch-new.c:44 #4 0x0000000000407f63 in add_files_recursive (notmuch=0x62cc20, path=0x832e90 "/home/mh/Maildir/saved-messages/cur", st=0x7fffffffe000, state=0x7fffffffe240) at notmuch-new.c:185 #5 0x0000000000408036 in add_files_recursive (notmuch=0x62cc20, path=0x832de0 "/home/mh/Maildir/saved-messages", st=0x7fffffffe000, state=0x7fffffffe240) at notmuch-new.c:223 #6 0x0000000000408036 in add_files_recursive (notmuch=0x62cc20, path=0x62c920 "/home/mh/Maildir", st=0x7fffffffe000, state=0x7fffffffe240) at notmuch-new.c:223 #7 0x0000000000408245 in add_files (notmuch=0x62cc20, path=0x62c920 "/home/mh/Maildir", state=0x7fffffffe240) at notmuch-new.c:287 #8 0x0000000000408704 in notmuch_new_command (ctx=0x61f140, argc=0, argv=0x7fffffffe3e8) at notmuch-new.c:431 #9 0x0000000000406ea8 in main (argc=2, argv=0x7fffffffe3d8) at notmuch.c:400 And the most likely problem is that message is NULL. Now, looking at the code, there seems to me there actually 3 problems: - _notmuch_message_create_for_message_id can return NULL, and while there is a test for it in notmuch_database_add_message, the function still returns a success code - things are still going on even when message is NULL in add_files_recursive - for some reason, xapian doesn't want to add the document corresponding to this old spam message: notmuch->xapian_db->add_document throws an exception. I can provide the spam if necessary, or can continue debugging the issue with some guidance. Cheers, Mike From ingmar@exherbo.org Fri Nov 20 05:36:20 2009 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 A3C71431FBC for ; Fri, 20 Nov 2009 05:36:20 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 bgvMiUvrKo3D for ; Fri, 20 Nov 2009 05:36:20 -0800 (PST) Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by olra.theworths.org (Postfix) with ESMTP id C30AA431FAE for ; Fri, 20 Nov 2009 05:36:19 -0800 (PST) Received: from [83.101.72.69] (helo=localhost) by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NBTes-00046N-QL; Fri, 20 Nov 2009 13:36:19 +0000 From: Ingmar Vanhassel To: Date: Fri, 20 Nov 2009 14:36:13 +0100 Message-Id: <1258724174-18684-1-git-send-email-ingmar@exherbo.org> X-Mailer: git-send-email 1.6.5.2.433.g23cdb In-Reply-To: <87fx8b72vs.fsf@yoom.home.cworth.org> References: <87fx8b72vs.fsf@yoom.home.cworth.org> Subject: [notmuch] [PATCH 1/2] zsh-completion: Initial zsh-completion for notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 13:36:20 -0000 Signed-off-by: Ingmar Vanhassel --- contrib/notmuch-completion.zsh | 74 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 74 insertions(+), 0 deletions(-) create mode 100644 contrib/notmuch-completion.zsh Moved & renamed as you suggested. diff --git a/contrib/notmuch-completion.zsh b/contrib/notmuch-completion.zsh new file mode 100644 index 0000000..67a9aba --- /dev/null +++ b/contrib/notmuch-completion.zsh @@ -0,0 +1,74 @@ +#compdef notmuch + +# ZSH completion for `notmuch` +# Copyright © 2009 Ingmar Vanhassel + +_notmuch_commands() +{ + local -a notmuch_commands + notmuch_commands=( + 'setup:interactively set up notmuch for first use' + 'new:find and import any new message to the database' + 'search:search for messages matching the search terms, display matching threads as results' + 'reply:constructs a reply template for a set of messages' + 'show:show all messages matching the search terms' + 'tag:add or remove tags for all messages matching the search terms' + 'dump:creates a plain-text dump of the tags of each message' + 'restore:restores the tags from the given file' + 'help:show details on a command' + ) + + _describe -t command 'command' notmuch_commands +} + +_notmuch_dump() +{ + _files +} + +_notmuch_help_topics() +{ + local -a notmuch_help_topics + notmuch_help_topics=( + 'search-terms:show common search-terms syntax' + ) + _describe -t notmuch-help-topics 'topic' notmuch_help_topics +} + +_notmuch_help() +{ + _alternative \ + _notmuch_commands \ + _notmuch_help_topics +} + +_notmuch_restore() +{ + _files +} + +_notmuch_search() +{ + _arguments -s : \ + '--max-threads=[display only the first x threads from the search results]:number of threads to show: ' \ + '--first=[omit the first x threads from the search results]:number of threads to omit: ' \ + '--sort=[sort results]:sorting:((newest-first\:"reverse chronological order" oldest-first\:"chronological order"))' +} + +_notmuch() +{ + if (( CURRENT > 2 )) ; then + local cmd=${words[2]} + curcontext="${curcontext%:*:*}:notmuch-$cmd" + (( CURRENT-- )) + shift words + _call_function ret _notmuch_$cmd + return ret + else + _notmuch_commands + fi +} + +_notmuch "$@" + +# vim: set sw=2 sts=2 ts=2 et ft=zsh : -- 1.6.5.2.433.g23cdb From ingmar@exherbo.org Fri Nov 20 05:36:22 2009 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 B176E431FC3 for ; Fri, 20 Nov 2009 05:36:22 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 PgqRYs1OtEGX for ; Fri, 20 Nov 2009 05:36:21 -0800 (PST) Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by olra.theworths.org (Postfix) with ESMTP id 91356431FBC for ; Fri, 20 Nov 2009 05:36:21 -0800 (PST) Received: from [83.101.72.69] (helo=localhost) by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NBTeu-00046U-Kn; Fri, 20 Nov 2009 13:36:20 +0000 From: Ingmar Vanhassel To: Date: Fri, 20 Nov 2009 14:36:14 +0100 Message-Id: <1258724174-18684-2-git-send-email-ingmar@exherbo.org> X-Mailer: git-send-email 1.6.5.2.433.g23cdb In-Reply-To: <87fx8b72vs.fsf@yoom.home.cworth.org> References: <87fx8b72vs.fsf@yoom.home.cworth.org> Subject: [notmuch] [PATCH 2/2] bash-completion: Move to contrib X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 13:36:23 -0000 Signed-off-by: Ingmar Vanhassel --- Makefile.local | 2 +- .../notmuch-completion.bash | 0 2 files changed, 1 insertions(+), 1 deletions(-) rename notmuch-completion.bash => contrib/notmuch-completion.bash (100%) Move to contrib/ for consistency with zsh completion. diff --git a/Makefile.local b/Makefile.local index ecd4ceb..74a72aa 100644 --- a/Makefile.local +++ b/Makefile.local @@ -33,7 +33,7 @@ install: all notmuch.1.gz done ; install notmuch $(DESTDIR)$(prefix)/bin/ install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/ - install notmuch-completion.bash \ + install contrib/notmuch-completion.bash \ $(DESTDIR)/etc/bash_completion.d/notmuch install-emacs: install emacs diff --git a/notmuch-completion.bash b/contrib/notmuch-completion.bash similarity index 100% rename from notmuch-completion.bash rename to contrib/notmuch-completion.bash -- 1.6.5.2.433.g23cdb From jan@ryngle.com Fri Nov 20 07:08:34 2009 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 F2CF3431FBC for ; Fri, 20 Nov 2009 07:08:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 n+3WPxV+CuXL for ; Fri, 20 Nov 2009 07:08:33 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 4395B431FAE for ; Fri, 20 Nov 2009 07:08:33 -0800 (PST) Received: by bwz24 with SMTP id 24so2374819bwz.30 for ; Fri, 20 Nov 2009 07:08:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.155.92 with SMTP id r28mr1491982bkw.121.1258729711092; Fri, 20 Nov 2009 07:08:31 -0800 (PST) Date: Fri, 20 Nov 2009 16:08:31 +0100 Message-ID: From: Jan Janak To: Not Much Mail Content-Type: text/plain; charset=UTF-8 Subject: [notmuch] Recommended Coding Style? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 15:08:34 -0000 Hi Guys, Is there any recommended coding style for the C/C++ code in notmuch? -- Jan From chris@chris-wilson.co.uk Fri Nov 20 07:17:01 2009 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 01BEA431FBC for ; Fri, 20 Nov 2009 07:17:01 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 2MyJTVdUswce for ; Fri, 20 Nov 2009 07:17:00 -0800 (PST) Received: from azsmga102.ch.intel.com (mga12.intel.com [143.182.124.36]) by olra.theworths.org (Postfix) with ESMTP id 1714B431FAE for ; Fri, 20 Nov 2009 07:16:59 -0800 (PST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 20 Nov 2009 07:16:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,777,1249282800"; d="scan'208";a="213880172" Received: from unknown (HELO cwilso3-mobl.ger.corp.intel.com) ([10.255.16.184]) by azsmga001.ch.intel.com with SMTP; 20 Nov 2009 07:16:57 -0800 Received: by cwilso3-mobl.ger.corp.intel.com (sSMTP sendmail emulation); Fri, 20 Nov 2009 15:15:16 +0000 Content-Type: text/plain; charset=UTF-8 From: Chris Wilson To: Jan Janak In-reply-to: References: Date: Fri, 20 Nov 2009 15:15:16 +0000 Message-Id: <1258729976-sup-5984@broadwater.alporthouse.com> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Cc: Not Much Mail Subject: Re: [notmuch] Recommended Coding Style? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 15:17:01 -0000 Excerpts from Jan Janak's message of Fri Nov 20 15:08:31 +0000 2009: > Is there any recommended coding style for the C/C++ code in notmuch? My prediction is that Carl will go with something close to what he wrote for Cairo: http://cgit.freedesktop.org/cairo/tree/CODING_STYLE He may or may not change to a more kernel style, but he definitely will not mandate 3-space indents. ;-) -ickle -- Chris Wilson, Intel Open Source Technology Centre From aneesh.kumar@linux.vnet.ibm.com Fri Nov 20 07:27:33 2009 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 66668431FBC for ; Fri, 20 Nov 2009 07:27:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 zFpS4pQ7VFdB for ; Fri, 20 Nov 2009 07:27:32 -0800 (PST) Received: from e28smtp02.in.ibm.com (e28smtp02.in.ibm.com [122.248.162.2]) by olra.theworths.org (Postfix) with ESMTP id 21FCE431FAE for ; Fri, 20 Nov 2009 07:27:31 -0800 (PST) Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp02.in.ibm.com (8.14.3/8.13.1) with ESMTP id nAKFRSSG031145 for ; Fri, 20 Nov 2009 20:57:28 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAKFRRLo2629714 for ; Fri, 20 Nov 2009 20:57:28 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAKFRR4a013074 for ; Fri, 20 Nov 2009 20:57:27 +0530 Received: from localhost.localdomain ([9.124.222.167]) by d28av01.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAKFRQKF013066; Fri, 20 Nov 2009 20:57:26 +0530 From: "Aneesh Kumar K.V" To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 20:57:24 +0530 Message-Id: <1258730844-8711-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.6.5.2.74.g610f9 Subject: [notmuch] [PATCH] notmuch.el: Add face support to search and show mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 15:27:33 -0000 This add two faces, notmuch-show-subject-face and notmuch-tag-unread-face. The first face is used to show the subject line in the notmuch-show-mode and the second one the unread tag in the notmuch-search-mode. The changes are done looking at message.el in emacs source Signed-off-by: Aneesh Kumar K.V --- notmuch.el | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 50 insertions(+), 5 deletions(-) diff --git a/notmuch.el b/notmuch.el index 4b2936a..71e9dea 100644 --- a/notmuch.el +++ b/notmuch.el @@ -603,9 +603,37 @@ which this thread was originally shown." (force-window-update) (redisplay t)) +(defun notmuch-font-lock-matcher (regexp) + (let ((form + `(lambda (limit) + (let ((start (point))) + (save-restriction + (widen) + (goto-char (point-min)) + (setq limit (min limit (point-max))) + (goto-char start)) + (and (< start limit) + (re-search-forward ,regexp limit t)))))) + (if (featurep 'bytecomp) + (byte-compile form) + form))) + +(defface notmuch-show-subject-face + '((((class color) (background light)) (:foreground "yellow" :bold t)) + (((class color) (background dark)) (:foreground "yellow" :bold t))) + "Notmuch show mode face used to highligh subject line." + :group 'notmuch) + +(defvar notmuch-show-font-lock-keywords + (let ((content "")) + `((,(notmuch-font-lock-matcher + (concat "\\(Subject:.*$\\)" content)) + (1 'notmuch-show-subject-face nil t)))) + "Additonal expression to hightlight in notmuch-search-mode") + ;;;###autoload -(defun notmuch-show-mode () - "Major mode for viewing a thread with notmuch. +(define-derived-mode notmuch-show-mode text-mode "notmuch-show" +"Major mode for viewing a thread with notmuch. This buffer contains the results of the \"notmuch show\" command for displaying a single thread of email from your email archives. @@ -643,7 +671,9 @@ view, (remove the \"inbox\" tag from each), with (use-local-map notmuch-show-mode-map) (setq major-mode 'notmuch-show-mode mode-name "notmuch-show") - (setq buffer-read-only t)) + (setq buffer-read-only t) + (set (make-local-variable 'font-lock-defaults) + '(notmuch-show-font-lock-keywords t))) ;;;###autoload @@ -769,8 +799,21 @@ thread from that buffer can be show when done with this one)." (end-of-buffer arg) (forward-line -1)) +(defface notmuch-tag-unread-face + '((((class color) (background light)) (:foreground "goldenrod" :bold t)) + (((class color) (background dark)) (:foreground "goldenrod" :bold t))) + "Notmuch search mode face used to highligh inbox tags." + :group 'notmuch) + +(defvar notmuch-search-font-lock-keywords + (let ((content "")) + `((,(notmuch-font-lock-matcher + (concat "\\(unread\\)" content)) + (1 'notmuch-tag-unread-face nil t)))) + "Additonal expression to hightlight in notmuch-search-mode") + ;;;###autoload -(defun notmuch-search-mode () +(define-derived-mode notmuch-search-mode text-mode "notmuch-search" "Major mode for searching mail with notmuch. This buffer contains the results of a \"notmuch search\" of your @@ -799,7 +842,9 @@ global search. (setq truncate-lines t) (setq major-mode 'notmuch-search-mode mode-name "notmuch-search") - (setq buffer-read-only t)) + (setq buffer-read-only t) + (set (make-local-variable 'font-lock-defaults) + '(notmuch-search-font-lock-keywords t))) (defun notmuch-search-find-thread-id () (save-excursion -- 1.6.5.2.74.g610f9 From anholt@gaiman.anholt.net Fri Nov 20 05:01:36 2009 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 2EEF4431FBF for ; Fri, 20 Nov 2009 05:01:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 QxN4TavcY6+A for ; Fri, 20 Nov 2009 05:01:35 -0800 (PST) Received: from kingsolver.anholt.net (71-20-254-182.war.clearwire-wmx.net [71.20.254.182]) by olra.theworths.org (Postfix) with ESMTP id ACD0D431FAE for ; Fri, 20 Nov 2009 05:01:35 -0800 (PST) Received: from gaiman.anholt.net (localhost [127.0.0.1]) by kingsolver.anholt.net (Postfix) with ESMTP id BE85E2C9C02F; Fri, 20 Nov 2009 05:01:41 -0800 (PST) Received: by gaiman.anholt.net (Postfix, from userid 1000) id CBCFC1620D9; Fri, 20 Nov 2009 14:00:43 +0100 (CET) From: Eric Anholt To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 14:00:42 +0100 Message-Id: <1258722042-14237-1-git-send-email-eric@anholt.net> X-Mailer: git-send-email 1.6.4.3 X-Mailman-Approved-At: Fri, 20 Nov 2009 07:47:22 -0800 Cc: Eric Anholt Subject: [notmuch] [PATCH] When a search query triggers a Xapian exception, log what the query was. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 13:01:36 -0000 In my script containing a series of queries to be run on new mail for setting up tags, it's nice to see which query I typed wrong. Signed-off-by: Eric Anholt --- lib/query.cc | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/query.cc b/lib/query.cc index 75f22b3..ea521dd 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -151,6 +151,7 @@ notmuch_query_search_messages (notmuch_query_t *query, } catch (const Xapian::Error &error) { fprintf (stderr, "A Xapian exception occurred: %s\n", error.get_msg().c_str()); + fprintf (stderr, "Query string was: %s\n", query->query_string); } return _notmuch_messages_create (message_list); -- 1.6.4.3 From five9a2@gmail.com Fri Nov 20 07:58:16 2009 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 9D364431FBC for ; Fri, 20 Nov 2009 07:58:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ZT-ZB4xqmsXx for ; Fri, 20 Nov 2009 07:58:16 -0800 (PST) Received: from mail-px0-f180.google.com (mail-px0-f180.google.com [209.85.216.180]) by olra.theworths.org (Postfix) with ESMTP id F1F62431FAE for ; Fri, 20 Nov 2009 07:58:15 -0800 (PST) Received: by pxi10 with SMTP id 10so2507348pxi.33 for ; Fri, 20 Nov 2009 07:58:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=RucAyUTwUgVWQJ/b4vm//QpiwSSJIaaSRJZnWd+A0Ws=; b=GpXTiFU42bW0op9+ikvHmUVB0db+FOTiKUZ/xQk+8zoaDCXRCOEcwMIwlY2gtCMRup zkxl0Yr/ReHvjJTj4oHvDv5gyts3U5UAwKwAsfVe3uWBSaWjlC5zcjoqd9EMeH25qVPy bdyiM4hURmcVCYiYLYm7Mnb0zAo+ZD4FXvgrw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=TpyhjIZ4LbD8lxQVLXiMsCKIuqcHo7Du4oKUrxW6oIC+Icn7kAq75M2jLhceibNA57 /uOy5lsk2Qan7I1bY4FslUNeRS2lrYjw6Q9y9BO4HzZhLx6P2KQ/x3FDyOn5TfWC9yEQ iMF7mkOCO16gUUvOA0gyUPnSFlTDaKh5VpBus= MIME-Version: 1.0 Sender: five9a2@gmail.com Received: by 10.140.171.2 with SMTP id t2mr110536rve.3.1258732695125; Fri, 20 Nov 2009 07:58:15 -0800 (PST) Date: Fri, 20 Nov 2009 16:58:15 +0100 X-Google-Sender-Auth: 69e152ae882771a7 Message-ID: <383ade90911200758w61d34d8dudfc2713208b55d9@mail.gmail.com> From: Jed Brown To: notmuch@notmuchmail.org Content-Type: multipart/mixed; boundary=000e0cd2bd4228ff990478cf8b16 Subject: [notmuch] [PATCH] Drop redundant CFLAGS, was already included in CXXFLAGS X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 15:58:16 -0000 --000e0cd2bd4228ff990478cf8b16 Content-Type: text/plain; charset=UTF-8 --- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --000e0cd2bd4228ff990478cf8b16 Content-Type: text/x-patch; charset=US-ASCII; name="0001-Drop-redundant-CFLAGS-was-already-included-in-CXXFLA.patch" Content-Disposition: attachment; filename="0001-Drop-redundant-CFLAGS-was-already-included-in-CXXFLA.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: 0.1 ZGlmZiAtLWdpdCBhL01ha2VmaWxlIGIvTWFrZWZpbGUNCmluZGV4IGI2ODYxZTkuLmY5ZjdhZjAg MTAwNjQ0DQotLS0gYS9NYWtlZmlsZQ0KKysrIGIvTWFrZWZpbGUNCkBAIC0zMiw3ICszMiw3IEBA IGluY2x1ZGUgbGliL01ha2VmaWxlLmxvY2FsDQogaW5jbHVkZSBNYWtlZmlsZS5jb25maWcNCiAN CiAlLm86ICUuY2MgJChhbGxfZGVwcykNCi0JJChDWFgpIC1jICQoQ0ZMQUdTKSAkKENYWEZMQUdT KSAkPCAtbyAkQA0KKwkkKENYWCkgLWMgJChDWFhGTEFHUykgJDwgLW8gJEANCiANCiAlLm86ICUu YyAkKGFsbF9kZXBzKQ0KIAkkKENDKSAtYyAkKENGTEFHUykgJDwgLW8gJEANCg== --000e0cd2bd4228ff990478cf8b16-- From cworth@cworth.org Fri Nov 20 08:01:30 2009 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 2470B431FBF; Fri, 20 Nov 2009 08:01:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 hjGAfZFPtT5T; Fri, 20 Nov 2009 08:01:28 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 5FFF9431FAE; Fri, 20 Nov 2009 08:01:28 -0800 (PST) From: Carl Worth To: Dominik Epple , notmuch@notmuchmail.org In-Reply-To: <123554aa0911200056h73def158pb0db64a2a78ed687@mail.gmail.com> References: <123554aa0911200056h73def158pb0db64a2a78ed687@mail.gmail.com> Date: Fri, 20 Nov 2009 17:01:17 +0100 Message-ID: <877htlmbhu.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] notmuch new: Memory problem X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 16:01:30 -0000 On Fri, 20 Nov 2009 09:56:50 +0100, Dominik Epple wrote: > I am strongly interested in giving notmuch a try. Welcome to notmuch, Dominik! I'm sorry your initial attempt to use it hasn't been quite as smooth as we might like. > But I fail setting > it up. The problem is that during "notmuch new", memory consumption > and system load increases to values that make my system unusable. I > then killed "notmuch new" at a memory consumption of 2.7G and at a > system load of 7. Yikes. That really sounds like something ran out of control consuming memory. I certainly haven't seen anything like that before. > After hitting Ctrl-C, it says "Stopping" but does not stop. I then > killed "notmuch new" after some minutes with signal KILL. After "Stopping" gets printed, the notmuch code won't be doing any more work. It is expected that it will take some time after that message is printed before notmuch will actually exit. The extra time is to wait for Xapian to flush out to disk data that notmuch has already provided to it. I'm curious how big your .notmuch directory ended up after this operation. (And how that compares in size to the total size of your collection of mail.) > Is there a problem with the number of my mails? I currently have over > 40.000 Mails... they live currently in mbox files, I created a Maildir > with mb2md-3.20.pl. That's definitely not too much mail. I think you should expect "notmuch new" currently to index on the order of 10 - 100 messages/sec. Your "notmuch new" process should have been reporting a count once per second as it progressed, (at least until things went wrong). How far did you see that go? I'm wondering if there's a particular file (or files) that are triggering the bad behavior. Maybe we need a debug option for "notmuch new" to print the filenames of messages as they are being processed. -Carl From jnrowe@gmail.com Fri Nov 20 08:10:07 2009 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 BFCF2431FAE for ; Fri, 20 Nov 2009 08:10:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 A3PtMgY9uWfj for ; Fri, 20 Nov 2009 08:10:06 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id E061D431FBC for ; Fri, 20 Nov 2009 08:10:05 -0800 (PST) Received: by bwz24 with SMTP id 24so2440393bwz.30 for ; Fri, 20 Nov 2009 08:10:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:in-reply-to :references:date:message-id:mime-version:content-type; bh=dzTmPiQSfJc4bd85fQANJ7ctxrpmfJ6wsQZdmC9HRbA=; b=YuJGVuRpiu49HiuebMeDWrgLTKxcwR/Gacshgz0S18+05TJKgIct9ziPHmtYRjX+la EhN9E0H5coprub2EGIpyGHuvPiXzm0Pvfk/LQdIDPV2T6ng3C5aZkbZZIISTZ2iMeSxU ALva5IrNdnyxVvbVqukrno6YQGCVrtj/AArzo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-type; b=r+1nwcI0JX8YVu6KRbCF+l1RPu9kcxIhYyZVql5Q1+6+SrXPqnOBEaK46NBp1HqIzM mzTVW+bXbWrD3KGj27vGlZCiYW7EowV9xOb5U4xPTFUVBda1Nhi0yv1vl31IXEXO0TlK jI+lUrNhklJYe5aU5gm/ZXMC8c0QYmVFk+Mr8= Received: by 10.216.90.14 with SMTP id d14mr480519wef.30.1258733404872; Fri, 20 Nov 2009 08:10:04 -0800 (PST) Received: from localhost (92.40.162.43.sub.mbb.three.co.uk [92.40.162.43]) by mx.google.com with ESMTPS id g11sm3056998gve.18.2009.11.20.08.10.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 20 Nov 2009 08:10:03 -0800 (PST) From: James Rowe To: Carl Worth , notmuch@notmuchmail.org In-Reply-To: <87lji1k014.fsf@yoom.home.cworth.org> References: <4b04fdc2.25c0100a.68f2.ffffc8bf@mx.google.com> <87lji1k014.fsf@yoom.home.cworth.org> Date: Fri, 20 Nov 2009 16:09:54 +0000 Message-ID: <87d43dkwj1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Gentoo ebuild for notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 16:10:07 -0000 On Fri, 20 Nov 2009 10:39:35 +0100, Carl Worth wrote: > If you think it makes sense, I can add this to the notmuch repository in > a packaging/gentoo directory. Just let me know if you'd like that. Hmm... The problem is the ebuild can't currently use the install target because the file locations are incorrect for Gentoo[1]. Which means it could require quite a bit of churn to keep it synced as the build process changes. The patch that follows makes it easier to use the install target within the ebuild. If this sort of change is acceptable then the ebuild will be simpler, and it is more likely to stay working without me kicking heaps of patches at you. Given that I'd say "yes, please include it." Thanks, James 1. fex. Bash completion files are installed in to /usr/share/bash-completion, then enabled via a link in /etc/bash_completion.d if desired From jnrowe@gmail.com Fri Nov 20 08:16:07 2009 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 3B4CA431FBC for ; Fri, 20 Nov 2009 08:16:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 QVs+wf+mm8Kb for ; Fri, 20 Nov 2009 08:16:07 -0800 (PST) Received: from mail-fx0-f217.google.com (mail-fx0-f217.google.com [209.85.220.217]) by olra.theworths.org (Postfix) with ESMTP id DC2A4431FAE for ; Fri, 20 Nov 2009 08:16:06 -0800 (PST) Received: by fxm9 with SMTP id 9so3846299fxm.30 for ; Fri, 20 Nov 2009 08:16:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:to:date:subject; bh=AQAoa6sOjo7oXf3vIka0K2rQTC8grtV/uIYjJL/zJHU=; b=Brp/bdnzkZ9SdQKenbE1MCvxGFDQ0OU+HK+pgCYWnqYhcd3/K2iNaNGGWPyGUIzfoA bxhgzUJbFVFYpdhxkzPG2/uAVIHZ1a6SB5fhiPYMFYuBmb6jcXp3Xg4h5Tj7txUrbsiV 8G8iXfwBIgSVegBJtq7iUZuQz7Oy+KfNjMAKg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:to:date:subject; b=xRkTN4zq68xr6RUmjZ7XYyy3NopKzVQjulnoiJaxjahhykx4C3mEapjHNYLESaLF2P 4ZH4YPdCik1v6IZVv3CUPAP8OabmEjWdW60CoyfPoFePuMVwu1rhve1omDeKRrxsN+hX rghjeMOtdWQlCIJRn8LadWEiKVT/gZz7uM858= Received: by 10.216.87.144 with SMTP id y16mr488904wee.95.1258733765788; Fri, 20 Nov 2009 08:16:05 -0800 (PST) Received: from localhost (92.40.162.43.sub.mbb.three.co.uk [92.40.162.43]) by mx.google.com with ESMTPS id g9sm3083282gvc.25.2009.11.20.08.16.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 20 Nov 2009 08:16:04 -0800 (PST) Message-ID: <4b06c0c4.096c100a.2608.ffffe685@mx.google.com> In-Reply-To: <87d43dkwj1.fsf@gmail.com> References: <87d43dkwj1.fsf@gmail.com> From: James Rowe To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 15:28:26 +0000 Subject: [notmuch] [PATCH] Make bash completion directory configurable. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 16:16:07 -0000 Some systems install completion scripts in /usr/share/bash-completion, make the location configurable from Makefile.config. --- Makefile.config | 1 + Makefile.local | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.config b/Makefile.config index 63c90a8..d72a39e 100644 --- a/Makefile.config +++ b/Makefile.config @@ -1 +1,2 @@ prefix = /usr/local +bash_completion_dir = /etc/bash_completion.d diff --git a/Makefile.local b/Makefile.local index ecd4ceb..1017a8c 100644 --- a/Makefile.local +++ b/Makefile.local @@ -27,14 +27,14 @@ notmuch.1.gz: notmuch.1 install: all notmuch.1.gz for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \ - $(DESTDIR)/etc/bash_completion.d/ ; \ + $(DESTDIR)$(bash_completion_dir) ; \ do \ install -d $$d ; \ done ; install notmuch $(DESTDIR)$(prefix)/bin/ install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/ install notmuch-completion.bash \ - $(DESTDIR)/etc/bash_completion.d/notmuch + $(DESTDIR)$(bash_completion_dir)/notmuch install-emacs: install emacs for d in $(DESTDIR)/$(emacs_lispdir) ; \ -- 1.6.4.4 From cworth@cworth.org Fri Nov 20 09:02:17 2009 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 04F7C431FBF; Fri, 20 Nov 2009 09:02:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 6uUlKwzezffp; Fri, 20 Nov 2009 09:02:16 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E1064431FAE; Fri, 20 Nov 2009 09:02:15 -0800 (PST) From: Carl Worth To: Jan Janak , Jeffrey Ollie In-Reply-To: References: <935ead450911181000w2cddfe95qe9efd5bea9f9209d@mail.gmail.com> <20091119164543.25e7afe5@hikari> <935ead450911191823s776fda6eyb6f6949ac982bd03@mail.gmail.com> <87lji11leu.fsf@yoom.home.cworth.org> <935ead450911200510ie80d28dv1d82ccbd11803128@mail.gmail.com> Date: Fri, 20 Nov 2009 18:02:04 +0100 Message-ID: <876395m8oj.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Not Much Mail Subject: Re: [notmuch] Segfault searching for tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 17:02:17 -0000 On Fri, 20 Nov 2009 14:20:45 +0100, Jan Janak wrote: > > Ah, excellent! =C2=A0This does indeed seem to prevent the crash. =C2=A0= Now I > > just need to figure out how to get all my mail out of GMail. >=20 > I did exactly that with offlineimap. It crashes from time to time, but > then you can just restart it and continue. It sounds like a lot of people are wanting to do that. So it probably wouldn't hurt for someone who's done it to write up instructions for that, (or post a link to existing instructions). I'd say that it might make sense to put these up in a wiki, (and I'll probably eventually setup an ikiwiki instance for notmuchmail.org just like I do for cworth.org and cairographics.org). But then again, we're *already* using email, and I've got this half-baked idea about being able to just tag useful posts and have them appear on the webpage. > A few days ago I sent a patch which converts mail subdirectories to > tags and because Gmail IMAP server converts labels to subdirectories, > you can use that to convert gmail's labels to notmuch tags > automatically. I haven't lost that. Sorry it's taking me a bit to get to it, though! I think there were two different patches from two people for this feature. So I've got those both tagged and will review them soon. -Carl From cworth@cworth.org Fri Nov 20 09:04:20 2009 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 ECA93431FBF; Fri, 20 Nov 2009 09:04:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 b2OPs8nOlX3m; Fri, 20 Nov 2009 09:04:19 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 126BF431FAE; Fri, 20 Nov 2009 09:04:18 -0800 (PST) From: Carl Worth To: Mike Hommey , notmuch@notmuchmail.org In-Reply-To: <20091120132625.GA19246@glandium.org> References: <20091120132625.GA19246@glandium.org> Date: Fri, 20 Nov 2009 18:04:07 +0100 Message-ID: <874oopm8l4.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Segfault with weird Message-ID X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 17:04:20 -0000 On Fri, 20 Nov 2009 14:26:25 +0100, Mike Hommey wrote: > I can provide the spam if necessary, or can continue debugging the issue > with some guidance. It sounds strange to say it, but yes, please send me that spam! -Carl From cworth@cworth.org Fri Nov 20 09:17:14 2009 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 64902431FBF; Fri, 20 Nov 2009 09:17:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Sii-gzXyOoPE; Fri, 20 Nov 2009 09:17:13 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 3CD8A431FAE; Fri, 20 Nov 2009 09:17:13 -0800 (PST) From: Carl Worth To: Alexander Botero-Lowry , notmuch@notmuchmail.org In-Reply-To: <1258593343-7972-1-git-send-email-alex.boterolowry@gmail.com> References: <1258593343-7972-1-git-send-email-alex.boterolowry@gmail.com> Date: Fri, 20 Nov 2009 18:17:02 +0100 Message-ID: <873a49m7zl.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Checkin some command-only tcsh completions X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 17:17:14 -0000 On Wed, 18 Nov 2009 17:15:43 -0800, Alexander Botero-Lowry wrote: > diff --git a/notmuch-completion.tcsh b/notmuch-completion.tcsh Thanks, Alexander. I moved this down into contrib where our other completion scripts are and pushed it out. -Carl From aperez@igalia.com Fri Nov 20 11:01:43 2009 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 43ADF431FBC for ; Fri, 20 Nov 2009 11:01:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 M3NXyWaWV1gP for ; Fri, 20 Nov 2009 11:01:42 -0800 (PST) Received: from smtp2.mundo-r.com (smtp3.mundo-r.com [212.51.32.191]) by olra.theworths.org (Postfix) with ESMTP id 2A074431FAE for ; Fri, 20 Nov 2009 11:01:41 -0800 (PST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEAMJ1BktbdWOb/2dsb2JhbACBTtNXCoQyBA X-IronPort-AV: E=Sophos;i="4.47,260,1257116400"; d="asc'?scan'208";a="556056499" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp2.mundo-r.com with ESMTP; 20 Nov 2009 20:01:40 +0100 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim) id 1NBYjk-0004KN-EP for ; Fri, 20 Nov 2009 20:01:40 +0100 Received: from ip129.dynamic.igalia.com ([192.168.10.129] helo=hikari.localdomain) by mail.igalia.com with esmtp (Exim) id 1NBYjj-0003Yp-00 for ; Fri, 20 Nov 2009 20:01:39 +0100 Received: from hikari (localhost [127.0.0.1]) by hikari.localdomain (Postfix) with ESMTP id F1E2D3134181 for ; Fri, 20 Nov 2009 20:03:00 +0100 (CET) Date: Fri, 20 Nov 2009 20:03:00 +0100 From: Adrian Perez de Castro To: notmuch@notmuchmail.org Message-ID: <20091120200300.55ba8736@hikari> In-Reply-To: <87lji11leu.fsf@yoom.home.cworth.org> References: <935ead450911181000w2cddfe95qe9efd5bea9f9209d@mail.gmail.com> <20091119164543.25e7afe5@hikari> <935ead450911191823s776fda6eyb6f6949ac982bd03@mail.gmail.com> <87lji11leu.fsf@yoom.home.cworth.org> Organization: Igalia X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.3; x86_64-redhat-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAADBQTFRFBwcHFhYWKCgoNzc3SEhIV1dXaGhod3d3iIiIlpaWqKiouLi4x8fH2NjY5+fn/v7+rSjDkgAAAjVJREFUOE9l07tvE0EQwOHfrkV9O+eko7g701BBfECJsIigT2IpooIqaSiRUEB0REj00FBQgYSCkhry+gecUPJybJeIxLumTbilsH2PMNXufDOa3ZVW+1JkpbUmD/8+vXR3c7or4Gz93mH309Kz8/C9/RQge7VfhW/LW+PF8IkrQ7Z6OKmQr1tl+LU/yWP9mxJka9O88fZHPwf/7u0kLyCnX3I4fQhgjAgIfi+HHw5A1Y2ggIMcFKAEnRoL0M3BosI4TI2IATjuT8DvSNJoNNJgkIhxlr9TUHeSpDnfohlIrMBlU+BGmsZqfr69FMfGMw4NoG835+J62riWyjQ/uXlTQjNUIoYegMsBM0pCD8oDas7n4HQsBghXFxJTW42KDs+4XLfjsN0wOYgABqARjMKIHIaAQnmHjsI5Cvi9Cf6k03OoWBkpIP3Q7354+dEimFBKHbMP9oKjwfd9gbrxR5KDToczK4uPF8UgNomKU2GaENRi77zyDKICxKBS4xXYbONPMQMdYZTBwMiMWiUg9g6UJ3OBogzjV8E7sBVwyvfAOYdQhsABzuOxI1MGZbs98Q6Md5UOfbbR2R0eWOesrnRw5ajT6f60LrNhWIHZpBnUWv2s14ukArWWTqTes3YQxRXgFkcMu70TPYqqUBs0YwmO967OVIdTG4bY4a7WLaqgLm5vbHdH5np0Dri//fmg7y8scB4u3+zsuNlH0X+g19bby69b+TYH6isvns8VdQWgxj9tHP8AR5/hSdYqkwsAAAAASUVORK5CYII= Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/_c1Cg6wI_1TUQe7AmijdlNP"; protocol="application/pgp-signature" Subject: Re: [notmuch] Segfault searching for tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 19:01:43 -0000 --Sig_/_c1Cg6wI_1TUQe7AmijdlNP Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 20 Nov 2009 12:32:41 +0100, Carl wrote: > On Thu, 19 Nov 2009 16:45:43 +0100, Adrian Perez de Castro wrote: > > The thing is that in notmuch_message_get_in_reply_to(), line 288, a NULL > > instance of Xapian::TermIterator is dereferenced. In my particular case, > > the culpript is a cache file of Claws-Mail, as seen in the following GDB > > session: >=20 > Not quite NULL, (nor is it quite dereferencing---this is nasty C++ > overloading), but yeah, the idea is the same. We need to protect all of > our "calls" to this overloaded operator to not call it when the iterator > is equal to the value returned by termlist_end (). Well, of course you are right, it is an overloaded operator, which (unfortunately, IMHO) looks like a pointer dereference. That is exactly one of the things that I find more confusing about C++: it has features like operator overloading which look cool initially, but that in the end imply more complexity than needed. I can understand why you decided to wrap Xapian with a plain C API :) =20 > On Thu, 19 Nov 2009 20:23:15 -0600, Jeffrey Ollie wrote: > > I straced some of the crashes, and the last file that was read before > > the crash was a malformed message. I've attached one of the messages. > > I've been using offlineimap to sync my gmail mailbox to my laptop so > > that I can use notmuch. offlineimap isn't the most stable program, > > but I'm not sure yet if offlineimap is causing the problem or if > > that's the way the message is in gmail. >=20 > Thanks for the file. I never like to push code that I haven't tested, so > this was very helpful. >=20 > Below is the patch that I just pushed which seems to do the trick. I can confirm that this patch avoids the segfault in my case, too. Thanks a lot for the quick fix. Best regards, --=20 Adrian Perez de Castro Igalia - Free Software Engineering --Sig_/_c1Cg6wI_1TUQe7AmijdlNP Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (GNU/Linux) iEYEARECAAYFAksG5+QACgkQkcVZ2+TJEjuYSACcCC0Ciwqu7MG302myWPUO9jP0 YqUAnjnjz4N4Cbr7VAt7dkXJMzhjBeuR =2teS -----END PGP SIGNATURE----- --Sig_/_c1Cg6wI_1TUQe7AmijdlNP-- From cworth@cworth.org Fri Nov 20 12:53:50 2009 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 1D1DB431FBF; Fri, 20 Nov 2009 12:53:50 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 efKiFtXgGhKT; Fri, 20 Nov 2009 12:53:49 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8EC7D431FAE; Fri, 20 Nov 2009 12:53:48 -0800 (PST) From: Carl Worth To: Mike Hommey , notmuch@notmuchmail.org In-Reply-To: <20091120132625.GA19246@glandium.org> References: <20091120132625.GA19246@glandium.org> Date: Fri, 20 Nov 2009 21:53:37 +0100 Message-ID: <87y6m0lxym.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Subject: Re: [notmuch] Segfault with weird Message-ID X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 20:53:50 -0000 --=-=-= On Fri, 20 Nov 2009 14:26:25 +0100, Mike Hommey wrote: > I got a segfault when importing my maildir. It happened because of an > old weird email, where the message-id is the following: > Message-ID: <000022b17a1f$00004fbe$00000550@myrop (ew6.southwind.net [216.53.98.70]) by onyx.southwind.net from homepage.com (114.230.197.216) by newmail.spectraweb.ch from default (m202.2-25.warwick.net [ > 218.242.202.80]) by host.warwick.net (8.10.0.Beta10/8.10.0.Beta10) with SMTP id e9GKEKk19201> Thanks for sharing this Mike, (and for sending me the original file). > Anyways, the stack dump is the following: > #0 0x00007ffff6d1e598 in Xapian::Document::add_term(std::string const&, unsigned int) () from /usr/lib/libxapian.so.15 > #1 0x000000000040f5ff in _notmuch_message_add_term (message=0x0, prefix_name=0x41ad7f "tag", value=0x4191b0 "inbox") at lib/message.cc:587 > #2 0x000000000040f827 in notmuch_message_add_tag (message=0x0, tag=0x4191b0 "inbox") at lib/message.cc:668 > #3 0x0000000000407bc8 in tag_inbox_and_unread (message=0x0) at notmuch-new.c:44 > #4 0x0000000000407f63 in add_files_recursive (notmuch=0x62cc20, path=0x832e90 "/home/mh/Maildir/saved-messages/cur", st=0x7fffffffe000, state=0x7fffffffe240) at notmuch-new.c:185 > #5 0x0000000000408036 in add_files_recursive (notmuch=0x62cc20, path=0x832de0 "/home/mh/Maildir/saved-messages", st=0x7fffffffe000, state=0x7fffffffe240) at notmuch-new.c:223 > #6 0x0000000000408036 in add_files_recursive (notmuch=0x62cc20, path=0x62c920 "/home/mh/Maildir", st=0x7fffffffe000, state=0x7fffffffe240) at notmuch-new.c:223 > #7 0x0000000000408245 in add_files (notmuch=0x62cc20, path=0x62c920 "/home/mh/Maildir", state=0x7fffffffe240) at notmuch-new.c:287 > #8 0x0000000000408704 in notmuch_new_command (ctx=0x61f140, argc=0, argv=0x7fffffffe3e8) at notmuch-new.c:431 > #9 0x0000000000406ea8 in main (argc=2, argv=0x7fffffffe3d8) at notmuch.c:400 I didn't get the same crash when importing the file. But I did get a short document out of it (just a handful of terms indexed) and most significantly, an empty message-ID term. Xapian has a limit on the maximum length of a term, so one thing we'll need to do here is to notice if the message ID exceeds that length and then treat it as a we treat a missing Message-ID header, (that is, generate our own message ID by computing a sha-1 hash over the message). So, there was an obvious bug in the message-ID handling, (the code was still looking for NULL for a missing header, but we now return "" for a missing header instead). I've fixed this. > Now, looking at the code, there seems to me there actually 3 problems: > - _notmuch_message_create_for_message_id can return NULL, and while > there is a test for it in notmuch_database_add_message, the function > still returns a success code Thanks. This is fixed now. > - things are still going on even when message is NULL in > add_files_recursive I didn't replicate this case, but it *should* be fixed now that notmuch_database_add_message is returning a non-success value. > - for some reason, xapian doesn't want to add the document corresponding > to this old spam message: notmuch->xapian_db->add_document throws an > exception. I think things had just gone wrong long before then. > I can provide the spam if necessary, or can continue debugging the issue > with some guidance. Thanks for providing it. It turns out that the giant Message-Id value wasn't causing the problem. Instead the message was corrupt by having a stray new line at the third line. (So GMime is seeing only the first two lines of headers). We *used* to have working code to detect this kind of file as "not an email" but again, this broke when we changed notmuch_message_get_header to return "" instead of NULL for missing headers. See patches below (just pushed now as well) for the fixes. -Carl --=-=-= Content-Disposition: inline; filename=handle-corrupt-mail-and-non-mail.patchset >From 52292c548512214fd3dd205edb4ca9cf7955f2b3 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 20 Nov 2009 19:31:00 +0100 Subject: [PATCH 1/3] add_message: Properly handle missing Message-ID once again. There's been a fair amount of fallout from when we changed message_file_get_header from returning NULL to returning "" for missing headers. This is yet more fallout from that, (where we were accepting an empty message-ID rather than generating one like we want to). --- lib/database.cc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 726c5a9..294247e 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -908,7 +908,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch, * is to find a message ID (or else create one ourselves). */ header = notmuch_message_file_get_header (message_file, "message-id"); - if (header) { + if (header && *header != '\0') { message_id = _parse_message_id (message_file, header, NULL); /* So the header value isn't RFC-compliant, but it's * better than no message-id at all. */ -- 1.6.5.2 >From 656e4c413d84984dcc5fbd8016907ed03c343cb8 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 20 Nov 2009 21:02:11 +0100 Subject: [PATCH 2/3] notmuch_database_add_message: Add missing error-value propagation. Thanks to Mike Hommey for doing the analysis that led to noticing that this was missing. --- lib/database.cc | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 294247e..58a350d 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -940,8 +940,11 @@ notmuch_database_add_message (notmuch_database_t *notmuch, talloc_free (message_id); - if (message == NULL) + if (message == NULL) { + ret = COERCE_STATUS (private_status, + "Unexpected status value from _notmuch_message_create_for_message_id"); goto DONE; + } /* Is this a newly created message object? */ if (private_status == NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND) { -- 1.6.5.2 >From 3ae12b1e286d1c0041a2e3957cb01daa2981dad9 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 20 Nov 2009 21:46:37 +0100 Subject: [PATCH 3/3] add_message: Re-fix handling of non-mail files. More fallout from _get_header now returning "" for missing headers. The bug here is that we would no longer detect that a file is not an email message and give up on it like we should. And this time, I actually audited all callers to notmuch_message_get_header, so hopefully we're done fixing this bug over and over. --- lib/database.cc | 10 +++++----- lib/message.cc | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 58a350d..207246c 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -323,7 +323,7 @@ _parse_message_id (void *ctx, const char *message_id, const char **next) const char *s, *end; char *result; - if (message_id == NULL) + if (message_id == NULL || *message_id == '\0') return NULL; s = message_id; @@ -391,7 +391,7 @@ parse_references (void *ctx, { char *ref; - if (refs == NULL) + if (refs == NULL || *refs == '\0') return; while (*refs) { @@ -896,9 +896,9 @@ notmuch_database_add_message (notmuch_database_t *notmuch, subject = notmuch_message_file_get_header (message_file, "subject"); to = notmuch_message_file_get_header (message_file, "to"); - if (from == NULL && - subject == NULL && - to == NULL) + if ((from == NULL || *from == '\0') && + (subject == NULL || *subject == '\0') && + (to == NULL || *to == '\0')) { ret = NOTMUCH_STATUS_FILE_NOT_EMAIL; goto DONE; diff --git a/lib/message.cc b/lib/message.cc index 41dddd0..e0b8a8e 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -491,7 +491,7 @@ _notmuch_message_set_date (notmuch_message_t *message, /* GMime really doesn't want to see a NULL date, so protect its * sensibilities. */ - if (date == NULL) + if (date == NULL || *date == '\0') time_value = 0; else time_value = g_mime_utils_header_decode_date (date, NULL); -- 1.6.5.2 --=-=-=-- From cworth@cworth.org Fri Nov 20 12:56:44 2009 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 E21B4431FBF; Fri, 20 Nov 2009 12:56:44 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 MTcrkQqsFwyo; Fri, 20 Nov 2009 12:56:44 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 0D672431FAE; Fri, 20 Nov 2009 12:56:43 -0800 (PST) From: Carl Worth To: Dominik Epple , notmuch@notmuchmail.org In-Reply-To: <123554aa0911200056h73def158pb0db64a2a78ed687@mail.gmail.com> References: <123554aa0911200056h73def158pb0db64a2a78ed687@mail.gmail.com> Date: Fri, 20 Nov 2009 21:56:32 +0100 Message-ID: <87skc8oqyn.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] notmuch new: Memory problem X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 20:56:45 -0000 On Fri, 20 Nov 2009 09:56:50 +0100, Dominik Epple wrote: > Is there a problem with the number of my mails? I currently have over > 40.000 Mails... they live currently in mbox files, I created a Maildir > with mb2md-3.20.pl. I'm suspecting that you have some big files in there, (such as indexes from some other mail program). We had code in notmuch to detect and ignore these, but a recent bug had broken that. I just fixed this code as of the below commit. So please update and try again and let us know if things work any better. Thanks for your patience! -Carl commit 3ae12b1e286d1c0041a2e3957cb01daa2981dad9 Author: Carl Worth Date: Fri Nov 20 21:46:37 2009 +0100 add_message: Re-fix handling of non-mail files. More fallout from _get_header now returning "" for missing headers. The bug here is that we would no longer detect that a file is not an email message and give up on it like we should. And this time, I actually audited all callers to notmuch_message_get_header, so hopefully we're done fixing this bug over and over. From mh@glandium.org Fri Nov 20 13:06:37 2009 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 2FCD0431FBF for ; Fri, 20 Nov 2009 13:06:37 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Zp3kZn4AsdNM for ; Fri, 20 Nov 2009 13:06:36 -0800 (PST) Received: from vuizook.err.no (vuizook.err.no [85.19.221.46]) by olra.theworths.org (Postfix) with ESMTP id 75632431FBC for ; Fri, 20 Nov 2009 13:06:36 -0800 (PST) Received: from cha92-13-88-165-248-19.fbx.proxad.net ([88.165.248.19] helo=jigen) by vuizook.err.no with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NBagZ-0007TC-JH; Fri, 20 Nov 2009 22:06:34 +0100 Received: from mh by jigen with local (Exim 4.69) (envelope-from ) id 1NBag0-0006is-OP; Fri, 20 Nov 2009 22:05:56 +0100 Date: Fri, 20 Nov 2009 22:05:56 +0100 From: Mike Hommey To: Carl Worth Message-ID: <20091120210556.GA25421@glandium.org> References: <20091120132625.GA19246@glandium.org> <87y6m0lxym.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87y6m0lxym.fsf@yoom.home.cworth.org> X-GPG-Fingerprint: A479 A824 265C B2A5 FC54 8D1E DE4B DA2C 54FD 2A58 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Segfault with weird Message-ID X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 21:06:37 -0000 On Fri, Nov 20, 2009 at 09:53:37PM +0100, Carl Worth wrote: > On Fri, 20 Nov 2009 14:26:25 +0100, Mike Hommey wrote: > > - for some reason, xapian doesn't want to add the document corresponding > > to this old spam message: notmuch->xapian_db->add_document throws an > > exception. > > I think things had just gone wrong long before then. I *did* see it throwing an exception from there. The sad thing is that I can't reproduce the problem anymore :-/ > > I can provide the spam if necessary, or can continue debugging the issue > > with some guidance. > > Thanks for providing it. It turns out that the giant Message-Id value > wasn't causing the problem. Instead the message was corrupt by having a > stray new line at the third line. (So GMime is seeing only the first two > lines of headers). We *used* to have working code to detect this kind of > file as "not an email" but again, this broke when we changed > notmuch_message_get_header to return "" instead of NULL for missing > headers. Interestingly, when I first traced on what message the crash was happening, I did see notmuch having the message-id in the message_id variable. FWIW, that was using c05c3f1. I'll see if I can reproduce my segfault again when starting from scratch again, and will also give a try to your patches. Cheers, Mike From cworth@cworth.org Fri Nov 20 15:16:06 2009 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 C3B43431FBF; Fri, 20 Nov 2009 15:16:06 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 PHO+P9BM82f3; Fri, 20 Nov 2009 15:16:06 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8219B431FAE; Fri, 20 Nov 2009 15:16:05 -0800 (PST) From: Carl Worth To: James Rowe , notmuch@notmuchmail.org In-Reply-To: <87d43dkwj1.fsf@gmail.com> References: <4b04fdc2.25c0100a.68f2.ffffc8bf@mx.google.com> <87lji1k014.fsf@yoom.home.cworth.org> <87d43dkwj1.fsf@gmail.com> Date: Sat, 21 Nov 2009 00:15:54 +0100 Message-ID: <87r5rsokid.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Gentoo ebuild for notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 23:16:07 -0000 On Fri, 20 Nov 2009 16:09:54 +0000, James Rowe wrote: > The patch that follows makes it easier to use the install target > within the ebuild. If this sort of change is acceptable then the ebuild > will be simpler, and it is more likely to stay working without me > kicking heaps of patches at you. Given that I'd say "yes, please include > it." That change looks just fine to me. Pushed now. Feel free to send me more if you'd like it integrated to our repository. -Carl From cworth@cworth.org Fri Nov 20 15:19:01 2009 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 9AD47431FAE; Fri, 20 Nov 2009 15:19:01 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 uc6eUU41-Zwo; Fri, 20 Nov 2009 15:19:01 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id AE6ED431FBC; Fri, 20 Nov 2009 15:19:00 -0800 (PST) From: Carl Worth To: Eric Anholt , notmuch@notmuchmail.org In-Reply-To: <1258722042-14237-1-git-send-email-eric@anholt.net> References: <1258722042-14237-1-git-send-email-eric@anholt.net> Date: Sat, 21 Nov 2009 00:18:49 +0100 Message-ID: <87pr7cokdi.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Eric Anholt Subject: Re: [notmuch] [PATCH] When a search query triggers a Xapian exception, log what the query was. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 23:19:01 -0000 On Fri, 20 Nov 2009 14:00:42 +0100, Eric Anholt wrote: > In my script containing a series of queries to be run on new mail for > setting up tags, it's nice to see which query I typed wrong. Good point. Pushed. Thanks, -Carl From cworth@cworth.org Fri Nov 20 15:25:23 2009 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 CFD44431FBC; Fri, 20 Nov 2009 15:25:23 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 N3xSODcZdaBw; Fri, 20 Nov 2009 15:25:22 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 83B5C431FAE; Fri, 20 Nov 2009 15:25:22 -0800 (PST) From: Carl Worth To: Chris Wilson , Jan Janak In-Reply-To: <1258729976-sup-5984@broadwater.alporthouse.com> References: <1258729976-sup-5984@broadwater.alporthouse.com> Date: Sat, 21 Nov 2009 00:25:11 +0100 Message-ID: <87ocmwok2w.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Not Much Mail Subject: Re: [notmuch] Recommended Coding Style? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 20 Nov 2009 23:25:24 -0000 On Fri, 20 Nov 2009 15:15:16 +0000, Chris Wilson wrote: > Excerpts from Jan Janak's message of Fri Nov 20 15:08:31 +0000 2009: > > Is there any recommended coding style for the C/C++ code in notmuch? > > My prediction is that Carl will go with something close to what he wrote > for Cairo: > > http://cgit.freedesktop.org/cairo/tree/CODING_STYLE > > He may or may not change to a more kernel style, but he definitely will > not mandate 3-space indents. ;-) I think Chris is right on this. I'll adapt that CODING_STYLE document at some point and bring it into the repository. And I probably will convert the indentation from 4-column indents (with mixed spaces and tabs) to 8-column indents (with tabs only). One thing that people might find a bit different are that I like to put a space between a function name and the left parenthesis introducing it's arguments. That is, just as we have a space here: if (condition) { ... } I like one here as well: foo = some_function (value); Most of the patches coming in have been fine so far. (Some have used tabs only for indentation and I've just silently cleaned those up for now, since I'm considering switching to that style anyway at some point.) One style point I would like to insist on is that commit messages should always have more than the first, single-line summary. The single line summary is good about saying *what* the commit does, but I always want to see at least one sentence about the *why* as well. I'll likely start bouncing patches that don't have that. Thanks for the question, Jan. -Carl From aperez@hikari.localdomain Fri Nov 20 16:16:01 2009 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 E84C1431FBC for ; Fri, 20 Nov 2009 16:16:01 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 FFnPxTxV+BeG for ; Fri, 20 Nov 2009 16:16:01 -0800 (PST) Received: from alice.connectical.com (alice.connectical.com [208.89.208.235]) by olra.theworths.org (Postfix) with ESMTP id 37E14431FAE for ; Fri, 20 Nov 2009 16:16:01 -0800 (PST) Received: (qmail 25865 invoked from network); 21 Nov 2009 00:15:59 -0000 Received: from 97.126.60.213.dynamic.mundo-r.com (HELO hikari.localdomain) (aperez@213.60.126.97) by alice.connectical.com with ESMTPA; 21 Nov 2009 00:15:59 -0000 Received: by hikari.localdomain (Postfix, from userid 500) id 595EB30BBF11; Sat, 21 Nov 2009 01:17:18 +0100 (CET) From: Adrian Perez To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 01:17:18 +0100 Message-Id: <1258762638-22905-1-git-send-email-aperez@igalia.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Support for printing file paths in new command X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 00:16:02 -0000 For very large mail boxes, it is desirable to know which files are being processed e.g. when a crash occurs to know which one was the cause. Also, it may be interesting to have a better idea of how the operation is progressing when processing mailboxes with big messages. This patch adds support for printing messages as they are processed by "notmuch new": * The "new" command now supports a "--verbose" flag. * When running in verbose mode, the file path of the message about to be processed is printed in the following format: current/total: /path/to/message/file Where "current" is the number of messages processed so far and "total" is the total count of files to be processed. The status line is erased using an ANSI sequence "\033[K" (erase current line from the cursor to the end of line) each time it is refreshed. This should not pose a problem because nearly every terminal supports it. * The signal handler for SIGALRM and the timer are not enabled when running in verbose mode, because we are already printing progress with each file, periodical reports are not neccessary. --- notmuch-client.h | 1 + notmuch-new.c | 73 +++++++++++++++++++++++++++++++++++------------------ notmuch.c | 11 ++++++- 3 files changed, 58 insertions(+), 27 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index b65aa77..6908844 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -74,6 +74,7 @@ typedef void (*add_files_callback_t) (notmuch_message_t *message); typedef struct { int ignore_read_only_directories; int saw_read_only_directory; + int verbose; int total_files; int processed_files; diff --git a/notmuch-new.c b/notmuch-new.c index 1b05584..6b4b83c 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -177,6 +177,14 @@ add_files_recursive (notmuch_database_t *notmuch, if (path_dbtime == 0 || st->st_mtime > path_dbtime) { state->processed_files++; + if (state->verbose) { + printf ("\r\033[K%i/%i: %s\r", + state->processed_files, + state->total_files, + next); + fflush (stdout); + } + status = notmuch_database_add_message (notmuch, next, &message); switch (status) { /* success */ @@ -270,32 +278,36 @@ add_files (notmuch_database_t *notmuch, return NOTMUCH_STATUS_FILE_ERROR; } - /* Setup our handler for SIGALRM */ - memset (&action, 0, sizeof (struct sigaction)); - action.sa_handler = handle_sigalrm; - sigemptyset (&action.sa_mask); - action.sa_flags = SA_RESTART; - sigaction (SIGALRM, &action, NULL); - - /* Then start a timer to send SIGALRM once per second. */ - timerval.it_interval.tv_sec = 1; - timerval.it_interval.tv_usec = 0; - timerval.it_value.tv_sec = 1; - timerval.it_value.tv_usec = 0; - setitimer (ITIMER_REAL, &timerval, NULL); + if (!state->verbose) { + /* Setup our handler for SIGALRM */ + memset (&action, 0, sizeof (struct sigaction)); + action.sa_handler = handle_sigalrm; + sigemptyset (&action.sa_mask); + action.sa_flags = SA_RESTART; + sigaction (SIGALRM, &action, NULL); + + /* Then start a timer to send SIGALRM once per second. */ + timerval.it_interval.tv_sec = 1; + timerval.it_interval.tv_usec = 0; + timerval.it_value.tv_sec = 1; + timerval.it_value.tv_usec = 0; + setitimer (ITIMER_REAL, &timerval, NULL); + } status = add_files_recursive (notmuch, path, &st, state); - /* Now stop the timer. */ - timerval.it_interval.tv_sec = 0; - timerval.it_interval.tv_usec = 0; - timerval.it_value.tv_sec = 0; - timerval.it_value.tv_usec = 0; - setitimer (ITIMER_REAL, &timerval, NULL); - - /* And disable the signal handler. */ - action.sa_handler = SIG_IGN; - sigaction (SIGALRM, &action, NULL); + if (!state->verbose) { + /* Now stop the timer. */ + timerval.it_interval.tv_sec = 0; + timerval.it_interval.tv_usec = 0; + timerval.it_value.tv_sec = 0; + timerval.it_value.tv_usec = 0; + setitimer (ITIMER_REAL, &timerval, NULL); + + /* And disable the signal handler. */ + action.sa_handler = SIG_IGN; + sigaction (SIGALRM, &action, NULL); + } return status; } @@ -370,8 +382,7 @@ count_files (const char *path, int *count) } int -notmuch_new_command (void *ctx, - unused (int argc), unused (char *argv[])) +notmuch_new_command (void *ctx, int argc, char *argv[]) { notmuch_config_t *config; notmuch_database_t *notmuch; @@ -383,6 +394,18 @@ notmuch_new_command (void *ctx, const char *db_path; char *dot_notmuch_path; struct sigaction action; + int i; + + add_files_state.verbose = 0; + + for (i = 0; i < argc && argv[i][0] == '-'; i++) { + if (STRNCMP_LITERAL (argv[i], "--verbose") == 0) { + add_files_state.verbose = 1; + } else { + fprintf (stderr, "Unrecognized option: %s\n", argv[i]); + return 1; + } + } /* Setup our handler for SIGINT */ memset (&action, 0, sizeof (struct sigaction)); diff --git a/notmuch.c b/notmuch.c index 5cc8e4c..8cb1310 100644 --- a/notmuch.c +++ b/notmuch.c @@ -107,8 +107,8 @@ command_t commands[] = { "\t\tInvoking notmuch with no command argument will run setup if\n" "\t\tthe setup command has not previously been completed." }, { "new", notmuch_new_command, - NULL, - "Find and import new messages to the notmuch database.", + "[--verbose]", + "\t\tFind and import new messages to the notmuch database.", "\t\tScans all sub-directories of the mail directory, performing\n" "\t\tfull-text indexing on new messages that are found. Each new\n" "\t\tmessage will be tagged as both \"inbox\" and \"unread\".\n" @@ -122,6 +122,13 @@ command_t commands[] = { "\t\tis delivered and you wish to incorporate it into the database.\n" "\t\tThese subsequent runs will be much quicker than the initial run.\n" "\n" + "\t\tSupported options for new include:\n" + "\n" + "\t\t--verbose\n" + "\n" + "\t\t\tVerbose operation. Shows paths of message files as\n" + "\t\t\tthey are being indexed.\n" + "\n" "\t\tNote: \"notmuch new\" runs (other than the first run) will\n" "\t\tskip any read-only directories, so you can use that to mark\n" "\t\tdirectories that will not receive any new mail (and make\n" -- 1.6.5.2 From cworth@cworth.org Fri Nov 20 16:24:17 2009 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 736F4431FBC; Fri, 20 Nov 2009 16:24:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 QwisE+6BFmrG; Fri, 20 Nov 2009 16:24:16 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 76F6E431FAE; Fri, 20 Nov 2009 16:24:16 -0800 (PST) From: Carl Worth To: Jed Brown , notmuch@notmuchmail.org In-Reply-To: <383ade90911200758w61d34d8dudfc2713208b55d9@mail.gmail.com> References: <383ade90911200758w61d34d8dudfc2713208b55d9@mail.gmail.com> Date: Sat, 21 Nov 2009 01:24:05 +0100 Message-ID: <87vdh43eu2.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Drop redundant CFLAGS, was already included in CXXFLAGS X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 00:24:17 -0000 On Fri, 20 Nov 2009 16:58:15 +0100, Jed Brown wrote: > %.o: %.cc $(all_deps) > - $(CXX) -c $(CFLAGS) $(CXXFLAGS) $< -o $@ > + $(CXX) -c $(CXXFLAGS) $< -o $@ Thanks, Jed! It was nice to get the patch, (which is pushed now). But it was even nicer to get the encouragement to display text attachments *and* to include quoted text attachments in replies. I've often been frustrated by email programs that wouldn't quote patch attachments in replies for sake of review. So now at least my email program no longer has that bug. -Carl PS. GPG signatures are no longer silently dropped when presenting messages. We don't yet present the full signature yet, (and in particular do not yet verify it), but you can at least now see whether a signature is present. From cworth@cworth.org Fri Nov 20 16:32:46 2009 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 E57E8431FBF; Fri, 20 Nov 2009 16:32:46 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 NvMDmGYCJmxD; Fri, 20 Nov 2009 16:32:46 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id EE09E431FAE; Fri, 20 Nov 2009 16:32:45 -0800 (PST) From: Carl Worth To: Adrian Perez de Castro , notmuch@notmuchmail.org In-Reply-To: <20091120200300.55ba8736@hikari> References: <935ead450911181000w2cddfe95qe9efd5bea9f9209d@mail.gmail.com> <20091119164543.25e7afe5@hikari> <935ead450911191823s776fda6eyb6f6949ac982bd03@mail.gmail.com> <87lji11leu.fsf@yoom.home.cworth.org> <20091120200300.55ba8736@hikari> Date: Sat, 21 Nov 2009 01:32:34 +0100 Message-ID: <87tywo3efx.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Segfault searching for tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 00:32:47 -0000 On Fri, 20 Nov 2009 20:03:00 +0100, Adrian Perez de Castro wrote: > Well, of course you are right, it is an overloaded operator, which > (unfortunately, IMHO) looks like a pointer dereference. That is exactly > one of the things that I find more confusing about C++: it has features > like operator overloading which look cool initially, but that in the end > imply more complexity than needed. I can understand why you decided to > wrap Xapian with a plain C API :) I'm glad you agree. Though I should mention that I earned my summer's salary during an internship once by solving a performance problem that had dodged the engineers on the project, (since they overlooked an overloaded array subscript operator on a std::string class as something that could be expensive---profiling made it obvious, and a temporary copy to a real array with a real subscript fixed the bug). So I can't say that operator overloading never helped me. But I know I left that internship determined not to use it myself. > I can confirm that this patch avoids the segfault in my case, too. Thanks > a lot for the quick fix. Excellent. I'm glad to hear it worked for you. I'm sorry that the bug was there, since this was a regression that's come back once or twice now. The project is overdue for a test suite already... -Carl From five9a2@gmail.com Fri Nov 20 18:37:36 2009 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 D86BA431FBC for ; Fri, 20 Nov 2009 18:37:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 tvj5g8OwUi2x for ; Fri, 20 Nov 2009 18:37:36 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 0CE54431FAE for ; Fri, 20 Nov 2009 18:37:35 -0800 (PST) Received: by bwz24 with SMTP id 24so2830528bwz.30 for ; Fri, 20 Nov 2009 18:37:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:mime-version:content-type; bh=uERsGBdf88MmXA5YF8pzf7ejvhi2lD0fTGBnSUjD/3Y=; b=nNP+G3hXdPp4PEhdej1Egrs5En4Z6ifLIZRri6QTif/FztwNrZqRn4OmyDEuTvXhh3 tht4xgd5EHudIVj5haySqhNeu+Ri5NRPj1MCy5/Uu/1lxWAFb3C+OlceLVpTgesOdLP0 XGVJXzE/yNBDV4NGAA/uD63VUvazSOSaIvxkc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type; b=RRqAdaSZeVex0OU/D9ZTGI3SY4v7m9M47n9LivFqJyUBSu/iUPDiPfgxMf1nvk1q2L HAjLllY+eE0y3nkT4O8DXxQbKtRIQ1nxFwEVLCPLJABin2tiNcUI7hMZgOXSIo3Je5Cj GTYhtuAOFslz4E1p2djM/nyI/9zxiq+qiPVaU= Received: by 10.204.11.17 with SMTP id r17mr2200620bkr.41.1258771054539; Fri, 20 Nov 2009 18:37:34 -0800 (PST) Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id p9sm2299222fkb.14.2009.11.20.18.37.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 20 Nov 2009 18:37:33 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 03:37:54 +0100 Message-Id: <1258771074-25997-1-git-send-email-jed@59A2.org> X-Mailer: git-send-email 1.6.5.3 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.5.3" Subject: [notmuch] [PATCH] Quote file names passed to the shell X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 02:37:37 -0000 This is a multi-part message in MIME format. --------------1.6.5.3 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit Prior to this, notmuch-show-pipe-message could not handle file names with spaces and similar. --- notmuch.el | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) --------------1.6.5.3 Content-Type: text/x-patch; name="0001-Quote-file-names-passed-to-the-shell.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-Quote-file-names-passed-to-the-shell.patch" diff --git a/notmuch.el b/notmuch.el index cd3780f..1ca633d 100644 --- a/notmuch.el +++ b/notmuch.el @@ -281,7 +281,8 @@ The given command will be executed with the raw contents of the current email message as stdin. Anything printed by the command to stdout or stderr will appear in the *Messages* buffer." (interactive "sPipe message to command: ") - (apply 'start-process-shell-command "notmuch-pipe-command" "*notmuch-pipe*" (split-string (concat command " < " (notmuch-show-get-filename))))) + (apply 'start-process-shell-command "notmuch-pipe-command" "*notmuch-pipe*" + (list command " < " (shell-quote-argument (notmuch-show-get-filename))))) (defun notmuch-show-move-to-current-message-summary-line () "Move to the beginning of the one-line summary of the current message. --------------1.6.5.3-- From cworth@cworth.org Fri Nov 20 18:59:25 2009 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 59F8A431FBF; Fri, 20 Nov 2009 18:59:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 QrPpWP2W6KDV; Fri, 20 Nov 2009 18:59:24 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 24A26431FAE; Fri, 20 Nov 2009 18:59:23 -0800 (PST) From: Carl Worth To: "Aneesh Kumar K.V" , notmuch@notmuchmail.org In-Reply-To: <1258730844-8711-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1258730844-8711-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Date: Sat, 21 Nov 2009 03:59:12 +0100 Message-ID: <87lji04m7z.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] notmuch.el: Add face support to search and show mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 02:59:25 -0000 On Fri, 20 Nov 2009 20:57:24 +0530, "Aneesh Kumar K.V" wrote: > This add two faces, notmuch-show-subject-face and > notmuch-tag-unread-face. The first face is used to show the subject > line in the notmuch-show-mode and the second one the unread tag in > the notmuch-search-mode. > > The changes are done looking at message.el in emacs source Hi Aneesh, This looks like very interesting stuff, but I wasn't able to get it to work. Initially I was running emacs within a terminal (emacs -nw) so I thought that might be preventing me from seeing the face differences or so. But I can't seem to see anything in graphical emacs either. Is there something more I need to do to make this work? -Carl From aneesh.kumar@linux.vnet.ibm.com Fri Nov 20 20:07:36 2009 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 E5510431FBF for ; Fri, 20 Nov 2009 20:07:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 VnWyfMF0U+Mm for ; Fri, 20 Nov 2009 20:07:36 -0800 (PST) Received: from e28smtp02.in.ibm.com (e28smtp02.in.ibm.com [122.248.162.2]) by olra.theworths.org (Postfix) with ESMTP id 684E4431FAE for ; Fri, 20 Nov 2009 20:07:35 -0800 (PST) Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by e28smtp02.in.ibm.com (8.14.3/8.13.1) with ESMTP id nAL47X4J025859 for ; Sat, 21 Nov 2009 09:37:33 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAL47XfQ3411982 for ; Sat, 21 Nov 2009 09:37:33 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAL47XWD018706 for ; Sat, 21 Nov 2009 09:37:33 +0530 Received: from skywalker.linux.vnet.ibm.com ([9.124.223.170]) by d28av01.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAL47UFU018693 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 21 Nov 2009 09:37:32 +0530 Date: Sat, 21 Nov 2009 09:37:30 +0530 From: "Aneesh Kumar K.V" To: Carl Worth Message-ID: <20091121040730.GA17925@skywalker.linux.vnet.ibm.com> References: <1258730844-8711-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <87lji04m7z.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87lji04m7z.fsf@yoom.home.cworth.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] notmuch.el: Add face support to search and show mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 04:07:37 -0000 On Sat, Nov 21, 2009 at 03:59:12AM +0100, Carl Worth wrote: > On Fri, 20 Nov 2009 20:57:24 +0530, "Aneesh Kumar K.V" wrote: > > This add two faces, notmuch-show-subject-face and > > notmuch-tag-unread-face. The first face is used to show the subject > > line in the notmuch-show-mode and the second one the unread tag in > > the notmuch-search-mode. > > > > The changes are done looking at message.el in emacs source > > Hi Aneesh, > > This looks like very interesting stuff, but I wasn't able to get it to > work. Initially I was running emacs within a terminal (emacs -nw) so I > thought that might be preventing me from seeing the face differences or > so. > > But I can't seem to see anything in graphical emacs either. > > Is there something more I need to do to make this work? To verify whether i have some setting in .emacs i ran emacs -q and still i am able see the colors. So not sure what extra is needed. I also tried emacs23 and that also worked. Are you able to see this faces via customize-face command ? And what is the color they display in customize-face ? -aneesh From keithp@keithp.com Fri Nov 20 20:46:56 2009 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 D204A431FBC for ; Fri, 20 Nov 2009 20:46:56 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 e0AWU1WVNgQu for ; Fri, 20 Nov 2009 20:46:55 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 5C927431FAE for ; Fri, 20 Nov 2009 20:46:55 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 7DA1DB9404D for ; Fri, 20 Nov 2009 20:46:54 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1Rq62PhyoFEF; Fri, 20 Nov 2009 20:46:51 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id EA658B9404B; Fri, 20 Nov 2009 20:46:50 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id E3234B88003; Fri, 20 Nov 2009 20:46:50 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id 838901982A0; Fri, 20 Nov 2009 20:46:50 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 20:46:49 -0800 Message-Id: <1258778809-16740-1-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 04:46:57 -0000 When closing a thread view, mark the thread as archived by removing the "inbox" tag, and for the 'x' variant, the "unread" tag as well, then kill the buffer and update the search window view as well. This makes 'x' much the same as 'a', but instead of taking you to the next message, it takes you back to the search window instead. Signed-off-by: Keith Packard --- notmuch.el | 86 ++++++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 67 insertions(+), 19 deletions(-) This adds new functionality without removing any; without this patch, the 'x' and 'q' commands do the same thing, killing the buffer without clearing any tags. With this patch, the 'x' command clears the inbox and unread tags from the current message and returns to the search index view, while the existing 'q' command continues to provide old behaviour. diff --git a/notmuch.el b/notmuch.el index cd3780f..544f281 100644 --- a/notmuch.el +++ b/notmuch.el @@ -31,8 +31,8 @@ ; Will be much preferable to switch to direct manipulation for ; toggling visibility of these components. Probably using ; overlays-at to query and manipulate the current overlay. - (define-key map "a" 'notmuch-show-archive-thread) - (define-key map "A" 'notmuch-show-mark-read-then-archive-thread) + (define-key map "a" 'notmuch-show-mark-read-archive-thread-next-thread) + (define-key map "A" 'notmuch-show-archive-thread-next-thread) (define-key map "b" 'notmuch-show-toggle-body-read-visible) (define-key map "c" 'notmuch-show-toggle-citations-visible) (define-key map "h" 'notmuch-show-toggle-headers-visible) @@ -47,7 +47,8 @@ (define-key map "s" 'notmuch-show-toggle-signatures-visible) (define-key map "v" 'notmuch-show-view-all-mime-parts) (define-key map "w" 'notmuch-show-view-raw-message) - (define-key map "x" 'kill-this-buffer) + (define-key map "x" 'notmuch-show-mark-read-archive-thread-kill-buffer) + (define-key map "X" 'notmuch-show-archive-thread-kill-buffer) (define-key map "+" 'notmuch-show-add-tag) (define-key map "-" 'notmuch-show-remove-tag) (define-key map (kbd "DEL") 'notmuch-show-rewind) @@ -193,7 +194,33 @@ Unlike builtin `next-line' this version accepts no arguments." (cons (notmuch-show-get-message-id) nil))) (notmuch-show-set-tags (sort (set-difference tags toremove :test 'string=) 'string<)))))) -(defun notmuch-show-archive-thread-maybe-mark-read (markread) +(defun notmuch-show-next-thread (markread) + (let ((parent-buffer notmuch-show-parent-buffer)) + (kill-this-buffer) + (if parent-buffer + (progn + (switch-to-buffer parent-buffer) + (forward-line) + (notmuch-search-show-thread))))) + +(defun notmuch-delete-tags (to-remove from) + (if to-remove + (delete (car to-remove) (notmuch-delete-tags (cdr to-remove) from)) + from)) + +(defun notmuch-kill-message-buffer (markread) + (let ((parent-buffer notmuch-show-parent-buffer)) + (kill-this-buffer) + (if parent-buffer + (progn + (switch-to-buffer parent-buffer) + (let ((tags (notmuch-search-get-tags))) + (setq tags (delete "inbox" tags)) + (if markread (setq tags (delete "unread" tags))) + (notmuch-search-set-tags tags)) + (forward-line))))) + +(defun notmuch-show-archive-thread-maybe-mark-read (markread shownext) (save-excursion (goto-char (point-min)) (while (not (eobp)) @@ -204,15 +231,9 @@ Unlike builtin `next-line' this version accepts no arguments." (forward-char)) (if (not (re-search-forward notmuch-show-message-begin-regexp nil t)) (goto-char (point-max))))) - (let ((parent-buffer notmuch-show-parent-buffer)) - (kill-this-buffer) - (if parent-buffer - (progn - (switch-to-buffer parent-buffer) - (forward-line) - (notmuch-search-show-thread))))) + (if shownext (notmuch-show-next-thread markread) (notmuch-kill-message-buffer markread))) -(defun notmuch-show-mark-read-then-archive-thread () +(defun notmuch-show-mark-read-archive-thread-next-thread () "Remove \"unread\" tag from each message, then archive and show next thread. Archive each message currently shown by removing the \"unread\" @@ -225,9 +246,22 @@ being delivered to the same thread. It does not archive the entire thread, but only the messages shown in the current buffer." (interactive) - (notmuch-show-archive-thread-maybe-mark-read t)) + (notmuch-show-archive-thread-maybe-mark-read t t)) + +(defun notmuch-show-mark-read-archive-thread-kill-buffer () + "Remove \"unread\" tag from each message, then archive and kill the buffer. + +Archive each message currrently shown by removing the \"unread\" +and \"inbox\" tag from each. Then kill this buffer. -(defun notmuch-show-archive-thread () +Note: This command is safe from any race condition of new messages +being delivered to the same thread. It does not archive the +entire thread, but only the messages shown in the current +buffer." + (interactive) + (notmuch-show-archive-thread-maybe-mark-read t nil)) + +(defun notmuch-show-archive-thread-next-thread () "Archive each message in thread, and show next thread from search. Archive each message currently shown by removing the \"inbox\" @@ -239,7 +273,20 @@ being delivered to the same thread. It does not archive the entire thread, but only the messages shown in the current buffer." (interactive) - (notmuch-show-archive-thread-maybe-mark-read nil)) + (notmuch-show-archive-thread-maybe-mark-read nil t)) + +(defun notmuch-show-archive-thread-kill-buffer () + "Archive each message in thread, and kill the thread buffer. + +Archive each message currrently shown by removing the \"inbox\" +tag from each. Then kill this buffer. + +Note: This command is safe from any race condition of new messages +being delivered to the same thread. It does not archive the +entire thread, but only the messages shown in the current +buffer." + (interactive) + (notmuch-show-archive-thread-maybe-mark-read nil t)) (defun notmuch-show-view-raw-message () "View the raw email of the current message." @@ -310,7 +357,7 @@ by searching backward)." (not (re-search-forward notmuch-show-message-begin-regexp nil t))))) (defun notmuch-show-message-unread-p () - "Preficate testing whether current message is unread." + "Predicate testing whether current message is unread." (member "unread" (notmuch-show-get-tags))) (defun notmuch-show-next-message () @@ -447,7 +494,7 @@ which this thread was originally shown." (let ((last (notmuch-show-last-message-p))) (notmuch-show-mark-read-then-next-open-message) (if last - (notmuch-show-archive-thread)))))) + (notmuch-show-archive-thread-next-thread)))))) (defun notmuch-show-markup-citations-region (beg end depth) (goto-char beg) @@ -631,8 +678,9 @@ messages. Each time you navigate away from a message with You can add or remove tags from the current message with '+' and '-'. You can also archive all messages in the current -view, (remove the \"inbox\" tag from each), with -`notmuch-show-archive-thread' (bound to 'a' by default). +view, (remove the \"inbox\" tag from each), with either +`notmuch-show-archive-thread-next-thread' (bound to 'a' by default) or +`notmuch-show-archive-thread-kill-buffer' (bound to 'x' by default). \\{notmuch-show-mode-map}" (interactive) -- 1.6.5.2 From keithp@keithp.com Fri Nov 20 20:57:41 2009 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 747FC431FBC for ; Fri, 20 Nov 2009 20:57:41 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Avl+7m7cGWBa for ; Fri, 20 Nov 2009 20:57:40 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 8667C431FAE for ; Fri, 20 Nov 2009 20:57:40 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id F41D1760220 for ; Fri, 20 Nov 2009 20:57:39 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id seNazHHDbOTa; Fri, 20 Nov 2009 20:57:37 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 31976B9404B; Fri, 20 Nov 2009 20:57:37 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 2AE2876012C; Fri, 20 Nov 2009 20:57:37 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id C218C1982A1; Fri, 20 Nov 2009 20:57:36 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 20:57:35 -0800 Message-Id: <1258779455-17053-1-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Insert signature into replies X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 04:57:41 -0000 When you compose a new message, message mode carefully inserts your mail signature at the bottom of the message; as notmuch constructs the reply all by itself, this doesn't happen then. Use the message mode function 'message-insert-signature' to add that to reply buffers. Signed-off-by: Keith Packard --- notmuch.el | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/notmuch.el b/notmuch.el index bed6a25..feb84ad 100644 --- a/notmuch.el +++ b/notmuch.el @@ -308,6 +308,7 @@ buffer." (defun notmuch-reply (query-string) (switch-to-buffer (generate-new-buffer "notmuch-draft")) (call-process notmuch-command nil t nil "reply" query-string) + (message-insert-signature) (goto-char (point-min)) (if (re-search-forward "^$" nil t) (progn -- 1.6.5.2 From keithp@keithp.com Fri Nov 20 23:15:15 2009 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 9AA9B431FBC for ; Fri, 20 Nov 2009 23:15:15 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 973htybmOVnl for ; Fri, 20 Nov 2009 23:15:15 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id CF4A6431FAE for ; Fri, 20 Nov 2009 23:15:14 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 285CB760222 for ; Fri, 20 Nov 2009 23:15:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id lhU7c0IoGy4O; Fri, 20 Nov 2009 23:15:11 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 66478B9404B; Fri, 20 Nov 2009 23:15:11 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 615B276012C; Fri, 20 Nov 2009 23:15:11 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id 08D561982A8; Fri, 20 Nov 2009 23:15:11 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 23:15:06 -0800 Message-Id: <1258787708-21121-1-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH 1/3] Make mouse-1 click in search view show thread X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 07:15:17 -0000 Selecting text in the search view isn't all that useful, so instead, make mouse-1 clicks actually show the thread you click on. It's almost like direct manipulation or something. Signed-off-by: Keith Packard --- notmuch.el | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/notmuch.el b/notmuch.el index feb84ad..4f369de 100644 --- a/notmuch.el +++ b/notmuch.el @@ -783,6 +783,7 @@ thread from that buffer can be show when done with this one)." (define-key map "t" 'notmuch-search-filter-by-tag) (define-key map "x" 'kill-this-buffer) (define-key map (kbd "RET") 'notmuch-search-show-thread) + (define-key map [mouse-1] 'notmuch-search-show-thread) (define-key map "+" 'notmuch-search-add-tag) (define-key map "-" 'notmuch-search-remove-tag) (define-key map "<" 'beginning-of-buffer) -- 1.6.5.2 From keithp@keithp.com Fri Nov 20 23:15:21 2009 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 D65B1431FBF for ; Fri, 20 Nov 2009 23:15:21 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 gqoniYFNYKxp for ; Fri, 20 Nov 2009 23:15:17 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 64B03431FAE for ; Fri, 20 Nov 2009 23:15:17 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id CC404760222 for ; Fri, 20 Nov 2009 23:15:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id H3w9F2ijbayT; Fri, 20 Nov 2009 23:15:12 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id C5AC1B9404C; Fri, 20 Nov 2009 23:15:12 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id C0C9076012C; Fri, 20 Nov 2009 23:15:12 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id 6C3681982A8; Fri, 20 Nov 2009 23:15:12 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 23:15:07 -0800 Message-Id: <1258787708-21121-2-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1258787708-21121-1-git-send-email-keithp@keithp.com> References: <1258787708-21121-1-git-send-email-keithp@keithp.com> Subject: [notmuch] [PATCH 2/3] Add 'notmuch count' command to show the count of matching messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 07:15:22 -0000 Getting the count of matching threads or messages is a fairly expensive operation. Xapian provides a very efficient mechanism that returns an approximate value, so use that for this new command. This returns the number of matching messages, not threads, as that is cheap to compute. Signed-off-by: Keith Packard --- Makefile.local | 1 + lib/notmuch.h | 8 ++++ lib/query.cc | 52 ++++++++++++++++++++++++++ notmuch-client.h | 3 + notmuch-count.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ notmuch.c | 11 +++++ 6 files changed, 184 insertions(+), 0 deletions(-) create mode 100644 notmuch-count.c diff --git a/Makefile.local b/Makefile.local index 3c99624..cbd75ce 100644 --- a/Makefile.local +++ b/Makefile.local @@ -5,6 +5,7 @@ emacs: notmuch.elc notmuch_client_srcs = \ notmuch.c \ notmuch-config.c \ + notmuch-count.c \ notmuch-dump.c \ notmuch-new.c \ notmuch-reply.c \ diff --git a/lib/notmuch.h b/lib/notmuch.h index cc713a3..937f3b6 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -459,6 +459,14 @@ notmuch_threads_advance (notmuch_threads_t *threads); void notmuch_threads_destroy (notmuch_threads_t *threads); +/* Return an estimate of the number of messages matching a search + * + * This function performs a search and returns Xapian's best + * guess as to number of matching messages. + */ +unsigned +notmuch_query_count_messages (notmuch_query_t *query); + /* Get the thread ID of 'thread'. * * The returned string belongs to 'thread' and as such, should not be diff --git a/lib/query.cc b/lib/query.cc index ea521dd..dff9634 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -278,3 +278,55 @@ notmuch_threads_destroy (notmuch_threads_t *threads) { talloc_free (threads); } + +unsigned +notmuch_query_count_messages (notmuch_query_t *query) +{ + notmuch_database_t *notmuch = query->notmuch; + const char *query_string = query->query_string; + Xapian::doccount count; + + try { + Xapian::Enquire enquire (*notmuch->xapian_db); + Xapian::Query mail_query (talloc_asprintf (query, "%s%s", + _find_prefix ("type"), + "mail")); + Xapian::Query string_query, final_query; + Xapian::MSet mset; + unsigned int flags = (Xapian::QueryParser::FLAG_BOOLEAN | + Xapian::QueryParser::FLAG_PHRASE | + Xapian::QueryParser::FLAG_LOVEHATE | + Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE | + Xapian::QueryParser::FLAG_WILDCARD | + Xapian::QueryParser::FLAG_PURE_NOT); + + if (strcmp (query_string, "") == 0) { + final_query = mail_query; + } else { + string_query = notmuch->query_parser-> + parse_query (query_string, flags); + final_query = Xapian::Query (Xapian::Query::OP_AND, + mail_query, string_query); + } + + enquire.set_weighting_scheme(Xapian::BoolWeight()); + enquire.set_docid_order(Xapian::Enquire::ASCENDING); + +#if DEBUG_QUERY + fprintf (stderr, "Final query is:\n%s\n", final_query.get_description().c_str()); +#endif + + enquire.set_query (final_query); + + mset = enquire.get_mset (0, notmuch->xapian_db->get_doccount ()); + + count = mset.get_matches_estimated(); + + } catch (const Xapian::Error &error) { + fprintf (stderr, "A Xapian exception occurred: %s\n", + error.get_msg().c_str()); + fprintf (stderr, "Query string was: %s\n", query->query_string); + } + + return count; +} diff --git a/notmuch-client.h b/notmuch-client.h index b65aa77..9884497 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -91,6 +91,9 @@ chomp_newline (char *str) } int +notmuch_count_command (void *ctx, int argc, char *argv[]); + +int notmuch_dump_command (void *ctx, int argc, char *argv[]); int diff --git a/notmuch-count.c b/notmuch-count.c new file mode 100644 index 0000000..68e428f --- /dev/null +++ b/notmuch-count.c @@ -0,0 +1,109 @@ +/* notmuch - Not much of an email program, (just index and search) + * + * Copyright © 2009 Carl Worth + * Copyright © 2009 Keith Packard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/ . + * + * Author: Keith Packard + */ + +#include "notmuch-client.h" + +int +notmuch_count_command (void *ctx, int argc, char *argv[]) +{ + notmuch_config_t *config; + notmuch_database_t *notmuch; + notmuch_query_t *query; + char *query_str; + char *opt, *end; + int i; +#if 0 + int i, first = 0, max_threads = -1; + notmuch_sort_t sort = NOTMUCH_SORT_NEWEST_FIRST; +#endif + + for (i = 0; i < argc && argv[i][0] == '-'; i++) { + if (strcmp (argv[i], "--") == 0) { + i++; + break; + } +#if 0 + if (STRNCMP_LITERAL (argv[i], "--first=") == 0) { + opt = argv[i] + sizeof ("--first=") - 1; + first = strtoul (opt, &end, 10); + if (*opt == '\0' || *end != '\0') { + fprintf (stderr, "Invalid value for --first: %s\n", opt); + return 1; + } + } else if (STRNCMP_LITERAL (argv[i], "--max-threads=") == 0) { + opt = argv[i] + sizeof ("--max-threads=") - 1; + max_threads = strtoul (opt, &end, 10); + if (*opt == '\0' || *end != '\0') { + fprintf (stderr, "Invalid value for --max-threads: %s\n", opt); + return 1; + } + } else if (STRNCMP_LITERAL (argv[i], "--sort=") == 0) { + opt = argv[i] + sizeof ("--sort=") - 1; + if (strcmp (opt, "oldest-first") == 0) { + sort = NOTMUCH_SORT_OLDEST_FIRST; + } else if (strcmp (opt, "newest-first") == 0) { + sort = NOTMUCH_SORT_NEWEST_FIRST; + } else { + fprintf (stderr, "Invalid value for --sort: %s\n", opt); + return 1; + } + } else +#endif + { + fprintf (stderr, "Unrecognized option: %s\n", argv[i]); + return 1; + } + } + + argc -= i; + argv += i; + + config = notmuch_config_open (ctx, NULL, NULL); + if (config == NULL) + return 1; + + notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + if (notmuch == NULL) + return 1; + + query_str = query_string_from_args (ctx, argc, argv); + if (query_str == NULL) { + fprintf (stderr, "Out of memory.\n"); + return 1; + } + if (*query_str == '\0') { + fprintf (stderr, "Error: notmuch count requires at least one count term.\n"); + return 1; + } + + query = notmuch_query_create (notmuch, query_str); + if (query == NULL) { + fprintf (stderr, "Out of memory\n"); + return 1; + } + + printf ("%u\n", notmuch_query_count_messages(query)); + + notmuch_query_destroy (query); + notmuch_database_close (notmuch); + + return 0; +} diff --git a/notmuch.c b/notmuch.c index 5cc8e4c..8387692 100644 --- a/notmuch.c +++ b/notmuch.c @@ -179,6 +179,17 @@ command_t commands[] = { "\n" "\t\tSee \"notmuch help search-terms\" for details of the search\n" "\t\tterms syntax." }, + { "count", notmuch_count_command, + " [...]", + "\t\tCount messages matching the search terms.", + "\t\tThe number of matching messages is output to stdout.\n" + "\n" + "\t\tA common use of \"notmuch count\" is to display the count\n" + "\t\tof messages matching both a specific tag and either inbox\n" + "\t\tor unread\n" + "\n" + "\t\tSee \"notmuch help search-terms\" for details of the search\n" + "\t\tterms syntax." }, { "reply", notmuch_reply_command, " [...]", "\t\tConstruct a reply template for a set of messages.", -- 1.6.5.2 From keithp@keithp.com Fri Nov 20 23:15:24 2009 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 C18BA431FBF for ; Fri, 20 Nov 2009 23:15:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 OY06CbIGgdIX for ; Fri, 20 Nov 2009 23:15:21 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id E5F46431FBC for ; Fri, 20 Nov 2009 23:15:17 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 680B3760228 for ; Fri, 20 Nov 2009 23:15:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id C8uqZH6hDBhn; Fri, 20 Nov 2009 23:15:14 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id B3AFE760220; Fri, 20 Nov 2009 23:15:13 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id B01AE76012C; Fri, 20 Nov 2009 23:15:13 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id 487DD1982A8; Fri, 20 Nov 2009 23:15:13 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 23:15:08 -0800 Message-Id: <1258787708-21121-3-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1258787708-21121-2-git-send-email-keithp@keithp.com> References: <1258787708-21121-1-git-send-email-keithp@keithp.com> <1258787708-21121-2-git-send-email-keithp@keithp.com> Subject: [notmuch] [PATCH 3/3] Add notmuch-index mode to display message counts X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 07:15:25 -0000 Index mode takes a (user-configurable) list of search patterns and produces a list of those patterns and the count of messages that they match. When an entry in this list is selected, a search window with the defined search is opened. The set of indexes is defined as a list, each element contains the name of the index and the query string to count. This provides a view similar to a folder list in a more traditional mail client. Signed-off-by: Keith Packard --- notmuch.el | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 81 insertions(+), 0 deletions(-) diff --git a/notmuch.el b/notmuch.el index 4f369de..454320e 100644 --- a/notmuch.el +++ b/notmuch.el @@ -1046,4 +1046,85 @@ current search results AND that are tagged with the given tag." (setq mail-user-agent 'message-user-agent) +(defvar notmuch-index-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "n" 'next-line) + (define-key map "p" 'previous-line) + (define-key map "x" 'kill-this-buffer) + (define-key map "q" 'kill-this-buffer) + (define-key map "s" 'notmuch-search) + (define-key map (kbd "RET") 'notmuch-index-show-search) + (define-key map "<" 'beginning-of-buffer) + (define-key map "=" 'notmuch-index) + (define-key map "?" 'describe-mode) + (define-key map [mouse-1] 'notmuch-index-show-search) + map) + "Keymap for \"notmuch index\" buffers.") + +(fset 'notmuch-index-mode-map notmuch-index-mode-map) + +(defcustom notmuch-indexes (quote (("inbox" . "tag:inbox") ("unread" . "tag:unread"))) + "List of searches for the notmuch index view" + :type '(alist :key-type (string) :value-type (string)) + :group 'notmuch) + +(defun notmuch-index-mode () + "Major mode for showing index of notmuch tags. + +This buffer contains a list of messages counts returned by a +customizable set of searches of your email archives. Each line +in the buffer shows the search terms and the resulting message count. + +Pressing RET on any line opens a search window containing the search +results for the search terms in that line. + +\\{notmuch-index-mode-map}" + (interactive) + (kill-all-local-variables) + (use-local-map 'notmuch-index-mode-map) + (setq truncate-lines t) + (hl-line-mode 1) + (setq major-mode 'notmuch-index-mode + mode-name "notmuch-index") + (setq buffer-read-only t)) + +(defun notmuch-index-add (indexes) + (if indexes + (let ((name (car (car indexes))) + (inhibit-read-only t) + (search (cdr (car indexes)))) + (insert name) + (indent-to 16 1) + (call-process notmuch-command nil t nil "count" search) + (notmuch-index-add (cdr indexes))))) + +(defun notmuch-index-find-name () + (save-excursion + (beginning-of-line) + (let ((beg (point))) + (forward-word) + (filter-buffer-substring beg (point))))) + +(defun notmuch-index-show-search (&optional index) + "Show a search window for the search related to the specified index." + (interactive) + (if (null index) + (setq index (notmuch-index-find-name))) + (let ((search (assoc index notmuch-indexes))) + (if search + (notmuch-search (cdr search) t)))) + +(defun notmuch-index () + "Show the message index and update the displayed counts." + (interactive) + (let ((buffer (get-buffer-create "*notmuch-index*"))) + (switch-to-buffer buffer) + (let ((inhibit-read-only t) + (n (line-number-at-pos))) + (erase-buffer) + (notmuch-index-mode) + (notmuch-index-add notmuch-indexes) + (goto-char (point-min)) + (goto-line n)))) + (provide 'notmuch) -- 1.6.5.2 From keithp@keithp.com Fri Nov 20 23:35:35 2009 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 7F4E7431FBC for ; Fri, 20 Nov 2009 23:35:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 bMkF-rNzY4Wy for ; Fri, 20 Nov 2009 23:35:34 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 22FD7431FAE for ; Fri, 20 Nov 2009 23:35:34 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 70CED76012C for ; Fri, 20 Nov 2009 23:35:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 9MVZQpEbdpjB for ; Fri, 20 Nov 2009 23:35:30 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 54218B9404B; Fri, 20 Nov 2009 23:35:30 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 4642B76012C for ; Fri, 20 Nov 2009 23:35:30 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 23:35:29 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: [notmuch] notmuch 'index' mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 07:35:35 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable I posted a patch adding an 'index' mode to notmuch and though I'd explain my idea. Most mail systems provide a 'folder view' mode which displays the set of folders and a count of messages in each folder. I used this myself as the first sort of which messages I want to read. Notmuch doesn't have folders, but it does have tags, so I thought I'd take advantage of that, along with the quick searching ability in Xapian to construct something much like the folder view. In 'index' mode, notmuch shows a list of 'folders', each of which is defined by a Xapian query. The new 'notmuch count' command is used to figure out how many messages matching the query are in the database. When you hit 'enter' (or click the mouse) on any line, it executes the search for real using the notmuch-search command. Here's the set of indexes I'm using right now (oddly, it looks a lot like the set of tags I auto-configure in my notmuch-poll script). (setq notmuch-indexes '(("inbox" . "tag:inbox") ("me" . "tag:inbox AND tag:me") ("announce" . "tag:inbox AND tag:announce") ("bugs" . "tag:inbox AND tag:bugs") ("cairo" . "tag:inbox AND tag:cairo") ("debian" . "tag:inbox AND tag:debian"); ("hackers" . "tag:inbox AND tag:hackers") ("intel" . "tag:inbox AND tag:intel") ("mesa" . "tag:inbox AND tag:mesa") ("notmuch" . "tag:inbox AND tag:notmuch") ("oes" . "tag:inbox AND tag:oes") ("rockets" . "tag:inbox AND tag:rockets") ("x" . "tag:inbox AND tag:x") ("xorg-board" . "tag:inbox AND tag:xorg-board") ("xpatches" . "tag:inbox AND tag:x AND tag:patch"))) And here's what I see in the *notmuch-index* buffer: inbox 3 me 3 announce 0 bugs 0 cairo 0 debian 0 hackers 0 intel 0 mesa 0 notmuch 0 oes 0 rockets 0 x 0 xorg-board 0 xpatches 0 This is all pretty simple, and it does much of what I want. However, one could always get more :-) One missing piece here is that the searches don't have a total/unread count. Because the 'notmuch count' command is so fast (notmuch count the returns 532891 on my machine, and takes 0.240 seconds), we really could count the number of messages matching a single tag and then *also* count the number of messages matching that tag and the inbox tag. Another missing piece is that these should be shared with the notmuch-poll script, probably via the .notmuch-config file. I do like that I can have some entries here that aren't in my notmuch-poll script. It might be nice to make this hierarchical as I used to do with evolution's vfolder stuff -- an 'intel' folder with an 'intel/unread' sub-folder. That would be done with simple conjunctions of tags, but providing some structure on the screen might be nice. I'm also wondering if we should elide, or at least change the appearance, of lines which match zero messages. I'd also like to be able to get the system to display my mail in three panes -- one with the index, one with the current search and the last with the current thread. Getting those laid out on the screen correctly and letting you get them back to that layout easily would make notmuch look a lot more like other email clients, a form I've found fairly functional as I do not generally read mail in a linear fashion. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLB5hBQp8BWwlsTdMRAp5SAJ9CesEvi3Af0+172hprETZYg6HS+wCgvNWh ASoUlxX8eOfgnnYMI/zhqCE= =L/wE -----END PGP SIGNATURE----- --=-=-=-- From djcb@djcbsoftware.nl Sat Nov 21 01:27:39 2009 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 C1E8E431FBC for ; Sat, 21 Nov 2009 01:27:39 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 AqkluLxn36RK for ; Sat, 21 Nov 2009 01:27:39 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by olra.theworths.org (Postfix) with ESMTP id 05FDC431FAE for ; Sat, 21 Nov 2009 01:27:38 -0800 (PST) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by mx.perfora.net (node=mxus2) with ESMTP (Nemesis) id 0LvUAF-1OARar1DRj-010FbS for notmuch@notmuchmail.org; Sat, 21 Nov 2009 04:27:38 -0500 Received: from djcbsoftware.nl (a88-112-254-208.elisa-laajakaista.fi [88.112.254.208]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by gw02.mail.saunalahti.fi (Postfix) with ESMTP id 38B4013969B for ; Sat, 21 Nov 2009 11:27:35 +0200 (EET) Received: from cthulhu.mindcrime.djcbsoftware.nl (localhost [127.0.0.1]) by djcbsoftware.nl (Postfix) with ESMTP id 2FE67456001 for ; Sat, 21 Nov 2009 11:01:46 +0200 (EET) Date: Sat, 21 Nov 2009 11:01:46 +0200 Message-ID: <87aayggsjp.wl%djcb@djcbsoftware.nl> From: Dirk-Jan C. Binnema To: notmuch@notmuchmail.org Mail-Reply-To: djcb@djcbsoftware.nl User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.1 Mule/6.0 (HANACHIRUSATO) Organization: DJCBSoftware MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Subject: [notmuch] interesting project! X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: djcb@djcbsoftware.nl List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Nov 2009 09:27:39 -0000 Hi all, Wow, 'notmuch' looks like a very interesting project. In 2008, I wrote an e-mail (Maildir) search tool called 'mu'[1], also using Xapian and GMime; my plan was at some point to turn it into a mail reader (use offlineimap/fetchmail etc. for getting the mail, and something else for sending it), but I never got that far. Search works pretty well though. Anyhow, it seems notmuch is getting there quickly. Anyhow, I'll study the notmuch code and see if there are some useful bits in my code that might make sense there, e.g., various dir scanning optimizations, see [2]. Good luck! Dirk. [1] http://www.djcbsoftware.nl/code/mu/ [2] http://djcbflux.blogspot.com/2008/10/seek-destroy.html -- Dirk-Jan C. Binnema Helsinki, Finland e:djcb@djcbsoftware.nl w:www.djcbsoftware.nl pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C From jnrowe@gmail.com Sat Nov 21 01:32:51 2009 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 46D5B431FBC for ; Sat, 21 Nov 2009 01:32:51 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 KNa6PELbiQHm for ; Sat, 21 Nov 2009 01:32:50 -0800 (PST) Received: from ey-out-1920.google.com (ey-out-1920.google.com [74.125.78.150]) by olra.theworths.org (Postfix) with ESMTP id 31356431FAE for ; Sat, 21 Nov 2009 01:32:50 -0800 (PST) Received: by ey-out-1920.google.com with SMTP id 26so1394766eyw.6 for ; Sat, 21 Nov 2009 01:32:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to:date :subject; bh=3NVbXd2utAPr+KXgqrnRomygM3FTykEfWR2ybNYxpvY=; b=YIWKAEXEh2td2QtEtY61W76/hx/TsoG1Jks6oFj+gYJJrleN0ImTPex5qyGsxVKZBu 1FCjehFha9E2KQLQRRT0B9pIFlh0vxVHFN2TaEQkmM4B9we9gnBoh9LkgRrsojNPQOCt Eczi9IulQMJIXfNe9tfaSlfpn3Y7JeW4r/Jzg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:date:subject; b=wxmoA58Jcj17Gpmxfns8xcrADvY5fOWOl8oTnrXa94cvE1YUM5WQcT5GIAMayGV4bF QlzZkXhshyJqxF+0p0t3+djUdUoXWIIl8uxMe2OTPQnN0StcRb0jWp7C7W0482hcpfKB C1LL9MF4uSD2kweW0tocohgnJSetyI4ew6oUg= Received: by 10.216.87.133 with SMTP id y5mr747382wee.139.1258795969164; Sat, 21 Nov 2009 01:32:49 -0800 (PST) Received: from localhost (92.40.60.115.sub.mbb.three.co.uk [92.40.60.115]) by mx.google.com with ESMTPS id m5sm3659162gve.27.2009.11.21.01.32.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Nov 2009 01:32:48 -0800 (PST) Message-ID: <4b07b3c0.05a4100a.6cfb.111d@mx.google.com> From: James Rowe To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 09:13:31 +0000 Subject: [notmuch] [PATCH] Missing final semi-colon in .desktop's Categories. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 09:32:51 -0000 "Those keys which have several values should have a semicolon as the trailing character." -- http://standards.freedesktop.org/desktop-entry-spec/1.0/ar01s03.html Signed-off-by: James Rowe --- notmuch.desktop | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch.desktop b/notmuch.desktop index d29dff6..819cd1e 100644 --- a/notmuch.desktop +++ b/notmuch.desktop @@ -4,4 +4,4 @@ Exec=emacs -f notmuch Icon=emblem-mail Terminal=false Type=Application -Categories=Network;Email +Categories=Network;Email; -- 1.6.4.4 From cworth@cworth.org Sat Nov 21 02:31:21 2009 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 12FC0431FBF; Sat, 21 Nov 2009 02:31:21 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Nzsy0jKLfRB7; Sat, 21 Nov 2009 02:31:20 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 9E742431FAE; Sat, 21 Nov 2009 02:31:19 -0800 (PST) From: Carl Worth To: "Aneesh Kumar K.V" In-Reply-To: <20091121040730.GA17925@skywalker.linux.vnet.ibm.com> References: <1258730844-8711-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <87lji04m7z.fsf@yoom.home.cworth.org> <20091121040730.GA17925@skywalker.linux.vnet.ibm.com> Date: Sat, 21 Nov 2009 11:31:08 +0100 Message-ID: <87k4xk41ar.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] notmuch.el: Add face support to search and show mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 10:31:21 -0000 On Sat, 21 Nov 2009 09:37:30 +0530, "Aneesh Kumar K.V" wrote: > To verify whether i have some setting in .emacs i ran emacs -q and still > i am able see the colors. So not sure what extra is needed. I also tried > emacs23 and that also worked. Are you able to see this faces via customize-face > command ? And what is the color they display in customize-face ? I think this was user-error on my part. So sorry about the noise. For one thing, I recently broke the Makefiles to install notmuch.el/notmuch.elc into the wrong directory. Fixes shortly... -Carl From cworth@cworth.org Sat Nov 21 04:10:55 2009 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 A57FB431FBF; Sat, 21 Nov 2009 04:10:55 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 sKRtfhp0wKnF; Sat, 21 Nov 2009 04:10:54 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6D0C3431FAE; Sat, 21 Nov 2009 04:10:54 -0800 (PST) From: Carl Worth To: djcb@djcbsoftware.nl, notmuch@notmuchmail.org In-Reply-To: <87aayggsjp.wl%djcb@djcbsoftware.nl> References: <87aayggsjp.wl%djcb@djcbsoftware.nl> Date: Sat, 21 Nov 2009 13:10:42 +0100 Message-ID: <87iqd43wot.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] interesting project! X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 12:10:55 -0000 On Sat, 21 Nov 2009 11:01:46 +0200, Dirk-Jan C. Binnema wrote: > Hi all, Hi, Dirk. Welcome to notmuch! > Wow, 'notmuch' looks like a very interesting project. In 2008, I wrote an > e-mail (Maildir) search tool called 'mu'[1], also using Xapian and GMime; my > plan was at some point to turn it into a mail reader (use > offlineimap/fetchmail etc. for getting the mail, and something else for > sending it), but I never got that far. Search works pretty well > though. Anyhow, it seems notmuch is getting there quickly. Ah, how ignorant I was. I probably could have saved myself a bunch of work if I had just started with mu. Oh, well. > Anyhow, I'll study the notmuch code and see if there are some useful bits in > my code that might make sense there, e.g., various dir scanning optimizations, > see [2]. That sounds great. It's also good to have people with experience in this area join and help out. I'll look forward to any ideas or other contributions you will have. > [2] http://djcbflux.blogspot.com/2008/10/seek-destroy.html Thanks. Stewart Smith contributed a patch to notmuch a couple of days ago that added inode sorting, (which I was totally unaware of as an optimization idea): Read mail directory in inode number order http://git.notmuchmail.org/git/notmuch?a=commitdiff;h=a45ff8c36112a2f17c1ad5c20a16c30a47759797 -Carl From cworth@cworth.org Sat Nov 21 05:17:05 2009 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 68558431FBC; Sat, 21 Nov 2009 05:17:05 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 WXMaaFhTwlin; Sat, 21 Nov 2009 05:17:04 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 68824431FAE; Sat, 21 Nov 2009 05:17:04 -0800 (PST) From: Carl Worth To: Mikhail Gusarov , notmuch@notmuchmail.org In-Reply-To: <1258723107-14704-1-git-send-email-dottedmag@dottedmag.net> References: <1258723107-14704-1-git-send-email-dottedmag@dottedmag.net> Date: Sat, 21 Nov 2009 14:16:52 +0100 Message-ID: <87hbso3tmj.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] RFC: quiet make X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 13:17:05 -0000 On Fri, 20 Nov 2009 19:18:27 +0600, Mikhail Gusarov wrote: > I don't entirely like duplicating every command line in makefile, > so this patch is RFC. Someone with bigger Make-fu than mine probably > knows a better way. Hi Mikhail, Getting a quieter compile out is a great idea. But, you're right that duplicating the command line invocations is a problem. That sets up a fragile system where we'll end up with "make" and "make V=1" actually doing different things. Meanwhile, the feature I've always wanted with systems like this is to document to the user that there's the possibility of adding a "V=1" to the command line to get the full output. Fortunately, I'm sitting next to Chris Wilson right now, and I know that all I need to do is to mention the idea to him, and he'll give us a solution that doesn't duplicate the commands, documents V=1, and will just be a tiny change to our Makefiles. -Carl From dottedmag@dottedmag.net Sat Nov 21 05:21:48 2009 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 66149431FBC for ; Sat, 21 Nov 2009 05:21:48 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Gs9XWIoaIDkw for ; Sat, 21 Nov 2009 05:21:47 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id A0850431FAE for ; Sat, 21 Nov 2009 05:21:47 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id C85AC8C97A; Sat, 21 Nov 2009 14:21:43 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NBpuH-0000pr-8w; Sat, 21 Nov 2009 19:21:41 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org, Chris Wilson References: <1258723107-14704-1-git-send-email-dottedmag@dottedmag.net> <87hbso3tmj.fsf@yoom.home.cworth.org> Date: Sat, 21 Nov 2009 19:21:37 +0600 In-Reply-To: <87hbso3tmj.fsf@yoom.home.cworth.org> (Carl Worth's message of "Sat, 21 Nov 2009 14:16:52 +0100") Message-ID: <87lji0qahq.fsf@vertex.dottedmag> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] RFC: quiet make X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 13:21:48 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Twas brillig at 14:16:52 21.11.2009 UTC+01 when cworth@cworth.org did gyre = and gimble: CW> Meanwhile, the feature I've always wanted with systems like this is CW> to document to the user that there's the possibility of adding a CW> "V=3D1" to the command line to get the full output. I have had another idea in mind which might be useful: a "header" for silent make mode which explains what commands are run exactly, including placeholders like $@ $^, so it is not necessary to run with make V=3D1 to figure out what's going on. =2D-=20 http://fossarchy.blogspot.com/ --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAEBAgAGBQJLB+lhAAoJEJ0g9lA+M4iIWgEP/0xhGvdIMrVhOLPXSs9cT+Ku US2Nosl9dNb/KveayAx/9hGyX7q9cvbvSQmBeiMN1n3H+OJUrYzvLwj0/5JbBL5X qnYd5hA52liOyhkn8J9SQcix/RLlZMJkwx77YRVZepLPyb/Ew/ox+liQAs48d2Bg u+0/OOdqSW/CDjVawpXfkdG0/3E+qNooPysOBRKN1FhbpP5TWYTxZ3n78H8YSJvt ST0vSnlMuDIlpe1wOv+aM0fw53+LntY/tlz6zrT999oZr6dAKluhX+NtIOtcFxB/ TgVidSsr+ZRkYzqCyt3MpqiwFDKdv0XIiW0e4vjUSUal2Tuojd97+06QfYWHRBdb WfSoj9Wk0dxTIwxc09GA4saXYmAoeW5tFIBZxTLiI9Nnr22qfQp9+Joe4q4j9HmN zsieEJ2333+dptO/1UZpW/LOkIleFFeXo79gUegrd1w+E0cY3Eh0wVtEMYdBMXZ2 fCH7CTGSuqaIkpkEg8yIurlltDe2ns/EuxPpLCYm0rYIiS5JgsQGoW4j+33bRmah Zb57CN9FOPE4xfvKdm51m0OH7wqU0neJvV/hKaYrVAC3Bqzn8Z9HopMUtWFKieSr X6TyUZNodEpMsv2KtP64ZEtre/MKavPkJlpiEmrexHVh3WrUhJ/Qo53vUkoQPrCl ioSrw3ioQyo/qVEo8Uxt =rH77 -----END PGP SIGNATURE----- --=-=-=-- From chris@chris-wilson.co.uk Sat Nov 21 05:50:43 2009 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 3D0DC431FBC for ; Sat, 21 Nov 2009 05:50:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 H4TXvkZ7lLe7 for ; Sat, 21 Nov 2009 05:50:42 -0800 (PST) Received: from fmsmga102.fm.intel.com (mga10.intel.com [192.55.52.92]) by olra.theworths.org (Postfix) with ESMTP id EE723431FAE for ; Sat, 21 Nov 2009 05:50:41 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 21 Nov 2009 05:46:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,263,1257148800"; d="scan'208";a="516100848" Received: from unknown (HELO localhost.localdomain) ([10.255.16.192]) by fmsmga002.fm.intel.com with ESMTP; 21 Nov 2009 05:44:26 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 13:48:55 +0000 Message-Id: <1258811335-7082-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] Makefile: Magic silent rules. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 13:50:43 -0000 Use the facilities of GNU make to create a magic function that will on the first invocation print a description of how to enable verbose compile lines and then print the quiet rule. Signed-off-by: Chris Wilson Signed-off-by: Carl Worth Cc: Mikhail Gusarov --- Makefile | 18 +++++++++++++++--- Makefile.local | 2 +- lib/Makefile.local | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 0411cbb..96fcdd5 100644 --- a/Makefile +++ b/Makefile @@ -28,14 +28,26 @@ include lib/Makefile.local # And get user settings from the output of configure include Makefile.config +# The user has not set any verbosity, default to quiet mode and inform the +# user how to enable verbose compiles. +ifeq ($(V),) +quiet_DOC := "Use \"$(MAKE) V=1\" to see the verbose compile lines.\n" +quiet = @echo $(quiet_DOC)$(eval quiet_DOC:=)" $1 $@"; +endif +# The user has explicitly enabled quiet compilation. +ifeq ($(V),0) +quiet = @echo " $1 $@"; +endif +# Otherwise, print the full command line. + %.o: %.cc - $(CXX) -c $(CFLAGS) $(CXXFLAGS) $< -o $@ + $(call quiet,CXX) $(CXX) -c $(CFLAGS) $(CXXFLAGS) $< -o $@ %.o: %.c - $(CC) -c $(CFLAGS) $< -o $@ + $(call quiet,CC) $(CC) -c $(CFLAGS) $< -o $@ %.elc: %.el - emacs -batch -f batch-byte-compile $< + $(call quiet,EMACS) emacs -batch -f batch-byte-compile $< .deps/%.d: %.c @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ diff --git a/Makefile.local b/Makefile.local index ecd4ceb..115de0e 100644 --- a/Makefile.local +++ b/Makefile.local @@ -20,7 +20,7 @@ notmuch_client_srcs = \ notmuch_client_modules = $(notmuch_client_srcs:.c=.o) notmuch: $(notmuch_client_modules) lib/notmuch.a - $(CXX) $^ $(LDFLAGS) -o $@ + $(call quiet,CXX) $(CXX) $^ $(LDFLAGS) -o $@ notmuch.1.gz: notmuch.1 gzip --stdout notmuch.1 > notmuch.1.gz diff --git a/lib/Makefile.local b/lib/Makefile.local index 79f7b0b..f635da7 100644 --- a/lib/Makefile.local +++ b/lib/Makefile.local @@ -18,7 +18,7 @@ libnotmuch_cxx_srcs = \ libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o) $(dir)/notmuch.a: $(libnotmuch_modules) - $(AR) rcs $@ $^ + $(call quiet,AR) $(AR) rcs $@ $^ SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs) CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.a -- 1.6.5.3 From stefan@datenfreihafen.org Sat Nov 21 06:51:20 2009 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 75D51431FBC for ; Sat, 21 Nov 2009 06:51:20 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 5jnA1c2aOZfQ for ; Sat, 21 Nov 2009 06:51:19 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by olra.theworths.org (Postfix) with ESMTP id 99B73431FAE for ; Sat, 21 Nov 2009 06:51:19 -0800 (PST) Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19]) by mx.perfora.net (node=mxus0) with ESMTP (Nemesis) id 0MHnnR-1NCfil1w0j-004C5X for notmuch@notmuchmail.org; Sat, 21 Nov 2009 09:51:19 -0500 Received: from p5b034af6.dip.t-dialin.net ([91.3.74.246] helo=excalibur) by sirius.lasnet.de with esmtpsa (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1) id 1NBrIv-0003yC-3M by authid with cram_md5 for ; Sat, 21 Nov 2009 15:51:15 +0100 Received: from stefan by excalibur with local (Exim 4.69) (envelope-from ) id 1NBrIu-0006At-2N for notmuch@notmuchmail.org; Sat, 21 Nov 2009 15:51:12 +0100 Date: Sat, 21 Nov 2009 15:51:11 +0100 From: Stefan Schmidt To: notmuch@notmuchmail.org Message-ID: <20091121145111.GB19397@excalibur.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: Mutt http://www.mutt.org/ X-KeyID: 0xDDF51665 X-Website: http://www.datenfreihafen.org/ User-Agent: Mutt/1.5.20 (2009-06-14) Subject: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 14:51:20 -0000 Hello. Disclaimer: I'm using vim, in combination with mutt for email, for years, but never dealt with emacs. Please have this in mind and spot any emacs user errors in this report. :) I have first seen notmuch several weeks ago as it seems a silent project. Being more then happy now that it envolves quickly and a real developer community builds around it. But now to my problem. Getting m mail indexed was easy enough: stefan@excalibur:~$ du -chs not-much-mail/ 1.5G not-much-mail/ 1.5G total stefan@excalibur:~$ time notmuch new Found 103677 total files. Processed 103677 total files in 42m 30s (40 files/sec.). Added 100899 new messages to the database (not much, really). Tip: If you have any sub-directories that are archives (that is, they will never receive new mail), marking these directories as read-only (chmod u-w /path/to/dir) will make "notmuch new" much more efficient (it won't even look in those directories). real 43m0.943s user 22m46.513s sys 0m39.418s I put (require 'notmuch) in my ~/.emacs ans start emacs with the -f notmuch option to enter the notmuch mode. What happends then is that a notmuch process gets started and emacs waits for the return. 23649 pts/1 SN+ 0:00 | \_ emacs -f notmuch 23651 ? RNs 0:03 | \_ /usr/local/bin/notmuch search --sort=oldest-first tag:inbox Sadly that takes around 25 minutes here on an Intel Core2Duo notbeook (Thinkpad X200s). I tried this several times now. CPU load was low (~10%) during this time so it is mostly IO bound. I checked that I don't have any big files like mutt header caches left and all my mail is stored in maildir format diretcly from offlineimap. I'm more then happy to test any patches on this issue or do some debugging myself if I get some hints where to look. regards Stefan Schmidt From bdale@gag.com Sat Nov 21 07:12:58 2009 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 5B72A431FBC for ; Sat, 21 Nov 2009 07:12:58 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 k+6stcgjH10a for ; Sat, 21 Nov 2009 07:12:55 -0800 (PST) Received: from winfree.gag.com (winfree.gag.com [192.133.104.8]) by olra.theworths.org (Postfix) with ESMTP id D60CF431FAE for ; Sat, 21 Nov 2009 07:12:55 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by winfree.gag.com (Postfix) with ESMTP id 3C8FD3039; Sat, 21 Nov 2009 08:12:55 -0700 (MST) X-Virus-Scanned: Debian amavisd-new at gag.com Received: from winfree.gag.com ([127.0.0.1]) by localhost (winfree.gag.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id egnlChVtx+X5; Sat, 21 Nov 2009 08:12:54 -0700 (MST) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by winfree.gag.com (Postfix) with ESMTP id 595C93038; Sat, 21 Nov 2009 08:12:53 -0700 (MST) From: Bdale Garbee To: Stefan Schmidt In-Reply-To: <20091121145111.GB19397@excalibur.local> References: <20091121145111.GB19397@excalibur.local> Content-Type: text/plain; charset="UTF-8" Date: Sat, 21 Nov 2009 08:12:52 -0700 Message-ID: <1258816372.8741.15.camel@rover> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 15:12:58 -0000 On Sat, 2009-11-21 at 15:51 +0100, Stefan Schmidt wrote: > Sadly that takes around 25 minutes here on an Intel Core2Duo notbeook (Thinkpad > X200s). I tried this several times now. CPU load was low (~10%) during this time > so it is mostly IO bound. I see the same behavior on my notebook. I gather from talking to keithp that things like the 'state of already being read' aren't being picked up from the file names in the local Maildir yet. Thus I suspect it's a fairly unusual / worst case scenario trying to start up with 178k (in my case) supposedly-unread messages tagged inbox. I haven't figured out how to quickly tag everything as already read or archived or whatever .. can someone who knows more about what's going on confirm my hypothesis and if so, suggest the best approach to getting to a happier state? Bdale From stefan@datenfreihafen.org Sat Nov 21 07:37:03 2009 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 ABCE0431FBC for ; Sat, 21 Nov 2009 07:37:03 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 oKnxHhV+6Mhy for ; Sat, 21 Nov 2009 07:37:02 -0800 (PST) X-Greylist: delayed 2746 seconds by postgrey-1.32 at olra; Sat, 21 Nov 2009 07:37:02 PST Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19]) by olra.theworths.org (Postfix) with ESMTP id 75425431FAE for ; Sat, 21 Nov 2009 07:37:02 -0800 (PST) Received: from p5b034af6.dip.t-dialin.net ([91.3.74.246] helo=excalibur) by sirius.lasnet.de with esmtpsa (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1) id 1NBs1A-0005Bk-Jj by authid with cram_md5; Sat, 21 Nov 2009 16:37:00 +0100 Received: from stefan by excalibur with local (Exim 4.69) (envelope-from ) id 1NBs1A-0006Jw-2I; Sat, 21 Nov 2009 16:36:56 +0100 Date: Sat, 21 Nov 2009 16:36:55 +0100 From: Stefan Schmidt To: Bdale Garbee Message-ID: <20091121153655.GC19397@excalibur.local> References: <20091121145111.GB19397@excalibur.local> <1258816372.8741.15.camel@rover> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1258816372.8741.15.camel@rover> X-Mailer: Mutt http://www.mutt.org/ X-KeyID: 0xDDF51665 X-Website: http://www.datenfreihafen.org/ User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 15:37:03 -0000 Hello. On Sat, 2009-11-21 at 08:12, Bdale Garbee wrote: > On Sat, 2009-11-21 at 15:51 +0100, Stefan Schmidt wrote: > > > Sadly that takes around 25 minutes here on an Intel Core2Duo notbeook (Thinkpad > > X200s). I tried this several times now. CPU load was low (~10%) during this time > > so it is mostly IO bound. > > I see the same behavior on my notebook. > > I gather from talking to keithp that things like the 'state of already > being read' aren't being picked up from the file names in the local > Maildir yet. Thus I suspect it's a fairly unusual / worst case scenario > trying to start up with 178k (in my case) supposedly-unread messages > tagged inbox. Using the read flag during notmuch new would indeed be nice. But some further testing brings some doubts that it is an overload due to to many unread messages. I executed "/usr/local/bin/notmuch search --sort=oldest-first tag:inbox" by hand and from the 21 minutes it took it stayed around 20 in a state where no new message where printed and then sudenly all the rest comes up. In my case only 80 messages were printed before the gap. All of them had a wrong year in the timestamp. 1900 and 1970. Maybe notmuch just comes into a bad state with this dates? Bdale, can you confirm this for your case? I will remove these mails and re-generate the notmuch index to test this out after dinner later today. regards Stefan Schmidt From cworth@cworth.org Sat Nov 21 08:24:45 2009 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 C3C19431FBF for ; Sat, 21 Nov 2009 08:24:45 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 zL7FfXYay6zK for ; Sat, 21 Nov 2009 08:24:45 -0800 (PST) Received: from localhost.localdomain (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id B17AC431FAE for ; Sat, 21 Nov 2009 08:24:44 -0800 (PST) From: Carl Worth To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 17:24:17 +0100 Message-Id: <1258820659-24473-1-git-send-email-cworth@cworth.org> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] RFC: "notmuch search-messages" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 16:24:45 -0000 Here's a quick proposal for a new "notmuch search-messages" command, from which one can generate a list of Message IDs matching a search string. Beyond this, I'd like to add some --format options to both "search" and "search-messages" so that users can get out the information they want, (such as thread-id only from a thread search, filenames only from a message search, etc.). Any thoughts from others on this kind of thing? I know people have been talking about doing thing like modifying message files based on tags, and this seems like the beginnings of support for doing scripted operations like that. -Carl From cworth@cworth.org Sat Nov 21 08:24:52 2009 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 6F726431FC4 for ; Sat, 21 Nov 2009 08:24:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 pk3R2XALbuQe; Sat, 21 Nov 2009 08:24:51 -0800 (PST) Received: from localhost.localdomain (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 168D1431FC0; Sat, 21 Nov 2009 08:24:50 -0800 (PST) From: Carl Worth To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 17:24:18 +0100 Message-Id: <1258820659-24473-2-git-send-email-cworth@cworth.org> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1258820659-24473-1-git-send-email-cworth@cworth.org> References: <1258820659-24473-1-git-send-email-cworth@cworth.org> Subject: [notmuch] [PATCH 1/2] notmuch search: Rename the --max-threads option to --max. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 16:24:52 -0000 The idea is to make this a little more general so that different commands can use identical option names. --- notmuch-search.c | 22 +++++++++++----------- notmuch.c | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index 2b1c0fe..845321d 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -29,7 +29,7 @@ static void do_search_threads (const void *ctx, notmuch_query_t *query, notmuch_sort_t sort, - int first, int max_threads) + int first, int max) { notmuch_thread_t *thread; notmuch_threads_t *threads; @@ -37,7 +37,7 @@ do_search_threads (const void *ctx, time_t date; const char *relative_date; - for (threads = notmuch_query_search_threads (query, first, max_threads); + for (threads = notmuch_query_search_threads (query, first, max); notmuch_threads_has_more (threads); notmuch_threads_advance (threads)) { @@ -83,7 +83,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[]) notmuch_database_t *notmuch; notmuch_query_t *query; char *query_str; - int i, first = 0, max_threads = -1; + int i, first = 0, max = -1; char *opt, *end; notmuch_sort_t sort = NOTMUCH_SORT_NEWEST_FIRST; @@ -99,11 +99,11 @@ notmuch_search_command (void *ctx, int argc, char *argv[]) fprintf (stderr, "Invalid value for --first: %s\n", opt); return 1; } - } else if (STRNCMP_LITERAL (argv[i], "--max-threads=") == 0) { - opt = argv[i] + sizeof ("--max-threads=") - 1; - max_threads = strtoul (opt, &end, 10); + } else if (STRNCMP_LITERAL (argv[i], "--max=") == 0) { + opt = argv[i] + sizeof ("--max=") - 1; + max = strtoul (opt, &end, 10); if (*opt == '\0' || *end != '\0') { - fprintf (stderr, "Invalid value for --max-threads: %s\n", opt); + fprintf (stderr, "Invalid value for --max: %s\n", opt); return 1; } } else if (STRNCMP_LITERAL (argv[i], "--sort=") == 0) { @@ -151,17 +151,17 @@ notmuch_search_command (void *ctx, int argc, char *argv[]) notmuch_query_set_sort (query, sort); - if (max_threads < 0 || max_threads > NOTMUCH_SHOW_INITIAL_BURST) + if (max < 0 || max > NOTMUCH_SHOW_INITIAL_BURST) { do_search_threads (ctx, query, sort, first, NOTMUCH_SHOW_INITIAL_BURST); first += NOTMUCH_SHOW_INITIAL_BURST; - if (max_threads > 0) - max_threads -= NOTMUCH_SHOW_INITIAL_BURST; + if (max > 0) + max -= NOTMUCH_SHOW_INITIAL_BURST; } - do_search_threads (ctx, query, sort, first, max_threads); + do_search_threads (ctx, query, sort, first, max); notmuch_query_destroy (query); notmuch_database_close (notmuch); diff --git a/notmuch.c b/notmuch.c index 5cc8e4c..14d4865 100644 --- a/notmuch.c +++ b/notmuch.c @@ -139,7 +139,7 @@ command_t commands[] = { "\n" "\t\tSupported options for search include:\n" "\n" - "\t\t--max-threads=\n" + "\t\t--max=\n" "\n" "\t\t\tRestricts displayed search results to a subset\n" "\t\t\tof the results that would match the terms.\n" -- 1.6.5.2 From cworth@cworth.org Sat Nov 21 08:25:15 2009 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 3EE83431FC4 for ; Sat, 21 Nov 2009 08:25:15 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 CaTBf7YbKHof; Sat, 21 Nov 2009 08:25:14 -0800 (PST) Received: from localhost.localdomain (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 717B2431FAE; Sat, 21 Nov 2009 08:25:13 -0800 (PST) From: Carl Worth To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 17:24:19 +0100 Message-Id: <1258820659-24473-3-git-send-email-cworth@cworth.org> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1258820659-24473-1-git-send-email-cworth@cworth.org> References: <1258820659-24473-1-git-send-email-cworth@cworth.org> Subject: [notmuch] [PATCH 2/2] Add a new "notmuch search-messages" command. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 16:25:15 -0000 This allows for searching for individual messages, rather than threads as "notmuch search" does. Currently just prints out the message id for each message. --- Makefile.local | 29 +++++----- notmuch-client.h | 3 + notmuch-search-messages.c | 138 +++++++++++++++++++++++++++++++++++++++++++++ notmuch.c | 29 ++++++++- 4 files changed, 181 insertions(+), 18 deletions(-) create mode 100644 notmuch-search-messages.c diff --git a/Makefile.local b/Makefile.local index 3c99624..288d5e9 100644 --- a/Makefile.local +++ b/Makefile.local @@ -2,20 +2,21 @@ all: notmuch notmuch.1.gz emacs: notmuch.elc -notmuch_client_srcs = \ - notmuch.c \ - notmuch-config.c \ - notmuch-dump.c \ - notmuch-new.c \ - notmuch-reply.c \ - notmuch-restore.c \ - notmuch-search.c \ - notmuch-setup.c \ - notmuch-show.c \ - notmuch-tag.c \ - notmuch-time.c \ - gmime-filter-reply.c \ - query-string.c \ +notmuch_client_srcs = \ + notmuch.c \ + notmuch-config.c \ + notmuch-dump.c \ + notmuch-new.c \ + notmuch-reply.c \ + notmuch-restore.c \ + notmuch-search.c \ + notmuch-search-messages.c \ + notmuch-setup.c \ + notmuch-show.c \ + notmuch-tag.c \ + notmuch-time.c \ + gmime-filter-reply.c \ + query-string.c \ show-message.c notmuch_client_modules = $(notmuch_client_srcs:.c=.o) diff --git a/notmuch-client.h b/notmuch-client.h index b65aa77..c4ca687 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -106,6 +106,9 @@ int notmuch_search_command (void *ctx, int argc, char *argv[]); int +notmuch_search_messages_command (void *ctx, int argc, char *argv[]); + +int notmuch_setup_command (void *ctx, int argc, char *argv[]); int diff --git a/notmuch-search-messages.c b/notmuch-search-messages.c new file mode 100644 index 0000000..b01d566 --- /dev/null +++ b/notmuch-search-messages.c @@ -0,0 +1,138 @@ +/* notmuch - Not much of an email program, (just index and search) + * + * Copyright © 2009 Carl Worth + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/ . + * + * Author: Carl Worth + */ + +#include "notmuch-client.h" + +/* If the user asks for a *lot* of results, lets give some results as + * quickly as possible and let the user read those while we compute + * the remainder. */ +#define NOTMUCH_SHOW_INITIAL_BURST 100 + +static void +do_search_messages (notmuch_query_t *query, + int first, int max) +{ + notmuch_messages_t *messages; + notmuch_message_t *message; + + for (messages = notmuch_query_search_messages (query, first, max); + notmuch_messages_has_more (messages); + notmuch_messages_advance (messages)) + { + message = notmuch_messages_get (messages); + + printf ("id:%s\n", notmuch_message_get_message_id (message)); + + notmuch_message_destroy (message); + } +} + +int +notmuch_search_messages_command (void *ctx, int argc, char *argv[]) +{ + notmuch_config_t *config; + notmuch_database_t *notmuch; + notmuch_query_t *query; + char *query_str; + int i, first = 0, max = -1; + char *opt, *end; + notmuch_sort_t sort = NOTMUCH_SORT_NEWEST_FIRST; + + for (i = 0; i < argc && argv[i][0] == '-'; i++) { + if (strcmp (argv[i], "--") == 0) { + i++; + break; + } + if (STRNCMP_LITERAL (argv[i], "--first=") == 0) { + opt = argv[i] + sizeof ("--first=") - 1; + first = strtoul (opt, &end, 10); + if (*opt == '\0' || *end != '\0') { + fprintf (stderr, "Invalid value for --first: %s\n", opt); + return 1; + } + } else if (STRNCMP_LITERAL (argv[i], "--max=") == 0) { + opt = argv[i] + sizeof ("--max=") - 1; + max = strtoul (opt, &end, 10); + if (*opt == '\0' || *end != '\0') { + fprintf (stderr, "Invalid value for --max: %s\n", opt); + return 1; + } + } else if (STRNCMP_LITERAL (argv[i], "--sort=") == 0) { + opt = argv[i] + sizeof ("--sort=") - 1; + if (strcmp (opt, "oldest-first") == 0) { + sort = NOTMUCH_SORT_OLDEST_FIRST; + } else if (strcmp (opt, "newest-first") == 0) { + sort = NOTMUCH_SORT_NEWEST_FIRST; + } else { + fprintf (stderr, "Invalid value for --sort: %s\n", opt); + return 1; + } + } else { + fprintf (stderr, "Unrecognized option: %s\n", argv[i]); + return 1; + } + } + + argc -= i; + argv += i; + + config = notmuch_config_open (ctx, NULL, NULL); + if (config == NULL) + return 1; + + notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + if (notmuch == NULL) + return 1; + + query_str = query_string_from_args (ctx, argc, argv); + if (query_str == NULL) { + fprintf (stderr, "Out of memory.\n"); + return 1; + } + if (*query_str == '\0') { + fprintf (stderr, "Error: notmuch search requires at least one search term.\n"); + return 1; + } + + query = notmuch_query_create (notmuch, query_str); + if (query == NULL) { + fprintf (stderr, "Out of memory\n"); + return 1; + } + + notmuch_query_set_sort (query, sort); + + if (max < 0 || max > NOTMUCH_SHOW_INITIAL_BURST) + { + do_search_messages (query, + first, NOTMUCH_SHOW_INITIAL_BURST); + + first += NOTMUCH_SHOW_INITIAL_BURST; + if (max > 0) + max -= NOTMUCH_SHOW_INITIAL_BURST; + } + + do_search_messages (query, first, max); + + notmuch_query_destroy (query); + notmuch_database_close (notmuch); + + return 0; +} diff --git a/notmuch.c b/notmuch.c index 14d4865..6440777 100644 --- a/notmuch.c +++ b/notmuch.c @@ -132,10 +132,31 @@ command_t commands[] = { "\t\tnot previously been run." }, { "search", notmuch_search_command, "[options...] [...]", - "\t\tSearch for messages matching the given search terms.", - "\t\tNote that the individual mail messages will be matched\n" - "\t\tagainst the search terms, but the results will be the\n" - "\t\tthreads (one per line) containing the matched messages.\n" + "\t\tSearch for threads with messages matching the search terms.", + "\n" + "\t\tSupported options for search include:\n" + "\n" + "\t\t--max=\n" + "\n" + "\t\t\tRestricts displayed search results to a subset\n" + "\t\t\tof the results that would match the terms.\n" + "\n" + "\t\t--first=\n" + "\n" + "\t\t\tOmits the first threads from the search\n" + "\t\t\tresults that would otherwise be displayed.\n" + "\n" + "\t\t--sort=(newest-first|oldest-first)\n" + "\n" + "\t\t\tPresent results in either chronological order\n" + "\t\t\t(oldest-first) or reverse chronological order\n" + "\t\t\t(newest-first), which is the default.\n" + "\n" + "\t\tSee \"notmuch help search-terms\" for details of the search\n" + "\t\tterms syntax." }, + { "search-messages", notmuch_search_messages_command, + "[options...] [...]", + "\t\tSearch for messages matching the search terms.", "\n" "\t\tSupported options for search include:\n" "\n" -- 1.6.5.2 From jrollins@finestructure.net Sat Nov 21 08:43:48 2009 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 6888B431FBC for ; Sat, 21 Nov 2009 08:43:48 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 EpWHGNX87IQz for ; Sat, 21 Nov 2009 08:43:47 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by olra.theworths.org (Postfix) with ESMTP id C755B431FAE for ; Sat, 21 Nov 2009 08:43:47 -0800 (PST) Received: from serrano.cc.columbia.edu (serrano.cc.columbia.edu [128.59.29.6]) by mx.perfora.net (node=mxus2) with ESMTP (Nemesis) id 0LooAF-1NoDxQ0FI3-00gMtQ for notmuch@notmuchmail.org; Sat, 21 Nov 2009 11:43:47 -0500 Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com [72.227.128.66]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by serrano.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id nALGhgPQ006415 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sat, 21 Nov 2009 11:43:42 -0500 (EST) Received: from jrollins by servo.finestructure.net with local (Exim 4.69) (envelope-from ) id 1NBt40-0007PG-0I; Sat, 21 Nov 2009 11:43:56 -0500 Date: Sat, 21 Nov 2009 11:43:55 -0500 From: Jameson Greaf Rollins To: Carl Worth Message-ID: <20091121164355.GA21741@finestructure.net> References: <87aayggsjp.wl%djcb@djcbsoftware.nl> <87iqd43wot.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="M9NhX3UHpAaciwkO" Content-Disposition: inline In-Reply-To: <87iqd43wot.fsf@yoom.home.cworth.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.65 on 128.59.29.6 Cc: notmuch@notmuchmail.org, djcb@djcbsoftware.nl Subject: Re: [notmuch] interesting project! X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 16:43:48 -0000 --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 21, 2009 at 01:10:42PM +0100, Carl Worth wrote: > On Sat, 21 Nov 2009 11:01:46 +0200, Dirk-Jan C. Binnema wrote: > > Anyhow, I'll study the notmuch code and see if there are some useful bi= ts in > > my code that might make sense there, e.g., various dir scanning optimiz= ations, > > see [2]. >=20 > That sounds great. It's also good to have people with experience in this > area join and help out. I'll look forward to any ideas or other > contributions you will have. I've been using mu for a while now and have found it incredibly useful. I just heard about notmuch and it seems like the mail processing system I've been waiting for, so I'm incredibly excited. The idea of the mu and notmuch folks working together sounds incredibly awesome. I am really encouraged. jamie. --M9NhX3UHpAaciwkO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: attachment -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJLCBjGAAoJEO00zqvie6q8lIIP+wX8MNeoT4IeYXdLAe9Rq7sB BYoaZgIk8FPI+Rf7mczlX1Sh2GvYhbK3InTQo1Fwcttqv58ZJPs7ozfEytEuYF4o sHYkfWZM33o5KK1XBGq2hs5MmnxZwzjEU7qYOcjB94UI0U+R/c5qQBauDk/Dp5SG pxZAbRQjJNZjamjABqoKlXIQP272/GWc8/jYDFtfa26XCZO/dFyPNqlOqjALupOQ EUYccPqSbYsimj4hLMhT3KIZAluJPHEiBalJNJsq6OXvvL2s7YSs76/L9l8J+BLy 41EjO/TQ7DSgu0UOyUOBWGTDcMQlgGojHf3iWtvsahUbe0rPaejj9/qkKKv5SgPx 788UNYFO1x9SMwafrRguyP1mpAYEwEAhlXb2j70gNdsTi81xDVtDL5e3u+xw1+G5 2lmGgJz6vu338Td2fMILrDwi+24VQrOCpJs9mqUQOMNMU0pTkYQ/eJ0fzb2ghr2L tfRtz7pW+D2vN5tTgGwn7nMFrMfAAydjc4Ye0GhBAVsgYJvnX6eFbUPsuMVPeb9r S1cHvjppxJz7muUNyr+6dGNYEELa3M0CuwsRpS9QSi2PPFuo41X/LOKW1QaFDwa0 1NBEYR6wqN1dxTBQPGQCAUJJGPiw7CgjrQvCQHe+joylZurAAviwAIGKZbiXTdMI JKaavFoYjAFfnhpVzOLk =Nni+ -----END PGP SIGNATURE----- --M9NhX3UHpAaciwkO-- From cworth@cworth.org Sat Nov 21 09:07:23 2009 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 5BB9D431FBF; Sat, 21 Nov 2009 09:07:23 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 BRy2DldsBgM4; Sat, 21 Nov 2009 09:07:22 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D5801431FAE; Sat, 21 Nov 2009 09:07:21 -0800 (PST) From: Carl Worth To: Stefan Schmidt , notmuch@notmuchmail.org In-Reply-To: <20091121145111.GB19397@excalibur.local> References: <20091121145111.GB19397@excalibur.local> Date: Sat, 21 Nov 2009 18:07:10 +0100 Message-ID: <87fx874xj5.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 17:07:23 -0000 On Sat, 21 Nov 2009 15:51:11 +0100, Stefan Schmidt wrote: > Disclaimer: I'm using vim, in combination with mutt for email, for years, but > never dealt with emacs. Please have this in mind and spot any emacs user errors > in this report. :) Hi Stefan, welcome to Notmuch! And don't worry, we don't discriminate (too much) against non-emacs users around here. > I have first seen notmuch several weeks ago as it seems a silent project. Being > more then happy now that it envolves quickly and a real developer community > builds around it. Yes. Notmuch was a silent project since it was just something that I was doing for myself. I was always writing it as free software, and even had a public git repository available, but hadn't advertised it at all yet. And Keith did rather catch me off guard by announcing it. But I can't complain as we have gotten a nice community started already, and it's great to have other people writing the code that I intended to write. :-) But it's also true that some obvious problems just aren't taken care of yet. > But now to my problem. Getting m mail indexed was easy enough: > > stefan@excalibur:~$ du -chs not-much-mail/ > 1.5G not-much-mail/ > 1.5G total > stefan@excalibur:~$ time notmuch new > Found 103677 total files. > Processed 103677 total files in 42m 30s (40 files/sec.). > Added 100899 new messages to the database (not much, really). Good. I'm glad that went fairly smoothly for you. Though, frankly, I think we need to fix "notmuch new" to do much better than 40 files/sec. One plan I have for this is to not use the database to search for message IDs when adding many messages---but to instead just use a hash-table (seeded from any messages already in the database). This would allow us to do all thread resolution before indexing messages, without having to do the N different searches, and also means we'd avoid continually rewriting documents when merging thread IDs. > I put (require 'notmuch) in my ~/.emacs ans start emacs with the -f notmuch > option to enter the notmuch mode. I'm glad you've figured that much out. I feel bad that that's not even in the documentation anywhere yet. > What happends then is that a notmuch process gets started and emacs > waits for the return. OK. This is a known shortcoming. As Bdale supposes, this problem is from notmuch trying to load and construct every thread in your database. There are actually several different bugs/missing features here that should be addressed: * "notmuch new" should look at the R flag in maildir files to determine that they are read and do not need to be marked as "inbox" and "unread" * "notmuch setup" should prompt for some date range, ("last 2 months" by default?) before which no messages will be considered unread. Either of those two fixes would have prevented your particular problem. But it's still easy to generate searches that return large numbers of results. So there's some more to do: * The emacs code needs to call "notmuch search" with the --first and --max-threads options to get a limited set of results, (one or two screenfuls). You should be able to test this at the command line and see that it returns results quickly. Then, of course, we'd like the emacs code to fill in subsequent screenfuls as you page. But none of that helps you right now. What you need is to retroactively remove all of the "inbox" and "unread" tags from messages older than some time period. So then there's another missing feature: * We need to support date-range-based searches. If we had that you could just do: notmuch tag -inbox -unread until:"2 months ago" But we don't quite have this yet. Xapian does have support for a slightly less convenient date range specification: 1970-01-01..2009-09-21 but it turns out that we can't even use that just yet, since to make that work we would have to have dates saved as YYYYMMDD strings for each message, (where instead we have time_t values stored serialized into a string that will sort correctly.). So we need a new ValueRangeProcessor class to map to timestamps, and then we'll need some fancy parsing to do things like "2 months ago". So, what's the best thing to do today if you want to start playing with notmuch? I think you could pick one of the above to work on, (a quick hack to "notmuch new" and a re-import might do the trick). Or you might just remove the inbox and unread tags from all messages and then just let messages that are actually *new* in the future get tagged into the inbox by "notmuch new". Oh, but then there's another missing feature: * We need a syntax to specify a search string that should match all messages. Then you could do: notmuch tag -inbox -unread Yikes! So many bugs and missing features. How is anyone actually using this system? Well, Keith and I were able to get past all this by simply doing a "notmuch restore" based on tags we got from sup-dump. So here, is another attempt: 1. Run "notmuch dump " to get the list of message IDs, (all with their "inbox" and "unread" tags). 2. Edit that file to remove the tags you want. 3. Run "notmuch restore " to cause the tags to be removed. But, (*sigh*), that's not good either, because "notmuch dump" is currently hard-coded to dump messages in message-ID order rather than date order, (so you can't easily do something like "just remove the tags from messages older than two months). So, there's sadly no easy way to get what you want with the tools in their current form. I guess that's the pain that you get for being an early adopter. :-} But if hacking a little C code doesn't scare you away, a lot of the things listed above are actually really easy to fix. (Like, fixing "notmuch dump" to just run in date order is a one-line change. Adding a --sort command-line option to it wouldn't be much harder, etc.) So hopefully the above serves as a nice TODO list. Thanks everyone for your interest in this software even in its current, can-be-painful-to-use state. -Carl PS. Expect the mass-re-tag operations to be about as slow as the original "notmuch new" import of the messages. That's a known bug in Xapian that's one of the highest priority things that I'd like to fix, (along with all of the above and all the other things I want to do...) At least we're not running out of things to work on here. From cworth@cworth.org Sat Nov 21 09:16:45 2009 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 DE8A4431FBF; Sat, 21 Nov 2009 09:16:45 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 aoLSQbqEzFj3; Sat, 21 Nov 2009 09:16:45 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C3FA0431FAE; Sat, 21 Nov 2009 09:16:44 -0800 (PST) From: Carl Worth To: Bdale Garbee , Stefan Schmidt In-Reply-To: <1258816372.8741.15.camel@rover> References: <20091121145111.GB19397@excalibur.local> <1258816372.8741.15.camel@rover> Date: Sat, 21 Nov 2009 18:16:33 +0100 Message-ID: <87einr4x3i.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 17:16:46 -0000 On Sat, 21 Nov 2009 08:12:52 -0700, Bdale Garbee wrote: > I haven't figured out how to quickly tag everything as already read or > archived or whatever .. can someone who knows more about what's going on > confirm my hypothesis and if so, suggest the best approach to getting to > a happier state? See my message up-thread. The only reasonable ways all really do involve at least a little bit of C-code hacking to either prevent those tags from getting put there by "notmuch new" or to make it easier to get them off afterwards. I'm hoping everyone with this problem will happen to choose a different solution and we'll get a nice flood of patches to improve things. :-) And I can't help but apologize. I've known about all these issues, and wouldn't have invited people to try things out in the current state. But it was nice of Keith to share this with everyone. And it's nice of all you to come take a look at things. So, I'll just ask for a little patience, and we'll hopefully have a nice system soon. -Carl From cworth@cworth.org Sat Nov 21 09:26:52 2009 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 5E77D431FBF; Sat, 21 Nov 2009 09:26:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 NuJ3YNtxrIW9; Sat, 21 Nov 2009 09:26:51 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 42D1B431FAE; Sat, 21 Nov 2009 09:26:51 -0800 (PST) From: Carl Worth To: Stefan Schmidt , Bdale Garbee In-Reply-To: <20091121153655.GC19397@excalibur.local> References: <20091121145111.GB19397@excalibur.local> <1258816372.8741.15.camel@rover> <20091121153655.GC19397@excalibur.local> Date: Sat, 21 Nov 2009 18:26:39 +0100 Message-ID: <87d43b4wmo.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 17:26:52 -0000 On Sat, 21 Nov 2009 16:36:55 +0100, Stefan Schmidt wrote: > I executed "/usr/local/bin/notmuch search --sort=oldest-first tag:inbox" by hand > and from the 21 minutes it took it stayed around 20 in a state where no new > message where printed and then sudenly all the rest comes up. That's actually the expected behavior currently. It used to be that "notmuch search" on the command line wouldn't present any results until everything was available. I recently threw in a hack to present the first 100 thread results quickly and only then does it sit and spin before all the results are available. I suppose it wouldn't be any harder for it to keep returning chunks of 100 threads at a time, (though this will slow down the final result a bit---perhaps not significantly). And I wouldn't really mind any slowdown there anyway, since any *real* interface should be calling "notmuch search" in small chunks anyway. So I'll go ahead and do that. > In my case only 80 messages were printed before the gap. All of them had a wrong > year in the timestamp. 1900 and 1970. Maybe notmuch just comes into a bad state > with this dates? I don't think the bogus dates are throwing anything off. It's more likely that you just have a number of messages with no Date header on them at all. And for such messages, notmuch just chooses a time_t value of 0 so you'll see whatever that 0 maps to on your system---a date of 1970 there is not surprising. :-) > I will remove these mails and re-generate the notmuch index to test this out > after dinner later today. See my other mail. You may want to tweak the behavior of "notmuch new" before running it again. (I would not expect the results to be any different from running it again with no change.) -Carl From brett.viren@gmail.com Sat Nov 21 10:08:45 2009 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 6D5E8431FBC for ; Sat, 21 Nov 2009 10:08:45 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Cy-JWgak6juL for ; Sat, 21 Nov 2009 10:08:43 -0800 (PST) Received: from mail-px0-f180.google.com (mail-px0-f180.google.com [209.85.216.180]) by olra.theworths.org (Postfix) with ESMTP id B36B4431FAE for ; Sat, 21 Nov 2009 10:08:43 -0800 (PST) Received: by pxi10 with SMTP id 10so3149807pxi.33 for ; Sat, 21 Nov 2009 10:08:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=MpS9IJJd/FZSLJ0gAX3fCelUqQk4RvcKV9sWF55pIjs=; b=dn+3pvaij/BMqaONeeYJWn5f64bbOQ9N5uksZymFgM3mTMHNwXSBiIC9U0Tvp1iG6H oR3PCCUO9sVVhq5jGh1Fgn0HIgw8NsmbiP0jx8A8vXCID8uWA6L6cgXf7zZjF/0XcpQs 8u9Rx/uu6ZlmEajJu8MGosVYh/sP8n5MbBDRw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=mXyfqkziXK6cTWH2+rELjxjgMVY8/+mVXWVGU+dbIhoOhASEc9h9qOcBNvoPzccc3s 0jlxvMCwjKODEOYfbaHG4YD1FsCPGaNHV6dAY/d6x3lHz4GaAva8/1dhsaUV4eEO/9vM G4LUcp1RtRCN2gqNtXtYVVdJiPUBxewcYVzEE= MIME-Version: 1.0 Received: by 10.114.17.11 with SMTP id 11mr4335798waq.188.1258826922839; Sat, 21 Nov 2009 10:08:42 -0800 (PST) Date: Sat, 21 Nov 2009 13:08:42 -0500 Message-ID: <46263c600911211008s7b087c9aw434898f35bb3b0e6@mail.gmail.com> From: Brett Viren To: notmuch@notmuchmail.org Content-Type: text/plain; charset=ISO-8859-1 Subject: [notmuch] Greetings and suggestions X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 18:08:45 -0000 Hi, I recently heard about notmuch from a reddit.com posting. Immediately I knew I needed to try it. I've been a long time GNUS user and with VM before that. GNUS is great but I have never been very successful getting it to play well with an indexer. So far, after a little playing with notmuch I think it looks very good! I think integrating notmuch into GNUS or incorporating GNUS features into notmuch.el would be good direction to go. The two features I see missing most are: - posting styles (ie, set From: to non standard value) based on search pattern. This is really important when one subscribes to different mailing lists using different addresses and the ML only allows mail from registered addresses. - apply tags based on search pattern as new mail is processed. This would be like GNUS split-rules, but even better as one can place more than one tag. Anyways, great project and I look forward to contributing where I can. -Brett. From five9a2@gmail.com Sat Nov 21 10:35:14 2009 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 2119B431FBC for ; Sat, 21 Nov 2009 10:35:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 u0MUF+HeMkTf for ; Sat, 21 Nov 2009 10:35:13 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 12978431FAE for ; Sat, 21 Nov 2009 10:35:12 -0800 (PST) Received: by bwz24 with SMTP id 24so3081211bwz.30 for ; Sat, 21 Nov 2009 10:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject:date :message-id:mime-version:content-type; bh=pQggxsiw0gSYgADZNBjgwIoJrzsYX7unlFbUgZscJkc=; b=W+hkVaEusHH2aQ3PD6VtRqWMtc1xxXZ5xkAxfiVwctiVaJhg6pasgld+rYR0oBbTva zQgVeaw5525jjNWj3AtAs/1kXVzFMYrlXSQ6rE+D3DSjAlESBTExvtXFkphi2/Ad9OyC 7OlvZOHyN0s6FBSkqLOI5aDA3yfMUfoJ5mcsI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:mime-version:content-type; b=CcvvQMM+br2wb5mlYyxGj2kIhJx1ayqkit/SxkqpdkQ8DRLkAexXgb/L5NnPIleL+s LYWMa+x9RE0k2CpWTd0ewa7FDjkgbP5vs7wIdLe8aZsLMx6zBmOku4kieq9/JQ+d8nce RaLVH/7ZAylvWI7PSqBe4g/oCkV6uuMAte0eA= Received: by 10.204.48.140 with SMTP id r12mr2783303bkf.112.1258828512071; Sat, 21 Nov 2009 10:35:12 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id z15sm3251230fkz.36.2009.11.21.10.35.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Nov 2009 10:35:11 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 19:35:39 +0100 Message-ID: <87fx87u3no.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [notmuch] Asynchronous tagging X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 18:35:14 -0000 I'm really enjoying notmuch, thanks! I have a minor issue and a couple observations worth noting. 1. Changing tags (like removing inbox/unread) has really high latency. For example, notmuch-show-advance-marking-read-and-archiving takes 2 to 4 seconds (by comparison, this is as long as a vague search returning 1000+ threads). I have about 100k messages in a maildir on linux-2.6.31-6, ext4, xapian-1.0.17. I tried switching to the development version of xapian, but the notmuch configure didn't pick it up (maybe it would still work though). Is this a known issue? Is it worth making certain notmuch.el operations asynchronous to hide this latency? 2. I have 'notmuch new' in an offlineimap postsync hook, but notmuch-search-refresh-view occasionally complains that another process has the lock (since I might press '=' when 'notmuch new' is running). Waiting a moment and trying again works fine, but it would be nice to clean this up eventually. 3. I had initially put 'notmuch new' in a cron job (instead of offlineimap postsync hook) and new/search would sometimes complain about missing files in the maildir. The first time this happened, it did not correct itself and I ended up reimporting the database (I had moved some things around so I could have been at fault). Since then I have seen these errors on a couple occasions, but they always go away upon rerunning 'notmuch new'. My guess is that it has to do with offlineimap changing flags so I moved 'notmuch new' to the postsync hook and have not seen the errors since. If it is important that notmuch never runs concurrently with an offlineimap sync, it should eventually go in the docs. Thanks again, Jed From bart@jukie.net Sat Nov 21 10:39:11 2009 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 B50D2431FC0 for ; Sat, 21 Nov 2009 10:39:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 seFyvpq39DkU for ; Sat, 21 Nov 2009 10:39:10 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 6273E431FAE for ; Sat, 21 Nov 2009 10:39:10 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id A42E2C035F4; Sat, 21 Nov 2009 13:39:09 -0500 (EST) Date: Sat, 21 Nov 2009 13:39:09 -0500 From: Bart Trojanowski To: notmuch@notmuchmail.org Message-ID: <20091121183909.GG24944@jukie.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Subject: [notmuch] notmuch vim support X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 18:39:11 -0000 Hi list, I've spent a few days on porting notmuch.el to vim. It's not as feature rich as notmuch.el yet, but it's coming along nicely. The results of my work are here: git://git.jukie.net/notmuch.git (on the vim branch) http://git.jukie.net/notmuch.git?a=shortlog;h=refs/heads/vim There are some screenshots in my blog: http://www.jukie.net/~bart/blog/notmuch.vim List of supported features are in the README: http://git.jukie.net/notmuch.git?a=blob;f=vim/README;hb=refs/heads/vim I'd love for this to be included in the official project, but I am not sure if you'd prefer to merge at this point or wait will I am done. Naturally, if anyone is interested I'd love some help. Cheers, -Bart -- WebSig: http://www.jukie.net/~bart/sig/ From cworth@cworth.org Sat Nov 21 10:39:35 2009 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 053F3431FC4; Sat, 21 Nov 2009 10:39:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 dFeTuBo+oP+c; Sat, 21 Nov 2009 10:39:34 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id AAEF6431FBF; Sat, 21 Nov 2009 10:39:33 -0800 (PST) From: Carl Worth To: "Aneesh Kumar K.V" , notmuch In-Reply-To: <87fx8bygi7.fsf@linux.vnet.ibm.com> References: <87fx8bygi7.fsf@linux.vnet.ibm.com> Date: Sat, 21 Nov 2009 19:39:22 +0100 Message-ID: <87bpiv4t9h.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] notmuch: Add Maildir directory name as tag name for messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 18:39:35 -0000 On Wed, 18 Nov 2009 21:25:28 +0530, aneesh.kumar@linux.vnet.ibm.com (Aneesh Kumar K.V) wrote: > This patch adds maildir directory name as the tag name for > messages. This helps in adding tags using filtering already > provided by procmail. A fantastic patch, Aneesh! I think this will be handy for a lot of people importing mail from all kinds of systems. This is pushed now. Thanks again, -Carl From cworth@cworth.org Sat Nov 21 10:44:50 2009 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 9D754431FBF; Sat, 21 Nov 2009 10:44:50 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 fqMeS1r2QP5r; Sat, 21 Nov 2009 10:44:50 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id BF6D5431FAE; Sat, 21 Nov 2009 10:44:49 -0800 (PST) From: Carl Worth To: Jan Janak , notmuch@notmuchmail.org In-Reply-To: <1258520223-15328-1-git-send-email-jan@ryngle.com> References: <1258520223-15328-1-git-send-email-jan@ryngle.com> Date: Sat, 21 Nov 2009 19:44:38 +0100 Message-ID: <87aayf4t0p.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] notmuch new: Support for conversion of spool subdirectories into tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 18:44:50 -0000 On Wed, 18 Nov 2009 05:57:03 +0100, Jan Janak wrote: > This patch makes it possible to convert subdirectory names inside the > spool directory into message tags. Messages stored in subdirectory > "foo" will be marked with tag "foo". Message duplicates found in several > subdirectories will be given one tag per subdirectory. Hi Jan, I just pushed out a patch from Aneesh for similar functionality, but with a simpler implementation. One thing that patch loses is the addition of multiple tags when a message appears in multiple directories. Would you like to code up that feature on top of the current code? -Carl From cworth@cworth.org Sat Nov 21 10:51:40 2009 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 54DD0431FBF; Sat, 21 Nov 2009 10:51:40 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 RLZsTBAeFK2K; Sat, 21 Nov 2009 10:51:39 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2D9F8431FAE; Sat, 21 Nov 2009 10:51:39 -0800 (PST) From: Carl Worth To: Saptarshi Guha , notmuch@notmuchmail.org In-Reply-To: References: Date: Sat, 21 Nov 2009 19:51:27 +0100 Message-ID: <877htj4spc.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Problem Building on OSX leopard 10.5.8 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 18:51:40 -0000 On Wed, 18 Nov 2009 12:47:47 -0500, Saptarshi Guha wrote: > Having given up on most email clients yet trapped by them, I came > across notmuch. > Quite eager to build, Hi Saptarshi, Welcome to notmuch! I hope you find it helpful. > In the INSTALL/README file, mention that xapian-config should be on path > and that it be called xapian-config. > When I installed the latest, it was installed in /usr/local/bin (not > in my path) > at xapian-config-1.1 OK. I've added that now. > 2. download gmime (no problem here) Good news. > 3. Install talloc (the makefile has errors in it) What's the error here? (Not that it's our bug, but it would be nice to report it to the talloc folks or perhaps warn notmuch users about it). > lib/index.cc: In function void > _index_address_mailbox(notmuch_message_t*, const char*, > InternetAddress*): > lib/index.cc:46: error: strndup was not declared in this scope Some systems (including yours) don't have a strndup function. One proposed plan is to put an implementation of strndup into notmuch, (it's not a complex function). But then again, we could just change the caller to use talloc_strndup instead. Portability patches are always welcome, (otherwise I'll try to do things when I can but I won't be able to test things well). -Carl From chris@chris-wilson.co.uk Sat Nov 21 11:02:28 2009 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 BF42E431FC0 for ; Sat, 21 Nov 2009 11:02:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 7KscHBcn0qvN for ; Sat, 21 Nov 2009 11:02:27 -0800 (PST) Received: from orsmga101.jf.intel.com (mga06.intel.com [134.134.136.21]) by olra.theworths.org (Postfix) with ESMTP id 8B395431FAE for ; Sat, 21 Nov 2009 11:02:27 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 21 Nov 2009 11:02:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,264,1257148800"; d="scan'208";a="571844771" Received: from unknown (HELO localhost.localdomain) ([10.255.16.192]) by orsmga001.jf.intel.com with ESMTP; 21 Nov 2009 11:02:15 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 19:02:22 +0000 Message-Id: <1258830142-13311-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] Makefile: Magic silent rules. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 19:02:28 -0000 Use the facilities of GNU make to create a magic function that will on the first invocation print a description of how to enable verbose compile lines and then print the quiet rule. Signed-off-by: Chris Wilson Signed-off-by: Carl Worth Cc: Mikhail Gusarov --- Makefile | 22 +++++++++++++++++++--- Makefile.local | 4 ++-- lib/Makefile.local | 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 3fedcf1..77e70ed 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,10 @@ WARN_FLAGS=-Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum CFLAGS=-O2 +# Additional programs that are used during the compilation process. +EMACS ?= emacs +GZIP ?= gzip + # Additional flags that we will append to whatever the user set. # These aren't intended for the user to manipulate. extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc) @@ -31,14 +35,26 @@ include lib/Makefile.local # And get user settings from the output of configure include Makefile.config +# The user has not set any verbosity, default to quiet mode and inform the +# user how to enable verbose compiles. +ifeq ($(V),) +quiet_DOC := "Use \"$(MAKE) V=1\" to see the verbose compile lines.\n" +quiet = @echo $(quiet_DOC)$(eval quiet_DOC:=)" $1 $@"; $($1) +endif +# The user has explicitly enabled quiet compilation. +ifeq ($(V),0) +quiet = @echo " $1 $@"; $($1) +endif +# Otherwise, print the full command line. + %.o: %.cc $(all_deps) - $(CXX) -c $(CXXFLAGS) $< -o $@ + $(call quiet,CXX) -c $(CXXFLAGS) $< -o $@ %.o: %.c $(all_deps) - $(CC) -c $(CFLAGS) $< -o $@ + $(call quiet,CC) -c $(CFLAGS) $< -o $@ %.elc: %.el - emacs -batch -f batch-byte-compile $< + $(call quiet,EMACS) -batch -f batch-byte-compile $< .deps/%.d: %.c $(all_deps) @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ diff --git a/Makefile.local b/Makefile.local index 3c99624..5fd5d4f 100644 --- a/Makefile.local +++ b/Makefile.local @@ -20,10 +20,10 @@ notmuch_client_srcs = \ notmuch_client_modules = $(notmuch_client_srcs:.c=.o) notmuch: $(notmuch_client_modules) lib/notmuch.a - $(CXX) $^ $(LDFLAGS) -o $@ + $(call quiet,CXX) $^ $(LDFLAGS) -o $@ notmuch.1.gz: notmuch.1 - gzip --stdout notmuch.1 > notmuch.1.gz + $(call quiet,GZIP) --stdout $^ > $@ install: all notmuch.1.gz for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \ diff --git a/lib/Makefile.local b/lib/Makefile.local index 79f7b0b..a7562c9 100644 --- a/lib/Makefile.local +++ b/lib/Makefile.local @@ -18,7 +18,7 @@ libnotmuch_cxx_srcs = \ libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o) $(dir)/notmuch.a: $(libnotmuch_modules) - $(AR) rcs $@ $^ + $(call quiet,AR) rcs $@ $^ SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs) CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.a -- 1.6.5.3 From stefan@datenfreihafen.org Sat Nov 21 11:06:11 2009 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 F0C9C431FBC for ; Sat, 21 Nov 2009 11:06:10 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 NQpk+TE2Q2b8 for ; Sat, 21 Nov 2009 11:06:10 -0800 (PST) Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19]) by olra.theworths.org (Postfix) with ESMTP id 45C11431FAE for ; Sat, 21 Nov 2009 11:06:10 -0800 (PST) Received: from p5b034af6.dip.t-dialin.net ([91.3.74.246] helo=excalibur) by sirius.lasnet.de with esmtpsa (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1) id 1NBvHa-0001rh-Si by authid with cram_md5 for ; Sat, 21 Nov 2009 20:06:09 +0100 Received: from stefan by excalibur with local (Exim 4.69) (envelope-from ) id 1NBvHa-0006jD-Cl for notmuch@notmuchmail.org; Sat, 21 Nov 2009 20:06:06 +0100 Date: Sat, 21 Nov 2009 20:06:06 +0100 From: Stefan Schmidt To: notmuch@notmuchmail.org Message-ID: <20091121190606.GA24602@excalibur.local> References: <20091121183909.GG24944@jukie.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091121183909.GG24944@jukie.net> X-Mailer: Mutt http://www.mutt.org/ X-KeyID: 0xDDF51665 X-Website: http://www.datenfreihafen.org/ User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [notmuch] notmuch vim support X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 19:06:11 -0000 Hello. On Sat, 2009-11-21 at 13:39, Bart Trojanowski wrote: > > I've spent a few days on porting notmuch.el to vim. It's not as feature > rich as notmuch.el yet, but it's coming along nicely. The results of my > work are here: Great stuff! I hoped for someone stepping up early to provide alternative interfaces. > I'd love for this to be included in the official project, but I am not > sure if you'd prefer to merge at this point or wait will I am done. IMHO it would be best to do the development inside the main tree. You could use branches there too and it would be easier to find and test. And as notmuch is still under heavy development its not a problem that the vim interface is as well. regards Stefan Schmidt From bart@jukie.net Sat Nov 21 11:14:04 2009 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 857B8431FBC for ; Sat, 21 Nov 2009 11:14:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 lbL18DRckRr1 for ; Sat, 21 Nov 2009 11:14:03 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 8F277431FAE for ; Sat, 21 Nov 2009 11:14:03 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id EA5A8C035FA; Sat, 21 Nov 2009 14:14:02 -0500 (EST) Date: Sat, 21 Nov 2009 14:14:02 -0500 From: Bart Trojanowski To: Stefan Schmidt Message-ID: <20091121191402.GA17268@jukie.net> References: <20091121183909.GG24944@jukie.net> <20091121190606.GA24602@excalibur.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091121190606.GA24602@excalibur.local> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] notmuch vim support X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 19:14:04 -0000 * Stefan Schmidt [091121 14:06]: > IMHO it would be best to do the development inside the main tree. You could use > branches there too and it would be easier to find and test. And as notmuch is > still under heavy development its not a problem that the vim interface is as > well. Perfect. How would you like to proceed with the initial integration? Pulling my tree, or me squashing all the changes into a single patch? Also, are you OK with where the files live (ie under a vim directory). After that, do you want me to submit patches by email, via pull requests, or giving me push access to a branch at your repo? BTW, have you considered using github or gitorious so branch management becomes a distributed problem? Cheers, -Bart -- WebSig: http://www.jukie.net/~bart/sig/ From dottedmag@dottedmag.net Sat Nov 21 11:19:11 2009 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 14FCE431FBC for ; Sat, 21 Nov 2009 11:19:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 VESzhGq1JBiw for ; Sat, 21 Nov 2009 11:19:10 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id EB280431FAE for ; Sat, 21 Nov 2009 11:19:09 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id A6E4B8C979; Sat, 21 Nov 2009 20:19:08 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NBvUA-0003FI-03; Sun, 22 Nov 2009 01:19:06 +0600 From: Mikhail Gusarov To: Chris Wilson References: <1258830142-13311-1-git-send-email-chris@chris-wilson.co.uk> Date: Sun, 22 Nov 2009 01:19:02 +0600 In-Reply-To: <1258830142-13311-1-git-send-email-chris@chris-wilson.co.uk> (Chris Wilson's message of "Sat, 21 Nov 2009 19:02:22 +0000") Message-ID: <87my2fpty1.fsf@vertex.dottedmag> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] Makefile: Magic silent rules. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 19:19:11 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Twas brillig at 19:02:22 21.11.2009 UTC+00 when chris@chris-wilson.co.uk di= d gyre and gimble: CW> Use the facilities of GNU make to create a magic function that will CW> on the first invocation print a description of how to enable CW> verbose compile lines and then print the quiet rule. Ugh. With silent rules enabled it gives me /bin/sh: --rsyncable: not found at the end (apparently gzip was eaten out) And with V=3D1 it strips first two symbols from the command name: c -Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum -D_LAR= GEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -I/usr/include/glib-2.0 -I/usr/lib= /glib-2.0/include -I/usr/include/gmime-2.4 -Ilib lib/query.cc -o lib/que= ry.o make: c: Command not found make: [lib/query.o] Error 127 (ignored) c -Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum -D_LAR= GEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -I/usr/include/glib-2.0 -I/usr/lib= /glib-2.0/include -I/usr/include/gmime-2.4 -Ilib lib/thread.cc -o lib/th= read.o make: c: Command not found make: [lib/thread.o] Error 127 (ignored) rcs lib/notmuch.a lib/libsha1.o lib/message-file.o lib/messages.o lib/sha1.= o lib/tags.o lib/xutil.o lib/database.o lib/index.o lib/message.o lib/query= .o lib/thread.o make: rcs: Command not found =2D-=20 http://fossarchy.blogspot.com/ --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAEBAgAGBQJLCD0nAAoJEJ0g9lA+M4iIseMQAL2rIDy99lFoSx/FXvQXoSO/ JySP9o4+aU93xMU7pVRKjrdlaW0mLaeQx6wdmC9LArHeTVMIrFZ3fRh/rI/fIV+b t4hbV9JrmiZ+Jfwyy6KBQOlnjQP5f6esd01dndu75fU1iMo8VaPvVakyM3XFVt5Z REdrLtkzun4XDpeNSNOdQNxxbaj05AGtUmtDN0VyGwTrKGgM7j2LfRPSl7xalFUm rKAYRyQ0IGfIBe1YWvFGG0/5bgXvSBVcaPIBabJNKq3OW03MfZuMoVgwSjx13GAk MPUQPE780WbXtfd2wsEdTfnnlWfGK2jsx60zw57E9psri2fmsu0DyeWFGq0APVbd WsPg5LfBPagjpGg3j83m3nyR9FRd0D0y6ml/lmvupZuc8vFyavrHuYDo8fbYVsp1 qoZBWadg5qo2VPH6l+OeiWsbad6zT0xlPQ2CYGobgZFD7XWnGPrZrlgDh1z/AwOr qBtXWeXOLGsSwiDX7aqPF+eauUTMeF9wfoTRPUVXAJ3xdFNI0tiAHcf/bZZwByvN A5Tul0cexBji6oUGB2CQ0jl8UAu+nLa4Gv9T6apZeEgYUnHwsrOj7c7inmuldkvB gXOAS0Vn5VOCXCtEG42MdE+SEepnMhQK4TGuqoHAw2m2hq3iHjNR5tfRD/UdIFKj zbfLq4j7yWG3YauYNA3G =ikbG -----END PGP SIGNATURE----- --=-=-=-- From stefan@datenfreihafen.org Sat Nov 21 11:22:21 2009 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 EE4DC431FAE for ; Sat, 21 Nov 2009 11:22:20 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 I-wec9G3KWF3 for ; Sat, 21 Nov 2009 11:22:20 -0800 (PST) Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19]) by olra.theworths.org (Postfix) with ESMTP id A1D65431FBC for ; Sat, 21 Nov 2009 11:22:20 -0800 (PST) Received: from p5b034af6.dip.t-dialin.net ([91.3.74.246] helo=excalibur) by sirius.lasnet.de with esmtpsa (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1) id 1NBvXC-0002Il-0h by authid with cram_md5; Sat, 21 Nov 2009 20:22:17 +0100 Received: from stefan by excalibur with local (Exim 4.69) (envelope-from ) id 1NBvXB-0006lM-I9; Sat, 21 Nov 2009 20:22:13 +0100 Date: Sat, 21 Nov 2009 20:22:13 +0100 From: Stefan Schmidt To: Carl Worth Message-ID: <20091121192213.GB24602@excalibur.local> References: <20091121145111.GB19397@excalibur.local> <1258816372.8741.15.camel@rover> <87einr4x3i.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87einr4x3i.fsf@yoom.home.cworth.org> X-Mailer: Mutt http://www.mutt.org/ X-KeyID: 0xDDF51665 X-Website: http://www.datenfreihafen.org/ User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 19:22:21 -0000 Hello. On Sat, 2009-11-21 at 18:16, Carl Worth wrote: > On Sat, 21 Nov 2009 08:12:52 -0700, Bdale Garbee wrote: > > I haven't figured out how to quickly tag everything as already read or > > archived or whatever .. can someone who knows more about what's going on > > confirm my hypothesis and if so, suggest the best approach to getting to > > a happier state? > > See my message up-thread. The only reasonable ways all really do involve > at least a little bit of C-code hacking to either prevent those tags > from getting put there by "notmuch new" or to make it easier to get them > off afterwards. Let's see if I come up with something here. > And I can't help but apologize. I've known about all these issues, and > wouldn't have invited people to try things out in the current state. But > it was nice of Keith to share this with everyone. And it's nice of all > you to come take a look at things. Getting it out now was a good move. It had enough code to actually do omething usefull and many people waited for something like this. The increasing number of contributors in such a short time shows it very well. :) regards Stefan Schmidt From stefan@datenfreihafen.org Sat Nov 21 11:24:04 2009 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 68E69431FBF for ; Sat, 21 Nov 2009 11:24:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 teh9Zipqd-0O for ; Sat, 21 Nov 2009 11:24:04 -0800 (PST) Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19]) by olra.theworths.org (Postfix) with ESMTP id 166AC431FAE for ; Sat, 21 Nov 2009 11:24:04 -0800 (PST) Received: from p5b034af6.dip.t-dialin.net ([91.3.74.246] helo=excalibur) by sirius.lasnet.de with esmtpsa (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1) id 1NBvYm-0002Kn-UA by authid with cram_md5; Sat, 21 Nov 2009 20:24:01 +0100 Received: from stefan by excalibur with local (Exim 4.69) (envelope-from ) id 1NBvYm-0006lT-Po; Sat, 21 Nov 2009 20:23:52 +0100 Date: Sat, 21 Nov 2009 20:23:52 +0100 From: Stefan Schmidt To: Carl Worth Message-ID: <20091121192352.GC24602@excalibur.local> References: <20091121145111.GB19397@excalibur.local> <1258816372.8741.15.camel@rover> <20091121153655.GC19397@excalibur.local> <87d43b4wmo.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87d43b4wmo.fsf@yoom.home.cworth.org> X-Mailer: Mutt http://www.mutt.org/ X-KeyID: 0xDDF51665 X-Website: http://www.datenfreihafen.org/ User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 19:24:04 -0000 Hello. On Sat, 2009-11-21 at 18:26, Carl Worth wrote: > On Sat, 21 Nov 2009 16:36:55 +0100, Stefan Schmidt wrote: > > > In my case only 80 messages were printed before the gap. All of them had a wrong > > year in the timestamp. 1900 and 1970. Maybe notmuch just comes into a bad state > > with this dates? > > I don't think the bogus dates are throwing anything off. It's more > likely that you just have a number of messages with no Date header on > them at all. And for such messages, notmuch just chooses a time_t value > of 0 so you'll see whatever that 0 maps to on your system---a date of > 1970 there is not surprising. :-) Yeah, I figured that removing the offending messages and re-run it brought nothing. Time to look at the source. :) regards Stefan Schmidt From stefan@datenfreihafen.org Sat Nov 21 11:36:20 2009 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 58C90431FBC for ; Sat, 21 Nov 2009 11:36:20 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 2-fvXAY2r36o for ; Sat, 21 Nov 2009 11:36:18 -0800 (PST) Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19]) by olra.theworths.org (Postfix) with ESMTP id 68488431FAE for ; Sat, 21 Nov 2009 11:36:18 -0800 (PST) Received: from p5b034af6.dip.t-dialin.net ([91.3.74.246] helo=excalibur) by sirius.lasnet.de with esmtpsa (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1) id 1NBvkc-0002cH-EN by authid with cram_md5; Sat, 21 Nov 2009 20:36:16 +0100 Received: from stefan by excalibur with local (Exim 4.69) (envelope-from ) id 1NBvkc-0006p5-9x; Sat, 21 Nov 2009 20:36:06 +0100 Date: Sat, 21 Nov 2009 20:36:06 +0100 From: Stefan Schmidt To: Carl Worth Message-ID: <20091121193606.GD24602@excalibur.local> References: <20091121145111.GB19397@excalibur.local> <87fx874xj5.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87fx874xj5.fsf@yoom.home.cworth.org> X-Mailer: Mutt http://www.mutt.org/ X-KeyID: 0xDDF51665 X-Website: http://www.datenfreihafen.org/ User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 19:36:20 -0000 Hello. On Sat, 2009-11-21 at 18:07, Carl Worth wrote: > On Sat, 21 Nov 2009 15:51:11 +0100, Stefan Schmidt wrote: > > Disclaimer: I'm using vim, in combination with mutt for email, for years, but > > never dealt with emacs. Please have this in mind and spot any emacs user errors > > in this report. :) > > Hi Stefan, welcome to Notmuch! And don't worry, we don't discriminate > (too much) against non-emacs users around here. :) > > I have first seen notmuch several weeks ago as it seems a silent project. Being > > more then happy now that it envolves quickly and a real developer community > > builds around it. > > Yes. Notmuch was a silent project since it was just something that I was > doing for myself. I was always writing it as free software, and even had > a public git repository available, but hadn't advertised it at all yet. Yup, I had the repo on my disk a week before Keith blogged about it. Just nice that it was going crazy that fast and people start using it and contributing to it. > > But now to my problem. Getting m mail indexed was easy enough: > > > > stefan@excalibur:~$ du -chs not-much-mail/ > > 1.5G not-much-mail/ > > 1.5G total > > stefan@excalibur:~$ time notmuch new > > Found 103677 total files. > > Processed 103677 total files in 42m 30s (40 files/sec.). > > Added 100899 new messages to the database (not much, really). > > Good. I'm glad that went fairly smoothly for you. > > Though, frankly, I think we need to fix "notmuch new" to do much better > than 40 files/sec. As a sidenote. That one is on a notebook with a slow 5400 disk and crypt + lvm + ext3 on top. Perhaps I should put some money back for an X25 SSD. ;) > > I put (require 'notmuch) in my ~/.emacs ans start emacs with the -f notmuch > > option to enter the notmuch mode. > > I'm glad you've figured that much out. I feel bad that that's not even > in the documentation anywhere yet. I have to admit it took me some time. Something like below should help? > > What happends then is that a notmuch process gets started and emacs > > waits for the return. > > OK. This is a known shortcoming. As Bdale supposes, this problem is from > notmuch trying to load and construct every thread in your > database. There are actually several different bugs/missing features > here that should be addressed: > > * "notmuch new" should look at the R flag in maildir files to > determine that they are read and do not need to be marked as "inbox" > and "unread" I think that's what I will try to get working here. Sounds the nearest solution to my problem. That in combination with the just merged tags-based-on-folders patch should make me a lot happier. :) >From 8f95e039e98addd0f4be7c31e41e534f1b519a5d Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Sat, 21 Nov 2009 20:31:55 +0100 Subject: [PATCH] INSTALL: emacs install dokumentation. Write down the steps needed to install and actuall use notmuch in emacs. Should help emacs newbies. Signed-off-by: Stefan Schmidt --- INSTALL | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/INSTALL b/INSTALL index de268b6..64b8e36 100644 --- a/INSTALL +++ b/INSTALL @@ -14,6 +14,14 @@ Notmuch are satisfied. If they are not, the configure script will notice that and provide instructions on where to obtain the necessary dependencies. +notmuch.el installation +----------------------- +Installing the notmuch.el emacs lisp function systemwide: + + sudo make install-emacs + +Each user needs to add (require 'notmuch) in his ~/.emacs to activate it. + Dependencies ------------ Notmuch depends on three libraries: Xapian, GMime 2.4, and Talloc -- 1.6.5.3 regards Stefan Schmidt From stefan@datenfreihafen.org Sat Nov 21 11:38:58 2009 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 960F9431FC0 for ; Sat, 21 Nov 2009 11:38:58 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 APr1OmqBvU7W for ; Sat, 21 Nov 2009 11:38:57 -0800 (PST) Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19]) by olra.theworths.org (Postfix) with ESMTP id 9E957431FAE for ; Sat, 21 Nov 2009 11:38:57 -0800 (PST) Received: from p5b034af6.dip.t-dialin.net ([91.3.74.246] helo=excalibur) by sirius.lasnet.de with esmtpsa (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1) id 1NBvnK-0002eZ-KQ by authid with cram_md5; Sat, 21 Nov 2009 20:38:57 +0100 Received: from stefan by excalibur with local (Exim 4.69) (envelope-from ) id 1NBvnK-0006pN-H5; Sat, 21 Nov 2009 20:38:54 +0100 Date: Sat, 21 Nov 2009 20:38:54 +0100 From: Stefan Schmidt To: Bart Trojanowski Message-ID: <20091121193854.GF24602@excalibur.local> References: <20091121183909.GG24944@jukie.net> <20091121190606.GA24602@excalibur.local> <20091121191402.GA17268@jukie.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091121191402.GA17268@jukie.net> X-Mailer: Mutt http://www.mutt.org/ User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] notmuch vim support X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 19:38:58 -0000 Hello. [Resend, first one missed the list] On Sat, 2009-11-21 at 14:14, Bart Trojanowski wrote: > * Stefan Schmidt [091121 14:06]: > > IMHO it would be best to do the development inside the main tree. You could use > > branches there too and it would be easier to find and test. And as notmuch is > > still under heavy development its not a problem that the vim interface is as > > well. > > Perfect. How would you like to proceed with the initial integration? > Pulling my tree, or me squashing all the changes into a single patch? > Also, are you OK with where the files live (ie under a vim directory). Just started to use it. Its Carls trun to decide such things. :) regards Stefan Schmidt From five9a2@gmail.com Sat Nov 21 11:45:04 2009 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 8E820431FBF for ; Sat, 21 Nov 2009 11:45:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 sMkoDGJhY+QE for ; Sat, 21 Nov 2009 11:45:03 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 17AF1431FAE for ; Sat, 21 Nov 2009 11:45:02 -0800 (PST) Received: by bwz24 with SMTP id 24so3104976bwz.30 for ; Sat, 21 Nov 2009 11:45:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=uupNKBOGUo3ts9iozXCHUdonilQQpqiphgF2ntAPE6I=; b=GW5lQFsda98Nkd0hE6v62fQb0QgWl1ybuTbiBFPNW13SG40YHUATv8T/Bz9W4ZhLMM Lob7BaPvFQI24DQv45kCyX9rHFA1eRu77cWwK0lNowu67XUU3mnsC7L1NhWnsp6crqJi EDvFNPDWxloBaDh6IWXc4iJoLW+ftyZANmck4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=cf/Dp3gdc2ieKvL7LrNWjGwwpZUB42RRz8zdOU6IW6vp0oMxKypYnr83n86RFXmjGj 5T6TpNVjMg64z6N4pqv41x2mJsunX5XoqP/hon8wx6Bp8Z74dymFaBeNvIKAjXM6wFXZ Hf26aznJd4C2Yj6W8A7WOAafZxUyjfPwB6wyg= Received: by 10.204.34.9 with SMTP id j9mr2987189bkd.10.1258832702054; Sat, 21 Nov 2009 11:45:02 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id d13sm3311921fka.47.2009.11.21.11.45.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Nov 2009 11:45:01 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org In-Reply-To: <87fx87u3no.fsf@59A2.org> References: <87fx87u3no.fsf@59A2.org> Date: Sat, 21 Nov 2009 20:45:30 +0100 Message-ID: <87einru0f9.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Asynchronous tagging X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 19:45:04 -0000 On Sat, 21 Nov 2009 19:35:39 +0100, Jed Brown wrote: [...] > 3. I had initially put 'notmuch new' in a cron job (instead of > offlineimap postsync hook) and new/search would sometimes complain about > missing files in the maildir. The first time this happened, it did not > correct itself and I ended up reimporting the database (I had moved some > things around so I could have been at fault). Since then I have seen > these errors on a couple occasions, but they always go away upon > rerunning 'notmuch new'. My guess is that it has to do with offlineimap > changing flags so I moved 'notmuch new' to the postsync hook and have > not seen the errors since. If it is important that notmuch never runs > concurrently with an offlineimap sync, it should eventually go in the > docs. Actually, this popped up again. I have a workaround, but here's the story if you are interested. After changing a flag in Gmail and syncing with offlineimap, I get this in my inbox Today 19:18 [1/2] (null) (null) (inbox unread) And when I try to open it, the buffer is full of stderr. Error opening /home/jed/.mail-archive/gmail-all/new/1258826583_1.20705.kunyang,U=174235,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258826583_1.20705.kunyang,U=174235,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258827595_0.20705.kunyang,U=174288,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258827595_0.20705.kunyang,U=174288,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258826583_1.20705.kunyang,U=174235,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258826583_1.20705.kunyang,U=174235,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258826583_1.20705.kunyang,U=174235,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258826583_1.20705.kunyang,U=174235,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258826583_1.20705.kunyang,U=174235,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258826583_1.20705.kunyang,U=174235,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258826583_1.20705.kunyang,U=174235,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258826583_1.20705.kunyang,U=174235,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258827595_0.20705.kunyang,U=174288,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258827595_0.20705.kunyang,U=174288,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258827595_0.20705.kunyang,U=174288,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258827595_0.20705.kunyang,U=174288,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258827595_0.20705.kunyang,U=174288,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258827595_0.20705.kunyang,U=174288,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258827595_0.20705.kunyang,U=174288,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258827595_0.20705.kunyang,U=174288,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory It is present in any searches that contain the problem files $ notmuch search tag:inbox | wc Error opening /home/jed/.mail-archive/gmail-all/new/1258826583_1.20705.kunyang,U=174235,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258826583_1.20705.kunyang,U=174235,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258827595_0.20705.kunyang,U=174288,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Error opening /home/jed/.mail-archive/gmail-all/new/1258827595_0.20705.kunyang,U=174288,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory 22 321 3150 but other searches are clean $ notmuch search to:notmuch@notmuchmail.org | wc 31 499 4398 Explicitly archiving the null message removes it from these queries so the clutter is gone now, but it has to be done manually because the null message doesn't match any search terms. Jed From cworth@cworth.org Sat Nov 21 11:48:04 2009 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 DE302431FC2; Sat, 21 Nov 2009 11:48:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 vS2C7K4UnhRU; Sat, 21 Nov 2009 11:48:04 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D3BBE431FBF; Sat, 21 Nov 2009 11:48:03 -0800 (PST) From: Carl Worth To: Brett Viren , notmuch@notmuchmail.org In-Reply-To: <46263c600911211008s7b087c9aw434898f35bb3b0e6@mail.gmail.com> References: <46263c600911211008s7b087c9aw434898f35bb3b0e6@mail.gmail.com> Date: Sat, 21 Nov 2009 20:47:52 +0100 Message-ID: <8763934q3b.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Greetings and suggestions X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 19:48:05 -0000 On Sat, 21 Nov 2009 13:08:42 -0500, Brett Viren wrote: > I recently heard about notmuch from a reddit.com posting. Immediately > I knew I needed to try it. Hi Brett, welcome to Notmuch! > I've been a long time GNUS user and with VM before that. GNUS is > great but I have never been very successful getting it to play well > with an indexer. Excellent. It's great to have a long-time GNUS user here. I really wanted to poke around in GNUS for ideas, (and code), but have so far entirely failed to even _run_ in to view any email messages. I'm clearly not smart enough to be a GNUS user. But I know that if I *could* run it, I'd see lots of great stuff in it. And integrating nicely would be great. (The emacs code we have for notmuch is already integrating with the message-mode stuff from GNUS). > So far, after a little playing with notmuch I think it looks very > good! Thanks so much. > - posting styles (ie, set From: to non standard value) based on > search pattern. This is really important when one subscribes to > different mailing lists using different addresses and the ML only > allows mail from registered addresses. Yes. That's a good idea. We already set From: based on how a message being replied-to was addressed, but not yet based on the new To: address. > - apply tags based on search pattern as new mail is processed. This > would be like GNUS split-rules, but even better as one can place more > than one tag. This is definitely on the feature list and is something we'll be implementing soon. In the meantime, those of us that are using notmuch in earnest are using shell scripts to load our mail like this: notmuch new notmuch tag +notmuch to:notmuchmail.org and not tag:notmuch ... But just moving that configuration to the configuration file will be a lot better. > Anyways, great project and I look forward to contributing where I can. Thanks Brett, I'll look forward to any contributions from you. -Carl From chris@chris-wilson.co.uk Sat Nov 21 11:54:32 2009 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 F3327431FC0 for ; Sat, 21 Nov 2009 11:54:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 JTnaGtNnLRuL for ; Sat, 21 Nov 2009 11:54:30 -0800 (PST) Received: from fmsmga101.fm.intel.com (mga05.intel.com [192.55.52.89]) by olra.theworths.org (Postfix) with ESMTP id 44ECA431FBF for ; Sat, 21 Nov 2009 11:54:30 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 21 Nov 2009 11:49:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,264,1257148800"; d="scan'208";a="516162843" Received: from unknown (HELO localhost.localdomain) ([10.255.16.192]) by fmsmga002.fm.intel.com with ESMTP; 21 Nov 2009 11:48:14 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 19:54:25 +0000 Message-Id: <1258833265-17012-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] Permit opening the notmuch database in read-only mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 19:54:32 -0000 We only rarely need to actually open the database for writing, but we always create a Xapian::WritableDatabase. This has the effect of preventing searches and like whilst updating the index. Signed-off-by: Chris Wilson Acked-by: Carl Worth --- lib/database-private.h | 3 ++- lib/database.cc | 31 ++++++++++++++++++++++++------- lib/message.cc | 15 +++++++++++++-- lib/notmuch-private.h | 1 + lib/notmuch.h | 13 +++++++++++-- notmuch-dump.c | 3 ++- notmuch-new.c | 4 +++- notmuch-reply.c | 3 ++- notmuch-restore.c | 3 ++- notmuch-search.c | 3 ++- notmuch-show.c | 3 ++- notmuch-tag.c | 3 ++- 12 files changed, 66 insertions(+), 19 deletions(-) diff --git a/lib/database-private.h b/lib/database-private.h index 76e26ce..79c7916 100644 --- a/lib/database-private.h +++ b/lib/database-private.h @@ -27,7 +27,8 @@ struct _notmuch_database { char *path; - Xapian::WritableDatabase *xapian_db; + notmuch_database_mode_t mode; + Xapian::Database *xapian_db; Xapian::QueryParser *query_parser; Xapian::TermGenerator *term_gen; }; diff --git a/lib/database.cc b/lib/database.cc index 207246c..fb38664 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -172,6 +172,8 @@ notmuch_status_to_string (notmuch_status_t status) return "No error occurred"; case NOTMUCH_STATUS_OUT_OF_MEMORY: return "Out of memory"; + case NOTMUCH_STATUS_READONLY_DATABASE: + return "The database is read-only"; case NOTMUCH_STATUS_XAPIAN_EXCEPTION: return "A Xapian exception occurred"; case NOTMUCH_STATUS_FILE_ERROR: @@ -438,7 +440,8 @@ notmuch_database_create (const char *path) goto DONE; } - notmuch = notmuch_database_open (path); + notmuch = notmuch_database_open (path, + NOTMUCH_DATABASE_MODE_WRITABLE); DONE: if (notmuch_path) @@ -448,7 +451,8 @@ notmuch_database_create (const char *path) } notmuch_database_t * -notmuch_database_open (const char *path) +notmuch_database_open (const char *path, + notmuch_database_mode_t mode) { notmuch_database_t *notmuch = NULL; char *notmuch_path = NULL, *xapian_path = NULL; @@ -481,9 +485,14 @@ notmuch_database_open (const char *path) if (notmuch->path[strlen (notmuch->path) - 1] == '/') notmuch->path[strlen (notmuch->path) - 1] = '\0'; + notmuch->mode = mode; try { - notmuch->xapian_db = new Xapian::WritableDatabase (xapian_path, - Xapian::DB_CREATE_OR_OPEN); + if (mode == NOTMUCH_DATABASE_MODE_WRITABLE) { + notmuch->xapian_db = new Xapian::WritableDatabase (xapian_path, + Xapian::DB_CREATE_OR_OPEN); + } else { + notmuch->xapian_db = new Xapian::Database (xapian_path); + } notmuch->query_parser = new Xapian::QueryParser; notmuch->term_gen = new Xapian::TermGenerator; notmuch->term_gen->set_stemmer (Xapian::Stem ("english")); @@ -521,7 +530,8 @@ notmuch_database_open (const char *path) void notmuch_database_close (notmuch_database_t *notmuch) { - notmuch->xapian_db->flush (); + if (notmuch->mode == NOTMUCH_DATABASE_MODE_WRITABLE) + (static_cast (notmuch->xapian_db))->flush (); delete notmuch->term_gen; delete notmuch->query_parser; @@ -567,11 +577,18 @@ notmuch_database_set_timestamp (notmuch_database_t *notmuch, const char *key, time_t timestamp) { Xapian::Document doc; + Xapian::WritableDatabase *db; unsigned int doc_id; notmuch_private_status_t status; notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS; char *db_key = NULL; + if (notmuch->mode == NOTMUCH_DATABASE_MODE_READONLY) { + fprintf (stderr, "Attempted to update a read-only database.\n"); + return NOTMUCH_STATUS_READONLY_DATABASE; + } + + db = static_cast (notmuch->xapian_db); db_key = timestamp_db_key (key); try { @@ -586,9 +603,9 @@ notmuch_database_set_timestamp (notmuch_database_t *notmuch, doc.add_term (term); talloc_free (term); - notmuch->xapian_db->add_document (doc); + db->add_document (doc); } else { - notmuch->xapian_db->replace_document (doc_id, doc); + db->replace_document (doc_id, doc); } } catch (Xapian::Error &error) { diff --git a/lib/message.cc b/lib/message.cc index e0b8a8e..7ba06c9 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -168,9 +168,15 @@ _notmuch_message_create_for_message_id (notmuch_database_t *notmuch, { notmuch_message_t *message; Xapian::Document doc; + Xapian::WritableDatabase *db; unsigned int doc_id; char *term; + if (notmuch->mode == NOTMUCH_DATABASE_MODE_READONLY) { + *status_ret = NOTMUCH_PRIVATE_STATUS_READONLY_DATABASE; + return NULL; + } + *status_ret = NOTMUCH_PRIVATE_STATUS_SUCCESS; message = notmuch_database_find_message (notmuch, message_id); @@ -184,13 +190,14 @@ _notmuch_message_create_for_message_id (notmuch_database_t *notmuch, return NULL; } + db = static_cast (notmuch->xapian_db); try { doc.add_term (term); talloc_free (term); doc.add_value (NOTMUCH_VALUE_MESSAGE_ID, message_id); - doc_id = notmuch->xapian_db->add_document (doc); + doc_id = db->add_document (doc); } catch (const Xapian::Error &error) { *status_ret = NOTMUCH_PRIVATE_STATUS_XAPIAN_EXCEPTION; return NULL; @@ -543,8 +550,12 @@ _notmuch_message_ensure_thread_id (notmuch_message_t *message) void _notmuch_message_sync (notmuch_message_t *message) { - Xapian::WritableDatabase *db = message->notmuch->xapian_db; + Xapian::WritableDatabase *db; + + if (message->notmuch->mode == NOTMUCH_DATABASE_MODE_READONLY) + return; + db = static_cast (message->notmuch->xapian_db); db->replace_document (message->doc_id, message->doc); } diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index 1583498..2b4bf31 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -110,6 +110,7 @@ typedef enum _notmuch_private_status { /* First, copy all the public status values. */ NOTMUCH_PRIVATE_STATUS_SUCCESS = NOTMUCH_STATUS_SUCCESS, NOTMUCH_PRIVATE_STATUS_OUT_OF_MEMORY = NOTMUCH_STATUS_OUT_OF_MEMORY, + NOTMUCH_PRIVATE_STATUS_READONLY_DATABASE = NOTMUCH_STATUS_READONLY_DATABASE, NOTMUCH_PRIVATE_STATUS_XAPIAN_EXCEPTION = NOTMUCH_STATUS_XAPIAN_EXCEPTION, NOTMUCH_PRIVATE_STATUS_FILE_NOT_EMAIL = NOTMUCH_STATUS_FILE_NOT_EMAIL, NOTMUCH_PRIVATE_STATUS_NULL_POINTER = NOTMUCH_STATUS_NULL_POINTER, diff --git a/lib/notmuch.h b/lib/notmuch.h index cc713a3..89ed7ad 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -86,6 +86,7 @@ typedef int notmuch_bool_t; typedef enum _notmuch_status { NOTMUCH_STATUS_SUCCESS = 0, NOTMUCH_STATUS_OUT_OF_MEMORY, + NOTMUCH_STATUS_READONLY_DATABASE, NOTMUCH_STATUS_XAPIAN_EXCEPTION, NOTMUCH_STATUS_FILE_ERROR, NOTMUCH_STATUS_FILE_NOT_EMAIL, @@ -139,11 +140,18 @@ notmuch_database_create (const char *path); /* XXX: I think I'd like this to take an extra argument of * notmuch_status_t* for returning a status value on failure. */ +typedef enum { + NOTMUCH_DATABASE_MODE_READONLY = 0, + NOTMUCH_DATABASE_MODE_WRITABLE +} notmuch_database_mode_t; + /* Open an existing notmuch database located at 'path'. * * The database should have been created at some time in the past, * (not necessarily by this process), by calling - * notmuch_database_create with 'path'. + * notmuch_database_create with 'path'. By default the database should be + * opened for reading only. In order to write to the database you need to + * pass the NOTMUCH_DATABASE_MODE_WRITABLE mode. * * An existing notmuch database can be identified by the presence of a * directory named ".notmuch" below 'path'. @@ -155,7 +163,8 @@ notmuch_database_create (const char *path); * an error message on stderr). */ notmuch_database_t * -notmuch_database_open (const char *path); +notmuch_database_open (const char *path, + notmuch_database_mode_t mode); /* Close the given notmuch database, freeing all associated * resources. See notmuch_database_open. */ diff --git a/notmuch-dump.c b/notmuch-dump.c index 4c6e321..86570d0 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -35,7 +35,8 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[]) if (config == NULL) return 1; - notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + notmuch = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READONLY); if (notmuch == NULL) return 1; diff --git a/notmuch-new.c b/notmuch-new.c index 6264628..91c9681 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -195,6 +195,7 @@ add_files_recursive (notmuch_database_t *notmuch, next); break; /* Fatal issues. Don't process anymore. */ + case NOTMUCH_STATUS_READONLY_DATABASE: case NOTMUCH_STATUS_XAPIAN_EXCEPTION: case NOTMUCH_STATUS_OUT_OF_MEMORY: fprintf (stderr, "Error: %s. Halting processing.\n", @@ -420,7 +421,8 @@ notmuch_new_command (void *ctx, add_files_state.ignore_read_only_directories = FALSE; add_files_state.total_files = count; } else { - notmuch = notmuch_database_open (db_path); + notmuch = notmuch_database_open (db_path, + NOTMUCH_DATABASE_MODE_READONLY); add_files_state.ignore_read_only_directories = TRUE; add_files_state.total_files = 0; } diff --git a/notmuch-reply.c b/notmuch-reply.c index c6122aa..291cd02 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -223,7 +223,8 @@ notmuch_reply_command (void *ctx, int argc, char *argv[]) return 1; } - notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + notmuch = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READONLY); if (notmuch == NULL) return 1; diff --git a/notmuch-restore.c b/notmuch-restore.c index b8f99a3..001f3fc 100644 --- a/notmuch-restore.c +++ b/notmuch-restore.c @@ -36,7 +36,8 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[]) if (config == NULL) return 1; - notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + notmuch = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_WRITABLE); if (notmuch == NULL) return 1; diff --git a/notmuch-search.c b/notmuch-search.c index 2b1c0fe..cde9735 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -129,7 +129,8 @@ notmuch_search_command (void *ctx, int argc, char *argv[]) if (config == NULL) return 1; - notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + notmuch = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READONLY); if (notmuch == NULL) return 1; diff --git a/notmuch-show.c b/notmuch-show.c index a21d223..a764e44 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -220,7 +220,8 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) return 1; } - notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + notmuch = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READONLY); if (notmuch == NULL) return 1; diff --git a/notmuch-tag.c b/notmuch-tag.c index 12ab86c..75d464f 100644 --- a/notmuch-tag.c +++ b/notmuch-tag.c @@ -94,7 +94,8 @@ notmuch_tag_command (void *ctx, unused (int argc), unused (char *argv[])) if (config == NULL) return 1; - notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + notmuch = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_WRITABLE); if (notmuch == NULL) return 1; -- 1.6.5.3 From keithp@keithp.com Sat Nov 21 11:59:17 2009 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 0B9E0431FC2 for ; Sat, 21 Nov 2009 11:59:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 YFwVhgBzhxjs for ; Sat, 21 Nov 2009 11:59:16 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 0CE6C431FBF for ; Sat, 21 Nov 2009 11:59:16 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 39C9576012C for ; Sat, 21 Nov 2009 11:59:15 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xyQakEznsSqE; Sat, 21 Nov 2009 11:59:12 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 0E13C76012B; Sat, 21 Nov 2009 11:59:12 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 095B876012A; Sat, 21 Nov 2009 11:59:12 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id AA2051581B7; Sat, 21 Nov 2009 11:59:11 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 11:59:00 -0800 Message-Id: <1258833540-32299-1-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1258787708-21121-3-git-send-email-keithp@keithp.com> References: <1258787708-21121-3-git-send-email-keithp@keithp.com> Subject: [notmuch] [PATCH] Add notmuch-folder mode to provide an overview of search matches X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 19:59:17 -0000 Folder mode takes a (user-configurable) list of search patterns and produces a list of those patterns and the count of messages that they match. When an entry in this list is selected, a search window with the defined search is opened. The set of folders is defined as a list, each element contains the name of the folder and the query string to count. Signed-off-by: Keith Packard --- notmuch.el | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 81 insertions(+), 0 deletions(-) diff --git a/notmuch.el b/notmuch.el index 4f369de..7cab3c1 100644 --- a/notmuch.el +++ b/notmuch.el @@ -1046,4 +1046,85 @@ current search results AND that are tagged with the given tag." (setq mail-user-agent 'message-user-agent) +(defvar notmuch-folder-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "n" 'next-line) + (define-key map "p" 'previous-line) + (define-key map "x" 'kill-this-buffer) + (define-key map "q" 'kill-this-buffer) + (define-key map "s" 'notmuch-search) + (define-key map (kbd "RET") 'notmuch-folder-show-search) + (define-key map "<" 'beginning-of-buffer) + (define-key map "=" 'notmuch-folder) + (define-key map "?" 'describe-mode) + (define-key map [mouse-1] 'notmuch-folder-show-search) + map) + "Keymap for \"notmuch folder\" buffers.") + +(fset 'notmuch-folder-mode-map notmuch-folder-mode-map) + +(defcustom notmuch-folders (quote (("inbox" . "tag:inbox") ("unread" . "tag:unread"))) + "List of searches for the notmuch folder view" + :type '(alist :key-type (string) :value-type (string)) + :group 'notmuch) + +(defun notmuch-folder-mode () + "Major mode for showing notmuch 'folders'. + +This buffer contains a list of messages counts returned by a +customizable set of searches of your email archives. Each line +in the buffer shows the search terms and the resulting message count. + +Pressing RET on any line opens a search window containing the +results for the search terms in that line. + +\\{notmuch-folder-mode-map}" + (interactive) + (kill-all-local-variables) + (use-local-map 'notmuch-folder-mode-map) + (setq truncate-lines t) + (hl-line-mode 1) + (setq major-mode 'notmuch-folder-mode + mode-name "notmuch-folder") + (setq buffer-read-only t)) + +(defun notmuch-folder-add (folders) + (if folders + (let ((name (car (car folders))) + (inhibit-read-only t) + (search (cdr (car folders)))) + (insert name) + (indent-to 16 1) + (call-process notmuch-command nil t nil "count" search) + (notmuch-folder-add (cdr folders))))) + +(defun notmuch-folder-find-name () + (save-excursion + (beginning-of-line) + (let ((beg (point))) + (forward-word) + (filter-buffer-substring beg (point))))) + +(defun notmuch-folder-show-search (&optional folder) + "Show a search window for the search related to the specified folder." + (interactive) + (if (null folder) + (setq folder (notmuch-folder-find-name))) + (let ((search (assoc folder notmuch-folders))) + (if search + (notmuch-search (cdr search) t)))) + +(defun notmuch-folder () + "Show the notmuch folder view and update the displayed counts." + (interactive) + (let ((buffer (get-buffer-create "*notmuch-folders*"))) + (switch-to-buffer buffer) + (let ((inhibit-read-only t) + (n (line-number-at-pos))) + (erase-buffer) + (notmuch-folder-mode) + (notmuch-folder-add notmuch-folders) + (goto-char (point-min)) + (goto-line n)))) + (provide 'notmuch) -- 1.6.5.2 From cworth@cworth.org Sat Nov 21 12:01:33 2009 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 2C8F4431FC2; Sat, 21 Nov 2009 12:01:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Q23isl6Uuqdi; Sat, 21 Nov 2009 12:01:32 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E1BAF431FBF; Sat, 21 Nov 2009 12:01:31 -0800 (PST) From: Carl Worth To: Jed Brown , notmuch@notmuchmail.org In-Reply-To: <87fx87u3no.fsf@59A2.org> References: <87fx87u3no.fsf@59A2.org> Date: Sat, 21 Nov 2009 21:01:20 +0100 Message-ID: <874oon4pgv.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Asynchronous tagging X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 20:01:33 -0000 On Sat, 21 Nov 2009 19:35:39 +0100, Jed Brown wrote: > I'm really enjoying notmuch, thanks! I have a minor issue and a couple > observations worth noting. Thanks, Jed! And welcome to notmuch. > 1. Changing tags (like removing inbox/unread) has really high latency. Yes, this is a known bug in Xapian (it rewrites all of the indexed terms for the email message even though you're just trying to add/remove one term). The Xapian ticket for this is here: replace_document should make minimal changes to database file http://trac.xapian.org/ticket/250 I've looked at the code, and it looks like it's going to be easy to fix. If anyone wants to try, here's the file to change: xapian-core/backends/flint/flint_database.cc And look for: // FIXME - in the case where there is overlap between the new // termlist and the old termlist, it would be better to compare the // two lists, and make the minimum set of modifications required. // This would lead to smaller changesets for replication, and // probably be faster overall So I think this might be as easy as just walking over two sorted lists looking for differences. Note that this is in the currently default "flint" backend, but the Xapian folks are probably more interested in fixing the in-development "chert" backend. So the patch to get upstreamed there will probably also fix: xapian-core/backends/chert/chert_database.cc (I'm hoping the fix will be the same---an identical comment exists there.) Also, if you want to experiment with the chert backend, compile current Xapian source and run notmuch with XAPIAN_PREFER_CHERT=1. I haven't tried that yet, but there are claims that a chert database can be 40% smaller than an equivalent flint database. > 2. I have 'notmuch new' in an offlineimap postsync hook, but > notmuch-search-refresh-view occasionally complains that another process > has the lock (since I might press '=' when 'notmuch new' is running). > Waiting a moment and trying again works fine, but it would be nice to > clean this up eventually. Chris Wilson just contributed a patch to enable read-only usage of notmuch while another notmuch process holds the write lock. This should be very nice, (and means that new users will be able to start playing with notmuch even while the initial index creation is happening). > 3. I had initially put 'notmuch new' in a cron job (instead of > offlineimap postsync hook) and new/search would sometimes complain about > missing files in the maildir. The first time this happened, it did not > correct itself and I ended up reimporting the database (I had moved some > things around so I could have been at fault). Since then I have seen > these errors on a couple occasions, but they always go away upon > rerunning 'notmuch new'. My guess is that it has to do with offlineimap > changing flags so I moved 'notmuch new' to the postsync hook and have > not seen the errors since. If it is important that notmuch never runs > concurrently with an offlineimap sync, it should eventually go in the > docs. Thanks for the pointer. Does offlineimap use tmp while it's delivering message and then move things to new? If so, then maybe all we need to do to fix notmuch to not look into tmp directories? -Carl From keithp@keithp.com Sat Nov 21 12:06:48 2009 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 51E6C431FBF for ; Sat, 21 Nov 2009 12:06:48 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 UkbbgUsYaygJ for ; Sat, 21 Nov 2009 12:06:47 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id B4CAF431FAE for ; Sat, 21 Nov 2009 12:06:47 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 267D976012A; Sat, 21 Nov 2009 12:06:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id wZ9K6kmv55Rc; Sat, 21 Nov 2009 12:06:44 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 700DF76012B; Sat, 21 Nov 2009 12:06:44 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 6221076012A; Sat, 21 Nov 2009 12:06:44 -0800 (PST) From: Keith Packard To: Chris Wilson , notmuch@notmuchmail.org In-Reply-To: <1258833265-17012-1-git-send-email-chris@chris-wilson.co.uk> References: <1258833265-17012-1-git-send-email-chris@chris-wilson.co.uk> Date: Sat, 21 Nov 2009 12:06:43 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] Permit opening the notmuch database in read-only mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 20:06:48 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Sat, 21 Nov 2009 19:54:25 +0000, Chris Wilson = wrote: > +typedef enum { > + NOTMUCH_DATABASE_MODE_READONLY =3D 0, > + NOTMUCH_DATABASE_MODE_WRITABLE > +} notmuch_database_mode_t; Wondering if MODE_READWRITE would be more descriptive? =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLCEhTQp8BWwlsTdMRAnecAKDblBPhY8xfCZFK1PWX40a0KLJ36QCgj7Op 2SbKTlJreyKiER2HL1Il9W4= =hHY5 -----END PGP SIGNATURE----- --=-=-=-- From chris@chris-wilson.co.uk Sat Nov 21 12:08:37 2009 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 21584431FBF for ; Sat, 21 Nov 2009 12:08:37 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 VQzzlMdMW8IG for ; Sat, 21 Nov 2009 12:08:36 -0800 (PST) Received: from orsmga101.jf.intel.com (mga06.intel.com [134.134.136.21]) by olra.theworths.org (Postfix) with ESMTP id A64A0431FAE for ; Sat, 21 Nov 2009 12:08:35 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 21 Nov 2009 12:08:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,264,1257148800"; d="scan'208";a="469402951" Received: from unknown (HELO localhost.localdomain) ([10.255.16.192]) by orsmga002.jf.intel.com with ESMTP; 21 Nov 2009 12:25:37 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 20:08:31 +0000 Message-Id: <1258834111-18285-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] Permit opening the notmuch database in read-only mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 20:08:37 -0000 We only rarely need to actually open the database for writing, but we always create a Xapian::WritableDatabase. This has the effect of preventing searches and like whilst updating the index. Signed-off-by: Chris Wilson Acked-by: Carl Worth [ickle: Updated to add WRITABLE mode to notmuch-new] --- lib/database-private.h | 3 ++- lib/database.cc | 31 ++++++++++++++++++++++++------- lib/message.cc | 15 +++++++++++++-- lib/notmuch-private.h | 1 + lib/notmuch.h | 13 +++++++++++-- notmuch-dump.c | 3 ++- notmuch-new.c | 4 +++- notmuch-reply.c | 3 ++- notmuch-restore.c | 3 ++- notmuch-search.c | 3 ++- notmuch-show.c | 3 ++- notmuch-tag.c | 3 ++- 12 files changed, 66 insertions(+), 19 deletions(-) diff --git a/lib/database-private.h b/lib/database-private.h index 76e26ce..79c7916 100644 --- a/lib/database-private.h +++ b/lib/database-private.h @@ -27,7 +27,8 @@ struct _notmuch_database { char *path; - Xapian::WritableDatabase *xapian_db; + notmuch_database_mode_t mode; + Xapian::Database *xapian_db; Xapian::QueryParser *query_parser; Xapian::TermGenerator *term_gen; }; diff --git a/lib/database.cc b/lib/database.cc index 207246c..fb38664 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -172,6 +172,8 @@ notmuch_status_to_string (notmuch_status_t status) return "No error occurred"; case NOTMUCH_STATUS_OUT_OF_MEMORY: return "Out of memory"; + case NOTMUCH_STATUS_READONLY_DATABASE: + return "The database is read-only"; case NOTMUCH_STATUS_XAPIAN_EXCEPTION: return "A Xapian exception occurred"; case NOTMUCH_STATUS_FILE_ERROR: @@ -438,7 +440,8 @@ notmuch_database_create (const char *path) goto DONE; } - notmuch = notmuch_database_open (path); + notmuch = notmuch_database_open (path, + NOTMUCH_DATABASE_MODE_WRITABLE); DONE: if (notmuch_path) @@ -448,7 +451,8 @@ notmuch_database_create (const char *path) } notmuch_database_t * -notmuch_database_open (const char *path) +notmuch_database_open (const char *path, + notmuch_database_mode_t mode) { notmuch_database_t *notmuch = NULL; char *notmuch_path = NULL, *xapian_path = NULL; @@ -481,9 +485,14 @@ notmuch_database_open (const char *path) if (notmuch->path[strlen (notmuch->path) - 1] == '/') notmuch->path[strlen (notmuch->path) - 1] = '\0'; + notmuch->mode = mode; try { - notmuch->xapian_db = new Xapian::WritableDatabase (xapian_path, - Xapian::DB_CREATE_OR_OPEN); + if (mode == NOTMUCH_DATABASE_MODE_WRITABLE) { + notmuch->xapian_db = new Xapian::WritableDatabase (xapian_path, + Xapian::DB_CREATE_OR_OPEN); + } else { + notmuch->xapian_db = new Xapian::Database (xapian_path); + } notmuch->query_parser = new Xapian::QueryParser; notmuch->term_gen = new Xapian::TermGenerator; notmuch->term_gen->set_stemmer (Xapian::Stem ("english")); @@ -521,7 +530,8 @@ notmuch_database_open (const char *path) void notmuch_database_close (notmuch_database_t *notmuch) { - notmuch->xapian_db->flush (); + if (notmuch->mode == NOTMUCH_DATABASE_MODE_WRITABLE) + (static_cast (notmuch->xapian_db))->flush (); delete notmuch->term_gen; delete notmuch->query_parser; @@ -567,11 +577,18 @@ notmuch_database_set_timestamp (notmuch_database_t *notmuch, const char *key, time_t timestamp) { Xapian::Document doc; + Xapian::WritableDatabase *db; unsigned int doc_id; notmuch_private_status_t status; notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS; char *db_key = NULL; + if (notmuch->mode == NOTMUCH_DATABASE_MODE_READONLY) { + fprintf (stderr, "Attempted to update a read-only database.\n"); + return NOTMUCH_STATUS_READONLY_DATABASE; + } + + db = static_cast (notmuch->xapian_db); db_key = timestamp_db_key (key); try { @@ -586,9 +603,9 @@ notmuch_database_set_timestamp (notmuch_database_t *notmuch, doc.add_term (term); talloc_free (term); - notmuch->xapian_db->add_document (doc); + db->add_document (doc); } else { - notmuch->xapian_db->replace_document (doc_id, doc); + db->replace_document (doc_id, doc); } } catch (Xapian::Error &error) { diff --git a/lib/message.cc b/lib/message.cc index e0b8a8e..7ba06c9 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -168,9 +168,15 @@ _notmuch_message_create_for_message_id (notmuch_database_t *notmuch, { notmuch_message_t *message; Xapian::Document doc; + Xapian::WritableDatabase *db; unsigned int doc_id; char *term; + if (notmuch->mode == NOTMUCH_DATABASE_MODE_READONLY) { + *status_ret = NOTMUCH_PRIVATE_STATUS_READONLY_DATABASE; + return NULL; + } + *status_ret = NOTMUCH_PRIVATE_STATUS_SUCCESS; message = notmuch_database_find_message (notmuch, message_id); @@ -184,13 +190,14 @@ _notmuch_message_create_for_message_id (notmuch_database_t *notmuch, return NULL; } + db = static_cast (notmuch->xapian_db); try { doc.add_term (term); talloc_free (term); doc.add_value (NOTMUCH_VALUE_MESSAGE_ID, message_id); - doc_id = notmuch->xapian_db->add_document (doc); + doc_id = db->add_document (doc); } catch (const Xapian::Error &error) { *status_ret = NOTMUCH_PRIVATE_STATUS_XAPIAN_EXCEPTION; return NULL; @@ -543,8 +550,12 @@ _notmuch_message_ensure_thread_id (notmuch_message_t *message) void _notmuch_message_sync (notmuch_message_t *message) { - Xapian::WritableDatabase *db = message->notmuch->xapian_db; + Xapian::WritableDatabase *db; + + if (message->notmuch->mode == NOTMUCH_DATABASE_MODE_READONLY) + return; + db = static_cast (message->notmuch->xapian_db); db->replace_document (message->doc_id, message->doc); } diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index 1583498..2b4bf31 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -110,6 +110,7 @@ typedef enum _notmuch_private_status { /* First, copy all the public status values. */ NOTMUCH_PRIVATE_STATUS_SUCCESS = NOTMUCH_STATUS_SUCCESS, NOTMUCH_PRIVATE_STATUS_OUT_OF_MEMORY = NOTMUCH_STATUS_OUT_OF_MEMORY, + NOTMUCH_PRIVATE_STATUS_READONLY_DATABASE = NOTMUCH_STATUS_READONLY_DATABASE, NOTMUCH_PRIVATE_STATUS_XAPIAN_EXCEPTION = NOTMUCH_STATUS_XAPIAN_EXCEPTION, NOTMUCH_PRIVATE_STATUS_FILE_NOT_EMAIL = NOTMUCH_STATUS_FILE_NOT_EMAIL, NOTMUCH_PRIVATE_STATUS_NULL_POINTER = NOTMUCH_STATUS_NULL_POINTER, diff --git a/lib/notmuch.h b/lib/notmuch.h index cc713a3..89ed7ad 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -86,6 +86,7 @@ typedef int notmuch_bool_t; typedef enum _notmuch_status { NOTMUCH_STATUS_SUCCESS = 0, NOTMUCH_STATUS_OUT_OF_MEMORY, + NOTMUCH_STATUS_READONLY_DATABASE, NOTMUCH_STATUS_XAPIAN_EXCEPTION, NOTMUCH_STATUS_FILE_ERROR, NOTMUCH_STATUS_FILE_NOT_EMAIL, @@ -139,11 +140,18 @@ notmuch_database_create (const char *path); /* XXX: I think I'd like this to take an extra argument of * notmuch_status_t* for returning a status value on failure. */ +typedef enum { + NOTMUCH_DATABASE_MODE_READONLY = 0, + NOTMUCH_DATABASE_MODE_WRITABLE +} notmuch_database_mode_t; + /* Open an existing notmuch database located at 'path'. * * The database should have been created at some time in the past, * (not necessarily by this process), by calling - * notmuch_database_create with 'path'. + * notmuch_database_create with 'path'. By default the database should be + * opened for reading only. In order to write to the database you need to + * pass the NOTMUCH_DATABASE_MODE_WRITABLE mode. * * An existing notmuch database can be identified by the presence of a * directory named ".notmuch" below 'path'. @@ -155,7 +163,8 @@ notmuch_database_create (const char *path); * an error message on stderr). */ notmuch_database_t * -notmuch_database_open (const char *path); +notmuch_database_open (const char *path, + notmuch_database_mode_t mode); /* Close the given notmuch database, freeing all associated * resources. See notmuch_database_open. */ diff --git a/notmuch-dump.c b/notmuch-dump.c index 4c6e321..86570d0 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -35,7 +35,8 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[]) if (config == NULL) return 1; - notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + notmuch = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READONLY); if (notmuch == NULL) return 1; diff --git a/notmuch-new.c b/notmuch-new.c index 6264628..dded885 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -195,6 +195,7 @@ add_files_recursive (notmuch_database_t *notmuch, next); break; /* Fatal issues. Don't process anymore. */ + case NOTMUCH_STATUS_READONLY_DATABASE: case NOTMUCH_STATUS_XAPIAN_EXCEPTION: case NOTMUCH_STATUS_OUT_OF_MEMORY: fprintf (stderr, "Error: %s. Halting processing.\n", @@ -420,7 +421,8 @@ notmuch_new_command (void *ctx, add_files_state.ignore_read_only_directories = FALSE; add_files_state.total_files = count; } else { - notmuch = notmuch_database_open (db_path); + notmuch = notmuch_database_open (db_path, + NOTMUCH_DATABASE_MODE_WRITABLE); add_files_state.ignore_read_only_directories = TRUE; add_files_state.total_files = 0; } diff --git a/notmuch-reply.c b/notmuch-reply.c index c6122aa..291cd02 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -223,7 +223,8 @@ notmuch_reply_command (void *ctx, int argc, char *argv[]) return 1; } - notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + notmuch = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READONLY); if (notmuch == NULL) return 1; diff --git a/notmuch-restore.c b/notmuch-restore.c index b8f99a3..001f3fc 100644 --- a/notmuch-restore.c +++ b/notmuch-restore.c @@ -36,7 +36,8 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[]) if (config == NULL) return 1; - notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + notmuch = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_WRITABLE); if (notmuch == NULL) return 1; diff --git a/notmuch-search.c b/notmuch-search.c index 2b1c0fe..cde9735 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -129,7 +129,8 @@ notmuch_search_command (void *ctx, int argc, char *argv[]) if (config == NULL) return 1; - notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + notmuch = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READONLY); if (notmuch == NULL) return 1; diff --git a/notmuch-show.c b/notmuch-show.c index a21d223..a764e44 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -220,7 +220,8 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) return 1; } - notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + notmuch = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READONLY); if (notmuch == NULL) return 1; diff --git a/notmuch-tag.c b/notmuch-tag.c index 12ab86c..75d464f 100644 --- a/notmuch-tag.c +++ b/notmuch-tag.c @@ -94,7 +94,8 @@ notmuch_tag_command (void *ctx, unused (int argc), unused (char *argv[])) if (config == NULL) return 1; - notmuch = notmuch_database_open (notmuch_config_get_database_path (config)); + notmuch = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_WRITABLE); if (notmuch == NULL) return 1; -- 1.6.5.3 From cworth@cworth.org Sat Nov 21 12:14:35 2009 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 25913431FBF; Sat, 21 Nov 2009 12:14:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 m-GdRYeoEi2O; Sat, 21 Nov 2009 12:14:34 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D344A431FAE; Sat, 21 Nov 2009 12:14:33 -0800 (PST) From: Carl Worth To: Bart Trojanowski , notmuch@notmuchmail.org In-Reply-To: <20091121183909.GG24944@jukie.net> References: <20091121183909.GG24944@jukie.net> Date: Sat, 21 Nov 2009 21:14:22 +0100 Message-ID: <873a474ov5.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] notmuch vim support X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 20:14:35 -0000 On Sat, 21 Nov 2009 13:39:09 -0500, Bart Trojanowski wrote: > I've spent a few days on porting notmuch.el to vim. It's not as feature > rich as notmuch.el yet, but it's coming along nicely. The results of my > work are here: Oh, hey! That's fantastic. I didn't expect to see a second notmuch interface so soon. > There are some screenshots in my blog: > > http://www.jukie.net/~bart/blog/notmuch.vim It looks nice. I'm watching Chris Wilson play with it now, (in spite of the fact that Chris sent patches already---he wasn't actually using notmuch until he saw this vim interface appear). I'm actually surprised as to how faithfully it replicates the notmuch.el experience. And some of that includes misfeatures that I just hadn't figured out how to do better, (like the global toggling of signature visibility). So, well done! I think the only thing we noticed is that "filter" doesn't add the "and" between the old and new search terms. But Chris may have more to comment soon. > I'd love for this to be included in the official project, but I am not > sure if you'd prefer to merge at this point or wait will I am done. > Naturally, if anyone is interested I'd love some help. Let's definitely merge it into the repository. As things are changing quickly now, it will be nice to be able to update both interfaces in concert. (Like with my patch that changes --max-threads to --max, etc.) I don't know how realistic it will be to keep both interfaces totally synchronized in terms of look-and-feel, colors, keybindings, etc. But it might be nice to do that as much as possible. I think it would be helpful if we could have interface discussions as an entire community and not split based on choice of editor. -Carl From cworth@cworth.org Sat Nov 21 12:20:23 2009 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 0EEE5431FBF; Sat, 21 Nov 2009 12:20:23 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 xlodDKlbAf7p; Sat, 21 Nov 2009 12:20:22 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 1DB70431FAE; Sat, 21 Nov 2009 12:20:21 -0800 (PST) From: Carl Worth To: Bart Trojanowski , Stefan Schmidt In-Reply-To: <20091121191402.GA17268@jukie.net> References: <20091121183909.GG24944@jukie.net> <20091121190606.GA24602@excalibur.local> <20091121191402.GA17268@jukie.net> Date: Sat, 21 Nov 2009 21:20:10 +0100 Message-ID: <871vjr4olh.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] notmuch vim support X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 20:20:23 -0000 On Sat, 21 Nov 2009 14:14:02 -0500, Bart Trojanowski wrote: > Perfect. How would you like to proceed with the initial integration? > Pulling my tree, or me squashing all the changes into a single patch? > Also, are you OK with where the files live (ie under a vim directory). I'm glad to pull (it will be nice for you to have the accurate history). And a vim directory sounds perfect. Or should we do interfaces/emacs and interfaces/vim ? I don't know. > After that, do you want me to submit patches by email, via pull > requests, or giving me push access to a branch at your repo? Email or pull requests are fine. You're clearly the "owner" of the vim stuff, so don't expect any refusals to pull from me. (And feel free to ping me out of band if you don't want to clutter the list with pull requests---but it's more likely that you'll want to let people on the list know about changes anyway.) > BTW, have you considered using github or gitorious so branch management > becomes a distributed problem? I don't see any advantage to have the main notmuch repository there. We've already got a server with a nice name. The nice thing about git, of course, is that branches and repositories can be distributed arbitrarily and there's no problem. -Carl From cworth@cworth.org Sat Nov 21 12:28:35 2009 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 0348C431FBF; Sat, 21 Nov 2009 12:28:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 qFRAjQpWzUD1; Sat, 21 Nov 2009 12:28:34 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 239B1431FAE; Sat, 21 Nov 2009 12:28:33 -0800 (PST) From: Carl Worth To: "Aneesh Kumar K.V" , notmuch In-Reply-To: <87bpiv4t9h.fsf@yoom.home.cworth.org> References: <87fx8bygi7.fsf@linux.vnet.ibm.com> <87bpiv4t9h.fsf@yoom.home.cworth.org> Date: Sat, 21 Nov 2009 21:28:22 +0100 Message-ID: <87y6lz39nd.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] notmuch: Add Maildir directory name as tag name for messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 20:28:35 -0000 On Sat, 21 Nov 2009 19:39:22 +0100, Carl Worth wrote: > On Wed, 18 Nov 2009 21:25:28 +0530, aneesh.kumar@linux.vnet.ibm.com (Aneesh Kumar K.V) wrote: > A fantastic patch, Aneesh! I think this will be handy for a lot of > people importing mail from all kinds of systems. This is pushed now. And sadly, I just pulled it out again. I realized that I actually don't want my mail tagged based on the maildir directories I'm using, (they are arbitrarily-named directories used only to keep the per-directory number of files below about 10 thousand). So we'll probably need to make this an opt-in feature from the configuration file. -Carl From chris@chris-wilson.co.uk Sat Nov 21 12:32:34 2009 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 B817B431FBC for ; Sat, 21 Nov 2009 12:32:34 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 WpoVsXZXfjAQ for ; Sat, 21 Nov 2009 12:32:32 -0800 (PST) Received: from orsmga101.jf.intel.com (mga06.intel.com [134.134.136.21]) by olra.theworths.org (Postfix) with ESMTP id 7007E431FAE for ; Sat, 21 Nov 2009 12:32:32 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 21 Nov 2009 12:32:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,264,1257148800"; d="scan'208";a="469406063" Received: from unknown (HELO localhost.localdomain) ([10.255.16.192]) by orsmga002.jf.intel.com with ESMTP; 21 Nov 2009 12:49:33 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 20:32:20 +0000 Message-Id: <1258835540-21094-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <87my2fpty1.fsf@vertex.dottedmag> References: <87my2fpty1.fsf@vertex.dottedmag> Subject: [notmuch] [PATCH] Makefile: Magic silent rules. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 20:32:34 -0000 Use the facilities of GNU make to create a magic function that will on the first invocation print a description of how to enable verbose compile lines and then print the quiet rule. Signed-off-by: Chris Wilson Signed-off-by: Carl Worth Cc: Mikhail Gusarov [ickle: Rebased, and duplicate command string eliminated.] [ickle: Fixed verbose bug pointed out by Mikhail] --- Makefile | 23 ++++++++++++++++++++--- Makefile.local | 4 ++-- lib/Makefile.local | 2 +- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 3fedcf1..5d8f321 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,10 @@ WARN_FLAGS=-Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum CFLAGS=-O2 +# Additional programs that are used during the compilation process. +EMACS ?= emacs +GZIP ?= gzip + # Additional flags that we will append to whatever the user set. # These aren't intended for the user to manipulate. extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc) @@ -31,14 +35,27 @@ include lib/Makefile.local # And get user settings from the output of configure include Makefile.config +# The user has not set any verbosity, default to quiet mode and inform the +# user how to enable verbose compiles. +ifeq ($(V),) +quiet_DOC := "Use \"$(MAKE) V=1\" to see the verbose compile lines.\n" +quiet = @echo $(quiet_DOC)$(eval quiet_DOC:=)" $1 $@"; $($1) +endif +# The user has explicitly enabled quiet compilation. +ifeq ($(V),0) +quiet = @echo " $1 $@"; $($1) +endif +# Otherwise, print the full command line. +quiet ?= $($1) + %.o: %.cc $(all_deps) - $(CXX) -c $(CXXFLAGS) $< -o $@ + $(call quiet,CXX) -c $(CXXFLAGS) $< -o $@ %.o: %.c $(all_deps) - $(CC) -c $(CFLAGS) $< -o $@ + $(call quiet,CC) -c $(CFLAGS) $< -o $@ %.elc: %.el - emacs -batch -f batch-byte-compile $< + $(call quiet,EMACS) -batch -f batch-byte-compile $< .deps/%.d: %.c $(all_deps) @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ diff --git a/Makefile.local b/Makefile.local index 3c99624..5fd5d4f 100644 --- a/Makefile.local +++ b/Makefile.local @@ -20,10 +20,10 @@ notmuch_client_srcs = \ notmuch_client_modules = $(notmuch_client_srcs:.c=.o) notmuch: $(notmuch_client_modules) lib/notmuch.a - $(CXX) $^ $(LDFLAGS) -o $@ + $(call quiet,CXX) $^ $(LDFLAGS) -o $@ notmuch.1.gz: notmuch.1 - gzip --stdout notmuch.1 > notmuch.1.gz + $(call quiet,GZIP) --stdout $^ > $@ install: all notmuch.1.gz for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \ diff --git a/lib/Makefile.local b/lib/Makefile.local index 79f7b0b..a7562c9 100644 --- a/lib/Makefile.local +++ b/lib/Makefile.local @@ -18,7 +18,7 @@ libnotmuch_cxx_srcs = \ libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o) $(dir)/notmuch.a: $(libnotmuch_modules) - $(AR) rcs $@ $^ + $(call quiet,AR) rcs $@ $^ SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs) CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.a -- 1.6.5.3 From kha@treskal.com Sat Nov 21 12:43:14 2009 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 1C4D2431FBC for ; Sat, 21 Nov 2009 12:43:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 cpydlHEv2VQv for ; Sat, 21 Nov 2009 12:43:13 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.195]) by olra.theworths.org (Postfix) with ESMTP id 8FB19431FAE for ; Sat, 21 Nov 2009 12:43:13 -0800 (PST) Received: from mail1.space2u.com ([62.20.1.135]) by mx.perfora.net (node=mxus2) with ESMTP (Nemesis) id 0Mg4Vh-1NZEwv2YSL-00NKrf for notmuch@notmuchmail.org; Sat, 21 Nov 2009 15:43:13 -0500 Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) (authenticated bits=0) by mail1.space2u.com (8.14.3/8.14.3) with ESMTP id nALKgp8S019011 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NOT) for ; Sat, 21 Nov 2009 21:42:51 +0100 Received: by bwz24 with SMTP id 24so3123001bwz.30 for ; Sat, 21 Nov 2009 12:43:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.153.217 with SMTP id l25mr2733744bkw.108.1258836189283; Sat, 21 Nov 2009 12:43:09 -0800 (PST) In-Reply-To: <874oon4pgv.fsf@yoom.home.cworth.org> References: <87fx87u3no.fsf@59A2.org> <874oon4pgv.fsf@yoom.home.cworth.org> Date: Sat, 21 Nov 2009 21:43:09 +0100 Message-ID: From: Karl Wiberg To: Carl Worth Content-Type: text/plain; charset=UTF-8 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Asynchronous tagging X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 20:43:14 -0000 On Sat, Nov 21, 2009 at 9:01 PM, Carl Worth wrote: > Does offlineimap use tmp while it's delivering message and then move > things to new? If so, then maybe all we need to do to fix notmuch to not > look into tmp directories? That's probably the right thing to do regardless---IIRC, the tmp directory exists so that processes can put messages there while they are writing them, and then do an atomic rename to the new (or cur) directory. -- Karl Wiberg, kha@treskal.com subrabbit.wordpress.com www.treskal.com/kalle From cworth@cworth.org Sat Nov 21 12:47:14 2009 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 011AB431FBF; Sat, 21 Nov 2009 12:47:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 64GuWRHp4qKU; Sat, 21 Nov 2009 12:47:13 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 60AAD431FAE; Sat, 21 Nov 2009 12:47:12 -0800 (PST) From: Carl Worth To: Stefan Schmidt In-Reply-To: <20091121193606.GD24602@excalibur.local> References: <20091121145111.GB19397@excalibur.local> <87fx874xj5.fsf@yoom.home.cworth.org> <20091121193606.GD24602@excalibur.local> Date: Sat, 21 Nov 2009 21:47:00 +0100 Message-ID: <87vdh338sb.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 20:47:14 -0000 On Sat, 21 Nov 2009 20:36:06 +0100, Stefan Schmidt wrote: > Yup, I had the repo on my disk a week before Keith blogged about it. Just nice > that it was going crazy that fast and people start using it and contributing to > it. Yes, it's quite fun. > > Though, frankly, I think we need to fix "notmuch new" to do much better > > than 40 files/sec. > > As a sidenote. That one is on a notebook with a slow 5400 disk and crypt + lvm + > ext3 on top. Perhaps I should put some money back for an X25 SSD. ;) Sure. But I think we can still do a lot better even on your machine. :-) > I have to admit it took me some time. Something like below should help? Thanks so much! I committed this, (and then added a bit more documentation on top of it). > I think that's what I will try to get working here. Sounds the nearest solution > to my problem. That in combination with the just merged tags-based-on-folders > patch should make me a lot happier. :) Well, do note that I just reverted that patch too. :-/ So you might want to cherry-pick it back (or even add the configuration option that will let us push it back out again). -Carl From five9a2@gmail.com Sat Nov 21 12:47:53 2009 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 62660431FBF for ; Sat, 21 Nov 2009 12:47:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 LXxLelvsGZND for ; Sat, 21 Nov 2009 12:47:52 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 86A0E431FBC for ; Sat, 21 Nov 2009 12:47:52 -0800 (PST) Received: by bwz24 with SMTP id 24so3124506bwz.30 for ; Sat, 21 Nov 2009 12:47:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=yz3yH7DOik+tqMMyPFdFVvp3Vg42tNbSA5I2BGG3mA8=; b=XF17TNnrDPPxyFaHaOe2dKI9/IEhp+4wmAHBf/qrgsAbonTCi3k2E8ZFBz7WlE3NdA /mOeBHQo3NqOA5Zj3dTO8T+Wbe+fYM22Caj+gMc2FBTvk714+plcGFKJ5AxBlrovLib4 OUqItNf6ows2TaJvR7GwvstOwQZuqM4vZRXfg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=Nt59rmMbGM3/M05OTxowx2AdIIu35bSc4zBew3iFdjWtHdK1w8Q3sQp3kq22uX2U/x I3ssd1dSRHvLyv3g+AtOJQr421QN5Ua/8zOajQyGxkFxuEi67IvTv8NkGRJXTwtcfrq7 cl8bqQpm0uuT0nkugjyoS3j6tDGfVvhm8jVSE= Received: by 10.204.21.4 with SMTP id h4mr2957632bkb.58.1258836471490; Sat, 21 Nov 2009 12:47:51 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id p17sm3346921fka.5.2009.11.21.12.47.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Nov 2009 12:47:50 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Carl Worth , notmuch@notmuchmail.org In-Reply-To: <874oon4pgv.fsf@yoom.home.cworth.org> References: <87fx87u3no.fsf@59A2.org> <874oon4pgv.fsf@yoom.home.cworth.org> Date: Sat, 21 Nov 2009 21:48:19 +0100 Message-ID: <87d43btxik.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Asynchronous tagging X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 20:47:53 -0000 On Sat, 21 Nov 2009 21:01:20 +0100, Carl Worth wrote: > Yes, this is a known bug in Xapian (it rewrites all of the indexed terms > for the email message even though you're just trying to add/remove one > term). The Xapian ticket for this is here: > > replace_document should make minimal changes to database file > http://trac.xapian.org/ticket/250 This bug report is concerned that it could require an API change, it sounds like you think this is unnecessary. Thanks for the detailed explanation. > Chris Wilson just contributed a patch to enable read-only usage of > notmuch while another notmuch process holds the write lock. I'm running it. > Does offlineimap use tmp while it's delivering message and then move > things to new? If so, then maybe all we need to do to fix notmuch to not > look into tmp directories? Yes, that's how maildir is supposed to work. Deliver to tmp, hard link from new, then unlink in tmp. The client should never look in tmp. Should be very quick to fix in notmuch. Jed From jan@ryngle.com Sat Nov 21 12:50:13 2009 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 E057D431FBC for ; Sat, 21 Nov 2009 12:50:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 1n1IiYWADvub for ; Sat, 21 Nov 2009 12:50:12 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 27567431FAE for ; Sat, 21 Nov 2009 12:50:12 -0800 (PST) Received: by bwz24 with SMTP id 24so3125220bwz.30 for ; Sat, 21 Nov 2009 12:50:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.154.207 with SMTP id p15mr2626444bkw.202.1258836611016; Sat, 21 Nov 2009 12:50:11 -0800 (PST) In-Reply-To: <874oon4pgv.fsf@yoom.home.cworth.org> References: <87fx87u3no.fsf@59A2.org> <874oon4pgv.fsf@yoom.home.cworth.org> Date: Sat, 21 Nov 2009 21:50:10 +0100 Message-ID: From: Jan Janak To: Carl Worth Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Asynchronous tagging X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 20:50:14 -0000 On Sat, Nov 21, 2009 at 9:01 PM, Carl Worth wrote: >> 3. I had initially put 'notmuch new' in a cron job (instead of >> offlineimap postsync hook) and new/search would sometimes complain about >> missing files in the maildir. =C2=A0The first time this happened, it did= not >> correct itself and I ended up reimporting the database (I had moved some >> things around so I could have been at fault). =C2=A0Since then I have se= en >> these errors on a couple occasions, but they always go away upon >> rerunning 'notmuch new'. =C2=A0My guess is that it has to do with offlin= eimap >> changing flags so I moved 'notmuch new' to the postsync hook and have >> not seen the errors since. =C2=A0If it is important that notmuch never r= uns >> concurrently with an offlineimap sync, it should eventually go in the >> docs. > > Thanks for the pointer. > > Does offlineimap use tmp while it's delivering message and then move > things to new? If so, then maybe all we need to do to fix notmuch to not > look into tmp directories? Yes, it does. I think all delivery agents work this way, IIRC the reason why messages are first written in tmp and then moved to new is to make sure that clients do not see partially written messages. Maildir has been designed to be lock-less so this is needed. I get errors about missing files too. There are several reasons why that can happen: 1) A message is moved from one folder to another in other mail clients that work with the Maildir spool. 2) A client changes the flags on a message, for example, when you read a message or mark it as deleted. Maildir stores flags in filenames. 3) Message flags are updated on the IMAP server (for example when you mark a message as read in gmail). Offlineimap keeps message flags synchronized. If you mark a local message as read then the change is propagated to the IMAP server and vice versa. -- Jan From cworth@cworth.org Sat Nov 21 13:00:25 2009 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 CBD8E431FBC; Sat, 21 Nov 2009 13:00:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 v4UZiXA3QZG7; Sat, 21 Nov 2009 13:00:25 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D5FB2431FAE; Sat, 21 Nov 2009 13:00:24 -0800 (PST) From: Carl Worth To: Jed Brown , notmuch@notmuchmail.org In-Reply-To: <87einru0f9.fsf@59A2.org> References: <87fx87u3no.fsf@59A2.org> <87einru0f9.fsf@59A2.org> Date: Sat, 21 Nov 2009 22:00:13 +0100 Message-ID: <87tywn386a.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Asynchronous tagging X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 21:00:26 -0000 On Sat, 21 Nov 2009 20:45:30 +0100, Jed Brown wrote: > Actually, this popped up again. I have a workaround, but here's the > story if you are interested. Hmmm... we definitely want to fix this, so let's figure this out. > After changing a flag in Gmail and syncing with offlineimap, I get this > in my inbox > > Today 19:18 [1/2] (null) (null) (inbox unread) > > And when I try to open it, the buffer is full of stderr. > > Error opening /home/jed/.mail-archive/gmail-all/new/1258826583_1.20705.kunyang,U=174235,FMD5=844bb96d088d057aa1b32ac1fbc67b56:2,: No such file or directory Ah, OK. So you made a change on the Gmail side and that caused a file to be renamed locally. And yes, this currently makes notmuch very confused. That's a known issue that needs to be documented better. And even better needs to be fixed, (I just added a note for this to TODO). > Explicitly archiving the null message removes it from these queries so > the clutter is gone now, but it has to be done manually because the null > message doesn't match any search terms. Manually? All tag manipulation is done by search terms, so there's no other way to remove a tag. Or did you mean you removed the tag from within emacs? In that case, the search term used to find the message is the message id itself. (Try running "M-x visible-mode" from a notmuch-search view in emacs to see what those look like.) Meanwhile, just archiving the message won't make things perfect for you. The document in the database point to the broken file is still there. And it should still have all of its terms, so will likely show up if you do more searches. (The "(null)" stuff you're seeing isn't because the message is NULL---for example, notmuch was able to find the date, etc. It's just that notmuch couldn't find the subject and authors when it went to look for the file.) So if GMail+offlineimap continues to shuffle your files around, you're going to keep seeing more and more confusion like this buildup. So we really just need to teach notmuch how to handle an unstable file store in order to be able to use it in this kind of setup. -Carl From five9a2@gmail.com Sat Nov 21 13:04:24 2009 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 35935431FBF for ; Sat, 21 Nov 2009 13:04:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Zr-3sJTkPewz for ; Sat, 21 Nov 2009 13:04:23 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 56CFB431FAE for ; Sat, 21 Nov 2009 13:04:23 -0800 (PST) Received: by bwz24 with SMTP id 24so3129407bwz.30 for ; Sat, 21 Nov 2009 13:04:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=WjYB0Xp0T7F1loOjavGMFlDlb4u+n1yZHk5Kbj2iWEY=; b=cLGfvEWuueiubMavC07jxs09lV28wh6k2H7sYPJqoAYRBfdeecXo9HPrl2b2kPCMF/ 0gSSHB6cOdbRnnAD9eTKFR/OMtfh99tqs7iMmz0VJkzyBuSUEiuP6EuusKDbiJHLPiLj qhqLBLBEsgSFxa7UofjQ2LYafhRHzyK3u5ppo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=b+q7uGI21Ox09eghUQBAIypJgSjFBeOiHhQNbMNcLYsmzI8wgZ3ipd+lHo7sMzdlqF IoRUpA1Q9JOs8UzNq4bp/C1mTEAbPm7yfcMRmif5vvL9wwm3jpWM/YOMe2tagLnFlm7U MrgCy8PjygZKufKc1Y1/M2+VDl/5C2VVPvv8o= Received: by 10.204.10.7 with SMTP id n7mr3004956bkn.68.1258837462428; Sat, 21 Nov 2009 13:04:22 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id z10sm3365952fka.0.2009.11.21.13.04.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Nov 2009 13:04:21 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Jan Janak , Carl Worth In-Reply-To: References: <87fx87u3no.fsf@59A2.org> <874oon4pgv.fsf@yoom.home.cworth.org> Date: Sat, 21 Nov 2009 22:04:50 +0100 Message-ID: <87bpivtwr1.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Asynchronous tagging X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 21:04:24 -0000 On Sat, 21 Nov 2009 21:50:10 +0100, Jan Janak wrote: > I get errors about missing files too. There are several reasons why > that can happen: > > 1) A message is moved from one folder to another in other mail > clients that work with the Maildir spool. Not a problem in my case because I currently have everything in one big maildir (100k in one directory is a lot, but not too painful at 0.3s for ls and 2s to stat everything). > 2) A client changes the flags on a message, for example, when you > read a message or mark it as deleted. Maildir stores flags in > filenames. This seems like a problem. I'm not familiar with xapian, is it necessarily an expensive operation to correct these inconsistencies? Matching by thread id ought to be cheap. > 3) Message flags are updated on the IMAP server (for example when you > mark a message as read in gmail). Offlineimap keeps message flags > synchronized. If you mark a local message as read then the change is > propagated to the IMAP server and vice versa. Do you know if Offlineimap (or some similar tool) can be told not to bother keeping flags synchronized? Jed From jan@ryngle.com Sat Nov 21 13:07:16 2009 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 A4B78431FBF for ; Sat, 21 Nov 2009 13:07:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 1IZPDTBCVieZ for ; Sat, 21 Nov 2009 13:07:16 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id CE0EA431FAE for ; Sat, 21 Nov 2009 13:07:15 -0800 (PST) Received: by bwz24 with SMTP id 24so3130271bwz.30 for ; Sat, 21 Nov 2009 13:07:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.2.199 with SMTP id 7mr2887039bkk.160.1258837634942; Sat, 21 Nov 2009 13:07:14 -0800 (PST) In-Reply-To: <87lji2bmrb.fsf@yoom.home.cworth.org> References: <1258630481-5133-1-git-send-email-jan@ryngle.com> <1258630481-5133-2-git-send-email-jan@ryngle.com> <87lji2bmrb.fsf@yoom.home.cworth.org> Date: Sat, 21 Nov 2009 22:07:14 +0100 Message-ID: From: Jan Janak To: Carl Worth Content-Type: text/plain; charset=UTF-8 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 2/2] notmuch list: A new command to produce various lists. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 21:07:16 -0000 On Thu, Nov 19, 2009 at 3:41 PM, Carl Worth wrote: > On Thu, 19 Nov 2009 12:52:49 +0100, Jan Janak wrote: >> I implemented a new notmuch command that can be used to list all tags >> present in the database: > > Ah, very very interesting! I'd been planning on doing something like > this soon. And I was just thinking of "notmuch tags" as the command > line. What other ideas do you have in mind for "notmuch list" ? > > One way we could possibly do "notmuch tags" is to have it accept search > terms and then return the list of all tags from the matched messages. > Then of course we'd need a syntax for a search term to match all > messages, (which we want in any case). > >> The main reason why I implemented this is because I am also working on >> adding the tag completion feature to the Emacs mode. This is very >> useful if you have a large collection of tags--it can save you some >> typing and, perhaps more importantly, it minimizes the risk of having >> typos in tag names. I'll send a patch for that later too. > > That will be a very nice feature to have, yes. > > The other reason I've wanted this is have something like a "folder view" > that would show a list of tags and a number of messages with each tag, > (or a number of messages with that tag and the inbox tag). > > I know that Keith said he'd prefer to use a view like that as his > primary way of reading mail. > > Actual review of the patch later. Carl and others, My patch no longer works and I have been thinking about updating it to current HEAD. But before I do that, I wanted to check with you to see if you would prefer to use a different name for the command, here are some options: 1) notmuch tags 2) notmuch list tags 3) notmuch list-tag Any opinions? I also plan to add support for search-terms later so that we can produce tag lists for a set of messages, as you mentioned in one of your previous emails. A quick description for those who joined later: This command produces a list of all tags defined in the database. The emacs interface uses it to implement tag name completion. -- Jan From jan@ryngle.com Sat Nov 21 13:15:05 2009 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 B454C431FBC for ; Sat, 21 Nov 2009 13:15:05 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 JFc+BHAowWOO for ; Sat, 21 Nov 2009 13:15:04 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id BD69C431FAE for ; Sat, 21 Nov 2009 13:15:03 -0800 (PST) Received: by bwz24 with SMTP id 24so3132593bwz.30 for ; Sat, 21 Nov 2009 13:15:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.20.82 with SMTP id e18mr2896758bkb.168.1258838102986; Sat, 21 Nov 2009 13:15:02 -0800 (PST) In-Reply-To: <87bpivtwr1.fsf@59A2.org> References: <87fx87u3no.fsf@59A2.org> <874oon4pgv.fsf@yoom.home.cworth.org> <87bpivtwr1.fsf@59A2.org> Date: Sat, 21 Nov 2009 22:15:02 +0100 Message-ID: From: Jan Janak To: Jed Brown Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Asynchronous tagging X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 21:15:05 -0000 On Sat, Nov 21, 2009 at 10:04 PM, Jed Brown wrote: >> =C2=A03) Message flags are updated on the IMAP server (for example when = you >> mark a message as read in gmail). Offlineimap keeps message flags >> synchronized. =C2=A0If you mark a local message as read then the change = is >> propagated to the IMAP server and vice versa. > > Do you know if Offlineimap (or some similar tool) can be told not to > bother keeping flags synchronized? Try using the cmdline option -q, from offlineimap's help: -q Run only quick synchronizations. Ignore any flag updates on IMAP ser= vers. This kinda works, but even with this option I am still seeing missing files if I work with my inbox in gmail. AFAIK there is currently no easy way to prevent that. -- Jan From five9a2@gmail.com Sat Nov 21 13:17:09 2009 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 14E59431FAE for ; Sat, 21 Nov 2009 13:17:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 1qreFow0QL01 for ; Sat, 21 Nov 2009 13:17:07 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id E01ED431FBC for ; Sat, 21 Nov 2009 13:17:06 -0800 (PST) Received: by bwz24 with SMTP id 24so3133256bwz.30 for ; Sat, 21 Nov 2009 13:17:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=Yj/rxRlPV1Em55E7qy2CofH1nUWEY90XhNQRVOhddAw=; b=o8zmGlKmmCKQ0aqN173tZUAk2UyuYOnn6iTTPZxu/HGixn982wtc+y5Gr6Jw32XvDB 1rMnRyWBAaGPf0nwtPzHVzGNhQk4oX3HiT8YL/JhTSgIqLaeqGRTAEv4IUY5Q2i6DDAu 3ezeXDyAAKaWtXHGaTKf/I4bf66rMoN0Ta1IE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=cVfpFteZfHjkpDE1QDNJc6F7+dazVvT9pi2snrYIL2lwS+RTQpxmuIrl03RJBQDOyJ ZAtvWyuGOcz8d15cnsqIzHiQgTFdznlz2dugtVourfL/Da9y5hfIrphuiIs42/eyCeKv LiYB3ywXMvOhoXkWUKqget7uCjw27G373dxG8= Received: by 10.204.34.70 with SMTP id k6mr2898538bkd.178.1258838225984; Sat, 21 Nov 2009 13:17:05 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 26sm3390189fks.50.2009.11.21.13.17.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Nov 2009 13:17:04 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Carl Worth , notmuch@notmuchmail.org In-Reply-To: <87tywn386a.fsf@yoom.home.cworth.org> References: <87fx87u3no.fsf@59A2.org> <87einru0f9.fsf@59A2.org> <87tywn386a.fsf@yoom.home.cworth.org> Date: Sat, 21 Nov 2009 22:17:34 +0100 Message-ID: <87aayftw5t.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Asynchronous tagging X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 21:17:09 -0000 On Sat, 21 Nov 2009 22:00:13 +0100, Carl Worth wrote: > Ah, OK. So you made a change on the Gmail side and that caused a file to > be renamed locally. yes > Or did you mean you removed the tag from within emacs? In that case, the > search term used to find the message is the message id itself. (Try > running "M-x visible-mode" from a notmuch-search view in emacs to see > what those look like.) Exactly, that's what I meant by manually. Those messages don't match a nice generic pattern. > Meanwhile, just archiving the message won't make things perfect for > you. The document in the database point to the broken file is still > there. And it should still have all of its terms, so will likely show up > if you do more searches. (The "(null)" stuff you're seeing isn't because > the message is NULL---for example, notmuch was able to find the date, > etc. It's just that notmuch couldn't find the subject and authors when > it went to look for the file.) Yeah. > So if GMail+offlineimap continues to shuffle your files around, you're > going to keep seeing more and more confusion like this buildup. > > So we really just need to teach notmuch how to handle an unstable file > store in order to be able to use it in this kind of setup. This seems unavoidable with maildir in the presence of any synchronization, or use of a different client. An ugly, but possible solution would be to mirror the entire maildir via hard links with whatever naming scheme you like. You then have a stable link to the file and can resolve changing names in the real maildir. This eats up a lot of inodes. Jed From cworth@cworth.org Sat Nov 21 13:26:21 2009 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 F333F431FBC; Sat, 21 Nov 2009 13:26:20 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 UXrhpQDgoUDv; Sat, 21 Nov 2009 13:26:20 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id AD935431FAE; Sat, 21 Nov 2009 13:26:19 -0800 (PST) From: Carl Worth To: Keith Packard , Chris Wilson , notmuch@notmuchmail.org In-Reply-To: References: <1258833265-17012-1-git-send-email-chris@chris-wilson.co.uk> Date: Sat, 21 Nov 2009 22:26:07 +0100 Message-ID: <87skc736z4.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Permit opening the notmuch database in read-only mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 21:26:21 -0000 On Sat, 21 Nov 2009 12:06:43 -0800, Keith Packard wrote: > On Sat, 21 Nov 2009 19:54:25 +0000, Chris Wilson wrote: > > > +typedef enum { > > + NOTMUCH_DATABASE_MODE_READONLY = 0, > > + NOTMUCH_DATABASE_MODE_WRITABLE > > +} notmuch_database_mode_t; > > Wondering if MODE_READWRITE would be more descriptive? I went with READ_ONLY and READ_WRITE and pushed this. Thanks, Chris! It's a nice feature. -Carl From five9a2@gmail.com Sat Nov 21 13:33:45 2009 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 59739431FBC for ; Sat, 21 Nov 2009 13:33:45 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ELXuuIOS-AO9 for ; Sat, 21 Nov 2009 13:33:44 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 999AC431FAE for ; Sat, 21 Nov 2009 13:33:44 -0800 (PST) Received: by bwz24 with SMTP id 24so3137936bwz.30 for ; Sat, 21 Nov 2009 13:33:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references:mime-version :content-type; bh=j2zfwyRiwCY4fbC8X1XfVFIK7V047vYBi4UjxhDtzfQ=; b=JEVQCaTWUJpsq+aPUxHWwDO3TYrRbEcvkMFFikiFXikUG4zMxycU7Ebq/no0lBKQN1 uV0YqFIs4DqY+FV0CGyoRQTutliTz9USnxE8InGnbchAvrDJieYJqmy0ICx4QeMmiR4H fdGLEhbW/apZOuQKOKT+L4kVTFF3yImT5phu8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:mime-version:content-type; b=qfhguoImpQ5J0NB2odrWkXPq9KoriommCaAtnC2zctdz+bHFH8RyxOxkt7fls1hmYe WUPUusyviekQBwRBynKQSQGQrVq8NxAo1LE9Z8A8XCIKpt2KeCyeo/cS8wflJv5o3Gol /7MaSi+0Cik8f6M+71q+j32hwXoK7j1mq9BRE= Received: by 10.204.24.69 with SMTP id u5mr2937331bkb.1.1258839223816; Sat, 21 Nov 2009 13:33:43 -0800 (PST) Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id e17sm3400560fke.23.2009.11.21.13.33.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Nov 2009 13:33:43 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 22:34:00 +0100 Message-Id: <1258839240-17032-1-git-send-email-jed@59A2.org> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <87skc736z4.fsf@yoom.home.cworth.org> References: <87skc736z4.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.5.3" Subject: [notmuch] [PATCH] _READ_Write -> _READ_WRITE X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 21:33:45 -0000 This is a multi-part message in MIME format. --------------1.6.5.3 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- lib/notmuch.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --------------1.6.5.3 Content-Type: text/x-patch; name="0001-_READ_Write-_READ_WRITE.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-_READ_Write-_READ_WRITE.patch" diff --git a/lib/notmuch.h b/lib/notmuch.h index bbeec55..a61cd02 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -139,7 +139,7 @@ notmuch_database_create (const char *path); typedef enum { NOTMUCH_DATABASE_MODE_READ_ONLY = 0, - NOTMUCH_DATABASE_MODE_READ_Write + NOTMUCH_DATABASE_MODE_READ_WRITE } notmuch_database_mode_t; /* XXX: I think I'd like this to take an extra argument of --------------1.6.5.3-- From bart@jukie.net Sat Nov 21 14:12:10 2009 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 280F7431FAE for ; Sat, 21 Nov 2009 14:12:10 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 NP+0W2bYFGcQ for ; Sat, 21 Nov 2009 14:12:08 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id EC4D9431FBC for ; Sat, 21 Nov 2009 14:12:07 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id 46EBBC055E5; Sat, 21 Nov 2009 17:12:07 -0500 (EST) Date: Sat, 21 Nov 2009 17:12:07 -0500 From: Bart Trojanowski To: Carl Worth Message-ID: <20091121221207.GB17268@jukie.net> References: <87fx8bygi7.fsf@linux.vnet.ibm.com> <87bpiv4t9h.fsf@yoom.home.cworth.org> <87y6lz39nd.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87y6lz39nd.fsf@yoom.home.cworth.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: notmuch Subject: Re: [notmuch] [PATCH] notmuch: Add Maildir directory name as tag name for messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 22:12:10 -0000 * Carl Worth [091121 15:28]: > And sadly, I just pulled it out again. > > I realized that I actually don't want my mail tagged based on the > maildir directories I'm using, (they are arbitrarily-named directories > used only to keep the per-directory number of files below about 10 > thousand). > > So we'll probably need to make this an opt-in feature from the > configuration file. I think notmuch needs something that will add tags based on the attributes of a message (headers or body), as it imports data from a maildir. I am currently considering having procmail deliver to date based (YYYY-MM) folders and have notmuch determine what tags they should get. -Bart -- WebSig: http://www.jukie.net/~bart/sig/ From stefan@datenfreihafen.org Sat Nov 21 14:17:07 2009 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 53DDB431FBC for ; Sat, 21 Nov 2009 14:17:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 izf4Gi5Uoi2C for ; Sat, 21 Nov 2009 14:17:06 -0800 (PST) Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19]) by olra.theworths.org (Postfix) with ESMTP id 72804431FAE for ; Sat, 21 Nov 2009 14:17:06 -0800 (PST) Received: from p5b034af6.dip.t-dialin.net ([91.3.74.246] helo=excalibur) by sirius.lasnet.de with esmtpsa (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1) id 1NByGN-0006tB-2j by authid with cram_md5 for ; Sat, 21 Nov 2009 23:17:05 +0100 Received: from stefan by excalibur with local (Exim 4.69) (envelope-from ) id 1NByGM-0000A6-AB for notmuch@notmuchmail.org; Sat, 21 Nov 2009 23:17:02 +0100 Date: Sat, 21 Nov 2009 23:17:02 +0100 From: Stefan Schmidt To: notmuch@notmuchmail.org Message-ID: <20091121221702.GG24602@excalibur.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: Mutt http://www.mutt.org/ X-KeyID: 0xDDF51665 X-Website: http://www.datenfreihafen.org/ User-Agent: Mutt/1.5.20 (2009-06-14) Subject: [notmuch] [PATCH] notmuch-config: Fix memleaks. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 22:17:07 -0000 >From 4bb598e6e0fa32d5184be54cb5c66fe364eba374 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sat, 21 Nov 2009 22:45:23 +0100 Subject: [PATCH] notmuch-config: Fix memleaks. While talloc is great we need to free the g_error by hand. Tested-by: Stefan Schmidt Signed-off-by: Holger Freyther --- notmuch-config.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/notmuch-config.c b/notmuch-config.c index 7252a19..aaa0372 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -207,9 +207,11 @@ notmuch_config_open (void *ctx, fprintf (stderr, "Error reading configuration file %s: %s\n", config->filename, error->message); talloc_free (config); + g_error_free (error); return NULL; } + g_error_free (error); is_new = 1; } @@ -308,6 +310,7 @@ notmuch_config_save (notmuch_config_t *config) if (! g_file_set_contents (config->filename, data, length, &error)) { fprintf (stderr, "Error saving configuration to %s: %s\n", config->filename, error->message); + g_error_free (error); return 1; } -- 1.6.5.3 From mh@glandium.org Sat Nov 21 14:27:01 2009 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 963FA431FBC for ; Sat, 21 Nov 2009 14:27:01 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Yj3nSLYXcA1n for ; Sat, 21 Nov 2009 14:26:59 -0800 (PST) Received: from vuizook.err.no (vuizook.err.no [85.19.221.46]) by olra.theworths.org (Postfix) with ESMTP id 556C0431FAE for ; Sat, 21 Nov 2009 14:26:59 -0800 (PST) Received: from cha92-13-88-165-248-19.fbx.proxad.net ([88.165.248.19] helo=jigen) by vuizook.err.no with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NByPt-0004Z3-U2; Sat, 21 Nov 2009 23:26:56 +0100 Received: from mh by jigen with local (Exim 4.69) (envelope-from ) id 1NByPH-0001IO-BN; Sat, 21 Nov 2009 23:26:15 +0100 Date: Sat, 21 Nov 2009 23:26:15 +0100 From: Mike Hommey To: Carl Worth Message-ID: <20091121222615.GA4925@glandium.org> References: <20091120132625.GA19246@glandium.org> <87y6m0lxym.fsf@yoom.home.cworth.org> <20091120210556.GA25421@glandium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091120210556.GA25421@glandium.org> X-GPG-Fingerprint: A479 A824 265C B2A5 FC54 8D1E DE4B DA2C 54FD 2A58 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Segfault with weird Message-ID X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 22:27:01 -0000 On Fri, Nov 20, 2009 at 10:05:56PM +0100, Mike Hommey wrote: > On Fri, Nov 20, 2009 at 09:53:37PM +0100, Carl Worth wrote: > > On Fri, 20 Nov 2009 14:26:25 +0100, Mike Hommey wrote: > > > - for some reason, xapian doesn't want to add the document corresponding > > > to this old spam message: notmuch->xapian_db->add_document throws an > > > exception. > > > > I think things had just gone wrong long before then. > > I *did* see it throwing an exception from there. The sad thing is that I > can't reproduce the problem anymore :-/ > > > > I can provide the spam if necessary, or can continue debugging the issue > > > with some guidance. > > > > Thanks for providing it. It turns out that the giant Message-Id value > > wasn't causing the problem. Instead the message was corrupt by having a > > stray new line at the third line. (So GMime is seeing only the first two > > lines of headers). We *used* to have working code to detect this kind of > > file as "not an email" but again, this broke when we changed > > notmuch_message_get_header to return "" instead of NULL for missing > > headers. > > Interestingly, when I first traced on what message the crash was > happening, I did see notmuch having the message-id in the message_id > variable. I just was able to reproduce after starting over. header isn't "", and message_id is correctly filled. I can also confirm the exception is thrown from notmuch->xapian_db->add_document. > FWIW, that was using c05c3f1. With 3ae12b1, I get the following output: Error: A Xapian exception occurred. Halting processing. But I confirm there is no crash, now. Cheers, Mike From brett.viren@gmail.com Sat Nov 21 14:36:20 2009 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 853B4431FAE for ; Sat, 21 Nov 2009 14:36:20 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 dShE7-xskm2J for ; Sat, 21 Nov 2009 14:36:19 -0800 (PST) Received: from mail-px0-f180.google.com (mail-px0-f180.google.com [209.85.216.180]) by olra.theworths.org (Postfix) with ESMTP id EAE02431FBC for ; Sat, 21 Nov 2009 14:36:18 -0800 (PST) Received: by pxi10 with SMTP id 10so3235276pxi.33 for ; Sat, 21 Nov 2009 14:36:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=7c8DU69bvEVmb2kW4bz+ulQJSpotgOiZKx16QWCq9aE=; b=WmmL7Sh51vCS5L5N7houO8Z/soKTYxJJ+8V+gQ0g1PjrIKRhFVCzOxv7xk0hb95V0Y LQy51IpSwwwf+hjRQYEiDb9pBk1BrpHv3YyAmyhK0PDNNare59RNM+2ujovuzEwgf00i h/GWn01DJ4HLI3NhT3E2twtNv0oKOXH3JyxuA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=GFVqA3mxDTVFa+u3XVimfm93lDZ9hCP5w40QprkDMhPay0x8VLPuFr/6A0yGWiZjs6 RnEKZVh53Iy9QucmCC4wPtcP96AYdpF9J59irbWs3ns3X9Xn0f0TYhUqDLbBQGvcZyOT WrbvmcCqEeQ1FjWACar04QdvFxzTQR8Ln6nYM= MIME-Version: 1.0 Received: by 10.114.186.37 with SMTP id j37mr4813248waf.36.1258842978302; Sat, 21 Nov 2009 14:36:18 -0800 (PST) In-Reply-To: <87fx874xj5.fsf@yoom.home.cworth.org> References: <20091121145111.GB19397@excalibur.local> <87fx874xj5.fsf@yoom.home.cworth.org> Date: Sat, 21 Nov 2009 17:36:18 -0500 Message-ID: <46263c600911211436s5826015eqc5fc18a4164245cb@mail.gmail.com> From: Brett Viren To: Carl Worth Content-Type: text/plain; charset=ISO-8859-1 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 22:36:20 -0000 On Sat, Nov 21, 2009 at 12:07 PM, Carl Worth wrote: > Though, frankly, I think we need to fix "notmuch new" to do much better > than 40 files/sec. Just a "me too". Processed 130871 total files in 38m 7s (57 files/sec.). Added 102723 new messages to the database (not much, really). This was ~2GB of mail on a 2.5GHz CPU. That seems pretty reasonable to me but I'd like to rerun the "notmuch new" under google perftools to see if there are any obvious bottlenecks that might be cleaned up. How can I purge the index? I can't locate it. -Brett. From jan@ryngle.com Sat Nov 21 14:37:26 2009 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 BC605431FBF for ; Sat, 21 Nov 2009 14:37:26 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 sL7mR8lUbS8n for ; Sat, 21 Nov 2009 14:37:26 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 0AB08431FAE for ; Sat, 21 Nov 2009 14:37:25 -0800 (PST) Received: by bwz24 with SMTP id 24so3155111bwz.30 for ; Sat, 21 Nov 2009 14:37:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.25.198 with SMTP id a6mr3033326bkc.31.1258843045290; Sat, 21 Nov 2009 14:37:25 -0800 (PST) Date: Sat, 21 Nov 2009 23:37:24 +0100 Message-ID: From: Jan Janak To: Not Much Mail Content-Type: text/plain; charset=UTF-8 Subject: [notmuch] RFC: Multiple filenames for email messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 22:37:26 -0000 The comment of _notmuch_message_set_filename says: XXX: We should still figure out if we think it's important to store multiple filenames for email messages with identical message IDs. I have lots of such messages in my email collection, both in my local copy of my Gmail account and also in the local copy of my company's IMAP account. My dream mail indexing tool should be able to apply tags automatically based on, among other things, the name of the directory the message is stored in. If there are multiple copies of the same message scattered across multiple directories, I would like to apply more tags. I assume that most tags will be applied (either manually or automatically) after 'notmuch-new', I currently do some of it with a simple shell script. The script does not apply tags based on directory names yet, but it would make notmuch really flexible if we could do that *and* if we could get access to all filenames of a particular message. I'd like to propose that we store all filenames for email messages in the database, not just one per message. I'd be happy to work on it and submit a patch if others think that this would be good to have. -- Jan From five9a2@gmail.com Sat Nov 21 14:39:36 2009 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 9794A431FBF for ; Sat, 21 Nov 2009 14:39:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 7xNIwysqy-K0 for ; Sat, 21 Nov 2009 14:39:36 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id BFAF6431FAE for ; Sat, 21 Nov 2009 14:39:35 -0800 (PST) Received: by bwz24 with SMTP id 24so3155659bwz.30 for ; Sat, 21 Nov 2009 14:39:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=PZH41Mw5dvr0Kcg5Mc2R+K+6ttZBMA3qkTgpb6Bd02Y=; b=cvG+Ngrhfupw6opFoSy/sfBx2dQTPAiQBp9cl3ijnXIGMongh/pr3V3menHaLFxpgm EDfu1qUjhqdmzYZRzgSvL8VqAbPy8iyDLwFajHLxBBYc6+tz2VF0xc8VUHvS2G1INoq3 5eRlPJWgP7m8J673SMdviCX6T+OZp9bsMy8W8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=PAUB+DGlpD5mfE3O1bAAhu6S/5TKkTDcAW+d1pe3zt8VYlE1cTC7hMhyXOftSpYwBY rSUuVzHYN7pkwYO4A92+OhfB42oBgi7B6bdc9/1aOwl5FDoBjBG+IRZhZvPHd2b/Llnb 91xT09g5IXRtmL2MR8qXFUSGLr5jco5v7wvjI= Received: by 10.204.34.83 with SMTP id k19mr3024135bkd.96.1258843174850; Sat, 21 Nov 2009 14:39:34 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id z10sm3443684fka.0.2009.11.21.14.39.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Nov 2009 14:39:33 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Brett Viren , Carl Worth In-Reply-To: <46263c600911211436s5826015eqc5fc18a4164245cb@mail.gmail.com> References: <20091121145111.GB19397@excalibur.local> <87fx874xj5.fsf@yoom.home.cworth.org> <46263c600911211436s5826015eqc5fc18a4164245cb@mail.gmail.com> Date: Sat, 21 Nov 2009 23:40:03 +0100 Message-ID: <877htjtscc.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 22:39:36 -0000 On Sat, 21 Nov 2009 17:36:18 -0500, Brett Viren wrote: > How can I purge the index? I can't locate it. I believe you can just remove /path/to/maildir/.notmuch Jed From brett.viren@gmail.com Sat Nov 21 14:44:19 2009 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 E30B7431FBF for ; Sat, 21 Nov 2009 14:44:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 vhv-DcbkXARP for ; Sat, 21 Nov 2009 14:44:19 -0800 (PST) Received: from mail-pw0-f51.google.com (mail-pw0-f51.google.com [209.85.160.51]) by olra.theworths.org (Postfix) with ESMTP id 4F915431FBC for ; Sat, 21 Nov 2009 14:44:19 -0800 (PST) Received: by pwj10 with SMTP id 10so2745474pwj.30 for ; Sat, 21 Nov 2009 14:44:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=98BRb3fseiy2VPtiOcpoTcWSoJUjraPwlqAw/ybmOwA=; b=mI1Fs3KMfLDkW7GjVW4BhArwt6+cVluKydbssoo1P5gTuvjaiXsNw2+SNKRfhbarrZ cxP5X4xLxDnUKaUL8WW4IRSyDAt8seTdOJlZoRZgFanbjhOTAvHtTWPZC87IlnO8uZVY GZvy+ezCbtYBFq/kU84vJJOZ8D8FC/e6g7BTI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=kEiLhJBABZJUX1dPnZa4Qf6PwRZmVUqbAxKpZnxsRobPEVlAlgmt1AhDKroOqF3ORi 4N+rtvHVczQwZBb0E0dM5Mg3QaqKhEywgLAL29Ssan2UUll6U94Eoc3fLSwvvMR/h5mI AR9cpAZPxx7iiWCrBf86hYmrxcVX4TwONIZec= MIME-Version: 1.0 Received: by 10.114.2.29 with SMTP id 29mr4858519wab.48.1258843458722; Sat, 21 Nov 2009 14:44:18 -0800 (PST) In-Reply-To: <877htjtscc.fsf@59A2.org> References: <20091121145111.GB19397@excalibur.local> <87fx874xj5.fsf@yoom.home.cworth.org> <46263c600911211436s5826015eqc5fc18a4164245cb@mail.gmail.com> <877htjtscc.fsf@59A2.org> Date: Sat, 21 Nov 2009 17:44:18 -0500 Message-ID: <46263c600911211444n33493668l5ece5fe1772599b3@mail.gmail.com> From: Brett Viren To: Jed Brown Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 22:44:20 -0000 On Sat, Nov 21, 2009 at 5:40 PM, Jed Brown wrote: > On Sat, 21 Nov 2009 17:36:18 -0500, Brett Viren w= rote: >> How can I purge the index? =A0I can't locate it. > > I believe you can just remove /path/to/maildir/.notmuch Doh! Thanks. I have a dovecot controlled Maildir so this dot-directory got lost in the forest of all the others. -Brett. From cworth@cworth.org Sat Nov 21 14:46:57 2009 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 9036E431FBF; Sat, 21 Nov 2009 14:46:57 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 hJePV1Yaz4Ks; Sat, 21 Nov 2009 14:46:57 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 892E2431FBC; Sat, 21 Nov 2009 14:46:56 -0800 (PST) From: Carl Worth To: Jed Brown , Jan Janak In-Reply-To: <87bpivtwr1.fsf@59A2.org> References: <87fx87u3no.fsf@59A2.org> <874oon4pgv.fsf@yoom.home.cworth.org> <87bpivtwr1.fsf@59A2.org> Date: Sat, 21 Nov 2009 23:46:44 +0100 Message-ID: <87ocmv338r.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Asynchronous tagging X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 22:46:57 -0000 On Sat, 21 Nov 2009 22:04:50 +0100, Jed Brown wrote: > > 2) A client changes the flags on a message, for example, when you > > read a message or mark it as deleted. Maildir stores flags in > > filenames. > > This seems like a problem. I'm not familiar with xapian, is it > necessarily an expensive operation to correct these inconsistencies? There's not really anything Xapian-specific here. It should be a relatively easy change to make notmuch do the right thing here. It just happens that the original author/user of notmuch isn't using anything that changes his filenames---so I hadn't noticed. :-) > Matching by thread id ought to be cheap. Naturally. And that's of course exactly what notmuch does. So in my usage, the only time "notmuch new" sees a Message-ID that it has seen before, is when it encounters a duplicate copy of a message. So the code currently just ignores it. Mikhail wrote a patch: 1258491078-29658-1-git-send-email-dottedmag@dottedmag.net that does the simple thing in this case of just noticing whether the old filename has since been removed, and in this case updating the document to the new filename. The problem he ran into is that renames aren't updating mtimes and the current "notmuch new" has an optimization to not even look at files unless their mtime is newer than the mtime last seen for the directory they are in. So some investigation is needed to see how important that optimization is, and if it's important to see whether there's another way to keep the performance while being able to support renames. (Or alternately, allowing the user to configure an option saying, "I need to support renames even if that means that notmuch new is a bit slower."). -Carl From dottedmag@dottedmag.net Sat Nov 21 14:50:49 2009 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 6AFD0431FC3 for ; Sat, 21 Nov 2009 14:50:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 puCdVTGVJnES for ; Sat, 21 Nov 2009 14:50:48 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id 8BCC9431FC2 for ; Sat, 21 Nov 2009 14:50:48 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 38C7A8C979; Sat, 21 Nov 2009 23:50:47 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NBymy-0004EF-KZ; Sun, 22 Nov 2009 04:50:44 +0600 From: Mikhail Gusarov To: Chris Wilson References: <87my2fpty1.fsf@vertex.dottedmag> <1258835540-21094-1-git-send-email-chris@chris-wilson.co.uk> Date: Sun, 22 Nov 2009 04:50:41 +0600 In-Reply-To: <1258835540-21094-1-git-send-email-chris@chris-wilson.co.uk> (Chris Wilson's message of "Sat, 21 Nov 2009 20:32:20 +0000") Message-ID: <874oonpk5a.fsf@vertex.dottedmag> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] Makefile: Magic silent rules. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 22:50:49 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Twas brillig at 20:32:20 21.11.2009 UTC+00 when chris@chris-wilson.co.uk di= d gyre and gimble: CW> Use the facilities of GNU make to create a magic function that will CW> on the first invocation print a description of how to enable CW> verbose compile lines and then print the quiet rule. Uhm. Now it eats much less :) $ make ... GZIP notmuch.1.gz /bin/sh: --rsyncable: not found make: *** [notmuch.1.gz] Error 127 $ $ make V=3D1 ... rsyncable --stdout notmuch.1 > notmuch.1.gz /bin/sh: rsyncable: not found make: [notmuch.1.gz] Error 127 (ignored) $ =2D-=20 http://fossarchy.blogspot.com/ --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAEBAgAGBQJLCG7BAAoJEJ0g9lA+M4iIs/IQALqDckE4+w4JIZulgtY23SXi DJKlL1/w7J3Sye7yHjenxcmktrgddSN1MUMQSPUNoEdQvlBYoJHI64r6zotz77FX 1a7lHvdlh3gME2dEApZehQCX3TxQohJC8LbWdrVBO5y2BUPpcaCuoPUdqonyQkhC 5lSgO1bEExWBWgajP0arUOmvwzwe/SMi0bPiM3uYOe07CFqXmgYifTx175Bb96Hs kflQX+8G2WIrJ251RWl4RF6/u/Cim0vHJuPubrWd7SBW9ug0OpbNkqsuFxyNYQCC Sq0sfUrOW+4M9yP4aRGrPBKPfmkvHeIiWGVQ+HReyCXCZFJHCuhz6a1Q1S3tnE8F C6xjJqvLXRzEVIDiew2LCzHgRKKehiqrOPQ92+43g1UFXIlFsk/i0ccLb8RKGBlt 8VDyxA4zaKW9iWW/jmGgMB32fMgoN3VVqMxiLeknfiEhjfE1CrfSHep+t8Gs7WA9 bXOJCxi9XLOkBiFXlQeyRur3FuJbRzw7Nxt1I62sgpK2uD+lUZLEXtpElvYMsmA/ gp/T6QrDqr1vGKq4oRjfZ51eOiCgyXK7GwAdRcZXaWI1wq6AAr70CDsIrcll7qfa A1XEdgQv/digk2Vq7cxEVDuJ8K2RpKmaNRlDej87v6JoygtI6y2CLsIhvqmk+U7Q MWOqUyKOIHAbMlpk17W9 =T84c -----END PGP SIGNATURE----- --=-=-=-- From jan@ryngle.com Sat Nov 21 15:06:02 2009 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 7AD9C431FBF for ; Sat, 21 Nov 2009 15:06:02 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 0MnOfjBW5UkP for ; Sat, 21 Nov 2009 15:06:00 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 3A396431FBC for ; Sat, 21 Nov 2009 15:06:00 -0800 (PST) Received: by bwz24 with SMTP id 24so3162173bwz.30 for ; Sat, 21 Nov 2009 15:05:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.34.70 with SMTP id k6mr2972042bkd.178.1258844759145; Sat, 21 Nov 2009 15:05:59 -0800 (PST) In-Reply-To: <87aayf4t0p.fsf@yoom.home.cworth.org> References: <1258520223-15328-1-git-send-email-jan@ryngle.com> <87aayf4t0p.fsf@yoom.home.cworth.org> Date: Sun, 22 Nov 2009 00:05:59 +0100 Message-ID: From: Jan Janak To: Carl Worth Content-Type: text/plain; charset=UTF-8 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] notmuch new: Support for conversion of spool subdirectories into tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 23:06:02 -0000 On Sat, Nov 21, 2009 at 7:44 PM, Carl Worth wrote: > On Wed, 18 Nov 2009 05:57:03 +0100, Jan Janak wrote: >> This patch makes it possible to convert subdirectory names inside the >> spool directory into message tags. Messages stored in subdirectory >> "foo" will be marked with tag "foo". Message duplicates found in several >> subdirectories will be given one tag per subdirectory. > > Hi Jan, > > I just pushed out a patch from Aneesh for similar functionality, but > with a simpler implementation. > > One thing that patch loses is the addition of multiple tags when a > message appears in multiple directories. Would you like to code up that > feature on top of the current code? Looking at the commit log history, I noticed that you reverted the commit, so I guess this question is no more relevant. By the way, although I provided a similar patch some time ago, I agree that it is better not to have this hard-wired in 'notmuch-new'. It helped me with the initial import, but since then I have been trying to get it working with a script run after 'notmuch-new'. -- Jan From jrollins@finestructure.net Sat Nov 21 15:06:26 2009 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 1B8B8431FBF for ; Sat, 21 Nov 2009 15:06:26 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 hfT1XYcwBXmn for ; Sat, 21 Nov 2009 15:06:25 -0800 (PST) Received: from serrano.cc.columbia.edu (serrano.cc.columbia.edu [128.59.29.6]) by olra.theworths.org (Postfix) with ESMTP id 772DE431FBC for ; Sat, 21 Nov 2009 15:06:25 -0800 (PST) Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com [72.227.128.66]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by serrano.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id nALN6ONA023914 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Sat, 21 Nov 2009 18:06:25 -0500 (EST) Received: from jrollins by servo.finestructure.net with local (Exim 4.69) (envelope-from ) id 1NBz2M-0003OJ-EW for notmuch@notmuchmail.org; Sat, 21 Nov 2009 18:06:38 -0500 Date: Sat, 21 Nov 2009 18:06:38 -0500 From: Jameson Graef Rollins To: notmuch@notmuchmail.org Message-ID: <20091121230638.GA31999@finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5vNYLRcllDrimb99" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.65 on 128.59.29.6 Subject: [notmuch] suggestion/request about notmuch config X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 23:06:26 -0000 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, folks. I just recently heard about notmuch and am very excited by it. It looks like exactly what I've been waiting years for. Also excited to see so much good development work happening. I started playing around with notmuch today and I have a suggestion about the notmuch config files and databases. I would prefer to see all notmuch files and data in the same directory, preferably: ~/.notmuch The config file could be: ~/.notmuch/config and the database could be: ~/.notmuch/db or something to that affect. This would make it much easier to keep track of in my opinion. I would also prefer to keep the database completely separate from my mail directory itself. I think these changes would be fairly trivial. I would be happy to take a crack at them if there aren't any major concerns about this proposal. Obviously moving the default config might impact current users, but I think it's fairly minor. One reason why it's probably better to make this change now... Let me know what people think. Looking forward to working with notmuch! jamie. --5vNYLRcllDrimb99 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: attachment -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJLCHJ7AAoJEO00zqvie6q8MAUQAJNAkTrVoiJTC9j1TIzyxE17 bXXHHTnd73dl1pjlBUd/dBBi3+VhJE84OiBs6PH2Zggb2GIj8ugABCELQNkbwPan gDZ+5MKBVnmomfwwBQsIar7I+CpVzbtPOZKHhlzuLDR2xJG4tk8urXj8m5+rHypA 4KhMpsTZ05FcI0SHm9GsdOG++TqBX3Q3plDxavS82FTw9ns4owcyVvHfuQSBtY6G hlxyBSIKjcsBwA4trtP626M0rResT0/8vF83EVPnVixPXJF4Lh/l529vJavnGFS0 7p8e+PbqK95aNWdQCrlep+wjLR2cYpOW+iIcAeGMsMq4MYg7BWBvK1tVQH3e7KiQ b9bML81h2YW9tyPXjHUCjg6J/I0s7laqio7kUlPnzIVw3BPhEtYnUzxNCoKCnc19 iWxg4y3iQ+dFJuN1L4OXsjDo4nZEuD17z0BxPwrmayXV0SUyh0hTejItjIfSrJ0z aKDyGC6cMpJtZpi5BnKqiQQAE6QTNv/boKFLdc+LHsmQLZKaC46o45EE8u4OQV7O vObLrFCqt5iYAy1lhXNTyT1ecgaFl+HLMrGtyL7uGjqENseJ+LEmcsTD0LAOtt+G FbI4ZGu36B6S3pMdz6W2XEFcvdd9KDGGJX+9jozT5osX670jqtf/W+ACZ2DNA1qW OY7mDMUd/zNJ1t2xOKb1 =Za87 -----END PGP SIGNATURE----- --5vNYLRcllDrimb99-- From cworth@cworth.org Sat Nov 21 15:08:11 2009 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 18CCF431FC3; Sat, 21 Nov 2009 15:08:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 hZdYdiz5SYb6; Sat, 21 Nov 2009 15:08:10 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A40AC431FBC; Sat, 21 Nov 2009 15:08:09 -0800 (PST) From: Carl Worth To: Jan Janak In-Reply-To: References: <1258630481-5133-1-git-send-email-jan@ryngle.com> <1258630481-5133-2-git-send-email-jan@ryngle.com> <87lji2bmrb.fsf@yoom.home.cworth.org> Date: Sun, 22 Nov 2009 00:07:57 +0100 Message-ID: <87my2f329e.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 2/2] notmuch list: A new command to produce various lists. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 23:08:11 -0000 On Sat, 21 Nov 2009 22:07:14 +0100, Jan Janak wrote: > My patch no longer works and I have been thinking about updating it to > current HEAD. But before I do that, I wanted to check with you to see > if you would prefer to use a different name for the command, here are > some options: > > 1) notmuch tags > 2) notmuch list tags > 3) notmuch list-tag > > Any opinions? > > I also plan to add support for search-terms later so that we can > produce tag lists for a set of messages, as you mentioned in one of > your previous emails. I don't think "list" would make sense unless it didn't support search terms at all. So I proposed my "search-messages" command earlier as well. It's clear that there are lots of different things that we're going to want to search for in the database and then lots of way's that we're going to want to present the resulting data. I would rather like there to be some correlation between commands with shorter names being more likely to be the kind of thing that a user would use directly from the command line. And longer names can be used for things that are more for interfaces to use, and for people to use in writing scripts. So how about "search-tags" and "search-messages" ? Any better ideas? Another option would be to just call this "notmuch search" and have an option to control what is output: notmuch search # for threads, as currently notmuch search --output=tags notmuch search --output=messages Actually, I kind of like that. For one thing, it makes it easy to eliminate the redundancy I made with the option-parsing in both notmuch-search.c and notmuch-search-message.c. > A quick description for those who joined later: This command produces > a list of all tags defined in the database. The emacs interface uses > it to implement tag name completion. And I can't wait to have tag completion in the interface. This will be nice. One thing we'll still have to think about is how to remove the "virtual tags" from the completion list, (once we have virtual tags in the configuration file---that is, tags applied automatically based on search specifications). The place we'd want to remove these from the completion list is when adding/removing a tag---it should be illegal to add/remove virtual tags since they will be maintained by the system according to the search specifications. Of course, when searching/filtering by tag, the completion list should include all tags, whether manual or virtual. So, what we're going to need for that is something like "notmuch config" that allows the interface to query the configuration. But that's all down the road. Let's get that tag completion working! -Carl From chris@chris-wilson.co.uk Sat Nov 21 15:14:53 2009 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 0F0E0431FBF for ; Sat, 21 Nov 2009 15:14:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 sCHZv7+vcFbU for ; Sat, 21 Nov 2009 15:14:52 -0800 (PST) Received: from azsmga102.ch.intel.com (mga12.intel.com [143.182.124.36]) by olra.theworths.org (Postfix) with ESMTP id DB7D5431FBC for ; Sat, 21 Nov 2009 15:14:51 -0800 (PST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 21 Nov 2009 15:14:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,264,1257148800"; d="scan'208";a="214296817" Received: from unknown (HELO localhost.localdomain) ([10.255.16.190]) by azsmga001.ch.intel.com with ESMTP; 21 Nov 2009 15:14:42 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 23:14:39 +0000 Message-Id: <1258845279-24291-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] lib/database.cc: coding style X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 23:14:53 -0000 Carl claims he must have been distracted when he wrote this... Signed-off-by: Chris Wilson --- lib/database.cc | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 207246c..0f95aa1 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -147,17 +147,20 @@ _find_prefix (const char *name) { unsigned int i; - for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_INTERNAL); i++) + for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_INTERNAL); i++) { if (strcmp (name, BOOLEAN_PREFIX_INTERNAL[i].name) == 0) return BOOLEAN_PREFIX_INTERNAL[i].prefix; + } - for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_EXTERNAL); i++) + for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_EXTERNAL); i++) { if (strcmp (name, BOOLEAN_PREFIX_EXTERNAL[i].name) == 0) return BOOLEAN_PREFIX_EXTERNAL[i].prefix; + } - for (i = 0; i < ARRAY_SIZE (PROBABILISTIC_PREFIX); i++) + for (i = 0; i < ARRAY_SIZE (PROBABILISTIC_PREFIX); i++) { if (strcmp (name, PROBABILISTIC_PREFIX[i].name) == 0) return PROBABILISTIC_PREFIX[i].prefix; + } INTERNAL_ERROR ("No prefix exists for '%s'\n", name); @@ -293,13 +296,14 @@ skip_space_and_comments (const char **str) int nesting = 1; s++; while (*s && nesting) { - if (*s == '(') + if (*s == '(') { nesting++; - else if (*s == ')') + } else if (*s == ')') { nesting--; - else if (*s == '\\') + } else if (*s == '\\') { if (*(s+1)) s++; + } s++; } } @@ -508,7 +512,7 @@ notmuch_database_open (const char *path) error.get_msg().c_str()); notmuch = NULL; } - + DONE: if (notmuch_path) free (notmuch_path); -- 1.6.5.3 From five9a2@gmail.com Sat Nov 21 15:20:52 2009 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 6B169431FAE for ; Sat, 21 Nov 2009 15:20:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 YNRRDCdv2vgs for ; Sat, 21 Nov 2009 15:20:51 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 92578431FBC for ; Sat, 21 Nov 2009 15:20:51 -0800 (PST) Received: by bwz24 with SMTP id 24so3165734bwz.30 for ; Sat, 21 Nov 2009 15:20:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=sNal901Lxj4qtdZsRwQjXCPl8C6xVDNSylsJy5mMDNg=; b=lw7hYyzG9MQ7528W8RA6YynIrNW7+hxymy03nRv1ZBFe570oFl95l9i86DrxgmNOSf HP5AYRAwg6SOGjoaXP46Bzk/xWz/JByGgw00qCZLb0w9Ncx8JJq5nmnnq+1cg8sA5qxc ENhTYrpbnuBl1rsgHmq/jsae076THbJFQIqKg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=rjfj/VQhPFNv8/p9Pmwzg/7G1cErrVx4NLgcerItpmWFlNnFP96NzhS75OBSqwRRxq MEqaUbGMLYkF6P6Tgaf32igUVzESRdcyJBUc8/h3F31GwCV6V0I/rnjOoskTdhVZKbET Kmg8wIZDbtJOxKpFBTtmGylq7Yrt9Rwg2EQo8= Received: by 10.204.32.76 with SMTP id b12mr2830467bkd.165.1258845650764; Sat, 21 Nov 2009 15:20:50 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 18sm3492222fks.34.2009.11.21.15.20.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Nov 2009 15:20:49 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Carl Worth , Jan Janak In-Reply-To: <87my2f329e.fsf@yoom.home.cworth.org> References: <1258630481-5133-1-git-send-email-jan@ryngle.com> <1258630481-5133-2-git-send-email-jan@ryngle.com> <87lji2bmrb.fsf@yoom.home.cworth.org> <87my2f329e.fsf@yoom.home.cworth.org> Date: Sun, 22 Nov 2009 00:21:19 +0100 Message-ID: <876393tqfk.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 2/2] notmuch list: A new command to produce various lists. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 23:20:52 -0000 On Sun, 22 Nov 2009 00:07:57 +0100, Carl Worth wrote: > One thing we'll still have to think about is how to remove the "virtual > tags" from the completion list, (once we have virtual tags in the > configuration file---that is, tags applied automatically based on search > specifications). Do these need to be real tags? Would it be sufficient for them to just be aliases for search patterns? I think I would prefer the latter because I could modify the pattern and not have to rewrite tags to the whole database. Maybe real tags are needed to optimize expensive patterns, but I wouldn't think the user needs to know about that. Jed From cworth@cworth.org Sat Nov 21 15:23:26 2009 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 DE2F2431FBF; Sat, 21 Nov 2009 15:23:26 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 6CNc+sf4V+Gb; Sat, 21 Nov 2009 15:23:26 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6C06D431FAE; Sat, 21 Nov 2009 15:23:25 -0800 (PST) From: Carl Worth To: Stefan Schmidt , notmuch@notmuchmail.org In-Reply-To: <20091121221702.GG24602@excalibur.local> References: <20091121221702.GG24602@excalibur.local> Date: Sun, 22 Nov 2009 00:23:13 +0100 Message-ID: <87ljhz31jy.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] notmuch-config: Fix memleaks. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 23:23:27 -0000 On Sat, 21 Nov 2009 23:17:02 +0100, Stefan Schmidt wrote: > > While talloc is great we need to free the g_error by hand. > > Tested-by: Stefan Schmidt > Signed-off-by: Holger Freyther Thanks to both of you! This is pushed. As for talloc and glib, it's become clear to me that I'd really like a talloc-friendly hash-table implementation, (and maybe a nice growing array). I really haven't seen any other data structures in glib that I'd need as universally as I need those, (particularly since talloc already provides a bunch of string functions). -Carl From stefan@datenfreihafen.org Sat Nov 21 16:11:31 2009 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 055BC431FBF for ; Sat, 21 Nov 2009 16:11:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Vz+mNzdau2Gh for ; Sat, 21 Nov 2009 16:11:30 -0800 (PST) Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19]) by olra.theworths.org (Postfix) with ESMTP id CFD61431FAE for ; Sat, 21 Nov 2009 16:11:29 -0800 (PST) Received: from p5b034af6.dip.t-dialin.net ([91.3.74.246] helo=excalibur) by sirius.lasnet.de with esmtpsa (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1) id 1NC032-0000td-2v by authid with cram_md5; Sun, 22 Nov 2009 01:11:28 +0100 Received: from stefan by excalibur with local (Exim 4.69) (envelope-from ) id 1NC031-0001Dm-H7; Sun, 22 Nov 2009 01:11:23 +0100 From: Stefan Schmidt To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 01:11:01 +0100 Message-Id: <1258848661-4660-2-git-send-email-stefan@datenfreihafen.org> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org> References: <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org> Subject: [notmuch] [PATCH 2/2] notmuch-new: Tag mails not as unread when the seen flag in the maildir is set. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 00:11:31 -0000 With the new notmuch_message_get_flags() function we can get the information if a message was already flagged as seen in maildir by another mailer or tool. This gives a more realistic picture instead of flagging all as unread. Signed-off-by: Stefan Schmidt --- Makefile | 2 +- notmuch-new.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3fedcf1..dfcfc70 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Default FLAGS, (can be overridden by user such as "make CFLAGS=-O2") WARN_FLAGS=-Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum -CFLAGS=-O2 +CFLAGS=-O0 -ggdb3 # Additional flags that we will append to whatever the user set. # These aren't intended for the user to manipulate. diff --git a/notmuch-new.c b/notmuch-new.c index bc35b4e..ef4429d 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -41,8 +41,22 @@ handle_sigint (unused (int sig)) static void tag_inbox_and_unread (notmuch_message_t *message) { - notmuch_message_add_tag (message, "inbox"); + char *buf; + int i; + + buf = notmuch_message_get_flags (message); + for (i = 0; i < strlen (buf); i++) { + /* If the S flag is set the message can be tagged as read */ + if (buf[i] == 'S') { + notmuch_message_add_tag (message, "read"); + goto inbox; + } + } + notmuch_message_add_tag (message, "unread"); + +inbox: + notmuch_message_add_tag (message, "inbox"); } static void -- 1.6.5.3 From stefan@datenfreihafen.org Sat Nov 21 16:11:31 2009 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 E4203431FBF for ; Sat, 21 Nov 2009 16:11:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 k6PahtnYXl0O for ; Sat, 21 Nov 2009 16:11:30 -0800 (PST) Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19]) by olra.theworths.org (Postfix) with ESMTP id 1BAB6431FBC for ; Sat, 21 Nov 2009 16:11:30 -0800 (PST) Received: from p5b034af6.dip.t-dialin.net ([91.3.74.246] helo=excalibur) by sirius.lasnet.de with esmtpsa (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1) id 1NC02v-0000t5-LF by authid with cram_md5; Sun, 22 Nov 2009 01:11:29 +0100 Received: from stefan by excalibur with local (Exim 4.69) (envelope-from ) id 1NC02u-0001Dj-V9; Sun, 22 Nov 2009 01:11:16 +0100 From: Stefan Schmidt To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 01:11:00 +0100 Message-Id: <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: References: Subject: [notmuch] [PATCH 1/2] lib/message: Add function to get maildir flags. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 00:11:32 -0000 With notmuch_message_get_flags() we gain the information if the message was flagged as read, draft, trashed, etc. Handy for big mail spooles that were used with another mailer. Signed-off-by: Stefan Schmidt --- lib/message.cc | 26 ++++++++++++++++++++++++++ lib/notmuch.h | 10 ++++++++++ 2 files changed, 36 insertions(+), 0 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index 069cedb..9bec61e 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -35,6 +35,7 @@ struct _notmuch_message { char *thread_id; char *in_reply_to; char *filename; + char *flags; notmuch_message_file_t *message_file; notmuch_message_list_t *replies; @@ -114,6 +115,7 @@ _notmuch_message_create (const void *talloc_owner, message->thread_id = NULL; message->in_reply_to = NULL; message->filename = NULL; + message->flags = NULL; message->message_file = NULL; message->replies = _notmuch_message_list_create (message); @@ -438,6 +440,30 @@ notmuch_message_get_filename (notmuch_message_t *message) return message->filename; } +const char * +notmuch_message_get_flags (notmuch_message_t *message) +{ + std::string filename_str, flags; + size_t position; + const char *db_path; + + if (message->flags) + return message->flags; + + filename_str = message->doc.get_data (); + db_path = notmuch_database_get_path (message->notmuch); + + if (filename_str[0] != '/') + filename_str.insert (0, db_path); + + /* Flags are everything behind ":" */ + position = filename_str.find (":"); + flags = filename_str.substr (position + 3); /* We don't want :2, */ + message->flags = talloc_strdup (message, flags.c_str ()); + + return message->flags; +} + time_t notmuch_message_get_date (notmuch_message_t *message) { diff --git a/lib/notmuch.h b/lib/notmuch.h index a61cd02..1da5dfd 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -694,6 +694,16 @@ notmuch_message_get_replies (notmuch_message_t *message); const char * notmuch_message_get_filename (notmuch_message_t *message); +/* Get the maildir flags for the email corresponding to 'message'. + * + * The returned flags will be a string of ascii format flags. + * + * The returned string belongs to the message so should not be + * modified or freed by the caller (nor should it be referenced after + * the message is destroyed). */ +const char * +notmuch_message_get_flags (notmuch_message_t *message); + /* Get the date of 'message' as a time_t value. * * For the original textual representation of the Date header from the -- 1.6.5.3 From keithp@keithp.com Sat Nov 21 16:16:30 2009 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 010F7431FBF for ; Sat, 21 Nov 2009 16:16:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 kOLgeJS9AW1i for ; Sat, 21 Nov 2009 16:16:29 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 4165E431FAE for ; Sat, 21 Nov 2009 16:16:29 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 710B976012A; Sat, 21 Nov 2009 16:16:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id R8Ix7aj5ujEc; Sat, 21 Nov 2009 16:16:25 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id B014576012B; Sat, 21 Nov 2009 16:16:25 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id A1F4776012A; Sat, 21 Nov 2009 16:16:25 -0800 (PST) From: Keith Packard To: Carl Worth , Jed Brown , Jan Janak In-Reply-To: <87ocmv338r.fsf@yoom.home.cworth.org> References: <87fx87u3no.fsf@59A2.org> <874oon4pgv.fsf@yoom.home.cworth.org> <87bpivtwr1.fsf@59A2.org> <87ocmv338r.fsf@yoom.home.cworth.org> Date: Sat, 21 Nov 2009 16:16:24 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Asynchronous tagging X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 00:16:30 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Sat, 21 Nov 2009 23:46:44 +0100, Carl Worth wrote: > So some investigation is needed to see how important that optimization > is, and if it's important to see whether there's another way to keep the > performance while being able to support renames. (Or alternately, > allowing the user to configure an option saying, "I need to support > renames even if that means that notmuch new is a bit slower."). I'd suggest that the best way to make this more efficient would be to capture directory contents (along with the directory mtime) and use that to detect changes. If we assume that mail messages are never changed, we could use that to avoid stat'ing files in directories too. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLCILZQp8BWwlsTdMRAiyvAJ0TB0Pv5dX3bAQL9HOV/0xbR0QpWACeJt5N s2vOZ9o6srYaESlmMu8zNzc= =RbYF -----END PGP SIGNATURE----- --=-=-=-- From brett.viren@gmail.com Sat Nov 21 16:19:17 2009 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 D6BC7431FBC for ; Sat, 21 Nov 2009 16:19:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 m+Bw1VKWVQoh for ; Sat, 21 Nov 2009 16:19:17 -0800 (PST) Received: from mail-px0-f180.google.com (mail-px0-f180.google.com [209.85.216.180]) by olra.theworths.org (Postfix) with ESMTP id E14EE431FAE for ; Sat, 21 Nov 2009 16:19:16 -0800 (PST) Received: by pxi10 with SMTP id 10so3264151pxi.33 for ; Sat, 21 Nov 2009 16:19:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=DJio+Ze8OnEqG5mTZOXoIUzSD8FIYTWRZIi8smE3ssU=; b=DbzwKjmkidvkdvY9tHQWkTn0BFjkysYlTutGcCv8D+gx7MXscsKzYx2+h7RSKoNuZB GBjgxRi49G9lU8C3b+RufiRLvwbkcAxHn4FsRCDYHrU96J5YBPRiO7uAk5Touf3TGsmf aiUrxdfY1nFXYGXm/3XHlBG+BTm0IdwtCgsIg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=RdL0E99RH8kxcOP88uaLIPXRERM7gBaST2jx4ICfa/bgVn5Ga6SLBxXyjHaPdGrDAC Db656dKlNt7rT65L3pZpGxLWxzR/kpM9yPZiZlfUxlM7wp1EXs7nJ3VpdIfsn2+IN8gn Jchr49E/1eh2EgIc8tCAnkueowX1ORXDSVlm4= MIME-Version: 1.0 Received: by 10.114.249.24 with SMTP id w24mr4879834wah.146.1258849156234; Sat, 21 Nov 2009 16:19:16 -0800 (PST) Date: Sat, 21 Nov 2009 19:19:16 -0500 Message-ID: <46263c600911211619n6cc54cfay39bf17655fa87abf@mail.gmail.com> From: Brett Viren To: notmuch@notmuchmail.org Content-Type: multipart/mixed; boundary=0016e64cda8cc87ff40478eaa87c Subject: [notmuch] Perftool run X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 00:19:18 -0000 --0016e64cda8cc87ff40478eaa87c Content-Type: text/plain; charset=ISO-8859-1 Well, the result is attached. There is nothing glaringly obvious and I'll need to learn the internals better before suggesting anything. -Brett. --0016e64cda8cc87ff40478eaa87c Content-Type: application/x-gzip; name="notmuch-dbg.ps.gz" Content-Disposition: attachment; filename="notmuch-dbg.ps.gz" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g2b269fp0 H4sICHWACEsAA25vdG11Y2gtZGJnLnBzALxd63PbRpL/LP4Vcx9coe/W5Lwx48ul6vLwXqr2Lq7Y t3dVSUoFkbDEhCK4JCRbq/L97dfdg8eAEigTgDaV2GBjZnow0/3rxzSQF//09t2rf1/mF9krNePs h7fv3uDF5MWL73ZZWuS71+zPu3R7dbv6O7vNdvtVvmFyJvlMsun/ZEv2LtsyYZkQr4V8LQT77/ff Mcm5fwkjvMHe04vbl+zbXVYU7K+rXbb5E/wD996vinX2ms2v8utsfnE7z7fFfJMX1zeLq/nFalNd /ysTygiv2T693q6zPfR8m15mexg3LbLNEtl8m99slqvN5bf5p5j8w2b5XX59nW2K/WSf3mbYMrtc bd7u8nV+OZl/nxffrxYFzpYt8WKZfZhUxAtsOZnM91lxs/1LWqw2gt1PrtPdH5P5D5tFjvz+mi1g fZg0lqW7XXpHA7CDu3wy+fHdT2GE6hbj0MmwywyIRba7Tddse1NfTw5G0AZW6W57lW2w1WTyAta8 YDdbBuMyGpgJtrhKd+kCBmBZ2RvmXqS7TVZgs/sJK/9ZQkf878Nqs/yQbwr6sc42l8VVWIXw5FXz exgbWmaf2PzNj9+zTQYUeEz2+Z5t8y3995mtPmTrfVb3+cw+5Lt0va4J9YodLg4tWPnP4mYH0lHQ HGAH8d5qk+EUJ5+p4fz96jrbv/o5v043LHq26N6PRbpeLTpufpuvl0dudfT9j2x9C/u0SLvvvPrp Yr362012pMWjvNu3uwb5Lr/ZrWBfO+idzKv7j7KOb3YMsFhn6a7ISeQ/M1BJ2pJJpUU/Z3sYYwEq vN3lC1ATdlnBBAehny/yfLd8hdv36kN6vVrfsdb+0Szgj/RmXTzRikYiUX04Zi3Fju0X6ToLEo3T nP+4uX2HpDcpiZoAcKPhYKrn1LZRClQBwbJPC1SBW3bYNdxoRJV6t9cEFu8O0Wm+z9erJejIL7/B MgCrZbq/YlHTORIyauHZAZ/rmzVNpbNrXhShq3isq32E2DXUanO72rP7+YfVes3uN9nHbVpckZox gI1d/kf2gHqVf2T3qO8xPR7zAgXtnklkuAbV/bhaFm2uyI0eICbebB4l7xDUH1CXq/Qy36TrfZsO G3CV53/sEXiQfYFYswCY37EJWJJlFq7v8d7V/iL8isfNlpdPtiH5fqrRJt+WTSp4hP/imc4JX7dg w9j92Qu2Yr8z+rWfnM3DRSNvZ/Pf4x+r+AfsEhOwucUOn5VoZXfBLguQ7bOzS7J6Z2dnjQbBtAlR gQhayq5zAKAcf01/nb5ktMcrHJMtbvfh5/RPJf33A/qvL8MNZLTL9iBwwAttQUszSN2INcyo1lZ8 jslZo7HVtD5Xu7ncpR9ZkX0qQMNJ6IucrQpcmi1YDvhNwjWZA2RfbrIltbyHx3gRblBXWCSiR4sW bjaEaoUCnVcLdxZrL/6mccJSh6a4sdFg+5uLMNvakN7CAERJyzWilWlW6nMlDfmn7W51TZOH2X9a 5IDBO3ZX/v1pv/p7xu7wTxhDg3KB87KGy3rnJMj59g4uaCKc7VD16A4Pc2sIQXkvW40W63yfoTq3 dy1br1fbfXaOd3BJ5ru7eB13n+JfrVvxnesUluxTZdnDLxDTgB+Ts0/sjhW7dLNfg882OYNBgUsA V5JOAf8py8G5WoCwZNUA7YlulkGXSBbpMlbHmohwEXqs07tsRzq6z/42OfsFVp1IJV4A8QZcqIy9 YkswfbBdKHsgZlcFXMOK/YJT47/hFfjAMwf/hh86/mHjH67+8dskmgQIC2vNphafSnPCxO7n1+mn cFmtLZvDorZJk7P2WHUDQeJZc7zOl+h5Ts7SdZ4uSZIjMEMUavCyQrPP5eZGMHl4K0bH9r3WfuWb 8pma+aFPSfYIVaTeprLhnqTv+u5mu209K5DW+ccWqR6wurUuWsQwxCUQ8TEblrUu1m155elACFH5 OeFXGTuUPtA7DA4mQrPHHJkK+CYCL69X4JuvV/AXoNscwoX8Y7nZInCrqAFVTAWE1ymY4v3NLmPb 5Qf0xRjYbfD1r8HbCOYOwjeKHLYQYuF65cUVPEJxBe7T96t9gbZ1N5lXvT/CzYyM02d2f7PPduRv 17fnkdfHgnzcFLWDX07nq6+//oqlsKVfffPNVxCYfcgYBIVv37G/ZLfZGuRtmd2uFugNrdPN5Q2o 35puNLxZ68bne1GzkLBrpWNWz2769dcvwfBs2PSX8Hc1sYNm33zT0Yx2OWxg2LIoqisDytcw7eq6 FU8qi/9K4xRT0vCyyU/gPW8KGCDfvGZv8x3AGOxsAK3awE+CealG0AmMAMJSQf4CILZypkBISExK zxQQOofRM6Y5/tuA5AtY40vAvHJoPuMQvMZ/1so7kbrtS9fyaJWaGaZE4me+9ACYVgmbPhWLv2SR uR3G2/CGt0wkm76H511XQf7rMugfkaEUEUPt2fRNvrjZo+uEOzg2O+5lw84Iwabf73KAnyWNsQfX AXT8639jNjEsvdj/Oi0fHH2q0eZgVbS/hjdzQBRv5gDPXq17m3ntq7xg/yVKgRMt5/7o/ErJZkIm nkkHgl/6LEKYklB6IYGQJLYmUJeIUHspLAQnRxm7jnURwlpYGOm4BHNcLozghk1L+T6HKZ8v8mvo tfzyfehkJxWxS3zEDtZ6ytmvUxjkxSmb3f1MzhETFzEBqJrmH0ioTQLMBH+MXby9dsj2WosqLJvt BX0mQr29SLCu2W/qEhHG2V7M48lE8Gi1HZumy+U5BJiHwt2Pg1TAgfNn3U94COsjFokrdxNQUwAr Dxt+dDPFq2/qDZVPbWjt0UUbKkrlqzY0EKyqboEhK6+URDeOWnXu3GMcpCShVfKARyQ0UpiqzQMp wYTBoaxS4uUfw/4LHlV0gXO1hDqyD5pNw+4eUdBkgIZqiTJlow31NhDqpyWCdDUhdGkI42io4hDB WqNj+HUN/C7TIr1IIeokbiMok0oS4Kf1M+qrMrhQKmJhZdDXxDnE3pl6WlmrzZ3BavTQV6MO9NUK JAg0vQiJVuMVLEViXK2vsBnYTYFWK4nL5D1caURqcEr6aLXSZkbd7Uw3xl7ppC1rSnl8TminZvwR EzBQuUeaxTAd9/xAxyEAmKJEdAuCHGSC4Um8d5EJ5oHQmGAkWB6ZYNcijORhOVh672xkvQDczs/X q4vFOZ4vFOfX6WoziikmfPaJfU5jnCTExNohzpUevLPcHuwst+2ddda1dzYijOVckZ/pfIR0EuKa cbfTuefE6nI7XaKHbKcExNZD3SvUvJbv4WunyitRXQk7xL3C7m0ekdiU/g22eSb3qjf74e6Vl+7Q vcLt7d5TNVBFldBt8CVCrKJKiDb4xoSxVNRSqkNFaCVBhwLwjqakCqb/7EoKqzMIcxUoqRyopLRD sQQr7nR5iytfXXE3QEmpe1tLIqsdtITaPI+S9mc/WEkVl/w0JdWwp2Io8KJhbD2wM6a6Ve2pdFIP AV7s3uYR5bpK5MM2zwS8vdkPB14H2HPSnpqhvpHlHp6n5R0FUss/MtZFJOrYIp0GwLPORSg9DOOT mdcxetVZqPNdBpK1X92eEt92Myz9JgMud8MQMTnpg8lHHsyRaJnERHxOzkwZ0GAzRINp47xvxBvz xAYgS4Bi45WprpxvIt2SQvdUOMqBnjiUE/30PIGlQs643SqKu3FMmFKTxk5mQiIfPVN+fH0faRrD 9D4s7kE+C2JtZc2RtAcfoPhgkZjUiYoVX7mKVCs+kZSMSKFjTBpN8TWsgrYi0g4kPUxtIRDAAPv0 ciQAAIdIajxOa6m/H1f9Cdy18rHyB58sUYmRwMzomX1S9+td722+zaH5Nroy34ZX5lu7QeYbu7d4 6OSB/dSPHV6MY757sx9ovim+N8LGh4ZgR3B/j+jxkINBIUmP6yy8RyjB3+Wjhd8qOiekDmrccyPv FS2pjc5cBKx7rbulupLqFunlCDEOD24Cqu3zBVIQohATHZ8lBaU1nktUWq1mydNKO8TnFl61lVY4 lDIrGfpKWAWPrw6Qi2Z4Y7GFRorEexzxDS08Bl8gHb6XanNnZmj7NTowjdngSVvioJ2YwdKAgtHf Y6v4WNMYpOrC+kdVnaTiyBHUUOcNscweghvm5Msr2PPySvIh+I3d2zzi1EsAUGzzTPjdm/3w8Mtq edqx4pBTRSHA8voGvRM8QPKNENNvx5tnpw4R4ST0VuBfdDy7w5Npj1kvW+O3g9DkDfApvoNgK999 OZwe4ePJRArnTcQJQGy63WW3o3BwYBCQA56Q1hzQw5sqpzwitgQn7STzcIwb5QuFEyriprggE+Gp auPXqU0eYdgSIYCF+vwS0LmHjSBBAr61jUDgd4j5Ao8nHdiQ8srZyEYEisB7gBwOdgJ6arzqd34p MJZGzoloFqQS20REXoicwdoAzc3k+OnzsaYxzEZQkITL27YRYLT9kUNM4foDCniaTJjmGNtyE36X TxZ+N/AR2veEE5D5LrWw5DcJY/ysngwDiAl48j69WJ8QuR3jYwAfDSB2wwWkFzNF4wyPB0oGZKkZ 3knYQLTAWJYgT4KRY4yEwn1wESNwMUJmyCewacDtqeAQQaSWnRkA3skoEqyNrk1vYhAdwCgm3GEt hmfWAUokukEQq6ELlj1YbGuVYNZCE+N6nbpZq2a05M5iUqYSYvR0YyE2dmYFtjKYkhkZO8aZwxDg gEVG5bFOHeCG9EIfwQ3fHzccJv00+V713icVpcIKpCgZ5YWpV4tyKn74LrNKLh5EMODiNyXHYFX3 xWma3cUgoak7Fw2PNUfnP1+cF7vsNHDq5oFBsVBggyIueJj4n+fZLj2lOuvYUkFDocDbaXg4cHbA pEnCqNNcnWOPY/FhVBIxAvMZMMrgK0bA7TF2DzCqktMZGISTMconpQNc5zsAgBIhGB66CWM981ph 3rBJX3kFDo0G0PIAZUIDRnmOTUSvMNiDTArsbWe12x7UBzC8SrpwPJYD9QHvY2x8Gs5/CDb5gE3G uwNs0lL7I/UeA1JcDqPbBHzwBptwQwOl9mOAYrWIsAl7tSinYlNXUijxaAMhjuFNhQA/HZk6h08o Qkq4iBiASE9v6XX/cXgglIMTE3EAg424hLJ5vtrss1OKHY4+DW4DBEARJ/SgwAPuKOzsy0iDgbYQ +3H3wINSiSR04jPxJDrVkorm/WR0cs630MklCh0nzpxBDwpA0iE6JfBHD+hxGqJm7N0c+k8cevCJ auRe41dFoA2ixMjQM5z/EOhxdDIFi3gIPcp6ewR6BrhFYNfwPEQ2h6X4jhcR6iJvJIDg1QTqEhFO gx3RfX6kE4qpJAQCSXNAlpyKPMc4mMABrEfDATMn+Rb8FVjQfxmJD2KzAP+64YJukRXhwP3h+Xdv RniwJRIZMXIBE0AnFZ64zdzTiFD7K1z3zcy46GgZc/bCKUzZYpzhMPRTHG2ck1FluURNS9C3UyT1 llGdfCv6ApuPgYIRiHHQ3pJfg5kcjOmbVuQRIRRphKFwZX1wippWXjOq9g9XWH8NV6DLUvU7L9De zDSWFSg3a3Iw2osDDcK3rwSxmanRM0HjTGJQHkjLkAxRKn5fk02dOHJSoIeUU4J5xUeJD/c5+s2B VB+QIAlkplXo4w9IJ8GX7wweQA0CtkgYu4kfzInodYwBqpDkSTS87hXRHeHBqYIHHkVHXMDko+cU nKbzmw1+B+h8nEcKyXKAiIgdIAkEd5aQ8qE703vxyK0XWM9Vc0pCFltLjpUQ6gucp1po+72Ew5Vs eU8goRjcaUpPox+J6CVsmeJsSpMExkNYgigoaQGaGNpL5+JUN73BQ/cQ1GgshEqp+1U6ADAHZNEq QhbATdSz+LzdBmTR+hngbZxJDEtzO3kAbuFFnWPxoBmAbpLTcaeO0c2rmlQ9MpGEiaAsdGyRTo0J k65F8MGgJDPwYQYEhd3jJyI4fzziYHzPjFU3G1pCrDiI2KAH8wDhxnosOj4D9ybiFwJEa/oFiN28 gncr4K+Gl/eEcUpwzOjLJ140RIwzDcb1KuYIR1BRpSHqpTOUmUL4wzdXNNZZttxBg4l368lxM5R2 xmSXPnD0qBV19godPcxQe6MPHD2PCKrx5M9jLb6SeEUun+mHhN4nmCrH/rPmwTwVkuoGhLwHzSPo RawaGwnHmcQgJDRWPeroaXMkPjVDyrcReltIaN0BDiKhBXnU53lAUJjnxEBnHyIgVg5cpPsVvhiJ HxYbh5E4RECshPi/0fl42YV9smdyrItTYrqRjxv1pchnhgTC4XDR1c6dQV/NWUqnoCCbcGFjn60i tC9Uy/mTZYSMKCYx/SYHIJlMSMZMVGCl2/ghedVi/Er0AbyH1T3Jx+NTewy2hqTV8FMJovW5Ezy8 aX3uBAnWRM/ubYtwYlzadfAOYiMw2Q5Rf1O+Azr4v+l2lZ7wUu4xDoI21oJ9anig6/Y+213/WITM 2jicuAkHxybihG/ObPP9Cj+ztV7ti3P6tNY4/FTgl6j4yTA+1f3i0yfX0IqIUxmfgiW3BJf+aQSr U3k9cvul6yaTRmox1eso3MTyOUI4gS5Vy3XDT+pg1ppStxjOUkoZHTzV880Z6SjFrmT8dQaJsWzr 6yug1lS3If1zfCNipFkMCz0JNuIDAQw9geWR0NMO8bc0FrdoEdVJCIU7G0j1KzJIUip+g446tkin eV14qNL19RRPjpHygGGyXgdzOoYdZYLveylwwRoWWC/RD8KOM8JPqCCi1Izws2vVCcQ/j8TFE3Ip y2M+Cb5zJQi5TqzsOsYqOF9KJxEr9FuptkvajiKNQ+iyjfPVo2qiOoWIvh9HZY/KhTwRoFj51t/B KQTX1SkEKTGVgAh/cAqhqAiMNg59NHqJSHOqKOp1zgmdHdVgQf+oBgvISavMAQiCqrCwTmn8SrDR pjEI45TVDyou0DtL7DGQG+CdSYF2LLxeUz6yxDdISlKVTAskrmMSdYxJp4Kc6VgFsJy0ChwWg1fT 6nH4eYwDWi5uRDQ+vnzYI792jAlWZXPlIib4ikGTXBvrWcJqSRMzwhJ4mfSDt25WIrACA9iwquDN OtlRJ/sA3vwIWbX4kBXtVThkRc10QlKl4iG8GTpaReDCXFqC0agiB651MEpHq5oOGbBMN+S7ebvI TJhguASewuJ5LJ652vCWdJShwxIQQXqSUB6GqtnoSkfz8jhTCPQw143epREs6JuIPqog8U0+evIg u7AHeIVa6ZI+sAtKRrUb3LnIpZM4M2DuGjVXVDhEL2KN71iONYthmbxwZKvtAegac6QANxlQ5Ibp 16T5vKsLv6qaGox8mjc6devniYGw6FJkH2rOnKjRT/cr1+/moXHm+FnOmgc843SZrUcZHBPkiY8f AODb9vmGQzcTQdVsLmKS8LIC1qovhLpaTGa8d41+UgehBk8OnKWMNkannqFjF6Mc5tkw/MRzhgS2 gIpI+n2cxYTDxkRGh43at2RVh4NGYDD+aedg9kMwgZb1MNQURh/JkSVDQk2LCS9jGrfTYh4BCZXb GQjgBNUE6tIQTkzsd8o8BghGq/pYhUkHPstqszqpRrRzeERxI20zvONY1ZcEhTr+jSpSqCY06p/W iU/kUJvCiZylUi1cZkoTxr4DWfkEYRPfehGWUtRopLAGvU/QY7UJL55YH0cbFlGzte1YyYSvnoAw PkPQM9Y0BtlfK9WDV2DQ/sI+HJGFIV/gVughtjM7UvLDzA6R2pkd6vg8mR2p3fNndqQy/5jMTmDU yuzQZ36r2tJTikuPLlrSkdoxPWOfblbhyObx1I6yX4xfdoTUjo4PU6islAqgKBmN4QimY9pJG0pG K0rtUM0nFpgiprWiGokZVvwfH8AV1ZaaUFaFuY5+yWsv8E1b/Dj2LIm+HY4zjXMq0tH725R7Mc/w fc2RpjEstcOTx1M7+sjrwQPeDhYcv/0Cpq0BOQfRREmpX+pDio6SOGU33Tev42Zdtt9DsC9BLFHw 62IjMP7nh5+N2d9tFqd8hKmTIX4vBUxXxBDxVPf60lMnE+WBiZERk/KbMc4YiwlfmMDx4/Yhh6sc PxDPXfRJP///tX1Nrxs5luU+f4U2A3gzAr8/GrNqVPegMYsZTDfQs2jgwWm/yjLKaSeczu6qfz/3 HIaCZEiKZ5EhIJEOxVOIIQV5eT/OPUd+0+XMJYbkGYAC60PmZe2pBx/yvZgpO1J6KLTYr2GT+E0P 72I7Q2CCqhCbAcCZ/e/fPn1H7PqnhTjskKF0kqF8aIcSb/jb62+f3394ffn49cMfUMs9ZChQ0CtQ set2suqhyXr/p7MyiHXt96mT1fzIZE2yh+VxUpsM9jVdUz3ltWyo5UB2t3KghghtMsHsvLr9fJVX zoPs7eUdR7dqTo091abpKZujtel7pfhMd8xOw0My+iTFhPTfVm4SBxoNuuUgDbkO5dfk1c3nt2w5 5dfkO57yJEfHnn+SwGdePUmt9rgh5VGursJZjziWpjDFmS4gMqx+GVhBG0qzmBzZllPGy8yDOpFW 0CyS/R3lgYC60hgllQL4A9en0JK5KLCaoRNi3cHQGQeHIttncMocdRuTYHtyX1m1mQ7G+z2OKj2j jBHgz9i2HijRgr2cWougPGVbl6JcaMddintVJ+1R65D5d061GGhvOY6UXSdr8COb5f1xIUoCsoU6 rtNISwztyfeH8VhezjbDLJuyYznpP97ZW22SVwagPnYw5g1YADzT1gKg0m+cZk0c05C8AyDjs2ls bTuJrxyvl8Vir+ZX059nztDVsWgYeEKl/6DbmOsT1Jpkk0r1a5vPfAeJObO2ddabtZ1BLtkt7XKm W9nlsomVfS+nkvmLh4CU4mVh51sL+8O31/ffX+Wib3WtPyI4eD+rA9UJWeO+uQW43WZoid8fxeAX lJha99kw9KLYH0Fkc4Gvz/6sh3qT8Rjb9U2VQafRM+C4vnOpORs7SAeMxjN8UXBw1lHgDdjYiHtQ WdRYih4d3iJ3wC1McoW6zapG6QiPeWdRz6R5xJBsN2y0mm827HKqW9blwollfbduiq4cX1a2aaq/ uVnZK723DP3XEX7vu4NbyhRwTT8zlJbdkQYcq7qOs6xqUwgHzBtdtGVVryxueogk1m12bePzsqpN ogfPdC6efhpjeTQ5n8H9b1M8Nyh+JJm7RWWyR8cJ116+Maemk7jH3MZc8wTkE65WNx73HuN3E52N PGIF7wsk3l0UAsHJnHAg7nGOi4VbabC43mUWZDhxIHXIED3UeYiqD3EpPkcur+126DVsYyEZCW6S vMkf3/F3xB3MRea3QzGfst1TbZghdgB7EDOp1bKHpC+n1riLp2xr7MuF7akHcUN3HZlQxJMVLHv1 2WSuXftsv7x+efn++u3XB2SEdwaOTGgbBau+DgzMT7JDzSf3BypJOgWzvg6UFmctBoPgz8Q3mGQ0 JO+0nar0BVW25/rs6USi8y24MhUBTxITbzqkQkZCBnwyASTxBkW+kFNJulZkIvMYaDmLSAmLiUF5 MKBwMIQmlIszIKEGQL5UY6pYpnAFEkRracVVcs+giz/qNubwDKTNMxCA7Ct9cQfErWfwDMCJyTPX jaXgEy6n1i/NU65tDy4XutH+4J2sRiRU2JiQ27xGJJQIWZpf5aqX3x6T2dsZzZef3KdtsmbM69v5 WjSAwB1cpWvEFXQkFvBvpWtoHtYHDimiAfvAfFvl7yVhimF3bEDhE+hvkgjQDWhWPjwFXVgNYUUI EJQjM5iwjZYoeoMie7vkrC+WaZ1qYFbGOMV/O37lH3MbUys/Ej907SVwZuzEfzPaTjnq7dpP9dTq EvBUt/bz1amD0joyGKxKVE26I7l15b//+FG+++8v6E89JLuSOX3R797lcOyxORzw7RuAtK5zODYr Rns/sOrXR33WfnzRNw4hHX+7NFSb0vUQzHbRZ87KBHwjqjSA/wBGLJNkLCZMwZ75qydS6W8nXp12 QQHXz8mYjq/SHHUbU4s+qbxZ8sz4yKTYadmakbgGBeBmxbt0teLLqW7FlwsnVvz9bHaJC7DbN3pu XlbhL+tO//vrt5cPX7/IQH98+H6opFsoUtvY/Z+q6ej5A3Pzr+NcUj5KFx6PHzAC69M/qxH5D8CK usignEBkUI5UXI5MHsPt+SJ4hMu7MdqN1Adzec/Ry3p2+Elen3BjOePx7jzVmeWcwGiXdZvAjaAJ LadWvwWnkm+RerywO/Xgcr6rhAbsqAb3uK9qawM8GXsjwDtNoFasUmuqAJH/5+uXR5HIewPZokGU bDMUEhbFGcFHHzMOGW6iaUfBNjBWSdr53fDMg26GuSQnAqhyxA0Jb3BjaEh91xk7RH1dfAxlKz1G OYEZiSOdyZHBIzMm9x0DW+lxeTuGBiZvXRQ+Xd5zeDwxOfxcHBH0TRwQn/H9J2sn6kgGemi5hpPM BOH18s34Gt7j5TXe37x+rA8i3G9N1BK2Z6PR2XXJnbhHO7/3Pp60OeLMNwOIdzxKLPbmSBCEevpI EkvQJtRxYHo8PRJzQ0lodCAl959cO9CFdt9lqq29JY9J27NO07EWrpLd9qHOVAvkIXxbr/EnBEJe b9TP6pntkWkUMssZTY1ocCYq1sxdOoEycX0TqmsZmVcweYPVAyQ00OoYasQ2aD9OZUquDk9ZjqpZ bmg/kRUprq45vNfymHuYMXnyw5ubTdhyD3t+1wFbWfG/VBM+orsvI72ODlvxUuLlqFXTK2fAWZyo vgee9WSoqzeWSEswegzMO8hh8fJCaNy+tMjYPQX5eNRtzMXUZvHa9NUGaOPOfJii1wSBBDzfWmxL 5UQttaGsYqtAJy9pTjy2Cd5PMheqtWhq6Y9Maw93At4foZDHRZJ9rKbcDjvge9/FFEI803yXfHr3 L1++v3778v4BNoCdMVgUi1U0iF0aIw7+3vdAuY347Mse68AgtbB3XrvcY8OwqzvY5sGjOYL+vQ/s 0BD/fp9AqhhFX6sLI+zssbRFu975TdSpwFHRReKRH4IUXBzsWDfy5fOaBbc42PEJPYGzwx/h31+p 2/AZ76jbzNQJlBivbCvyU1z7XJV88BLqPiuuXd7dvH7QsN3PoisFO4DURm2ildX7oH9/fwC4oalr oXaMHh50tncGSBevvm84fv/bb69fDvoOsu0is10HoKmJUdOdfyyXsDeO+LVQearjXGyN9uIDF4m/ fYoTDb37dVrCDxgwNeDwwCZaa3bIX4K3O1LsQVF1VG0kHkIkQzC5gtF0YnMpj7SeunwKhACLXIC4 7AC4ypzHZK8dLPIRmbpOGisCxEPi8GUzhoNQOcF7ysZ2bSNYe9Vllnd5+E7Zqqf0rhxxD3MICD6t uMmh+hh3iqBmJoea0d9e0sbVi0+XU6u7xlOqBcGWC9UoCDbfRwokT03kABDiRA51bwRkab0s4DoC 2DP/9HBX6u4Y3Km8de0omarLL799/f37Q3Z19+cqdPoyaXPn9OpFKOxRhNf9kYp3jYCzjrTQC0sY CCMb3kpj0OytVZwRNH4ifKuxegmNNkGbCwcNmL8SKWbiWAI1OQcBP5/kt6ujgFPJxzaEARhOTsk0 Oj6WPOAWZuPIDeUCDBGe8lsPt1IUjuxpJVJ0NXdMcfEAwB1l23wmFYTeiBt5ataCjChocsHgrdAu 6mgFvb9IGnnnFmE5X1jxxzYtb4mFATlsC632JvW6ad4SUk15tXS8vNFRtzFZ/jObLBSpv8T72sm7 T/jlhjIG3dZlDKdIu3Utp9p9arlwYuu6R2lhyOvtfUQn8dTWtTMCWcZCMwKy/P/6/fXXYz7fFBsv pr6OADzghYDooG/BHcu1Y8C86KEN6/4w8IK9ts0wCxFhtF5T2PKNjAAs2jpJz3YEblhSXama8UwN XmCMSUgKA2d0ymUPW1PlBsjiALYR8uHD5MnDscO7Gp/sdkth+r3dUgyUB5+1qx1yC1O5ckOAx3ZX i9bt2agZETb4YBsbpaze2qhyqrNR5cIJG3W/FMX9T2yU1XM2amcEVWxUHUE29CH3emcMU6yU7ZhY 4Vyjd+KYMVCKh5WyPVlqGrJS94dBAA4rZbd0qQE9aP/xzv2IU71OU+D6Rq1ULWGJQUJqGGypGcT2 PqVSICSF64j9UYaQQ8CEGsjhMvcrY6K8j5BDnHsC8vGw25jylag2d2WHxMt9y7tuKsAjDXHlKVda XLkRKiODrwMc2wGITB55W3eZemZ71FWAyxmg5A0SR3rtp+nouE1JFAWiAU9MIsm7XF8nlk84kYQM XCq58KOA6ai5J4OkEzlUFFr08BYF3MXg5qjkKcvVvkq2swOoxXEYJd61DKWOl4yfH39qW9SsAPV5 J/J4qz3p5QnfPcuMC2vz708ol+Dl8q3w0tewBW9uXh6lFJ8oCBNUeJJOfGLjnc+trLoYmcdT6ntf wZzEHWwGMNRieP3tmI+PyCz54FoFeksdho+v+PH/ftAPZU9eZvVG5t7YY2XuAdv3NlyL3DukG4DA +YFYYJ30Yyr3kXIHbcaesQDbCaGcEDQL56qPBQDFLLEA2vQW5QS+y7cpe7CWF93TSIJSQCoiUiIA 2zTSClStx7sijyiysK0RJLbBw1uOqagv4iiWYlj9LJ5BMhVt+0WYGue6SkJErjzoUiCkL4Guqa6S gPslWAS1YrK0oxkTGLlatAjqlBRpZMOJuBH0r0NVrFHhsXIC9yF3i00uy28R9JB6WBbvQH7OoOJ5 TUXRaKnaMw1+THmLOG7HI7nnx58rsxYVUa1VvyHktBMouRk6TisP2+dKpI2NH68vqSu+9rUxhe/3 j2yELVDvPiuyfKpEp6t4nvj67359/fXDb4+YuvsfLxPfh+bjiTZ0FOZ7swmK5idPAQBj2BYMYR68 pfQBKI65TJGB7U0GQgGaDKjOkxNDjtLWZDC5ioxGQpqiSMuAKLjXbEF6VpOIlK4hAIPKbzVbFLVe lC69x1qhgVvJau4MC9ZDRN4kyg1RHUY221Ns0iMQKDlFx1xTPEH/gLTNoWHp0U6+PZIxpOoKGA10 PiG0HNBZyQmq1ch7yQWt4TmMdYBZHcWBC8qcWy6O2M12S0bKsvqPThZPjz/laqqCHrmyLHrPsvg4 YVkgXWo7xnoJTZYzl++LM4URfbU3VvdnHgVy7PAc2ZPJ7hyq0/YwTHvv42XKm+ibj5dF8e7l5euX D68vH95/fgg3tjeMRGc+tMOg2ScXmocfAT+sD3UQzFzSqg3sHiUg0jq4Esqa5agLZdcz26MulOUZ We7yFSlFhgZxqPT1EahsPwXNJQ/QseIkdg2qltW4yG+PTLN24hVZ+HpOPsG2jg1o1GFONHI9ljrN Ev7YzrGRsIStafJcT3TYjDiLYB0cYiVymoQwCE8aNQ/M91z3VzQ7igtqwBpzfHnzkHuYskOOUhQ5 mK0Z2gNN+3kZlYDNs92CQ75EAETjMAKgIFoXAYTI2iclrvwirha4eYexGneQb46pjTRYw+wfCvai 0S/xnsz+TFgfj7g56jYmaUeKsvdWYEDvyZjp0FJRnEcqQ4VDJDZIBqTfTKBcclzYgZcj3cZmkS27 RVRZjhh/4cpBOXe5mKvRgAukYYDg7VX+Tvh8XI8GxYMnYB4Ouo053EP5ccMmMyvrb2cqzLgnCGp7 sYmFY6hVm1hOdXIT5cJhuYkd9baoCy167EoSeeWh+Pnrx78/CA/fG42yjWIHNlUWdawkXaQCpNfN MJf+T+s5mHFvkVNxya8PG5N1BLTpSCXQxGDMkyMG4xE7QXE0SDlH8PUV4xux2B0Bt/zuz2OdO+gm 5pIYhZCsY5MiVhzPe281txRkw0+5V2vA7wHesFRSckWmFDE3BEcGuwCotkzBkuYHDnrD1+VJwUxe r2f0AhxxE5NPOZ5vaThY69JO9UJDjkOv1TQzsH8XtHUVf4uE57l4ivRe5OGXgyb8WE7gL6ao5UVi 0MzQHJBr8evL5b7ZMMttmbUDITrSRMto5gm79jH3MKU4WX5Tu4FM72rglac/lUyL1GNUqx1HUls7 mfQR6seQQI4IIp0d6mmMUX5WXC2e6eoYUAvZVSR6jObsqB8fj1/bR9zB1GMt+OnrttY9KDyfa+2q GFGODUwL1OdKQCrI7SO0dmRLjlF1eYCISoMs5xQ0mx+yPPGshhZ0thr8+llsWaXXZ79Rk/Y3Gdz6 5Bg5vuwwfwNz4rFIHGezgZCKwdyBZ03w+oPES3biunMlW15XgDWEwioohO9Xw6Xou/LwaNRR4jGF rh9hRFZ6bxQkGUDPWkcxMsqfPz3UfbXz+bDwyqrm81nIXQQlHy7k3u1DAPpbSYxSx1kquRIleaI6 30g/wkrYqgkwgFNH8p/yKhcroVx5jbQjzQeLtDi42AGq5DL9l3NxAohDdo3aJNEyltgYFDhBiM+0 X1tmYYMQglQK3Vt7otiqSmOgLFO0olVL8vMTYabNMpDo7BxZ+9VgMTgc+3LEPczhX241XdmwZ3bc hNnxKLfbXDuif/KYNeXM8s3KGd/kAMpV7ZmDOOg81Qy1Ta4hZ4Py4MfXP39+//0QpjnWGKFq29PM 5UNp5rxmDdNcc8w5JFh/AOIBw7A+WagTDBoGvc5jn4jjzSfPGmNOJ7aluFZ5nnUBiQU9wB1wGMuB GupJ8a7QgagV5MdPs3ldNL60ceEdBy/lubFnlrAP+kbzCR77zhKeopJM6I+tWRzk4fF6bbWR10Cy rAlstiYPkz7dpTXzzF2nrM6p8pplghbw6iH2ovuDRLZux3YQ2emhubSQF70h18F15WagqyWi1H0k gu0VpEak7EwggGhVmdGzKxuuF68WB3DPufRaeWcoRGjoQFDYVYMgVsOJ6AEQwCtQFERrQBVIEI1v 3u/MpnSSAdXg6WmpovvXgRYIdQ20AFChSER+U4WighaAkyL0HJGFLX146PwfK/QoJQYz69yEcRpW qput2SOOy9o9IUl0wB3MSY8oNsh2cQUiSRv39CdSD7cZmLIh9BkC1Ka1k+8c0MMFR85Dc7yFx9Bc YmU5+LhaPEYkEjpsDJv6F8lIAPNkQxFnsQ1IfXTsV4cHCqA5HPAWbheTYzyHAkICqMbqDmtHFgXK UcqSIFmTAviurUgrcWEJ+QPbARtyZX310Bv0L1E3HZiqgG9hxPwFNVauNMFDuysolv/WgnEIPUjM EwtLTO/x5KqH3MPMTHY0wzI9wmYi+52idZiAaUOuUKxj5TWjzH3Da4bX1q+r2BYXdYzV6b5fZ2E6 4EawI+Oyv+exAHlnmELtZGNuhpEl+O4Xecfr395/kP9/+f7tASTgzliW2S1IbtWxKLswUvba++mo yGt9bL/TQrwsEQ4pmN7oLoIlDDWnNsC+XpzitfAmHi/BMkasmyom0m5DYUgyaSAjLTdLea+9mM8B +4GggFM31v4KwGzayYzfCI64Nsf3d8yPP2U3CjB825m9C7krT93PPPXistk1u5ZgLTxdKWRAHBOr 2vbBENTheLNYHPDNMFUs8nDODCG5NbQKFXPUptW3AKiT4KsV85jUmZNOp2fIbBx1G1OuEPUObswE u7OBxIkwySXO8XW3tGUDWT08vraVOIzvb14/Fiapu9V/pxmGigPYdYsOJVh3RjHL9pG7zlr0pP71 ESq9vRFs2TZCMwa4XowrqZTrxOfoSMtm6G0z0sL1Qsw0No4fiPqim6EDKRuHqXkytKx48U09wyLx QD2JrhoD4riTSBjoIv4i7yMtiNNDaG234NNkhTb4NASV7TR2CzrNAThzeAB1zD1MZVcoZX1lNtwu oyif/oqPG1FyW6rItU3QLDF/piuA0CVsYn5xjmFhALlVfOyBWXK1Cfs1EwHkLkuxVDQ1gTeD/oVc LLYllN27EV9gbl6WUo0OSvCAB/cEaP9BdzEl91jw/VdlW78LoMs9GGMg7woAJJ/jZa6wBU6cB7az YK6gD62zFOyEc7L/EkHgcjxRvQFWZQiMYc/FKInHveJ+yhSuFUPAJYh3lV/+FknkLBjjiHuYquDS BF3lYWPe0wDJHRjDDtAXpMz4cJ3ySG/Qtcqa7qNbDpo023JCMwuFHZU05NqOsRsskh+yX+aGB7zc Vljj4YxMVCz79/Fc5Mfcw9TiX37T/ukn2Yl32AsnCmlaiaccWwXvLAFlbPW7cSKkFjeLa7ozjzmZ 7n5dWjHRGCGZVSvs+tHenvsDIJGMJV4/3amBfvKdAcRWRtAkVxiC+K/ysF6/PVRK2BuBPxGQ3rV4 D1SPie5OLmJ0JOICwZ7teqJuOLAmGPRc5rPd92BhmdYJOgQTYyIV4nLrvsSCvi6di0bJE0W/c5sE ZlMmKvtAy2owy5LotU0Cs49cK3laiJY1PoW0Gk05IpaObH0KrGnINw/IC7fAJYe8rz3BrUrMEeOu xtqlZVbK14jydCsNfFmLdSXajMQoVmc43vbN38DUtmdvZ2ZN3msnyj1d4kCKpRj3mo2GMqXMHFeo eEueBYwsPQ0i1MA0Ikax1cjGGLrAkf7jkPcL+B/cLKM94J0Xv5MOtmmKPA5IA41bSgCLHu3+HnUb k9WmcANMIgt8x/+1Mw0k7J421cJk1lpa+hTYitBsgGy3DoP7n7mbMsgUlpNf2p117bHwbZrl5ef3 vz+ykewMFvkAVTMUevX/69un768v37++yFQ6aCC6ChInhnYoYFdUSdU/uGPt/X7M1eto2t8vc8fy qBKDCeyNlAtMio0zHCWk32g3LKCuIHvM+joK3mzhbw1KBrDQiIuZSTiKA9Qx0bO1vgWbEAifMlkC 3FKLN3aoxQW/FEnMbWr4TpkM6Ca+PDKsDUu+4qN3nEPuYc7bvs3alMIeXHaCpAOEC672O4CmCS+X L4WXNjWOd2hfPgqVvcehQVWwk7Ou1mApSvg4PenuIOnkjGqGkC313cfXz6+PoOF2B7AnJF/qALAo aCkYQsreHUbWMrLedZgL5VGi4qG9oXB2bU6mQBCkFmrMSeEZUYDT54KpibQeja2IgD5iG4UEuZhD d6K2S+siB0echDkBNid7mTwuUs61OAmE9RBZc4AnKL6lJxBBbjiJiwjEHYhNvLy5pQYBpheapvDH nTywJDYMGaUBg5VcAOmgcy3nINdP7YZJiOx45gm0hwfcwFwF0izaH52lcuEt97jh2xqYfKSraSff hdomRsrXpRJ8dZPPmTYsQ9+H2XDYgBtGQi0wwCySd2gC64Ivr10hxvJIPYO+Bgc5VAjX5XX7b7S6 +3uQMAXJu4DdV54MsKRDk8/BLfZZNV4xOfaqecazF5fYIzw/3DE/4AamqhdW3aJ68LvVC06+lVJV j0T+eWErW9toUNskrF0TOkhgVeinn1b0azmfItVXPDHvxWca0lWRX5R+ivzADTe8YvpBtrWaFsuL pxKf4C0ddhtTsZlCZHwVm8lv/OZMcFMuNds6GpcaXLMIwpNNZacjd1ZrYxKDNln7AE2g6wxqku3m lW0BiWbZnADYI1ivg5EqWhZMJAj3AE+qQs+hStsFZKDYOXwScgH4yJaaj4lxtjYmz7Y2yirgrob0 EnyCJYBaZhOgEyuda1M4yKk9AL3uGVmCQ+5hZhqKf36TAivpvX5lTEPvp1wxpv1XBdqfIgsfMjko sWHF+/Fpwxa5oHXsybJ/AyKxcUMVSSISI+5ROQBpr4t9fEiGd/yZfW40aYC3YtmPTCKkdB2p5io3 omZKq5G6SBlLFQHmE9gZD7mFqY6lpG6GfjbvhH5hgsietkisdW14UFT5TTWrVk5UPNtyiRrsebif JwFAn9lW4HGrnnJ+tNCyNwJdPK+bzxdT/e4/Xz88FmLuDeFsSRnHNttT2HU/ffn99dv3l/d//O2o r0OLA+rzTQ7L6GNzWOh6OJcm2eskllHes8jzBtMlTN06Wcd2XOv6HZfpp4iWnFSYydFO0e24TEwh pMxwUxA4ygu3Ibxlu4gi6y154coRV8YYV4syoKzBII0hwYbdLy2DdU4f6nhbdsQtzKWxws32jKTD nqBnV5nzI2TMCr0LtnLh87XRyx+YNZCDmMZcHaVRf4wpdZ+PFon1JyU2G+84/JHOjD3nYWtYNYm7 ezIWII72FAzVPB8kREe6pxnABr3EUTGnslq7FhW0dUXy0aJMilqZeLkkeK1vESvJhk1xCAvoUAd9 ci07LN7iaE3E2SaDrpYYDoHeyLQBFb945XJ5Q6ijoznZBiOsQwTCwxrzhHatA+5gagppFu593HjH EhPvTCDdAchGtgwmJoOr3jEcPJDQR1h6tPVTU9WnIac1aoa9crluwt9I1oC4/oJRMeiVd/knyMQd cw9zZfJwk2gxhT1Tr3tOlxEgqd8+W9LwIwlN0XA85FxoOdckX1rkUAJC6CCWAgIVHSmnLwz88cRs H/7iqOTTBOHsWUHvuyXgTv53zfkAFCLaX0wsqKzyljYKM4yWZCDDEhz4IfKGFqJU+mW/tsA9mnh5 SxuFkTkCBGykuxWrZQCObbNP0PqFqT6VLtaky1taN8kARanRl5MIQYmldUc3t+voNmXUinQRB2Y7 R58fpXBAPIFoF2mNqx5GCbpRRKSagPO05G1eIrGt1zFkR68jSXf0GHTvwnkTtpw3FTKwct7kZ5Lu jN/AzKKUGXMzlgx+B7NZFqVedVwHOPISYiyglNpCc5S3kjQeJZ9y0Eyb5YRFJQE6RvmUSPUch5zv FMUaYXFHc04rWpa3FSrxSJLfhfIbaAs83FU75h6mslFE5OFX3bhs8KDemgBz4KXyLStwhUqvNBWY CgEbMBB7PROyoTAeLK42BOzHBbrfdeybS+KKmgu6GE531bEP4Df7+g1BNMy4w8B1cCmSchtAw2nz WrjUWALLmXSmpRU3va74C06p8l8Dp8R7hrN+fOB31G3MeXvhFmAcSfE35l5FuegRwDjnXpUZLgYF BWHyc5tCTtDNvOwp5WioR0aex5y3zYtKL/oRcuSXaafILmTHWD4RT7kFZdIo0jOP2qQalVoQbRY8 nMeHk0fcxFSOIN9sK1Bv+o1zgimJprn6jcweBWtO3KsCcLN0E9tZUgQ/UbiBL4hd3IaeCIx2DoIA mR1K8GDChhIoo8+NDWxKsRM2FrxUa+PIDIIqUoYxtApzV/cGLhVhA9kv+Vw8sL4bqZUlRI4L0YO8 AiSirTRhaWDwLFs1bjSjaNS4apl/R5kbzRRweIE97YpI8BczvgjcxITvpu1G3wmUKUmZUopKivqB bsMoIasyWlpgcdg1LbrrlVogyRA4VeWnBcabfm4YY2OUaxPmPQkfaipFzvaED0GDmQxiKceTox1z D1P+gVU3q1VG7RRNufaaatVA6ycx71fxOGO2eC9mi2GRsCzrlhTMV0IKiNDcifQ9jODiZu1pNhcC 2sGCPV0LLKNBcn2xmQUMacGAu7Z92zJ7Lw8QdBCWg5zd8cz6h9zDJK3+zV1+T22DcyhM6e2RXLmb Q/oyh/y9ORSozGpPgdNMQbBrE9Q78hiIR+QwdUDk6PRmDtnMHkhzsjTkMtDCXjGE4SClHZoXFSuK K3+E3/BHBHJMaNYmD55Ch9zCFIgnLrr0tjdDeY/kO6aJiie5CVRoJOnQjoMTq9XliZa7gZfoR5yf rqp2l4DNMqGvlacjNlHxvDuCCWs5shkBv/DL//355fu319eXT18+fHt9TMB7/zuVSqHRzYgSi72D 7g+rknm3TEj7ENOUf8coIFX0Npw3tkklqmHzB9mKcaIhS5NqkpU/ksdxh+gp4wgsJL9X8gXxWkLX DWWcK5iJhTwu5CXS7DBhhhXJTC/PFslkwjUAlhrbk3QulKux8yosfcHQy8CRdDU+xbc56jbmAlDr CuvTBpsqd7Ez92YMi5iJU6sAhaIyXtdSqz8BeFNxFLl9/ZhRsXfB4SSRg3poXNHhRj1qUfY+Pljx UUPz8YBQPNytujtCOHmZO80I5mH5473PhziJ7P+mGSFoIjTkIXx5pBVgbxRHnWjnm1GgTENDBLTE g5wue0OBzF/mUmqGygWbkSR6J3X2G0bXIO23Gl074NgThRlqspNEmVTgREEgkDoTrIWjGRMfydLn VMvSBwW/bo0VvWlx8p7BFHjIPczV4REz+g2RPp7xG4+2wdsPPNoMhsf6ZClYLHtXRlQOFWg839Bm MMQQspAjl6G6IQF7GNPLQH0EV2Nq1+1cNspGVj6DeQsj6CeQ9BxwA1MJMi6drXCC2c2PmT4/NqJg Ry6FlR/qJ9LQh7Q0QwTCkrPp9XaRfGIHBeJPdDiQ5hRJm/qWVJa/HORyAIx0h8uAKxXM0ugaEOXD aRyV5DXOUBK3EduWc5sUCwDpi2zu4Ume2fFnU/BgSvAb/FUMe/U/cwBiR6V+H4CauWPOU8u+TtaC QM+nwbTHUlVGeZn8gCxFmzHSJuRFHDEsDTGxROs90sWScAMR2BOwNvN3MLdNGDi/LqWt77sTVJsZ GLGLltq2q68fyuvV1Yc4cuX/4/vNKB+guU/VYjNcO5PFWleuEzvURrozilP4eQ1aX3z7+8rPccwA liKRyBHXARhC64VH9lrQcHioiHAdKcQ6VPb0HTNW7X+8i280pxs/M3FQ+udDW6cOALs8s04e9pY3 IhrlqvbMoyrecX8CUSIzthPo1/efP3/98JDG9v0xUJn2rhkBGtvW6EyN7Wsti+GB2JTrm4GAf2ZY kCN4B8IbjcLGIixY8/12QHcLhKdc6msdGq+tWf5ABkIcqFGKEi74ymXNT9O1MUNeu+UdxxfaJ8ae su/lp9v0uyXZL3ce5QwXCWkeXPMQI8rprjHoPGErbWW5pDnx2AqN9/OLCcUdZySiXbOLIL7+f+9/ +/T+ywPrZm+Ioh5hmyHkob7709cPfzyYJ90bhK1XaJ2u3yOd3v3Ll++v3768/3zQICXBDOq43Eh8 xMJe+9vX378/lrXZ/dHKUPBn61CyX73zQEmAleA6BzE8mCrZPd1OA0QeNG4oOMO47fejGAfjtvq6 dkQPNkWqgdWFwRMOJZVyhDpROfJjnSTAiPlyeT9Gs/hSiJf3HG3jZoefqy7GW+VFPN4dIpQpb0Ri 3tg5I2LFYueLyInWEZELRr2QeLb3N27mDsU22NUARep0f3952BPZG0d8PquaUcA9B3mlfEdVa3gg 4H7bcSToJ/9RiJr8R/vKfsYDGbb6IWYAlVj2ZtP7IVovfkhe3JA044Wk3hGIWz8gPcsFGRl42v/I G/fD+z1RLhMmo0v05rTRJV630SX0JNrosnn9aHR5/2uDWA7iFhXTO1St3RkAtDW++Xj8sg/XVnZH sKRAakZQD9dWdj7fJuwFYJmvI7C28q8vH769PqQ6uD8MAmQox9RhGCArH8YC5PtDMUAWS9kMtQTI KVGX9M0oKsDRWBtf7UhGFisOU7pd50VpBAc2LQdmFLkMM4Kru89vEjjFkOAdzzFhg2NPWzHbUnti sUWX9pLrYT4/SmuVGmtmlpynibk8SuS87aAunHEaIB2rbZt0tlrO1G0BiF+FN+VnsCgccQtzXJ2Z E+ZKT8vuNT7EvvFh5MkuQXD90pEQEMDJo3flAesintY2IrA2imdO6LGmGrUvaNcGLUINOVQPqLhU uh48SyVjZItysTuz8aFwGF7u2RPh3uC/vWwXvC/7FAGdo25jasZE1kqum6XMLloEU8ZOIZUkxFma AtfoCtwDhUuFsGlU0rLZdOtpEgDJZncyFMGQEFSOKGTZ7ABy87FI+RlDNJPE/XK06dkzFBxEYdkw G4cyPt/VgsWNIQ0Rsk4gLoKCNbhegBkfmHpyrUNVNbvYVFWNTgVfvjxavEZdNXv1hMLuMfcwJ0+d w20I9p5sEyedrywaIylZUNx2ky6ri50qJLDAt1FmtbNTCw0sEvbEGKNxpnQr+DEOM/mhz67gl5s6 2cIpW/f/bKkhCuP3hFrdMTcxZX2Wn3rLLb2vrwAdnjWqOpuReVAQaHW7AjIeqkzkS+DeIntNX6mF iXA01xkKTI5SUic3uAVZYNItqSmbTjWGd7aB33qDRjUHlNMTBNyOuIc5d0UMcFerxdMP8gu/8fRn 6/S5PNv16asF+k52VWZHZCtA0NFgZMVDLZx2Ef5VkURGI+VQnb7AqcBI0aQXoeHUlckLnMrK9v8E SNch9zAJVAVCm9JOfR/OnrOaO+4EPRRRAngMkpPV46KPYKjcSYQ0dbZ0r3PtSDoIt0J2BraHASPd d4XJdGBzHJL/ECGWmSY+gxmLZ+RagIjFRDYKEHRgcpW5kXexEAC0Vj5+izjkHuZCVXacbmNVq+ze DpG7tMMItSA1+fpJYrjoQ6G/4EZRYpXOPfWRePZYeFVoRwi279xTHdwySWQAmh0D1H7YcHNFOP1g GNPk9CHXJ4g+ummJQCuj6RmcnGzExEFq2LvWE/2Ba8JsnrCOjUJi59gqBgLEQaYoufaMq925cjMW 4EuKNbeRwLRjsn4CCcERdzBXv2FJEMpDPT2036tT5z6oGpu1fjtr3TprQ9m9bsxatBjKLMRMI/cJ NrrkN0GVzgyXQLpC2lSFWQfVii5cImurmEkJm+RABjGAVOax9JxBIwUJUUIj/2fAe5X1GiDLu0g8 n5HdPTxaOuIW5nzkqG5K8Yjr+cZkakh+R/bJ4ge3k4kiTZQUDO5i5kLYGjcSzbFhFRw37DCXv+dB TGOQpYQGbfllq5N64TO4LOVgyOQgT+QJcdIBdzA1AYK+PQFCfMuauCmlgyJt3VsTEsdRBTsVpvhb e2Baki9y53Ss0JrqzHZ3o3iBXBspWYjpkjct9Gh/TpqcVCjlYXsKWc60XlmiPF6plEVkEm3uRQ8o lhgAvrVJUzKMIoldl72VL1I4g9G5ZFxpbwtqMLZDazvJ9BtyCSvvbdHPVjn5a0Bd7Xhu8gPuYC6p aPItdQS/B1/ghJ0M7DxpFtoJW0hRMXOYLdR+2Qi7qeidK706y9/s8q7O0UJbNBFYeDfFWKlo0ML8 vUbywBS6DAQQbKHu4kjIe9DRgoS9pWgvgjDfsvN4ZPCRaJC92JZOAH3C0xutioCoGhm3RkBXghPw qdWaREYjonh+T5DxPOYepiakp5zdlT9m3pyQYS6KWBSZa6rBwlZpbI6GrCHcYi/9JTWQZK9AYhZc LcIJ3HfRRDqUcHDxXJq9qam9RvsktG6U1GRaIs5HJyVSxIfnHA66jbmkU7rNVu/CHv9H7nuzR+h5 KXDeWifH7dSSYYlVCltqpHzgQzsPtKoxdWJn+Ldt/jaoM5utn7P5HHITk/Xt2xQvea+oZfU4UMcU Fky9cisYwyC6iRB4wtbEarmkOfEQWCffxb4bQ3F4FZAZb7qIH4UJ746Ar5JtM4Ks0nf/+v3112M+ n/IiSbXfIIwAhHfHIP2GDbEZRfbZgYaZ/W9SUMiuGQVdFbDrQOtcN5iMjlSmvJWtto4UNdE6EWUq tEJfwxq7BQDS6nUVnO3AhmdMEZwPdR3gBLpWliO/HpmxCqphdzkv78do1xrVufieo9MBs8NP1U3L SFtYcDRuZ+eyE/hDcclsAWOs3zUuOpjrd425hH+XE7ykOfEou8M9JK2xZGKn+sjKsUpiz4cbIHYH SUXyNTeDSDzwoHHbHwIwGGWaASBKPtD+sDcIyemSbwcBoPLzpw+vLx9fDxuFj0TLjKzjkOoBbJKg enjMvu2NZVLBDHjdjLVwPfjgzQ+AqS1pNsMMmNqAqI67drcigO8yJi8YJvld2KU3hA2Qi1mYg6R7 U5krT7RdeRIRojQHZsAn1AcPu405g5e32CQCruVxv/WU00zq0xBt1j1laonh2ZIjCyghQ+Wojkrc RF1oAEyJ7ixmRdwkSBeTWT6BFJLYEuMmBjSEooCsqfzkihCm2DNVcjYCiMIbRkmOvtMgb7hcmwFf BCd3qt8cSVyVqsGXIBo5fjQgHT/rjriFuRkXb0OT4h47JKdck20f8pys3kw55iGhUEbSR7DdlyCi 48An3bDB5CBgjhT3WtnNxFSXZINR/oKaIxFYNzEV870wZYp5MMUOztjnwUhezzYvKOuR4tymvg4e dSSXPTnPqaUdUKXUY1wWQSJETAmtG1AtWLW79Hv0ZUrEZ+B6j7iFqVmpmFC9kbPIO2VwN9EQhuA0 NxCZWF5eviuI6ps9IHUvj+I0IPJSuaY9X4Kmd/8so3z/t/c/f36soeIuDUAG+X5u6QbEf/nzpy8f Xz59efn589cPfz1kHENRAjQVbogNVNQHExvQUUo+X/MaOGSf0N+2z2tgSaSzNp2N0JGTBxCE2qvf UDgI+a/35d8xZiTwxnhe3H52nZymqOPaG/xysy7R8MBTix+jhA0TktN7UAJrpot/xOJD53n5rpZs 2uhbyDD7+eQ2rNlB6RPgtQFE2DLzYtZdNQ/nkip89EnLe5OV97Tyrqaoo4g/5IvQ9Q19q1BEPyHp EphF96QZGiuNeLRpgIi6YkQA7e1Iilw6G3kPPNDDyyKz40/xayWz1TUrG8oOqCCa8Q3FgkK9cjWj vpprUwxeprAuHLy5eflgZvReCGllZaacz6FmD9zYfrIzhkbdMzVjiOf1jtvIy/evLzJNf38stXh3 IGdB2t9+GTEL2Q5lFe9/mwxK2fbblO5lie/9nfj+yg6ts2YIsk8R3nYjAZpITAdA/IC7oYdsEFpi DQQiwWFXrZw13bQ0EIekR3f06p8cfGpDyf56Q9F+jyLLuglXkqAz52pkAzo0nljRU4pyNzWDykua Ew/yC9x3KAung/yyNRufRyhUdhx1EojXz5ewbYg/5f53KIn+pOsYIY7Rp9wdg7SqLNGtY0DJF9Qp MsojidCdMRjv5jpCoWBAKRQu6oMksffHUczPpWachYIhWFMoGK7Fgru5DyqodQGczYg3zPi7LYvw BDg0lqNoLkd+LHdDKulyeT9Gu8wKktAdr0E/PfxcdMyRtmURPN49i9anbAbgRuKE+mKl1h46dpN5 JGM0kzHAwUa/TcbAuGmoeiiqfiEjk7ctjDrT4SZJXPALKAl07l0yJoFdBKCkBDQd8pE3kjGJfLQa erDstwrQtxlNxiRzIxMCKtwuE5KfmYw54BbmALl0nW8JyOyFZK7vXhypPajLrrguMXZGZybzqJIJ e2LcsLaLXBzOVJbzDTvXkhhsegJx4lxY/R2QXYdbk4NuY86q2HCrN1GFPasS+grTAExoqbmuWvM/ GcdqEuwF5FbkyC9H6HJercpyRvYRV2p/IB9kInhMyR0Xn9mdkkwD21vqu1VIV96ngdsDjO0J4MHD bmNqLlx+3E0dSoKwnWh5glbWUHhXkVJm/cZsKOOpNeFk2X3RnMF13ZlHy+/mbhYq0OqpqM/BrDHn WPl9Z5BFFsY1gwyV3+8PgbQRVGHqAMPl9/uD8PGJdaqD5Eta+f2vX7/88vLzQQM5puVsMxDr7y7c q79fmas41VJv0AVN/2adp1ytsiEaYhlZT4LeH5shx/K9qqiqlGbEdRwqLKRaFpThiqoKcMaHi7sc dhtzuWCo8HSeR2mY38Ou2tj3zA48ZXbxNNBVajeiESS7pQ8k29y7uWRW0DIYFSXh2lKcqK1xJ/6c 4v6WAzFmeEsv1ahOcH+z8uxyhCObzZDrmq2F5HA2qQLkiii16USpcQfGnG/hMmdVsadvYEr2MORb jbR5r4vMxmkoBSRaetSzQisQWxKhilJaEhW7yNomIhiL0mFmyAZD/IXZ9pqZ0m0Nrwh9F5qeklEb OL1BMKbYcwucdfGQTS8KSr+S0xw94ChwaO9kd22Q2BooIzDAUOMZWiA6kgqmibYS66ZBXFiIizLG gxTpoOVDVI1ea3FtbOP1p0iZ+BpXU6Y2Ydt/TmQ/fQ9zgH2db/a/+T2lPJumxXLLlwzrWtXIOyc0 vkVxPiPMWpSJ0FWoAH2ImGlRy1+QeoIeTNeP5iEpAoC8x1+yLr3WXT+ak7UaQqGALQJC6B3oeo1A UwG2Um1lhrLPzsry8WMTDddiT/N4fK2eJj6xpYBV2NGCTIUndAkdcg9zbWtJ3+wS0jtxfczjXr6G 3nYMjZOvZZktZy5fGGdC69HzqjDu46u73iQ4jfADgKF/dSdlQj9I87k7AIKI6HQzgMkDRJ+7Yzg+ xdSOISHEh6+//f2gEYjqj9o3I3hMFO9Yfnswdb03EnlXozLNSLKfsAQHfNjbopK0gzHP5Z1gB2OT 2YXLFpCxhvo1uhmBA+v6ckEBkBSTl4pQAI39sjWVD9Flecb0MdKjXteKx+qp5LfZM0MQY3pCTuqY e5gkAoh9wb5IYu2RD7sJ7QP43WwkvnzZ5C4nlu+FEwb8cKv7GjYnHrNM7u5CSIu6jamMdTTNf/72 +ggMbGcAieJM9M3HJ1p+rRlGX9Pcjo4j88X4RlINjmnBZimG7Pas9tcz+/rjDDYLwZRNNZbDyyXG snB58e9YRb2YK1txg/ysmpbPSi9/Pzq2Gh94CkSj/DWPrs17vAyOTVarPdYjooQKkpe5/aoecBoF 4avy/Jwfaq7KC81399muaqeXnxF/f8rzGxp49vld8c/ZXag3n98cTQGYwdrnB78dhGHiPTjQysha dK2opESpbolJwVwhgZA92ZYnAxxRlhRREmcURWVEnnmsxIfskrOUEmtoASV0hv2tLdryxMDuA8P8 BHK6I+5hamaQofSKm87qHQlBN9FA7KnRQO/4ggaK5nLmAgiKzKQ0ohy8qjvzqBDHvX3Ksvym7VnV BHY6vfv4+ufP77+//suXT99fHtLHuDeOY3JH9nXVbIiAgYDqeUiJ4+43YoU96nakBQjioMR5e7D+ +WLr1TNbb3nMtbYHM8BmIhKPAPBeaLqawt5yQmyEXbgiPEmRx6p6kEr2uVTTqlJlmUe1mOYlBCbB T8pPYGc75h5mVvflN91iqq3fefqme/oDkGpS0NhKtUuyNmtAK0s+kHRC3of85gNP1kHv3ZBOHciH ZQyHdKWpuWQH5g28yZ7d4YoGh9zCzHN1+RadsAtqL0Sa0WdRZdetbqfW5fXFb+HrqoK3XPCQLF5j 3fS93coT16hCWNGkA3mbu5/ulqJsxaqKuzGQtLk7QGm6VjbVAWRJQJb+2+tvn99/eH15/8ffDvkm pYZtXB1IvK13cJuRSnlws7k7DIU95Fmr5vuEpQPHuR/owHHAHK4zc6hkJ9MwF/6gtfBS5IVZaruU TVSZsIMMtdoWppfkGqYXRf6/1MjCq0Sml5SfQTdzzE1MatPnG0VZm+2Os+hnENVZnWKwTdpY9o5y 4vJ1KWOeGmCIXNKdeFQ3Ntzl8kc+11d64JNMsHf/6/Xvj/iH9z8e7XlIyNePB7zhwtHyP44ZQ9am xHzNGFSlVdlRldbur1QItK0PEx3zQ71yqYU2yUvxC/FvzMu/cQzPx441XNx8dgwVQMeONfz9eLDE 6MCzrXJXGVI8yL3tfxoHzPYUbuqr9ZE7zBkn0blOBmswoLblZoIngOlll2sgdc8GuetQoibHKlrr YKg9uLjVGBGgXFvquLap42ofEqvTF7vhfSx13PCEWvIx9zDHOc9G6q77hSW+PckBlyY8RNSEchvX k44yt3E9zyTbJNZ5VXfmURjfPdeE4RSYa8M5VlfxYSW/3QE0u+zqxw8p+e2NwJ0uSfRYxwDTlbiL v/7x/TGlvd1h2Ect0Uodhh3bzpgxbpv7Q3k2h7vUDLW0bFvAnbAN7Zf5ihlLM9sQSlmtFctAu1AB yJ6gugTkS9vwm7GSEdKiDYIXI5/SCyIArkVgGNu9yXYoH2jH3E0tmwpJ7tW5UTPVDj3XjWKFdWwP sBYUk4cnJo+4h6nEZLjRDW513MtchGkozNgWBzkM9rogKaAo9RNsP0PYxloE08VjTSTZAbpjjOZU vFzki4M4c02N1iTX91Qni3wxGq+fUCc+5B6m9jhLKsCr1m4xm/fnSJjY4zIwqSm1heK0nFgLxUj4 NNsZLzET+9s9Xz6Bbamwxl6AGWmRj36wVrw3BrMI3jejEHQtQQQ3huuIYXQkX0gqUzPSQnkmK97e GawHAIDEuCI4B8vFoL9qKnPGlnKx0YH/6jxRbsTFzWcjw91V/XR+UrlxaODZcqPR24ai6PbKxb3Y 2cjz02CNTI2/bTxgjJqUbTJxaZZ9D9+xFqgjVzjzPdpqKJ88SEsMMlqxAA7QmUbIV4VeyxpOY5R3 uSeg94+5hzmzLNtc8Nu2+6T2dm6CWFfk/hAFOYMLVxlGoHNFLQUlu3JSBF9vmVhkcsTkqGWVFBor XQfdgnRnlAmVKKgAIDBoX4bYDlO2Z3ER5GpIbFz2D7mzYPS6e6RwDjKSVWd9eKn5gBuYMgkkNb0W Coo7KQs/UWfWQBEYTRHxy4xIfj11WQfllOtQp3F76qE9O+3xVaFhOoqvvPJVERQlu/bH17+9vP/4 Ub787y+/vv/0+eevD5QBdoZE3CKbl2mGBPezLmWAawTW6DCAYSC4q8MEU8I6CAEgrPO727cn2qSW nAfQm5RtMhBZXjGLBkyCSCyVI62XI53H7Dvl4aiQ65sUPDRdjK7xj0bSwWsOcz4+t3TMTcwBNDGY UVs8kTzqvcUsT1jbqSeMphMszbqiKVNsFjE4A31LDckSubcxTJDsAmd2tSRdyYBAA0jaihrWxJxQ tAdiGOn0o5/xUbcxp+0G5LPW2xDc+p0Uop8oMid+u7TGktiR+fqyO/F15Rov73+Ie7wxZvciESYs QWaxki4QuP9o8+/dz9cgMQjNp4M369+/ffoOZq4/vZd/3v/+QPh2fxxMH9+MA4MMXpuPD3P03B3D oe3LNWOgg1mNbC33RjDkaN18C9lWTHYlW7hPhO2BZfG1vDziV6oAamLblFzxCA1IRrDroR8PnZ+m BSqVnR5RB+SAwEdLPLTKQwnB5APKCAaNtpVZLnndLw8Q9pdBzu7wSPKYe5jzIOONTcfsxhXezhe9 itBtajYdMjKAioc9cprCpTluOjYj4k1FUUDw56J5Gtpw2DqH+GgcszDgeala9jrYDTWvTdSyN7e1 7GcJaY64h7nGtZInuuqQ3CUJ5SQIk51B7NttW4MyJQO5Q5L3CBbAbvRvxVdRRSHQ4A1aKzif7AEf U5ylj80+4pSaMM6waxj6o5eyM+KXsNBoHB9LHnYbUzXw5cfd9glJ3L8zF3yfaBjoSqDMo655wvJa 5/IHfPty4GqeYD3RHUTbvyPCexXnNsCWoDG2aaZlsUB2mgBYLFio5X0+DpkSufQsF4NcKlU7jo9L 1YyDN9CLD+T14RvJ7PBzLdYbtcbSWeb28EukDpnRYQfXA/3Uy7eNcDDJn8rcayZVsM5pKLGUFdoq ydVVA6OMqZSrSgXa1UGWlAtb2OFZ5gNuYYryAQhAsAH1roH4iDuFoAmOX+0C1ArYRb1aARcvp9ba F0+5pk1wudCNdg6m+6V1A7JxE+VJrJV1I9e+e/ny9fuvf3z4y8vHJbZ4kYH/+iIf8fv7X17J1fuX T58/fnt9JLi5fxuOmRa0kOo2KBjLN90dBaRYhpTRehsYoCPodidjt6qRcA6VsDcP7AOoHXSBgUUo buH3odprwNwrR6EI5oyxFbAlANe3yXxwIclUq2BrMApEzLWsnlFSOOo2JqsK/Em3a1we985TRg+p TlPuvwY/S4j1a9PLC6HgnuXIFs0WHXTDAQ8qCy9WPWYcALVK1d0wxHkagUsHYYssqwqfjJafuDre AKf6IlT+BNaKY+5hLv4j9t/ntIG05R12FM4Ak6fWOQhzNMhJqqnXvA90e0DYmK0ghcWk5dmBJ+jA AWRJA03ooyEhdKvIzdPAl1jK4AS2zuClat8Fnq3ygWphvaTqnkaBeqhSafUZXqiNDbcoRXxNTajJ EIiz2Jx3fOvjEbcw5wsuxDMbiyKh3o7XMFGSsp50TDWGBITD1GVSBLTi6vLy/c3rg8pQJvui/KfP dq3WiBEbEgjYGwbrQzzDZhC3MAN+f/8AQvL+EBZgBuA8bV/c8ocWt4BokseQmlEuvob1hTVhn1c7 oLYVam3rcRNkCRyrISfJEK1JJ3ISQlvcutjrZfESMDSToREmzFq2pw15IhZoQMxWq5rUD3Qm2gks r5H5QQ/cE9JPx9zDjMXA477uusMs2DMYoEEwM8knbh86Vp7clAqbnAmlHedk/CKjPpJS8gRdoYeo +VkhNwNh69U2obbLdz3j0R5zD1PJJAoUXueS7E4uKanxvSDAp1CVcs1T/SOsTnN5rdcosbxfj0aN 90QDPNUYvUfj3cWCDkrF7AwCtCsUKZpBxIB+e33/8E5wdwhkY5Us+WYIFgeGdoK7o5DXE0omVXh6 kYkxOv4ARxWNQVJTxsC6zhhYV7gSZCtY2CMLGW3TWw3FZg2pRIdJhHQ1BBq6FLQvVJLovWcOU95C vt0wlGH0XpHVXJU26X6Kr6kfj4gC72Ix9GCLcsgtTHVoEw9+bVD2KHMCqpVpCgRndeoxMCBHKTrz hqknMIQaCreqFsGOFCU4Cdgia1jcUgU6NFaukovPFpczh7tWTgm+aVjEIPeIkaN5Av3CQTcxF2NQ QqEvWxL3ZndwbwEFK1PZqkfYaDUCKaUbThnupuQqphlTKJ6kK27YcMoUWoXMBAWf0dnSNeslf0oo iXp0NCDJGzRQkc1bgnxDD685yPj0VYOM1jH5+AQmH5lvIAZBLZ3coCYPpcBxLcpQBpzx9Rs7cR1M akJJeRbg6M4OlezDw9kj7mFqrsmPfN4gbzHVgttzT23H0jUGvOVUa1pmNMjVMmmyQ2mZweTrJ5oG wzDcaTSDkhYEunldx4xEWSBj1DYXvlcN0jZv2rfIzgYmKY1gs3BiyGe6loRWZ5BMxSLxCB0i8DR2 rFPytBy7daL8i74uc3J+CB+YnT3LLHZ4ApV1TjbsluDL5rPBCAn/HF2Imb+BuRxtcDdBvnv6RHHC i9bBWbKw1BZbima6ikbgCbFVFZ6AS5oTD2ou3vMNNQ2eMbFynp/E4D2MG9sbITJt45oR/JDm2u63 QC4TnMOx9VseF43YGyMU2ZZmDHHJ3n38+vKLvOc/33/+4yGFyr3vQvmi6NtfzCJBFIbUI3e+EVPT wFnXkdCpi9AgqMAk0T5SLQCYEGtoMEKEAu5sKM3V3QdPk4R5XmNd4KVni5pv92K36MvKYqFFBiW8 N8U2j3Xge8Q2+CSYo7o282Ztyt8JlwCu6PgE81G3MWUSPRAf1+JKYQ+1FmaYmpJss8Y38BSwE/PE 5fvyhGvoBXmJe0g+7G3opkQTWBTGAw72DCStTnCkvEnPhtIC5sdvottvIqv7z5//+P0vR3w+UJRe pefhaDUaoeQRpysgrY4p/UB7ZehQMEPdeWViVlE3ncWdM/DaDMISCT305UjVolY9sz1STYs+zxT9 QNCGGFZmE/s9cisRiKR4RnALdjo2x2hCsrIaop3BxRJhYsw2wiQiMKumTd6AsklOxWeEucfcxJyE HB6I8WHb8Zl2gFWBHbtzHZ9Em6AjbzXugL1jx9VA0xna+siJN1golYvB5EIz1uysxag2TAgxW7bb eKufQShz1G3MBZhYoeLnPvSU83QuoyBsVSVaNGB8y0TR+UyWYR6kBoC/nugPnI79W5iDQMhnESck HLRpCqicWGRK4LOy7sI0RRqCcTBFIFfH3K7TkiEwXYZA7jaFZ5iKA+5gzk74dCtF4cMOiIczyE6B eIwulC91BuEEeF3KQbgc+CHKKbkWDDq5Ol3l06qPKVFbXt5xPBR7Yuw5/DUkIG5QTOndaL9/mCP4 6xLBNw0ZASkgDdLo6Jlsstj800ZoC03cZO6RLTAswlyZtZIWsa+I0KaesQ5FtM0o8ZXa7BV1mNkm rEhjzoaXTIm4odmjzJmyb22YImdD9xTReBNByPOMWOmYe5gzDWBKuZJt007vBEpxQvUDlWSJ2y/f VZVXy3fCq9qvwLc+1L7wI9VEw4DbPLX0yjGc3ozx8fXz6/fXl78+0gJ4dwigIT0IA/rKaz608grg oc436q6A3CJ62dcSiai7xjhjddDZElbt0Z+QREHjExTQgkI6FTDPoSDCJapt+mhrOzcKtc10lCfI 9Ex0x/eTTw8/VSWNG0An17zd45ONoUd0jvSRG5S42kSZQUrSMkeGioNJi9x4B6kqCE1DcnOmSTX6 dYpy41j4KBfDq5frY+vVFxBkQ6YNECRTcwjxjg8ujrqNuUpp+bmvVMjNnvJ07MFVA+vaLrZ9DS2A z/Wn/67xqAMKT70bQTAgIgLgMOAHoClQqzEZGi1f17FN1LTyH6zDV4QTC9Om4HSeIEFyyD3M0Unc evASdu08eIq9pSkjYDNFeZtaLan/MMEdXT8Yp+WoadQrZyz/ht8I84BC9GoMWomLiaxXUIto9CB5 ey0SWlGQTaMd/gmqlEfdxtRMWH7crROo0g4kO+aeOWyAEbSoUapm9ifQisu9oACNnksSBXXqpsmE U4BKEZgWAtn4tuqm0ULUFGGJ8eUgJL+BSihAJWCDTGJtW4N7DBH50FSCGp+Xy1XDDAOtjZb6y3Gn d+iuPJ6k/oA7mEtRAX5x8nFDCZn3aI+T6mTDRxIMgc3+eq25B6hdy/zBdMiRuqYdpWwkjyqYwhGY 61MCt2gDfkjeUwIcysOgNUKmOush+5JB+GXlat+Yd6pxq4oJMBnWnWyBx4MS5m9gZkoUAdmrLIUs 2zsz4vXLx9/e//L60+9/+fpfPKhz5b/9H3n9b9/ef/r8+k1e/dOXjzjxDyctL+ppnPu9nPzHr398 +fjpyy//+PVv/wBTJv8ZyCJb4xUG+ql+9D/973/+6f8DxSVjjGchAgA= --0016e64cda8cc87ff40478eaa87c-- From chris@chris-wilson.co.uk Sat Nov 21 16:22:36 2009 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 862C0431FBC for ; Sat, 21 Nov 2009 16:22:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 wetu2mEyD21R for ; Sat, 21 Nov 2009 16:22:35 -0800 (PST) Received: from fmsmga102.fm.intel.com (mga10.intel.com [192.55.52.92]) by olra.theworths.org (Postfix) with ESMTP id 66DE3431FAE for ; Sat, 21 Nov 2009 16:22:35 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 21 Nov 2009 16:18:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,264,1257148800"; d="scan'208";a="749270075" Received: from unknown (HELO localhost.localdomain) ([10.255.16.190]) by fmsmga001.fm.intel.com with ESMTP; 21 Nov 2009 16:28:58 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 00:22:30 +0000 Message-Id: <1258849350-27213-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] notmuch-new: Only install SIGALRM if not running under gdb X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 00:22:36 -0000 I felt sorry for Carl trying to step through an exception from xapian and suffering from the SIGALARMs.. We can detect if the user launched notmuch under a debugger by either checking our cmdline for the presence of the gdb string or querying if valgrind is controlling our process. For the latter we need to add a compile time check for the valgrind development library, and so add the initial support to build Makefile.config from configure. Signed-off-by: Chris Wilson Reviewed-by: Carl Worth --- Makefile.config | 1 + Makefile.local | 3 ++- configure | 21 +++++++++++++++++---- debugger.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ notmuch-client.h | 3 +++ notmuch-new.c | 12 +++++++----- 6 files changed, 77 insertions(+), 10 deletions(-) create mode 100644 debugger.c diff --git a/Makefile.config b/Makefile.config index d72a39e..ddc7436 100644 --- a/Makefile.config +++ b/Makefile.config @@ -1,2 +1,3 @@ prefix = /usr/local bash_completion_dir = /etc/bash_completion.d +CFLAGS += -DHAVE_VALGRIND diff --git a/Makefile.local b/Makefile.local index 3c99624..efe76c8 100644 --- a/Makefile.local +++ b/Makefile.local @@ -3,6 +3,8 @@ all: notmuch notmuch.1.gz emacs: notmuch.elc notmuch_client_srcs = \ + debugger.c \ + gmime-filter-reply.c \ notmuch.c \ notmuch-config.c \ notmuch-dump.c \ @@ -14,7 +16,6 @@ notmuch_client_srcs = \ notmuch-show.c \ notmuch-tag.c \ notmuch-time.c \ - gmime-filter-reply.c \ query-string.c \ show-message.c diff --git a/configure b/configure index fe46c8e..b4770ec 100755 --- a/configure +++ b/configure @@ -53,6 +53,14 @@ else errors=$((errors + 1)) fi +if pkg-config --modversion valgrind > /dev/null 2>&1; then + echo "Checking for valgrind development files... Yes." + have_valgrind=-DHAVE_VALGRIND +else + echo "Checking for valgrind development files... No." + have_valgrind= +fi + if [ $errors -gt 0 ]; then cat < Makefile.config < + */ + +#include "notmuch-client.h" + +#include + +#if HAVE_VALGRIND +#include +#else +#define RUNNING_ON_VALGRIND 0 +#endif + +notmuch_bool_t +debugger_is_active (void) +{ + char buf[1024]; + + if (RUNNING_ON_VALGRIND) + return TRUE; + + sprintf (buf, "/proc/%d/exe", getppid ()); + if (readlink (buf, buf, sizeof (buf)) != -1 && + strncmp (basename (buf), "gdb", 3) == 0) + { + return TRUE; + } + + return FALSE; +} diff --git a/notmuch-client.h b/notmuch-client.h index b65aa77..ea77686 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -179,4 +179,7 @@ notmuch_config_set_user_other_email (notmuch_config_t *config, const char *other_email[], size_t length); +notmuch_bool_t +debugger_is_active (void); + #endif diff --git a/notmuch-new.c b/notmuch-new.c index 43cc4fb..18ba2bd 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -272,11 +272,13 @@ add_files (notmuch_database_t *notmuch, } /* Setup our handler for SIGALRM */ - memset (&action, 0, sizeof (struct sigaction)); - action.sa_handler = handle_sigalrm; - sigemptyset (&action.sa_mask); - action.sa_flags = SA_RESTART; - sigaction (SIGALRM, &action, NULL); + if (! debugger_is_active ()) { + memset (&action, 0, sizeof (struct sigaction)); + action.sa_handler = handle_sigalrm; + sigemptyset (&action.sa_mask); + action.sa_flags = SA_RESTART; + sigaction (SIGALRM, &action, NULL); + } /* Then start a timer to send SIGALRM once per second. */ timerval.it_interval.tv_sec = 1; -- 1.6.5.3 From keithp@keithp.com Sat Nov 21 16:28:35 2009 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 5656D431FBC for ; Sat, 21 Nov 2009 16:28:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Dam69vzNZiE1 for ; Sat, 21 Nov 2009 16:28:34 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id AA991431FAE for ; Sat, 21 Nov 2009 16:28:34 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 18FC076012A; Sat, 21 Nov 2009 16:28:34 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id tw1iDvWYNGRC; Sat, 21 Nov 2009 16:28:31 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 60F3176012B; Sat, 21 Nov 2009 16:28:31 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 5330D76012A; Sat, 21 Nov 2009 16:28:31 -0800 (PST) From: Keith Packard To: Stefan Schmidt , notmuch@notmuchmail.org In-Reply-To: <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org> References: <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org> Date: Sat, 21 Nov 2009 16:28:30 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH 1/2] lib/message: Add function to get maildir flags. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 00:28:35 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Sun, 22 Nov 2009 01:11:00 +0100, Stefan Schmidt wrote: > +const char * > +notmuch_message_get_flags (notmuch_message_t *message) This function should interpret the flags that it finds and return a suitable set of notmuch tags. I'd suggest that 'unread' messages get both 'unread' and 'inbox' tags, as Maildir doesn't distinguish between 'don't show this to be by default again please' and 'I've read this message'. It seems best to hide the maildir-specific details inside the library instead of exposing them. Also, we have only the 'unread' tag; we don't have a 'read' tag, which would simply be the inverse of 'unread'. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLCIWuQp8BWwlsTdMRAvcTAKDXHYc6MTuuZFMzHvZFs1omBbr9CACdEY/b jqyT/QmmgoA/GtIcs/DfLMY= =LVlh -----END PGP SIGNATURE----- --=-=-=-- From chris@chris-wilson.co.uk Sat Nov 21 16:33:27 2009 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 79945431FAE for ; Sat, 21 Nov 2009 16:33:27 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 uuiL7mpWFeIq for ; Sat, 21 Nov 2009 16:33:26 -0800 (PST) Received: from orsmga101.jf.intel.com (mga06.intel.com [134.134.136.21]) by olra.theworths.org (Postfix) with ESMTP id 133B8431FBC for ; Sat, 21 Nov 2009 16:33:25 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 21 Nov 2009 16:33:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,265,1257148800"; d="scan'208";a="571886901" Received: from unknown (HELO localhost.localdomain) ([10.255.16.190]) by orsmga001.jf.intel.com with ESMTP; 21 Nov 2009 16:33:13 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 00:33:19 +0000 Message-Id: <1258849999-27513-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1258849350-27213-1-git-send-email-chris@chris-wilson.co.uk> References: <1258849350-27213-1-git-send-email-chris@chris-wilson.co.uk> Subject: [notmuch] [PATCH] notmuch-new: Only install SIGALRM if not running under gdb X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 00:33:27 -0000 I felt sorry for Carl trying to step through an exception from xapian and suffering from the SIGALARMs.. We can detect if the user launched notmuch under a debugger by either checking our cmdline for the presence of the gdb string or querying if valgrind is controlling our process. For the latter we need to add a compile time check for the valgrind development library, and so add the initial support to build Makefile.config from configure. Signed-off-by: Chris Wilson Reviewed-by: Carl Worth [ickle: And do not install the timer] --- Makefile.config | 1 + Makefile.local | 3 ++- configure | 21 +++++++++++++++++---- debugger.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ notmuch-client.h | 3 +++ notmuch-new.c | 12 +++++++----- 6 files changed, 77 insertions(+), 10 deletions(-) create mode 100644 debugger.c diff --git a/Makefile.config b/Makefile.config index d72a39e..ddc7436 100644 --- a/Makefile.config +++ b/Makefile.config @@ -1,2 +1,3 @@ prefix = /usr/local bash_completion_dir = /etc/bash_completion.d +CFLAGS += -DHAVE_VALGRIND diff --git a/Makefile.local b/Makefile.local index 3c99624..efe76c8 100644 --- a/Makefile.local +++ b/Makefile.local @@ -3,6 +3,8 @@ all: notmuch notmuch.1.gz emacs: notmuch.elc notmuch_client_srcs = \ + debugger.c \ + gmime-filter-reply.c \ notmuch.c \ notmuch-config.c \ notmuch-dump.c \ @@ -14,7 +16,6 @@ notmuch_client_srcs = \ notmuch-show.c \ notmuch-tag.c \ notmuch-time.c \ - gmime-filter-reply.c \ query-string.c \ show-message.c diff --git a/configure b/configure index fe46c8e..b4770ec 100755 --- a/configure +++ b/configure @@ -53,6 +53,14 @@ else errors=$((errors + 1)) fi +if pkg-config --modversion valgrind > /dev/null 2>&1; then + echo "Checking for valgrind development files... Yes." + have_valgrind=-DHAVE_VALGRIND +else + echo "Checking for valgrind development files... No." + have_valgrind= +fi + if [ $errors -gt 0 ]; then cat < Makefile.config < + */ + +#include "notmuch-client.h" + +#include + +#if HAVE_VALGRIND +#include +#else +#define RUNNING_ON_VALGRIND 0 +#endif + +notmuch_bool_t +debugger_is_active (void) +{ + char buf[1024]; + + if (RUNNING_ON_VALGRIND) + return TRUE; + + sprintf (buf, "/proc/%d/exe", getppid ()); + if (readlink (buf, buf, sizeof (buf)) != -1 && + strncmp (basename (buf), "gdb", 3) == 0) + { + return TRUE; + } + + return FALSE; +} diff --git a/notmuch-client.h b/notmuch-client.h index b65aa77..ea77686 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -179,4 +179,7 @@ notmuch_config_set_user_other_email (notmuch_config_t *config, const char *other_email[], size_t length); +notmuch_bool_t +debugger_is_active (void); + #endif diff --git a/notmuch-new.c b/notmuch-new.c index 43cc4fb..18ba2bd 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -272,11 +272,13 @@ add_files (notmuch_database_t *notmuch, } /* Setup our handler for SIGALRM */ - memset (&action, 0, sizeof (struct sigaction)); - action.sa_handler = handle_sigalrm; - sigemptyset (&action.sa_mask); - action.sa_flags = SA_RESTART; - sigaction (SIGALRM, &action, NULL); + if (! debugger_is_active ()) { + memset (&action, 0, sizeof (struct sigaction)); + action.sa_handler = handle_sigalrm; + sigemptyset (&action.sa_mask); + action.sa_flags = SA_RESTART; + sigaction (SIGALRM, &action, NULL); + } /* Then start a timer to send SIGALRM once per second. */ timerval.it_interval.tv_sec = 1; -- 1.6.5.3 From chris@chris-wilson.co.uk Sat Nov 21 16:44:38 2009 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 CA2A5431FBC for ; Sat, 21 Nov 2009 16:44:38 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 mx5nmq8dx+Sk for ; Sat, 21 Nov 2009 16:44:38 -0800 (PST) Received: from orsmga101.jf.intel.com (mga06.intel.com [134.134.136.21]) by olra.theworths.org (Postfix) with ESMTP id D36D6431FAE for ; Sat, 21 Nov 2009 16:44:37 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 21 Nov 2009 16:44:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,265,1257148800"; d="scan'208";a="469444035" Received: from unknown (HELO localhost.localdomain) ([10.255.16.190]) by orsmga002.jf.intel.com with ESMTP; 21 Nov 2009 17:01:39 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 00:44:30 +0000 Message-Id: <1258850672-28339-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] Avoid installing SIGALRMs when under the debugger. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 00:44:39 -0000 Gah, I'm tired and using "git send-email HEAD^" is too easy. Here is the most recent pair of patches in possibly a working state. -ickle From chris@chris-wilson.co.uk Sat Nov 21 16:44:40 2009 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 C4EAA431FC7 for ; Sat, 21 Nov 2009 16:44:40 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 7akSIXqxWQBF for ; Sat, 21 Nov 2009 16:44:39 -0800 (PST) Received: from orsmga101.jf.intel.com (mga06.intel.com [134.134.136.21]) by olra.theworths.org (Postfix) with ESMTP id 0F4A9431FAE for ; Sat, 21 Nov 2009 16:44:38 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 21 Nov 2009 16:44:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,265,1257148800"; d="scan'208";a="469444040" Received: from unknown (HELO localhost.localdomain) ([10.255.16.190]) by orsmga002.jf.intel.com with ESMTP; 21 Nov 2009 17:01:40 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 00:44:31 +0000 Message-Id: <1258850672-28339-2-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1258850672-28339-1-git-send-email-chris@chris-wilson.co.uk> References: <1258850672-28339-1-git-send-email-chris@chris-wilson.co.uk> Subject: [notmuch] [PATCH 1/2] notmuch-new: Only install SIGALRM if not running under gdb X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 00:44:41 -0000 I felt sorry for Carl trying to step through an exception from xapian and suffering from the SIGALARMs.. We can detect if the user launched notmuch under a debugger by either checking our cmdline for the presence of the gdb string or querying if valgrind is controlling our process. For the latter we need to add a compile time check for the valgrind development library, and so add the initial support to build Makefile.config from configure. Signed-off-by: Chris Wilson Reviewed-by: Carl Worth [ickle: And do not install the timer when under the debugger] --- Makefile.config | 1 + Makefile.local | 3 ++- configure | 21 +++++++++++++++++---- debugger.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ notmuch-client.h | 3 +++ notmuch-new.c | 49 ++++++++++++++++++++++++++++--------------------- 6 files changed, 98 insertions(+), 26 deletions(-) create mode 100644 debugger.c diff --git a/Makefile.config b/Makefile.config index d72a39e..ddc7436 100644 --- a/Makefile.config +++ b/Makefile.config @@ -1,2 +1,3 @@ prefix = /usr/local bash_completion_dir = /etc/bash_completion.d +CFLAGS += -DHAVE_VALGRIND diff --git a/Makefile.local b/Makefile.local index 3c99624..efe76c8 100644 --- a/Makefile.local +++ b/Makefile.local @@ -3,6 +3,8 @@ all: notmuch notmuch.1.gz emacs: notmuch.elc notmuch_client_srcs = \ + debugger.c \ + gmime-filter-reply.c \ notmuch.c \ notmuch-config.c \ notmuch-dump.c \ @@ -14,7 +16,6 @@ notmuch_client_srcs = \ notmuch-show.c \ notmuch-tag.c \ notmuch-time.c \ - gmime-filter-reply.c \ query-string.c \ show-message.c diff --git a/configure b/configure index fe46c8e..b4770ec 100755 --- a/configure +++ b/configure @@ -53,6 +53,14 @@ else errors=$((errors + 1)) fi +if pkg-config --modversion valgrind > /dev/null 2>&1; then + echo "Checking for valgrind development files... Yes." + have_valgrind=-DHAVE_VALGRIND +else + echo "Checking for valgrind development files... No." + have_valgrind= +fi + if [ $errors -gt 0 ]; then cat < Makefile.config < + */ + +#include "notmuch-client.h" + +#include + +#if HAVE_VALGRIND +#include +#else +#define RUNNING_ON_VALGRIND 0 +#endif + +notmuch_bool_t +debugger_is_active (void) +{ + char buf[1024]; + + if (RUNNING_ON_VALGRIND) + return TRUE; + + sprintf (buf, "/proc/%d/exe", getppid ()); + if (readlink (buf, buf, sizeof (buf)) != -1 && + strncmp (basename (buf), "gdb", 3) == 0) + { + return TRUE; + } + + return FALSE; +} diff --git a/notmuch-client.h b/notmuch-client.h index b65aa77..ea77686 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -179,4 +179,7 @@ notmuch_config_set_user_other_email (notmuch_config_t *config, const char *other_email[], size_t length); +notmuch_bool_t +debugger_is_active (void); + #endif diff --git a/notmuch-new.c b/notmuch-new.c index 43cc4fb..1616ee9 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -259,6 +259,7 @@ add_files (notmuch_database_t *notmuch, notmuch_status_t status; struct sigaction action; struct itimerval timerval; + notmuch_bool_t timer_is_active = FALSE; if (stat (path, &st)) { fprintf (stderr, "Error reading directory %s: %s\n", @@ -272,31 +273,37 @@ add_files (notmuch_database_t *notmuch, } /* Setup our handler for SIGALRM */ - memset (&action, 0, sizeof (struct sigaction)); - action.sa_handler = handle_sigalrm; - sigemptyset (&action.sa_mask); - action.sa_flags = SA_RESTART; - sigaction (SIGALRM, &action, NULL); - - /* Then start a timer to send SIGALRM once per second. */ - timerval.it_interval.tv_sec = 1; - timerval.it_interval.tv_usec = 0; - timerval.it_value.tv_sec = 1; - timerval.it_value.tv_usec = 0; - setitimer (ITIMER_REAL, &timerval, NULL); + if (! debugger_is_active ()) { + memset (&action, 0, sizeof (struct sigaction)); + action.sa_handler = handle_sigalrm; + sigemptyset (&action.sa_mask); + action.sa_flags = SA_RESTART; + sigaction (SIGALRM, &action, NULL); + + /* Then start a timer to send SIGALRM once per second. */ + timerval.it_interval.tv_sec = 1; + timerval.it_interval.tv_usec = 0; + timerval.it_value.tv_sec = 1; + timerval.it_value.tv_usec = 0; + setitimer (ITIMER_REAL, &timerval, NULL); + + timer_is_active = TRUE; + } status = add_files_recursive (notmuch, path, &st, state); /* Now stop the timer. */ - timerval.it_interval.tv_sec = 0; - timerval.it_interval.tv_usec = 0; - timerval.it_value.tv_sec = 0; - timerval.it_value.tv_usec = 0; - setitimer (ITIMER_REAL, &timerval, NULL); - - /* And disable the signal handler. */ - action.sa_handler = SIG_IGN; - sigaction (SIGALRM, &action, NULL); + if (timer_is_active) { + timerval.it_interval.tv_sec = 0; + timerval.it_interval.tv_usec = 0; + timerval.it_value.tv_sec = 0; + timerval.it_value.tv_usec = 0; + setitimer (ITIMER_REAL, &timerval, NULL); + + /* And disable the signal handler. */ + action.sa_handler = SIG_IGN; + sigaction (SIGALRM, &action, NULL); + } return status; } -- 1.6.5.3 From chris@chris-wilson.co.uk Sat Nov 21 16:44:43 2009 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 2779A431FC3 for ; Sat, 21 Nov 2009 16:44:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 w4A-n-S20vtV for ; Sat, 21 Nov 2009 16:44:42 -0800 (PST) Received: from orsmga101.jf.intel.com (mga06.intel.com [134.134.136.21]) by olra.theworths.org (Postfix) with ESMTP id A813C431FC4 for ; Sat, 21 Nov 2009 16:44:40 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 21 Nov 2009 16:44:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,265,1257148800"; d="scan'208";a="469444045" Received: from unknown (HELO localhost.localdomain) ([10.255.16.190]) by orsmga002.jf.intel.com with ESMTP; 21 Nov 2009 17:01:42 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 00:44:32 +0000 Message-Id: <1258850672-28339-3-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1258850672-28339-1-git-send-email-chris@chris-wilson.co.uk> References: <1258850672-28339-1-git-send-email-chris@chris-wilson.co.uk> Subject: [notmuch] [PATCH 2/2] notmuch-new: Only print the regular progress report when on a tty X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 00:44:43 -0000 Check that the stdout is connected to an interactive terminal with isatty() before installing the periodic timer to print progress reports. Signed-off-by: Chris Wilson --- notmuch-new.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 1616ee9..0dd2784 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -20,6 +20,8 @@ #include "notmuch-client.h" +#include + static volatile sig_atomic_t do_add_files_print_progress = 0; static void @@ -273,7 +275,7 @@ add_files (notmuch_database_t *notmuch, } /* Setup our handler for SIGALRM */ - if (! debugger_is_active ()) { + if (isatty (fileno (stdout)) && ! debugger_is_active ()) { memset (&action, 0, sizeof (struct sigaction)); action.sa_handler = handle_sigalrm; sigemptyset (&action.sa_mask); -- 1.6.5.3 From chris@chris-wilson.co.uk Sat Nov 21 16:57:17 2009 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 060E6431FBC for ; Sat, 21 Nov 2009 16:57:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 q6pPGsttVYh8 for ; Sat, 21 Nov 2009 16:57:16 -0800 (PST) Received: from azsmga101.ch.intel.com (mga07.intel.com [143.182.124.22]) by olra.theworths.org (Postfix) with ESMTP id 25DB7431FAE for ; Sat, 21 Nov 2009 16:57:16 -0800 (PST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 21 Nov 2009 16:57:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,265,1257148800"; d="scan'208";a="214309534" Received: from unknown (HELO localhost.localdomain) ([10.255.16.190]) by azsmga001.ch.intel.com with ESMTP; 21 Nov 2009 16:57:14 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 00:57:10 +0000 Message-Id: <1258851430-28732-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] notmuch-new: Eliminate tallocs whilst construct filenames. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 00:57:17 -0000 The majority of filenames will fit within PATH_MAX [4096] (because that's a hard limit imposed by the filesystems) so we can avoid an allocation per lookup and thereby eliminate a large proportion of the overhead of scanning a maildir. Signed-off-by: Chris Wilson --- notmuch-new.c | 75 ++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 45 insertions(+), 30 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 0dd2784..13559d1 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -107,6 +107,7 @@ add_files_recursive (notmuch_database_t *notmuch, add_files_state_t *state) { DIR *dir = NULL; + char buf[4096]; struct dirent *entry = NULL; char *next = NULL; time_t path_mtime, path_dbtime; @@ -114,6 +115,7 @@ add_files_recursive (notmuch_database_t *notmuch, notmuch_message_t *message = NULL; struct dirent **namelist = NULL; int num_entries; + int path_len, dname_len; /* If we're told to, we bail out on encountering a read-only * directory, (with this being a clear clue from the user to @@ -140,6 +142,12 @@ add_files_recursive (notmuch_database_t *notmuch, int i=0; + path_len = strlen (path); + if (path_len + 2 < (int) sizeof (buf)) { + memcpy (buf, path, path_len); + buf[path_len] = '/'; + } + while (!interrupted) { if (i == num_entries) break; @@ -164,37 +172,42 @@ add_files_recursive (notmuch_database_t *notmuch, continue; } - next = talloc_asprintf (notmuch, "%s/%s", path, entry->d_name); + dname_len = strlen (entry->d_name); + if (path_len + dname_len + 2 < (int) sizeof (buf)) { + memcpy (buf + path_len + 1, entry->d_name, dname_len); + buf[path_len + dname_len + 1] = '\0'; + next = buf; + } else { + next = talloc_asprintf (notmuch, "%s/%s", path, entry->d_name); + } if (stat (next, st)) { fprintf (stderr, "Error reading %s: %s\n", next, strerror (errno)); ret = NOTMUCH_STATUS_FILE_ERROR; - continue; - } - - if (S_ISREG (st->st_mode)) { - /* If the file hasn't been modified since the last - * add_files, then we need not look at it. */ - if (path_dbtime == 0 || st->st_mtime > path_dbtime) { - state->processed_files++; - - status = notmuch_database_add_message (notmuch, next, &message); - switch (status) { - /* success */ + } else { + if (S_ISREG (st->st_mode)) { + /* If the file hasn't been modified since the last + * add_files, then we need not look at it. */ + if (path_dbtime == 0 || st->st_mtime > path_dbtime) { + state->processed_files++; + + status = notmuch_database_add_message (notmuch, next, &message); + switch (status) { + /* success */ case NOTMUCH_STATUS_SUCCESS: state->added_messages++; tag_inbox_and_unread (message); break; - /* Non-fatal issues (go on to next file) */ + /* Non-fatal issues (go on to next file) */ case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: - /* Stay silent on this one. */ + /* Stay silent on this one. */ break; case NOTMUCH_STATUS_FILE_NOT_EMAIL: fprintf (stderr, "Note: Ignoring non-mail file: %s\n", next); break; - /* Fatal issues. Don't process anymore. */ + /* Fatal issues. Don't process anymore. */ case NOTMUCH_STATUS_READONLY_DATABASE: case NOTMUCH_STATUS_XAPIAN_EXCEPTION: case NOTMUCH_STATUS_OUT_OF_MEMORY: @@ -210,25 +223,27 @@ add_files_recursive (notmuch_database_t *notmuch, case NOTMUCH_STATUS_LAST_STATUS: INTERNAL_ERROR ("add_message returned unexpected value: %d", status); goto DONE; - } + } - if (message) { - notmuch_message_destroy (message); - message = NULL; - } + if (message) { + notmuch_message_destroy (message); + message = NULL; + } - if (do_add_files_print_progress) { - do_add_files_print_progress = 0; - add_files_print_progress (state); + if (do_add_files_print_progress) { + do_add_files_print_progress = 0; + add_files_print_progress (state); + } } + } else if (S_ISDIR (st->st_mode)) { + status = add_files_recursive (notmuch, next, st, state); + if (status && ret == NOTMUCH_STATUS_SUCCESS) + ret = status; } - } else if (S_ISDIR (st->st_mode)) { - status = add_files_recursive (notmuch, next, st, state); - if (status && ret == NOTMUCH_STATUS_SUCCESS) - ret = status; } - talloc_free (next); + if (next != buf) + talloc_free (next); next = NULL; } @@ -237,7 +252,7 @@ add_files_recursive (notmuch_database_t *notmuch, ret = status; DONE: - if (next) + if (next != buf) talloc_free (next); if (entry) free (entry); -- 1.6.5.3 From bart@jukie.net Sat Nov 21 18:18:35 2009 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 E88D1431FBC for ; Sat, 21 Nov 2009 18:18:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ABqfQiGNTmtd for ; Sat, 21 Nov 2009 18:18:35 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 0BB1E431FAE for ; Sat, 21 Nov 2009 18:18:35 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id 5AD98C05601; Sat, 21 Nov 2009 21:18:34 -0500 (EST) Date: Sat, 21 Nov 2009 21:18:34 -0500 From: Bart Trojanowski To: notmuch@notmuchmail.org Message-ID: <20091122021833.GC17268@jukie.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Mutt/1.5.18 (2008-05-17) Subject: [notmuch] hijacked threads can be confusing in notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 02:18:36 -0000 I'd like to see how other people feel about a problem I just ran into. I wanted to look at the 'notmuch count' patch that Keith Packard posted a couple of days ago (as I am porting his folder mode to notmuch.vim). I was unable to find it using notmuch because he happened to post 3 patches in one go. It's pretty common git practice, and by no means to I hold Keith responsible :) In mutt it looked like this: [notmuch] [PATCH 1/3] Make mouse-1 click in search view show thread =E2=94=94=E2=94=80>[notmuch] [PATCH 2/3] Add 'notmuch count' command to s= how the count of matching messages =E2=94=94=E2=94=80>[notmuch] [PATCH 3/3] Add notmuch-index mode to disp= lay message counts =2E.. and in the mutt threaded display the relationship between the three messages is pretty clear. Now consider what happens when I run notmuch search 'notmuch count'. I get this: Today 02:15 [2/3] Keith Packard; [notmuch] [PATCH 1/3] Make mouse-1 click= in search view show thread (inbox unread) This thread happens to look completely unrelated to my search at first glance. So naturally, I dismissed it. I finally clued in what was happening and came back to it after. On a related note, one mail related pet peeve I have is when people reply to a random email in their mailbox when they actually intend to start a new thread. Doing that would totally mess up someone using notmuch. They could get search results with threads which have no relevance to their actual search... at least at first glance. So is there something better that we could do when detecting hijacked threads like this? Is it safe to cut threads when you notice a topic change? Or maybe it would be better to just mark such threads in the output of notmuch-search (either a boolean flag, or a count of topic changes). Anyone know how Gmail deals with this? Cheers, -Bart --=20 WebSig: http://www.jukie.net/~bart/sig/ From gzjjgod@gmail.com Sat Nov 21 19:07:56 2009 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 8F453431FBC for ; Sat, 21 Nov 2009 19:07:56 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 FOM2OT-pNV7G for ; Sat, 21 Nov 2009 19:07:56 -0800 (PST) Received: from mail-gx0-f221.google.com (mail-gx0-f221.google.com [209.85.217.221]) by olra.theworths.org (Postfix) with ESMTP id EC1DA431FAE for ; Sat, 21 Nov 2009 19:07:55 -0800 (PST) Received: by gxk21 with SMTP id 21so3933233gxk.10 for ; Sat, 21 Nov 2009 19:07:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=1b4qTuTZy7cuCliveYb0PuCPZtCMfJ9ELOFeMa1N0tc=; b=ZRViiUXOIMHjW/QVaVoG5nm0s9DC/4j+tGZ+8UQpy6kb76BC6hbwdcqtzpn3vn0mkQ AL/YYm3H7lHKBxATFcrJ0degaFI3Ej13thFm+7620XgZDfhFvnIpH+JwDb2IwOywZiJS Va2l2MA1kSqX5WCTXoiHzktc/tGWzPWPoVbpA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=hAxsseWffc8HTQR9UXrqgEZhiYZvck6guLr/XCXgl6Ln2q5ELJtCzgYYt+5Rn6ghWU AV5vFsgrOpOHDLvFktR+JXGfTYh77dKzq6FcTS+om5Ew1p+LfMYqL+/EGLEK1bF28VRz aPCPIIljyQCXE05NphN72DBSXGwEvTQ4n6RUo= Received: by 10.150.38.4 with SMTP id l4mr5562259ybl.340.1258859275618; Sat, 21 Nov 2009 19:07:55 -0800 (PST) Received: from localhost.localdomain ([123.116.120.71]) by mx.google.com with ESMTPS id 14sm1524526gxk.10.2009.11.21.19.07.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Nov 2009 19:07:54 -0800 (PST) From: Jjgod Jiang To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 11:07:36 +0800 Message-Id: <1258859256-33197-1-git-send-email-gzjjgod@gmail.com> X-Mailer: git-send-email 1.6.4 Subject: [notmuch] [PATCH] Mac OS X compatibility fixes X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 03:07:56 -0000 Add missing GNU extensions strdup() and getline(). The C library shipped with Mac OS X does not include them (though it does support some GNU extensions when _GNU_SOURCE is defined), so we have to add these two. The getline() implementation is a modified version of getdelim() from GNU Libc. --- lib/xutil.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/xutil.h | 6 +++ 2 files changed, 105 insertions(+), 0 deletions(-) diff --git a/lib/xutil.c b/lib/xutil.c index 6fa5eb0..805b236 100644 --- a/lib/xutil.c +++ b/lib/xutil.c @@ -79,6 +79,105 @@ xstrdup (const char *s) return ret; } +#ifdef __APPLE__ +/* Mac OS X don't have strndup even if _GNU_SOURCE is defined */ +char *strndup (const char *s, size_t n) +{ + size_t len = strlen (s); + char *ret; + + if (len <= n) + return strdup (s); + + ret = malloc(n + 1); + strncpy(ret, s, n); + ret[n] = '\0'; + return ret; +} + +/* getline implementation is copied from glibc. */ + +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif +#ifndef SSIZE_MAX +# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) +#endif + +ssize_t getline (char **lineptr, size_t *n, FILE *fp) +{ + ssize_t result; + size_t cur_len = 0; + + if (lineptr == NULL || n == NULL || fp == NULL) + { + errno = EINVAL; + return -1; + } + + if (*lineptr == NULL || *n == 0) + { + *n = 120; + *lineptr = (char *) malloc (*n); + if (*lineptr == NULL) + { + result = -1; + goto end; + } + } + + for (;;) + { + int i; + + i = getc (fp); + if (i == EOF) + { + result = -1; + break; + } + + /* Make enough space for len+1 (for final NUL) bytes. */ + if (cur_len + 1 >= *n) + { + size_t needed_max = + SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; + size_t needed = 2 * *n + 1; /* Be generous. */ + char *new_lineptr; + + if (needed_max < needed) + needed = needed_max; + if (cur_len + 1 >= needed) + { + result = -1; + goto end; + } + + new_lineptr = (char *) realloc (*lineptr, needed); + if (new_lineptr == NULL) + { + result = -1; + goto end; + } + + *lineptr = new_lineptr; + *n = needed; + } + + (*lineptr)[cur_len] = i; + cur_len++; + + if (i == '\n') + break; + } + (*lineptr)[cur_len] = '\0'; + result = cur_len ? (ssize_t) cur_len : result; + +end: + return result; +} +#endif + char * xstrndup (const char *s, size_t n) { diff --git a/lib/xutil.h b/lib/xutil.h index b973f7d..0b53f7c 100644 --- a/lib/xutil.h +++ b/lib/xutil.h @@ -25,6 +25,12 @@ #include #include +#ifdef __APPLE__ +/* Mac OS X don't have strndup and getline even if _GNU_SOURCE is defined */ +char *strndup (const char *s, size_t n); +ssize_t getline(char **lineptr, size_t *n, FILE *stream); +#endif + /* xutil.c */ void * xcalloc (size_t nmemb, size_t size); -- 1.6.4 From cworth@cworth.org Sat Nov 21 19:12:39 2009 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 68062431FBF; Sat, 21 Nov 2009 19:12:39 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ON4On8Rt7+Gv; Sat, 21 Nov 2009 19:12:38 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 00D23431FAE; Sat, 21 Nov 2009 19:12:37 -0800 (PST) From: Carl Worth To: Mike Hommey In-Reply-To: <20091121222615.GA4925@glandium.org> References: <20091120132625.GA19246@glandium.org> <87y6m0lxym.fsf@yoom.home.cworth.org> <20091120210556.GA25421@glandium.org> <20091121222615.GA4925@glandium.org> Date: Sun, 22 Nov 2009 04:12:26 +0100 Message-ID: <87k4xj2qxx.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Segfault with weird Message-ID X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 03:12:39 -0000 On Sat, 21 Nov 2009 23:26:15 +0100, Mike Hommey wrote: > I just was able to reproduce after starting over. Thanks Mike. I was able to reproduce this as well by eliminating the spurious blank line I had on the 2nd or 3rd line. (So maybe that managed to sneak in when you sent me the message.) > header isn't "", and message_id is correctly filled. I can also confirm > the exception is thrown from notmuch->xapian_db->add_document. Yes. We were trying to add a term that is too long for Xapian. I've fixed this by simply falling back to our existing sha-1 code when a message ID is long. Thanks so much for the bug report! -Carl commit 5d56e931b99d575dbb0b936d24aae5e9903861ad Author: Carl Worth Date: Sun Nov 22 04:03:49 2009 +0100 add_message: Use sha-1 in place of overly long message ID. Since Xapian has a limit on the maximum length of a term, we have to check for that before trying to add the message ID as a term. This fixes the bug reported by Mike Hommey here: <20091120132625.GA19246@glandium.org> I've also constructed 20 files with a range of message ID lengths centered around the Xapian term-length limit which I'll use to seed a new test suite soon. diff --git a/lib/database.cc b/lib/database.cc index 169dc5e..f4a445a 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -892,7 +892,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch, const char *date, *header; const char *from, *to, *subject; - char *message_id; + char *message_id = NULL; if (message_ret) *message_ret = NULL; @@ -937,11 +937,20 @@ notmuch_database_add_message (notmuch_database_t *notmuch, header = notmuch_message_file_get_header (message_file, "message-id"); if (header && *header != '\0') { message_id = _parse_message_id (message_file, header, NULL); + /* So the header value isn't RFC-compliant, but it's * better than no message-id at all. */ if (message_id == NULL) message_id = talloc_strdup (message_file, header); - } else { + + /* Reject a Message ID that's too long. */ + if (message_id && strlen (message_id) + 1 > NOTMUCH_TERM_MAX) { + talloc_free (message_id); + message_id = NULL; + } + } + + if (message_id == NULL ) { /* No message-id at all, let's generate one by taking a * hash over the file's contents. */ char *sha1 = notmuch_sha1_of_file (filename); From cworth@cworth.org Sat Nov 21 19:28:31 2009 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 D20A4431FBF; Sat, 21 Nov 2009 19:28:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 SefZV3xd2Lqu; Sat, 21 Nov 2009 19:28:31 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 5D685431FAE; Sat, 21 Nov 2009 19:28:30 -0800 (PST) From: Carl Worth To: Brett Viren In-Reply-To: <46263c600911211436s5826015eqc5fc18a4164245cb@mail.gmail.com> References: <20091121145111.GB19397@excalibur.local> <87fx874xj5.fsf@yoom.home.cworth.org> <46263c600911211436s5826015eqc5fc18a4164245cb@mail.gmail.com> Date: Sun, 22 Nov 2009 04:28:18 +0100 Message-ID: <87hbsn2q7h.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 03:28:32 -0000 On Sat, 21 Nov 2009 17:36:18 -0500, Brett Viren wrote: > Processed 130871 total files in 38m 7s (57 files/sec.). > Added 102723 new messages to the database (not much, really). Just be glad that you have so little mail. ;-) > This was ~2GB of mail on a 2.5GHz CPU. That seems pretty reasonable > to me but I'd like to rerun the "notmuch new" under google perftools > to see if there are any obvious bottlenecks that might be cleaned up. To me, here are the obvious things to fix after looking at a profile: 1. We're spending a *lot* of time searching in the Xapian database. But our initial indexing operation should only be *writing* data into the database, so what's this searching about? Well, at each new message, we're looking up the ID from it's In-Reply-To header to find a thread-ID to link to, and then we're looking up all of the IDs from its References header to find thread IDs that need to be merged with ours. So both parent and child lookups. And since those are taking a bunch of time, I think it might make sense to just keep a hashtable mapping message-ID -> thread-ID and do lookups in that, (should have plenty of memory on current machines even with lots of mail). 2. We're hitting the slow Xapian document updates for thread-ID merging. Whenever we find a child that was already in the database with one thread ID that should have ours, we simply want to set its thread ID to ours. But as we've talked about recently, Xapian has a bug (defect 250) that makes it much more expensive than it should be to update a single term. So, we could do a first pass over the messages to find all their thread IDs and get them to settle down before doing any indexing in a separate, second pass. Step (2) should help even if we don't do step (1), but clearly we can do both. It would be great if anyone wants to take a look at either or both of these, otherwise I will when I can. -Carl From bart@jukie.net Sat Nov 21 19:45:31 2009 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 9867C431FBF for ; Sat, 21 Nov 2009 19:45:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 f+WHFLIFL+4t for ; Sat, 21 Nov 2009 19:45:31 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id CC44B431FAE for ; Sat, 21 Nov 2009 19:45:30 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id 43B93C05611; Sat, 21 Nov 2009 22:45:30 -0500 (EST) Date: Sat, 21 Nov 2009 22:45:30 -0500 From: Bart Trojanowski To: Carl Worth Message-ID: <20091122034530.GD17268@jukie.net> References: <1258630481-5133-1-git-send-email-jan@ryngle.com> <1258630481-5133-2-git-send-email-jan@ryngle.com> <87lji2bmrb.fsf@yoom.home.cworth.org> <87my2f329e.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87my2f329e.fsf@yoom.home.cworth.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 2/2] notmuch list: A new command to produce various lists. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 03:45:31 -0000 * Carl Worth [091121 18:08]: > Another option would be to just call this "notmuch search" and have an > option to control what is output: > > notmuch search # for threads, as currently > notmuch search --output=tags > notmuch search --output=messages > > Actually, I kind of like that. For one thing, it makes it easy to > eliminate the redundancy I made with the option-parsing in both > notmuch-search.c and notmuch-search-message.c. I too prefer this option. It keeps the interface and code simpler. Moreover, it might also eliminate the need for 'notmuch count'. Simply pass --count-only to the search command. -Bart -- WebSig: http://www.jukie.net/~bart/sig/ From cworth@cworth.org Sat Nov 21 19:49:00 2009 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 D6068431FBC; Sat, 21 Nov 2009 19:49:00 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ei4+DNwYN0QX; Sat, 21 Nov 2009 19:49:00 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id DCC4F431FAE; Sat, 21 Nov 2009 19:48:59 -0800 (PST) From: Carl Worth To: Mikhail Gusarov , Chris Wilson In-Reply-To: <874oonpk5a.fsf@vertex.dottedmag> References: <87my2fpty1.fsf@vertex.dottedmag> <1258835540-21094-1-git-send-email-chris@chris-wilson.co.uk> <874oonpk5a.fsf@vertex.dottedmag> Date: Sun, 22 Nov 2009 04:48:48 +0100 Message-ID: <87fx872p9b.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] Makefile: Magic silent rules. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 03:49:01 -0000 On Sun, 22 Nov 2009 04:50:41 +0600, Mikhail Gusarov wrote: > Uhm. Now it eats much less :) > > $ make > ... > GZIP notmuch.1.gz > /bin/sh: --rsyncable: not found > make: *** [notmuch.1.gz] Error 127 > $ > > $ make V=1 > ... > rsyncable --stdout notmuch.1 > notmuch.1.gz > /bin/sh: rsyncable: not found > make: [notmuch.1.gz] Error 127 (ignored) The bug here was in using the GZIP variable assuming it would be a program name. But since gzip expects it to be additional arguments, we need to use a different name such as a "gzip" variable. Thanks for the original implementation, Chris. And thanks for the testing, Mikhail. I've pushed the original plus the below on top. -Carl commit 1266d8511e9adc7296ec4ddbf609dec824b4c94f Author: Carl Worth Date: Sun Nov 22 04:45:16 2009 +0100 Makefile: Fix to work even with GZIP environment variable set. The rule here was written to assume that if the GZIP environment variable was set that it would be the gzip binary to execute, (similar to the CC and CXX variables). But GZIP is actually used to pass arguments to gzip, so we have to use a different name. diff --git a/Makefile b/Makefile index 5d8f321..ae8bff1 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,9 @@ CFLAGS=-O2 # Additional programs that are used during the compilation process. EMACS ?= emacs -GZIP ?= gzip +# Lowercase to avoid clash with GZIP environment variable for passing +# arguments to gzip. +gzip = gzip # Additional flags that we will append to whatever the user set. # These aren't intended for the user to manipulate. diff --git a/Makefile.local b/Makefile.local index 5fd5d4f..b6d3db3 100644 --- a/Makefile.local +++ b/Makefile.local @@ -23,7 +23,7 @@ notmuch: $(notmuch_client_modules) lib/notmuch.a $(call quiet,CXX) $^ $(LDFLAGS) -o $@ notmuch.1.gz: notmuch.1 - $(call quiet,GZIP) --stdout $^ > $@ + $(call quiet,gzip) --stdout $^ > $@ install: all notmuch.1.gz for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \ From cworth@cworth.org Sat Nov 21 19:53:38 2009 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 9FF29431FBC; Sat, 21 Nov 2009 19:53:38 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 sZRS1VwSJ2+K; Sat, 21 Nov 2009 19:53:38 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id AE29E431FAE; Sat, 21 Nov 2009 19:53:37 -0800 (PST) From: Carl Worth To: Jed Brown , Jan Janak In-Reply-To: <876393tqfk.fsf@59A2.org> References: <1258630481-5133-1-git-send-email-jan@ryngle.com> <1258630481-5133-2-git-send-email-jan@ryngle.com> <87lji2bmrb.fsf@yoom.home.cworth.org> <87my2f329e.fsf@yoom.home.cworth.org> <876393tqfk.fsf@59A2.org> Date: Sun, 22 Nov 2009 04:53:25 +0100 Message-ID: <87einr2p1m.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 2/2] notmuch list: A new command to produce various lists. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 03:53:38 -0000 On Sun, 22 Nov 2009 00:21:19 +0100, Jed Brown wrote: > On Sun, 22 Nov 2009 00:07:57 +0100, Carl Worth wrote: > > One thing we'll still have to think about is how to remove the "virtual > > tags" from the completion list, (once we have virtual tags in the > > configuration file---that is, tags applied automatically based on search > > specifications). > > Do these need to be real tags? Would it be sufficient for them to just > be aliases for search patterns? I think I would prefer the latter > because I could modify the pattern and not have to rewrite tags to the > whole database. Maybe real tags are needed to optimize expensive > patterns, but I wouldn't think the user needs to know about that. They are conceptually just aliases for search patterns, yes. But when I'm working with my mail I think I want them be accessible in an identical way to tags I apply manually. That is I want to be able to search for "tag:foo" and filter the current search view on the "bar" tag without having to remember to distinguish as a users whether "foo" or "bar" is a tag or an "aliased search term". As for your concerns, tag updates are going to be made really fast, (we just *have* to fix that bug, and soon), so I don't think there's going to be any problem with updating these rules and having to update the state in the database. -Carl From cworth@cworth.org Sat Nov 21 20:05:10 2009 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 F19E0431FBF; Sat, 21 Nov 2009 20:05:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 fGoorOxAdXq8; Sat, 21 Nov 2009 20:05:09 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8CE40431FAE; Sat, 21 Nov 2009 20:05:08 -0800 (PST) From: Carl Worth To: Michiel Buddingh' , Bart Trojanowski In-Reply-To: <9cce5525b093b87fe74d427954ffad89@localhost> References: <87fx8bygi7.fsf@linux.vnet.ibm.com> <87bpiv4t9h.fsf@yoom.home.cworth.org> <87y6lz39nd.fsf@yoom.home.cworth.org> <20091121221207.GB17268@jukie.net> <9cce5525b093b87fe74d427954ffad89@localhost> Date: Sun, 22 Nov 2009 05:04:56 +0100 Message-ID: <87d43b2oif.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch Subject: Re: [notmuch] [PATCH] notmuch: Add Maildir directory name as tag name for messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 04:05:10 -0000 On Sun, 22 Nov 2009 00:25:43 +0100, Michiel Buddingh' wrote: > (hi, new here, just subscribed today. Wanted to reply to Carl's > earlier message I read in the archives, but since I don't have that, > I'm replying to Bart's reply to that message) Hi Michel, welcome to Notmuch! > Any attempt to match tags up to directories will eventually have > to deal with with the fact that tags can't be neatly mapped onto > them. If I remove a directory-tag from a message, does this > mean the message is removed from that directory? What if a > message has two directory-tags, does it mean it's present in both > directories? Right. We definitely don't want a strong mapping here. I think one answer could be that the initial import is different and can take the directory names as a "hint" for initializing tag values. After that, they are just tags in the database and the user can do whatever they want. This would mean that the user will need some other way to apply tags to future messages that might be delivered to those same directories. And we've got search-based tagging for that, (as well as manual tagging for the case where a user was manually filing messages into folders before). And while developing these search-based tags the user can use a different tag name. Say there was a directory named "foo", then the user might experiment with a search-based tag named "foo-search" and explore the results of things like: notmuch search tag:foo and not tag:foo-search notmuch search tag:foo-search and not tag:foo So even if in the end the user comes up with something that could replace the original tag, it's probably still beneficial to have it there when starting out. > At the same time, this kind of interoperability would be highly > desirable to those of us who access their mail using other > clients (webmail, mobile phones, etc.) that expect hierarchical > ordering. That kind of thing is going to be "harder". So far we're trying to stick with the principle that notmuch itself doesn't mess with the data store. But then, we also want notmuch to be very scriptable, so someone might write a tool that uses notmuch search to export a set of hierarchical maildirs based on the tag names. (These could even just be populated with symlinks like mairix does.) So something like that could be really useful for integrating. I'm very much of the opinion that the user shouldn't care at all about the storage of the actual mail files that notmuch indexes. > In the mean time, I've made a smaller, hopefully more harmless > patch to let 'notmuch new' mark messages stored in a Maildir 'cur' > folder as 'read' rather than 'unread'. Can others who have more experience weigh in here? Will this do the right thing for you? Do mail clients wait to move things into "cur" after the user has actually read them, or is that just a place where they are moved when the MUA _receives_ them? -Carl From cworth@cworth.org Sat Nov 21 20:08:04 2009 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 DA69A431FBC; Sat, 21 Nov 2009 20:08:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 AcSNqLXUCoH7; Sat, 21 Nov 2009 20:08:04 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D2005431FAE; Sat, 21 Nov 2009 20:08:03 -0800 (PST) From: Carl Worth To: Chris Wilson , notmuch@notmuchmail.org In-Reply-To: <1258834111-18285-1-git-send-email-chris@chris-wilson.co.uk> References: <1258834111-18285-1-git-send-email-chris@chris-wilson.co.uk> Date: Sun, 22 Nov 2009 05:07:52 +0100 Message-ID: <87aayf2odj.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Permit opening the notmuch database in read-only mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 04:08:05 -0000 On Sat, 21 Nov 2009 20:08:31 +0000, Chris Wilson wrote: > [ickle: Updated to add WRITABLE mode to notmuch-new] Oops. I committed your earlier version, but then fixed this up afterwards myself. -Carl From alex.boterolowry@gmail.com Sat Nov 21 20:17:16 2009 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 C8E28431FBC for ; Sat, 21 Nov 2009 20:17:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 9UdNpj+Yqq-L for ; Sat, 21 Nov 2009 20:17:16 -0800 (PST) Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com [209.85.210.204]) by olra.theworths.org (Postfix) with ESMTP id F4122431FAE for ; Sat, 21 Nov 2009 20:17:15 -0800 (PST) Received: by yxe42 with SMTP id 42so4577925yxe.22 for ; Sat, 21 Nov 2009 20:17:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=yeNwB4FeJe5/7H2rWr8QZtO0wSVfjQzwEgyUM00pNng=; b=iio1bEnaYK/H1tVAKs/V4mnKO1xpKQMk+naRBf1TYhDQfGIbwkWWq1c1viBH2CcddW AcfKqBMHNSVGX/FKfZu9k6bqdKEvAp+0O6uzAylhrT7KelyKhqifg3FDz1AwGSM5woOt YV/ciohacsga+6AizLM5R/uzagRzIGfJwkZjA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-type; b=xnoYSrUGqMpDR+FYmHGaEaqBA7x/JN/GkhwVWhadO6H5pC55fsbCY5yZp9NtffhsCo 1ZhIDaWoLoDJYq8Qbwo+6kUUrn6djTXCVuLYiJAvENhbdiV/S+jw3h5ydGLGQMXvaeLG j4nf8rON1N4ahYoKTkuo7ESBV/HioqQV16wo4= Received: by 10.150.71.31 with SMTP id t31mr5879445yba.18.1258863435592; Sat, 21 Nov 2009 20:17:15 -0800 (PST) Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85]) by mx.google.com with ESMTPS id 15sm1495919gxk.0.2009.11.21.20.17.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Nov 2009 20:17:15 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo.i-did-not-set--mail-host-address--so-tickle-me) id 70d5 by fortitudo (DragonFly Mail Agent) Sat, 21 Nov 2009 20:17:17 -0800 From: Alexander Botero-Lowry To: Jjgod Jiang , notmuch@notmuchmail.org In-Reply-To: <1258859256-33197-1-git-send-email-gzjjgod@gmail.com> References: <1258859256-33197-1-git-send-email-gzjjgod@gmail.com> Date: Sat, 21 Nov 2009 20:17:17 -0800 Message-ID: <86pr7b9os2.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Mac OS X compatibility fixes X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 04:17:16 -0000 On Sun, 22 Nov 2009 11:07:36 +0800, Jjgod Jiang wrote: > Add missing GNU extensions strdup() and getline(). The C library > shipped with Mac OS X does not include them (though it does support > some GNU extensions when _GNU_SOURCE is defined), so we have to > add these two. The getline() implementation is a modified version > of getdelim() from GNU Libc. Awesome! > diff --git a/lib/xutil.c b/lib/xutil.c > index 6fa5eb0..805b236 100644 > --- a/lib/xutil.c > +++ b/lib/xutil.c > @@ -79,6 +79,105 @@ xstrdup (const char *s) > return ret; > } > > +#ifdef __APPLE__ Not awesome. This should be done in a capabilites way, for example strndup was added to FreeBSD in 7.2 (which is this current release of the 7 line), and so for older versions of FreeBSD strndup will be needed. getdelim() and getline() came in FreeBSD 8, so they'll be needed for the entire 7 line. So Instead of just assuming __APPLE__ this should be done by determing if the symbols are generally needed. alex From cworth@cworth.org Sat Nov 21 20:22:05 2009 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 AC85B431FBF; Sat, 21 Nov 2009 20:22:05 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 OQN3GZ6Fahom; Sat, 21 Nov 2009 20:22:05 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 9C241431FAE; Sat, 21 Nov 2009 20:22:04 -0800 (PST) From: Carl Worth To: Jan Janak , Not Much Mail In-Reply-To: References: Date: Sun, 22 Nov 2009 05:21:52 +0100 Message-ID: <878wdz2nq7.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] RFC: Multiple filenames for email messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 04:22:05 -0000 On Sat, 21 Nov 2009 23:37:24 +0100, Jan Janak wrote: > The comment of _notmuch_message_set_filename says: > > XXX: We should still figure out if we think it's important to store > multiple filenames for email messages with identical message IDs. ... > I'd like to propose that we store all filenames for email messages in > the database, not just one per message. I'd be happy to work on it and > submit a patch if others think that this would be good to have. Oh, sure. As soon as we start using filenames for searches, then that makes a lot of sense. Currently, notmuch isn't storing any filename that way, but should be, (need to just add a prefix to the table at the top of lib/database.cc, document it, and then make the indexing stage generate terms from the filename with that prefix). The term generator and query parser should do the right thing, which is to split the filename into individual terms at each '/', store position data with each, and then turn a search like: filename:some/filename/segment into a phrase search that looks for the terms "some", "filename", and "segment", each with the filename prefix you choose and each in sequential position. Note that if you compile notmuch with CFLAGS including -DDEBUG then you'll see a nice report of the post-parsed query that's useful for debugging stuff like this. The reason for my comment was related to the other use of the filename, (that is, the only one we're currently using). This is with regard to querying the database for the actual filename, rather than searching on it. For this, we don't use terms, but instead use the "data" field of the document. I was wondering if in the presentation of an email message it would ever be important to have access to the multiple files. Can anyone think of a case where they would need that? That is, a case where you care about the distinct content of two messages that have the same message ID? I suppose that in the case of getting a message by two paths, (say through a mailing list and also via CC), one might want to inspect the different headers in the two versions. So maybe we'll need to break down and provide this information to the interfaces. Also, if we're going to support file deletion well, then I suppose we really will need to store all the filenames, (so if one disappears we can still point to the others). Also, we'll need to be able to accurately update the filename terms when a message disappears, so that means having all of the complete filenames around. So I guess I'm convincing myself that we really should store all the filenames, and also provide an interface to get a list of filenames for a message, (but also expect that many users of the API will only want to look at the first filename in the list). -Carl From cworth@cworth.org Sat Nov 21 20:26:31 2009 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 83E1D431FBF; Sat, 21 Nov 2009 20:26:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 OofP2Y00CdlF; Sat, 21 Nov 2009 20:26:31 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8D74C431FAE; Sat, 21 Nov 2009 20:26:30 -0800 (PST) From: Carl Worth To: Jameson Graef Rollins , notmuch@notmuchmail.org In-Reply-To: <20091121230638.GA31999@finestructure.net> References: <20091121230638.GA31999@finestructure.net> Date: Sun, 22 Nov 2009 05:26:18 +0100 Message-ID: <877htj2nit.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] suggestion/request about notmuch config X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 04:26:31 -0000 On Sat, 21 Nov 2009 18:06:38 -0500, Jameson Graef Rollins wrote: > Hi, folks. I just recently heard about notmuch and am very excited by > it. It looks like exactly what I've been waiting years for. Also > excited to see so much good development work happening. Hi Jamie, welcome to notmuch! > I would prefer to see all notmuch files and data in the same > directory, preferably: > > ~/.notmuch > > The config file could be: > > ~/.notmuch/config > > and the database could be: > > ~/.notmuch/db I suppose that's totally reasonable, (though I wouldn't abbreviate "database" to "db"). I think the only thing I'd miss is that I can currently point the config file to a different database, (which is usually just for testing.) And really, for that what I really want is a "-f" option to the notmuch command to make it read from a specified configuration file. So if I had that option then I don't think I'd mind this change at all. > Let me know what people think. Looking forward to working with > notmuch! And I'm looking forward to your contributions. Thanks again, -Carl From cworth@cworth.org Sat Nov 21 20:27:41 2009 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 62D79431FBC; Sat, 21 Nov 2009 20:27:41 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 s25T1NQZsd2x; Sat, 21 Nov 2009 20:27:40 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 22180431FAE; Sat, 21 Nov 2009 20:27:40 -0800 (PST) From: Carl Worth To: Chris Wilson , notmuch@notmuchmail.org In-Reply-To: <1258845279-24291-1-git-send-email-chris@chris-wilson.co.uk> References: <1258845279-24291-1-git-send-email-chris@chris-wilson.co.uk> Date: Sun, 22 Nov 2009 05:27:28 +0100 Message-ID: <8763932ngv.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] lib/database.cc: coding style X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 04:27:41 -0000 On Sat, 21 Nov 2009 23:14:39 +0000, Chris Wilson wrote: > Carl claims he must have been distracted when he wrote this... Indeed. Thanks for keeping my sloppy code looking so clean. -Carl From bart@jukie.net Sat Nov 21 20:29:15 2009 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 AE2B5431FAE for ; Sat, 21 Nov 2009 20:29:15 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 3Yin-Wlczrpd for ; Sat, 21 Nov 2009 20:29:14 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 6A868431FBC for ; Sat, 21 Nov 2009 20:29:14 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id AE9BDC05616; Sat, 21 Nov 2009 23:29:13 -0500 (EST) Date: Sat, 21 Nov 2009 23:29:13 -0500 From: Bart Trojanowski To: Carl Worth Message-ID: <20091122042913.GE17268@jukie.net> References: <20091121183909.GG24944@jukie.net> <873a474ov5.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <873a474ov5.fsf@yoom.home.cworth.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] notmuch vim support X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 04:29:15 -0000 * Carl Worth [091121 15:14]: > So, well done! Thank you. > I think the only thing we noticed is that "filter" doesn't add the "and" > between the old and new search terms. But Chris may have more to comment > soon. I think I fixed that along the way. I'll verify. > I don't know how realistic it will be to keep both interfaces totally > synchronized in terms of look-and-feel, colors, keybindings, etc. But it > might be nice to do that as much as possible. I think it would be > helpful if we could have interface discussions as an entire community > and not split based on choice of editor. Perfect. -Bart -- WebSig: http://www.jukie.net/~bart/sig/ From michiel@michielbuddingh.net Sat Nov 21 15:25:47 2009 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 53008431FBC for ; Sat, 21 Nov 2009 15:25:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Amavis-Alert: BAD HEADER SECTION, Missing required header field: "From" 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 h48L-RrSbQSO for ; Sat, 21 Nov 2009 15:25:46 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by olra.theworths.org (Postfix) with ESMTP id 98844431FAE for ; Sat, 21 Nov 2009 15:25:46 -0800 (PST) Received: from aegir.org.uk (aegir.org.uk [87.238.170.13]) by mx.perfora.net (node=mxus0) with ESMTP (Nemesis) id 0LdXEw-1NudTf1Mgc-00iFza for notmuch@notmuchmail.org; Sat, 21 Nov 2009 18:25:46 -0500 Received: by aegir.org.uk (Postfix, from userid 80) id 46B092E02A; Sun, 22 Nov 2009 00:25:43 +0100 (CET) To: Bart Trojanowski Message-Id: <0LdXEw-1NudTf1Mgc-00iFza@mx.perfora.net> Date: Sat, 21 Nov 2009 18:25:45 -0500 From: michiel@michielbuddingh.net X-Mailman-Approved-At: Sat, 21 Nov 2009 20:30:27 -0800 Subject: Re: [notmuch] [PATCH] notmuch: Add Maildir directory name as X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 23:25:47 -0000 =?UTF-8?Q?tag=09name=20for=20messages?= MIME-Version: 1.0 Date: Sun, 22 Nov 2009 00:25:43 +0100 From: Michiel Buddingh' Cc: Carl Worth , notmuch In-Reply-To: <20091121221207.GB17268@jukie.net> References: <87fx8bygi7.fsf@linux.vnet.ibm.com> <87bpiv4t9h.fsf@yoom.home.cworth.org> <87y6lz39nd.fsf@yoom.home.cworth.org> <20091121221207.GB17268@jukie.net> Message-ID: <9cce5525b093b87fe74d427954ffad89@localhost> X-Sender: michiel@michielbuddingh.net User-Agent: RoundCube Webmail/0.1 Content-Type: multipart/mixed; boundary="=_365db8948ca90006e4bd3511ef958271" --=_365db8948ca90006e4bd3511ef958271 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 On Sat, 21 Nov 2009 17:12:07 -0500, Bart Trojanowski wrote: >> I realized that I actually don't want my mail tagged based on the >> maildir directories I'm using, (they are arbitrarily-named directories >> used only to keep the per-directory number of files below about 10 >> thousand). >> >> So we'll probably need to make this an opt-in feature from the >> configuration file. > > I think notmuch needs something that will add tags based on the > attributes of a message (headers or body), as it imports data from a > maildir. > > I am currently considering having procmail deliver to date based > (YYYY-MM) folders and have notmuch determine what tags they should get. (hi, new here, just subscribed today. Wanted to reply to Carl's earlier message I read in the archives, but since I don't have that, I'm replying to Bart's reply to that message) Any attempt to match tags up to directories will eventually have to deal with with the fact that tags can't be neatly mapped onto them. If I remove a directory-tag from a message, does this mean the message is removed from that directory? What if a message has two directory-tags, does it mean it's present in both directories? At the same time, this kind of interoperability would be highly desirable to those of us who access their mail using other clients (webmail, mobile phones, etc.) that expect hierarchical ordering. In the mean time, I've made a smaller, hopefully more harmless patch to let 'notmuch new' mark messages stored in a Maildir 'cur' folder as 'read' rather than 'unread'. via webmail, Michiel Buddingh' --=_365db8948ca90006e4bd3511ef958271 Content-Transfer-Encoding: base64 Content-Type: application/octet-stream; charset=UTF-8; name=0001-Derive-read-status-from-Maildir-cur-folder.patch; Content-Disposition: attachment; filename=0001-Derive-read-status-from-Maildir-cur-folder.patch; RnJvbSA4YTJkZTEwNjk2YzBlOGVjYWI3ZmU1NDQxYjk5YTMzYTkwNGRiNzY5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNaWNoaWVsIEJ1ZGRpbmdoIDxtaWNoaWVsQG1pY2hpZWxidWRk aW5naC5uZXQ+CkRhdGU6IFN1biwgMjIgTm92IDIwMDkgMDA6MTQ6MTkgKzAxMDAKU3ViamVjdDog W1BBVENIXSBEZXJpdmUgcmVhZCBzdGF0dXMgZnJvbSBNYWlsZGlyIGN1ciBmb2xkZXIKCi0tLQog bm90bXVjaC1uZXcuYyB8ICAgNDIgKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrLS0tLS0t LS0tLS0tCiAxIGZpbGVzIGNoYW5nZWQsIDMwIGluc2VydGlvbnMoKyksIDEyIGRlbGV0aW9ucygt KQoKZGlmZiAtLWdpdCBhL25vdG11Y2gtbmV3LmMgYi9ub3RtdWNoLW5ldy5jCmluZGV4IGJjMzVi NGUuLmEzNjY0NTMgMTAwNjQ0Ci0tLSBhL25vdG11Y2gtbmV3LmMKKysrIGIvbm90bXVjaC1uZXcu YwpAQCAtMzksMTIgKzM5LDE3IEBAIGhhbmRsZV9zaWdpbnQgKHVudXNlZCAoaW50IHNpZykpCiB9 CiAKIHN0YXRpYyB2b2lkCi10YWdfaW5ib3hfYW5kX3VucmVhZCAobm90bXVjaF9tZXNzYWdlX3Qg Km1lc3NhZ2UpCit0YWdfYXNfaW5ib3ggKG5vdG11Y2hfbWVzc2FnZV90ICptZXNzYWdlLCBjb25z dCBpbnQgcmVhZCkKIHsKICAgICBub3RtdWNoX21lc3NhZ2VfYWRkX3RhZyAobWVzc2FnZSwgImlu Ym94Iik7Ci0gICAgbm90bXVjaF9tZXNzYWdlX2FkZF90YWcgKG1lc3NhZ2UsICJ1bnJlYWQiKTsK KyAgICBpZiAocmVhZCA9PSBUUlVFKSB7CisJbm90bXVjaF9tZXNzYWdlX2FkZF90YWcgKG1lc3Nh Z2UsICJyZWFkIik7CisgICAgfSBlbHNlIHsKKwlub3RtdWNoX21lc3NhZ2VfYWRkX3RhZyAobWVz c2FnZSwgInVucmVhZCIpOworICAgIH0KIH0KIAorCiBzdGF0aWMgdm9pZAogYWRkX2ZpbGVzX3By aW50X3Byb2dyZXNzIChhZGRfZmlsZXNfc3RhdGVfdCAqc3RhdGUpCiB7CkBAIC0xMTEsMTkgKzEx NiwyNCBAQCBhZGRfZmlsZXNfcmVjdXJzaXZlIChub3RtdWNoX2RhdGFiYXNlX3QgKm5vdG11Y2gs CiAgICAgbm90bXVjaF9zdGF0dXNfdCBzdGF0dXMsIHJldCA9IE5PVE1VQ0hfU1RBVFVTX1NVQ0NF U1M7CiAgICAgbm90bXVjaF9tZXNzYWdlX3QgKm1lc3NhZ2UgPSBOVUxMOwogICAgIHN0cnVjdCBk aXJlbnQgKipuYW1lbGlzdCA9IE5VTEw7CisgICAgaW50IGRpcl9oYXNfb25seV9yZWFkX21lc3Nh Z2VzID0gRkFMU0U7CiAgICAgaW50IG51bV9lbnRyaWVzOwogCi0gICAgLyogSWYgd2UncmUgdG9s ZCB0bywgd2UgYmFpbCBvdXQgb24gZW5jb3VudGVyaW5nIGEgcmVhZC1vbmx5Ci0gICAgICogZGly ZWN0b3J5LCAod2l0aCB0aGlzIGJlaW5nIGEgY2xlYXIgY2x1ZSBmcm9tIHRoZSB1c2VyIHRvCi0g ICAgICogTm90bXVjaCB0aGF0IG5ldyBtYWlsIHdvbid0IGJlIGFycml2aW5nIHRoZXJlIGFuZCB3 ZSBuZWVkIG5vdAotICAgICAqIGxvb2suICovCi0gICAgaWYgKHN0YXRlLT5pZ25vcmVfcmVhZF9v bmx5X2RpcmVjdG9yaWVzICYmCi0JKHN0LT5zdF9tb2RlICYgU19JV1VTUikgPT0gMCkKLSAgICB7 Ci0Jc3RhdGUtPnNhd19yZWFkX29ubHlfZGlyZWN0b3J5ID0gVFJVRTsKLQlnb3RvIERPTkU7CisK KyAgICBpZiAoKHN0LT5zdF9tb2RlICYgU19JV1VTUikgPT0gMCkgeworCS8qIElmIHdlJ3JlIHRv bGQgdG8sIHdlIGJhaWwgb3V0IG9uIGVuY291bnRlcmluZyBhIHJlYWQtb25seQorCSAqIGRpcmVj dG9yeSwgKHdpdGggdGhpcyBiZWluZyBhIGNsZWFyIGNsdWUgZnJvbSB0aGUgdXNlciB0bworCSAq IE5vdG11Y2ggdGhhdCBuZXcgbWFpbCB3b24ndCBiZSBhcnJpdmluZyB0aGVyZSBhbmQgd2UgbmVl ZCBub3QKKwkgKiBsb29rLiAqLworCWlmIChzdGF0ZS0+aWdub3JlX3JlYWRfb25seV9kaXJlY3Rv cmllcykgeworCSAgICBzdGF0ZS0+c2F3X3JlYWRfb25seV9kaXJlY3RvcnkgPSBUUlVFOworCSAg ICBnb3RvIERPTkU7CSAgICAKKwl9IGVsc2UgeworCSAgICBkaXJfaGFzX29ubHlfcmVhZF9tZXNz YWdlcyA9IFRSVUU7CisJfQogICAgIH0KIAorCiAgICAgcGF0aF9tdGltZSA9IHN0LT5zdF9tdGlt ZTsKIAogICAgIHBhdGhfZGJ0aW1lID0gbm90bXVjaF9kYXRhYmFzZV9nZXRfdGltZXN0YW1wIChu b3RtdWNoLCBwYXRoKTsKQEAgLTEzNiw2ICsxNDYsMTQgQEAgYWRkX2ZpbGVzX3JlY3Vyc2l2ZSAo bm90bXVjaF9kYXRhYmFzZV90ICpub3RtdWNoLAogCWdvdG8gRE9ORTsKICAgICB9CiAKKyAgICB7 IAorCWludCBsOworCisJaWYgKCgobCA9IHN0cmxlbihwYXRoKSkgPiAzKSAmJiAoc3RyY21wKHBh dGggKyAobCAtIDMpLCAiY3VyIikgPT0gMCkpIHsKKwkgICAgZGlyX2hhc19vbmx5X3JlYWRfbWVz c2FnZXMgPSBUUlVFOworCX0KKyAgICB9CisKICAgICBpbnQgaT0wOwogCiAgICAgd2hpbGUgKCFp bnRlcnJ1cHRlZCkgewpAQCAtMTgyLDcgKzIwMCw3IEBAIGFkZF9maWxlc19yZWN1cnNpdmUgKG5v dG11Y2hfZGF0YWJhc2VfdCAqbm90bXVjaCwKIAkJICAgIC8qIHN1Y2Nlc3MgKi8KIAkJICAgIGNh c2UgTk9UTVVDSF9TVEFUVVNfU1VDQ0VTUzoKIAkJCXN0YXRlLT5hZGRlZF9tZXNzYWdlcysrOwot CQkJdGFnX2luYm94X2FuZF91bnJlYWQgKG1lc3NhZ2UpOworCQkJdGFnX2FzX2luYm94IChtZXNz YWdlLCBkaXJfaGFzX29ubHlfcmVhZF9tZXNzYWdlcyk7CiAJCQlicmVhazsKIAkJICAgIC8qIE5v bi1mYXRhbCBpc3N1ZXMgKGdvIG9uIHRvIG5leHQgZmlsZSkgKi8KIAkJICAgIGNhc2UgTk9UTVVD SF9TVEFUVVNfRFVQTElDQVRFX01FU1NBR0VfSUQ6Ci0tIAoxLjYuNS4zCgo= --=_365db8948ca90006e4bd3511ef958271-- From bart@jukie.net Sat Nov 21 20:31:53 2009 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 D4885431FBF for ; Sat, 21 Nov 2009 20:31:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 q+vzaA0N058N for ; Sat, 21 Nov 2009 20:31:53 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 070D1431FBC for ; Sat, 21 Nov 2009 20:31:53 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id 810AFC05616; Sat, 21 Nov 2009 23:31:52 -0500 (EST) Date: Sat, 21 Nov 2009 23:31:52 -0500 From: Bart Trojanowski To: Carl Worth Message-ID: <20091122043152.GF17268@jukie.net> References: <20091121183909.GG24944@jukie.net> <20091121190606.GA24602@excalibur.local> <20091121191402.GA17268@jukie.net> <871vjr4olh.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871vjr4olh.fsf@yoom.home.cworth.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] notmuch vim support X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 04:31:54 -0000 * Carl Worth [091121 15:20]: > On Sat, 21 Nov 2009 14:14:02 -0500, Bart Trojanowski wrote: > > Perfect. How would you like to proceed with the initial integration? > > Pulling my tree, or me squashing all the changes into a single patch? > > Also, are you OK with where the files live (ie under a vim directory). > > I'm glad to pull (it will be nice for you to have the accurate > history). And a vim directory sounds perfect. Indeed. > Or should we do interfaces/emacs and interfaces/vim ? I don't know. I don't really have a preference. As long as 'make install' at the top doesn't install both/either blindly. > Email or pull requests are fine. You're clearly the "owner" of the vim > stuff, so don't expect any refusals to pull from me. (And feel free to > ping me out of band if you don't want to clutter the list with pull > requests---but it's more likely that you'll want to let people on the > list know about changes anyway.) Great. Thanks. I'll keep the list informed. -Bart -- WebSig: http://www.jukie.net/~bart/sig/ From gzjjgod@gmail.com Sat Nov 21 20:31:55 2009 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 274FE431FBF for ; Sat, 21 Nov 2009 20:31:55 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 h+ZqC4X8L51H for ; Sat, 21 Nov 2009 20:31:54 -0800 (PST) Received: from mail-pw0-f51.google.com (mail-pw0-f51.google.com [209.85.160.51]) by olra.theworths.org (Postfix) with ESMTP id 67D8C431FAE for ; Sat, 21 Nov 2009 20:31:54 -0800 (PST) Received: by pwj10 with SMTP id 10so2820080pwj.30 for ; Sat, 21 Nov 2009 20:31:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=g0aERYXp+a4JRD7+bGGkLKmuSUfo/WmEp8olWAjrTW8=; b=QZaQzVy5kmwNRYq17g4R1yS2cRHSEY8NxFNPcUAvupwBF/RNG3H6DHWnd9QbB3C7CY 68XOcw2CdL3GZ7Zpx35JPyv47cwfa3uruEQbWFGkdy561Yi9czhb534+tBYynd6nMDIp +qOdM/O/+toZ1AD2F+GUbirKvlSaruKGwxUf0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=x+GYJ9KCzSzxI5UQFagOSDTerW/tRqMBsWxMFL/I2cKUiC7siGpw7gURG9ByoWQV4q 6bDzMQ/MaSFh90FvLaAxgx2J9pyxzGjkXvD2cO5YkIBbWWiOLFknkKsTx2LnxQo990Q5 1ms56OlGDbyFNAvUZ0gD7U2lXWgOAQLuLhMVg= MIME-Version: 1.0 Received: by 10.115.115.14 with SMTP id s14mr5288656wam.189.1258864313952; Sat, 21 Nov 2009 20:31:53 -0800 (PST) In-Reply-To: <86pr7b9os2.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> References: <1258859256-33197-1-git-send-email-gzjjgod@gmail.com> <86pr7b9os2.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> Date: Sun, 22 Nov 2009 12:31:53 +0800 Message-ID: From: Jjgod Jiang To: Alexander Botero-Lowry Content-Type: text/plain; charset=UTF-8 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] Mac OS X compatibility fixes X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 04:31:55 -0000 Hi Alex, On Sun, Nov 22, 2009 at 12:17 PM, Alexander Botero-Lowry wrote: >> +#ifdef __APPLE__ > Not awesome. > > This should be done in a capabilites way, for example strndup was added > to FreeBSD in 7.2 (which is this current release of the 7 line), and so > for older versions of FreeBSD strndup will be needed. getdelim() and > getline() came in FreeBSD 8, so they'll be needed for the entire 7 line. > So Instead of just assuming __APPLE__ this should be done by determing > if the symbols are generally needed. The problem is that notmuch does not have a fully functional configure process yet, Carl did mention Makefile.local, but it seems this file is not generated by configure right now. (No config.h either.) I will be happy to fix my patch if such facility (like AC_CHECK_FUNCS([getline])) exists. - Jiang From cworth@cworth.org Sat Nov 21 20:38:27 2009 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 EB453431FBC; Sat, 21 Nov 2009 20:38:27 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 cUSWXACanz8Q; Sat, 21 Nov 2009 20:38:27 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E9C93431FAE; Sat, 21 Nov 2009 20:38:26 -0800 (PST) From: Carl Worth To: Chris Wilson , notmuch@notmuchmail.org In-Reply-To: <1258850672-28339-2-git-send-email-chris@chris-wilson.co.uk> References: <1258850672-28339-1-git-send-email-chris@chris-wilson.co.uk> <1258850672-28339-2-git-send-email-chris@chris-wilson.co.uk> Date: Sun, 22 Nov 2009 05:38:15 +0100 Message-ID: <874oon2myw.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH 1/2] notmuch-new: Only install SIGALRM if not running under gdb X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 04:38:28 -0000 On Sun, 22 Nov 2009 00:44:31 +0000, Chris Wilson wrote: > I felt sorry for Carl trying to step through an exception from xapian > and suffering from the SIGALARMs.. You're too kind, Chris. These are both pushed. And did you notice the way I didn't push as soon as I found your patches in my inbox, but this time I looked for the *next* set of patches. ;-) -Carl From gzjjgod@gmail.com Sat Nov 21 20:44:19 2009 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 C41A2431FBC for ; Sat, 21 Nov 2009 20:44:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 D7C2z3f2HNpX for ; Sat, 21 Nov 2009 20:44:19 -0800 (PST) Received: from mail-pw0-f51.google.com (mail-pw0-f51.google.com [209.85.160.51]) by olra.theworths.org (Postfix) with ESMTP id ECDF7431FAE for ; Sat, 21 Nov 2009 20:44:18 -0800 (PST) Received: by pwj10 with SMTP id 10so2822687pwj.30 for ; Sat, 21 Nov 2009 20:44:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=QQ5mD4ZVpqPzH+OFxMq5VU1zIoCWlWBvU3gwpb7ISzg=; b=MdJ3nnTlvkGmfn8iDvXBdQMH7bVhPCKi+JbjTjtXjQ0GEycZVfwILL6fMiWQ1J0Of7 rdhrOP/IZZzhKmQW4qQBFoQ7ItlViw9Qzxoxz7bo48QP6GyWHyBdF157elaDMe8f2/xH w47HYPJwfkY/cW2dbNoangRx3I62k9Zr+kIlI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=aGthvk7AMN3VcjtZE9tTyFdEbHMCfEawR3XxJ7RhaZ4Ep16oYCNbJq94ZOs87rY+ll nnRmqP3183mAHTSCzPfHcuqy0LiCi462lcbnVsO1ZXsE87wCD93YAUQ6s22mO9d/mSGv BL+DBTFTgWi9Wl8jhLQvC8z7JFQ1D/kfOhVvA= MIME-Version: 1.0 Received: by 10.115.115.14 with SMTP id s14mr5306252wam.189.1258865057967; Sat, 21 Nov 2009 20:44:17 -0800 (PST) Date: Sun, 22 Nov 2009 12:44:17 +0800 Message-ID: From: Jjgod Jiang To: notmuch@notmuchmail.org Content-Type: text/plain; charset=UTF-8 Subject: [notmuch] Guide for new users? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 04:44:19 -0000 Hi, I think it will be nice if we can have a guide/tutorial like documentation for new users. For myself, I have the following questions (I am an alpine user previously, so some of the questions are not related to notmuch directly): 1. What's the most efficient way to sync mails from my gmail account to a local Maildir? I've tried offlineimap but it keeps crashing python (!) on my system (python 2.6, Mac OS X 10.6.2). 2. How to add notmuch.el into my .emacsrc? I know notmuch feels like a tool for geeks, but it will probably lower the barrier if someone can provide such a guide in a straightforward, step-by-step way. - Jiang From cworth@cworth.org Sat Nov 21 21:12:44 2009 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 ED275431FBF; Sat, 21 Nov 2009 21:12:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 vMdFddMh5azB; Sat, 21 Nov 2009 21:12:43 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id AF32B431FAE; Sat, 21 Nov 2009 21:12:42 -0800 (PST) From: Carl Worth To: Bart Trojanowski , notmuch@notmuchmail.org In-Reply-To: <20091122021833.GC17268@jukie.net> Date: Sun, 22 Nov 2009 05:58:58 +0100 Message-ID: <87zl6f17fx.fsf@yoom.home.cworth.org> References: <20091122021833.GC17268@jukie.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [notmuch] hijacked threads can be confusing in notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 05:12:44 -0000 On Sat, 21 Nov 2009 21:18:34 -0500, Bart Trojanowski wrote: > In mutt it looked like this: >=20 > [notmuch] [PATCH 1/3] Make mouse-1 click in search view show thread > =E2=94=94=E2=94=80>[notmuch] [PATCH 2/3] Add 'notmuch count' command to= show the count of matching messages > =E2=94=94=E2=94=80>[notmuch] [PATCH 3/3] Add notmuch-index mode to di= splay message counts >=20 > ... and in the mutt threaded display the relationship between the three > messages is pretty clear. >=20 > Now consider what happens when I run notmuch search 'notmuch count'. I > get this: >=20 > Today 02:15 [2/3] Keith Packard; [notmuch] [PATCH 1/3] Make mouse-1 > click in search view show thread (inbox unread) Hmm... that's a bug. What notmuch *should* be doing here is taking as the subject of the thread the subject of the first message in the thread that matched, (rather than the subject of the first message in the thread). The thread_create has all that information, (it constructs two lists---one of all its messages, and one of matched messages). Now the next step is still missing. Let's say that instead of 2/3 mesages matched in the thread, (and by the way, did you all now that that's what's being reported there? it's not the number of unread messages or anything like that, but the number of matched messages). Anyway, let's say you had something like 1/20 there instead. And let's also assume that there aren't any unread messages in the thread. Then when you go to view that thread you will see all the messages open, and you won't have any information as to which message matched. What *should* happen here is that only the messages that matched should be open, and the messages that didn't match should be closed. Currently, the various pieces of the system don't have access to the information they need for this result. One way to do it would be to make "notmuch search" return a list of message IDs rather than a thread ID and then emacs could pass that list to "notmuch show". Alternately, the emacs interface could pass the current thread ID to "notmuch show" but also pass along the search string and then "notmuch show" could indicate which messages matched the search. Another thing to decide is how this relates with the default behavior of opening unread messages but closing read messages. Would possibility there could be to make that work just like any other search, just as I described above. If we were to go that route, I think it might mean getting rid of the distinction between "inbox" and "unread", and I'm not sure I want to do that or not. Anyway, I'd love to hear some ideas. > On a related note, one mail related pet peeve I have is when people > reply to a random email in their mailbox when they actually intend to > start a new thread. Doing that would totally mess up someone using > notmuch. They could get search results with threads which have no > relevance to their actual search... at least at first glance. Hopefully, the fix of displaying the subject from the first matched message would help here. -Carl From alec@thened.net Sat Nov 21 21:18:32 2009 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 70CC1431FBC for ; Sat, 21 Nov 2009 21:18:32 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 f0Nuuy7dXktS for ; Sat, 21 Nov 2009 21:18:31 -0800 (PST) Received: from ives.vdov.net (129.210.68.208.dnsptr.net [208.68.210.129]) by olra.theworths.org (Postfix) with ESMTP id C09F9431FAE for ; Sat, 21 Nov 2009 21:18:31 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by ives.vdov.net (Postfix) with ESMTP id 6439424F016 for ; Sat, 21 Nov 2009 23:18:35 -0600 (CST) Received: from ives.vdov.net ([127.0.0.1]) by localhost (ives.vdov.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vkTIUHbCL4dF; Sat, 21 Nov 2009 23:18:30 -0600 (CST) Received: from localhost (129.210.68.208.dnsptr.net [208.68.210.129]) by ives.vdov.net (Postfix) with ESMTPSA id 35BA924EE27; Sat, 21 Nov 2009 23:18:27 -0600 (CST) Date: Sat, 21 Nov 2009 23:18:26 -0600 From: Alec Berryman To: notmuch@notmuchmail.org Message-ID: <20091122051826.GA7299@thened.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Hashcash: 1:24:091122:notmuch@notmuchmail.org::W2PuxzJysnlv9CoN:00000000000000000000000000000000000000iRG9 Subject: [notmuch] [PATCH] Support multiple configuration files via $NOTMUCH_CONFIG X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 05:18:32 -0000 If present, $NOTMUCH_CONFIG will be used as the configuration file location. --- notmuch-config.c | 16 +++++++++++----- notmuch-setup.c | 3 ++- notmuch.1 | 7 ++++--- notmuch.c | 3 ++- 4 files changed, 19 insertions(+), 10 deletions(-) I'd like to have multiple configurations for personal and work email; this solution worked for me. I've been having trouble with git send-email and this list; sorry if this comes a few times. diff --git a/notmuch-config.c b/notmuch-config.c index aaa0372..fc65d6b 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -132,9 +132,10 @@ get_username_from_passwd_file (void *ctx) return name; } -/* Open the named notmuch configuration file. A filename of NULL will - * be interpreted as the default configuration file - * ($HOME/.notmuch-config). +/* Open the named notmuch configuration file. If the filename is NULL, + * the value of the environment variable $NOTMUCH_CONFIG will be used. + * If $NOTMUCH_CONFIG is unset, the default configuration file + * ($HOME/.notmuch-config) will be used. * * If any error occurs, (out of memory, or a permission-denied error, * etc.), this function will print a message to stderr and return @@ -168,6 +169,7 @@ notmuch_config_open (void *ctx, { GError *error = NULL; int is_new = 0; + char *notmuch_config_env = NULL; if (is_new_ret) *is_new_ret = 0; @@ -180,11 +182,15 @@ notmuch_config_open (void *ctx, talloc_set_destructor (config, notmuch_config_destructor); - if (filename) + if (filename) { config->filename = talloc_strdup (config, filename); - else + } else if ((notmuch_config_env = getenv ("NOTMUCH_CONFIG"))) { + config->filename = talloc_strdup (config, notmuch_config_env); + notmuch_config_env = NULL; + } else { config->filename = talloc_asprintf (config, "%s/.notmuch-config", getenv ("HOME")); + } config->key_file = g_key_file_new (); diff --git a/notmuch-setup.c b/notmuch-setup.c index 482efd2..d06fbf8 100644 --- a/notmuch-setup.c +++ b/notmuch-setup.c @@ -76,7 +76,8 @@ welcome_message_post_setup (void) "Notmuch is now configured, and the configuration settings are saved in\n" "a file in your home directory named .notmuch-config . If you'd like to\n" "change the configuration in the future, you can either edit that file\n" -"directly or run \"notmuch setup\".\n\n" +"directly or run \"notmuch setup\". To choose an alternate configuration\n" +"location, set ${NOTMUCH_CONFIG}.\n\n" "The next step is to run \"notmuch new\" which will create a database\n" "that indexes all of your mail. Depending on the amount of mail you have\n" diff --git a/notmuch.1 b/notmuch.1 index 8a3fb40..eeb1a94 100644 --- a/notmuch.1 +++ b/notmuch.1 @@ -53,9 +53,10 @@ Interactively sets up notmuch for first use. The setup command will prompt for your full name, your primary email address, any alternate email addresses you use, and the directory containing your email archives. Your answers will be written to a -configuration file in ${HOME}/.notmuch-config . This configuration -file will be created with descriptive comments, making it easy to edit -by hand later to change the configuration. Or you can run +configuration file in ${NOTMUCH_CONFIG} (if set) or +${HOME}/.notmuch-config . This configuration file will be created with +descriptive comments, making it easy to edit by hand later to change the +configuration. Or you can run .B "notmuch setup" again to change the configuration. diff --git a/notmuch.c b/notmuch.c index 5cc8e4c..d7ea5aa 100644 --- a/notmuch.c +++ b/notmuch.c @@ -98,7 +98,8 @@ command_t commands[] = { "\t\tThe setup command will prompt for your full name, your primary\n" "\t\temail address, any alternate email addresses you use, and the\n" "\t\tdirectory containing your email archives. Your answers will be\n" - "\t\twritten to a configuration file in ${HOME}/.notmuch-config .\n" + "\t\twritten to a configuration file in ${NOTMUCH_CONFIG} (if set)\n" + "\t\tor ${HOME}/.notmuch-config.\n" "\n" "\t\tThis configuration file will be created with descriptive\n" "\t\tcomments, making it easy to edit by hand later to change the\n" -- 1.6.5 From kanru@anar.kanru.info Sat Nov 21 22:55:09 2009 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 4E19B431FBC for ; Sat, 21 Nov 2009 22:55:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 eAu3T5G1+tdN for ; Sat, 21 Nov 2009 22:55:08 -0800 (PST) X-Greylist: delayed 604 seconds by postgrey-1.32 at olra; Sat, 21 Nov 2009 22:55:06 PST Received: from msr18.hinet.net (msr18.hinet.net [168.95.4.118]) by olra.theworths.org (Postfix) with ESMTP id 9574D431FAE for ; Sat, 21 Nov 2009 22:55:06 -0800 (PST) Received: from anar.kanru.info (220-132-104-233.HINET-IP.hinet.net [220.132.104.233]) by msr18.hinet.net (8.9.3/8.9.3) with ESMTP id OAA07511 for ; Sun, 22 Nov 2009 14:44:59 +0800 (CST) Received: from kanru (uid 1000) (envelope-from kanru@anar.kanru.info) id 16b by anar.kanru.info (DragonFly Mail Agent) Sun, 22 Nov 2009 14:41:50 +0800 From: Kan-Ru Chen To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 14:40:59 +0800 Message-Id: <1258872059-7113-1-git-send-email-kanru@kanru.info> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] Fix invalid face reference. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 06:55:09 -0000 To avoid the "Invalid face reference: cons [18 times]" kind of message goes on and on in the *Messages*. Signed-off-by: Kan-Ru Chen --- notmuch.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch.el b/notmuch.el index 0144b61..a547415 100644 --- a/notmuch.el +++ b/notmuch.el @@ -553,7 +553,7 @@ which this thread was originally shown." (let ((beg (point-marker))) (end-of-line) ; Inverse video for subject - (overlay-put (make-overlay beg (point)) 'face '((cons :inverse-video t))) + (overlay-put (make-overlay beg (point)) 'face '(:inverse-video t)) (forward-line 2) (let ((beg-hidden (point-marker))) (re-search-forward notmuch-show-header-end-regexp) -- 1.6.5.3 From jeff@ocjtech.us Sat Nov 21 23:07:51 2009 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 49D3F431FBC for ; Sat, 21 Nov 2009 23:07:51 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 0M6JdTc8pnNk for ; Sat, 21 Nov 2009 23:07:50 -0800 (PST) Received: from mail-gx0-f221.google.com (mail-gx0-f221.google.com [209.85.217.221]) by olra.theworths.org (Postfix) with ESMTP id 2029D431FAE for ; Sat, 21 Nov 2009 23:07:50 -0800 (PST) Received: by gxk21 with SMTP id 21so4000000gxk.10 for ; Sat, 21 Nov 2009 23:07:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.91.164.30 with SMTP id r30mr4955060ago.95.1258873669645; Sat, 21 Nov 2009 23:07:49 -0800 (PST) In-Reply-To: <4b07b3c0.05a4100a.6cfb.111d@mx.google.com> References: <4b07b3c0.05a4100a.6cfb.111d@mx.google.com> Date: Sun, 22 Nov 2009 01:07:49 -0600 Message-ID: <935ead450911212307g5e4ea05dj4aa4f6c5620d1f70@mail.gmail.com> From: Jeffrey Ollie To: Not Much Mail Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [notmuch] [PATCH] Missing final semi-colon in .desktop's Categories. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 07:07:51 -0000 Found the same problem on my own, only to minutes later catch up on the backlog of patches in my email and find this! On Sat, Nov 21, 2009 at 3:13 AM, James Rowe wrote: > "Those keys which have several values should have a semicolon as the trai= ling > character." > =C2=A0-- http://standards.freedesktop.org/desktop-entry-spec/1.0/ar01s03.= html > > Signed-off-by: James Rowe Reviewed-by: Jeffrey C. Ollie > --- > =C2=A0notmuch.desktop | =C2=A0 =C2=A02 +- > =C2=A01 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/notmuch.desktop b/notmuch.desktop > index d29dff6..819cd1e 100644 > --- a/notmuch.desktop > +++ b/notmuch.desktop > @@ -4,4 +4,4 @@ Exec=3Demacs -f notmuch > =C2=A0Icon=3Demblem-mail > =C2=A0Terminal=3Dfalse > =C2=A0Type=3DApplication > -Categories=3DNetwork;Email > +Categories=3DNetwork;Email; > -- > 1.6.4.4 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch > --=20 Jeff Ollie From kanru@anar.kanru.info Sun Nov 22 00:35:19 2009 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 E302D431FBC for ; Sun, 22 Nov 2009 00:35:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 J80-GnrEz40J for ; Sun, 22 Nov 2009 00:35:19 -0800 (PST) Received: from msr12.hinet.net (msr12.hinet.net [168.95.4.112]) by olra.theworths.org (Postfix) with ESMTP id 3CAEF431FAE for ; Sun, 22 Nov 2009 00:35:18 -0800 (PST) Received: from anar.kanru.info (220-132-104-233.HINET-IP.hinet.net [220.132.104.233]) by msr12.hinet.net (8.9.3/8.9.3) with ESMTP id QAA17685 for ; Sun, 22 Nov 2009 16:34:59 +0800 (CST) Received: from kanru (uid 1000) (envelope-from kanru@anar.kanru.info) id 5e3 by anar.kanru.info (DragonFly Mail Agent) Sun, 22 Nov 2009 16:31:21 +0800 From: Kan-Ru Chen To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 16:30:47 +0800 Message-Id: <1258878647-16192-1-git-send-email-kanru@kanru.info> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] notmuch-show: Show message part using UTF-8. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 08:35:20 -0000 Pass the message through the charset filter so that we can view messages wrote in different charset encoding. Signed-off-by: Kan-Ru Chen --- notmuch-show.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index d727f30..c7f1320 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -72,12 +72,19 @@ show_part_content (GMimeObject *part) GMimeStream *stream_stdout = g_mime_stream_file_new (stdout); GMimeStream *stream_filter = NULL; GMimeDataWrapper *wrapper; + const char *charset; + + charset = g_mime_object_get_content_type_parameter (part, "charset"); if (stream_stdout) { g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE); stream_filter = g_mime_stream_filter_new(stream_stdout); g_mime_stream_filter_add(GMIME_STREAM_FILTER(stream_filter), g_mime_filter_crlf_new(FALSE, FALSE)); + if (charset) { + g_mime_stream_filter_add(GMIME_STREAM_FILTER(stream_filter), + g_mime_filter_charset_new(charset, "UTF-8")); + } } wrapper = g_mime_part_get_content_object (GMIME_PART (part)); -- 1.6.5.3 From mh@glandium.org Sun Nov 22 00:37:31 2009 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 48066431FBC for ; Sun, 22 Nov 2009 00:37:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 07CYxhR9p5Wi for ; Sun, 22 Nov 2009 00:37:30 -0800 (PST) Received: from vuizook.err.no (vuizook.err.no [85.19.221.46]) by olra.theworths.org (Postfix) with ESMTP id 51C1C431FAE for ; Sun, 22 Nov 2009 00:37:30 -0800 (PST) Received: from cha92-13-88-165-248-19.fbx.proxad.net ([88.165.248.19] helo=jigen) by vuizook.err.no with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NC7wk-0006Ts-2P; Sun, 22 Nov 2009 09:37:28 +0100 Received: from mh by jigen with local (Exim 4.69) (envelope-from ) id 1NC7w6-0002OZ-93; Sun, 22 Nov 2009 09:36:46 +0100 Date: Sun, 22 Nov 2009 09:36:46 +0100 From: Mike Hommey To: Brett Viren Message-ID: <20091122083646.GA8420@glandium.org> References: <20091121145111.GB19397@excalibur.local> <87fx874xj5.fsf@yoom.home.cworth.org> <46263c600911211436s5826015eqc5fc18a4164245cb@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46263c600911211436s5826015eqc5fc18a4164245cb@mail.gmail.com> X-GPG-Fingerprint: A479 A824 265C B2A5 FC54 8D1E DE4B DA2C 54FD 2A58 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 08:37:31 -0000 On Sat, Nov 21, 2009 at 05:36:18PM -0500, Brett Viren wrote: > On Sat, Nov 21, 2009 at 12:07 PM, Carl Worth wrote: > > > Though, frankly, I think we need to fix "notmuch new" to do much better > > than 40 files/sec. > > Just a "me too". > > Processed 130871 total files in 38m 7s (57 files/sec.). > Added 102723 new messages to the database (not much, really). > > This was ~2GB of mail on a 2.5GHz CPU. That seems pretty reasonable > to me but I'd like to rerun the "notmuch new" under google perftools > to see if there are any obvious bottlenecks that might be cleaned up. FWIW, my 90k+ messages mailbox was imported at a pace of 130 files/sec, and my CPU is "only" 2.2GHz, but I have a SSD. A good share of the bottlenecks is "simply" I/O. Don't forget having a lot of small files sucks I/O wise, as files are most likely spread all over the disk. A good test, if you have enough memory, would be to put your mailbox in a tmpfs, and see how fast that imports. Mike From aneesh.kumar@linux.vnet.ibm.com Sun Nov 22 00:38:07 2009 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 B5A8E431FBC for ; Sun, 22 Nov 2009 00:38:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 aqAiNv-xzSfP for ; Sun, 22 Nov 2009 00:38:06 -0800 (PST) Received: from e23smtp01.au.ibm.com (e23smtp01.au.ibm.com [202.81.31.143]) by olra.theworths.org (Postfix) with ESMTP id 87081431FAE for ; Sun, 22 Nov 2009 00:38:05 -0800 (PST) Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp01.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAM8aRqo020784 for ; Sun, 22 Nov 2009 19:36:27 +1100 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAM8c3x91016030 for ; Sun, 22 Nov 2009 19:38:03 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAM8c2Un029968 for ; Sun, 22 Nov 2009 19:38:03 +1100 Received: from localhost.localdomain ([9.77.209.175]) by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAM8c1qb029958; Sun, 22 Nov 2009 19:38:01 +1100 From: "Aneesh Kumar K.V" To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 14:07:56 +0530 Message-Id: <1258879076-31883-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.6.5.2.74.g610f9 Subject: [notmuch] [PATCH -v2] notmuch.el: Add face support to search and show mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 08:38:07 -0000 This add two faces, notmuch-show-subject-face and notmuch-tag-unread-face. The first face is used to show the subject line in the notmuch-show-mode and the second one to show the unread tag in the notmuch-search-mode. We can set additional tags by setting notmuch-tag-face-alist as below (defface notmuch-tag-unread-face '((((class color) (background light)) (:foreground "goldenrod" :bold t)) (((class color) (background dark)) (:foreground "goldenrod" :bold t))) "Notmuch search mode face used to highligh tags.") (defface notmuch-tag-inbox-face '((((class color) (background light)) (:foreground "red" :bold t)) (((class color) (background dark)) (:foreground "red" :bold t))) "Notmuch search mode face used to highligh tags.") (setq notmuch-tag-face-alist '(("unread" . 'notmuch-tag-unread-face) ("inbox" . 'notmuch-tag-inbox-face))) (require 'notmuch) Signed-off-by: Aneesh Kumar K.V --- notmuch.el | 36 ++++++++++++++++++++++++++++++++++-- 1 files changed, 34 insertions(+), 2 deletions(-) diff --git a/notmuch.el b/notmuch.el index 0144b61..a0f5aaa 100644 --- a/notmuch.el +++ b/notmuch.el @@ -637,6 +637,18 @@ which this thread was originally shown." (force-window-update) (redisplay t)) +(defface notmuch-show-subject-face + '((((class color) (background light)) (:foreground "yellow" :bold t)) + (((class color) (background dark)) (:foreground "yellow" :bold t))) + "Notmuch show mode face used to highligh subject line." + :group 'notmuch) + +(defvar notmuch-show-font-lock-keywords + (list ;; header in font-lock-type-face + (list "\\(Subject:.*$\\)" + '(1 'notmuch-show-subject-face))) + "Additonal expression to hightlight in notmuch-show-mode") + ;;;###autoload (defun notmuch-show-mode () "Major mode for viewing a thread with notmuch. @@ -677,7 +689,9 @@ view, (remove the \"inbox\" tag from each), with (use-local-map notmuch-show-mode-map) (setq major-mode 'notmuch-show-mode mode-name "notmuch-show") - (setq buffer-read-only t)) + (setq buffer-read-only t) + (set (make-local-variable 'font-lock-defaults) + '(notmuch-show-font-lock-keywords t))) ;;;###autoload @@ -806,6 +820,17 @@ thread from that buffer can be show when done with this one)." (goto-char (point-max)) (forward-line -1)) +(defface notmuch-tag-unread-face + '((((class color) (background light)) (:foreground "goldenrod" :bold t)) + (((class color) (background dark)) (:foreground "goldenrod" :bold t))) + "Notmuch search mode face used to highligh tags." + :group 'notmuch) + +(defvar notmuch-tag-face-alist `(("unread" . 'notmuch-tag-unread-face)) + "List containing the tag list that need to be highlighed") + +(defvar notmuch-search-font-lock-keywords nil) + ;;;###autoload (defun notmuch-search-mode () "Major mode for searching mail with notmuch. @@ -836,7 +861,14 @@ global search. (setq truncate-lines t) (setq major-mode 'notmuch-search-mode mode-name "notmuch-search") - (setq buffer-read-only t)) + (setq buffer-read-only t) + (setq notmuch-search-tags (mapcar 'car notmuch-tag-face-alist)) + (loop for notmuch-search-tag in notmuch-search-tags + do (add-to-list 'notmuch-search-font-lock-keywords (list + (concat "\\(" notmuch-search-tag "\\)") + `(1 ,(cdr (assoc notmuch-search-tag notmuch-tag-face-alist)))))) + (set (make-local-variable 'font-lock-defaults) + '(notmuch-search-font-lock-keywords t))) (defun notmuch-search-find-thread-id () (save-excursion -- 1.6.5.2.74.g610f9 From michiel@michielbuddingh.net Sun Nov 22 01:33:56 2009 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 80165431FBC for ; Sun, 22 Nov 2009 01:33:56 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 h+nbv20yqM7Y for ; Sun, 22 Nov 2009 01:33:55 -0800 (PST) Received: from aegir.org.uk (aegir.org.uk [87.238.170.13]) by olra.theworths.org (Postfix) with ESMTP id A34BB431FAE for ; Sun, 22 Nov 2009 01:33:54 -0800 (PST) Received: by aegir.org.uk (Postfix, from userid 80) id B57832E033; Sun, 22 Nov 2009 10:33:53 +0100 (CET) To: MIME-Version: 1.0 Date: Sun, 22 Nov 2009 10:33:53 +0100 From: Michiel Buddingh' In-Reply-To: <87d43b2oif.fsf@yoom.home.cworth.org> References: <87fx8bygi7.fsf@linux.vnet.ibm.com> <87bpiv4t9h.fsf@yoom.home.cworth.org> <87y6lz39nd.fsf@yoom.home.cworth.org> <20091121221207.GB17268@jukie.net> <9cce5525b093b87fe74d427954ffad89@localhost> <87d43b2oif.fsf@yoom.home.cworth.org> Message-ID: <9bfdedddeab9c58cd45d8d448323d0fc@localhost> X-Sender: michiel@michielbuddingh.net User-Agent: RoundCube Webmail/0.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [notmuch] [PATCH] notmuch: Add Maildir directory name as tag name for messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 09:33:56 -0000 On Sun, 22 Nov 2009 05:04:56 +0100, Carl Worth wrote: > Hi Michel, welcome to Notmuch! Thanks, and apologies for the accidental base64 encoding. First things first: >> In the mean time, I've made a smaller, hopefully more harmless >> patch to let 'notmuch new' mark messages stored in a Maildir 'cur' >> folder as 'read' rather than 'unread'. > > Can others who have more experience weigh in here? Will this do the > right thing for you? Do mail clients wait to move things into "cur" > after the user has actually read them, or is that just a place where > they are moved when the MUA _receives_ them? You're absolutely right, and I'm a fool (because I _knew_ this, but forgot). Maildir stores flags (seen, replied, flagged, trashed, passed) in file names. On the positive side, this allows us to map these flags onto tags, at least for indexing (the patch at the bottom implements this), and, if I can pry you away from your principles, later for modification as well. >> Any attempt to match tags up to directories will eventually have >> to deal with with the fact that tags can't be neatly mapped onto >> them. If I remove a directory-tag from a message, does this >> mean the message is removed from that directory? What if a >> message has two directory-tags, does it mean it's present in both >> directories? > > Right. We definitely don't want a strong mapping here. I propose that the maildir 'storage_type' could make an exception for standard Maildir flags. It'll take relatively little effort to special-case the abovementioned flags, and it'd be a huge boon to interoperability. >> At the same time, this kind of interoperability would be highly >> desirable to those of us who access their mail using other >> clients (webmail, mobile phones, etc.) that expect hierarchical >> ordering. > > That kind of thing is going to be "harder". > > So far we're trying to stick with the principle that notmuch itself > doesn't mess with the data store. I respect your desire to stick to that principle. But I also know that purity and simplicity, generally speaking, are unattainable luxuries for most applications that handle mail. > But then, we also want notmuch to be > very scriptable, so someone might write a tool that uses notmuch search > to export a set of hierarchical maildirs based on the tag names. (These > could even just be populated with symlinks like mairix does.) So > something like that could be really useful for integrating. That is a very interesting idea. On the other hand, interoperability with Maildir mail stores is unlikely to be a corner case. The MTA is probably going to deliver new mail to a Maildir, procmail understands it, etc. I'd feel more comfortable relegating this integration to a scripted glue layer if I knew for certain such a glue layer would be up to the task. > I'm very much of the opinion that the user shouldn't care at all about > the storage of the actual mail files that notmuch indexes. The user certainly shouldn't, but I'm not sure that notmuch can remain as agnostic about the actual storage of messages as planned. Another thing; notmuch currently indexes by message-id (or SHA-1 hash if that is not present). Maildir, on the other hand, uses file names as stable (when stripped of the parts trailing the colon) unique (knock on wood) identifiers. A Maildir-aware notmuch could incorporate this to be far more resistant to bulk mail moves done by other clients, by using filename lookups to avoid accessing and parsing the mail files themselves. I should re-iterate that I'm new to notmuch, and it's obvious that I'm trying to beat it into becoming something it was never intended to be; on the other hand, I'd like people to chime in on this. again via webmail, Michiel Buddingh' --- notmuch-client.h | 10 ++++++ notmuch-config.c | 33 +++++++++++++++++-- notmuch-new.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 124 insertions(+), 14 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index ea77686..c39be06 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -69,12 +69,16 @@ #define STRNCMP_LITERAL(var, literal) \ strncmp ((var), (literal), sizeof (literal) - 1) +enum storage_type { UNSET, NONE, MAILDIR }; + typedef void (*add_files_callback_t) (notmuch_message_t *message); typedef struct { int ignore_read_only_directories; int saw_read_only_directory; + enum storage_type storage_type; + int total_files; int processed_files; int added_messages; @@ -179,7 +183,13 @@ notmuch_config_set_user_other_email (notmuch_config_t *config, const char *other_email[], size_t length); +enum storage_type +notmuch_config_get_storage_type (notmuch_config_t *config); + notmuch_bool_t debugger_is_active (void); + + + #endif diff --git a/notmuch-config.c b/notmuch-config.c index aaa0372..13bd341 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -31,11 +31,13 @@ static const char toplevel_config_comment[] = static const char database_config_comment[] = " Database configuration\n" "\n" - " The only value supported here is 'path' which should be the top-level\n" + " The most important value here is 'path' which should be the top-level\n" " directory where your mail currently exists and to where mail will be\n" " delivered in the future. Files should be individual email messages.\n" " Notmuch will store its database within a sub-directory of the path\n" - " configured here named \".notmuch\".\n"; + " configured here named \".notmuch\".\n" + " The other value is 'storage_type', which can currently be set to\n" + " 'maildir' or 'none'.\n"; static const char user_config_comment[] = " User configuration\n" @@ -62,6 +64,8 @@ struct _notmuch_config { char *user_primary_email; char **user_other_email; size_t user_other_email_length; + + enum storage_type storage_type; }; static int @@ -193,6 +197,7 @@ notmuch_config_open (void *ctx, config->user_primary_email = NULL; config->user_other_email = NULL; config->user_other_email_length = 0; + config->storage_type = UNSET; if (! g_key_file_load_from_file (config->key_file, config->filename, @@ -257,7 +262,7 @@ notmuch_config_open (void *ctx, talloc_free (email); } } - + /* When we create a new configuration file here, we add some * comments to help the user understand what can be done. */ if (is_new) { @@ -334,6 +339,28 @@ notmuch_config_get_database_path (notmuch_config_t *config) return config->database_path; } +enum storage_type +notmuch_config_get_storage_type (notmuch_config_t * config) +{ + char * type; + + if (config->storage_type == UNSET) { + type = g_key_file_get_string (config->key_file, + "database", "storage_type", NULL); + if (type) { + if (strcasecmp(type, "maildir") == 0) { + config->storage_type = MAILDIR; + } else if (strcasecmp(type, "none") == 0) { + config->storage_type = NONE; + } + } + } + + return config->storage_type; +} + + + void notmuch_config_set_database_path (notmuch_config_t *config, const char *database_path) diff --git a/notmuch-new.c b/notmuch-new.c index 0dd2784..0918774 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -41,12 +41,65 @@ handle_sigint (unused (int sig)) } static void -tag_inbox_and_unread (notmuch_message_t *message) +tag_as_inbox (notmuch_message_t *message) { notmuch_message_add_tag (message, "inbox"); +} + +static void +tag_as_unread (notmuch_message_t *message) +{ notmuch_message_add_tag (message, "unread"); } + +static void +derive_tags_from_maildir_flags (notmuch_message_t *message, const char * path) +{ + int seen = FALSE; + int end_of_flags = FALSE; + size_t l = strlen(path); + + /* Non-experimental message flags start with this */ + char * i = strstr(path, ":2,"); + if (i != NULL) { + + i += 3; + for (; i < (path + l) && !end_of_flags; i++) { + switch (*i) { + case 'F': /* flagged */ + notmuch_message_add_tag (message, "flagged"); + break; + case 'R': /* the message has been replied to */ + notmuch_message_add_tag (message, "replied"); + break; + case 'D': + notmuch_message_add_tag (message, "draft"); + break; + case 'S': /* Indicate a message has been read */ + notmuch_message_add_tag (message, "seen"); + seen = TRUE; + break; + case 'T': /* Indicates a message has been marked as trash */ + notmuch_message_add_tag (message, "trashed"); + break; + case 'P': /* indicates a message has been forwarded */ + notmuch_message_add_tag (message, "passed"); + break; + default: + end_of_flags = TRUE; + break; + } + } + } + + if (i == NULL || !seen) { + /* mark messages without any flags, or the seen flag as 'unseen' */ + notmuch_message_add_tag (message, "unseen"); + } +} + + static void add_files_print_progress (add_files_state_t *state) { @@ -104,6 +157,7 @@ static notmuch_status_t add_files_recursive (notmuch_database_t *notmuch, const char *path, struct stat *st, + int scan_files, add_files_state_t *state) { DIR *dir = NULL; @@ -119,11 +173,9 @@ add_files_recursive (notmuch_database_t *notmuch, * directory, (with this being a clear clue from the user to * Notmuch that new mail won't be arriving there and we need not * look. */ - if (state->ignore_read_only_directories && - (st->st_mode & S_IWUSR) == 0) - { + if (((st->st_mode & S_IWUSR) == 0) && (state->ignore_read_only_directories)) { state->saw_read_only_directory = TRUE; - goto DONE; + goto DONE; } path_mtime = st->st_mtime; @@ -173,7 +225,7 @@ add_files_recursive (notmuch_database_t *notmuch, continue; } - if (S_ISREG (st->st_mode)) { + if (S_ISREG (st->st_mode) && scan_files) { /* If the file hasn't been modified since the last * add_files, then we need not look at it. */ if (path_dbtime == 0 || st->st_mtime > path_dbtime) { @@ -184,7 +236,11 @@ add_files_recursive (notmuch_database_t *notmuch, /* success */ case NOTMUCH_STATUS_SUCCESS: state->added_messages++; - tag_inbox_and_unread (message); + tag_as_inbox (message); + if (state->storage_type == MAILDIR) + derive_tags_from_maildir_flags (message, next); + else + tag_as_unread (message); break; /* Non-fatal issues (go on to next file) */ case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: @@ -223,9 +279,25 @@ add_files_recursive (notmuch_database_t *notmuch, } } } else if (S_ISDIR (st->st_mode)) { - status = add_files_recursive (notmuch, next, st, state); - if (status && ret == NOTMUCH_STATUS_SUCCESS) - ret = status; + if (state->storage_type == MAILDIR) { + char * leaf = basename(next); + + if (strcmp(leaf, "cur") == 0) { + status = add_files_recursive (notmuch, next, st, TRUE, state); + } else if (strcmp(leaf, "tmp") == 0) { + /* respect Maildir specification and don't touch files in tmp */ + continue; + } else if (strcmp(leaf, "new") == 0) { + status = add_files_recursive (notmuch, next, st, TRUE, state); + } else { + /* Perhaps add in tags? */ + status = add_files_recursive (notmuch, next, st, FALSE, state); + } + } else { + status = add_files_recursive (notmuch, next, st, TRUE, state); + if (status && ret == NOTMUCH_STATUS_SUCCESS) + ret = status; + } } talloc_free (next); @@ -292,7 +364,7 @@ add_files (notmuch_database_t *notmuch, timer_is_active = TRUE; } - status = add_files_recursive (notmuch, path, &st, state); + status = add_files_recursive (notmuch, path, &st, TRUE, state); /* Now stop the timer. */ if (timer_is_active) { @@ -437,6 +509,7 @@ notmuch_new_command (void *ctx, add_files_state.saw_read_only_directory = FALSE; add_files_state.processed_files = 0; add_files_state.added_messages = 0; + add_files_state.storage_type = notmuch_config_get_storage_type (config); gettimeofday (&add_files_state.tv_start, NULL); ret = add_files (notmuch, db_path, &add_files_state); -- 1.6.5.3 From cworth@cworth.org Sun Nov 22 04:02:37 2009 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 00BB5431FBF; Sun, 22 Nov 2009 04:02:37 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 yR0JaVgeA9zK; Sun, 22 Nov 2009 04:02:36 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 87B32431FAE; Sun, 22 Nov 2009 04:02:35 -0800 (PST) From: Carl Worth To: "Aneesh Kumar K.V" , notmuch@notmuchmail.org In-Reply-To: <1258879076-31883-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1258879076-31883-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Date: Sun, 22 Nov 2009 13:02:21 +0100 Message-ID: <87hbsmg436.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH -v2] notmuch.el: Add face support to search and show mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 12:02:37 -0000 On Sun, 22 Nov 2009 14:07:56 +0530, "Aneesh Kumar K.V" wrote: > This add two faces, notmuch-show-subject-face and > notmuch-tag-unread-face. The first face is used to show the subject > line in the notmuch-show-mode and the second one to show the unread > tag in the notmuch-search-mode. We can set additional tags by setting > notmuch-tag-face-alist as below Hi Aneesh, I've been meaning to follow-up with you on this since I did get it working. > (setq notmuch-tag-face-alist '(("unread" . 'notmuch-tag-unread-face) > ("inbox" . 'notmuch-tag-inbox-face))) It's interesting to be able to highlight specific tags like this. But I think that first I'd like to have a single 'notmuch-tag face to make it easier to see all the tag names, since they're hard to see among the subject. And then maybe after that have s 'notmuch-tag-important-face or something. I'm guessing that just that much would cover most people's needs, before needing to choose custom colors for each tag name. > +(defface notmuch-show-subject-face > + '((((class color) (background light)) (:foreground "yellow" :bold t)) > + (((class color) (background dark)) (:foreground "yellow" :bold t))) > + "Notmuch show mode face used to highligh subject line." > + :group 'notmuch) Color selection can be pretty difficult, and I don't think we're ever all going to agree on things. But I can at least say that I can't read yellow on white at all, (maybe yellow on black works out a bit better, I don't know). So I'd definitely like to hear people's ideas on what the presentation should look like here. First, the current reverse-video is definitely not something I really like. That was just a placeholder since I didn't know how to configure other faces, (and I needed _something_ to distinguish one message from another). Second, from the time I spent with sup, I found that it was hard for me to read entire lines of bold text. So I think I'd rather just have the header name ("Subject:", for example) in bold and the rest of the subject not bold. Hmm... maybe we could use a "From:" at the beginning of the one line summary. Finally, for separating one message from the other, I think I'd really just like a one-pixel line drawn between the last line of text of one message and the first line of text of the next message. Does anybody know how to achieve that? Back to the patch, I think I'll be able to push it as soon as I can apply it and still _see_ the subject lines. ;-) -Carl From cworth@cworth.org Sun Nov 22 04:20:13 2009 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 7E396431FBF; Sun, 22 Nov 2009 04:20:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 3TIP26sjEBPe; Sun, 22 Nov 2009 04:20:12 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D4646431FAE; Sun, 22 Nov 2009 04:20:11 -0800 (PST) From: Carl Worth To: Michiel Buddingh' , notmuch@notmuchmail.org In-Reply-To: <9bfdedddeab9c58cd45d8d448323d0fc@localhost> References: <87fx8bygi7.fsf@linux.vnet.ibm.com> <87bpiv4t9h.fsf@yoom.home.cworth.org> <87y6lz39nd.fsf@yoom.home.cworth.org> <20091121221207.GB17268@jukie.net> <9cce5525b093b87fe74d427954ffad89@localhost> <87d43b2oif.fsf@yoom.home.cworth.org> <9bfdedddeab9c58cd45d8d448323d0fc@localhost> Date: Sun, 22 Nov 2009 13:19:57 +0100 Message-ID: <87fx86g39u.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] notmuch: Add Maildir directory name as tag name for messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 12:20:13 -0000 [quick reply to the text without looking at the patch yet] On Sun, 22 Nov 2009 10:33:53 +0100, Michiel Buddingh' wrote: > Thanks, and apologies for the accidental base64 encoding. Thanks for noticing. That would have been a tricky patch to reply to to comment on. > On the positive side, this allows us to map these flags onto tags, > at least for indexing (the patch at the bottom implements this), and, > if I can pry you away from your principles, later for modification > as well. Yes, we might end up doing this. We'll see. > I respect your desire to stick to that principle. But I also know > that purity and simplicity, generally speaking, are unattainable > luxuries for most applications that handle mail. Hehe. Thanks for the entertainment. You sound like someone who's already got some of the battle scars from trying to write mail-handling software. One is certainly forced to see an awful lot of awfully strange things. > Another thing; notmuch currently indexes by message-id (or SHA-1 hash > if that is not present). Maildir, on the other hand, uses file names > as stable (when stripped of the parts trailing the colon) unique > (knock on wood) identifiers. A Maildir-aware notmuch could incorporate > this to be far more resistant to bulk mail moves done by other clients, > by using filename lookups to avoid accessing and parsing the mail > files themselves. I don't think opening a file to read out a message ID will ever be a bottleneck. But yes, we could take advantage of the unique name if we insisted that the storage have it. Personally, I still regularly end up indexing stuff that's not in proper maildir format, (like just manually copying a mail file "foo" down into a directory that I know isn't being delivered to by any MDA but that I want notmuch to index.) Maybe that's just me, because I'm always bringing up little things for debugging, etc. But it is convenient at least. So I think I'd like to be careful to avoid notmuch ever *requiring* maildir storage. (But yes, it should obviously support maildir well since it's so common.) > I should re-iterate that I'm new to notmuch, and it's obvious that I'm > trying to beat it into becoming something it was never intended to be; Actually, I don't think that's true at all. Notmuch is definitely intended to become a lot more than it is right now. And if it's not making it easy for you to deal with mail the way you'd like to, then we definitely do want to look into expanding notmuch to be able to address that. > on the other hand, I'd like people to chime in on this. I've got the patch tagged to give a closer look at it later. Thanks again, -Carl From aneesh.kumar@linux.vnet.ibm.com Sun Nov 22 04:21:16 2009 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 8B17B431FC0 for ; Sun, 22 Nov 2009 04:21:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 rD+lHEKs8Mk3 for ; Sun, 22 Nov 2009 04:21:15 -0800 (PST) Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141]) by olra.theworths.org (Postfix) with ESMTP id 519EE431FAE for ; Sun, 22 Nov 2009 04:21:15 -0800 (PST) Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246]) by e23smtp08.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAMNLDJV004560 for ; Mon, 23 Nov 2009 10:21:13 +1100 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAMCHnLl1577004 for ; Sun, 22 Nov 2009 23:17:49 +1100 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAMCLCGj009758 for ; Sun, 22 Nov 2009 23:21:12 +1100 Received: from skywalker.linux.vnet.ibm.com ([9.77.209.175]) by d23av02.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAMCL7o0009705 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 22 Nov 2009 23:21:10 +1100 Date: Sun, 22 Nov 2009 17:51:06 +0530 From: "Aneesh Kumar K.V" To: Carl Worth Message-ID: <20091122122106.GA3531@skywalker.linux.vnet.ibm.com> References: <1258879076-31883-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <87hbsmg436.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87hbsmg436.fsf@yoom.home.cworth.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH -v2] notmuch.el: Add face support to search and show mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 12:21:16 -0000 On Sun, Nov 22, 2009 at 01:02:21PM +0100, Carl Worth wrote: > On Sun, 22 Nov 2009 14:07:56 +0530, "Aneesh Kumar K.V" wrote: > > This add two faces, notmuch-show-subject-face and > > notmuch-tag-unread-face. The first face is used to show the subject > > line in the notmuch-show-mode and the second one to show the unread > > tag in the notmuch-search-mode. We can set additional tags by setting > > notmuch-tag-face-alist as below > > Hi Aneesh, > > I've been meaning to follow-up with you on this since I did get it > working. > > > (setq notmuch-tag-face-alist '(("unread" . 'notmuch-tag-unread-face) > > ("inbox" . 'notmuch-tag-inbox-face))) > > It's interesting to be able to highlight specific tags like this. But I > think that first I'd like to have a single 'notmuch-tag face to make it > easier to see all the tag names, since they're hard to see among the > subject. And then maybe after that have s 'notmuch-tag-important-face or > something. I'm guessing that just that much would cover most people's > needs, before needing to choose custom colors for each tag name. The default search pattern for notmuch is inbox and unread right. So adding both of them to the notmuch-tag-face-alist should color the tags properly. > > > +(defface notmuch-show-subject-face > > + '((((class color) (background light)) (:foreground "yellow" :bold t)) > > + (((class color) (background dark)) (:foreground "yellow" :bold t))) > > + "Notmuch show mode face used to highligh subject line." > > + :group 'notmuch) > > Color selection can be pretty difficult, and I don't think we're ever > all going to agree on things. But I can at least say that I can't read > yellow on white at all, (maybe yellow on black works out a bit better, I > don't know). > > So I'd definitely like to hear people's ideas on what the presentation > should look like here. > > First, the current reverse-video is definitely not something I really > like. That was just a placeholder since I didn't know how to configure > other faces, (and I needed _something_ to distinguish one message from > another). > > Second, from the time I spent with sup, I found that it was hard for me > to read entire lines of bold text. So I think I'd rather just have the > header name ("Subject:", for example) in bold and the rest of the > subject not bold. Hmm... maybe we could use a "From:" at the beginning > of the one line summary. > > Finally, for separating one message from the other, I think I'd really > just like a one-pixel line drawn between the last line of text of one > message and the first line of text of the next message. Does anybody > know how to achieve that? > > Back to the patch, I think I'll be able to push it as soon as I can > apply it and still _see_ the subject lines. ;-) One of the easy part with emacs is we can use customize-face and select notmuch-show-subject-face to select what ever suites your configuration. For me with black background i found yellow with bold to be nice. -aneesh From djcb@djcbsoftware.nl Sun Nov 22 04:23:46 2009 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 C9E69431FC0 for ; Sun, 22 Nov 2009 04:23:46 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 qrXobvnoQMLF for ; Sun, 22 Nov 2009 04:23:45 -0800 (PST) Received: from gw01.mail.saunalahti.fi (gw01.mail.saunalahti.fi [195.197.172.115]) by olra.theworths.org (Postfix) with ESMTP id 48B0D431FAE for ; Sun, 22 Nov 2009 04:23:45 -0800 (PST) Received: from djcbsoftware.nl (a88-112-254-208.elisa-laajakaista.fi [88.112.254.208]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by gw01.mail.saunalahti.fi (Postfix) with ESMTP id B33A315133D; Sun, 22 Nov 2009 14:23:40 +0200 (EET) Received: from cthulhu.mindcrime.djcbsoftware.nl (localhost [127.0.0.1]) by djcbsoftware.nl (Postfix) with ESMTP id 4BC2D456004; Sun, 22 Nov 2009 14:23:10 +0200 (EET) Date: Sun, 22 Nov 2009 14:23:10 +0200 Message-ID: <87skc6n3yp.wl%djcb@djcbsoftware.nl> From: Dirk-Jan C. Binnema To: Carl Worth In-Reply-To: <87iqd43wot.fsf@yoom.home.cworth.org> References: <87aayggsjp.wl%djcb@djcbsoftware.nl> <87iqd43wot.fsf@yoom.home.cworth.org> Mail-Reply-To: djcb@djcbsoftware.nl User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.1 Mule/6.0 (HANACHIRUSATO) Organization: DJCBSoftware MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: "notmuch@notmuchmail.org" Subject: Re: [notmuch] interesting project! X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: djcb@djcbsoftware.nl 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, 22 Nov 2009 12:23:47 -0000 Hi Carl, >>>>> "Carl" == Carl Worth writes: >> Anyhow, I'll study the notmuch code and see if there are some useful >> bits in my code that might make sense there, e.g., various dir scanning >> optimizations, see [2]. Carl> That sounds great. It's also good to have people with experience in Carl> this area join and help out. I'll look forward to any ideas or other Carl> contributions you will have. Thanks for the nice words! A small question: it seems that notmuch is avoiding the use of GLib directly (of course, it depend on it anyway through GMime); is this because of OOM-handling? It'd be nice if GLib could be used, it would make some things quite a bit easier. Best wishes, Dirk. -- Dirk-Jan C. Binnema Helsinki, Finland e:djcb@djcbsoftware.nl w:www.djcbsoftware.nl pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C From djcb@djcbsoftware.nl Sun Nov 22 04:23:47 2009 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 85E53431FAE for ; Sun, 22 Nov 2009 04:23:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 K3LWipwvycyc for ; Sun, 22 Nov 2009 04:23:46 -0800 (PST) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by olra.theworths.org (Postfix) with ESMTP id 790B4431FBF for ; Sun, 22 Nov 2009 04:23:46 -0800 (PST) Received: from djcbsoftware.nl (a88-112-254-208.elisa-laajakaista.fi [88.112.254.208]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by gw02.mail.saunalahti.fi (Postfix) with ESMTP id A22E5139522; Sun, 22 Nov 2009 14:23:40 +0200 (EET) Received: from cthulhu.mindcrime.djcbsoftware.nl (localhost [127.0.0.1]) by djcbsoftware.nl (Postfix) with ESMTP id 8698939C0D8; Sun, 22 Nov 2009 12:37:49 +0200 (EET) Date: Sun, 22 Nov 2009 12:37:49 +0200 Message-ID: <87ws1in8ua.wl%djcb@djcbsoftware.nl> From: Dirk-Jan C. Binnema To: Carl Worth In-Reply-To: <87d43b2oif.fsf@yoom.home.cworth.org> References: <87fx8bygi7.fsf@linux.vnet.ibm.com> <87bpiv4t9h.fsf@yoom.home.cworth.org> <87y6lz39nd.fsf@yoom.home.cworth.org> <20091121221207.GB17268@jukie.net> <9cce5525b093b87fe74d427954ffad89@localhost> <87d43b2oif.fsf@yoom.home.cworth.org> Mail-Reply-To: djcb@djcbsoftware.nl User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.1 Mule/6.0 (HANACHIRUSATO) Organization: DJCBSoftware MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: notmuch Subject: Re: [notmuch] [PATCH] notmuch: Add Maildir directory name as tag name for messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: djcb@djcbsoftware.nl 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, 22 Nov 2009 12:23:47 -0000 >>>>> "Carl" == Carl Worth writes: Carl> On Sun, 22 Nov 2009 00:25:43 +0100, Michiel Buddingh' Carl> wrote: Carl> Hi Michel, welcome to Notmuch! >> Any attempt to match tags up to directories will eventually have >> to deal with with the fact that tags can't be neatly mapped onto >> them. If I remove a directory-tag from a message, does this >> mean the message is removed from that directory? What if a >> message has two directory-tags, does it mean it's present in both >> directories? Carl> Right. We definitely don't want a strong mapping here. I think one Carl> answer could be that the initial import is different and can take the Carl> directory names as a "hint" for initializing tag values. After that, Carl> they are just tags in the database and the user can do whatever they Carl> want. In 'mu' I took a slightly different approach, by simply allowing for searches on the path to the message; ie., by adding the path as just another property of the message, just like subject: or from:. Now, the trouble with that the path of a message is not very stable -- people move messages around. In 'mu' this was handled by simply considering the moved message as a new one, and removing message from the database whose paths do not point to message anymore. This makes things quite robust against people moving things around or deleting them. Tags could be connected to the hopefully unique Maildir file name then. Carl> notmuch search tag:foo and not tag:foo-search Carl> notmuch search tag:foo-search and not tag:foo Carl> So even if in the end the user comes up with something that could Carl> replace the original tag, it's probably still beneficial to have it Carl> there when starting out. So, an alternative would be something like: notmuch search path:inbox But this requires notmuch to be able to update things when paths change. Best wishes, Dirk. -- Dirk-Jan C. Binnema Helsinki, Finland e:djcb@djcbsoftware.nl w:www.djcbsoftware.nl pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C From djcb@djcbsoftware.nl Sun Nov 22 04:23:48 2009 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 426CE431FC0 for ; Sun, 22 Nov 2009 04:23:48 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 n1yCqNDfgvBb for ; Sun, 22 Nov 2009 04:23:45 -0800 (PST) X-Greylist: delayed 96968 seconds by postgrey-1.32 at olra; Sun, 22 Nov 2009 04:23:45 PST Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi [195.197.172.111]) by olra.theworths.org (Postfix) with ESMTP id 4AA9E431FBC for ; Sun, 22 Nov 2009 04:23:45 -0800 (PST) Received: from djcbsoftware.nl (a88-112-254-208.elisa-laajakaista.fi [88.112.254.208]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by gw03.mail.saunalahti.fi (Postfix) with ESMTP id 938342165C4; Sun, 22 Nov 2009 14:23:40 +0200 (EET) Received: from cthulhu.mindcrime.djcbsoftware.nl (localhost [127.0.0.1]) by djcbsoftware.nl (Postfix) with ESMTP id B7940456001; Sun, 22 Nov 2009 12:57:09 +0200 (EET) Date: Sun, 22 Nov 2009 12:57:09 +0200 Message-ID: <87vdh2n7y2.wl%djcb@djcbsoftware.nl> From: Dirk-Jan C. Binnema To: Michiel Buddingh' In-Reply-To: <9bfdedddeab9c58cd45d8d448323d0fc@localhost> References: <87fx8bygi7.fsf@linux.vnet.ibm.com> <87bpiv4t9h.fsf@yoom.home.cworth.org> <87y6lz39nd.fsf@yoom.home.cworth.org> <20091121221207.GB17268@jukie.net> <9cce5525b093b87fe74d427954ffad89@localhost> <87d43b2oif.fsf@yoom.home.cworth.org> <9bfdedddeab9c58cd45d8d448323d0fc@localhost> Mail-Reply-To: djcb@djcbsoftware.nl User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.1 Mule/6.0 (HANACHIRUSATO) Organization: DJCBSoftware MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] notmuch: Add Maildir directory name as tag name for messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: djcb@djcbsoftware.nl 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, 22 Nov 2009 12:23:48 -0000 Hi Michiel, >>>>> "Michiel" == Michiel Buddingh' writes: Michiel> Another thing; notmuch currently indexes by message-id (or SHA-1 Michiel> hash if that is not present). Maildir, on the other hand, uses Michiel> file names as stable (when stripped of the parts trailing the Michiel> colon) unique (knock on wood) identifiers. A Maildir-aware Michiel> notmuch could incorporate this to be far more resistant to bulk Michiel> mail moves done by other clients, by using filename lookups to Michiel> avoid accessing and parsing the mail files themselves. I think that is a good idea. Michiel> I should re-iterate that I'm new to notmuch, and it's obvious Michiel> that I'm trying to beat it into becoming something it was never Michiel> intended to be; on the other hand, I'd like people to chime in on Michiel> this. I'm new here too, so please be gentle as I learn how things work.... Michiel> + Michiel> +static void Michiel> +derive_tags_from_maildir_flags (notmuch_message_t *message, const char * Michiel> path) I see you don't handle the "N" -- is that deliberate? Also, a minor addition may to also allow for '!' instead of ':' as a separator, as that's the semi-official way to use Maildirs on (V)FAT filesystems (which don't allow for colons in filenames). Best wishes, Dirk. -- Dirk-Jan C. Binnema Helsinki, Finland e:djcb@djcbsoftware.nl w:www.djcbsoftware.nl pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C From cworth@cworth.org Sun Nov 22 04:25:01 2009 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 E3137431FBF; Sun, 22 Nov 2009 04:25:01 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 mjJqaT5rNkpY; Sun, 22 Nov 2009 04:25:01 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 0A193431FAE; Sun, 22 Nov 2009 04:25:00 -0800 (PST) From: Carl Worth To: Kan-Ru Chen , notmuch@notmuchmail.org In-Reply-To: <1258872059-7113-1-git-send-email-kanru@kanru.info> References: <1258872059-7113-1-git-send-email-kanru@kanru.info> Date: Sun, 22 Nov 2009 13:24:46 +0100 Message-ID: <87einqg31t.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Fix invalid face reference. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 12:25:02 -0000 On Sun, 22 Nov 2009 14:40:59 +0800, Kan-Ru Chen wrote: > To avoid the "Invalid face reference: cons [18 times]" kind of message > goes on and on in the *Messages*. Thanks. This is pushed. And welcome to notmuch, Kan-Ru! I'll look forward to any possible contributions from you in the future. -Carl From cworth@cworth.org Sun Nov 22 04:29:54 2009 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 2BF86431FBF; Sun, 22 Nov 2009 04:29:54 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 XcDrlUnrCFD1; Sun, 22 Nov 2009 04:29:53 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 3963D431FAE; Sun, 22 Nov 2009 04:29:53 -0800 (PST) From: Carl Worth To: Jeffrey Ollie , Not Much Mail In-Reply-To: <935ead450911212307g5e4ea05dj4aa4f6c5620d1f70@mail.gmail.com> References: <4b07b3c0.05a4100a.6cfb.111d@mx.google.com> <935ead450911212307g5e4ea05dj4aa4f6c5620d1f70@mail.gmail.com> Date: Sun, 22 Nov 2009 13:29:39 +0100 Message-ID: <87bpiug2to.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Missing final semi-colon in .desktop's Categories. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 12:29:54 -0000 On Sun, 22 Nov 2009 01:07:49 -0600, Jeffrey Ollie wrote: > Found the same problem on my own, only to minutes later catch up on > the backlog of patches in my email and find this! ... > > Signed-off-by: James Rowe > > Reviewed-by: Jeffrey C. Ollie Much thanks, James and Jeffrey! I always feel *much* more comfortable pushing a patch I haven't tested personally if someone else has reviewed it. -Carl From jan@ryngle.com Sun Nov 22 04:32:50 2009 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 4DAFF431FBC for ; Sun, 22 Nov 2009 04:32:50 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 hr7zC58AVxQJ for ; Sun, 22 Nov 2009 04:32:50 -0800 (PST) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by olra.theworths.org (Postfix) with ESMTP id C3396431FAE for ; Sun, 22 Nov 2009 04:32:49 -0800 (PST) Received: by fg-out-1718.google.com with SMTP id 19so1817087fgg.2 for ; Sun, 22 Nov 2009 04:32:47 -0800 (PST) Received: by 10.102.149.9 with SMTP id w9mr1655750mud.77.1258893167040; Sun, 22 Nov 2009 04:32:47 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id n10sm12765281mue.36.2009.11.22.04.32.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 04:32:46 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id 87E1E440651; Sun, 22 Nov 2009 13:32:36 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 13:32:36 +0100 Message-Id: <1258893156-25849-1-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] notmuch-new: Eliminate gcc warning caused by ino_cmp. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 12:32:50 -0000 The function passed to scandir in the fourth argument takes two const void* arguments. To eliminate the gcc warning about incompatible types, we change ino_cmp to match this and then re-type the parameters in the body of ino_cmp. Signed-off-by: Jan Janak --- notmuch-new.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 0dd2784..6db3d0f 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -75,9 +75,10 @@ add_files_print_progress (add_files_state_t *state) fflush (stdout); } -static int ino_cmp(const struct dirent **a, const struct dirent **b) +static int ino_cmp(const void *a, const void *b) { - return ((*a)->d_ino < (*b)->d_ino) ? -1 : 1; + return ((*(const struct dirent**)a)->d_ino < + (*(const struct dirent**)b)->d_ino) ? -1 : 1; } /* Examine 'path' recursively as follows: -- 1.6.3.3 From cworth@cworth.org Sun Nov 22 04:33:40 2009 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 403B8431FC2; Sun, 22 Nov 2009 04:33:40 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 rI788wQGsFax; Sun, 22 Nov 2009 04:33:39 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id DA2FB431FAE; Sun, 22 Nov 2009 04:33:38 -0800 (PST) From: Carl Worth To: Kan-Ru Chen , notmuch@notmuchmail.org In-Reply-To: <1258878647-16192-1-git-send-email-kanru@kanru.info> References: <1258878647-16192-1-git-send-email-kanru@kanru.info> Date: Sun, 22 Nov 2009 13:33:24 +0100 Message-ID: <87aayeg2nf.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] notmuch-show: Show message part using UTF-8. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 12:33:40 -0000 On Sun, 22 Nov 2009 16:30:47 +0800, Kan-Ru Chen wrote: > Pass the message through the charset filter so that we can view > messages wrote in different charset encoding. Thanks, very much. We definitely want notmuch to be presenting utf-8 only to the user. And I didn't realize I'd missed a part of this. Pushed. -Carl From jan@ryngle.com Sun Nov 22 04:44:49 2009 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 183DB431FBC for ; Sun, 22 Nov 2009 04:44:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 c5uz5hd-Tqr9 for ; Sun, 22 Nov 2009 04:44:48 -0800 (PST) Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com [209.85.220.214]) by olra.theworths.org (Postfix) with ESMTP id 5BECD431FAE for ; Sun, 22 Nov 2009 04:44:48 -0800 (PST) Received: by fxm6 with SMTP id 6so5036814fxm.0 for ; Sun, 22 Nov 2009 04:44:47 -0800 (PST) Received: by 10.103.84.32 with SMTP id m32mr1630932mul.33.1258893887497; Sun, 22 Nov 2009 04:44:47 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id y37sm12690462mug.47.2009.11.22.04.44.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 04:44:46 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id 82A99440651; Sun, 22 Nov 2009 13:44:37 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 13:44:37 +0100 Message-Id: <1258893877-28436-1-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] makefile: Tell echo to interpret escape sequences. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 12:44:49 -0000 The initial message that informs the user about the possibility to use make V=1 contains a \n at the end, but echo wouldn't interpret that properly without the -e command line option. --- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index ae8bff1..3553ff4 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ include Makefile.config # user how to enable verbose compiles. ifeq ($(V),) quiet_DOC := "Use \"$(MAKE) V=1\" to see the verbose compile lines.\n" -quiet = @echo $(quiet_DOC)$(eval quiet_DOC:=)" $1 $@"; $($1) +quiet = @echo -e $(quiet_DOC)$(eval quiet_DOC:=)" $1 $@"; $($1) endif # The user has explicitly enabled quiet compilation. ifeq ($(V),0) -- 1.6.3.3 From jan@ryngle.com Sun Nov 22 04:55:47 2009 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 69BAB431FBC for ; Sun, 22 Nov 2009 04:55:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 2GIqBTDIx+qt for ; Sun, 22 Nov 2009 04:55:46 -0800 (PST) Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com [209.85.220.214]) by olra.theworths.org (Postfix) with ESMTP id A439A431FAE for ; Sun, 22 Nov 2009 04:55:46 -0800 (PST) Received: by fxm6 with SMTP id 6so5040530fxm.0 for ; Sun, 22 Nov 2009 04:55:45 -0800 (PST) Received: by 10.102.245.35 with SMTP id s35mr1633080muh.124.1258894544680; Sun, 22 Nov 2009 04:55:44 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id i7sm12756869mue.46.2009.11.22.04.55.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 04:55:44 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id 1B43E440651; Sun, 22 Nov 2009 13:55:35 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 13:55:35 +0100 Message-Id: <1258894535-30056-1-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] makefile: Declare clean target as phony. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 12:55:47 -0000 This ensures that make clean always proceeds, even if the user accidentally creates a file named 'clean'. Also, it ignores errors in rm and other commands. Signed-off-by: Jan Janak --- Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index 3553ff4..2d19a6e 100644 --- a/Makefile +++ b/Makefile @@ -75,5 +75,6 @@ DEPS := $(SRCS:%.c=.deps/%.d) DEPS := $(DEPS:%.cc=.deps/%.d) -include $(DEPS) +.PHONY : clean clean: rm -f $(CLEAN); rm -rf .deps -- 1.6.3.3 From jeff@ocjtech.us Sun Nov 22 05:47:25 2009 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 28B3E431FBC for ; Sun, 22 Nov 2009 05:47:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 gXAYGLVMsW09 for ; Sun, 22 Nov 2009 05:47:23 -0800 (PST) Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com [209.85.210.204]) by olra.theworths.org (Postfix) with ESMTP id C0824431FAE for ; Sun, 22 Nov 2009 05:47:23 -0800 (PST) Received: by yxe42 with SMTP id 42so4759357yxe.22 for ; Sun, 22 Nov 2009 05:47:23 -0800 (PST) Received: by 10.150.5.35 with SMTP id 35mr6517765ybe.84.1258897643335; Sun, 22 Nov 2009 05:47:23 -0800 (PST) Received: from lt26923.campus.dmacc.edu ([69.57.47.215]) by mx.google.com with ESMTPS id 13sm1625198gxk.1.2009.11.22.05.47.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 05:47:21 -0800 (PST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by lt26923.campus.dmacc.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NCCmc-0005o7-PG; Sun, 22 Nov 2009 07:47:18 -0600 From: "Jeffrey C. Ollie" To: Not Much Mail Date: Sun, 22 Nov 2009 07:47:10 -0600 Message-Id: <1258897630-22282-1-git-send-email-jeff@ocjtech.us> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Add SCons build files. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 13:47:25 -0000 The SCons build files included here *should* do everything that the current Makefiles do, plus a little bit of configuration checking. To build/install: scons all emacs sudo scons install sudo scons install-emacs sudo scons install-desktop Various installation directories can be customized: sudo scons install DESTDIR=/tmp/buildroot prefix=/opt/notmuch See the output of 'scons -h' for a complete list of the variables that can be modified. Signed-off-by: Jeffrey C. Ollie --- .gitignore | 3 + SConstruct | 226 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/SConscript | 19 +++++ 3 files changed, 248 insertions(+), 0 deletions(-) create mode 100644 SConstruct create mode 100644 lib/SConscript diff --git a/.gitignore b/.gitignore index 8794354..6661b3b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ notmuch.1.gz *~ .*.swp *.elc +.sconsign.dblite +.sconf_temp +config.log diff --git a/SConstruct b/SConstruct new file mode 100644 index 0000000..8d6960d --- /dev/null +++ b/SConstruct @@ -0,0 +1,226 @@ +# -*- mode: python; coding: utf-8 -*- + +import os + +variables = Variables('custom.py') + +variables.Add('DESTDIR', + 'Destination directory', + '') + +variables.Add('prefix', + 'Installation prefix', + '/usr/local') + +variables.Add('bindir', + 'Directory that user binaries go into', + '${prefix}/bin') + +variables.Add('datadir', + 'Directory that static data files go into', + '${prefix}/share') + +variables.Add('mandir', + 'Directory that manual pages go into', + '${datadir}/man') + +variables.Add('emacs_lispdir', + 'Directory that Emacs LISP files go into', + '${default_emacs_lispdir}') + +variables.Add('sysconfdir', + 'Directory that system configuration files go into', + '/etc') + +variables.Add('bash_completion_dir', + 'Directory that Bash completion files go into', + '${sysconfdir}/bash_completion.d') + +variables.Add('desktop_dir', + 'Directory that desktop files go into', + '${datadir}/applications') + +variables.Add('gzip', + 'Gzip executable', + 'gzip') + +variables.Add('emacs', + 'Emacs executable', + 'emacs') + +def InstallPerm(env, dest, files, perm): + obj = env.Install(dest, files) + for i in obj: + env.AddPostAction(i, Chmod(str(i), perm)) + return dest + +def InstallAsPerm(env, dest, files, perm): + obj = env.InstallAs(dest, files) + for i in obj: + env.AddPostAction(i, Chmod(str(i), perm)) + return dest + +topenv = Environment(variables = variables, + BUILDERS = {'InstallPerm': InstallPerm, + 'InstallAsPerm': InstallAsPerm}) + +topenv.Append(CPPPATH=['#/lib']) + +cflags = None +if os.environ.has_key('CFLAGS'): + cflags = topenv.ParseFlags(os.environ['CFLAGS']) + topenv.MergeFlags(cflags) + +if os.environ.has_key('CXXFLAGS'): + cxxflags = topenv.ParseFlags(os.environ['CXXFLAGS']) + topenv.MergeFlags(cxxflags) + +if cflags is None or cxxflags is None: + optflags = topenv.ParseFlags('-O2') + topenv.MergeFlags(optflags) + +warnflags = topenv.ParseFlags('-Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum') +topenv.MergeFlags(warnflags) + +def CheckPkgConfig(context, version): + context.Message('Checking for pkg-config... ') + result = context.TryAction('pkg-config --atleast-pkgconfig-version=%s' % version)[0] + context.Result(result) + return result + +def CheckPkg(context, name): + context.Message('Checking for %s... ' % name) + result = context.TryAction('pkg-config --exists \'%s\'' % name)[0] + context.Result(result) + return result + +def CheckXapian(context): + context.Message('Checking for xapian-core... ') + for xapian_config in ['xapian-config-1.1', 'xapian-config']: + result, output = context.TryAction('%s --version > $TARGET' % xapian_config) + if result: + xapian_version = output.strip().split()[-1] + context.env['xapian_config'] = xapian_config + context.env['xapian_version'] = xapian_version + context.Result(xapian_version) + return result + context.Result(False) + return False + +def CheckEmacs(context): + context.Message('Checking for emacs... ') + context.env['default_emacs_lispdir'] = '${prefix}/share/emacs/site-lisp' + result = context.TryAction('pkg-config --exists emacs') + if result: + result, output = context.TryAction('pkg-config emacs --variable sitepkglispdir > $TARGET') + if result: + context.env['default_emacs_lispdir'] = output.strip() + context.Result(True) + return True + context.Result(False) + return False + +def CheckDesktopFileInstall(context): + context.Message('Checking for desktop-file-install... ') + result = context.TryAction('desktop-file-install -h')[0] + context.Result(result) + return result + +conf = Configure(topenv, custom_tests = {'CheckPkgConfig': CheckPkgConfig, + 'CheckPkg': CheckPkg, + 'CheckXapian': CheckXapian, + 'CheckEmacs': CheckEmacs, + 'CheckDesktopFileInstall': CheckDesktopFileInstall}) + +if not conf.CheckPkgConfig('0.23'): + print 'pkg-config >= 0.23 not found.' + Exit(1) + +if not conf.CheckPkg('glib-2.0 >= 2.22'): + print 'glib-2.0 >= 2.22 not found' + Exit(1) + +if not conf.CheckPkg('gmime-2.4 >= 2.4.0'): + print 'gmime-2.4 >= 2.4.0 not found' + Exit(1) + +if not conf.CheckPkg('talloc >= 2.0.0'): + print 'talloc >= 2.0.0 not found' + Exit(1) + +if not conf.CheckXapian(): + print 'xapian not found' + Exit(1) + +emacs = conf.CheckEmacs() + +valgrind = conf.CheckPkg('valgrind >= 3.5.0') + +desktop = conf.CheckDesktopFileInstall() + +if not conf.CheckFunc('strndup'): + conf.env.Append(CPPDEFINES = ['NEED_STRNDUP']) + +if not conf.CheckFunc('getline'): + conf.env.Append(CPPDEFINES = ['NEED_GETLINE']) + +topenv = conf.Finish() + +topenv.ParseConfig('pkg-config glib-2.0 --cflags --libs') +topenv.ParseConfig('pkg-config gmime-2.4 --cflags --libs') +topenv.ParseConfig('pkg-config talloc --cflags --libs') +topenv.ParseConfig('${xapian_config} --cxxflags --libs') +if valgrind: + topenv.ParseConfig('pkg-config valgrind --cflags') + topenv.Append(CPPDEFINES = ['HAVE_VALGRIND']) + +Help(variables.GenerateHelpText(topenv)) + +Export('topenv') + +libnotmuch = SConscript(['lib/SConscript']) + +env = topenv.Clone() + +notmuch = env.Program('notmuch', ['debugger.c', + 'gmime-filter-reply.c', + 'notmuch.c', + 'notmuch-config.c', + 'notmuch-dump.c', + 'notmuch-new.c', + 'notmuch-reply.c', + 'notmuch-restore.c', + 'notmuch-search.c', + 'notmuch-setup.c', + 'notmuch-show.c', + 'notmuch-tag.c', + 'notmuch-time.c', + 'query-string.c', + 'show-message.c', + libnotmuch]) +env.Alias('all', notmuch) + +env.Install('${DESTDIR}${bindir}', notmuch) +env.Alias('install', '${DESTDIR}${bindir}') + +manpage = env.Command('notmuch.1.gz', 'notmuch.1', '${gzip} -9 < $SOURCE > $TARGET') +env.Alias('all', manpage) + +env.InstallPerm('${DESTDIR}${mandir}/man1', manpage, 0644) +env.Alias('install', '${DESTDIR}${mandir}/man1') + +env.InstallAsPerm('${DESTDIR}${bash_completion_dir}/notmuch', 'contrib/notmuch-completion.bash', 0644) +env.Alias('install', '${DESTDIR}${bash_completion_dir}') + +if desktop: + env.Command('${DESTDIR}${desktop_dir}/notmuch.desktop', 'notmuch.desktop', 'desktop-file-install --mode 0644 --dir ${DESTDIR}${desktop_dir} ${SOURCE}') + env.Alias('install-desktop', '${DESTDIR}${desktop_dir}') + +if emacs: + elisp = env.Command('notmuch.elc', 'notmuch.el', '${emacs} --no-window-system --no-site-file --no-init-file --no-splash --batch --funcall batch-byte-compile $SOURCE') + env.Alias('emacs', elisp) + env.InstallPerm('${DESTDIR}${emacs_lispdir}', elisp, 0644) + env.InstallPerm('${DESTDIR}${emacs_lispdir}', 'notmuch.el', 0644) + env.Alias('install-emacs', '${DESTDIR}${emacs_lispdir}') + +Default('all') diff --git a/lib/SConscript b/lib/SConscript new file mode 100644 index 0000000..eb38516 --- /dev/null +++ b/lib/SConscript @@ -0,0 +1,19 @@ +# -*- mode: python; coding: utf-8 -*- + +Import('topenv') + +env = topenv.Clone() + +libnotmuch = env.Library('notmuch', ['libsha1.c', + 'message-file.c', + 'messages.c', + 'sha1.c', + 'tags.c', + 'xutil.c', + 'database.cc', + 'index.cc', + 'message.cc', + 'query.cc', + 'thread.cc']) + +Return('libnotmuch') -- 1.6.5.2 From bart@jukie.net Sun Nov 22 06:15:04 2009 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 59BE1431FBC for ; Sun, 22 Nov 2009 06:15:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 3s8ggVN5rvmh for ; Sun, 22 Nov 2009 06:15:02 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 53F1E431FAE for ; Sun, 22 Nov 2009 06:15:02 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id 8ADE2C05605; Sun, 22 Nov 2009 09:15:01 -0500 (EST) Date: Sun, 22 Nov 2009 09:15:01 -0500 From: Bart Trojanowski To: "Jeffrey C. Ollie" Message-ID: <20091122141501.GH17268@jukie.net> References: <1258897630-22282-1-git-send-email-jeff@ocjtech.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1258897630-22282-1-git-send-email-jeff@ocjtech.us> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Not Much Mail Subject: Re: [notmuch] [PATCH] Add SCons build files. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 14:15:04 -0000 * Jeffrey C. Ollie [091122 08:47]: > The SCons build files included here *should* do everything that the > current Makefiles do, plus a little bit of configuration checking. To > build/install: Wouldn't that have the unfortunate side effect of making notmuch unusable w/o emacs and scons installed? GNU make has a much wider install base, and notmuch is still very useful without emacs. -Bart -- WebSig: http://www.jukie.net/~bart/sig/ From brett.viren@gmail.com Sun Nov 22 06:41:17 2009 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 A1D46431FBC for ; Sun, 22 Nov 2009 06:41:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 z72SZ4cQ8jS2 for ; Sun, 22 Nov 2009 06:41:17 -0800 (PST) Received: from mail-px0-f180.google.com (mail-px0-f180.google.com [209.85.216.180]) by olra.theworths.org (Postfix) with ESMTP id F1D40431FAE for ; Sun, 22 Nov 2009 06:41:16 -0800 (PST) Received: by pxi10 with SMTP id 10so3498807pxi.33 for ; Sun, 22 Nov 2009 06:41:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=noTIQDOPsqUAVmdL4WR2bf1Lvji9TA2u6ljeBq4xnio=; b=pjlSpHcH+vbp5Dtl3K2ixArTW/l78N6GvmqZLZS4nZfZYSNlmzto3Rt68uD5y4LDJF 6bLtK7yK1b68Rs6PlTRGwdlGDCfLfCjO3NPtin7OJL94mUKlLpgliQdVEiajSRw/1BfF ZEthtGUAYG+3nqnHqMaru5NjvlCuk0Lfj65JU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=OfDTf9kq4fLhFCAjeA871jPeO0UR/UnFkQ7pAA/O08bvpSTdcAQl+eYy+UWdrcLDRe 6tJHJ6PSGkC4VS1135/omJ53s/zYZTo2Qs/VgwnB+6biWjT0aGp9ErFdKyg/9p7iEn/O CDwJUR2jiJ0UaY4RqHgkdDIgvnTYL47BkAiLk= MIME-Version: 1.0 Received: by 10.114.249.17 with SMTP id w17mr6304902wah.85.1258900876376; Sun, 22 Nov 2009 06:41:16 -0800 (PST) In-Reply-To: References: Date: Sun, 22 Nov 2009 09:41:16 -0500 Message-ID: <46263c600911220641m4d6de6d9u190d41c3feb87bc7@mail.gmail.com> From: Brett Viren To: Jjgod Jiang Content-Type: text/plain; charset=ISO-8859-1 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Guide for new users? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 14:41:17 -0000 On Sat, Nov 21, 2009 at 11:44 PM, Jjgod Jiang wrote: > 1. What's the most efficient way to sync mails from my gmail > account to a local Maildir? I've tried offlineimap but it > keeps crashing python (!) on my system (python 2.6, Mac OS X > 10.6.2). OfflineIMAP would have been my suggestion. > 2. How to add notmuch.el into my .emacsrc? > > I know notmuch feels like a tool for geeks, but it will probably > lower the barrier if someone can provide such a guide in a > straightforward, step-by-step way. I put notmuch.el in an ~/.emacs.d/ directory. Then add this to your .emacs file: (add-to-list 'load-path (expand-file-name "~/.emacs.d")) (require 'notmuch) In the session type "M-x notmuch". -Brett. From djcb@djcbsoftware.nl Sun Nov 22 07:11:07 2009 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 7C161431FBC for ; Sun, 22 Nov 2009 07:11:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 VZE9TAiIO2GY for ; Sun, 22 Nov 2009 07:11:06 -0800 (PST) Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi [195.197.172.111]) by olra.theworths.org (Postfix) with ESMTP id 6887A431FAE for ; Sun, 22 Nov 2009 07:11:06 -0800 (PST) Received: from djcbsoftware.nl (a88-112-254-208.elisa-laajakaista.fi [88.112.254.208]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by gw03.mail.saunalahti.fi (Postfix) with ESMTP id BAB93216618 for ; Sun, 22 Nov 2009 17:11:03 +0200 (EET) Received: from cthulhu.mindcrime.djcbsoftware.nl (localhost [127.0.0.1]) by djcbsoftware.nl (Postfix) with ESMTP id 3572F456001 for ; Sun, 22 Nov 2009 17:11:03 +0200 (EET) Date: Sun, 22 Nov 2009 17:11:03 +0200 Message-ID: <87d43ay4qg.wl%djcb@djcbsoftware.nl> From: Dirk-Jan C. Binnema To: "notmuch@notmuchmail org" Mail-Reply-To: djcb@djcbsoftware.nl User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.1 Mule/6.0 (HANACHIRUSATO) Organization: DJCBSoftware MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Subject: [notmuch] [PATCH] fix compiler warnings X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: djcb@djcbsoftware.nl 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, 22 Nov 2009 15:11:07 -0000 (hopefully this is the correct way to send patches...) With these minor changes, notmuch compiles warning-free with gcc 4.4.1 --- notmuch-new.c | 4 +++- notmuch-setup.c | 13 +++++++------ notmuch-tag.c | 4 +++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 0dd2784..88b48a6 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -36,7 +36,9 @@ static void handle_sigint (unused (int sig)) { static char msg[] = "Stopping... \n"; - write(2, msg, sizeof(msg)-1); + if (write(2, msg, sizeof(msg)-1) < 0) { + /* ignore...*/ + } interrupted = 1; } diff --git a/notmuch-setup.c b/notmuch-setup.c index 482efd2..0d3f186 100644 --- a/notmuch-setup.c +++ b/notmuch-setup.c @@ -99,12 +99,13 @@ notmuch_setup_command (unused (void *ctx), unsigned int i; int is_new; -#define prompt(format, ...) \ - do { \ - printf (format, ##__VA_ARGS__); \ - fflush (stdout); \ - getline (&response, &response_size, stdin); \ - chomp_newline (response); \ +#define prompt(format, ...) \ + do { \ + printf (format, ##__VA_ARGS__); \ + fflush (stdout); \ + if (getline (&response, &response_size, stdin) < 0) \ + break; \ + chomp_newline (response); \ } while (0) config = notmuch_config_open (ctx, NULL, &is_new); diff --git a/notmuch-tag.c b/notmuch-tag.c index e2311f6..5e40f50 100644 --- a/notmuch-tag.c +++ b/notmuch-tag.c @@ -26,7 +26,9 @@ static void handle_sigint (unused (int sig)) { static char msg[] = "Stopping... \n"; - write(2, msg, sizeof(msg)-1); + if (write(2, msg, sizeof(msg)-1) < 0) { + /* ignore... */ + } interrupted = 1; } -- 1.6.3.3 From brett.viren@gmail.com Sun Nov 22 07:15:40 2009 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 91E8F431FBF for ; Sun, 22 Nov 2009 07:15:40 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 4Bq64SW7jtvB for ; Sun, 22 Nov 2009 07:15:39 -0800 (PST) Received: from mail-px0-f180.google.com (mail-px0-f180.google.com [209.85.216.180]) by olra.theworths.org (Postfix) with ESMTP id 9BB23431FBC for ; Sun, 22 Nov 2009 07:15:39 -0800 (PST) Received: by pxi10 with SMTP id 10so3509843pxi.33 for ; Sun, 22 Nov 2009 07:15:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=zprO1YNm9vLmhU3f1VVPaTNCffkf7UyB1iGi9b+RUQs=; b=kuwM50gckMy94DtKt5mirk8BOYED8eW2blrKAjo4NNcquBse5qZeh4syBYzNP+FxpL CYv0q+/6/ZcZGalSiN5qrMbQni6pkNSpwMY89czT/Trt92YIHJ5KGkaRoKJfVDkBaJhU 04q2I/qNpUubjdVVcSxh9baV+G3LOqrA5PSlw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=r7jEGzg2gLE4gj0pexTAoU3Atbkbk4HpBYxY5SJkraZiKtraHUvwq/LahCdouogUoV WPKyoigqwFC4KE/YHvLZ/Ea4lexIBgHAtnAtC73To+XTWehyv9fMUcWWmPGo+EMG0Vkg a21zjxYTTvK+gS2IIbh72oUZwQy2bJ6OsGMDk= MIME-Version: 1.0 Received: by 10.115.149.4 with SMTP id b4mr4351873wao.18.1258902939041; Sun, 22 Nov 2009 07:15:39 -0800 (PST) In-Reply-To: <20091122083646.GA8420@glandium.org> References: <20091121145111.GB19397@excalibur.local> <87fx874xj5.fsf@yoom.home.cworth.org> <46263c600911211436s5826015eqc5fc18a4164245cb@mail.gmail.com> <20091122083646.GA8420@glandium.org> Date: Sun, 22 Nov 2009 10:15:39 -0500 Message-ID: <46263c600911220715q44960645x80f4909415b24d6@mail.gmail.com> From: Brett Viren To: Mike Hommey Content-Type: text/plain; charset=ISO-8859-1 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 15:15:40 -0000 On Sun, Nov 22, 2009 at 3:36 AM, Mike Hommey wrote: > A good test, if you have enough memory, would be to put your mailbox in > a tmpfs, and see how fast that imports. (Oops, forgot to reply to the list.) I don't see any function calls related to I/O on the call graph. But, here is one that looks I/O bound: notmuch tag -unread tag:inbox I have my home directory on an encfs volume and I see it and notmuch competing for CPU when viewing "top". -Brett. From michiel@michielbuddingh.net Sun Nov 22 07:57:55 2009 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 1D077431FBC for ; Sun, 22 Nov 2009 07:57:55 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 uOybpHLdYlCE for ; Sun, 22 Nov 2009 07:57:53 -0800 (PST) Received: from aegir.org.uk (aegir.org.uk [87.238.170.13]) by olra.theworths.org (Postfix) with ESMTP id 7B73A431FC0 for ; Sun, 22 Nov 2009 07:57:53 -0800 (PST) Received: from localhost.localdomain (109-9-ftth.onsnetstudenten.nl [145.120.9.109]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by aegir.org.uk (Postfix) with ESMTPSA id 904662E01B; Sun, 22 Nov 2009 16:57:52 +0100 (CET) Date: Sun, 22 Nov 2009 16:57:52 +0100 From: Michiel Buddingh' To: notmuch@notmuchmail.org, cworth@cworth.org Message-ID: <4b095f80.oVC2da9Z18jqqm5n%michiel@michielbuddingh.net> References: <87fx8bygi7.fsf@linux.vnet.ibm.com> <87bpiv4t9h.fsf@yoom.home.cworth.org> <87y6lz39nd.fsf@yoom.home.cworth.org> <20091121221207.GB17268@jukie.net> <9cce5525b093b87fe74d427954ffad89@localhost> <87d43b2oif.fsf@yoom.home.cworth.org> <9bfdedddeab9c58cd45d8d448323d0fc@localhost> <87fx86g39u.fsf@yoom.home.cworth.org> In-Reply-To: <87fx86g39u.fsf@yoom.home.cworth.org> User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [notmuch] [PATCH] notmuch: Add Maildir directory name as tag name for messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 15:57:55 -0000 Carl Worth wrote: > > A Maildir-aware notmuch could incorporate this to be far more > > resistant to bulk mail moves done by other clients, by using > > filename lookups to avoid accessing and parsing the mail > > files themselves. > I don't think opening a file to read out a message ID will ever be > a bottleneck. But yes, we could take advantage of the unique name > if we insisted that the storage have it. I'm not so sure. On traditional unix-like filesystems, every file access is another potential disk seek. People use a lot of different strategies for keeping their mail accessible and performant; you yourself, I gather, use non-semantic directories mainly intended to keep the number of files per directory low; others store their mail per month, or per year. I might choose to move all my mail from 2008 from my INBOX to the folder Archive.2008; such moves may change the paths of thousands of messages at a time. > Personally, I still regularly end up indexing stuff that's not > in proper maildir format, (like just manually copying a mail > file "foo" down into a directory that I know isn't being delivered > to by any MDA but that I want notmuch to index.) Maybe that's just > me, because I'm always bringing up little things for debugging, > etc. But it is convenient at least. Oh true. And it occurs to me that notmuch is a quite sensible companion tool to MH users (if they're still around in any numbers) > Actually, I don't think that's true at all. Notmuch is definitely > intended to become a lot more than it is right now. And if it's not > making it easy for you to deal with mail the way you'd like to, then > we definitely do want to look into expanding notmuch to be able to > address that. Thanks for your consideration; on the other hand, I do think that it is a good idea not to make matters more complex than they need to be, so I can certainly sympathise with the principles you've set for this project. regards, Michiel Buddingh' From jeff@ocjtech.us Sun Nov 22 08:00:28 2009 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 2B852431FBF for ; Sun, 22 Nov 2009 08:00:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 CPp2xpNsaiLN for ; Sun, 22 Nov 2009 08:00:27 -0800 (PST) Received: from mail-yw0-f200.google.com (mail-yw0-f200.google.com [209.85.211.200]) by olra.theworths.org (Postfix) with ESMTP id 89DB8431FBC for ; Sun, 22 Nov 2009 08:00:27 -0800 (PST) Received: by ywh38 with SMTP id 38so4250221ywh.6 for ; Sun, 22 Nov 2009 08:00:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.90.62.4 with SMTP id k4mr5404836aga.56.1258905626868; Sun, 22 Nov 2009 08:00:26 -0800 (PST) In-Reply-To: <20091122141501.GH17268@jukie.net> References: <1258897630-22282-1-git-send-email-jeff@ocjtech.us> <20091122141501.GH17268@jukie.net> Date: Sun, 22 Nov 2009 10:00:26 -0600 Message-ID: <935ead450911220800r47284335n301a2b2432638c72@mail.gmail.com> From: Jeffrey Ollie To: Bart Trojanowski , Not Much Mail Content-Type: text/plain; charset=UTF-8 Subject: Re: [notmuch] [PATCH] Add SCons build files. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 16:00:28 -0000 The SCons build files are not meant to require emacs. If I've messed something up and emacs is somehow required I would consider that a bug and would try to fix it. As far as availability, I'm sure that SCons is one yum or apt-get or away. The only people that would face more than a minor inconvenience are people that prefer to download tarballs and compile and install things themselves. Yes, I'm sure that make is widely available, but as notmuch gets used on a wider variety of systems some sort of configuration system will become necessary. If I can prevent another project from going down the autoconf/automake path I'll be happy. I started creating CMake build files but I don't know CMake well enough to come up with a working build. On 11/22/09, Bart Trojanowski wrote: > * Jeffrey C. Ollie [091122 08:47]: >> The SCons build files included here *should* do everything that the >> current Makefiles do, plus a little bit of configuration checking. To >> build/install: > > Wouldn't that have the unfortunate side effect of making notmuch > unusable w/o emacs and scons installed? > > GNU make has a much wider install base, and notmuch is still very useful > without emacs. > > -Bart > > -- > WebSig: http://www.jukie.net/~bart/sig/ > -- Sent from my mobile device Jeff Ollie From michiel@michielbuddingh.net Sun Nov 22 08:00:38 2009 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 74DE2431FC4 for ; Sun, 22 Nov 2009 08:00:38 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 0NtT+XqUk2AL for ; Sun, 22 Nov 2009 08:00:36 -0800 (PST) Received: from aegir.org.uk (aegir.org.uk [87.238.170.13]) by olra.theworths.org (Postfix) with ESMTP id 6DA8F431FC0 for ; Sun, 22 Nov 2009 08:00:36 -0800 (PST) Received: from localhost.localdomain (109-9-ftth.onsnetstudenten.nl [145.120.9.109]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by aegir.org.uk (Postfix) with ESMTPSA id E43BE2E03C; Sun, 22 Nov 2009 17:00:35 +0100 (CET) Date: Sun, 22 Nov 2009 17:00:36 +0100 From: Michiel Buddingh' To: djcb@djcbsoftware.nl Message-ID: <4b096024.f5WEZqYlMxgYs/o1%michiel@michielbuddingh.net> References: <87fx8bygi7.fsf@linux.vnet.ibm.com> <87bpiv4t9h.fsf@yoom.home.cworth.org> <87y6lz39nd.fsf@yoom.home.cworth.org> <20091121221207.GB17268@jukie.net> <9cce5525b093b87fe74d427954ffad89@localhost> <87d43b2oif.fsf@yoom.home.cworth.org> <9bfdedddeab9c58cd45d8d448323d0fc@localhost> <87vdh2n7y2.wl%djcb@djcbsoftware.nl> In-Reply-To: <87vdh2n7y2.wl%djcb@djcbsoftware.nl> User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] notmuch: Add Maildir directory name as tag name for messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 16:00:38 -0000 Dirk-Jan C. Binnema wrote: > Michiel> + > Michiel> +static void > Michiel> +derive_tags_from_maildir_flags (notmuch_message_t > Michiel> *message, const char * > Michiel> path) > > I see you don't handle the "N" -- is that deliberate? Also, a > minor addition may to also allow for '!' instead of ':' as a > separator, as that's the semi-official way to use Maildirs on > (V)FAT filesystems (which don't allow for colons in filenames). Not deliberate. Simply unaware of the "N" flag, nor aware of practices for storing Maildirs on (V)FAT. I've used only this file as a reference. http://cr.yp.to/proto/maildir.html mvg, Michiel Buddingh' From aneesh.kumar@linux.vnet.ibm.com Sun Nov 22 08:12:38 2009 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 E0A6F431FBF for ; Sun, 22 Nov 2009 08:12:38 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 XvGv5+Ipgl4X for ; Sun, 22 Nov 2009 08:12:38 -0800 (PST) Received: from e23smtp05.au.ibm.com (e23smtp05.au.ibm.com [202.81.31.147]) by olra.theworths.org (Postfix) with ESMTP id B3F12431FBC for ; Sun, 22 Nov 2009 08:12:37 -0800 (PST) Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246]) by e23smtp05.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAMG9bHV012982 for ; Mon, 23 Nov 2009 03:09:37 +1100 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAMG9CxN1744906 for ; Mon, 23 Nov 2009 03:09:12 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAMGCZLK014287 for ; Mon, 23 Nov 2009 03:12:35 +1100 Received: from localhost.localdomain ([9.124.218.229]) by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAMGCXsC014283; Mon, 23 Nov 2009 03:12:34 +1100 From: "Aneesh Kumar K.V" To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 21:42:30 +0530 Message-Id: <1258906350-10896-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.6.5.2.74.g610f9 Subject: [notmuch] [RFC PATCH] notmuch: Add support for multiple maildirs X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 16:12:39 -0000 This patch separate database path and maildir paths. It also adds support for multiple maildir paths which is represented by comma separated values. You need to have in ~/.notmuch-config [maildirs] path=path1,path2 Signed-off-by: Aneesh Kumar K.V --- notmuch-client.h | 8 ++++++++ notmuch-config.c | 43 +++++++++++++++++++++++++++++++++++++++++++ notmuch-new.c | 24 +++++++++++++++++++++--- 3 files changed, 72 insertions(+), 3 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index ea77686..128fd7f 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -83,6 +83,11 @@ typedef struct { add_files_callback_t callback; } add_files_state_t; +struct count_ele { + int count; + char ele[0]; +}; + static inline void chomp_newline (char *str) { @@ -182,4 +187,7 @@ notmuch_config_set_user_other_email (notmuch_config_t *config, notmuch_bool_t debugger_is_active (void); +const struct count_ele * +notmuch_config_get_maildirs (notmuch_config_t *config); + #endif diff --git a/notmuch-config.c b/notmuch-config.c index aaa0372..12b0081 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -62,6 +62,7 @@ struct _notmuch_config { char *user_primary_email; char **user_other_email; size_t user_other_email_length; + struct count_ele *maildirs; }; static int @@ -334,6 +335,48 @@ notmuch_config_get_database_path (notmuch_config_t *config) return config->database_path; } +const struct count_ele * +notmuch_config_get_maildirs (notmuch_config_t *config) +{ + int size; + char *cur_ptr; + char *dirs, *token, *saveptr; + struct count_ele *maildirs = NULL; + if (config->maildirs == NULL) { + dirs = g_key_file_get_string (config->key_file, + "maildirs", "path", NULL); + if (dirs) { + size = sizeof(struct count_ele) + strlen(dirs) + 1; + /* comma separated paths */ + maildirs = (struct count_ele *)malloc(size); + maildirs->count = 0; + cur_ptr = maildirs->ele; + token = strtok_r(dirs, ",", &saveptr); + if (token == NULL) { + /* only one element */ + strcpy(maildirs->ele, dirs); + maildirs->count = 1; + free(dirs); + config->maildirs = maildirs; + return maildirs; + } + strcpy(maildirs->ele, token); + maildirs->count++; + cur_ptr += strlen(token) + 1; + while ((token = strtok_r(NULL, ",", &saveptr))) { + strcpy(cur_ptr, token); + maildirs->count++; + cur_ptr += strlen(token) + 1; + } + free (dirs); + } + config->maildirs = maildirs; + } + return config->maildirs; + + +} + void notmuch_config_set_database_path (notmuch_config_t *config, const char *database_path) diff --git a/notmuch-new.c b/notmuch-new.c index 0dd2784..1a9406b 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -385,14 +385,16 @@ notmuch_new_command (void *ctx, { notmuch_config_t *config; notmuch_database_t *notmuch; + const struct count_ele *maildirs; add_files_state_t add_files_state; double elapsed; struct timeval tv_now; - int ret = 0; + int ret = 0, maildirs_count; struct stat st; const char *db_path; char *dot_notmuch_path; struct sigaction action; + const char *maildir_path; /* Setup our handler for SIGINT */ memset (&action, 0, sizeof (struct sigaction)); @@ -406,6 +408,9 @@ notmuch_new_command (void *ctx, return 1; db_path = notmuch_config_get_database_path (config); + maildirs = notmuch_config_get_maildirs (config); + if (maildirs == NULL) + return 1; dot_notmuch_path = talloc_asprintf (ctx, "%s/%s", db_path, ".notmuch"); @@ -413,7 +418,13 @@ notmuch_new_command (void *ctx, int count; count = 0; - count_files (db_path, &count); + maildirs_count = maildirs->count; + maildir_path = maildirs->ele; + while (maildirs_count) { + count_files (maildir_path, &count); + maildir_path += strlen(maildir_path) + 1; + maildirs_count--; + } if (interrupted) return 1; @@ -439,7 +450,14 @@ notmuch_new_command (void *ctx, add_files_state.added_messages = 0; gettimeofday (&add_files_state.tv_start, NULL); - ret = add_files (notmuch, db_path, &add_files_state); + maildirs_count = maildirs->count; + maildir_path = maildirs->ele; + while (maildirs_count) { + printf ("Processing maildir %s\n", maildir_path); + ret = add_files (notmuch, maildir_path, &add_files_state); + maildir_path += strlen(maildir_path) + 1; + maildirs_count--; + } gettimeofday (&tv_now, NULL); elapsed = notmuch_time_elapsed (add_files_state.tv_start, -- 1.6.5.2.74.g610f9 From bart@jukie.net Sun Nov 22 08:20:12 2009 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 B0A7F431FBC for ; Sun, 22 Nov 2009 08:20:12 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 8W8uWjJXaSep for ; Sun, 22 Nov 2009 08:20:12 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id B9E1C431FC0 for ; Sun, 22 Nov 2009 08:20:11 -0800 (PST) Received: from localhost.localdomain (oxygen.jukie.net [10.10.10.8]) by tau.jukie.net (Postfix) with ESMTP id 214B2C00F9B; Sun, 22 Nov 2009 11:20:11 -0500 (EST) From: Bart Trojanowski To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 11:19:31 -0500 Message-Id: <1258906771-6869-1-git-send-email-bart@jukie.net> X-Mailer: git-send-email 1.6.4.4.2.gc2f148 Subject: [notmuch] [PATCH] fix notmuch-new bug when database path ends with a trailing / X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 16:20:12 -0000 I configured my database.path with a trailing /, and after running notmuch new every notmuch search would fail with error messages like this: Error opening /inbox/cur/1258565257.000211.mbox:2,S: No such file or directory The actual bug was in the filename normalization for storage in the database. The database.path was removed from the full filename, but if the database.path from the config file contained a trailing /, the relative file name would retain an extra leading /... which made it look like an absolute path after it was read out from the DB. Signed-off-by: Bart Trojanowski --- lib/message.cc | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index 017c47b..1e325e2 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -411,10 +411,14 @@ _notmuch_message_set_filename (notmuch_message_t *message, db_path = notmuch_database_get_path (message->notmuch); db_path_len = strlen (db_path); - if (*s == '/' && strncmp (s, db_path, db_path_len) == 0 - && strlen (s) > db_path_len) + if (*s == '/' && strlen (s) > db_path_len + && strncmp (s, db_path, db_path_len) == 0) { - s += db_path_len + 1; + s += db_path_len; + while (*s == '/') s++; + + if (!*s) + INTERNAL_ERROR ("Message filename was same as db prefix."); } message->doc.set_data (s); -- 1.6.4.4.2.gc2f148 From five9a2@gmail.com Sun Nov 22 09:02:09 2009 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 96B94431FBC for ; Sun, 22 Nov 2009 09:02:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 eh7GtbIG1Oyf for ; Sun, 22 Nov 2009 09:02:08 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 40D7A431FAE for ; Sun, 22 Nov 2009 09:02:08 -0800 (PST) Received: by bwz24 with SMTP id 24so3408774bwz.30 for ; Sun, 22 Nov 2009 09:02:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=fq6XDslB1+EEgwws+FgT3WkYKMFix3Ym/uTZIbV3ClM=; b=L2F577h1iaZ7dXAOuMWHRGnBIG1sFPVBmkjc8qLf9H1yRvMkzJwyQZLNRCmi8Ro2Nm v76Lf4yA/GxYTundejw2VMVfMNbMqTJ3kkDzLJi2oj92hntOzklGAQi19SQG7DVkHD0n KisdMXTYFy1VhV30DdlwtwihY7P//GFIdyu4w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=pNWLI8DIbMQI9GRKjCn/Xe4o9LMhN5lNrrsWcPI/T/jVzlqsS8+tR8TiaXUfsmLoKR OU/mlKKhP8v39e7dj8mXMhH0SxZo+4/91qFV8Xvq7XQa5m0kfz49a4g3M1q3Y8fqz2LI P+tIBzqbMmqBGb4bIXErXnTUGEahMV/PW3lRE= Received: by 10.204.175.20 with SMTP id v20mr3590876bkz.213.1258909327484; Sun, 22 Nov 2009 09:02:07 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 13sm4521642fks.45.2009.11.22.09.02.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 09:02:06 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Brett Viren , Jjgod Jiang In-Reply-To: <46263c600911220641m4d6de6d9u190d41c3feb87bc7@mail.gmail.com> References: <46263c600911220641m4d6de6d9u190d41c3feb87bc7@mail.gmail.com> Date: Sun, 22 Nov 2009 18:02:36 +0100 Message-ID: <87zl6ev6fn.fsf@kunyang.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Guide for new users? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 17:02:09 -0000 On Sun, 22 Nov 2009 09:41:16 -0500, Brett Viren wrote: > On Sat, Nov 21, 2009 at 11:44 PM, Jjgod Jiang wrote: > > > 1. What's the most efficient way to sync mails from my gmail > > account to a local Maildir? I've tried offlineimap but it > > keeps crashing python (!) on my system (python 2.6, Mac OS X > > 10.6.2). > > OfflineIMAP would have been my suggestion. Yes, however it will change flags which changes file names and currently confuses notmuch. I synced [Gmail].All Mail with OfflineIMAP and am now using Getmail to pull via POP. In the Gmail settings, activate POP starting at the current time. I'll switch back to OfflineIMAP when notmuch is happy with changing file names. The following should save notmuch + Gmail users some time. ~/.getmail/gmail: [retriever] # Getmail can also do IMAP # type = SimpleIMAPSSLRetriever # server = imap.gmail.com type = SimplePOP3SSLRetriever server = pop.gmail.com username = yourname@gmail.com password = Pa55W0rd # Use this with IMAP to only download one copy of each message # mailboxes = ('[Gmail]/All Mail',) [destination] type = Maildir path = ~/.mail-archive/gmail/pop/ [options] # print messages about each action (verbose = 2) # Other options: # 0 prints only warnings and errors # 1 prints messages about retrieving and deleting messages only verbose = 2 message_log = ~/.getmail/gmail.log With getmail, put something like this in your crontab (checks every 2 minutes) # MIN HOUR DAY MONTH DAYOFWEEK COMMAND */2 * * * * getmail -r gmail && notmuch new ~/.offlineimaprc: [general] accounts = GMail maxsyncaccounts = 1 ui = Noninteractive.Basic [Account GMail] localrepository = Local remoterepository = Remote autorefresh = 1 quick = 10 postsynchook = notmuch new [Repository Local] type = Maildir localfolders = /home/jed/.mail-archive/gmail/imap [Repository Remote] type = Gmail folderfilter = lambda foldername: foldername in ['[Gmail]/All Mail'] remotehost = imap.gmail.com remoteuser = yourname@gmail.com remotepass = Pa55W0rd ssl = yes maxconnections = 2 #Setting realdelete = yes will Really Delete email from the server. #Otherwise "deleting" a message will just remove any labels and #retain the message in the All Mail folder. realdelete = no Note that with IMAP, your messages in '[Gmail]/All Mail' will be delivered to a path with spaces which notmuch handles fine, but you will need a patch <1258771074-25997-1-git-send-email-jed@59A2.org> for start-process-shell-command, e.g. to apply patches from within emacs via | git am * Sending messages To send messages from Emacs via Gmail, put something like this in your ~/.emacs (setq smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil)) ; Must be set BEFORE loading smtpmail smtpmail-auth-credentials (expand-file-name "~/.authinfo") smtpmail-default-smtp-server "smtp.gmail.com" smtpmail-smtp-server "smtp.gmail.com" smtpmail-smtp-service 587 smtpmail-debug-info t ; change to nil once it works smtpmail-debug-verb t) (require 'smtpmail) (setq message-send-mail-function 'smtpmail-send-it) (require 'starttls) you can inline authentication, but especially if you keep ~/.emacs under version control, you should put it separately (chmod 600). ~/.authinfo: machine smtp.gmail.com login yourname@gmail.com password Pa55W0rd port 587 * Git Git + Gmail users can use git send-email by putting this in your .gitconfig [sendemail] smtpserver = smtp.gmail.com smtpserverport = 587 smtpencryption = tls smtpuser = yourname@gmail.com smtppass = Pa55W0rd I hope this helps. Jed From five9a2@gmail.com Sun Nov 22 09:21:01 2009 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 226AC431FC0 for ; Sun, 22 Nov 2009 09:21:01 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 8hQCGYSl0zQr for ; Sun, 22 Nov 2009 09:21:00 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 46FE7431FAE for ; Sun, 22 Nov 2009 09:21:00 -0800 (PST) Received: by bwz24 with SMTP id 24so3415853bwz.30 for ; Sun, 22 Nov 2009 09:20:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=Ajw5OlxfAtK48TPvujIKeF84i64TlaOyQAYP7z/Ub7Y=; b=vXISagHjBI8paBMjxVQAhRnpaCVHfZPzZZwGSrdYSpujMXYeH4gBru1A1bdzSs2iFB nx+jM2j1KL0qXhkqB1A35djiqtI3kofPWRdNYN0CpHApGRVYq0Wtm6z1HoMirAPJcGn0 V2mkEl5BpCWqsB4+uk0dzrVNSNdlin+SKSRc4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=b3AosuyHqbim7Youn+o6pstcIvxMSS4687E9aT5i1nuuUSjzw6jsIEhnj4NX8vLsL1 7T1RVOA1QKaVhRnisfh6c6i7VIKXCvqWI8NyeJQsi7VJ3UpWoll8tkedQfv09FrvFFU2 FMR3/RH/xmLTRwNBYSUrk7eQRscGBkGH/CafU= Received: by 10.204.49.82 with SMTP id u18mr3824588bkf.47.1258910459236; Sun, 22 Nov 2009 09:20:59 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 12sm4547041fks.9.2009.11.22.09.20.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 09:20:57 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Jeffrey Ollie , Bart Trojanowski , Not Much Mail In-Reply-To: <935ead450911220800r47284335n301a2b2432638c72@mail.gmail.com> References: <1258897630-22282-1-git-send-email-jeff@ocjtech.us> <20091122141501.GH17268@jukie.net> <935ead450911220800r47284335n301a2b2432638c72@mail.gmail.com> Date: Sun, 22 Nov 2009 18:21:28 +0100 Message-ID: <87r5rqmq5j.fsf@kunyang.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Add SCons build files. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 17:21:01 -0000 On Sun, 22 Nov 2009 10:00:26 -0600, Jeffrey Ollie wrote: > Yes, I'm sure that make is widely available, but as notmuch gets used > on a wider variety of systems some sort of configuration system will > become necessary. If I can prevent another project from going down > the autoconf/automake path I'll be happy. I started creating CMake > build files but I don't know CMake well enough to come up with a > working build. I can do a CMake build if that's desirable. While I prefer it to SCons, particularly when config/build times are an issue and you want to have several active build trees, it is a significantly heavier dependency. With SCons, you can dump scons-local (a pure Python script) into the source tree and then users only need Python. There are lots of other lightweight build tools. Jed From aneesh.kumar@linux.vnet.ibm.com Sun Nov 22 10:28:54 2009 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 4A6BF431FBC for ; Sun, 22 Nov 2009 10:28:54 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 G-jVUhhvNMIK for ; Sun, 22 Nov 2009 10:28:53 -0800 (PST) Received: from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148]) by olra.theworths.org (Postfix) with ESMTP id B0473431FAE for ; Sun, 22 Nov 2009 10:28:52 -0800 (PST) Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246]) by e23smtp06.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAMISmQq019424 for ; Mon, 23 Nov 2009 05:28:48 +1100 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAMIPRms1708146 for ; Mon, 23 Nov 2009 05:25:27 +1100 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAMISoGV003536 for ; Mon, 23 Nov 2009 05:28:50 +1100 Received: from localhost.localdomain ([9.124.218.229]) by d23av02.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAMISmlF003533; Mon, 23 Nov 2009 05:28:49 +1100 From: "Aneesh Kumar K.V" To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 23:58:46 +0530 Message-Id: <1258914526-30984-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.6.5.2.74.g610f9 Subject: [notmuch] [RFC PATCH -V2] notmuch: Add support for multiple maildirs X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 18:28:54 -0000 This patch separate database path and maildir paths. It also adds support for multiple maildir paths which is represented by comma separated values. You need to have in ~/.notmuch-config [maildirs] path=path1,path2 Signed-off-by: Aneesh Kumar K.V --- notmuch-client.h | 12 ++++++++++++ notmuch-config.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ notmuch-new.c | 24 +++++++++++++++++++++--- notmuch-setup.c | 37 +++++++++++++++++++++++++++++++++++-- 4 files changed, 122 insertions(+), 5 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index ea77686..f2fc19f 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -83,6 +83,11 @@ typedef struct { add_files_callback_t callback; } add_files_state_t; +struct count_ele { + int count; + char ele[0]; +}; + static inline void chomp_newline (char *str) { @@ -182,4 +187,11 @@ notmuch_config_set_user_other_email (notmuch_config_t *config, notmuch_bool_t debugger_is_active (void); +const struct count_ele * +notmuch_config_get_maildirs (notmuch_config_t *config); + +void +notmuch_config_set_maildirs (notmuch_config_t *config, + const char *maildirs); + #endif diff --git a/notmuch-config.c b/notmuch-config.c index aaa0372..330da48 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -62,6 +62,7 @@ struct _notmuch_config { char *user_primary_email; char **user_other_email; size_t user_other_email_length; + struct count_ele *maildirs; }; static int @@ -345,6 +346,59 @@ notmuch_config_set_database_path (notmuch_config_t *config, config->database_path = NULL; } +const struct count_ele * +notmuch_config_get_maildirs (notmuch_config_t *config) +{ + int size; + char *cur_ptr; + char *dirs, *token, *saveptr; + struct count_ele *maildirs = NULL; + if (config->maildirs == NULL) { + dirs = g_key_file_get_string (config->key_file, + "maildirs", "path", NULL); + if (dirs) { + size = sizeof(struct count_ele) + strlen(dirs) + 1; + /* comma separated paths */ + maildirs = (struct count_ele *)malloc(size); + maildirs->count = 0; + cur_ptr = maildirs->ele; + token = strtok_r(dirs, ",", &saveptr); + if (token == NULL) { + /* only one element */ + strcpy(maildirs->ele, dirs); + maildirs->count = 1; + free(dirs); + config->maildirs = maildirs; + return maildirs; + } + strcpy(maildirs->ele, token); + maildirs->count++; + cur_ptr += strlen(token) + 1; + while ((token = strtok_r(NULL, ",", &saveptr))) { + strcpy(cur_ptr, token); + maildirs->count++; + cur_ptr += strlen(token) + 1; + } + free (dirs); + } + config->maildirs = maildirs; + } + return config->maildirs; + + +} + +void +notmuch_config_set_maildirs (notmuch_config_t *config, + const char *maildirs) +{ + g_key_file_set_string (config->key_file, + "maildirs", "path", maildirs); + + free (config->maildirs); + config->maildirs = NULL; +} + const char * notmuch_config_get_user_name (notmuch_config_t *config) { diff --git a/notmuch-new.c b/notmuch-new.c index 0dd2784..1a9406b 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -385,14 +385,16 @@ notmuch_new_command (void *ctx, { notmuch_config_t *config; notmuch_database_t *notmuch; + const struct count_ele *maildirs; add_files_state_t add_files_state; double elapsed; struct timeval tv_now; - int ret = 0; + int ret = 0, maildirs_count; struct stat st; const char *db_path; char *dot_notmuch_path; struct sigaction action; + const char *maildir_path; /* Setup our handler for SIGINT */ memset (&action, 0, sizeof (struct sigaction)); @@ -406,6 +408,9 @@ notmuch_new_command (void *ctx, return 1; db_path = notmuch_config_get_database_path (config); + maildirs = notmuch_config_get_maildirs (config); + if (maildirs == NULL) + return 1; dot_notmuch_path = talloc_asprintf (ctx, "%s/%s", db_path, ".notmuch"); @@ -413,7 +418,13 @@ notmuch_new_command (void *ctx, int count; count = 0; - count_files (db_path, &count); + maildirs_count = maildirs->count; + maildir_path = maildirs->ele; + while (maildirs_count) { + count_files (maildir_path, &count); + maildir_path += strlen(maildir_path) + 1; + maildirs_count--; + } if (interrupted) return 1; @@ -439,7 +450,14 @@ notmuch_new_command (void *ctx, add_files_state.added_messages = 0; gettimeofday (&add_files_state.tv_start, NULL); - ret = add_files (notmuch, db_path, &add_files_state); + maildirs_count = maildirs->count; + maildir_path = maildirs->ele; + while (maildirs_count) { + printf ("Processing maildir %s\n", maildir_path); + ret = add_files (notmuch, maildir_path, &add_files_state); + maildir_path += strlen(maildir_path) + 1; + maildirs_count--; + } gettimeofday (&tv_now, NULL); elapsed = notmuch_time_elapsed (add_files_state.tv_start, diff --git a/notmuch-setup.c b/notmuch-setup.c index 482efd2..e358c68 100644 --- a/notmuch-setup.c +++ b/notmuch-setup.c @@ -97,7 +97,10 @@ notmuch_setup_command (unused (void *ctx), size_t old_other_emails_len; GPtrArray *other_emails; unsigned int i; - int is_new; + int is_new, maildirs_count, size = 0; + const struct count_ele *maildirs; + const char *maildir_path; + char *cmaildirs = NULL;; #define prompt(format, ...) \ do { \ @@ -146,7 +149,7 @@ notmuch_setup_command (unused (void *ctx), other_emails->len); g_ptr_array_free (other_emails, TRUE); - prompt ("Top-level directory of your email archive [%s]: ", + prompt ("Directory for notmuch database [%s]: ", notmuch_config_get_database_path (config)); if (strlen (response)) { const char *absolute_path; @@ -155,6 +158,36 @@ notmuch_setup_command (unused (void *ctx), notmuch_config_set_database_path (config, absolute_path); } + maildirs = notmuch_config_get_maildirs (config); + if (maildirs) { + /* build the comma separated value */ + maildirs_count = maildirs->count; + maildir_path = maildirs->ele; + while (maildirs_count) { + size += strlen(maildir_path) + 1; + maildir_path += strlen(maildir_path) + 1; + maildirs_count--; + } + maildirs_count = maildirs->count; + cmaildirs = malloc(size); + maildir_path = maildirs->ele; + memset(cmaildirs, 0, size); + while(maildirs_count) { + strncat(cmaildirs, maildir_path, size); + maildirs_count--; + if (maildirs_count == 0) + break; + strncat(cmaildirs, ",", size); + maildir_path += strlen(maildir_path) + 1; + + } + } + + prompt ("Comma separated maildirs [%s]: ", cmaildirs); + + if (strlen (response)) + notmuch_config_set_maildirs (config, response); + notmuch_config_save (config); if (is_new) -- 1.6.5.2.74.g610f9 From stefan@datenfreihafen.org Sun Nov 22 10:33:44 2009 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 912FF431FBF for ; Sun, 22 Nov 2009 10:33:44 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 9T+Abdbhab0i for ; Sun, 22 Nov 2009 10:33:43 -0800 (PST) Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19]) by olra.theworths.org (Postfix) with ESMTP id 39D1C431FAE for ; Sun, 22 Nov 2009 10:33:43 -0800 (PST) Received: from p5b0353d3.dip.t-dialin.net ([91.3.83.211] helo=excalibur) by sirius.lasnet.de with esmtpsa (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1) id 1NCHFh-0000dR-It by authid with cram_md5; Sun, 22 Nov 2009 19:33:40 +0100 Received: from stefan by excalibur with local (Exim 4.69) (envelope-from ) id 1NCHFi-0002ot-2C; Sun, 22 Nov 2009 19:33:38 +0100 Date: Sun, 22 Nov 2009 19:33:38 +0100 From: Stefan Schmidt To: Keith Packard Message-ID: <20091122183338.GB5735@excalibur.local> References: <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="C7zPtVaVf+AK4Oqc" Content-Disposition: inline In-Reply-To: X-Mailer: Mutt http://www.mutt.org/ X-KeyID: 0xDDF51665 X-Website: http://www.datenfreihafen.org/ User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 1/2] lib/message: Add function to get maildir flags. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 18:33:44 -0000 --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello. On Sat, 2009-11-21 at 16:28, Keith Packard wrote: > On Sun, 22 Nov 2009 01:11:00 +0100, Stefan Schmidt wrote: >=20 > > +const char * > > +notmuch_message_get_flags (notmuch_message_t *message) >=20 > This function should interpret the flags that it finds and return a > suitable set of notmuch tags. I'd suggest that 'unread' messages get > both 'unread' and 'inbox' tags, as Maildir doesn't distinguish between > 'don't show this to be by default again please' and 'I've read this > message'. It seems best to hide the maildir-specific details inside the > library instead of exposing them. Thanks for the review. On a second thought the interface was really a bit u= gly. :) I'm just back to my box and going through the outstanding mails shows me th= at Michiel Buddingh has a more complete patch on the convert-maildir-flags-into-tags issue which Carl has tagged for review. Will wait what comes out of it and if anything is left for me to. :) regards Stefan Schmidt --C7zPtVaVf+AK4Oqc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: http://www.datenfreihafen.org/contact.html iEYEARECAAYFAksJhAIACgkQbNSsvd31FmWDDgCgswbE3BE2XeExPzBBJf86efDw aFwAoMc3vaBmTjB2kG5ORUmk1E/ICBXK =k8v5 -----END PGP SIGNATURE----- --C7zPtVaVf+AK4Oqc-- From michiel@michielbuddingh.net Sun Nov 22 10:55:27 2009 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 B580E431FBC for ; Sun, 22 Nov 2009 10:55:27 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 JHZeV0d6+Q8a for ; Sun, 22 Nov 2009 10:55:26 -0800 (PST) Received: from aegir.org.uk (aegir.org.uk [87.238.170.13]) by olra.theworths.org (Postfix) with ESMTP id C6AAC431FAE for ; Sun, 22 Nov 2009 10:55:26 -0800 (PST) Received: from localhost.localdomain (109-9-ftth.onsnetstudenten.nl [145.120.9.109]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by aegir.org.uk (Postfix) with ESMTPSA id 48CE72E02A; Sun, 22 Nov 2009 19:55:26 +0100 (CET) Date: Sun, 22 Nov 2009 19:55:26 +0100 From: Michiel Buddingh' To: notmuch@notmuchmail.org, stefan@datenfreihafen.org, keithp@keithp.com Message-ID: <4b09891e.YhJ/aJZOBwneOaFr%michiel@michielbuddingh.net> References: <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org> <20091122183338.GB5735@excalibur.local> In-Reply-To: <20091122183338.GB5735@excalibur.local> User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [notmuch] [PATCH 1/2] lib/message: Add function to get maildir flags. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 18:55:27 -0000 Stefan Schmidt wrote: > > This function should interpret the flags that it finds and return a > > suitable set of notmuch tags. I'd suggest that 'unread' messages get > > both 'unread' and 'inbox' tags, as Maildir doesn't distinguish between > > 'don't show this to be by default again please' and 'I've read this > > message'. It seems best to hide the maildir-specific details inside the > > library instead of exposing them. > > Thanks for the review. On a second thought the interface was really a bit ugly. > :) > > I'm just back to my box and going through the outstanding mails shows me that > Michiel Buddingh has a more complete patch on the > convert-maildir-flags-into-tags issue which Carl has tagged for review. Will > wait what comes out of it and if anything is left for me to. :) Apologies. In my haste to cover up my appalling and incorrect first patch, I neglected to review the archives to see if someone had already done this. Sorry for stealing your thunder. Michiel From stefan@datenfreihafen.org Sun Nov 22 11:52:54 2009 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 B2DE3431FBC for ; Sun, 22 Nov 2009 11:52:54 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 TrLH7uZhkvFU for ; Sun, 22 Nov 2009 11:52:53 -0800 (PST) Received: from sirius.lasnet.de (sirius.lasnet.de [78.47.116.19]) by olra.theworths.org (Postfix) with ESMTP id 7024B431FAE for ; Sun, 22 Nov 2009 11:52:53 -0800 (PST) Received: from p5b0353d3.dip.t-dialin.net ([91.3.83.211] helo=excalibur) by sirius.lasnet.de with esmtpsa (Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1) id 1NCIUJ-0002QO-OM by authid with cram_md5; Sun, 22 Nov 2009 20:52:50 +0100 Received: from stefan by excalibur with local (Exim 4.69) (envelope-from ) id 1NCIUI-0003ON-Sr; Sun, 22 Nov 2009 20:52:46 +0100 Date: Sun, 22 Nov 2009 20:52:46 +0100 From: Stefan Schmidt To: Michiel Buddingh' Message-ID: <20091122195246.GC5735@excalibur.local> References: <1258848661-4660-1-git-send-email-stefan@datenfreihafen.org> <20091122183338.GB5735@excalibur.local> <4b09891e.YhJ/aJZOBwneOaFr%michiel@michielbuddingh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4b09891e.YhJ/aJZOBwneOaFr%michiel@michielbuddingh.net> X-Mailer: Mutt http://www.mutt.org/ X-KeyID: 0xDDF51665 X-Website: http://www.datenfreihafen.org/ User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 1/2] lib/message: Add function to get maildir flags. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 19:52:54 -0000 Hello. On Sun, 2009-11-22 at 19:55, Michiel Buddingh' wrote: > Stefan Schmidt wrote: > > > This function should interpret the flags that it finds and return a > > > suitable set of notmuch tags. I'd suggest that 'unread' messages get > > > both 'unread' and 'inbox' tags, as Maildir doesn't distinguish between > > > 'don't show this to be by default again please' and 'I've read this > > > message'. It seems best to hide the maildir-specific details inside the > > > library instead of exposing them. > > > > Thanks for the review. On a second thought the interface was really a bit ugly. > > :) > > > > I'm just back to my box and going through the outstanding mails shows me that > > Michiel Buddingh has a more complete patch on the > > convert-maildir-flags-into-tags issue which Carl has tagged for review. Will > > wait what comes out of it and if anything is left for me to. :) > > Apologies. In my haste to cover up my appalling and incorrect first patch, I > neglected to review the archives to see if someone had already done this. Sorry > for stealing your thunder. No need to be sorry. I'm interestecd in having this itch scratched, but don't care who is doing it. :) Just go ahead and get it in after Carl's review. regards Stefan Schmidt From jeff@ocjtech.us Sun Nov 22 12:02:19 2009 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 3B41E431FBC for ; Sun, 22 Nov 2009 12:02:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 mx-X-cAs3Ja0 for ; Sun, 22 Nov 2009 12:02:18 -0800 (PST) Received: from mail-gx0-f221.google.com (mail-gx0-f221.google.com [209.85.217.221]) by olra.theworths.org (Postfix) with ESMTP id 96C75431FAE for ; Sun, 22 Nov 2009 12:02:18 -0800 (PST) Received: by gxk21 with SMTP id 21so4225202gxk.10 for ; Sun, 22 Nov 2009 12:02:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.90.22.17 with SMTP id 17mr301332agv.76.1258920138240; Sun, 22 Nov 2009 12:02:18 -0800 (PST) In-Reply-To: <87r5rqmq5j.fsf@kunyang.i-did-not-set--mail-host-address--so-tickle-me> References: <1258897630-22282-1-git-send-email-jeff@ocjtech.us> <20091122141501.GH17268@jukie.net> <935ead450911220800r47284335n301a2b2432638c72@mail.gmail.com> <87r5rqmq5j.fsf@kunyang.i-did-not-set--mail-host-address--so-tickle-me> Date: Sun, 22 Nov 2009 14:02:18 -0600 Message-ID: <935ead450911221202w58d41495q5eca4072ce343e49@mail.gmail.com> From: Jeffrey Ollie To: Jed Brown Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Not Much Mail Subject: Re: [notmuch] [PATCH] Add SCons build files. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 20:02:19 -0000 On Sun, Nov 22, 2009 at 11:21 AM, Jed Brown wrote: > > I can do a CMake build if that's desirable. =C2=A0While I prefer it to SC= ons, > particularly when config/build times are an issue and you want to have > several active build trees, it is a significantly heavier dependency. > With SCons, you can dump scons-local (a pure Python script) into the > source tree and then users only need Python. =C2=A0There are lots of othe= r > lightweight build tools. It would be interesting to compare SCons and CMake. CMake is probably more widely used since it's adoption by KDE but I like the fact that SCons build scripts are lightly camouflaged Python scripts. CMake's syntax has so far seemed to get in the way of me figuring out what I needed to do. While I prefer SCons, I wouldn't be unhappy if CMake was chosen. --=20 Jeff Ollie From five9a2@gmail.com Sun Nov 22 12:12:07 2009 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 BD173431FBC for ; Sun, 22 Nov 2009 12:12:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 k6pCVMZsbV1Y for ; Sun, 22 Nov 2009 12:12:07 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id E64D2431FAE for ; Sun, 22 Nov 2009 12:12:06 -0800 (PST) Received: by bwz24 with SMTP id 24so3485864bwz.30 for ; Sun, 22 Nov 2009 12:12:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer; bh=Zks5lvj6FulQ71zLxZ8ec62bCqVfNS8Wm0ku2SDDnbk=; b=OBoGgorNZMjmQA7CuheeH/UhCsYV739+jAW031mVOpLZj8trJIpgPOsdF6Oh+gEJlR NGnP8ZO2IzaNUwIZTBubr4b1oTWfh4LGxZatmoV2tcsaA+ur8EdJGlARr1/YY5HNqRfl eEreHLCdkUlS/I/rjCJUjC/8S5/YZjqoNXO+o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=iT2BDU8BI5ZaLFYl2U9FXj/CJ/YfaVT0Tj/H5zNRBDqq9a+nF+onHKjS9AuFscu8vU K2NtI4c+YHt9c4l4qSKT3faThDHmydROm7+jN1aFhnGWarOC3oL9td7uy907CY67mBCa /Plue/jRQk0pLfquU+0sBxdJxfO/Rvjjb4ZjQ= Received: by 10.204.13.207 with SMTP id d15mr2776921bka.157.1258920726066; Sun, 22 Nov 2009 12:12:06 -0800 (PST) Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 21sm4687387fkx.25.2009.11.22.12.12.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 12:12:05 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 21:12:16 +0100 Message-Id: <1258920736-14205-1-git-send-email-jed@59A2.org> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] New function notmuch-search-operate-all: operate on all messages in the current query. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 20:12:07 -0000 It is often convenient to change tags on several messages at once. This function applies any number of tag whitespace-delimited tag modifications to all messages matching the current query. I have bound this to `*'. Signed-off-by: Jed Brown --- notmuch.el | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/notmuch.el b/notmuch.el index a547415..b848e9a 100644 --- a/notmuch.el +++ b/notmuch.el @@ -764,6 +764,7 @@ thread from that buffer can be show when done with this one)." (define-key map (kbd "RET") 'notmuch-search-show-thread) (define-key map "+" 'notmuch-search-add-tag) (define-key map "-" 'notmuch-search-remove-tag) + (define-key map "*" 'notmuch-search-operate-all) (define-key map "<" 'beginning-of-buffer) (define-key map ">" 'notmuch-search-goto-last-thread) (define-key map "=" 'notmuch-search-refresh-view) @@ -940,6 +941,29 @@ This function advances point to the next line when finished." (notmuch-search-remove-tag "inbox") (forward-line)) +(defun notmuch-search-operate-all (action) + "Operate on all messages matching the current query. Any +number of whitespace separated actions can be given. Each action +must have one of the two forms + + +tagname Add the tag `tagname' + -tagname Remove the tag `tagname' + +Each character of the tag name may consist of alphanumeric +characters as well as `_.+-'. +" + (interactive "sOperation (+add -drop): notmuch tag ") + (let ((action-split (split-string action " +"))) + ;; Perform some validation + (let ((words action-split)) + (when (null words) (error "No operation given")) + (while words + (unless (string-match-p "^[\+\-][_\+\-\\w]+$" (car words)) + (error "Action must be of the form `+thistag -that_tag'")) + (setq words (cdr words)))) + (apply 'notmuch-call-notmuch-process "tag" + (append action-split (list notmuch-search-query-string) nil)))) + (defun notmuch-search (query &optional oldest-first) "Run \"notmuch search\" with the given query string and display results." (interactive "sNotmuch search: ") -- 1.6.5.3 From tassilo@member.fsf.org Sun Nov 22 12:24:53 2009 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 6B464431FBC for ; Sun, 22 Nov 2009 12:24:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 0hO0KuczQ4cT for ; Sun, 22 Nov 2009 12:24:51 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.195]) by olra.theworths.org (Postfix) with ESMTP id ED55B431FAE for ; Sun, 22 Nov 2009 12:24:50 -0800 (PST) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by mx.perfora.net (node=mxus1) with ESMTP (Nemesis) id 0LbtPg-1NvIOM26VQ-00jIhD for notmuch@notmuchmail.org; Sun, 22 Nov 2009 15:24:50 -0500 Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id E6237C18B9 for ; Sun, 22 Nov 2009 15:24:49 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Sun, 22 Nov 2009 15:24:49 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:subject:date:message-id:mime-version:content-type; s=smtpout; bh=tGbQhA5nIx44Z0q2ePYRbTtFR+c=; b=PyZoU4wGTDtzu7LWIzFm0z6AQ63H1exf2Inaju60XcL0XjBj+hZeuUQdDxByMTto1mnBm+CH8fodIRNdHyxZZjPBfk6k8ZjlXeiJhkC14NmGJTZti0AsKID69/B85oKRD9mamRLh9rOClPgbYqyMojJy2hoOhy6zpHGRGkgYUw0= X-Sasl-enc: zEM6NPG9lMjFBXSn41O4ZRwoqgUGGEyCSA3JPDmeArOi 1258921489 Received: from thinkpad.tsdh.de (p54AF3BEC.dip0.t-ipconnect.de [84.175.59.236]) by mail.messagingengine.com (Postfix) with ESMTPA id 03E8AC26F for ; Sun, 22 Nov 2009 15:24:48 -0500 (EST) From: Tassilo Horn To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 21:24:47 +0100 Message-ID: <877hti71f4.fsf@thinkpad.tsdh.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [notmuch] How to index /var/spool/mail with notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 20:24:53 -0000 Hi all, I'd like to try out notmuch. My mail setup is as follows: - I run a local IMAP server (dovecot) and access it using Gnus - Dovecot stores its mails in /var/spool/mail/ in some one file per message format But I get some permission problems when trying to index /var/spool/mail. I was able to create a .notmuch/ directory in there with permissions set to 700 for my user. All mail files are readable for my user. Unfortunately, there are some dovecot internal files, which should neither be indexed by notmuch, and which have 600 permissions for the mail user. And that's where notmuch errors and stops indexing. :-( All "real" mail files are named "u.", so it would be cool if I could provide a pattern to notmuch matching all files I'd like to index. And maybe the other way round (a blacklist pattern) would be useful, too. Any thoughts? Maybe there's a better approach for what I'm trying to do? Bye, Tassilo From bart@jukie.net Sun Nov 22 12:36:21 2009 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 78D6F431FBC for ; Sun, 22 Nov 2009 12:36:21 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 9vZ48Dv+oAg8 for ; Sun, 22 Nov 2009 12:36:20 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 571E5431FAE for ; Sun, 22 Nov 2009 12:36:20 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id B5529C00FBC; Sun, 22 Nov 2009 15:36:19 -0500 (EST) Date: Sun, 22 Nov 2009 15:36:19 -0500 From: Bart Trojanowski To: Jeffrey Ollie Message-ID: <20091122203619.GI17268@jukie.net> References: <1258897630-22282-1-git-send-email-jeff@ocjtech.us> <20091122141501.GH17268@jukie.net> <935ead450911220800r47284335n301a2b2432638c72@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <935ead450911220800r47284335n301a2b2432638c72@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Not Much Mail Subject: Re: [notmuch] [PATCH] Add SCons build files. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 20:36:21 -0000 My bad. I totally misread your introduction. * Jeffrey Ollie [091122 11:46]: > The SCons build files are not meant to require emacs. If I've messed > something up and emacs is somehow required I would consider that a bug > and would try to fix it. > > As far as availability, I'm sure that SCons is one yum or apt-get or > away. The only > people that would face more than a minor inconvenience are people that > prefer to download tarballs and compile and install things themselves. > > Yes, I'm sure that make is widely available, but as notmuch gets used > on a wider variety of systems some sort of configuration system will > become necessary. If I can prevent another project from going down > the autoconf/automake path I'll be happy. I started creating CMake > build files but I don't know CMake well enough to come up with a > working build. > > On 11/22/09, Bart Trojanowski wrote: > > * Jeffrey C. Ollie [091122 08:47]: > >> The SCons build files included here *should* do everything that the > >> current Makefiles do, plus a little bit of configuration checking. To > >> build/install: > > > > Wouldn't that have the unfortunate side effect of making notmuch > > unusable w/o emacs and scons installed? > > > > GNU make has a much wider install base, and notmuch is still very useful > > without emacs. > > > > -Bart > > > > -- > > WebSig: http://www.jukie.net/~bart/sig/ > > > > -- > Sent from my mobile device > > Jeff Ollie -- WebSig: http://www.jukie.net/~bart/sig/ From ingmar@exherbo.org Sun Nov 22 12:43:47 2009 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 747C5431FBC for ; Sun, 22 Nov 2009 12:43:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 eZsc7O2Nghsb for ; Sun, 22 Nov 2009 12:43:44 -0800 (PST) Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by olra.theworths.org (Postfix) with ESMTP id 8A6C9431FAE for ; Sun, 22 Nov 2009 12:43:44 -0800 (PST) Received: from [83.101.72.69] (helo=localhost) by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NCJHb-0003lo-PH for notmuch@notmuchmail.org; Sun, 22 Nov 2009 20:43:43 +0000 Content-Type: text/plain; charset=utf8 From: Ingmar Vanhassel To: notmuch In-reply-to: <1258897630-22282-1-git-send-email-jeff@ocjtech.us> References: <1258897630-22282-1-git-send-email-jeff@ocjtech.us> Date: Sun, 22 Nov 2009 21:43:42 +0100 Message-Id: <1258922325-sup-2830@cannonball> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Subject: Re: [notmuch] [PATCH] Add SCons build files. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 20:43:47 -0000 Personally I'd say we have better things to work on than maintaining multiple buildsystems for notmuch. Or than resolving possible packaging bugs originating in the use of different buildsystems. GNU has a very wide install bas, it's has a low footprint, and it happened to be the choice of the initial developers. All of this makes it the best choice imo. While I don't want to start a discussion on the merits of various buildsystems, I'll mention that, in my role as a packager, I'd choose just about anything over scons. My 2 cents, Ingmar -- Exherbo KDE, X.org maintainer From five9a2@gmail.com Sun Nov 22 12:47:43 2009 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 EE2C4431FBC for ; Sun, 22 Nov 2009 12:47:42 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 t9riJ-Vp1o4I for ; Sun, 22 Nov 2009 12:47:42 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 23A4D431FAE for ; Sun, 22 Nov 2009 12:47:42 -0800 (PST) Received: by bwz24 with SMTP id 24so3499606bwz.30 for ; Sun, 22 Nov 2009 12:47:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=OGJmKbqWsIQJ3c0dtPEUX7NiyXLMZKaXsdxZbgY9ouo=; b=GdX02w4a192xZEy3WVj2KGBAvd3vjwZ6RRFNQN5AINtV2Muk7VDch1svxE2nvzMjry 9nisyJDFYw409lCNzM3TzGT/hNcXq1LE30R5WQxuOFXzcmhNEzjZv++Xi7malcpO5bRU Ogj1d11x4EVpmxh11DmsSe9mGU3XWx9ddz68U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=jVfHD6OpFyD1uHqqC4m8YZho9xnhBus4R6HHqHnuSDbbCpDliQPbxjFpoIRFhprqIv b7HzWdO72M9KD5k6DM6wr5Ea7e2zWoDHLM2GGRW8PH/u/Ohy0Xi2/CiX4o5e6qZEwNg6 fxfY2F47/b8zuATXhUrWDpAPMiAxIEe03tfWA= Received: by 10.204.150.68 with SMTP id x4mr3820733bkv.151.1258922861205; Sun, 22 Nov 2009 12:47:41 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id f31sm4721393fkf.12.2009.11.22.12.47.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 12:47:39 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Tassilo Horn , notmuch@notmuchmail.org In-Reply-To: <877hti71f4.fsf@thinkpad.tsdh.de> References: <877hti71f4.fsf@thinkpad.tsdh.de> Date: Sun, 22 Nov 2009 21:48:10 +0100 Message-ID: <874oomb81h.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] How to index /var/spool/mail with notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 20:47:43 -0000 On Sun, 22 Nov 2009 21:24:47 +0100, Tassilo Horn wrote: > Hi all, > > I'd like to try out notmuch. My mail setup is as follows: > > - I run a local IMAP server (dovecot) and access it using Gnus > - Dovecot stores its mails in /var/spool/mail/ in some one file per > message format How about $ mkdir -p ~/mail/spool $ ln -s /var/spool/mail/$USER/{cur,new,tmp} ~/mail/spool and point notmuch at ~/mail (or specifically ~/mail/spool). Jed From tassilo@member.fsf.org Sun Nov 22 13:01:02 2009 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 9226C431FBC for ; Sun, 22 Nov 2009 13:01:02 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 lqFK9ZIBY0+G for ; Sun, 22 Nov 2009 13:01:01 -0800 (PST) X-Greylist: delayed 2171 seconds by postgrey-1.32 at olra; Sun, 22 Nov 2009 13:01:01 PST Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by olra.theworths.org (Postfix) with ESMTP id CA832431FAE for ; Sun, 22 Nov 2009 13:01:01 -0800 (PST) Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 72D13C11FD; Sun, 22 Nov 2009 16:01:01 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 22 Nov 2009 16:01:01 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:cc:subject:references:date:in-reply-to:message-id:mime-version:content-type; s=smtpout; bh=a8G8NOOIT1vqR/1ZwxHL3R4WvKs=; b=AkWsM250QdrKftIa5BIvOL5a08wj2gWqAmcabpMcWUz2p0/J8s6LFLrICPRD5eRNplkBQNxmOMVtr1EYUPW11N4ZA3dLhpkrwNgxjNiwWDyuVXN9s4kMrCnj3bSoueyvhWEPVbpJb/lpmSYKL9Yic81aRvH91Ltt2pjSDWKhlqI= X-Sasl-enc: QrcJhOzXo4jhRNXYZ3cj7fK2Cov9AvuWaYS+a+yXUypS 1258923660 Received: from thinkpad.tsdh.de (p54AF3BEC.dip0.t-ipconnect.de [84.175.59.236]) by mail.messagingengine.com (Postfix) with ESMTPA id 47F44124ED; Sun, 22 Nov 2009 16:00:59 -0500 (EST) From: Tassilo Horn To: Jed Brown References: <877hti71f4.fsf@thinkpad.tsdh.de> <874oomb81h.fsf@59A2.org> Date: Sun, 22 Nov 2009 22:00:58 +0100 In-Reply-To: <874oomb81h.fsf@59A2.org> (Jed Brown's message of "Sun, 22 Nov 2009 21:48:10 +0100") Message-ID: <873a466zqt.fsf@thinkpad.tsdh.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] How to index /var/spool/mail with notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 21:01:02 -0000 Jed Brown writes: Hi Jed, >> - I run a local IMAP server (dovecot) and access it using Gnus >> - Dovecot stores its mails in /var/spool/mail/ in some one file per >> message format > > How about > > $ mkdir -p ~/mail/spool > $ ln -s /var/spool/mail/$USER/{cur,new,tmp} ~/mail/spool > > and point notmuch at ~/mail (or specifically ~/mail/spool). Brilliant idea. :-) Ok, now it's indexing my 63000 mails. 10 minutes to go. Bye, Tassilo From jeff@ocjtech.us Sun Nov 22 13:17:25 2009 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 79735431FBC for ; Sun, 22 Nov 2009 13:17:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 3QkyGyRJVrLe for ; Sun, 22 Nov 2009 13:17:24 -0800 (PST) Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com [209.85.210.204]) by olra.theworths.org (Postfix) with ESMTP id D76BB431FAE for ; Sun, 22 Nov 2009 13:17:24 -0800 (PST) Received: by yxe42 with SMTP id 42so4939025yxe.22 for ; Sun, 22 Nov 2009 13:17:24 -0800 (PST) Received: by 10.150.239.1 with SMTP id m1mr7090623ybh.152.1258924644542; Sun, 22 Nov 2009 13:17:24 -0800 (PST) Received: from lt26923.campus.dmacc.edu ([69.57.47.215]) by mx.google.com with ESMTPS id 13sm1832751gxk.9.2009.11.22.13.17.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 13:17:24 -0800 (PST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by lt26923.campus.dmacc.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NCJo8-0004W0-Ph; Sun, 22 Nov 2009 15:17:21 -0600 From: "Jeffrey C. Ollie" To: Not Much Mail Date: Sun, 22 Nov 2009 15:17:11 -0600 Message-Id: <1258924631-17326-1-git-send-email-jeff@ocjtech.us> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Add install target for desktop files. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 21:17:25 -0000 Add an install target that uses desktop-file-install to install the desktop file in the appropriate location. The location of the install can be modified by changing the desktop_dir variable. Signed-off-by: Jeffrey C. Ollie --- Makefile.local | 4 ++++ configure | 1 + 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/Makefile.local b/Makefile.local index c87e0c4..2e7c3cd 100644 --- a/Makefile.local +++ b/Makefile.local @@ -45,5 +45,9 @@ install-emacs: install emacs install -m0644 notmuch.el $(DESTDIR)$(emacs_lispdir) install -m0644 notmuch.elc $(DESTDIR)$(emacs_lispdir) +install-desktop: + install -d $(DESTDIR)$(desktop_dir) + desktop-file-install --mode 0644 --dir $(DESTDIR)$(desktop_dir) notmuch.desktop + SRCS := $(SRCS) $(notmuch_client_srcs) CLEAN := $(CLEAN) notmuch $(notmuch_client_modules) notmuch.elc notmuch.1.gz diff --git a/configure b/configure index b4770ec..1198ba7 100755 --- a/configure +++ b/configure @@ -132,5 +132,6 @@ EOF cat > Makefile.config < 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 0CD29431FBC for ; Sun, 22 Nov 2009 13:26:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 GmCXGPkD46xC for ; Sun, 22 Nov 2009 13:26:03 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 0E391431FAE for ; Sun, 22 Nov 2009 13:26:02 -0800 (PST) Received: by bwz24 with SMTP id 24so3514164bwz.30 for ; Sun, 22 Nov 2009 13:26:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject:date :message-id:mime-version:content-type; bh=T9mmwMIomcZBJeF6aUkfTAqMt/Gx00wRsrX+IlUKGWY=; b=TXCI5+Epzh/y6F4Nm1JCgJLY1fTXXqTA2XYe13kfyWBnL49fC1inGrC3wFq8yDAXnS NtILLxla/sJw3+YAqObjOICxch5viLvo0x4HSv5jQ3shXs6B61R4/Z4Iz/lDPNLF4RSE gwQJH1vxzIFxZQ7doKRKwOsuTvotneJ5J53ks= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:mime-version:content-type; b=XCTheAy+ErfMPZQ2p7cbRuYFNBIjpXJioHJCs4A5owYONgJyrnyeuWhXjXJ4Bw8Vtr NjY1gbr5dyRYgx2W6VrteFZUsRNI88GjmRcVHvc3pgFpUATKCQpjbYrqY59JUm2XFZJQ lUlxbvcgw+k2Fz1Egq7We4lELbMpGfwfGw6hk= Received: by 10.204.34.3 with SMTP id j3mr3922509bkd.23.1258925161989; Sun, 22 Nov 2009 13:26:01 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id y15sm4767743fkd.56.2009.11.22.13.26.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 13:26:01 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 22:26:31 +0100 Message-ID: <87y6ly45fc.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [notmuch] [RFC] Precedence of OR and AND X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 21:26:04 -0000 Currently OR binds more weakly than AND, which is natural in most contexts, but I think it is rarely desirably for this sort of search. Suppose I am in looking at my inbox and decide to filter by term1 OR term2 Notmuch makes the query tag:inbox AND term1 OR term2 which is actually (tag:inbox AND term1) OR term2 and not at all what I wanted. Adding the necessary parentheses to notmuch-search-filter is trivial but it requires more parentheses for the overwhelming majority of searches that I think are more common. Are most searches indeed closer to conjunctive form? Should OR bind tighter than AND? Jed From bart@jukie.net Sun Nov 22 13:36:51 2009 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 659D7431FBC for ; Sun, 22 Nov 2009 13:36:51 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 g49ljrjUjW+A for ; Sun, 22 Nov 2009 13:36:50 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 56077431FAE for ; Sun, 22 Nov 2009 13:36:50 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id ABB23C02F86; Sun, 22 Nov 2009 16:36:49 -0500 (EST) Date: Sun, 22 Nov 2009 16:36:49 -0500 From: Bart Trojanowski To: Jed Brown Message-ID: <20091122213649.GJ17268@jukie.net> References: <87y6ly45fc.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87y6ly45fc.fsf@59A2.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [RFC] Precedence of OR and AND X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 21:36:51 -0000 Wouldn't this problem be solved by each filter appending a bracketed version of your filter? You start with tag:inbox and you filter on "term1 or term2" you'd get: tag:inbox and (term1 or term2) Doing it again would result in... tag:inbox and (term1 or term2) and (term3 or term4) To me, it would seem the most intuitive solution. Actually, I think I'll add that to notmuch.vim right now. :) -Bart * Jed Brown [091122 16:26]: > Currently OR binds more weakly than AND, which is natural in most > contexts, but I think it is rarely desirably for this sort of search. > Suppose I am in looking at my inbox and decide to filter by > > term1 OR term2 > > Notmuch makes the query > > tag:inbox AND term1 OR term2 > > which is actually > > (tag:inbox AND term1) OR term2 > > and not at all what I wanted. Adding the necessary parentheses to > notmuch-search-filter is trivial but it requires more parentheses for > the overwhelming majority of searches that I think are more common. > > Are most searches indeed closer to conjunctive form? > > Should OR bind tighter than AND? > > > Jed > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch -- WebSig: http://www.jukie.net/~bart/sig/ From five9a2@gmail.com Sun Nov 22 13:43:02 2009 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 9414C431FBC for ; Sun, 22 Nov 2009 13:43:02 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 mg8+gDTrObPY for ; Sun, 22 Nov 2009 13:43:02 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id C4C68431FAE for ; Sun, 22 Nov 2009 13:43:01 -0800 (PST) Received: by bwz24 with SMTP id 24so3520311bwz.30 for ; Sun, 22 Nov 2009 13:43:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=Up8WSQ3I+5AkvUH93VoUXlVKj/avtFfPWkGy422ePnU=; b=C4qFgr8pAWzICySfkveKL97jOXi02tKHdJJhXwhGJmypXJQbviC/Qx4APkz2tnjQ2N mTl6uKlWcGX6OvuhS2a6y+WkSZ1jxa0XB/i95WSwHy58sIGii9GlW5tJ5S9JFwY433R1 TQQ9urBU1sloHXhMs8G/6DDx4m+ZA7DS7ujug= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=a8Q8YKz0rA+BUWPH28fi0ESRE72gH5GAYeMCpidmwFxOhVlMcAZFDo+t7ZpMpzqzOl e9p99YQV5bDjKRCRnunZiDnm/ojocDfS6+A7dRJEkwIqt28qAEXqLJggr3uacX3UQ2oS PmkIEUY2dHPOLGnFj41MZrInStYLgw8hgUFIA= Received: by 10.204.2.131 with SMTP id 3mr1195110bkj.175.1258926180858; Sun, 22 Nov 2009 13:43:00 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id p17sm4750618fka.35.2009.11.22.13.42.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 13:42:59 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Bart Trojanowski In-Reply-To: <20091122213649.GJ17268@jukie.net> References: <87y6ly45fc.fsf@59A2.org> <20091122213649.GJ17268@jukie.net> Date: Sun, 22 Nov 2009 22:43:30 +0100 Message-ID: <87ws1i44n1.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [RFC] Precedence of OR and AND X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 21:43:02 -0000 On Sun, 22 Nov 2009 16:36:49 -0500, Bart Trojanowski wrote: > Wouldn't this problem be solved by each filter appending a bracketed > version of your filter? > > You start with tag:inbox and you filter on "term1 or term2" you'd get: > > tag:inbox and (term1 or term2) Absolutely, and I have this applied locally to notmuch.el, but I didn't fix notmuch-search-filter-by-tag because that would really need to parse the expression. I'm just asking if anyone else thinks binding OR tighter than AND would be desirable. Jed From djcb@djcbsoftware.nl Sun Nov 22 13:44:11 2009 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 37301431FBC for ; Sun, 22 Nov 2009 13:44:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 zg89UOz8yWSX for ; Sun, 22 Nov 2009 13:44:10 -0800 (PST) Received: from gw01.mail.saunalahti.fi (gw01.mail.saunalahti.fi [195.197.172.115]) by olra.theworths.org (Postfix) with ESMTP id 3EF75431FAE for ; Sun, 22 Nov 2009 13:44:10 -0800 (PST) Received: from djcbsoftware.nl (a88-112-254-208.elisa-laajakaista.fi [88.112.254.208]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by gw01.mail.saunalahti.fi (Postfix) with ESMTP id 12B3E151060; Sun, 22 Nov 2009 23:44:06 +0200 (EET) Received: from cthulhu.mindcrime.djcbsoftware.nl (localhost [127.0.0.1]) by djcbsoftware.nl (Postfix) with ESMTP id BBB94456001; Sun, 22 Nov 2009 23:44:05 +0200 (EET) Date: Sun, 22 Nov 2009 23:44:05 +0200 Message-ID: <87aayexmje.wl%djcb@djcbsoftware.nl> From: Dirk-Jan C. Binnema To: Michiel Buddingh' In-Reply-To: <4b096024.f5WEZqYlMxgYs/o1%michiel@michielbuddingh.net> References: <87fx8bygi7.fsf@linux.vnet.ibm.com> <87bpiv4t9h.fsf@yoom.home.cworth.org> <87y6lz39nd.fsf@yoom.home.cworth.org> <20091121221207.GB17268@jukie.net> <9cce5525b093b87fe74d427954ffad89@localhost> <87d43b2oif.fsf@yoom.home.cworth.org> <9bfdedddeab9c58cd45d8d448323d0fc@localhost> <87vdh2n7y2.wl%djcb@djcbsoftware.nl> <4b096024.f5WEZqYlMxgYs/o1%michiel@michielbuddingh.net> Mail-Reply-To: djcb@djcbsoftware.nl User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.1 Mule/6.0 (HANACHIRUSATO) Organization: DJCBSoftware MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: "notmuch@notmuchmail.org" Subject: Re: [notmuch] [PATCH] notmuch: Add Maildir directory name as tag name for messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: djcb@djcbsoftware.nl 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, 22 Nov 2009 21:44:11 -0000 Hi Michiel, >>>>> "MB" == Michiel Buddingh' writes: MB> Dirk-Jan C. Binnema wrote: Michiel> + Michiel> +static void Michiel> +derive_tags_from_maildir_flags (notmuch_message_t Michiel> *message, const char * Michiel> path) >> >> I see you don't handle the "N" -- is that deliberate? Also, a >> minor addition may to also allow for '!' instead of ':' as a >> separator, as that's the semi-official way to use Maildirs on >> (V)FAT filesystems (which don't allow for colons in filenames). MB> Not deliberate. Simply unaware of the "N" flag, nor aware of MB> practices for storing Maildirs on (V)FAT. Ah, you are right. In my code, http://gitorious.org/mu/mainline/blobs/master/msg/mu-msg-flags.c I handled it because apparently some programs where using that. But I guess it's better to stick to DJB's Maildir spec for now... Regarding the VFAT-limitations, see eg. the Note in: http://docs.python.org/lib/mailbox-maildir.html anyway, a minor point. Best wishes, Dirk. -- Dirk-Jan C. Binnema Helsinki, Finland e:djcb@djcbsoftware.nl w:www.djcbsoftware.nl pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C From bart@jukie.net Sun Nov 22 13:47:46 2009 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 BED64431FBC for ; Sun, 22 Nov 2009 13:47:46 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 qWxUa7ZDkW9l for ; Sun, 22 Nov 2009 13:47:46 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 08147431FAE for ; Sun, 22 Nov 2009 13:47:46 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id 8B990C02F86; Sun, 22 Nov 2009 16:47:45 -0500 (EST) Date: Sun, 22 Nov 2009 16:47:45 -0500 From: Bart Trojanowski To: Jed Brown Message-ID: <20091122214745.GK17268@jukie.net> References: <87y6ly45fc.fsf@59A2.org> <20091122213649.GJ17268@jukie.net> <87ws1i44n1.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ws1i44n1.fsf@59A2.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [RFC] Precedence of OR and AND X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 21:47:46 -0000 * Jed Brown [091122 16:43]: > Absolutely, and I have this applied locally to notmuch.el, but I didn't > fix notmuch-search-filter-by-tag because that would really need to parse > the expression. I'm just asking if anyone else thinks binding OR > tighter than AND would be desirable. Maybe some of the ambiguity would go away if we used && and || instead of AND and OR. Then no matter the default, we could distinguish if someone meant 2 or 3 tags when they typed in 'foo and bar'. -Bart -- WebSig: http://www.jukie.net/~bart/sig/ From tassilo@member.fsf.org Sun Nov 22 13:48:56 2009 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 38F83431FBC for ; Sun, 22 Nov 2009 13:48:56 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 vLmlIOJp9Omm for ; Sun, 22 Nov 2009 13:48:55 -0800 (PST) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by olra.theworths.org (Postfix) with ESMTP id 7CE19431FAE for ; Sun, 22 Nov 2009 13:48:55 -0800 (PST) Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 0DB3DC19AD for ; Sun, 22 Nov 2009 16:48:55 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Sun, 22 Nov 2009 16:48:55 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:subject:date:message-id:mime-version:content-type; s=smtpout; bh=ZfKAlfSrTkwxR6yXxjDmSjaW8jI=; b=StRLL94Ld75BW0bElfk/lLQVZVDbfCbyyxepg+k2SzuOy2iCcDqi12A9+en5qF1ZiUaaLh+10x2v5VOWetnCu4yBa+zSY7PBaEkEcaHibjihCnZTB0Yn4bcUEt94iJUgBqnD2TbZYAP839AJAXxa7wzHoXhrUcFj/HufDkdM7gU= X-Sasl-enc: 7dspNCsDbKrvTs9/kLOhlTdtRvEa0aGk7CRCJMZOJaBZ 1258926534 Received: from thinkpad.tsdh.de (p54AF3BEC.dip0.t-ipconnect.de [84.175.59.236]) by mail.messagingengine.com (Postfix) with ESMTPA id 1F5EA2C2D5 for ; Sun, 22 Nov 2009 16:48:53 -0500 (EST) From: Tassilo Horn To: notmuch@notmuchmail.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Mail-Copies-To: never Date: Sun, 22 Nov 2009 22:48:52 +0100 Message-ID: <87einqut6j.fsf@thinkpad.tsdh.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [notmuch] Catching up unread messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 21:48:56 -0000 Hi! I got notmuch running, and it's absolutely incredible. It's so damn fast and the results are very good. So thanks a lot for creating this nice piece of software. :-) Ok, so new the question: I indexed all my 63.000 mails, and because it was a first-time indexing, all my mail now has the tags inbox and unread. Of course, I don't want to SPC through all threads (using the great emacs interface) to remove the unread status. So is there some catchup command, which marks all messages in the buffer as read? BTW, what's the intention of the inbox tag? When I've read a thread, both inbox as well as unread disappear, so I don't get the difference between them. Bye, Tassilo From bart@jukie.net Sun Nov 22 13:52:03 2009 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 092E8431FBC for ; Sun, 22 Nov 2009 13:52:03 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 WSg8S56TSDeT for ; Sun, 22 Nov 2009 13:52:02 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 499E7431FAE for ; Sun, 22 Nov 2009 13:52:02 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id C28DBC02F86; Sun, 22 Nov 2009 16:52:01 -0500 (EST) Date: Sun, 22 Nov 2009 16:52:01 -0500 From: Bart Trojanowski To: Tassilo Horn Message-ID: <20091122215201.GL17268@jukie.net> References: <87einqut6j.fsf@thinkpad.tsdh.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87einqut6j.fsf@thinkpad.tsdh.de> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Catching up unread messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 21:52:03 -0000 * Tassilo Horn [091122 16:49]: > Ok, so new the question: I indexed all my 63.000 mails, and because it > was a first-time indexing, all my mail now has the tags inbox and > unread. Of course, I don't want to SPC through all threads (using the > great emacs interface) to remove the unread status. So is there some > catchup command, which marks all messages in the buffer as read? notmuch tag -unread -- tag:unread -Bart -- WebSig: http://www.jukie.net/~bart/sig/ From five9a2@gmail.com Sun Nov 22 13:57:03 2009 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 26C98431FBC for ; Sun, 22 Nov 2009 13:57:03 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ovIkI4dWtbur for ; Sun, 22 Nov 2009 13:57:02 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 2C54E431FAE for ; Sun, 22 Nov 2009 13:57:02 -0800 (PST) Received: by bwz24 with SMTP id 24so3525712bwz.30 for ; Sun, 22 Nov 2009 13:57:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=PfNpGE8cHU4kIQobr3aTeNvEUAY1ByLtKXV0tGYHjS4=; b=vdpnl3WcHAkfInEoQhM/u/XFh5Mx3JO60LhanPI8aFJ1Dk5I+d+/NWabuHSbw0DXQH 1fsVZxCjaF0UscewkX/IilnCawISlNwFbpiy2RnUrvOLA66lonFe/9bOH59GOJckZ1Ya Q/v7tgp83OfKZkaW0CdhL1gGNNfP0syS7NjHA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=ABzmzYM5bMKXjrIM3XoQrvRWp0dVXIwBgwRDt5kmIGK1uZdnDXhisxAp6SlwF1m9W5 8ZZ51OkUOi+e8pRSiuXywBMMq9txh6iEySZ+eNV4epfRVPwo8y7X2BhqtM3a1jb771rV mjxy0f7XzwzvFTT/IsivkO4oPUCf+0SAyFjuk= Received: by 10.204.15.16 with SMTP id i16mr3940122bka.72.1258927021420; Sun, 22 Nov 2009 13:57:01 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id f31sm4777495fkf.42.2009.11.22.13.56.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 13:57:00 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Tassilo Horn , notmuch@notmuchmail.org In-Reply-To: <87einqut6j.fsf@thinkpad.tsdh.de> References: <87einqut6j.fsf@thinkpad.tsdh.de> Date: Sun, 22 Nov 2009 22:57:30 +0100 Message-ID: <87vdh243zp.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Catching up unread messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 21:57:03 -0000 On Sun, 22 Nov 2009 22:48:52 +0100, Tassilo Horn wrote: > Ok, so new the question: I indexed all my 63.000 mails, and because it > was a first-time indexing, all my mail now has the tags inbox and > unread. Of course, I don't want to SPC through all threads (using the > great emacs interface) to remove the unread status. So is there some > catchup command, which marks all messages in the buffer as read? With this patch <1258920736-14205-1-git-send-email-jed@59A2.org> you would do * -inbox or * -inbox -unread On the command line, you can clear it with $ notmuch tag -inbox tag:inbox > BTW, what's the intention of the inbox tag? When I've read a thread, > both inbox as well as unread disappear, so I don't get the difference > between them. That is because SPC is bound to notmuch-show-advance-marking-read-and-archiving which removes both tags. The idea is that you can clear your inbox while retaining unread status, or leave something important in your inbox even though you have read it. Jed From jrollins@finestructure.net Sun Nov 22 13:58:32 2009 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 74095431FC4 for ; Sun, 22 Nov 2009 13:58:32 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 S95sWqoc0-k8 for ; Sun, 22 Nov 2009 13:58:31 -0800 (PST) X-Greylist: delayed 105285 seconds by postgrey-1.32 at olra; Sun, 22 Nov 2009 13:58:31 PST Received: from tarap.cc.columbia.edu (tarap.cc.columbia.edu [128.59.29.7]) by olra.theworths.org (Postfix) with ESMTP id A88B2431FAE for ; Sun, 22 Nov 2009 13:58:31 -0800 (PST) Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com [72.227.128.66]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by tarap.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id nAMLwUTn009370 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Sun, 22 Nov 2009 16:58:31 -0500 (EST) Received: from jrollins by servo.finestructure.net with local (Exim 4.69) (envelope-from ) id 1NCKSE-0000Gt-IZ; Sun, 22 Nov 2009 16:58:46 -0500 From: Jameson Graef Rollins To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 16:58:35 -0500 Message-Id: <1258927116-528-2-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.6.5 In-Reply-To: <1258927116-528-1-git-send-email-jrollins@finestructure.net> References: <1258927116-528-1-git-send-email-jrollins@finestructure.net> X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.65 on 128.59.29.7 Subject: [notmuch] [PATCH 2/3] modify notmuch_setup_command to return 1 if config file write fails. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 21:58:32 -0000 This fixes a small bug in notmuch_setup_command such that it returned OK and output the setup message footer even if the config file write step failed. --- notmuch-setup.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/notmuch-setup.c b/notmuch-setup.c index 482efd2..68788e1 100644 --- a/notmuch-setup.c +++ b/notmuch-setup.c @@ -155,10 +155,11 @@ notmuch_setup_command (unused (void *ctx), notmuch_config_set_database_path (config, absolute_path); } - notmuch_config_save (config); - - if (is_new) - welcome_message_post_setup (); - - return 0; + if (! notmuch_config_save (config)) { + if (is_new) + welcome_message_post_setup (); + return 0; + } else { + return 1; + } } -- 1.6.5 From jrollins@finestructure.net Sun Nov 22 13:58:33 2009 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 4D103431FC4 for ; Sun, 22 Nov 2009 13:58:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 nETV2SM5CDCj for ; Sun, 22 Nov 2009 13:58:32 -0800 (PST) Received: from brinza.cc.columbia.edu (brinza.cc.columbia.edu [128.59.29.8]) by olra.theworths.org (Postfix) with ESMTP id F0C5F431FBF for ; Sun, 22 Nov 2009 13:58:31 -0800 (PST) Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com [72.227.128.66]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by brinza.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id nAMLwUGZ018108 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Sun, 22 Nov 2009 16:58:31 -0500 (EST) Received: from jrollins by servo.finestructure.net with local (Exim 4.69) (envelope-from ) id 1NCKSE-0000Gy-L0; Sun, 22 Nov 2009 16:58:46 -0500 From: Jameson Graef Rollins To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 16:58:36 -0500 Message-Id: <1258927116-528-3-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.6.5 In-Reply-To: <1258927116-528-2-git-send-email-jrollins@finestructure.net> References: <1258927116-528-1-git-send-email-jrollins@finestructure.net> <1258927116-528-2-git-send-email-jrollins@finestructure.net> X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.65 on 128.59.29.8 Subject: [notmuch] [PATCH 3/3] change config file location to be ~/.notmuch/config X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 21:58:33 -0000 This change creates a ~/.notmuch config directory where the config file is stored when created with the "setup" command. The use of a ~/.notmuch config directory creates one place where all notmuch config files and data can be stored, which will greatly simplify managing notmuch, and reduce cluter of user dot files. --- notmuch-config.c | 21 ++++++++++++++++++--- notmuch-setup.c | 2 +- notmuch.1 | 4 ++-- notmuch.c | 2 +- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/notmuch-config.c b/notmuch-config.c index 7252a19..321c880 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -22,9 +22,11 @@ #include #include +#include +#include static const char toplevel_config_comment[] = - " .notmuch-config - Configuration file for the notmuch mail system\n" + " .notmuch/config - Configuration file for the notmuch mail system\n" "\n" " For more information about notmuch, see http://notmuchmail.org"; @@ -134,7 +136,7 @@ get_username_from_passwd_file (void *ctx) /* Open the named notmuch configuration file. A filename of NULL will * be interpreted as the default configuration file - * ($HOME/.notmuch-config). + * ($HOME/.notmuch/config). * * If any error occurs, (out of memory, or a permission-denied error, * etc.), this function will print a message to stderr and return @@ -183,7 +185,7 @@ notmuch_config_open (void *ctx, if (filename) config->filename = talloc_strdup (config, filename); else - config->filename = talloc_asprintf (config, "%s/.notmuch-config", + config->filename = talloc_asprintf (config, "%s/.notmuch/config", getenv ("HOME")); config->key_file = g_key_file_new (); @@ -297,14 +299,27 @@ notmuch_config_save (notmuch_config_t *config) { size_t length; char *data; + char buf[256]; GError *error = NULL; + struct stat statbuf; + data = g_key_file_to_data (config->key_file, &length, NULL); if (data == NULL) { fprintf (stderr, "Out of memory.\n"); return 1; } + /* Create config directory if it doesn't already exist */ + snprintf(buf, sizeof buf, "%s", config->filename); + dirname(buf); + if (stat(buf, &statbuf) < 0) { + if (mkdir(buf, 0755) < 0) { + fprintf (stderr, "Could not create directory '%s'\n.", buf); + return 1; + } + } + if (! g_file_set_contents (config->filename, data, length, &error)) { fprintf (stderr, "Error saving configuration to %s: %s\n", config->filename, error->message); diff --git a/notmuch-setup.c b/notmuch-setup.c index 68788e1..76e104c 100644 --- a/notmuch-setup.c +++ b/notmuch-setup.c @@ -74,7 +74,7 @@ welcome_message_post_setup (void) { printf ("\n" "Notmuch is now configured, and the configuration settings are saved in\n" -"a file in your home directory named .notmuch-config . If you'd like to\n" +"a file in your home directory named .notmuch/config . If you'd like to\n" "change the configuration in the future, you can either edit that file\n" "directly or run \"notmuch setup\".\n\n" diff --git a/notmuch.1 b/notmuch.1 index 8a3fb40..9ea1d42 100644 --- a/notmuch.1 +++ b/notmuch.1 @@ -53,7 +53,7 @@ Interactively sets up notmuch for first use. The setup command will prompt for your full name, your primary email address, any alternate email addresses you use, and the directory containing your email archives. Your answers will be written to a -configuration file in ${HOME}/.notmuch-config . This configuration +configuration file in ${HOME}/.notmuch/config . This configuration file will be created with descriptive comments, making it easy to edit by hand later to change the configuration. Or you can run .B "notmuch setup" @@ -245,7 +245,7 @@ takes an existing set of messages and constructs a suitable mail template. The Reply-to header (if any, otherwise From:) is used for the To: address. Vales from the To: and Cc: headers are copied, but not including any of the current user's email addresses (as configured -in primary_mail or other_email in the .notmuch-config file) in the +in primary_mail or other_email in the .notmuch/config file) in the recipient list It also builds a suitable new subject, including Re: at the front (if diff --git a/notmuch.c b/notmuch.c index 5cc8e4c..2d19a91 100644 --- a/notmuch.c +++ b/notmuch.c @@ -98,7 +98,7 @@ command_t commands[] = { "\t\tThe setup command will prompt for your full name, your primary\n" "\t\temail address, any alternate email addresses you use, and the\n" "\t\tdirectory containing your email archives. Your answers will be\n" - "\t\twritten to a configuration file in ${HOME}/.notmuch-config .\n" + "\t\twritten to a configuration file in ${HOME}/.notmuch/config .\n" "\n" "\t\tThis configuration file will be created with descriptive\n" "\t\tcomments, making it easy to edit by hand later to change the\n" -- 1.6.5 From jrollins@finestructure.net Sun Nov 22 13:58:35 2009 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 0AF84431FAE for ; Sun, 22 Nov 2009 13:58:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 DCzWMKQYzxR1 for ; Sun, 22 Nov 2009 13:58:31 -0800 (PST) Received: from serrano.cc.columbia.edu (serrano.cc.columbia.edu [128.59.29.6]) by olra.theworths.org (Postfix) with ESMTP id B5089431FBC for ; Sun, 22 Nov 2009 13:58:31 -0800 (PST) Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com [72.227.128.66]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by serrano.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id nAMLwU2X012274 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Sun, 22 Nov 2009 16:58:31 -0500 (EST) Received: from jrollins by servo.finestructure.net with local (Exim 4.69) (envelope-from ) id 1NCKSE-0000Gq-Fn; Sun, 22 Nov 2009 16:58:46 -0500 From: Jameson Graef Rollins To: notmuch@notmuchmail.org Date: Sun, 22 Nov 2009 16:58:34 -0500 Message-Id: <1258927116-528-1-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.6.5 X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.65 on 128.59.29.6 Subject: [notmuch] [PATCH 1/3] remove Makefile.config from source to allow for custom config. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 21:58:35 -0000 Modified ./configure script to generate a Makefile.config if it doesn't exist. This will allow people to maintain custom Makefile.config files without causing conflicts with the repository. --- Makefile.config | 2 -- configure | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) delete mode 100644 Makefile.config diff --git a/Makefile.config b/Makefile.config deleted file mode 100644 index d72a39e..0000000 --- a/Makefile.config +++ /dev/null @@ -1,2 +0,0 @@ -prefix = /usr/local -bash_completion_dir = /etc/bash_completion.d diff --git a/configure b/configure index fe46c8e..c63f70d 100755 --- a/configure +++ b/configure @@ -109,6 +109,14 @@ configure again to ensure the packages can be found, or simply run EOF exit 1 else + +if [ ! -e Makefile.config ] ; then + cat <Makefile.config +prefix = /usr/local +bash_completion_dir = /etc/bash_completion.d +EOF +fi + cat < 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 1487D431FBC for ; Sun, 22 Nov 2009 14:15:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 boAmWp69TsEK for ; Sun, 22 Nov 2009 14:15:08 -0800 (PST) Received: from tarap.cc.columbia.edu (tarap.cc.columbia.edu [128.59.29.7]) by olra.theworths.org (Postfix) with ESMTP id 1D685431FAE for ; Sun, 22 Nov 2009 14:15:08 -0800 (PST) Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com [72.227.128.66]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by tarap.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id nAMMF75B011840 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Sun, 22 Nov 2009 17:15:07 -0500 (EST) Received: from jrollins by servo.finestructure.net with local (Exim 4.69) (envelope-from ) id 1NCKiJ-0004jG-5H for notmuch@notmuchmail.org; Sun, 22 Nov 2009 17:15:23 -0500 Date: Sun, 22 Nov 2009 17:15:23 -0500 From: Jameson Graef Rollins To: notmuch@notmuchmail.org Message-ID: <20091122221523.GA8703@finestructure.net> References: <1258927116-528-1-git-send-email-jrollins@finestructure.net> <1258927116-528-2-git-send-email-jrollins@finestructure.net> <1258927116-528-3-git-send-email-jrollins@finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline In-Reply-To: <1258927116-528-3-git-send-email-jrollins@finestructure.net> User-Agent: Mutt/1.5.20 (2009-06-14) X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.65 on 128.59.29.7 Subject: Re: [notmuch] [PATCH 3/3] change config file location to be ~/.notmuch/config X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 22:15:09 -0000 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, folks. I wanted to comment on this patch request. I personally think it makes a lot of sense to use config directories. This makes things much neater, since all config files can be kept in one place without clutter the config name space. I can imagine down the line that there may be more notmuch config files, and it would be nicer to have a config directory rather than a bunch of ~/.notmuch-* files in the user dot file config space. I also imagine this config directory as a place to store the notmuch database files. I would rather keep all the notmuch data and config files together in one place, and keep my mail directories completely untouched (only read) by notmuch, if possible. I realize, however, there is a transition problem associated with moving the config file, which is why I propose it be moved sooner rather than later. If folks are interested in this change, and are worried about transition even at this early stage, we can try to come up with some smoother transition code. Finally, I am (maybe clearly) *not* particularly adept at c programming. I'm still learning. I think I already have better ways to improve this patch. I will try to make some improvements and send those along as well. jamie. PS. I'm sure this has already been discussed on the list, but if this is not the best way to send patches, please let me know. I would be happy to send a pointer to my notmuch git repo if it would be preferable to just pull from it directly. On Sun, Nov 22, 2009 at 04:58:36PM -0500, Jameson Graef Rollins wrote: > This change creates a ~/.notmuch config directory where the config > file is stored when created with the "setup" command. The use of a > ~/.notmuch config directory creates one place where all notmuch config > files and data can be stored, which will greatly simplify managing > notmuch, and reduce cluter of user dot files. > --- > notmuch-config.c | 21 ++++++++++++++++++--- > notmuch-setup.c | 2 +- > notmuch.1 | 4 ++-- > notmuch.c | 2 +- > 4 files changed, 22 insertions(+), 7 deletions(-) >=20 > diff --git a/notmuch-config.c b/notmuch-config.c > index 7252a19..321c880 100644 > --- a/notmuch-config.c > +++ b/notmuch-config.c > @@ -22,9 +22,11 @@ > =20 > #include > #include > +#include > +#include > =20 > static const char toplevel_config_comment[] =3D > - " .notmuch-config - Configuration file for the notmuch mail system\n" > + " .notmuch/config - Configuration file for the notmuch mail system\n" > "\n" > " For more information about notmuch, see http://notmuchmail.org"; > =20 > @@ -134,7 +136,7 @@ get_username_from_passwd_file (void *ctx) > =20 > /* Open the named notmuch configuration file. A filename of NULL will > * be interpreted as the default configuration file > - * ($HOME/.notmuch-config). > + * ($HOME/.notmuch/config). > * > * If any error occurs, (out of memory, or a permission-denied error, > * etc.), this function will print a message to stderr and return > @@ -183,7 +185,7 @@ notmuch_config_open (void *ctx, > if (filename) > config->filename =3D talloc_strdup (config, filename); > else > - config->filename =3D talloc_asprintf (config, "%s/.notmuch-config", > + config->filename =3D talloc_asprintf (config, "%s/.notmuch/config", > getenv ("HOME")); > =20 > config->key_file =3D g_key_file_new (); > @@ -297,14 +299,27 @@ notmuch_config_save (notmuch_config_t *config) > { > size_t length; > char *data; > + char buf[256]; > GError *error =3D NULL; > =20 > + struct stat statbuf; > + > data =3D g_key_file_to_data (config->key_file, &length, NULL); > if (data =3D=3D NULL) { > fprintf (stderr, "Out of memory.\n"); > return 1; > } > =20 > + /* Create config directory if it doesn't already exist */ > + snprintf(buf, sizeof buf, "%s", config->filename); > + dirname(buf); > + if (stat(buf, &statbuf) < 0) { > + if (mkdir(buf, 0755) < 0) { > + fprintf (stderr, "Could not create directory '%s'\n.", buf); > + return 1; > + } > + } > + > if (! g_file_set_contents (config->filename, data, length, &error)) { > fprintf (stderr, "Error saving configuration to %s: %s\n", > config->filename, error->message); > diff --git a/notmuch-setup.c b/notmuch-setup.c > index 68788e1..76e104c 100644 > --- a/notmuch-setup.c > +++ b/notmuch-setup.c > @@ -74,7 +74,7 @@ welcome_message_post_setup (void) > { > printf ("\n" > "Notmuch is now configured, and the configuration settings are saved in\= n" > -"a file in your home directory named .notmuch-config . If you'd like to\= n" > +"a file in your home directory named .notmuch/config . If you'd like to\= n" > "change the configuration in the future, you can either edit that file\n" > "directly or run \"notmuch setup\".\n\n" > =20 > diff --git a/notmuch.1 b/notmuch.1 > index 8a3fb40..9ea1d42 100644 > --- a/notmuch.1 > +++ b/notmuch.1 > @@ -53,7 +53,7 @@ Interactively sets up notmuch for first use. > The setup command will prompt for your full name, your primary email > address, any alternate email addresses you use, and the directory > containing your email archives. Your answers will be written to a > -configuration file in ${HOME}/.notmuch-config . This configuration > +configuration file in ${HOME}/.notmuch/config . This configuration > file will be created with descriptive comments, making it easy to edit > by hand later to change the configuration. Or you can run > .B "notmuch setup" > @@ -245,7 +245,7 @@ takes an existing set of messages and constructs a su= itable mail > template. The Reply-to header (if any, otherwise From:) is used for > the To: address. Vales from the To: and Cc: headers are copied, but > not including any of the current user's email addresses (as configured > -in primary_mail or other_email in the .notmuch-config file) in the > +in primary_mail or other_email in the .notmuch/config file) in the > recipient list > =20 > It also builds a suitable new subject, including Re: at the front (if > diff --git a/notmuch.c b/notmuch.c > index 5cc8e4c..2d19a91 100644 > --- a/notmuch.c > +++ b/notmuch.c > @@ -98,7 +98,7 @@ command_t commands[] =3D { > "\t\tThe setup command will prompt for your full name, your primar= y\n" > "\t\temail address, any alternate email addresses you use, and the= \n" > "\t\tdirectory containing your email archives. Your answers will b= e\n" > - "\t\twritten to a configuration file in ${HOME}/.notmuch-config .\= n" > + "\t\twritten to a configuration file in ${HOME}/.notmuch/config .\= n" > "\n" > "\t\tThis configuration file will be created with descriptive\n" > "\t\tcomments, making it easy to edit by hand later to change the\= n" > --=20 > 1.6.5 >=20 --uAKRQypu60I7Lcqm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: attachment -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJLCbf4AAoJEO00zqvie6q8gl4QAIUeXQmy6Eu4bc5+rV48Svuy OodWNGV4huvUQA3TM4DEBift95Pm6gcnULbvr7u7frwNXYcbn4DgFgWuze7QpBhD apBe7W90Mrkm6rCOU1z4TUbhHQpl1OTc/Yz9dK8HWSdZwB2EG15D1MwdCrVudrNd LSaZGoZZyhMoCH/ztgvCH9IGaqBCrIUZ6dutaa0IVb23DH0u44A8XqEHbBudQdGV OwrknJH8SAv2JiHq74goN+AtblLhMUdltoBZTr9bZJ/t50/s9syG2uEi1wTrqcfN /DAOmKk26WG2gI/IqSlcQSQodVO493OLNwkxNsPB2KuXf28m81kFiL4vVYgRPj6s 5V8mJGLXtfJvrYVUGBpDj0BeYODaXI0NpXZ6PgE3vIYLGF+zI2TDePvEcOpfn8ZF Gx/OOHWlty/2YReQqmYs4lVKA+JB5f+K7EaGyH2mbg6g/D2D9suWk5wpNbYBrxEp DpUBxQO5G70TqVwJJxBRDp9gDKjrU1Ug25xu45+LmEYbRlA90x9tQJezcJPTOY/F VU592vxaosYMfm+xl4YlX6V7d7SZbGhiYq2rGgwqR/5rTLwroq+4nIU1Y0jcyAwp dHGrJhJSfB9CjmPHrmWswM8SpA3Vzg80EgBFMWjjp87d9FJgPpT9vAfXZb2LZhhW pVdclc4G7qnZO3BoCgQI =8STB -----END PGP SIGNATURE----- --uAKRQypu60I7Lcqm-- From bart@jukie.net Sun Nov 22 14:24:56 2009 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 52DE9431FBC for ; Sun, 22 Nov 2009 14:24:56 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 CPPa7KW73EYF for ; Sun, 22 Nov 2009 14:24:55 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 68C83431FAE for ; Sun, 22 Nov 2009 14:24:54 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id E92D0C035FB; Sun, 22 Nov 2009 17:24:53 -0500 (EST) Date: Sun, 22 Nov 2009 17:24:53 -0500 From: Bart Trojanowski To: Jameson Graef Rollins Message-ID: <20091122222453.GM17268@jukie.net> References: <1258927116-528-1-git-send-email-jrollins@finestructure.net> <1258927116-528-2-git-send-email-jrollins@finestructure.net> <1258927116-528-3-git-send-email-jrollins@finestructure.net> <20091122221523.GA8703@finestructure.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091122221523.GA8703@finestructure.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 3/3] change config file location to be ~/.notmuch/config X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 22:24:56 -0000 I totally agree with Jamie about the config rename. I don't know if I agree with the database location change... but I might just need some convincing. Would it be enough to just read .notmuch/config and fall back to .notmuch-config otherwise? -Bart * Jameson Graef Rollins [091122 17:15]: > Hi, folks. I wanted to comment on this patch request. > > I personally think it makes a lot of sense to use config directories. > This makes things much neater, since all config files can be kept in > one place without clutter the config name space. I can imagine down > the line that there may be more notmuch config files, and it would be > nicer to have a config directory rather than a bunch of ~/.notmuch-* > files in the user dot file config space. > > I also imagine this config directory as a place to store the notmuch > database files. I would rather keep all the notmuch data and config > files together in one place, and keep my mail directories completely > untouched (only read) by notmuch, if possible. > > I realize, however, there is a transition problem associated with > moving the config file, which is why I propose it be moved sooner > rather than later. If folks are interested in this change, and are > worried about transition even at this early stage, we can try to come > up with some smoother transition code. > > Finally, I am (maybe clearly) *not* particularly adept at c > programming. I'm still learning. I think I already have better ways > to improve this patch. I will try to make some improvements and send > those along as well. > > jamie. > > PS. I'm sure this has already been discussed on the list, but if this > is not the best way to send patches, please let me know. I would be > happy to send a pointer to my notmuch git repo if it would be > preferable to just pull from it directly. > > > On Sun, Nov 22, 2009 at 04:58:36PM -0500, Jameson Graef Rollins wrote: > > This change creates a ~/.notmuch config directory where the config > > file is stored when created with the "setup" command. The use of a > > ~/.notmuch config directory creates one place where all notmuch config > > files and data can be stored, which will greatly simplify managing > > notmuch, and reduce cluter of user dot files. > > --- > > notmuch-config.c | 21 ++++++++++++++++++--- > > notmuch-setup.c | 2 +- > > notmuch.1 | 4 ++-- > > notmuch.c | 2 +- > > 4 files changed, 22 insertions(+), 7 deletions(-) > > > > diff --git a/notmuch-config.c b/notmuch-config.c > > index 7252a19..321c880 100644 > > --- a/notmuch-config.c > > +++ b/notmuch-config.c > > @@ -22,9 +22,11 @@ > > > > #include > > #include > > +#include > > +#include > > > > static const char toplevel_config_comment[] = > > - " .notmuch-config - Configuration file for the notmuch mail system\n" > > + " .notmuch/config - Configuration file for the notmuch mail system\n" > > "\n" > > " For more information about notmuch, see http://notmuchmail.org"; > > > > @@ -134,7 +136,7 @@ get_username_from_passwd_file (void *ctx) > > > > /* Open the named notmuch configuration file. A filename of NULL will > > * be interpreted as the default configuration file > > - * ($HOME/.notmuch-config). > > + * ($HOME/.notmuch/config). > > * > > * If any error occurs, (out of memory, or a permission-denied error, > > * etc.), this function will print a message to stderr and return > > @@ -183,7 +185,7 @@ notmuch_config_open (void *ctx, > > if (filename) > > config->filename = talloc_strdup (config, filename); > > else > > - config->filename = talloc_asprintf (config, "%s/.notmuch-config", > > + config->filename = talloc_asprintf (config, "%s/.notmuch/config", > > getenv ("HOME")); > > > > config->key_file = g_key_file_new (); > > @@ -297,14 +299,27 @@ notmuch_config_save (notmuch_config_t *config) > > { > > size_t length; > > char *data; > > + char buf[256]; > > GError *error = NULL; > > > > + struct stat statbuf; > > + > > data = g_key_file_to_data (config->key_file, &length, NULL); > > if (data == NULL) { > > fprintf (stderr, "Out of memory.\n"); > > return 1; > > } > > > > + /* Create config directory if it doesn't already exist */ > > + snprintf(buf, sizeof buf, "%s", config->filename); > > + dirname(buf); > > + if (stat(buf, &statbuf) < 0) { > > + if (mkdir(buf, 0755) < 0) { > > + fprintf (stderr, "Could not create directory '%s'\n.", buf); > > + return 1; > > + } > > + } > > + > > if (! g_file_set_contents (config->filename, data, length, &error)) { > > fprintf (stderr, "Error saving configuration to %s: %s\n", > > config->filename, error->message); > > diff --git a/notmuch-setup.c b/notmuch-setup.c > > index 68788e1..76e104c 100644 > > --- a/notmuch-setup.c > > +++ b/notmuch-setup.c > > @@ -74,7 +74,7 @@ welcome_message_post_setup (void) > > { > > printf ("\n" > > "Notmuch is now configured, and the configuration settings are saved in\n" > > -"a file in your home directory named .notmuch-config . If you'd like to\n" > > +"a file in your home directory named .notmuch/config . If you'd like to\n" > > "change the configuration in the future, you can either edit that file\n" > > "directly or run \"notmuch setup\".\n\n" > > > > diff --git a/notmuch.1 b/notmuch.1 > > index 8a3fb40..9ea1d42 100644 > > --- a/notmuch.1 > > +++ b/notmuch.1 > > @@ -53,7 +53,7 @@ Interactively sets up notmuch for first use. > > The setup command will prompt for your full name, your primary email > > address, any alternate email addresses you use, and the directory > > containing your email archives. Your answers will be written to a > > -configuration file in ${HOME}/.notmuch-config . This configuration > > +configuration file in ${HOME}/.notmuch/config . This configuration > > file will be created with descriptive comments, making it easy to edit > > by hand later to change the configuration. Or you can run > > .B "notmuch setup" > > @@ -245,7 +245,7 @@ takes an existing set of messages and constructs a suitable mail > > template. The Reply-to header (if any, otherwise From:) is used for > > the To: address. Vales from the To: and Cc: headers are copied, but > > not including any of the current user's email addresses (as configured > > -in primary_mail or other_email in the .notmuch-config file) in the > > +in primary_mail or other_email in the .notmuch/config file) in the > > recipient list > > > > It also builds a suitable new subject, including Re: at the front (if > > diff --git a/notmuch.c b/notmuch.c > > index 5cc8e4c..2d19a91 100644 > > --- a/notmuch.c > > +++ b/notmuch.c > > @@ -98,7 +98,7 @@ command_t commands[] = { > > "\t\tThe setup command will prompt for your full name, your primary\n" > > "\t\temail address, any alternate email addresses you use, and the\n" > > "\t\tdirectory containing your email archives. Your answers will be\n" > > - "\t\twritten to a configuration file in ${HOME}/.notmuch-config .\n" > > + "\t\twritten to a configuration file in ${HOME}/.notmuch/config .\n" > > "\n" > > "\t\tThis configuration file will be created with descriptive\n" > > "\t\tcomments, making it easy to edit by hand later to change the\n" > > -- > > 1.6.5 > > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch -- WebSig: http://www.jukie.net/~bart/sig/ From cworth@cworth.org Sun Nov 22 14:48:18 2009 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 34E05431FBF; Sun, 22 Nov 2009 14:48:18 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 XWfHfbTpBpE0; Sun, 22 Nov 2009 14:48:17 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 280C4431FAE; Sun, 22 Nov 2009 14:48:16 -0800 (PST) From: Carl Worth To: "Aneesh Kumar K.V" In-Reply-To: <20091122122106.GA3531@skywalker.linux.vnet.ibm.com> References: <1258879076-31883-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <87hbsmg436.fsf@yoom.home.cworth.org> <20091122122106.GA3531@skywalker.linux.vnet.ibm.com> Date: Sun, 22 Nov 2009 23:48:02 +0100 Message-ID: <878wdyfa71.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH -v2] notmuch.el: Add face support to search and show mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 22:48:18 -0000 On Sun, 22 Nov 2009 17:51:06 +0530, "Aneesh Kumar K.V" wrote: > > It's interesting to be able to highlight specific tags like this. But I > > think that first I'd like to have a single 'notmuch-tag face to make it > > easier to see all the tag names, since they're hard to see among the > > subject. And then maybe after that have s 'notmuch-tag-important-face or > > something. I'm guessing that just that much would cover most people's > > needs, before needing to choose custom colors for each tag name. > > The default search pattern for notmuch is inbox and unread right. So adding > both of them to the notmuch-tag-face-alist should color the tags > properly. Well, actually the default search pattern for notmuch is just "inbox". But it's really about *all* the tags I have on the messages. I would like all of my tags to stand out from the subject line, (and I don't want to keep adjusting notmuch-tag-face-alist every time I add a new tag). I'd prefer instead to just be able to choose a color that would highlight everyhing between the final set of parentheses in the search results. > One of the easy part with emacs is we can use customize-face and select > notmuch-show-subject-face to select what ever suites your configuration. > For me with black background i found yellow with bold to be nice. OK. I'll experiment and look for a reasonable color for a white background. -Carl From cworth@cworth.org Sun Nov 22 14:52:16 2009 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 ED237431FBF; Sun, 22 Nov 2009 14:52:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Zz00qEWPfD-b; Sun, 22 Nov 2009 14:52:16 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 99E1C431FAE; Sun, 22 Nov 2009 14:52:15 -0800 (PST) From: Carl Worth To: djcb@djcbsoftware.nl In-Reply-To: <87skc6n3yp.wl%djcb@djcbsoftware.nl> References: <87aayggsjp.wl%djcb@djcbsoftware.nl> <87iqd43wot.fsf@yoom.home.cworth.org> <87skc6n3yp.wl%djcb@djcbsoftware.nl> Date: Sun, 22 Nov 2009 23:52:01 +0100 Message-ID: <877htifa0e.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "notmuch@notmuchmail.org" Subject: Re: [notmuch] interesting project! X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 22:52:17 -0000 On Sun, 22 Nov 2009 14:23:10 +0200, Dirk-Jan C. Binnema wrote: > A small question: it seems that notmuch is avoiding the use of GLib directly > (of course, it depend on it anyway through GMime); is this because of > OOM-handling? It'd be nice if GLib could be used, it would make some things > quite a bit easier. It's true that I don't like the OOM handling in glib. I also think that glib tries to be too many different things at the same time. And finally, having some talloc-friendly data structures (like a hash-table) would be really nice. In the meantime, as you say, we're already linking with glib because of GMime, so there's really no reason not to call functions that are there and that do what we want. What kinds of things were you thinking of that would be easier with glib? -Carl From cworth@cworth.org Sun Nov 22 15:11:38 2009 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 3F3FF431FC0; Sun, 22 Nov 2009 15:11:38 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 HGmPTJwaBRbd; Sun, 22 Nov 2009 15:11:37 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A8DCC431FAE; Sun, 22 Nov 2009 15:11:36 -0800 (PST) From: Carl Worth To: Alexander Botero-Lowry , notmuch@notmuchmail.org In-Reply-To: <86ws1lioue.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> References: <86ws1lioue.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> Date: Mon, 23 Nov 2009 00:11:22 +0100 Message-ID: <87einqxihx.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] lots of emacs mode enhancements X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 23:11:38 -0000 On Fri, 20 Nov 2009 00:26:33 -0800, Alexander Botero-Lowry wrote: > I've just been diving into the elisp, and have added a bunch of useful > features. This is fantastic stuff, Alex. Thanks so much for working on it. (And I'm sorry it took me a while before I got around to reviewing it. Hopefully I'll be more responsive when I'm done travelling in a couple of days. > 1) buttonized citation and signature expanders and made them locally > collapsable instead of globally > 2) fixed an annoying warning about cons not being a face name > 3) made header names bold to make it easier to distingush them from > their value I really like the bold headers. And I can tell that the buttonization is going to be very nice. But I can't actually get it to work completely. I first clicked[*] on a signature to make it visible, which worked find. But then clicking on it again I got "buffer is read-only" and it wouldn't hide. At that point I couldn't get any of the other buttons to make things visible either. So, being unwilling to have hidden content that I can't make visible, I can't merge this work in its current state. If you can't replicate the bug, let me know and I'll try to look closer at what's going on. > (this could take some cleanup to remove > the global key-map binding or make it work again) Obviously, we should not have a keybinding that doesn't work. But I'd be glad to just remove it---if we can do local expansion I don't see a big reason to have global expansion. At least for things like citations and signature. For message bodies, that's different, so I can imagine having an "expand all" keybinding for them. Meanwhile, the feature that I *will* want is something to make it easy to use the keyboard alone to show/hide hidden parts. What I want is for TAB to advance to the next button, so that then I can just press RET on it to toggle it. > My next target is to carry the buttonization through to threads and > headers, and then I'm going to look into doing better mime-handling in > general. Great. I'll look forward to that. > also, RFP includes a -p argument that gives a patch :) Very nice. It's appreciated. -Carl [*] Any reason we can't make button 1 do this instead of button 2? That should be more intuitive, and at worst it means that the text on the button itself is hard to select, which shouldn't be an option. From jrollins@finestructure.net Sun Nov 22 15:14:18 2009 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 F3380431FBC for ; Sun, 22 Nov 2009 15:14:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ufxHowxc-Kb2 for ; Sun, 22 Nov 2009 15:14:07 -0800 (PST) Received: from brinza.cc.columbia.edu (brinza.cc.columbia.edu [128.59.29.8]) by olra.theworths.org (Postfix) with ESMTP id BFA7C431FAE for ; Sun, 22 Nov 2009 15:14:07 -0800 (PST) Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com [72.227.128.66]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by brinza.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id nAMNE4fC000580 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sun, 22 Nov 2009 18:14:04 -0500 (EST) Received: from jrollins by servo.finestructure.net with local (Exim 4.69) (envelope-from ) id 1NCLdM-00008G-6X; Sun, 22 Nov 2009 18:14:20 -0500 Date: Sun, 22 Nov 2009 18:14:20 -0500 From: Jameson Graef Rollins To: Bart Trojanowski Message-ID: <20091122231419.GA8322@finestructure.net> References: <1258927116-528-1-git-send-email-jrollins@finestructure.net> <1258927116-528-2-git-send-email-jrollins@finestructure.net> <1258927116-528-3-git-send-email-jrollins@finestructure.net> <20091122221523.GA8703@finestructure.net> <20091122222453.GM17268@jukie.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline In-Reply-To: <20091122222453.GM17268@jukie.net> User-Agent: Mutt/1.5.20 (2009-06-14) X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.65 on 128.59.29.8 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 3/3] change config file location to be ~/.notmuch/config X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 23:14:18 -0000 --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Nov 22, 2009 at 05:24:53PM -0500, Bart Trojanowski wrote: > I totally agree with Jamie about the config rename. I don't know if I > agree with the database location change... but I might just need some > convincing. So I don't really like having the database stored in the maildir. There are a couple reasons for this: - I would prefer to keep all notmuch stuff together, including all config files, data files, etc. In my opinion, this just makes things easier to keep track of. No need to guess where any relevant notmuch data is if it's all stored together in one place. - I would prefer to not clutter my mail directories with anything that's not mail. The notmuch database is definitely related to my mail, but it's not exactly my mail, so I'd rather keep it somewhere else. (I think there's a whole other thread to be started about this, because I think the config should also hold the location of the maildir to be indexed, not the path to the index itself, which then makes implicit assumptions about where the maildir is.) This point is also probably related to the fact that I've had to change MUAs too many times to trust one indefinitely. So basically I want to keep my mail wholly separate from anything that's processing it. I think Carl said he wanted to keep the ability to specify exactly where the database is stored, so if we could move away from something that makes any implicit assumptions about relative paths between the database and the maildir, then all should be ok. > Would it be enough to just read .notmuch/config and fall back to > .notmuch-config otherwise? Yes, this is a good idea. I'll try to come up with a patch for this. jamie. --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: attachment -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJLCcXIAAoJEO00zqvie6q8LbIQAKHCrltV3JqKSXVM3ehrRXNr eSQE48ILoxV33iL88NtcgUodAmdetmQHJyhF4OvAMItGlALLBLmauMf+ZxS+Bf0F hu8JrpKHz/BS5BHktYkhBDo4xeuLb9o1d1oD6vjVhGawOTjzif8fDCcpqPYV3TOn RJMHL6mvsZlAlBbKq6SDzATejs7ZtKEOLElyQQTntJeSZQjPszFlFAK6QyHuBYKS qPS5/FgwjLviRFdxwjX8VCZRtvjDWEUkv65h4lX/b5CED1GGGFlqmgUNUCyTYN0A KiVMEz2pFzddlAE8tUF82mLq5XEgszHUk8qlPzorbX5+IJOPUdFX5JkjsIHbEQwD T8S+lvlcqt0riWfG8AfcZgpLT9ZcA22k286QWS62Dx/MihV87Cycnbd/DG2kMxjb YJ1imC8enCEpnNKWRH0Jd0nkOL6PbFG4oA1R2pR9lPu21NL59faYtFcad1eI44ve WOCqEgGLOZK/8TtaoYBd8srZWVaVMTpytcfImluirf07e/QL+/O34DbcUYdWEmj1 tDvb2AjaiPmbkPi+4uXRrdroXs/5hqTbZX4CVG3l0foXNtwnPS2lJWwqn2UNaqmX PVpntBRl97hvmqpw0e2isQtlpfCaUnO0rH/3+VfdAvT7ECUdpX4/mWCvbkd94tGn Lvz/+jUNsCtNG2sU4lg/ =BFcl -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd-- From cworth@cworth.org Sun Nov 22 15:19:45 2009 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 4E892431FC0; Sun, 22 Nov 2009 15:19:45 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 CL9b6SVoeyRW; Sun, 22 Nov 2009 15:19:44 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4ECD7431FAE; Sun, 22 Nov 2009 15:19:44 -0800 (PST) From: Carl Worth To: Keith Packard , notmuch@notmuchmail.org In-Reply-To: <1258493565-13508-1-git-send-email-keithp@keithp.com> References: <1258493565-13508-1-git-send-email-keithp@keithp.com> Date: Mon, 23 Nov 2009 00:19:29 +0100 Message-ID: <87d43axi4e.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 23:19:45 -0000 On Tue, 17 Nov 2009 13:32:45 -0800, Keith Packard wrote: > When closing a thread view, mark the thread as archived by removing > the "inbox" tag, and for the 'x' variant, the "unread" tag as well, > then kill the buffer and update the search window view as well. I'm starting to come around to this patch, Keith. :-) I think one thing we're going to really need is a better help message for presenting the keybindings. The function names are all really confusing, (the "notmuch-show" prefix doesn't help). So what I'd really like is something that displays the keybinding and the first line of the documentation of a function, rather than the function name itself. > This makes 'x' much the same as 'a', but instead of taking you to the > next message, it takes you back to the search window instead. Except that the patch also reverses the current behavior of "a" and "A". That should be a separate patch anyway, but I'm also not sure that I like it. I like that the command that takes the extra effort of pressing shift is the command that does *more*, (removing both "unread" and "inbox"), rather than the command that does *less*. -Carl From keithp@keithp.com Sun Nov 22 15:32:18 2009 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 7A485431FC0 for ; Sun, 22 Nov 2009 15:32:18 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 orS15hkLw7gd for ; Sun, 22 Nov 2009 15:32:17 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id A426F431FBC for ; Sun, 22 Nov 2009 15:32:17 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id EE48CB9402F; Sun, 22 Nov 2009 15:32:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nZoXf34dkQQp; Sun, 22 Nov 2009 15:32:14 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id EBBBEB84011; Sun, 22 Nov 2009 15:32:13 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id DE7DEB80040; Sun, 22 Nov 2009 15:32:13 -0800 (PST) From: Keith Packard To: Carl Worth , notmuch@notmuchmail.org In-Reply-To: <87d43axi4e.fsf@yoom.home.cworth.org> References: <1258493565-13508-1-git-send-email-keithp@keithp.com> <87d43axi4e.fsf@yoom.home.cworth.org> Date: Sun, 22 Nov 2009 15:32:13 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 23:32:18 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Mon, 23 Nov 2009 00:19:29 +0100, Carl Worth wrote: > I'm starting to come around to this patch, Keith. :-) I'll keep posting it then :-) > I think one thing we're going to really need is a better help message > for presenting the keybindings. The function names are all really > confusing, (the "notmuch-show" prefix doesn't help). So what I'd really > like is something that displays the keybinding and the first line of the > documentation of a function, rather than the function name itself. That's a fine plan. It 'shouldn't' be too hard to implement either. Btw, I'm thinking that it might be useful to create some 'global' notmuch keybindings and then create per-view bindings that also expose the global bindings. That way, things like 'm' to create a new mail would work consistently in each view. Note that this idea is inconsistent with the following though... > Except that the patch also reverses the current behavior of "a" and > "A". That should be a separate patch anyway, but I'm also not sure that > I like it. I like that the command that takes the extra effort of > pressing shift is the command that does *more*, (removing both "unread" > and "inbox"), rather than the command that does *less*. I was trying to make the 'normal' action easier; for me, if I'm looking at a message, then the normal action is to mark it read and archived, but when I'm looking only at the subject line in the search window, the normal action is just to mark it archived (having not actually read the message). =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLCcn9Qp8BWwlsTdMRAl3tAJ0WhAx/lfcdG462Eov/LYD0a2/6hACgwbVZ BzZuP/or7Kyi2LxLDct79D4= =FhEI -----END PGP SIGNATURE----- --=-=-=-- From cworth@cworth.org Sun Nov 22 15:53:55 2009 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 AE123431FC0; Sun, 22 Nov 2009 15:53:55 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 W8znZMUXRIxq; Sun, 22 Nov 2009 15:53:54 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4422A431FAE; Sun, 22 Nov 2009 15:53:53 -0800 (PST) From: Carl Worth To: Alexander Botero-Lowry , notmuch@notmuchmail.org In-Reply-To: <87einqxihx.fsf@yoom.home.cworth.org> References: <86ws1lioue.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> <87einqxihx.fsf@yoom.home.cworth.org> Date: Mon, 23 Nov 2009 00:53:39 +0100 Message-ID: <87skc6ktfg.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] lots of emacs mode enhancements X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 22 Nov 2009 23:53:55 -0000 On Mon, 23 Nov 2009 00:11:22 +0100, Carl Worth wrote: > On Fri, 20 Nov 2009 00:26:33 -0800, Alexander Botero-Lowry wrote: > I really like the bold headers. And I can tell that the buttonization is > going to be very nice. But I can't actually get it to work completely. I > first clicked[*] on a signature to make it visible, which worked > find. But then clicking on it again I got "buffer is read-only" and it > wouldn't hide. At that point I couldn't get any of the other buttons to > make things visible either. This was simply a re-display bug which Alexander fixed. And he also changed the buttons from button-2 to button-1. I really like the final result, so it's pushed now. Citations and signatures can now be expanded locally! It is slightly harder to do this with the keyboard now. You have to actually position point right on the button. This is just a temporary thing, as I want to add a TAB binding to move point to the next button. So keyboard-lovers, don't worry, notmuch (at least the emacs interface) will always be very friendly for keyboard use (excepting temporary lapses like this current one). -Carl From aperez@hikari.localdomain Sun Nov 22 16:09:36 2009 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 DC56B431FBC for ; Sun, 22 Nov 2009 16:09:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 BE2jBL0gfPEr for ; Sun, 22 Nov 2009 16:09:36 -0800 (PST) Received: from alice.connectical.com (alice.connectical.com [208.89.208.235]) by olra.theworths.org (Postfix) with ESMTP id 2E0DE431FAE for ; Sun, 22 Nov 2009 16:09:36 -0800 (PST) Received: (qmail 1559 invoked from network); 23 Nov 2009 00:09:27 -0000 Received: from 28.218.27.77.dynamic.mundo-r.com (HELO hikari.localdomain) (aperez@77.27.218.28) by alice.connectical.com with ESMTPA; 23 Nov 2009 00:09:27 -0000 Received: by hikari.localdomain (Postfix, from userid 500) id D6575310915F; Mon, 23 Nov 2009 01:10:44 +0100 (CET) From: Adrian Perez To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 01:10:44 +0100 Message-Id: <1258935044-30169-1-git-send-email-aperez@igalia.com> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1258762638-22905-1-git-send-email-aperez@igalia.com> References: <1258762638-22905-1-git-send-email-aperez@igalia.com> Subject: [notmuch] [PATCH] Support for printing file paths in new command X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 00:09:37 -0000 For very large mail boxes, it is desirable to know which files are being processed e.g. when a crash occurs to know which one was the cause. Also, it may be interesting to have a better idea of how the operation is progressing when processing mailboxes with big messages. This patch adds support for printing messages as they are processed by "notmuch new": * The "new" command now supports a "--verbose" flag. * When running in verbose mode, the file path of the message about to be processed is printed in the following format: current/total: /path/to/message/file Where "current" is the number of messages processed so far and "total" is the total count of files to be processed. * The status line is erased using an ANSI sequence "\033[K" (erase current line from the cursor to the end of line) each time it is refreshed. This should not pose a problem because nearly every terminal supports it. * When output is not being sent to a terminal, then each file processed is printed in a new line and ANSI escapes are not used at all. * The signal handler for SIGALRM and the timer are not enabled when running in verbose mode, because we are already printing progress with each file, periodical reports are not neccessary. --- notmuch-client.h | 2 ++ notmuch-new.c | 32 +++++++++++++++++++++++++++++--- notmuch.c | 11 +++++++++-- 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index ea77686..4fe182e 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -74,6 +74,8 @@ typedef void (*add_files_callback_t) (notmuch_message_t *message); typedef struct { int ignore_read_only_directories; int saw_read_only_directory; + int output_is_a_tty; + int verbose; int total_files; int processed_files; diff --git a/notmuch-new.c b/notmuch-new.c index 0dd2784..b5c6cc6 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -179,6 +179,19 @@ add_files_recursive (notmuch_database_t *notmuch, if (path_dbtime == 0 || st->st_mtime > path_dbtime) { state->processed_files++; + if (state->verbose) { + if (state->output_is_a_tty) + printf("\r\033[K"); + + printf ("%i/%i: %s", + state->processed_files, + state->total_files, + next); + + putchar((state->output_is_a_tty) ? '\r' : '\n'); + fflush (stdout); + } + status = notmuch_database_add_message (notmuch, next, &message); switch (status) { /* success */ @@ -275,7 +288,7 @@ add_files (notmuch_database_t *notmuch, } /* Setup our handler for SIGALRM */ - if (isatty (fileno (stdout)) && ! debugger_is_active ()) { + if (state->output_is_a_tty && ! debugger_is_active () && ! state->verbose) { memset (&action, 0, sizeof (struct sigaction)); action.sa_handler = handle_sigalrm; sigemptyset (&action.sa_mask); @@ -296,6 +309,7 @@ add_files (notmuch_database_t *notmuch, /* Now stop the timer. */ if (timer_is_active) { + /* Now stop the timer. */ timerval.it_interval.tv_sec = 0; timerval.it_interval.tv_usec = 0; timerval.it_value.tv_sec = 0; @@ -380,8 +394,7 @@ count_files (const char *path, int *count) } int -notmuch_new_command (void *ctx, - unused (int argc), unused (char *argv[])) +notmuch_new_command (void *ctx, int argc, char *argv[]) { notmuch_config_t *config; notmuch_database_t *notmuch; @@ -393,6 +406,19 @@ notmuch_new_command (void *ctx, const char *db_path; char *dot_notmuch_path; struct sigaction action; + int i; + + add_files_state.verbose = 0; + add_files_state.output_is_a_tty = isatty (fileno (stdout)); + + for (i = 0; i < argc && argv[i][0] == '-'; i++) { + if (STRNCMP_LITERAL (argv[i], "--verbose") == 0) { + add_files_state.verbose = 1; + } else { + fprintf (stderr, "Unrecognized option: %s\n", argv[i]); + return 1; + } + } /* Setup our handler for SIGINT */ memset (&action, 0, sizeof (struct sigaction)); diff --git a/notmuch.c b/notmuch.c index 5cc8e4c..8cb1310 100644 --- a/notmuch.c +++ b/notmuch.c @@ -107,8 +107,8 @@ command_t commands[] = { "\t\tInvoking notmuch with no command argument will run setup if\n" "\t\tthe setup command has not previously been completed." }, { "new", notmuch_new_command, - NULL, - "Find and import new messages to the notmuch database.", + "[--verbose]", + "\t\tFind and import new messages to the notmuch database.", "\t\tScans all sub-directories of the mail directory, performing\n" "\t\tfull-text indexing on new messages that are found. Each new\n" "\t\tmessage will be tagged as both \"inbox\" and \"unread\".\n" @@ -122,6 +122,13 @@ command_t commands[] = { "\t\tis delivered and you wish to incorporate it into the database.\n" "\t\tThese subsequent runs will be much quicker than the initial run.\n" "\n" + "\t\tSupported options for new include:\n" + "\n" + "\t\t--verbose\n" + "\n" + "\t\t\tVerbose operation. Shows paths of message files as\n" + "\t\t\tthey are being indexed.\n" + "\n" "\t\tNote: \"notmuch new\" runs (other than the first run) will\n" "\t\tskip any read-only directories, so you can use that to mark\n" "\t\tdirectories that will not receive any new mail (and make\n" -- 1.6.5.2 From jan@ryngle.com Sun Nov 22 16:11:22 2009 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 B91B4431FBC for ; Sun, 22 Nov 2009 16:11:22 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 THXY0LGEWw7E for ; Sun, 22 Nov 2009 16:11:22 -0800 (PST) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by olra.theworths.org (Postfix) with ESMTP id 139AF431FAE for ; Sun, 22 Nov 2009 16:11:21 -0800 (PST) Received: by fg-out-1718.google.com with SMTP id 19so1921773fgg.2 for ; Sun, 22 Nov 2009 16:11:21 -0800 (PST) Received: by 10.102.165.24 with SMTP id n24mr1914615mue.47.1258935081132; Sun, 22 Nov 2009 16:11:21 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id u9sm14200792muf.7.2009.11.22.16.11.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 16:11:20 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id 13DBB440374; Mon, 23 Nov 2009 01:10:57 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 01:10:56 +0100 Message-Id: <1258935056-9746-3-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1258935056-9746-2-git-send-email-jan@ryngle.com> References: <1258935056-9746-1-git-send-email-jan@ryngle.com> <1258935056-9746-2-git-send-email-jan@ryngle.com> Subject: [notmuch] [PATCH 3/3] notmuch.el: Select tag names with completion. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 00:11:22 -0000 Several commands ask the user for a tag name. With this feature the user can just press tab and Emacs automatically retrieves the list of all existing tags from notmuch database with 'notmuch search-tags' and presents a completion buffer to the user. This feature is very useful for users who have a large number of tags because it saves typing and minimizes the risk of typos. Signed-off-by: Jan Janak --- notmuch.el | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/notmuch.el b/notmuch.el index 5927737..b6be395 100644 --- a/notmuch.el +++ b/notmuch.el @@ -139,6 +139,13 @@ within the current window." (or (memq prop buffer-invisibility-spec) (assq prop buffer-invisibility-spec))))) +(defun notmuch-select-tag-with-completion (prompt) + (let ((tag-list + (with-output-to-string + (with-current-buffer standard-output + (call-process notmuch-command nil t nil "search-tags"))))) + (completing-read prompt (split-string tag-list "\n+" t) nil nil nil))) + (defun notmuch-show-next-line () "Like builtin `next-line' but ensuring we end on a visible character. @@ -202,7 +209,8 @@ Unlike builtin `next-line' this version accepts no arguments." (defun notmuch-show-add-tag (&rest toadd) "Add a tag to the current message." - (interactive "sTag to add: ") + (interactive + (list (notmuch-select-tag-with-completion "Tag to add: "))) (apply 'notmuch-call-notmuch-process (append (cons "tag" (mapcar (lambda (s) (concat "+" s)) toadd)) @@ -211,7 +219,8 @@ Unlike builtin `next-line' this version accepts no arguments." (defun notmuch-show-remove-tag (&rest toremove) "Remove a tag from the current message." - (interactive "sTag to remove: ") + (interactive + (list (notmuch-select-tag-with-completion "Tag to remove: "))) (let ((tags (notmuch-show-get-tags))) (if (intersection tags toremove :test 'string=) (progn @@ -970,12 +979,14 @@ and will also appear in a buffer named \"*Notmuch errors*\"." (split-string (buffer-substring beg end)))))) (defun notmuch-search-add-tag (tag) - (interactive "sTag to add: ") + (interactive + (list (notmuch-select-tag-with-completion "Tag to add: "))) (notmuch-call-notmuch-process "tag" (concat "+" tag) (notmuch-search-find-thread-id)) (notmuch-search-set-tags (delete-dups (sort (cons tag (notmuch-search-get-tags)) 'string<)))) (defun notmuch-search-remove-tag (tag) - (interactive "sTag to remove: ") + (interactive + (list (notmuch-select-tag-with-completion "Tag to remove: "))) (notmuch-call-notmuch-process "tag" (concat "-" tag) (notmuch-search-find-thread-id)) (notmuch-search-set-tags (delete tag (notmuch-search-get-tags)))) @@ -1061,7 +1072,8 @@ current search results AND the additional query string provided." Runs a new search matching only messages that match both the current search results AND that are tagged with the given tag." - (interactive "sFilter by tag: ") + (interactive + (list (notmuch-select-tag-with-completion "Filter by tag: "))) (notmuch-search (concat notmuch-search-query-string " and tag:" tag) notmuch-search-oldest-first)) (defun notmuch () -- 1.6.3.3 From jan@ryngle.com Sun Nov 22 16:11:23 2009 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 97134431FAE for ; Sun, 22 Nov 2009 16:11:23 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 HKOQsob7QVtx for ; Sun, 22 Nov 2009 16:11:23 -0800 (PST) Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com [209.85.220.214]) by olra.theworths.org (Postfix) with ESMTP id C5ED7431FC0 for ; Sun, 22 Nov 2009 16:11:22 -0800 (PST) Received: by fxm6 with SMTP id 6so5354636fxm.0 for ; Sun, 22 Nov 2009 16:11:21 -0800 (PST) Received: by 10.103.84.30 with SMTP id m30mr1873923mul.23.1258935081351; Sun, 22 Nov 2009 16:11:21 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id 14sm14332748muo.34.2009.11.22.16.11.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 16:11:20 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id 0EFC4440656; Mon, 23 Nov 2009 01:10:57 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 01:10:55 +0100 Message-Id: <1258935056-9746-2-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1258935056-9746-1-git-send-email-jan@ryngle.com> References: <1258935056-9746-1-git-send-email-jan@ryngle.com> Subject: [notmuch] [PATCH 2/3] notmuch: New command 'search-tags'. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 00:11:23 -0000 This is a new notmuch command that can be used to search for all tags found in the database. The resulting list is alphabetically sorted. The primary use-case for this new command is to provide the tag completion feature in Emacs (and other interfaces). Signed-off-by: Jan Janak --- Makefile.local | 1 + notmuch-client.h | 3 ++ notmuch-search-tags.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++ notmuch.c | 6 ++++ 4 files changed, 81 insertions(+), 0 deletions(-) create mode 100644 notmuch-search-tags.c diff --git a/Makefile.local b/Makefile.local index 2828659..d8f7906 100644 --- a/Makefile.local +++ b/Makefile.local @@ -12,6 +12,7 @@ notmuch_client_srcs = \ notmuch-reply.c \ notmuch-restore.c \ notmuch-search.c \ + notmuch-search-tags.c \ notmuch-setup.c \ notmuch-show.c \ notmuch-tag.c \ diff --git a/notmuch-client.h b/notmuch-client.h index ea77686..c6142b5 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -114,6 +114,9 @@ notmuch_show_command (void *ctx, int argc, char *argv[]); int notmuch_tag_command (void *ctx, int argc, char *argv[]); +int +notmuch_search_tags_command (void *ctx, int argc, char *argv[]); + const char * notmuch_time_relative_date (const void *ctx, time_t then); diff --git a/notmuch-search-tags.c b/notmuch-search-tags.c new file mode 100644 index 0000000..1201165 --- /dev/null +++ b/notmuch-search-tags.c @@ -0,0 +1,71 @@ +/* notmuch - Not much of an email program, (just index and search) + * + * Copyright © 2009 Carl Worth + * Copyright © 2009 Jan Janak + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/ . + * + * Author: Jan Janak + */ + +#include "notmuch-client.h" + +static int +list_all_tags (notmuch_database_t* db) +{ + notmuch_tags_t* tags; + const char* t; + + if ((tags = notmuch_database_get_all_tags (db)) == NULL) { + fprintf (stderr, "Error while obtaining tags from the database.\n"); + return 1; + } + + while((t = notmuch_tags_get (tags))) { + printf ("%s\n", t); + notmuch_tags_advance (tags); + } + + notmuch_tags_destroy (tags); + return 0; +} + +int +notmuch_search_tags_command (void *ctx, int argc, char *argv[]) +{ + notmuch_config_t *config; + notmuch_database_t *db; + + config = NULL; + db = NULL; + + if ((config = notmuch_config_open (ctx, NULL, NULL)) == NULL) { + goto error; + } + + db = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READ_ONLY); + if (db == NULL) { + goto error; + } + + if (list_all_tags (db) != 0) goto error; + + notmuch_database_close (db); + return 0; + +error: + if (db) notmuch_database_close (db); + return 1; +} diff --git a/notmuch.c b/notmuch.c index 5cc8e4c..b1d7cf9 100644 --- a/notmuch.c +++ b/notmuch.c @@ -230,6 +230,12 @@ command_t commands[] = { "\t\tSo if you've previously been using sup for mail, then the\n" "\t\t\"notmuch restore\" command provides you a way to import\n" "\t\tall of your tags (or labels as sup calls them)." }, + { "search-tags", notmuch_search_tags_command, + NULL, + "List all tags found in the database.", + "\t\tThis command returns an alphabetically sorted list of all tags\n" + "\t\tthat are present in the database. In other words, the resulting\n" + "\t\tlist is a collection of all tags from all messages." }, { "help", notmuch_help_command, "[]", "\t\tThis message, or more detailed help for the named command.", -- 1.6.3.3 From jan@ryngle.com Sun Nov 22 16:11:23 2009 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 C30BC431FC0 for ; Sun, 22 Nov 2009 16:11:23 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Qaah+-OFysrk for ; Sun, 22 Nov 2009 16:11:23 -0800 (PST) Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com [209.85.220.214]) by olra.theworths.org (Postfix) with ESMTP id C1B88431FBF for ; Sun, 22 Nov 2009 16:11:22 -0800 (PST) Received: by fxm6 with SMTP id 6so5354637fxm.0 for ; Sun, 22 Nov 2009 16:11:21 -0800 (PST) Received: by 10.103.21.9 with SMTP id y9mr1894373mui.116.1258935081750; Sun, 22 Nov 2009 16:11:21 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id j6sm14326522mue.12.2009.11.22.16.11.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 16:11:20 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id F2A42440651; Mon, 23 Nov 2009 01:10:56 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 01:10:54 +0100 Message-Id: <1258935056-9746-1-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH 1/3] notmuch: New function to retrieve all tags from the database. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 00:11:24 -0000 This patch adds a new function called notmuch_database_get_all_tags which can be used to obtain a list of all tags from the database (in other words, the list contains all tags from all messages). The function produces an alphabetically sorted list. To add support for the new function, we rip the guts off of notmuch_message_get_tags and put them in a new generic function called _notmuch_convert_tags. The generic function takes a Xapian::TermIterator as argument and uses the iterator to find tags. This makes the function usable with different Xapian objects. Function notmuch_message_get_tags is then reimplemented to call the generic function with message->doc.termlist_begin() as argument. Similarly, we implement notmuch_message_database_get_all_tags, the function calls the generic function with db->xapian_db->allterms_begin() as argument. Finally, notmuch_database_get_all_tags is exported through lib/notmuch.h Signed-off-by: Jan Janak --- lib/database-private.h | 13 +++++++++++++ lib/database.cc | 43 +++++++++++++++++++++++++++++++++++++++++++ lib/message.cc | 34 +++------------------------------- lib/notmuch.h | 10 ++++++++++ 4 files changed, 69 insertions(+), 31 deletions(-) diff --git a/lib/database-private.h b/lib/database-private.h index 5f178f3..37f9bf8 100644 --- a/lib/database-private.h +++ b/lib/database-private.h @@ -34,4 +34,17 @@ struct _notmuch_database { Xapian::TermGenerator *term_gen; }; +/* Convert tags from Xapian internal format to notmuch format. + * + * The function gets a TermIterator as argument and uses that iterator to find + * all tag terms in the object. The tags are then converted to a + * notmuch_tags_t list and returned. The function needs to allocate memory for + * the resulting list and it uses the argument ctx as talloc context. + * + * The function returns NULL on failure. + */ +notmuch_tags_t * +_notmuch_convert_tags (void *ctx, Xapian::TermIterator &i, + Xapian::TermIterator &end); + #endif diff --git a/lib/database.cc b/lib/database.cc index 2c90019..5d2add7 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -1026,3 +1026,46 @@ notmuch_database_add_message (notmuch_database_t *notmuch, return ret; } + +notmuch_tags_t * +_notmuch_convert_tags (void *ctx, Xapian::TermIterator &i, + Xapian::TermIterator &end) +{ + const char *prefix = _find_prefix ("tag"); + notmuch_tags_t *tags; + std::string tag; + + /* Currently this iteration is written with the assumption that + * "tag" has a single-character prefix. */ + assert (strlen (prefix) == 1); + + tags = _notmuch_tags_create (ctx); + if (unlikely (tags == NULL)) + return NULL; + + i.skip_to (prefix); + + while (i != end) { + tag = *i; + + if (tag.empty () || tag[0] != *prefix) + break; + + _notmuch_tags_add_tag (tags, tag.c_str () + 1); + + i++; + } + + _notmuch_tags_prepare_iterator (tags); + + return tags; +} + +notmuch_tags_t * +notmuch_database_get_all_tags (notmuch_database_t *db) +{ + Xapian::TermIterator i, end; + i = db->xapian_db->allterms_begin(); + end = db->xapian_db->allterms_end(); + return _notmuch_convert_tags(db, i, end); +} diff --git a/lib/message.cc b/lib/message.cc index 017c47b..d27ea92 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -459,38 +459,10 @@ notmuch_message_get_date (notmuch_message_t *message) notmuch_tags_t * notmuch_message_get_tags (notmuch_message_t *message) { - const char *prefix = _find_prefix ("tag"); Xapian::TermIterator i, end; - notmuch_tags_t *tags; - std::string tag; - - /* Currently this iteration is written with the assumption that - * "tag" has a single-character prefix. */ - assert (strlen (prefix) == 1); - - tags = _notmuch_tags_create (message); - if (unlikely (tags == NULL)) - return NULL; - - i = message->doc.termlist_begin (); - end = message->doc.termlist_end (); - - i.skip_to (prefix); - - while (i != end) { - tag = *i; - - if (tag.empty () || tag[0] != *prefix) - break; - - _notmuch_tags_add_tag (tags, tag.c_str () + 1); - - i++; - } - - _notmuch_tags_prepare_iterator (tags); - - return tags; + i = message->doc.termlist_begin(); + end = message->doc.termlist_end(); + return _notmuch_convert_tags(message, i, end); } void diff --git a/lib/notmuch.h b/lib/notmuch.h index a61cd02..e2f1398 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -280,6 +280,16 @@ notmuch_message_t * notmuch_database_find_message (notmuch_database_t *database, const char *message_id); +/* Return a list of all tags found in the database. + * + * This function creates a list of all tags found in the database. The + * resulting list contains all tags from all messages found in the database. + * + * On error this function returns NULL. + */ +notmuch_tags_t * +notmuch_database_get_all_tags (notmuch_database_t *db); + /* Create a new query for 'database'. * * Here, 'database' should be an open database, (see -- 1.6.3.3 From cworth@cworth.org Sun Nov 22 16:24:24 2009 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 C8246431FBF; Sun, 22 Nov 2009 16:24:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Rw1yISArTPeS; Sun, 22 Nov 2009 16:24:24 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id DAE7F431FAE; Sun, 22 Nov 2009 16:24:23 -0800 (PST) From: Carl Worth To: Adrian Perez , notmuch@notmuchmail.org In-Reply-To: <1258762638-22905-1-git-send-email-aperez@igalia.com> References: <1258762638-22905-1-git-send-email-aperez@igalia.com> Date: Mon, 23 Nov 2009 01:24:09 +0100 Message-ID: <87r5rqks0m.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Support for printing file paths in new command X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 00:24:25 -0000 On Sat, 21 Nov 2009 01:17:18 +0100, Adrian Perez wrote: > For very large mail boxes, it is desirable to know which files are being > processed e.g. when a crash occurs to know which one was the cause. Also, > it may be interesting to have a better idea of how the operation is > progressing when processing mailboxes with big messages. > > This patch adds support for printing messages as they are processed by > "notmuch new": Hey, that's pretty nice. I've pushed this now, (and I'm almost tempted to make it the default...). -Carl From cworth@cworth.org Sun Nov 22 16:26:22 2009 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 02546431FBC; Sun, 22 Nov 2009 16:26:22 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Ylq1jk0McvTu; Sun, 22 Nov 2009 16:26:21 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E9F57431FAE; Sun, 22 Nov 2009 16:26:20 -0800 (PST) From: Carl Worth To: Jed Brown , notmuch@notmuchmail.org In-Reply-To: <1258771074-25997-1-git-send-email-jed@59A2.org> References: <1258771074-25997-1-git-send-email-jed@59A2.org> Date: Mon, 23 Nov 2009 01:26:06 +0100 Message-ID: <87pr7akrxd.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Quote file names passed to the shell X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 00:26:22 -0000 On Sat, 21 Nov 2009 03:37:54 +0100, Jed Brown wrote: > Prior to this, notmuch-show-pipe-message could not handle file names > with spaces and similar. Thanks for the fix, Jed. This is pushed. -Carl From cworth@cworth.org Sun Nov 22 16:46:48 2009 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 345C1431FBF; Sun, 22 Nov 2009 16:46:48 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 iPdOt4GUgHjM; Sun, 22 Nov 2009 16:46:47 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C4EB6431FAE; Sun, 22 Nov 2009 16:46:46 -0800 (PST) From: Carl Worth To: Keith Packard , notmuch@notmuchmail.org In-Reply-To: <1258779455-17053-1-git-send-email-keithp@keithp.com> References: <1258779455-17053-1-git-send-email-keithp@keithp.com> Date: Mon, 23 Nov 2009 01:46:32 +0100 Message-ID: <87d43agj9z.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Insert signature into replies X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 00:46:48 -0000 On Fri, 20 Nov 2009 20:57:35 -0800, Keith Packard wrote: > When you compose a new message, message mode carefully inserts your > mail signature at the bottom of the message; as notmuch constructs the > reply all by itself, this doesn't happen then. Use the message mode > function 'message-insert-signature' to add that to reply buffers. Very nice. And look below! It works too. :-) Pushed -Carl -- Searching for an email solution? There's not much out there. http://notmuchmail.org From aperez@igalia.com Sun Nov 22 16:52:28 2009 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 40ADD431FBC for ; Sun, 22 Nov 2009 16:52:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 0IPWh+kJhoHW for ; Sun, 22 Nov 2009 16:52:27 -0800 (PST) Received: from alice.connectical.com (alice.connectical.com [208.89.208.235]) by olra.theworths.org (Postfix) with ESMTP id 88250431FAE for ; Sun, 22 Nov 2009 16:52:27 -0800 (PST) Received: (qmail 19694 invoked from network); 23 Nov 2009 00:52:26 -0000 Received: from 28.218.27.77.dynamic.mundo-r.com (HELO hikari.localdomain) (aperez@77.27.218.28) by alice.connectical.com with ESMTPA; 23 Nov 2009 00:52:26 -0000 Received: from hikari (localhost [127.0.0.1]) by hikari.localdomain (Postfix) with ESMTP id 026F83114AF8 for ; Mon, 23 Nov 2009 01:53:44 +0100 (CET) Date: Mon, 23 Nov 2009 01:53:39 +0100 From: Adrian Perez de Castro To: notmuch@notmuchmail.org Message-ID: <20091123015339.79e51228@hikari> In-Reply-To: <87r5rqks0m.fsf@yoom.home.cworth.org> References: <1258762638-22905-1-git-send-email-aperez@igalia.com> <87r5rqks0m.fsf@yoom.home.cworth.org> Organization: Igalia X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.3; x86_64-redhat-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAADBQTFRFBwcHFhYWKCgoNzc3SEhIV1dXaGhod3d3iIiIlpaWqKiouLi4x8fH2NjY5+fn/v7+rSjDkgAAAjVJREFUOE9l07tvE0EQwOHfrkV9O+eko7g701BBfECJsIigT2IpooIqaSiRUEB0REj00FBQgYSCkhry+gecUPJybJeIxLumTbilsH2PMNXufDOa3ZVW+1JkpbUmD/8+vXR3c7or4Gz93mH309Kz8/C9/RQge7VfhW/LW+PF8IkrQ7Z6OKmQr1tl+LU/yWP9mxJka9O88fZHPwf/7u0kLyCnX3I4fQhgjAgIfi+HHw5A1Y2ggIMcFKAEnRoL0M3BosI4TI2IATjuT8DvSNJoNNJgkIhxlr9TUHeSpDnfohlIrMBlU+BGmsZqfr69FMfGMw4NoG835+J62riWyjQ/uXlTQjNUIoYegMsBM0pCD8oDas7n4HQsBghXFxJTW42KDs+4XLfjsN0wOYgABqARjMKIHIaAQnmHjsI5Cvi9Cf6k03OoWBkpIP3Q7354+dEimFBKHbMP9oKjwfd9gbrxR5KDToczK4uPF8UgNomKU2GaENRi77zyDKICxKBS4xXYbONPMQMdYZTBwMiMWiUg9g6UJ3OBogzjV8E7sBVwyvfAOYdQhsABzuOxI1MGZbs98Q6Md5UOfbbR2R0eWOesrnRw5ajT6f60LrNhWIHZpBnUWv2s14ukArWWTqTes3YQxRXgFkcMu70TPYqqUBs0YwmO967OVIdTG4bY4a7WLaqgLm5vbHdH5np0Dri//fmg7y8scB4u3+zsuNlH0X+g19bby69b+TYH6isvns8VdQWgxj9tHP8AR5/hSdYqkwsAAAAASUVORK5CYII= Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/ryVqa/f7wDpCJ1s=bq1wDLq"; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] Support for printing file paths in new command X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 00:52:28 -0000 --Sig_/ryVqa/f7wDpCJ1s=bq1wDLq Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 23 Nov 2009 01:24:09 +0100, Carl wrote: > On Sat, 21 Nov 2009 01:17:18 +0100, Adrian Perez wrot= e: > > For very large mail boxes, it is desirable to know which files are being > > processed e.g. when a crash occurs to know which one was the cause. Als= o, > > it may be interesting to have a better idea of how the operation is > > progressing when processing mailboxes with big messages. > >=20 > > This patch adds support for printing messages as they are processed by > > "notmuch new": >=20 > Hey, that's pretty nice. Thanks! As a small improvement, I will send another patch in a while, which will avoid sending ANSI escapes when output is not a terminal, and print one file path per line in that case. > I've pushed this now, (and I'm almost tempted to make it the > default...). IMHO it would be nice to have the messages-per-second information as well in verbose mode before making it the default. I think I could cook up a patch for that, but printing messages-per-second would mean calling gettimeofday() for each processed file. Do you think that will be acceptable from a performance POV? (Of course using silent mode would still only call it once per second). Regards, --=20 Adrian Perez de Castro Igalia - Free Software Engineering --Sig_/ryVqa/f7wDpCJ1s=bq1wDLq Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (GNU/Linux) iEYEARECAAYFAksJ3RgACgkQkcVZ2+TJEjuZhgCeLlmfTJSksh9WqD00P5aa9Moj NLEAnjiFXQM9qdHfBTT70TrdOQjH1ZyN =lt+V -----END PGP SIGNATURE----- --Sig_/ryVqa/f7wDpCJ1s=bq1wDLq-- From aperez@hikari.localdomain Sun Nov 22 16:53:17 2009 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 DAD76431FBC for ; Sun, 22 Nov 2009 16:53:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 gSz0oNWnlT8G for ; Sun, 22 Nov 2009 16:53:17 -0800 (PST) Received: from alice.connectical.com (alice.connectical.com [208.89.208.235]) by olra.theworths.org (Postfix) with ESMTP id 952F9431FAE for ; Sun, 22 Nov 2009 16:53:17 -0800 (PST) Received: (qmail 20466 invoked from network); 23 Nov 2009 00:53:16 -0000 Received: from 28.218.27.77.dynamic.mundo-r.com (HELO hikari.localdomain) (aperez@77.27.218.28) by alice.connectical.com with ESMTPA; 23 Nov 2009 00:53:16 -0000 Received: by hikari.localdomain (Postfix, from userid 500) id 7A8533114AF8; Mon, 23 Nov 2009 01:54:35 +0100 (CET) From: Adrian Perez To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 01:54:35 +0100 Message-Id: <1258937675-31405-1-git-send-email-aperez@igalia.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] ANSI escapes in "new" only when output is a tty X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 00:53:18 -0000 When running "notmuch new --verbose", ANSI escapes are used. This may not be desirable when the output of the command is *not* being sent to a terminal (e.g. when piping output into another command). In that case each file processed is printed in a new line and ANSI escapes are not used at all. --- notmuch-client.h | 1 + notmuch-new.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index f105c8b..4fe182e 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -74,6 +74,7 @@ typedef void (*add_files_callback_t) (notmuch_message_t *message); typedef struct { int ignore_read_only_directories; int saw_read_only_directory; + int output_is_a_tty; int verbose; int total_files; diff --git a/notmuch-new.c b/notmuch-new.c index a2b30bd..8172b49 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -180,10 +180,15 @@ add_files_recursive (notmuch_database_t *notmuch, state->processed_files++; if (state->verbose) { - printf ("\r\033[K%i/%i: %s\r", + if (state->output_is_a_tty) + printf("\r\033[K"); + + printf ("%i/%i: %s", state->processed_files, state->total_files, next); + + putchar((state->output_is_a_tty) ? '\r' : '\n'); fflush (stdout); } @@ -282,9 +287,7 @@ add_files (notmuch_database_t *notmuch, return NOTMUCH_STATUS_FILE_ERROR; } - if (isatty (fileno (stdout)) && ! debugger_is_active () - && ! state->verbose) - { + if (state->output_is_a_tty && ! debugger_is_active () && ! state->verbose) { /* Setup our handler for SIGALRM */ memset (&action, 0, sizeof (struct sigaction)); action.sa_handler = handle_sigalrm; @@ -405,6 +408,7 @@ notmuch_new_command (void *ctx, int argc, char *argv[]) int i; add_files_state.verbose = 0; + add_files_state.output_is_a_tty = isatty (fileno (stdout)); for (i = 0; i < argc && argv[i][0] == '-'; i++) { if (STRNCMP_LITERAL (argv[i], "--verbose") == 0) { -- 1.6.5.2 From jan@ryngle.com Sun Nov 22 16:56:16 2009 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 917FF431FBC for ; Sun, 22 Nov 2009 16:56:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 z-sMjSmbmd05 for ; Sun, 22 Nov 2009 16:56:16 -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 12090431FAE for ; Sun, 22 Nov 2009 16:56:15 -0800 (PST) Received: by fg-out-1718.google.com with SMTP id 19so643107fgg.2 for ; Sun, 22 Nov 2009 16:56:15 -0800 (PST) Received: by 10.103.205.19 with SMTP id h19mr443289muq.60.1258937775085; Sun, 22 Nov 2009 16:56:15 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id 25sm14323953mul.20.2009.11.22.16.56.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Nov 2009 16:56:14 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id E1CE4440651; Mon, 23 Nov 2009 01:56:04 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 01:56:04 +0100 Message-ID: <87pr7a5aaj.fsf@ryngle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [notmuch] search-tags and tag completion in notmuch.el X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 00:56:16 -0000 Hello, The three patches I sent to the list a couple of minutes ago is another revision of the patches that I had sent earlier. The first two patches implement support for 'notmuch search-tags'. The last patch adds support for tag completion to notmuch.el using the new command. Right now 'notmuch search-tags' can only list all tags from the database, it does not support search-terms yet (i.e. it cannot list tags for a restricted set of messages or threads), but I am working on that feature and I'm gonna send another patch implementing that soon. I think sending more smaller incremental patches makes it easier to review them (and for me personally it is easier to keep them up-to-date on top of moving Carl's git repository). I considered implementing 'notmuch search --output=tags' (as we discussed in another email), but it turned out that: * Having 'notmuch search-tags' would be consistent with Carl's 'notmuch search-messages'. * 'notmuch search' supports other command line options (--first, --max-threads, --sort) and these would only work when the user uses the command to search for messages. They would probably be useless if we use the command to search for tags and messages (well, at least some of them). Which means we would have to let the user know in the documentation, or disable some of them based on the value of the --output command line parameter, etc etc... * 'notmuch search-tags' is easier on fingers than 'notmuch search --output=tags' :-). In any case, we should probably keep it consistent with other commands and because Carl submitted 'notmuch search-messages", I did the same for tags. I'd personally prefer to use different commands for different kinds of output rather than overloading 'notmuch search' with more command line options, but it's just a personal preference. I can change the patch again if we decide that we're going to overload 'notmuch search' rather than add more commands. Comments, ideas, and suggestions are welcome! -- Jan From dottedmag@dottedmag.net Sun Nov 22 17:13:41 2009 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 5FDDB431FBC for ; Sun, 22 Nov 2009 17:13:41 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 etT6r1jbggiX for ; Sun, 22 Nov 2009 17:13:40 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id DC293431FAE for ; Sun, 22 Nov 2009 17:13:39 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id D82028C979 for ; Mon, 23 Nov 2009 02:13:36 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NCNUb-00049x-MJ for notmuch@notmuchmail.org; Mon, 23 Nov 2009 07:13:25 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 07:13:25 +0600 Message-Id: <1258938805-15961-1-git-send-email-dottedmag@dottedmag.net> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] Handle message renames in mail spool X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 01:13:41 -0000 In order to handle message renames the following changes were deemed necessary: * Mtime check on individual files was disabled. As files may be moved around without changing their mtime, it's necessary to parse them even if they appear old in case old message was moved. mtime check on directories was kept as moving files changes mtime of directory. * If message being parsed is already found in database under different path, then this message is considered to be moved, path is updated in database and this file does not undergo further processing. Note that after applying this patch notmuch still does not handle copying files (which is harmless, database will point to the last copy of message found during 'notmuch new') and deleting files (which is more serious, as dangling entries will show up in searches). Signed-off-by: Mikhail Gusarov --- lib/database.cc | 21 +++++++----- notmuch-new.c | 92 ++++++++++++++++++++++++++---------------------------- 2 files changed, 56 insertions(+), 57 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 2c90019..d88efbe 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -990,20 +990,23 @@ notmuch_database_add_message (notmuch_database_t *notmuch, if (private_status == NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND) { _notmuch_message_set_filename (message, filename); _notmuch_message_add_term (message, "type", "mail"); + + ret = _notmuch_database_link_message (notmuch, message, message_file); + if (ret) + goto DONE; + + date = notmuch_message_file_get_header (message_file, "date"); + _notmuch_message_set_date (message, date); + + _notmuch_message_index_file (message, filename); + } else if (strcmp(notmuch_message_get_filename(message), filename)) { + /* Message file has been moved/renamed */ + _notmuch_message_set_filename (message, filename); } else { ret = NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID; goto DONE; } - ret = _notmuch_database_link_message (notmuch, message, message_file); - if (ret) - goto DONE; - - date = notmuch_message_file_get_header (message_file, "date"); - _notmuch_message_set_date (message, date); - - _notmuch_message_index_file (message, filename); - _notmuch_message_sync (message); } catch (const Xapian::Error &error) { fprintf (stderr, "A Xapian exception occurred adding message: %s.\n", diff --git a/notmuch-new.c b/notmuch-new.c index 0dd2784..d16679c 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -174,54 +174,50 @@ add_files_recursive (notmuch_database_t *notmuch, } if (S_ISREG (st->st_mode)) { - /* If the file hasn't been modified since the last - * add_files, then we need not look at it. */ - if (path_dbtime == 0 || st->st_mtime > path_dbtime) { - state->processed_files++; - - status = notmuch_database_add_message (notmuch, next, &message); - switch (status) { - /* success */ - case NOTMUCH_STATUS_SUCCESS: - state->added_messages++; - tag_inbox_and_unread (message); - break; - /* Non-fatal issues (go on to next file) */ - case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: - /* Stay silent on this one. */ - break; - case NOTMUCH_STATUS_FILE_NOT_EMAIL: - fprintf (stderr, "Note: Ignoring non-mail file: %s\n", - next); - break; - /* Fatal issues. Don't process anymore. */ - case NOTMUCH_STATUS_READONLY_DATABASE: - case NOTMUCH_STATUS_XAPIAN_EXCEPTION: - case NOTMUCH_STATUS_OUT_OF_MEMORY: - fprintf (stderr, "Error: %s. Halting processing.\n", - notmuch_status_to_string (status)); - ret = status; - goto DONE; - default: - case NOTMUCH_STATUS_FILE_ERROR: - case NOTMUCH_STATUS_NULL_POINTER: - case NOTMUCH_STATUS_TAG_TOO_LONG: - case NOTMUCH_STATUS_UNBALANCED_FREEZE_THAW: - case NOTMUCH_STATUS_LAST_STATUS: - INTERNAL_ERROR ("add_message returned unexpected value: %d", status); - goto DONE; - } - - if (message) { - notmuch_message_destroy (message); - message = NULL; - } - - if (do_add_files_print_progress) { - do_add_files_print_progress = 0; - add_files_print_progress (state); - } - } + state->processed_files++; + + status = notmuch_database_add_message (notmuch, next, &message); + switch (status) { + /* success */ + case NOTMUCH_STATUS_SUCCESS: + state->added_messages++; + tag_inbox_and_unread (message); + break; + /* Non-fatal issues (go on to next file) */ + case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: + /* Stay silent on this one. */ + break; + case NOTMUCH_STATUS_FILE_NOT_EMAIL: + fprintf (stderr, "Note: Ignoring non-mail file: %s\n", + next); + break; + /* Fatal issues. Don't process anymore. */ + case NOTMUCH_STATUS_READONLY_DATABASE: + case NOTMUCH_STATUS_XAPIAN_EXCEPTION: + case NOTMUCH_STATUS_OUT_OF_MEMORY: + fprintf (stderr, "Error: %s. Halting processing.\n", + notmuch_status_to_string (status)); + ret = status; + goto DONE; + default: + case NOTMUCH_STATUS_FILE_ERROR: + case NOTMUCH_STATUS_NULL_POINTER: + case NOTMUCH_STATUS_TAG_TOO_LONG: + case NOTMUCH_STATUS_UNBALANCED_FREEZE_THAW: + case NOTMUCH_STATUS_LAST_STATUS: + INTERNAL_ERROR ("add_message returned unexpected value: %d", status); + goto DONE; + } + + if (message) { + notmuch_message_destroy (message); + message = NULL; + } + + if (do_add_files_print_progress) { + do_add_files_print_progress = 0; + add_files_print_progress (state); + } } else if (S_ISDIR (st->st_mode)) { status = add_files_recursive (notmuch, next, st, state); if (status && ret == NOTMUCH_STATUS_SUCCESS) -- 1.6.3.3 From cworth@cworth.org Sun Nov 22 17:19:43 2009 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 724FA431FC2; Sun, 22 Nov 2009 17:19:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ESKYxyq0xhwh; Sun, 22 Nov 2009 17:19:42 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6CD4C431FBC; Sun, 22 Nov 2009 17:19:42 -0800 (PST) From: Carl Worth To: Jjgod Jiang , Alexander Botero-Lowry In-Reply-To: References: <1258859256-33197-1-git-send-email-gzjjgod@gmail.com> <86pr7b9os2.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> Date: Mon, 23 Nov 2009 02:19:28 +0100 Message-ID: <87bpiughr3.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] Mac OS X compatibility fixes X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 01:19:43 -0000 On Sun, 22 Nov 2009 12:31:53 +0800, Jjgod Jiang wrote: > On Sun, Nov 22, 2009 at 12:17 PM, Alexander Botero-Lowry > > The problem is that notmuch does not have a fully functional configure > process yet, Carl did mention Makefile.local, but it seems this file is > not generated by configure right now. (No config.h either.) We do now have Makefile.config being generated, (and we can move to config.h to avoid the overly-long command-line problem if necessary). > I will be happy to fix my patch if such facility (like > AC_CHECK_FUNCS([getline])) exists. Chris, do you want to tackle this one? ;-) A really easy hack would be to detect glibc, and if present, use all the existing code in notmuch. If not present, then use all the compatibility functions. This could be by building a notmuch-compat.c that defines functions like _notmuch_strndup() and then adding thins like: #define strndup _notmuch_strndup. That would allow our current configure script to stay quite simple. If people want more sophistication we could write functions in the configuration script for doing test compiles to find functions, etc. -Carl From cworth@cworth.org Sun Nov 22 17:37:53 2009 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 24500431FBF; Sun, 22 Nov 2009 17:37:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 M6NabKg0TMJR; Sun, 22 Nov 2009 17:37:52 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id B67BB431FAE; Sun, 22 Nov 2009 17:37:51 -0800 (PST) From: Carl Worth To: Jjgod Jiang , notmuch@notmuchmail.org In-Reply-To: References: Date: Mon, 23 Nov 2009 02:37:37 +0100 Message-ID: <87aayeggwu.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Guide for new users? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 01:37:53 -0000 On Sun, 22 Nov 2009 12:44:17 +0800, Jjgod Jiang wrote: > I think it will be nice if we can have a guide/tutorial like > documentation for new users. For myself, I have the following > questions (I am an alpine user previously, so some of the > questions are not related to notmuch directly): Hi Jiang, welcome to notmuch! There's definitely a lot more documentation we could use. I think one of the things I'd like to know is, where did you look when you wanted answers to these questions? That can help us know where the best places are to put some answers. As for getting started with notmuch itself, I've tried to make it fairly self-guided. (That is, if you just run "notmuch"[*] it should keep telling you what to do next.) I'd be very interested in getting feedback from people on how well this works. Did you run it that way? Were its suggestions helpful? [*] The assumption being that people will try to run the program before reading any documentation. > 1. What's the most efficient way to sync mails from my gmail > account to a local Maildir? I've tried offlineimap but it > keeps crashing python (!) on my system (python 2.6, Mac OS X > 10.6.2). One of the big tricks with switching to notmuch is that there's so much that notmuch doesn't do. If one is coming from a monolithic email program (such as evolution) or webmail (such as gmail) then notmuch only replaces a tiny piece of the mail program, (search and tagging). But the user also needs replacements for all of the other pieces of the mail program. Such as: * Receiving mail * Composing mail (with a nice address book) * Sending mail And likely other stuff I'm not thinking of right now. So those things can involve lots of different programs. For receiving it might be offlineimap, getmail, fetchmail, procmail, maildrop or some combination. For composing it could be emacs, vim, etc. And sending mail might involve msmtp, postfix, or exim4, etc. That's a long list of packages, and likely an overwhelming set of possibilities as well as a ton to learn for setting these up and configuring them. So I think you're right that we're going to want some guide suggesting best practicing for setting things like this up. > 2. How to add notmuch.el into my .emacsrc? We've at least added this much to INSTALL now. First do: sudo make install-emacs Then in your .emacs add: (require 'notmuch) And then you can run "M-x notmuch". > I know notmuch feels like a tool for geeks, but it will probably > lower the barrier if someone can provide such a guide in a > straightforward, step-by-step way. A "tool for geeks" means that it works well and efficiently, (without "fluff" or mis-features). It doesn't mean that it needs to be hard to learn, or require specialized knowledge in advance before using it. So yes, I totally agree that we need to document things like this better, and make it as easy to start using notmuch as possible. -Carl From cworth@cworth.org Sun Nov 22 17:44:23 2009 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 06184431FBC; Sun, 22 Nov 2009 17:44:23 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 4oL1pln9Ss74; Sun, 22 Nov 2009 17:44:22 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id F3CE1431FAE; Sun, 22 Nov 2009 17:44:21 -0800 (PST) From: Carl Worth To: Jed Brown , Brett Viren , Jjgod Jiang In-Reply-To: <87zl6ev6fn.fsf@kunyang.i-did-not-set--mail-host-address--so-tickle-me> References: <46263c600911220641m4d6de6d9u190d41c3feb87bc7@mail.gmail.com> <87zl6ev6fn.fsf@kunyang.i-did-not-set--mail-host-address--so-tickle-me> Date: Mon, 23 Nov 2009 02:44:07 +0100 Message-ID: <878wdyggm0.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Guide for new users? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 01:44:23 -0000 On Sun, 22 Nov 2009 18:02:36 +0100, Jed Brown wrote: > Yes, however it will change flags which changes file names and currently > confuses notmuch. I synced [Gmail].All Mail with OfflineIMAP and am now > using Getmail to pull via POP. In the Gmail settings, activate POP > starting at the current time. I'll switch back to OfflineIMAP when > notmuch is happy with changing file names. Coming soon! I've been told the patch has been sent to the list already. > The following should save notmuch + Gmail users some time. Hey, that's a great document. We really need a nice wiki for notmuchmail.org already. (And when I say "wiki" I think I really mean something with email-based submission of some sort.) I suppose that with ikiwiki I could easily write a script to accept an email on stdin and make a git commit out of it. So then I could just pipe useful messages straight from my inbox to the wiki. I think that's what I'll do. (For now, I'll tag that message as notmuch-wiki so I will be able to easily find it later.) Another thing I'd really like would be a notmuch-based interface to our mailing list archives. Then I would tag the previous message as "howto", "gmail", "getmail", and "offlineimap". Anyway, thanks for sharing this! -Carl From cworth@cworth.org Sun Nov 22 18:09:14 2009 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 29A99431FBF; Sun, 22 Nov 2009 18:09:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 FhgIGx9bFCZs; Sun, 22 Nov 2009 18:09:13 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 37F98431FAE; Sun, 22 Nov 2009 18:09:13 -0800 (PST) From: Carl Worth To: Alec Berryman , notmuch@notmuchmail.org In-Reply-To: <20091122051826.GA7299@thened.net> References: <20091122051826.GA7299@thened.net> Date: Mon, 23 Nov 2009 03:08:58 +0100 Message-ID: <877htigfgl.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Support multiple configuration files via $NOTMUCH_CONFIG X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 02:09:14 -0000 On Sat, 21 Nov 2009 23:18:26 -0600, Alec Berryman wrote: > If present, $NOTMUCH_CONFIG will be used as the configuration file > location. Hi Alec, welcome to notmuch! And thanks for this patch. I've pushed it now. I need this quite often when setting up a new database for testing a patch, for example. And I had an environment variable for the database path once upon a time, before adding a configuration file. But I lost that feature when adding the configuration file. So it's really nice to have this functionality back again. We should probably add support for "notmuch -f " as well. I've noted that idea in the TODO file now, (which just keeps growing somehow). -Carl From cworth@cworth.org Sun Nov 22 18:39:09 2009 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 2569A431FBF; Sun, 22 Nov 2009 18:39:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 eGkLKnyVSDTU; Sun, 22 Nov 2009 18:38:40 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 433C0431FAE; Sun, 22 Nov 2009 18:38:40 -0800 (PST) From: Carl Worth To: Jan Janak , notmuch@notmuchmail.org In-Reply-To: <1258893156-25849-1-git-send-email-jan@ryngle.com> References: <1258893156-25849-1-git-send-email-jan@ryngle.com> Date: Mon, 23 Nov 2009 03:38:25 +0100 Message-ID: <876392ge3i.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] notmuch-new: Eliminate gcc warning caused by ino_cmp. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 02:39:09 -0000 On Sun, 22 Nov 2009 13:32:36 +0100, Jan Janak wrote: > The function passed to scandir in the fourth argument takes two > const void* arguments. To eliminate the gcc warning about incompatible > types, we change ino_cmp to match this and then re-type the parameters > in the body of ino_cmp. Actually, on my system at least, (Linux with glibc 2.10.1), our current function matches the prototype. So applying your patch actually *introduces* a warning where there was no warning before. What a nuisance... Any ideas for a good fix, anyone? -Carl From cworth@cworth.org Sun Nov 22 18:41:19 2009 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 88B5D431FBF; Sun, 22 Nov 2009 18:41:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 VOpFRtCRvi98; Sun, 22 Nov 2009 18:41:19 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 91D08431FAE; Sun, 22 Nov 2009 18:41:18 -0800 (PST) From: Carl Worth To: Jan Janak , notmuch@notmuchmail.org In-Reply-To: <1258893877-28436-1-git-send-email-jan@ryngle.com> References: <1258893877-28436-1-git-send-email-jan@ryngle.com> Date: Mon, 23 Nov 2009 03:41:04 +0100 Message-ID: <874oomgdz3.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] makefile: Tell echo to interpret escape sequences. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 02:41:19 -0000 On Sun, 22 Nov 2009 13:44:37 +0100, Jan Janak wrote: > The initial message that informs the user about the possibility to use > make V=1 contains a \n at the end, but echo wouldn't interpret that > properly without the -e command line option. Patch doesn't work for me. Before patch: 0:~/src/notmuch:(master)$ make Use "make V=1" to see the verbose compile lines. CC notmuch-new.o CXX notmuch After patch: 0:~/src/notmuch:(master)$ make -e Use "make V=1" to see the verbose compile lines. CC debugger.o -e CC gmime-filter-reply.o -e CC notmuch.o It's a shame that simple things like "echo" aren't easy to use portably. (And yes, I know that autoconf has a bunch of tests for echo, such as how to get the behavior of "echo -n", etc.) -Carl From jan@ryngle.com Sun Nov 22 18:47:26 2009 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 74E87431FBF for ; Sun, 22 Nov 2009 18:47:26 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 sBBGF8vs6YUS for ; Sun, 22 Nov 2009 18:47:25 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 95837431FAE for ; Sun, 22 Nov 2009 18:47:25 -0800 (PST) Received: by bwz24 with SMTP id 24so3606156bwz.30 for ; Sun, 22 Nov 2009 18:47:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.26.152 with SMTP id e24mr4236487bkc.119.1258944444721; Sun, 22 Nov 2009 18:47:24 -0800 (PST) In-Reply-To: <876392ge3i.fsf@yoom.home.cworth.org> References: <1258893156-25849-1-git-send-email-jan@ryngle.com> <876392ge3i.fsf@yoom.home.cworth.org> Date: Mon, 23 Nov 2009 03:47:24 +0100 Message-ID: From: Jan Janak To: Carl Worth Content-Type: text/plain; charset=UTF-8 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] notmuch-new: Eliminate gcc warning caused by ino_cmp. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 02:47:26 -0000 On Mon, Nov 23, 2009 at 3:38 AM, Carl Worth wrote: > On Sun, 22 Nov 2009 13:32:36 +0100, Jan Janak wrote: >> The function passed to scandir in the fourth argument takes two >> const void* arguments. To eliminate the gcc warning about incompatible >> types, we change ino_cmp to match this and then re-type the parameters >> in the body of ino_cmp. > > Actually, on my system at least, (Linux with glibc 2.10.1), our current > function matches the prototype. So applying your patch actually > *introduces* a warning where there was no warning before. > > What a nuisance... > > Any ideas for a good fix, anyone? OK, I have an older version of glibc. If the original code works with glibc 2.10 then just ignore the patch. I think testing for a particular version of glibc is not worth the effort (it's just a warning anyway). -- Jan From cworth@cworth.org Sun Nov 22 18:49:54 2009 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 867BC431FBF; Sun, 22 Nov 2009 18:49:54 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 7MMhaDouCQyk; Sun, 22 Nov 2009 18:49:53 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 15FCB431FAE; Sun, 22 Nov 2009 18:49:53 -0800 (PST) From: Carl Worth To: Jan Janak , notmuch@notmuchmail.org In-Reply-To: <1258894535-30056-1-git-send-email-jan@ryngle.com> References: <1258894535-30056-1-git-send-email-jan@ryngle.com> Date: Mon, 23 Nov 2009 03:49:38 +0100 Message-ID: <873a46gdkt.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] makefile: Declare clean target as phony. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 02:49:54 -0000 On Sun, 22 Nov 2009 13:55:35 +0100, Jan Janak wrote: > This ensures that make clean always proceeds, even if the user > accidentally creates a file named 'clean'. Also, it ignores errors in > rm and other commands. Now *this* patch worked fine for me. Thanks! I've pushed it now. -Carl From jan@ryngle.com Sun Nov 22 19:02:27 2009 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 447B1431FAE for ; Sun, 22 Nov 2009 19:02:27 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 WNstan37CWlx for ; Sun, 22 Nov 2009 19:02:25 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 20026431FBC for ; Sun, 22 Nov 2009 19:02:24 -0800 (PST) Received: by bwz24 with SMTP id 24so3609541bwz.30 for ; Sun, 22 Nov 2009 19:02:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.34.201 with SMTP id m9mr4220736bkd.77.1258945344068; Sun, 22 Nov 2009 19:02:24 -0800 (PST) In-Reply-To: <874oomgdz3.fsf@yoom.home.cworth.org> References: <1258893877-28436-1-git-send-email-jan@ryngle.com> <874oomgdz3.fsf@yoom.home.cworth.org> Date: Mon, 23 Nov 2009 04:02:24 +0100 Message-ID: From: Jan Janak To: Carl Worth Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] makefile: Tell echo to interpret escape sequences. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 03:02:27 -0000 On Mon, Nov 23, 2009 at 3:41 AM, Carl Worth wrote: > On Sun, 22 Nov 2009 13:44:37 +0100, Jan Janak wrote: >> The initial message that informs the user about the possibility to use >> make V=3D1 contains a \n at the end, but echo wouldn't interpret that >> properly without the -e command line option. > > Patch doesn't work for me. > > Before patch: > > =C2=A0 =C2=A0 =C2=A0 =C2=A00:~/src/notmuch:(master)$ make > =C2=A0 =C2=A0 =C2=A0 =C2=A0Use "make V=3D1" to see the verbose compile li= nes. > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC =C2=A0 =C2=A0notmuch-new.o > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CXX =C2=A0 notmuch > > After patch: > > =C2=A0 =C2=A0 =C2=A0 =C2=A00:~/src/notmuch:(master)$ make > =C2=A0 =C2=A0 =C2=A0 =C2=A0-e Use "make V=3D1" to see the verbose compile= lines. > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC =C2=A0 =C2=A0debugger.o > =C2=A0 =C2=A0 =C2=A0 =C2=A0-e =C2=A0 CC gmime-filter-reply.o > =C2=A0 =C2=A0 =C2=A0 =C2=A0-e =C2=A0 CC notmuch.o > > It's a shame that simple things like "echo" aren't easy to use portably. > (And yes, I know that autoconf has a bunch of tests for echo, such as > how to get the behavior of "echo -n", etc.) It seems your echo interprets escape sequences by default. When I run make, the first line of output looks like this: Use "make V=3D1" to see the verbose compile lines.\n CC debugger.o CC gmime-filter-reply.o CC notmuch.o This is on Debian Lenny. Anyway, this one is not important either. -- Jan From cworth@cworth.org Sun Nov 22 19:03:28 2009 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 535A1431FC0; Sun, 22 Nov 2009 19:03:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 K0KqAm0liQKT; Sun, 22 Nov 2009 19:03:27 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id F0F23431FBC; Sun, 22 Nov 2009 19:03:26 -0800 (PST) From: Carl Worth To: Keith Packard , notmuch@notmuchmail.org In-Reply-To: References: <1258493565-13508-1-git-send-email-keithp@keithp.com> <87d43axi4e.fsf@yoom.home.cworth.org> Date: Mon, 23 Nov 2009 04:03:12 +0100 Message-ID: <87zl6eeydr.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 03:03:28 -0000 On Sun, 22 Nov 2009 15:32:13 -0800, Keith Packard wrote: > That's a fine plan. It 'shouldn't' be too hard to implement either. Noted in TODO for future reference. > Btw, I'm thinking that it might be useful to create some 'global' > notmuch keybindings and then create per-view bindings that also expose > the global bindings. That way, things like 'm' to create a new mail > would work consistently in each view. Note that this idea is > inconsistent with the following though... That's an excellent idea. And it's consistent with what I want 'a' to do, (and I do think it's important to have these commands consistent across the views). I think it's natural too. See below... > I was trying to make the 'normal' action easier; for me, if I'm looking > at a message, then the normal action is to mark it read and archived, > but when I'm looking only at the subject line in the search window, the > normal action is just to mark it archived (having not actually read the > message). I agree that "normal" should be easier too. So I just need to win you over to my notion of "normal", (and teach you of the ways of the magic space bar). The most normal thing (for me) to do *when at the end of a thread* is to mark it read, archive it, and then advance to the next message. And that's exactly what space bar does. If you're not at the end of a thread, then you can archive it, (that's what 'a' is for), but it shouldn't be marked read, (because otherwise that would be "cheating").[*] And if you want to cheat willingly, (notmuch, please consider these messages read even though you've never presented them to me), then that should require an extra-explicit action. So that's the shift key. [*] We should perhaps fix 'a' to remove the "unread" tag from any messages that _are_ wholly visible in the current window. It's really only when an entire thread fits this one, and I *did* read it, that I end up reaching for the 'A' binding. So does that make sense? The question of whether you next want to see the next message, or you would rather return to the search view, is a trickier one. I'd suggest that there's no harm in seeing the next message after archiving the current message, from which you can immediately return to the search view with 'q' (or 'x' currently, but not with your patch). That does mean that "archive and return to search" does require two keys instead of one. Hmm... if we fix 'a' to correctly remove "unread" from wholly presented messages, then I wouldn't need the current 'A' keybinding at all. That is, notmuch would be automatically managing "unread" tags in a fairly consistent way, and we wouldn't be giving UI for the "cheating", (which should be fine---I can't see a good reason for cheating here). If we did that, then we could make 'a' do archive-go-to-next-message and 'A' do archive-return-to-search-view. What would you think about that? -Carl Date: Mon, 23 Nov 2009 04:02:59 +0100 Message-ID: <871vjqgcyk.fsf@yoom.home.cworth.org> From cworth@cworth.org Sun Nov 22 19:12:11 2009 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 672F4431FC0; Sun, 22 Nov 2009 19:12:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 kQQ1D2yQXwXu; Sun, 22 Nov 2009 19:12:10 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id F0C17431FAE; Sun, 22 Nov 2009 19:12:09 -0800 (PST) From: Carl Worth To: "Jeffrey C. Ollie" , Not Much Mail In-Reply-To: <1258897630-22282-1-git-send-email-jeff@ocjtech.us> References: <1258897630-22282-1-git-send-email-jeff@ocjtech.us> Date: Mon, 23 Nov 2009 04:11:55 +0100 Message-ID: <87y6lyexz8.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Add SCons build files. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 03:12:11 -0000 On Sun, 22 Nov 2009 07:47:10 -0600, "Jeffrey C. Ollie" wrote: > The SCons build files included here *should* do everything that the > current Makefiles do, plus a little bit of configuration checking. To > build/install: Hi Jeffrey, Thanks for your effort to code all this up. But I'm afraid I really don't want to switch away from just using (GNU) make for the actual compilation. I don't know anything about scons, but if you can use it to write a python script that just does the configuration step, (outputting a Makefile.config say), then that might be very interesting. Some people have recently told me that python would be a much more sane language for doing configuration in than shell. I don't know if they're right or not, but I'm (somewhat) willing to have multiple implementations of the configure script (since there's always the option to just skip it and configure Makefile.config manually). But I'm definitely not willing to have multiple build systems. > Yes, I'm sure that make is widely available, but as notmuch gets used > on a wider variety of systems some sort of configuration system will > become necessary. If I can prevent another project from going down > the autoconf/automake path I'll be happy. I started creating CMake > build files but I don't know CMake well enough to come up with a > working build. I'm totally glad to try to avoid autoconf/automake. I know for sure that I never want to use libtool again, (I've learned that the hard way). I don't have as much prejudice against automake, but I've heard a rumor that it's hard to make it *not* use libtool. Meanwhile, the only advantage I know for automake is that once it's setup, adding a new file to compile is as simple as adding one file to a list in the Makefile.am. We've already got notmuch as easy as that with just adding a file to a list in Makefile.local. So then all that's left is a configuration system. The notion of how the final "configure" script from autoconf works seems just fine to me, but I'm not sure the implementation of autoconf itself is sound. I've been maintaining a project for years (cairo) where the m4-complexity in configure.ac has far outgrown my ability to understand it. And I'm extremely uncomfortable with a build system I can't understand. Meanwhile, cairo *still* has a shell script needed just to bootstrap the autconf/automake/libtool house of cards, and that shell script alone is 194 lines. So I'd very much like to continue exploring what we can do with our own configuration system, (in whatever language/language(s) make sense). In the meantime, I'm happy that I can just checkout and build notmuch on a Linux system with no configure step at all. I also like that the build-system doesn't trigger constant re-runs of configure all the time. I've spent too many days of my life watching autoconf output scroll by, and I'd really like to avoid going down that road. So yes, Jeffrey, if avoiding autoconf is the motivation, then I'm right there with you. But I'm not convinced that throwing out GNU make is the right thing to do as well. Thanks for listening, -Carl From cworth@cworth.org Sun Nov 22 19:22:23 2009 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 4113F431FBF; Sun, 22 Nov 2009 19:22:23 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 aLx7U7PeLLRP; Sun, 22 Nov 2009 19:22:22 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 302F2431FAE; Sun, 22 Nov 2009 19:22:22 -0800 (PST) From: Carl Worth To: djcb@djcbsoftware.nl, "notmuch\@notmuchmail org" In-Reply-To: <87d43ay4qg.wl%djcb@djcbsoftware.nl> References: <87d43ay4qg.wl%djcb@djcbsoftware.nl> Date: Mon, 23 Nov 2009 04:22:07 +0100 Message-ID: <87vdh2exi8.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] fix compiler warnings X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 03:22:23 -0000 On Sun, 22 Nov 2009 17:11:03 +0200, Dirk-Jan C. Binnema wrote: > > (hopefully this is the correct way to send patches...) Looks just fine, and welcome to notmuch! > With these minor changes, notmuch compiles warning-free with gcc 4.4.1 Could you resend these as separate patches, each patch fixing a single type of warning? That would make it more clear what the code is doing. > - write(2, msg, sizeof(msg)-1); > + if (write(2, msg, sizeof(msg)-1) < 0) { > + /* ignore...*/ > + } I don't like the gratuitous conditional here. It clutters the code and make is less clear. If we're just trying to squelch a warning about an unused return value from a function, then I think I'd rather see: ssize_t ignored; ignored = write (2, msg, sizeof (msg) - 1); What do you think? -Carl From cworth@cworth.org Sun Nov 22 19:29:14 2009 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 7B156431FBF; Sun, 22 Nov 2009 19:29:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 M35PK3USlKAP; Sun, 22 Nov 2009 19:29:13 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 171C1431FAE; Sun, 22 Nov 2009 19:29:12 -0800 (PST) From: Carl Worth To: Brett Viren , Mike Hommey In-Reply-To: <46263c600911220715q44960645x80f4909415b24d6@mail.gmail.com> References: <20091121145111.GB19397@excalibur.local> <87fx874xj5.fsf@yoom.home.cworth.org> <46263c600911211436s5826015eqc5fc18a4164245cb@mail.gmail.com> <20091122083646.GA8420@glandium.org> <46263c600911220715q44960645x80f4909415b24d6@mail.gmail.com> Date: Mon, 23 Nov 2009 04:28:58 +0100 Message-ID: <87skc5gbr9.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] 25 minutes load time with emacs -f notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 03:29:14 -0000 On Sun, 22 Nov 2009 10:15:39 -0500, Brett Viren wrote: > On Sun, Nov 22, 2009 at 3:36 AM, Mike Hommey wrote: > But, here is one that looks I/O bound: > > notmuch tag -unread tag:inbox > > I have my home directory on an encfs volume and I see it and notmuch > competing for CPU when viewing "top". Yes. The "notmuch tag" command currently does much more IO than it really should. This is Xapian bug 250. Please see: id:874oon4pgv.fsf@yoom.home.cworth.org for some details and thoughts on the bug from me and some pointers on how one could go about fixing it. -Carl From cworth@cworth.org Sun Nov 22 19:38:44 2009 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 2E63C431FBF; Sun, 22 Nov 2009 19:38:44 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 8mZcDiwFLu4Z; Sun, 22 Nov 2009 19:38:43 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2E5A3431FAE; Sun, 22 Nov 2009 19:38:43 -0800 (PST) From: Carl Worth To: Bart Trojanowski , notmuch@notmuchmail.org In-Reply-To: <1258906771-6869-1-git-send-email-bart@jukie.net> References: <1258906771-6869-1-git-send-email-bart@jukie.net> Date: Mon, 23 Nov 2009 04:38:28 +0100 Message-ID: <87r5rpgbbf.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] fix notmuch-new bug when database path ends with a trailing / X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 03:38:44 -0000 On Sun, 22 Nov 2009 11:19:31 -0500, Bart Trojanowski wrote: > The actual bug was in the filename normalization for storage in the > database. The database.path was removed from the full filename, but if > the database.path from the config file contained a trailing /, the > relative file name would retain an extra leading /... which made it look > like an absolute path after it was read out from the DB. Thanks for the fix, Bart! I've pushed this out now. -Carl From cworth@cworth.org Sun Nov 22 19:51:50 2009 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 504FB431FBF; Sun, 22 Nov 2009 19:51:50 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 WyTmEipyC3aF; Sun, 22 Nov 2009 19:51:49 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C73E8431FAE; Sun, 22 Nov 2009 19:51:48 -0800 (PST) From: Carl Worth To: "Aneesh Kumar K.V" , notmuch@notmuchmail.org In-Reply-To: <1258914526-30984-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1258914526-30984-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Date: Mon, 23 Nov 2009 04:51:34 +0100 Message-ID: <87pr79gapl.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [RFC PATCH -V2] notmuch: Add support for multiple maildirs X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 03:51:50 -0000 On Sun, 22 Nov 2009 23:58:46 +0530, "Aneesh Kumar K.V" wrote: > This patch separate database path and maildir paths. > It also adds support for multiple maildir paths which > is represented by comma separated values. I have a running joke with my good friend Behdad that we should add a git-hook to refuse any commit with the word "also" in the commit message. It's often a sign that the commit is actually doing two independent things, and that those two independent things should be split into separate commits. I think that's the case here. > You need to have in ~/.notmuch-config > [maildirs] > path=path1,path2 Documentation in the commit message doesn't count. We need this documentation to be inserted into the configuration file as a comment, like with the other values. > + dirs = g_key_file_get_string (config->key_file, > + "maildirs", "path", NULL); > + if (dirs) { > + size = sizeof(struct count_ele) + strlen(dirs) + 1; > + /* comma separated paths */ > + maildirs = (struct count_ele *)malloc(size); There's a g_key_file_get_string_list function that will do all the splitting of a multiple-valued configuration entry into multiple strings. I suggest using that here instead of doing open-coded parsing. > - prompt ("Top-level directory of your email archive [%s]: ", > + prompt ("Directory for notmuch database [%s]: ", Is there really a reason to prompt for this here, rather than just using a default value (and letting the user know what it is?). One thing I'm worried about is the user thinking they can run "notmuch setup", change this value, and expect things to work, (which of course, they won't). I'd be happier if the user understood that the database is relocatable and they can just "mv" things around as they want to. Of course, for that, then we'd actually need to *make* the database relocatable. One thing that we get right now with the .notmuch directory _inside_ the mail directory is that everything is relocatable. If you just pull it out, like you do here, then suddenly the database will be full of absolute paths to mail files, and things will break if the top-level mail-directory is moved. And that's a regression compared to the current case. > + prompt ("Comma separated maildirs [%s]: ", cmaildirs); If we are going to support multiple directories for mail here, then we should prompt separately for each (like we are doing for the email addresses already). Also, I'd prefer something like "Top-level directory of email archive" like we had before. I certainly don't want to give the user the impression that they need to type in a path to each individual maildir that they have. Finally, (and maybe I should have started with this), what's the actual use case here? Is it difficult to just arrange all mail to be under one top-level directory, (perhaps just using symlinks even). -Carl From keithp@keithp.com Sun Nov 22 19:52:08 2009 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 03ED9431FAE for ; Sun, 22 Nov 2009 19:52:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 2zRHz5P1Q4NX for ; Sun, 22 Nov 2009 19:52:06 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id B2946431FBF for ; Sun, 22 Nov 2009 19:52:05 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id A2A22B9402F; Sun, 22 Nov 2009 19:52:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id cjNIrzmMxRt1; Sun, 22 Nov 2009 19:52:01 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 804D2B84011; Sun, 22 Nov 2009 19:52:01 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 70462B80040; Sun, 22 Nov 2009 19:52:01 -0800 (PST) From: Keith Packard To: Carl Worth , notmuch@notmuchmail.org In-Reply-To: <87zl6eeydr.fsf@yoom.home.cworth.org> References: <1258493565-13508-1-git-send-email-keithp@keithp.com> <87d43axi4e.fsf@yoom.home.cworth.org> <87zl6eeydr.fsf@yoom.home.cworth.org> Date: Sun, 22 Nov 2009 19:52:00 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 03:52:08 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Mon, 23 Nov 2009 04:03:12 +0100, Carl Worth wrote: > I agree that "normal" should be easier too. So I just need to win you > over to my notion of "normal", (and teach you of the ways of the magic > space bar). As I mentioned, I rarely read mail in a linear fashion; I don't want it to show me another message, I want to see the index again. I'm torn over whether I just want the index to always be visible; having the full screen available to view a single thread is awfully nice. It seems like a 'I'm done, go back to the index' is just what is needed here. > [*] We should perhaps fix 'a' to remove the "unread" tag from any > messages that _are_ wholly visible in the current window. It's really > only when an entire thread fits this one, and I *did* read it, that I > end up reaching for the 'A' binding. yes, that does make a lot of sense, and do precisely the same for the 'x' key, leaving 'q' the way to get out of a message without changing it at all. > If we did that, then we could make 'a' do archive-go-to-next-message > and 'A' do archive-return-to-search-view. What would you think about > that? I'd take 'x' for 'return to search view; otherwise you're going to wear out my pinky reaching for the shift key. That leaves us with three commands: 'a': advance to next message, archiving current thread, marking read messages. ('A' forces all messages in thread to be marked as read) 'x': exit to search view, archiving current thread, marking read messages. ('X' forces all messages in thread to be marked as read) 'q': quit back to search view, leaving thread tags unmodified. There's a slightly weird asymmetry here -- there's no way to advance to the next thread and not mark messages. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLCgbgQp8BWwlsTdMRAmiuAJ41fkUFpSMi2yvWHqofyFBcraIZCgCZAfwK 6sQYdtEgs7iXLqyiCnS88s8= =/2Ug -----END PGP SIGNATURE----- --=-=-=-- From cworth@cworth.org Sun Nov 22 20:14:40 2009 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 A06D7431FBC; Sun, 22 Nov 2009 20:14:40 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 tnFU+TtGvH3U; Sun, 22 Nov 2009 20:14:39 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 3E48E431FAE; Sun, 22 Nov 2009 20:14:39 -0800 (PST) From: Carl Worth To: Jed Brown , notmuch@notmuchmail.org In-Reply-To: <1258920736-14205-1-git-send-email-jed@59A2.org> References: <1258920736-14205-1-git-send-email-jed@59A2.org> Date: Mon, 23 Nov 2009 05:14:25 +0100 Message-ID: <87ocmtg9ni.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] New function notmuch-search-operate-all: operate on all messages in the current query. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 04:14:40 -0000 On Sun, 22 Nov 2009 21:12:16 +0100, Jed Brown wrote: > It is often convenient to change tags on several messages at once. This > function applies any number of tag whitespace-delimited tag > modifications to all messages matching the current query. > > I have bound this to `*'. Very nice, Jed! I've been wanting this feature for a while, and I think you just improved on my idea in at least two ways. First I was imagining that the '*' would be a prefix command, but I like it just prompting for the '+' or '-' as part of the argument. That's no more typing and allows for doing multiple tags at once. Second, I like that you just used the search string again, (as opposed to just walking through the buffer looking at thread IDs). That seems elegant. On second thought, however, using the search string is problematic for at least two reasons: First, this creates a race condition in that the user will rightly expect to only be adding/removing tags from the visible results. But if new mail has been incorporated between creating the current view and running '*' then threads could be tagged that were never seen and that could be problematic. Second, since we're in the search view which shows threads, we should really be operating on threads. But this tag command won't work like the '+' and '-' commands in this buffer. Those commands will add/remove a tag to/from every message in the thread[*]. The new '*' command, however will only be changing tags on messages that match the query. So I think we should fix both of these issues by looping over each line of the buffer and calling (notmuch-search-add-tag) or (notmuch-search-remove-tag). What do you think? -Carl [*] These existing '+' and '-' operations (as well as 'a') that act on the entire thread also have a race condition. They are potentially modifying more messages than the original search matched. This is often harmless, (you aren't even *seeing* the messages so how can you complain if more get modified than were there when you did the search.). But it can actually be fatal: Imagine I sent a message to the list, and then in the search view I see that message appear and it has [1/1] indicating it's the only message in the thread. I might archive this "knowing" I've read the message already, but this could actually archive a reply as well that arrived between when I did the search and when I archived. So that's a bug that we really should fix. [And noted that archiving an entire thread from the notmuch-show-mode does not have this bug since it acts only on the explicit messages that are presented.] One option to fix this would be for "notmuch search" to list all the message IDs that matched in place of the thread ID (for notmuch-search-mode to hide away like it does with the thread ID currently). But that seems like it might get problematic with some hugely long threads. Anyway, I'm interested in ideas for what we could do here. Oh, here's one: We could add something like "notmuch tag --expecting= 1/23 " that would not do the tag unless the search string matched 1 message out of 23 total messages in the thread. Then we could give a warning to the user. That works for the single-thread case, but the warning would be harder for the user to deal with in the '*' case. Or maybe not---the emacs function could just stop on the first line with the error and then the user would see what's going on. And we could take a prefix argument to ignore such errors. Any other thoughts on this? From cworth@cworth.org Sun Nov 22 20:30:38 2009 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 66A9C431FBF; Sun, 22 Nov 2009 20:30:38 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 8IXL5uaiBCst; Sun, 22 Nov 2009 20:30:37 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 70FB9431FAE; Sun, 22 Nov 2009 20:30:37 -0800 (PST) From: Carl Worth To: Tassilo Horn , notmuch@notmuchmail.org In-Reply-To: <877hti71f4.fsf@thinkpad.tsdh.de> References: <877hti71f4.fsf@thinkpad.tsdh.de> Date: Mon, 23 Nov 2009 05:30:23 +0100 Message-ID: <87my2dg8ww.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] How to index /var/spool/mail with notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 04:30:38 -0000 On Sun, 22 Nov 2009 21:24:47 +0100, Tassilo Horn wrote: > But I get some permission problems when trying to index /var/spool/mail. > I was able to create a .notmuch/ directory in there with permissions set > to 700 for my user. All mail files are readable for my user. > > Unfortunately, there are some dovecot internal files, which should > neither be indexed by notmuch, and which have 600 permissions for the > mail user. And that's where notmuch errors and stops indexing. :-( Hi Tassilo, welcome to notmuch! I'm glad you found a workaround for this problem, (thanks Jed!). But perhaps these errors should be made into warnings instead? Any thoughts on that anyone? > All "real" mail files are named "u.", so it would be cool if I > could provide a pattern to notmuch matching all files I'd like to index. > And maybe the other way round (a blacklist pattern) would be useful, > too. I've been planning on having a blacklist pattern for a while. Originally, the only difficulty in implementing it was that we had nowhere to store configuration information. But we have a configuration file now, so this would be a pretty easy thing to implement. It's not as obvious that a whitelist pattern would be as widely useful, but it would be possible too. -Carl From cworth@cworth.org Sun Nov 22 20:35:08 2009 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 9CC9D431FBF; Sun, 22 Nov 2009 20:35:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 CgWJq-42yES0; Sun, 22 Nov 2009 20:35:07 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 63ADE431FAE; Sun, 22 Nov 2009 20:35:07 -0800 (PST) From: Carl Worth To: "Jeffrey C. Ollie" , Not Much Mail In-Reply-To: <1258924631-17326-1-git-send-email-jeff@ocjtech.us> References: <1258924631-17326-1-git-send-email-jeff@ocjtech.us> Date: Mon, 23 Nov 2009 05:34:53 +0100 Message-ID: <87ljhxg8pe.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Add install target for desktop files. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 04:35:08 -0000 On Sun, 22 Nov 2009 15:17:11 -0600, "Jeffrey C. Ollie" wrote: > Add an install target that uses desktop-file-install to install the > desktop file in the appropriate location. The location of the install > can be modified by changing the desktop_dir variable. Hi Jeffrey, I suppose if we're going to have a .desktop file it only makes sense to install it. A couple of questions: > +install-desktop: > + install -d $(DESTDIR)$(desktop_dir) > + desktop-file-install --mode 0644 --dir $(DESTDIR)$(desktop_dir) notmuch.desktop What does desktop-file-install do for us here? Anything that we couldn't do with just "install"? I'm just wanting to be careful that we don't break "make install" for people who may not even want this file. If we really do need to install it with desktop-file-install, we could do a configure check for that program, of course. Thanks, -Carl From jeff@ocjtech.us Sun Nov 22 20:36:33 2009 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 AAA9B431FAE for ; Sun, 22 Nov 2009 20:36:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 xrnSvKnM6nZ3 for ; Sun, 22 Nov 2009 20:36:31 -0800 (PST) Received: from mail-yw0-f200.google.com (mail-yw0-f200.google.com [209.85.211.200]) by olra.theworths.org (Postfix) with ESMTP id 5586F431FBC for ; Sun, 22 Nov 2009 20:36:31 -0800 (PST) Received: by ywh38 with SMTP id 38so4572604ywh.6 for ; Sun, 22 Nov 2009 20:36:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.91.26.7 with SMTP id d7mr6067063agj.1.1258950990974; Sun, 22 Nov 2009 20:36:30 -0800 (PST) In-Reply-To: <87y6lyexz8.fsf@yoom.home.cworth.org> References: <1258897630-22282-1-git-send-email-jeff@ocjtech.us> <87y6lyexz8.fsf@yoom.home.cworth.org> Date: Sun, 22 Nov 2009 22:36:30 -0600 Message-ID: <935ead450911222036o141956e0o11056c9d7a45781b@mail.gmail.com> From: Jeffrey Ollie To: Carl Worth Content-Type: text/plain; charset=UTF-8 Cc: Not Much Mail Subject: Re: [notmuch] [PATCH] Add SCons build files. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 04:36:33 -0000 On Sun, Nov 22, 2009 at 9:11 PM, Carl Worth wrote: > > But I'm afraid I really don't want to switch away from just using (GNU) > make for the actual compilation. > > I don't know anything about scons, but if you can use it to write a > python script that just does the configuration step, (outputting a > Makefile.config say), then that might be very interesting. Well, to me, part of the appeal of SCons is that it doesn't generate Makefiles. This article is a little old, but the first three sections are a pretty good rundown on the limitations of Make. http://www.scons.org/wiki/FromMakeToScons If you really want a tool that generates Makefiles, take a look at CMake. Unfortunately, I think CMake tries to do too much with the Makefiles and they become close to unreadable. In the attempt I made to come up with CMake build files, CMake generates at least 3800 lines of Makefiles (from a starting point of 30 lines of build files). > Some people > have recently told me that python would be a much more sane language for > doing configuration in than shell. Well, Python is a much more sane language for doing just about anything as far as I'm concerned. :) > I don't know if they're right or not, but I'm (somewhat) willing to have > multiple implementations of the configure script (since there's always > the option to just skip it and configure Makefile.config manually). But > I'm definitely not willing to have multiple build systems. I think that having multiple different configuration systems would be pretty awful, especially if people make changes to their favourite configuration system and hope that someone else fixes the others. > Meanwhile, the only advantage I know for automake is that once it's > setup, adding a new file to compile is as simple as adding one file to a > list in the Makefile.am. We've already got notmuch as easy as that with > just adding a file to a list in Makefile.local. Once SCons is set up, adding a new file is just a matter of adding the name of the file to a list as well. CMake is the same, and I'm sure that other systems are similar. > So I'd very much like to continue exploring what we can do with our own > configuration system, (in whatever language/language(s) make sense). It would seem to me that we would be re-inventing a lot of the work already done by other people. > Thanks for listening, Same here. -- Jeff Ollie From cworth@cworth.org Sun Nov 22 20:39:44 2009 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 88BBA431FBC; Sun, 22 Nov 2009 20:39:44 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 mU4t7PKVEx5Z; Sun, 22 Nov 2009 20:39:44 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id AA21F431FAE; Sun, 22 Nov 2009 20:39:43 -0800 (PST) From: Carl Worth To: Jed Brown , Bart Trojanowski In-Reply-To: <87ws1i44n1.fsf@59A2.org> References: <87y6ly45fc.fsf@59A2.org> <20091122213649.GJ17268@jukie.net> <87ws1i44n1.fsf@59A2.org> Date: Mon, 23 Nov 2009 05:39:29 +0100 Message-ID: <87k4xhg8hq.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [RFC] Precedence of OR and AND X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 04:39:44 -0000 On Sun, 22 Nov 2009 22:43:30 +0100, Jed Brown wrote: > On Sun, 22 Nov 2009 16:36:49 -0500, Bart Trojanowski wrote: > Absolutely, and I have this applied locally to notmuch.el, Patch please? > but I didn't > fix notmuch-search-filter-by-tag because that would really need to parse > the expression. I don't see the difference here. Any time we append to the search string, we should be doing so with parentheses. > I'm just asking if anyone else thinks binding OR > tighter than AND would be desirable. Right now, Xapian is doing all of our query parsing. So we'd have to take things up there to get anything changed for now. In the future we might be forced into writing our own query parser to get all the functionality we want. -Carl From jeff@ocjtech.us Sun Nov 22 20:43:43 2009 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 CC825431FBF for ; Sun, 22 Nov 2009 20:43:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 OsiSZKtcZeEJ for ; Sun, 22 Nov 2009 20:43:43 -0800 (PST) Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com [209.85.210.204]) by olra.theworths.org (Postfix) with ESMTP id 33DA3431FAE for ; Sun, 22 Nov 2009 20:43:43 -0800 (PST) Received: by yxe42 with SMTP id 42so5143036yxe.22 for ; Sun, 22 Nov 2009 20:43:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.90.22.17 with SMTP id 17mr742155agv.76.1258951422753; Sun, 22 Nov 2009 20:43:42 -0800 (PST) In-Reply-To: <87vdh2exi8.fsf@yoom.home.cworth.org> References: <87d43ay4qg.wl%djcb@djcbsoftware.nl> <87vdh2exi8.fsf@yoom.home.cworth.org> Date: Sun, 22 Nov 2009 22:43:42 -0600 Message-ID: <935ead450911222043s59f3e185n8cb0d1c46bbe9f7a@mail.gmail.com> From: Jeffrey Ollie To: Carl Worth Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "notmuch@notmuchmail org" , djcb@djcbsoftware.nl Subject: Re: [notmuch] [PATCH] fix compiler warnings X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 04:43:44 -0000 On Sun, Nov 22, 2009 at 9:22 PM, Carl Worth wrote: > On Sun, 22 Nov 2009 17:11:03 +0200, Dirk-Jan C. Binnema wrote: >> >> - =C2=A0 =C2=A0write(2, msg, sizeof(msg)-1); >> + =C2=A0 =C2=A0if (write(2, msg, sizeof(msg)-1) < 0) { >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* ignore...*/ >> + =C2=A0 =C2=A0} > > I don't like the gratuitous conditional here. It clutters the code and > make is less clear. If we're just trying to squelch a warning about an > unused return value from a function, then I think I'd rather see: > > =C2=A0 =C2=A0 =C2=A0 =C2=A0ssize_t ignored; > > =C2=A0 =C2=A0 =C2=A0 =C2=A0ignored =3D write (2, msg, sizeof (msg) - 1); Isn't the usual method for ignoring return values casting to void? (void) write (2, msg, sizeof (msg) - 1); --=20 Jeff Ollie From cworth@cworth.org Sun Nov 22 20:48:13 2009 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 2E76F431FBF; Sun, 22 Nov 2009 20:48:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ggfEluEaz4R4; Sun, 22 Nov 2009 20:48:12 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A4C2A431FAE; Sun, 22 Nov 2009 20:48:11 -0800 (PST) From: Carl Worth To: Tassilo Horn , notmuch@notmuchmail.org In-Reply-To: <87einqut6j.fsf@thinkpad.tsdh.de> References: <87einqut6j.fsf@thinkpad.tsdh.de> Date: Mon, 23 Nov 2009 05:47:57 +0100 Message-ID: <87iqd1g83m.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Catching up unread messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 04:48:13 -0000 On Sun, 22 Nov 2009 22:48:52 +0100, Tassilo Horn wrote: > I got notmuch running, and it's absolutely incredible. It's so damn > fast and the results are very good. So thanks a lot for creating this > nice piece of software. :-) Fantastic, Tassilo. I'm glad you got things working and are happy with the results. And you're quite welcome. I'm just glad I'm able to share something that has been really useful for me. > Ok, so new the question: I indexed all my 63.000 mails, and because it > was a first-time indexing, all my mail now has the tags inbox and > unread. Of course, I don't want to SPC through all threads (using the > great emacs interface) to remove the unread status. So is there some > catchup command, which marks all messages in the buffer as read? If you were to look at the notmuch/TODO file right now, you would see as the first lines: Fix the things that are causing the most pain to new users ---------------------------------------------------------- 1. A new import is tagging all messages as "inbox" -- total pain So yes, I understand that this is not useful behavior! Also, the pain is amplified because the command to *remove* these tags is currently very slow. So there's some work we need to do before the initial experience with notmuch is really pleasant for a lot of people. > BTW, what's the intention of the inbox tag? When I've read a thread, > both inbox as well as unread disappear, so I don't get the difference > between them. If you get half-way through reading a thread, and then exit, then when you come back to that thread, notmuch will start you out at the first unread message in the thread, (and all the read messages will be collapsed). Also I often end up archiving entire threads without reading them, (often for mailing lists that I don't read closely, but just skim the subject lines once a day or so). For cases like this, I think it's useful to be able to say things like: I almost never read this list in its entirety, but I want to find that message I actually did read recently: notmuch search tag:lkml and tag:read Another thing that I think is a little bit useful is if someone points me to a specific message, it's nice to be able to see "unread" and say "Oh, yeah, I don't think I ever read that at all." So that's the idea anyway, (and thanks to sup for showing us the way here). -Carl From cworth@cworth.org Sun Nov 22 20:55:58 2009 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 2976A431FBF; Sun, 22 Nov 2009 20:55:58 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 oSQFUVcwGArg; Sun, 22 Nov 2009 20:55:57 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 305AA431FAE; Sun, 22 Nov 2009 20:55:56 -0800 (PST) From: Carl Worth To: Jameson Graef Rollins , Bart Trojanowski In-Reply-To: <20091122231419.GA8322@finestructure.net> References: <1258927116-528-1-git-send-email-jrollins@finestructure.net> <1258927116-528-2-git-send-email-jrollins@finestructure.net> <1258927116-528-3-git-send-email-jrollins@finestructure.net> <20091122221523.GA8703@finestructure.net> <20091122222453.GM17268@jukie.net> <20091122231419.GA8322@finestructure.net> Date: Mon, 23 Nov 2009 05:55:42 +0100 Message-ID: <87hbslg7qp.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 3/3] change config file location to be ~/.notmuch/config X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 04:55:58 -0000 On Sun, 22 Nov 2009 18:14:20 -0500, Jameson Graef Rollins wrote: > I think Carl said he wanted to keep the ability to specify exactly > where the database is stored, so if we could move away from something > that makes any implicit assumptions about relative paths between the > database and the maildir, then all should be ok. Well, I chose the relative-path assumptions intentionally. The idea is that if I move my mail from ~/Mail to ~/mail then the .notmuch directory moves with it and everything continues to work just fine. Compare the way .git works and the database stays with the source files compared to the way cvs works, (where I always seemed to end up with source files disconnected from the database). So I might need more convincing to move the database away from the mail. -Carl From cworth@cworth.org Sun Nov 22 21:01:10 2009 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 81153431FBF; Sun, 22 Nov 2009 21:01:10 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 9ftBLCwcmVFv; Sun, 22 Nov 2009 21:01:09 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 51AE0431FAE; Sun, 22 Nov 2009 21:01:09 -0800 (PST) From: Carl Worth To: Adrian Perez de Castro , notmuch@notmuchmail.org In-Reply-To: <20091123015339.79e51228@hikari> References: <1258762638-22905-1-git-send-email-aperez@igalia.com> <87r5rqks0m.fsf@yoom.home.cworth.org> <20091123015339.79e51228@hikari> Date: Mon, 23 Nov 2009 06:00:55 +0100 Message-ID: <87fx85g7i0.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Support for printing file paths in new command X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 05:01:10 -0000 On Mon, 23 Nov 2009 01:53:39 +0100, Adrian Perez de Castro wrote: > IMHO it would be nice to have the messages-per-second information as > well in verbose mode before making it the default. I think I could cook > up a patch for that, but printing messages-per-second would mean calling > gettimeofday() for each processed file. Do you think that will be > acceptable from a performance POV? (Of course using silent mode would > still only call it once per second). Or how about using the existing timer to cause a rate to be printed between the message output once per second? -Carl From cworth@cworth.org Sun Nov 22 21:12:24 2009 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 E7658431FBF; Sun, 22 Nov 2009 21:12:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 sIhKERtLN4Rd; Sun, 22 Nov 2009 21:12:24 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 7F1AD431FAE; Sun, 22 Nov 2009 21:12:23 -0800 (PST) From: Carl Worth To: Adrian Perez , notmuch@notmuchmail.org In-Reply-To: <1258937675-31405-1-git-send-email-aperez@igalia.com> References: <1258937675-31405-1-git-send-email-aperez@igalia.com> Date: Mon, 23 Nov 2009 06:12:09 +0100 Message-ID: <87d439g6za.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] ANSI escapes in "new" only when output is a tty X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 05:12:25 -0000 On Mon, 23 Nov 2009 01:54:35 +0100, Adrian Perez wrote: > When running "notmuch new --verbose", ANSI escapes are used. This may not be > desirable when the output of the command is *not* being sent to a terminal > (e.g. when piping output into another command). In that case each file > processed is printed in a new line and ANSI escapes are not used at > all. I've pushed this now. And I've noticed two things with it: 1. The filenames are often quite long, and if longer than my terminal width, then I get one line per output rather than one line continually erased and reprinted. Any good idea about how to fix that without going too crazy? 2. On any run after the first, the output says "1/0", "2/0", etc. So we should fix that to either not print the "/0" when total_messages is 0 *or* we can just make "notmuch new" unconditionally count the number of files to be processed, (which I've been thinking I wanted to do anyway). I'm trying to eliminate any remaining differences between "notmuch new" on an initial run and "notmuch new" run later. An important reason to eliminate these differences is that we want to support the user interrupting the initial database build and then starting it up again without losing anything. Besides the file counting, (which would only make such a user lose the countdown timer on the subsequent runs), the only other thing we have different about the first run is that it doesn't ignore read-only directories. And that one's a problem because it means that if someone (like me) that has a bunch of read-only directories does the following: notmuch dump notmuch.dump rm -rf ~/mail/notmuch notmuch new # then interrupt this with control-C notmuch new # oops! This missed most of my mail notmuch restore notmuch.dump Things go badly wrong here as any mail in read-only directories that didn't get picked up in the first "notmuch new" run will forever more be ignored by notmuch new. So that's totally broken and we should come up with a way to fix it. -Carl From aneesh.kumar@linux.vnet.ibm.com Sun Nov 22 21:21:31 2009 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 2F5D6431FBC for ; Sun, 22 Nov 2009 21:21:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 b363J-i9C7WQ for ; Sun, 22 Nov 2009 21:21:30 -0800 (PST) Received: from e23smtp09.au.ibm.com (e23smtp09.au.ibm.com [202.81.31.142]) by olra.theworths.org (Postfix) with ESMTP id C0311431FAE for ; Sun, 22 Nov 2009 21:21:29 -0800 (PST) Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp09.au.ibm.com (8.14.3/8.13.1) with ESMTP id nANGLSZL004459 for ; Tue, 24 Nov 2009 03:21:28 +1100 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAN5LRxk1429548 for ; Mon, 23 Nov 2009 16:21:27 +1100 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAN5LRBK000320 for ; Mon, 23 Nov 2009 16:21:27 +1100 Received: from localhost.localdomain (N20wks267599wss.in.ibm.com [9.124.31.111] (may be forged)) by d23av01.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAN5LPrP032642; Mon, 23 Nov 2009 16:21:25 +1100 From: "Aneesh Kumar K.V" To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 10:51:20 +0530 Message-Id: <1258953680-11605-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.6.5.2.74.g610f9 Subject: [notmuch] [PATCH -v3] notmuch.el: Add face support to search and show mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 05:21:31 -0000 This add two faces, notmuch-show-subject-face and notmuch-tag-face. The first face is used to show the subject line in the notmuch-show-mode and the second one to show tags in the notmuch-search-mode. We can selectively highlight each tag by setting notmuch-tag-face-alist as below (defface notmuch-tag-unread-face '((((class color) (background light)) (:foreground "goldenrod" :bold t)) (((class color) (background dark)) (:foreground "goldenrod" :bold t))) "Notmuch search mode face used to highligh tags.") (defface notmuch-tag-inbox-face '((((class color) (background light)) (:foreground "red" :bold t)) (((class color) (background dark)) (:foreground "red" :bold t))) "Notmuch search mode face used to highligh tags.") (setq notmuch-tag-face-alist '(("unread" . 'notmuch-tag-unread-face) ("inbox" . 'notmuch-tag-inbox-face))) (require 'notmuch) Signed-off-by: Aneesh Kumar K.V --- notmuch.el | 40 ++++++++++++++++++++++++++++++++++++++-- 1 files changed, 38 insertions(+), 2 deletions(-) diff --git a/notmuch.el b/notmuch.el index 1f24461..2aa6d5a 100644 --- a/notmuch.el +++ b/notmuch.el @@ -686,6 +686,18 @@ which this thread was originally shown." (force-window-update) (redisplay t)) +(defface notmuch-show-subject-face + '((((class color) (background light)) (:foreground "yellow" :bold t)) + (((class color) (background dark)) (:foreground "yellow" :bold t))) + "Notmuch show mode face used to highligh subject line." + :group 'notmuch) + +(defvar notmuch-show-font-lock-keywords + (list ;; header in font-lock-type-face + (list "\\(Subject:.*$\\)" + '(1 'notmuch-show-subject-face))) + "Additonal expression to hightlight in notmuch-show-mode") + ;;;###autoload (defun notmuch-show-mode () "Major mode for viewing a thread with notmuch. @@ -726,7 +738,9 @@ view, (remove the \"inbox\" tag from each), with (use-local-map notmuch-show-mode-map) (setq major-mode 'notmuch-show-mode mode-name "notmuch-show") - (setq buffer-read-only t)) + (setq buffer-read-only t) + (set (make-local-variable 'font-lock-defaults) + '(notmuch-show-font-lock-keywords t))) ;;;###autoload @@ -855,6 +869,17 @@ thread from that buffer can be show when done with this one)." (goto-char (point-max)) (forward-line -1)) +(defface notmuch-tag-face + '((((class color) (background light)) (:foreground "goldenrod" :bold t)) + (((class color) (background dark)) (:foreground "goldenrod" :bold t))) + "Notmuch search mode face used to highligh tags." + :group 'notmuch) + +(defvar notmuch-tag-face-alist nil + "List containing the tag list that need to be highlighed") + +(defvar notmuch-search-font-lock-keywords nil) + ;;;###autoload (defun notmuch-search-mode () "Major mode for searching mail with notmuch. @@ -885,7 +910,18 @@ global search. (setq truncate-lines t) (setq major-mode 'notmuch-search-mode mode-name "notmuch-search") - (setq buffer-read-only t)) + (setq buffer-read-only t) + (if (not notmuch-tag-face-alist) + (add-to-list 'notmuch-search-font-lock-keywords (list + "\\(([^)]*)$\\)" '(1 'notmuch-tag-face))) + (progn + (setq notmuch-search-tags (mapcar 'car notmuch-tag-face-alist)) + (loop for notmuch-search-tag in notmuch-search-tags + do (add-to-list 'notmuch-search-font-lock-keywords (list + (concat "\\(" notmuch-search-tag "\\)") + `(1 ,(cdr (assoc notmuch-search-tag notmuch-tag-face-alist)))))))) + (set (make-local-variable 'font-lock-defaults) + '(notmuch-search-font-lock-keywords t))) (defun notmuch-search-find-thread-id () (save-excursion -- 1.6.5.2.74.g610f9 From aneesh.kumar@linux.vnet.ibm.com Sun Nov 22 21:23:57 2009 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 18C9E431FAE for ; Sun, 22 Nov 2009 21:23:57 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 rq0ZdC0Wlwon for ; Sun, 22 Nov 2009 21:23:55 -0800 (PST) Received: from e28smtp02.in.ibm.com (e28smtp02.in.ibm.com [122.248.162.2]) by olra.theworths.org (Postfix) with ESMTP id 1D4D0431FBC for ; Sun, 22 Nov 2009 21:23:54 -0800 (PST) Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by e28smtp02.in.ibm.com (8.14.3/8.13.1) with ESMTP id nAN5NpOL028229 for ; Mon, 23 Nov 2009 10:53:51 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAN5NpQt3731586 for ; Mon, 23 Nov 2009 10:53:51 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAN5Npvv021038 for ; Mon, 23 Nov 2009 16:23:51 +1100 Received: from skywalker.linux.vnet.ibm.com (N20wks267599wss.in.ibm.com [9.124.31.111]) by d28av05.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAN5NnSR021004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 23 Nov 2009 16:23:51 +1100 Date: Mon, 23 Nov 2009 10:53:49 +0530 From: "Aneesh Kumar K.V" To: Carl Worth Message-ID: <20091123052349.GA10662@skywalker.linux.vnet.ibm.com> References: <1258914526-30984-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <87pr79gapl.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pr79gapl.fsf@yoom.home.cworth.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [RFC PATCH -V2] notmuch: Add support for multiple maildirs X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 05:23:57 -0000 On Mon, Nov 23, 2009 at 04:51:34AM +0100, Carl Worth wrote: > Finally, (and maybe I should have started with this), what's the actual > use case here? Is it difficult to just arrange all mail to be under one > top-level directory, (perhaps just using symlinks even). > Ok i switched to using a separate directory for notmuch and symlink the interested folders into that. So you can ignore the patch -aneesh From cworth@cworth.org Sun Nov 22 22:06:24 2009 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 49E46431FBF; Sun, 22 Nov 2009 22:06:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 zB0QjTR929lT; Sun, 22 Nov 2009 22:06:23 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 147CE431FAE; Sun, 22 Nov 2009 22:06:23 -0800 (PST) From: Carl Worth To: Keith Packard , notmuch@notmuchmail.org In-Reply-To: References: Date: Mon, 23 Nov 2009 07:06:06 +0100 Message-ID: <87639122sx.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] notmuch 'index' mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 06:06:24 -0000 On Fri, 20 Nov 2009 23:35:29 -0800, Keith Packard wrote: > I posted a patch adding an 'index' mode to notmuch and though I'd > explain my idea. Most mail systems provide a 'folder view' mode which > displays the set of folders and a count of messages in each folder. I > used this myself as the first sort of which messages I want to read. I've just pushed this set of patches out now. I like it quite a bit. Here are some thoughts: * The mode documentation really needs to walk the user through how to setup a custom set of folders. * It's not opening my "to-me" folder for some reason. (I thought it was the '-' at first, but "xorg-board" is working fine). I can debug this later. * The presentation is impressively spartan[*]. :-) If we spruce this up a bit, I think we'll want to make this the default view of "M-x notmuch". Oh, and instead of just documenting how to set a variable in .emacs we should just provide commands to add/remove folders. > One missing piece here is that the searches don't have a > total/unread count. Because the 'notmuch count' command is so fast > (notmuch count the returns 532891 on my machine, and takes 0.240 > seconds), we really could count the number of messages matching a single > tag and then *also* count the number of messages matching that tag and > the inbox tag. I think the number of threads matching the search is the only interesting number actually. Otherwise, you just end up printing a bunch of big numbers that the user doesn't need for anything. > Another missing piece is that these should be shared with the > notmuch-poll script, probably via the .notmuch-config file. I do like > that I can have some entries here that aren't in my notmuch-poll script. Yes, once we add configuration for automated tagging, we'll want to figure out how to include those here. I'm not sure if they should just be an initial default that the user tweaks, or if any configured rules from that file should always be presented until the user explicitly asks for one to be ignored (think about a "spam" tag). So that might take some experimentation. You're definitely right that we want to support searches other than simply the tag names in the configuration file. For example, here's the search I'm currently using for the "notmuch" folder (so I can process outstanding patches in order): tag:notmuch and (tag:inbox or tag:todo) Though, really, I probably wouldn't mind using a search string like that for any of my automated tags. It's equivalent to what you were doing if there are no "todo" tags on messages with the tag of interest, and then as soon as there are any "todo" tags on any of those messages, then I probably do want them in that folder. So maybe the user configures a search template to use for each automatic tag or so? > It might be nice to make this hierarchical as I used to do with > evolution's vfolder stuff -- an 'intel' folder with an 'intel/unread' > sub-folder. That would be done with simple conjunctions of tags, but > providing some structure on the screen might be nice. > > I'm also wondering if we should elide, or at least change the appearance, > of lines which match zero messages. Two nice ideas. > I'd also like to be able to get the system to display my mail in three > panes -- one with the index, one with the current search and the last > with the current thread. Getting those laid out on the screen correctly > and letting you get them back to that layout easily would make notmuch > look a lot more like other email clients, a form I've found fairly > functional as I do not generally read mail in a linear fashion. Yes. Emacs has pretty good support for saving and restoring an entire window configuration, so we should be able to make this work. And by the way, lest you be misled by the "magic space bar", I don't read my mail very linearly either. I always filter by at least one tag first and I want to prioritize which one. The folder mode is great for this. It's only when I get my search results down below a particular threshold that I decide I want to read everything linearly. (And if I can't get a particular folder down that small, then I'll do selective reading (with 'x', yes, I think we're agreeing on that now), and then archive away the lot.) Anyway, thanks for the great addition to notmuch. -Carl [*] A nice thing about this is it give us plenty of room to have a paragraph or two explaining how notmuch works, what the user can expect, what keys to use, etc. From djcb@djcbsoftware.nl Sun Nov 22 22:20:43 2009 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 D14F5431FBF for ; Sun, 22 Nov 2009 22:20:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 fDOkc6VNh1dP for ; Sun, 22 Nov 2009 22:20:42 -0800 (PST) Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi [195.197.172.111]) by olra.theworths.org (Postfix) with ESMTP id B2028431FAE for ; Sun, 22 Nov 2009 22:20:42 -0800 (PST) Received: from djcbsoftware.nl (a88-112-254-208.elisa-laajakaista.fi [88.112.254.208]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by gw03.mail.saunalahti.fi (Postfix) with ESMTP id 1293521672F for ; Mon, 23 Nov 2009 08:20:41 +0200 (EET) Received: from cthulhu.mindcrime.djcbsoftware.nl (localhost [127.0.0.1]) by djcbsoftware.nl (Postfix) with ESMTP id B8C4C39C009 for ; Mon, 23 Nov 2009 08:20:40 +0200 (EET) Date: Mon, 23 Nov 2009 08:20:40 +0200 Message-ID: <87skc5yd6v.wl%djcb@djcbsoftware.nl> From: Dirk-Jan C. Binnema To: "notmuch@notmuchmail org" Mail-Reply-To: djcb@djcbsoftware.nl User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.1 Mule/6.0 (HANACHIRUSATO) Organization: DJCBSoftware MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Subject: [notmuch] [PATCH 1/2] * avoid gcc 4.4.1 compiler warnings due to ignored write return values X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: djcb@djcbsoftware.nl 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, 23 Nov 2009 06:20:44 -0000 From: Dirk-Jan C. Binnema Date: Mon, 23 Nov 2009 08:03:35 +0200 --- notmuch-new.c | 4 +++- notmuch-tag.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index a2b30bd..3d04efa 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -35,8 +35,10 @@ static volatile sig_atomic_t interrupted; static void handle_sigint (unused (int sig)) { + ssize_t ignored; static char msg[] = "Stopping... \n"; - write(2, msg, sizeof(msg)-1); + + ignored = write(2, msg, sizeof(msg)-1); interrupted = 1; } diff --git a/notmuch-tag.c b/notmuch-tag.c index e2311f6..ec98c3b 100644 --- a/notmuch-tag.c +++ b/notmuch-tag.c @@ -25,8 +25,10 @@ static volatile sig_atomic_t interrupted; static void handle_sigint (unused (int sig)) { + ssize_t ignored; + static char msg[] = "Stopping... \n"; - write(2, msg, sizeof(msg)-1); + ignored = write(2, msg, sizeof(msg)-1); interrupted = 1; } -- 1.6.3.3 From cworth@cworth.org Sun Nov 22 22:21:08 2009 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 5B73B431FC3; Sun, 22 Nov 2009 22:21:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 JzkxKY9StBWJ; Sun, 22 Nov 2009 22:21:07 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 1C0FC431FBC; Sun, 22 Nov 2009 22:21:06 -0800 (PST) From: Carl Worth To: Jeffrey Ollie In-Reply-To: <935ead450911222036o141956e0o11056c9d7a45781b@mail.gmail.com> References: <1258897630-22282-1-git-send-email-jeff@ocjtech.us> <87y6lyexz8.fsf@yoom.home.cworth.org> <935ead450911222036o141956e0o11056c9d7a45781b@mail.gmail.com> Date: Mon, 23 Nov 2009 07:20:52 +0100 Message-ID: <874ool224b.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Not Much Mail Subject: Re: [notmuch] [PATCH] Add SCons build files. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 06:21:08 -0000 On Sun, 22 Nov 2009 22:36:30 -0600, Jeffrey Ollie wrote: > Well, to me, part of the appeal of SCons is that it doesn't generate > Makefiles. This article is a little old, but the first three > sections are a pretty good rundown on the limitations of Make. > > http://www.scons.org/wiki/FromMakeToScons Not very convincing to me at least. Half of it is limitations of various make implementations, (notmuch is definitely not trying to be portable across those---it uses GNU make). The other half is about problems in how make is often used, (like slow recursive make runs, or incomplete dependencies---but we've got a nice non-recursive make setup in notmuch and good dependency generation). It is true that make is doing timestamp-based checks rather than content-based, but things like this are things that people are quite familiar in deailing with. > If you really want a tool that generates Makefiles, take a look at > CMake. No I don't want a tool to generate Makefiles. I want to write the Makefiles, (which I've done). I'm willing to have a tool to create the configuration, (really just some variables accessible at compile-time). Right now we're storing these in a Makefile snippet named "Makefile.config" but we could just as easily be putting them in "config.h". > I think that having multiple different configuration systems would be > pretty awful, especially if people make changes to their favourite > configuration system and hope that someone else fixes the others. It's early times. I'm willing to entertain different ideas and have people propose different means of doing the configure step. Long-term we'll likely only have one supported thing. > It would seem to me that we would be re-inventing a lot of the work > already done by other people. But there's really so little to invent here. It's just not that hard to do the kinds of configuration that notmuch needs. So far we've got a few pkg-config checks and that gets us a long ways. Beyond that, the only portability improvements requested so far will require only the following from configure: * Find which of the compiler warning flags we want are available. * Find whether we have some particular library functions are available. And for these steps, all we have to do is to *compile* some test programs. And compiling programs is something our build system knows how to do already (since that's all it does). So I'm just not seeing that we'll spend much time reinventing anything. -Carl From djcb@djcbsoftware.nl Sun Nov 22 22:21:53 2009 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 118AE431FBC for ; Sun, 22 Nov 2009 22:21:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 jVgrDr8M8xWN for ; Sun, 22 Nov 2009 22:21:52 -0800 (PST) Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi [195.197.172.111]) by olra.theworths.org (Postfix) with ESMTP id 6EE83431FAE for ; Sun, 22 Nov 2009 22:21:52 -0800 (PST) Received: from djcbsoftware.nl (a88-112-254-208.elisa-laajakaista.fi [88.112.254.208]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by gw03.mail.saunalahti.fi (Postfix) with ESMTP id D4EB4216806 for ; Mon, 23 Nov 2009 08:21:50 +0200 (EET) Received: from cthulhu.mindcrime.djcbsoftware.nl (localhost [127.0.0.1]) by djcbsoftware.nl (Postfix) with ESMTP id 7E1BB39C009 for ; Mon, 23 Nov 2009 08:21:50 +0200 (EET) Date: Mon, 23 Nov 2009 08:21:50 +0200 Message-ID: <87r5rpyd4x.wl%djcb@djcbsoftware.nl> From: Dirk-Jan C. Binnema To: "notmuch@notmuchmail org" Mail-Reply-To: djcb@djcbsoftware.nl User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.1 Mule/6.0 (HANACHIRUSATO) Organization: DJCBSoftware MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Subject: [notmuch] [PATCH 2/2] * avoid gcc 4.4.1 compiler warning due to ignored 'fflush' return value X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: djcb@djcbsoftware.nl 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, 23 Nov 2009 06:21:53 -0000 --- notmuch-setup.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/notmuch-setup.c b/notmuch-setup.c index d06fbf8..c50f812 100644 --- a/notmuch-setup.c +++ b/notmuch-setup.c @@ -100,12 +100,13 @@ notmuch_setup_command (unused (void *ctx), unsigned int i; int is_new; -#define prompt(format, ...) \ - do { \ - printf (format, ##__VA_ARGS__); \ - fflush (stdout); \ - getline (&response, &response_size, stdin); \ - chomp_newline (response); \ +#define prompt(format, ...) \ + do { \ + int ignored; \ + printf (format, ##__VA_ARGS__); \ + fflush (stdout); \ + ignored = getline (&response, &response_size, stdin); \ + chomp_newline (response); \ } while (0) config = notmuch_config_open (ctx, NULL, &is_new); -- 1.6.3.3 From cworth@cworth.org Sun Nov 22 22:31:20 2009 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 59891431FBF; Sun, 22 Nov 2009 22:31:20 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 nXXPYsQNZf0J; Sun, 22 Nov 2009 22:31:19 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 173DC431FAE; Sun, 22 Nov 2009 22:31:18 -0800 (PST) From: Carl Worth To: Keith Packard , notmuch@notmuchmail.org In-Reply-To: References: <1258493565-13508-1-git-send-email-keithp@keithp.com> <87d43axi4e.fsf@yoom.home.cworth.org> <87zl6eeydr.fsf@yoom.home.cworth.org> Date: Mon, 23 Nov 2009 07:31:04 +0100 Message-ID: <873a4521nb.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 06:31:20 -0000 On Sun, 22 Nov 2009 19:52:00 -0800, Keith Packard wrote: > I'd take 'x' for 'return to search view; otherwise you're going to wear > out my pinky reaching for the shift key. That leaves us with three > commands: > > 'a': advance to next message, archiving current thread, marking read > messages. ('A' forces all messages in thread to be marked as read) > > 'x': exit to search view, archiving current thread, marking read > messages. ('X' forces all messages in thread to be marked as read) > > 'q': quit back to search view, leaving thread tags unmodified. OK. You win. That looks pretty good to me. > There's a slightly weird asymmetry here -- there's no way to advance to > the next thread and not mark messages. Well, there's "q, n, RET" at least. ;-) -Carl From kha@treskal.com Sun Nov 22 23:05:20 2009 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 7A98B431FBC for ; Sun, 22 Nov 2009 23:05:20 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 V0VYYcATVFEp for ; Sun, 22 Nov 2009 23:05:18 -0800 (PST) Received: from mail1.space2u.com (mail1.space2u.com [62.20.1.135]) by olra.theworths.org (Postfix) with ESMTP id 8E499431FAE for ; Sun, 22 Nov 2009 23:05:18 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) (authenticated bits=0) by mail1.space2u.com (8.14.3/8.14.3) with ESMTP id nAN75Amp031326 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NOT) for ; Mon, 23 Nov 2009 08:05:11 +0100 Received: by bwz24 with SMTP id 24so3664502bwz.30 for ; Sun, 22 Nov 2009 23:05:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.48.144 with SMTP id r16mr1754832bkf.170.1258959916607; Sun, 22 Nov 2009 23:05:16 -0800 (PST) In-Reply-To: <874oomgdz3.fsf@yoom.home.cworth.org> References: <1258893877-28436-1-git-send-email-jan@ryngle.com> <874oomgdz3.fsf@yoom.home.cworth.org> Date: Mon, 23 Nov 2009 08:05:16 +0100 Message-ID: From: Karl Wiberg To: Carl Worth Content-Type: text/plain; charset=UTF-8 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] makefile: Tell echo to interpret escape sequences. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 07:05:20 -0000 On Mon, Nov 23, 2009 at 3:41 AM, Carl Worth wrote: > It's a shame that simple things like "echo" aren't easy to use portably. > (And yes, I know that autoconf has a bunch of tests for echo, such as > how to get the behavior of "echo -n", etc.) I think the standard workaround is to use "printf" instead. -- Karl Wiberg, kha@treskal.com subrabbit.wordpress.com www.treskal.com/kalle From djcb@djcbsoftware.nl Sun Nov 22 23:08:40 2009 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 B9333431FBC for ; Sun, 22 Nov 2009 23:08:40 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 81JpAx+QzS5b for ; Sun, 22 Nov 2009 23:08:38 -0800 (PST) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by olra.theworths.org (Postfix) with ESMTP id D6DE9431FAE for ; Sun, 22 Nov 2009 23:08:37 -0800 (PST) Received: from djcbsoftware.nl (a88-112-254-208.elisa-laajakaista.fi [88.112.254.208]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by gw02.mail.saunalahti.fi (Postfix) with ESMTP id 50C2F13956C; Mon, 23 Nov 2009 09:08:34 +0200 (EET) Received: from cthulhu.mindcrime.djcbsoftware.nl (localhost [127.0.0.1]) by djcbsoftware.nl (Postfix) with ESMTP id 8280B39C032; Mon, 23 Nov 2009 09:08:34 +0200 (EET) Date: Mon, 23 Nov 2009 09:08:34 +0200 Message-ID: <87pr79yaz1.wl%djcb@djcbsoftware.nl> From: Dirk-Jan C. Binnema To: Carl Worth In-Reply-To: <877htifa0e.fsf@yoom.home.cworth.org> References: <87aayggsjp.wl%djcb@djcbsoftware.nl> <87iqd43wot.fsf@yoom.home.cworth.org> <87skc6n3yp.wl%djcb@djcbsoftware.nl> <877htifa0e.fsf@yoom.home.cworth.org> Mail-Reply-To: djcb@djcbsoftware.nl User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.1 Mule/6.0 (HANACHIRUSATO) Organization: DJCBSoftware MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: "notmuch@notmuchmail.org" Subject: Re: [notmuch] interesting project! X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: djcb@djcbsoftware.nl 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, 23 Nov 2009 07:08:41 -0000 Hi Carl, >>>>> "Carl" == Carl Worth writes: Carl> On Sun, 22 Nov 2009 14:23:10 +0200, Dirk-Jan C. Binnema Carl> wrote: >> A small question: it seems that notmuch is avoiding the use of GLib directly >> (of course, it depend on it anyway through GMime); is this because of >> OOM-handling? It'd be nice if GLib could be used, it would make some things >> quite a bit easier. Carl> It's true that I don't like the OOM handling in glib. I also think that Carl> glib tries to be too many different things at the same time. And Carl> finally, having some talloc-friendly data structures (like a hash-table) Carl> would be really nice. Well, the counter point to the OOM-problems is that is that in many programs, the 'malloc returns NULL'-case is often not very well tested (because it's rather hard to test), and that at least on Linux, it's unlikely that malloc ever does return NULL. Lennart Poettering wrote this up in some more detail[1]. Of course, the requirements for notmuch may be a bit different and I definitely don't want to suggest any radical change here after only finding out about notmuch a few days ago :) (BTW, there is a hashtable implementation in libc, (hcreate(3) etc.). Is that one not sufficiently 'talloc-friendly'? It's not very user-friendly, but that's another matter) Carl> In the meantime, as you say, we're already linking with glib because of Carl> GMime, so there's really no reason not to call functions that are there Carl> and that do what we want. What kinds of things were you thinking of that Carl> would be easier with glib? I could imagine the string functions could replace the ones in talloc. There are many more string functions, e.g., for handling file names / paths, which are quite useful. Then there are wrappers for gcc'isms (G_UNLIKELY etc.) that would make the ones in notmuch unneeded, and a lot of compatibility things like G_DIR_SEPARATOR. And the datastructures (GSlice/GList/GHashtable) are nice. The UTF8 functionality might come in handy. Anyway, I was just curious, people have survived without GLib before, and if you dislike the OOM-strategy, it's a bit of a no-no of course. Best wishes, Dirk. [1] http://article.gmane.org/gmane.comp.audio.jackit/19998 -- Dirk-Jan C. Binnema Helsinki, Finland e:djcb@djcbsoftware.nl w:www.djcbsoftware.nl pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C From keithp@keithp.com Sun Nov 22 23:18:41 2009 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 C6F8D431FBC for ; Sun, 22 Nov 2009 23:18:41 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 OgauUbKEv0M0 for ; Sun, 22 Nov 2009 23:18:39 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 81B57431FAE for ; Sun, 22 Nov 2009 23:18:38 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id C4E91B9402F; Sun, 22 Nov 2009 23:18:37 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8gFle5Mz7ds7; Sun, 22 Nov 2009 23:18:34 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 9A75EB84011; Sun, 22 Nov 2009 23:18:34 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 8D71CB80040; Sun, 22 Nov 2009 23:18:34 -0800 (PST) From: Keith Packard To: Carl Worth , notmuch@notmuchmail.org In-Reply-To: <87639122sx.fsf@yoom.home.cworth.org> References: <87639122sx.fsf@yoom.home.cworth.org> Date: Sun, 22 Nov 2009 23:18:33 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] notmuch 'index' mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 07:18:45 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Mon, 23 Nov 2009 07:06:06 +0100, Carl Worth wrote: > On Fri, 20 Nov 2009 23:35:29 -0800, Keith Packard wro= te: > > I posted a patch adding an 'index' mode to notmuch and though I'd > > explain my idea. Most mail systems provide a 'folder view' mode which > > displays the set of folders and a count of messages in each folder. I > > used this myself as the first sort of which messages I want to read. >=20 > I've just pushed this set of patches out now. >=20 > I like it quite a bit. Here are some thoughts: >=20 > * The mode documentation really needs to walk the user through how to > setup a custom set of folders. You can use the standard emacs customization interface, although it's not exactly well documented there. Additional docs are clearly indicated. > * It's not opening my "to-me" folder for some reason. (I thought it > was the '-' at first, but "xorg-board" is working fine). I can debug > this later. It shouldn't work on xorg-board either -- it just skips forward one 'word' and assumes it's gotten the folder name. Lame programming, I know. Should be easy to fix. > * The presentation is impressively spartan[*]. :-) What more do you need? Pretty fonts? Icons? A pony? > If we spruce this up a bit, I think we'll want to make this the default > view of "M-x notmuch". Let's figure out what we want it to look like then. I suggest that we use some font tricks (bold/regular) to highlight folders with un-archived mail. I'd also like to be able to create a hierarchy. > Oh, and instead of just documenting how to set a variable in .emacs we > should just provide commands to add/remove folders. That seems doable; it really only takes two text fields after all. > I think the number of threads matching the search is the only > interesting number actually. Otherwise, you just end up printing a bunch > of big numbers that the user doesn't need for anything. Threads or messages? Threads are more expensive to compute, and when the number is zero, it means the same thing. But, it is surprising to see a huge number in the folder view and then get only a handful of threads in the search view. Perhaps if the count is small enough we can go through and actually figure out how many threads are involved. > So maybe the user configures a search template to use for each automatic > tag or so? Ack! I suggest that the simpler approach of just duplicating the search field will work fine in practice. Otherwise, you're talking miles of UI goo, and constantly confused users. Really, you can use emacs to edit these things if you get too many. > It's only when I get my search results down below a particular > threshold that I decide I want to read everything linearly. I have started doing this sometimes too. But, I still skim things like the mesa list and only read a few by clicking through and 'x'ing back. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLCjdKQp8BWwlsTdMRAiGiAJ9I+0PlI9KaB8Bf4u3um2MIzl7MuACgz83D JoVkrVehZOeRZKVr+cyCGFI= =zPYV -----END PGP SIGNATURE----- --=-=-=-- From keithp@keithp.com Sun Nov 22 23:21:04 2009 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 3230C431FAE for ; Sun, 22 Nov 2009 23:21:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 o9LKcTY13qWl for ; Sun, 22 Nov 2009 23:21:03 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id C9646431FBC for ; Sun, 22 Nov 2009 23:21:02 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 1277FB9402F; Sun, 22 Nov 2009 23:21:02 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ShUnfhkZ7G7Q; Sun, 22 Nov 2009 23:20:59 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 3BD1EB84011; Sun, 22 Nov 2009 23:20:59 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 2EE68B80040; Sun, 22 Nov 2009 23:20:59 -0800 (PST) From: Keith Packard To: Carl Worth , notmuch@notmuchmail.org In-Reply-To: <873a4521nb.fsf@yoom.home.cworth.org> References: <1258493565-13508-1-git-send-email-keithp@keithp.com> <87d43axi4e.fsf@yoom.home.cworth.org> <87zl6eeydr.fsf@yoom.home.cworth.org> <873a4521nb.fsf@yoom.home.cworth.org> Date: Sun, 22 Nov 2009 23:20:58 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 07:21:04 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Mon, 23 Nov 2009 07:31:04 +0100, Carl Worth wrote: > OK. You win. That looks pretty good to me. So we need to do the 'mark all that have been seen read' change, then we can do the rest of this switch. Not sure how to make that work, as we need to know what has been displayed, and you can display bits of the window in lots of different ways (even using the mouse!) =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLCjfaQp8BWwlsTdMRAjGxAJsFCIzXB6FxeDoRtWA/x3KgM4mU8gCgk/BT 6oBTkPOIyzfLKNXpCru2RFI= =3/S5 -----END PGP SIGNATURE----- --=-=-=-- From kha@treskal.com Sun Nov 22 23:34:36 2009 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 49B3D431FBC for ; Sun, 22 Nov 2009 23:34:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 QciG+MgdMc2D for ; Sun, 22 Nov 2009 23:34:35 -0800 (PST) Received: from mail1.space2u.com (mail1.space2u.com [62.20.1.135]) by olra.theworths.org (Postfix) with ESMTP id 3729C431FAE for ; Sun, 22 Nov 2009 23:34:35 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) (authenticated bits=0) by mail1.space2u.com (8.14.3/8.14.3) with ESMTP id nAN7YQFQ008858 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NOT) for ; Mon, 23 Nov 2009 08:34:26 +0100 Received: by bwz24 with SMTP id 24so3673843bwz.30 for ; Sun, 22 Nov 2009 23:34:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.48.144 with SMTP id r16mr1779102bkf.170.1258961672465; Sun, 22 Nov 2009 23:34:32 -0800 (PST) In-Reply-To: <87skc5yd6v.wl%djcb@djcbsoftware.nl> References: <87skc5yd6v.wl%djcb@djcbsoftware.nl> Date: Mon, 23 Nov 2009 08:34:32 +0100 Message-ID: From: Karl Wiberg To: djcb@djcbsoftware.nl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "notmuch@notmuchmail org" Subject: Re: [notmuch] [PATCH 1/2] * avoid gcc 4.4.1 compiler warnings due to ignored write return values X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 07:34:36 -0000 On Mon, Nov 23, 2009 at 7:20 AM, Dirk-Jan C. Binnema wrote: > + =C2=A0 =C2=A0ssize_t ignored; > =C2=A0 =C2=A0 static char msg[] =3D "Stopping... =C2=A0 =C2=A0 =C2=A0 =C2= =A0 \n"; > - =C2=A0 =C2=A0write(2, msg, sizeof(msg)-1); > + > + =C2=A0 =C2=A0ignored =3D write(2, msg, sizeof(msg)-1); > =C2=A0 =C2=A0 interrupted =3D 1; > =C2=A0} Didn't the "(void)" suggestion work? --=20 Karl Wiberg, kha@treskal.com subrabbit.wordpress.com www.treskal.com/kalle From keithp@keithp.com Sun Nov 22 23:35:29 2009 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 9A167431FC3 for ; Sun, 22 Nov 2009 23:35:29 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 2I+sd37R0kex for ; Sun, 22 Nov 2009 23:35:29 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id E9849431FC2 for ; Sun, 22 Nov 2009 23:35:28 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 61364B9402F; Sun, 22 Nov 2009 23:35:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 0spoQmHqCraS; Sun, 22 Nov 2009 23:35:25 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 87B6DB84011; Sun, 22 Nov 2009 23:35:25 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 7AFFAB80040; Sun, 22 Nov 2009 23:35:25 -0800 (PST) From: Keith Packard To: Carl Worth , Adrian Perez , notmuch@notmuchmail.org In-Reply-To: <87d439g6za.fsf@yoom.home.cworth.org> References: <1258937675-31405-1-git-send-email-aperez@igalia.com> <87d439g6za.fsf@yoom.home.cworth.org> Date: Sun, 22 Nov 2009 23:35:24 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] ANSI escapes in "new" only when output is a tty X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 07:35:29 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Mon, 23 Nov 2009 06:12:09 +0100, Carl Worth wrote: > So that's totally broken and we should come up with a way to fix it. Tracking directory mtime instead of just looking at the read-only bit would let us skip directories that haven't seen any change in content. Tracking directory contents would let us easily detect name changes (add/remove/rename). =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLCjs9Qp8BWwlsTdMRAkycAJ0cfQqRfYmPhdF3zNwjAJnedAQWkwCcDAX3 1QuYnHGascZl6bGTnxFMPUw= =9EZs -----END PGP SIGNATURE----- --=-=-=-- From tassilo@member.fsf.org Sun Nov 22 23:42:14 2009 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 2AEE1431FC0 for ; Sun, 22 Nov 2009 23:42:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 l2gU75IyjZba for ; Sun, 22 Nov 2009 23:42:13 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by olra.theworths.org (Postfix) with ESMTP id 6E8BB431FBC for ; Sun, 22 Nov 2009 23:42:13 -0800 (PST) Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15]) by mx.perfora.net (node=mxus0) with ESMTP (Nemesis) id 0MN2S8-1NEeLs1CvY-007EOf for notmuch@notmuchmail.org; Mon, 23 Nov 2009 02:42:12 -0500 Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 48A8578A30BD; Mon, 23 Nov 2009 08:42:10 +0100 (CET) Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02871-10; Mon, 23 Nov 2009 08:42:09 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Received: from thinkpad.tsdh.de (unknown [141.26.95.131]) by deliver.uni-koblenz.de (Postfix) with ESMTP id A550078A30BB; Mon, 23 Nov 2009 08:42:09 +0100 (CET) From: Tassilo Horn To: Carl Worth References: <877hti71f4.fsf@thinkpad.tsdh.de> <87my2dg8ww.fsf@yoom.home.cworth.org> Date: Mon, 23 Nov 2009 08:42:09 +0100 In-Reply-To: <87my2dg8ww.fsf@yoom.home.cworth.org> (Carl Worth's message of "Mon, 23 Nov 2009 05:30:23 +0100") Message-ID: <87fx85it66.fsf@thinkpad.tsdh.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at uni-koblenz.de Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] How to index /var/spool/mail with notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 07:42:14 -0000 Carl Worth writes: Hi Carl, >> Unfortunately, there are some dovecot internal files, which should >> neither be indexed by notmuch, and which have 600 permissions for the >> mail user. And that's where notmuch errors and stops indexing. :-( > > Hi Tassilo, welcome to notmuch! > > I'm glad you found a workaround for this problem, (thanks Jed!). Trying out notmuch already cashed out. ;-) > But perhaps these errors should be made into warnings instead? Any > thoughts on that anyone? I think so. For other dovecot internal index files it already says something like "Ignoring non-mail file foobar.idx" and simply skips that file. I think that's the right thing to do for files where it has no read permissions for, too. >> All "real" mail files are named "u.", so it would be cool if >> I could provide a pattern to notmuch matching all files I'd like to >> index. And maybe the other way round (a blacklist pattern) would be >> useful, too. > > I've been planning on having a blacklist pattern for a while. > Originally, the only difficulty in implementing it was that we had > nowhere to store configuration information. But we have a > configuration file now, so this would be a pretty easy thing to > implement. > > It's not as obvious that a whitelist pattern would be as widely > useful, but it would be possible too. Well, for dovecot users using the dbox format, a whitelist pattern would be much simpler because of the coherent mail file naming. But I could live with a blacklist pattern, too. Bye, Tassilo From meskio@sindominio.net Mon Nov 23 02:11:09 2009 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 ABA68431FBC for ; Mon, 23 Nov 2009 02:11:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 SG+7wuFhUtlk for ; Mon, 23 Nov 2009 02:11:08 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by olra.theworths.org (Postfix) with ESMTP id E17B8431FAE for ; Mon, 23 Nov 2009 02:11:08 -0800 (PST) Received: from flatline.sindominio.net (flatline.sindominio.net [82.144.4.26]) by mx.perfora.net (node=mxus1) with ESMTP (Nemesis) id 0M8lK0-1NKEZo3bRc-00C6K2 for notmuch@notmuchmail.org; Mon, 23 Nov 2009 05:11:08 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by flatline.sindominio.net (Postfix) with ESMTP id 708DC2629F8 for ; Mon, 23 Nov 2009 11:10:55 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at sindominio.net Received: from flatline.sindominio.net ([127.0.0.1]) by localhost (flatline.sindominio.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dhdYCA5qxUHq for ; Mon, 23 Nov 2009 11:10:49 +0100 (CET) Received: from blackspot (rpollan-laptop.cern.ch [137.138.192.228]) by flatline.sindominio.net (Postfix) with ESMTPA id 2A645262973 for ; Mon, 23 Nov 2009 11:10:49 +0100 (CET) Received: by blackspot (Postfix, from userid 1000) id 25EB41B7275; Mon, 23 Nov 2009 11:12:40 +0100 (CET) Date: Mon, 23 Nov 2009 11:12:40 +0100 From: Ruben Pollan To: notmuch@notmuchmail.org Message-ID: <20091123101240.GB24939@blackspot> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Bn2rw/3z4jIqBvZU" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: [notmuch] notsomuch, a dummy curses ui X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 10:11:09 -0000 --Bn2rw/3z4jIqBvZU Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi notmuch community, As I'm not an emacs user, I started to play with the code to see what are t= he power of notmuch. I create a simple ncurses ui: http://gitorious.org/notsomuch Up to now it don't do much, just display searches and threads. It don't even display the content of the emails. I guess I'll be playing with it for some weeks, but not sure jet if I'll try to create a proper program or I'll drop= it soon. PS: I have to try the vim pluggin, maybe that could be my email reader in t= he future. --=20 Rub=E9n Poll=E1n | jabber:meskio@jabber.org -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D- No vamos a reivindicar nada, no vamos a pedir nada. Tomaremos, okuparemos. --Bn2rw/3z4jIqBvZU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAksKYBgACgkQGKOQ92SwNMKFEgCeLOWRXth0VagzV3cj9Stb2XkH ZGsAn2neQCOhNpYf9JVApuhEQXUgKO8q =VJW8 -----END PGP SIGNATURE----- --Bn2rw/3z4jIqBvZU-- From tassilo@member.fsf.org Mon Nov 23 02:49:31 2009 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 9DA8F431FBC for ; Mon, 23 Nov 2009 02:49:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 kweSCrB-8boj for ; Mon, 23 Nov 2009 02:49:31 -0800 (PST) Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15]) by olra.theworths.org (Postfix) with ESMTP id DB99E431FAE for ; Mon, 23 Nov 2009 02:49:30 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id DA91278A31CB for ; Mon, 23 Nov 2009 11:49:29 +0100 (CET) Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29505-06-2 for ; Mon, 23 Nov 2009 11:49:29 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Received: from thinkpad.tsdh.de (unknown [141.26.95.131]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 3235B78A31A6 for ; Mon, 23 Nov 2009 11:49:29 +0100 (CET) From: Tassilo Horn To: notmuch@notmuchmail.org Mail-Copies-To: never Date: Mon, 23 Nov 2009 11:49:29 +0100 Message-ID: <87ws1hldmu.fsf@thinkpad.tsdh.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at uni-koblenz.de Subject: [notmuch] Notmuch doesn't index new mails X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 10:49:31 -0000 Hi all, after setting up notmuch, initially indexing all my mail, and removing the inbox and unread tags thereafter, now I recognize that notmuch doesn't index new mail. --8<---------------cut here---------------start------------->8--- % notmuch new --verbose No new mail---and that's not much. --8<---------------cut here---------------end--------------->8--- I did check that there's really new mail. In the man page, it is mentioned, that notmuch skips directories that are read-only. So now all my folders are "drwxrwxr-x mail mail", and I am in the mail group. But still, notmuch doesn't index new mails. I assumed that the mail files also have to be writable. So I changed them to "-rw-rw-r-- mail mail", but still no luck. Any ideas what might be the problem? Bye, Tassilo From SRS0=rVGJ=HL=exemail.com.au=tjaden@srs.perfora.net Mon Nov 23 03:07:49 2009 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 6E15E431FBC for ; Mon, 23 Nov 2009 03:07:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 sRDBTpsGPmX9 for ; Mon, 23 Nov 2009 03:07:48 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.195]) by olra.theworths.org (Postfix) with ESMTP id 93947431FAE for ; Mon, 23 Nov 2009 03:07:48 -0800 (PST) Received-SPF: pass (mxus0: domain of exemail.com.au designates 220.233.0.70 as permitted sender) client-ip=220.233.0.70; envelope-from=tjaden@exemail.com.au; helo=pecan2.exetel.com.au; Received: from pecan2.exetel.com.au (pecan2.exetel.com.au [220.233.0.70]) by mx.perfora.net (node=mxus0) with ESMTP (Nemesis) id 0M4FBr-1O37UO1SUN-00rDFH for notmuch@notmuchmail.org; Mon, 23 Nov 2009 06:07:47 -0500 Received: from 27.133.70.115.static.exetel.com.au ([115.70.133.27] helo=localhost) by pecan2.exetel.com.au with esmtp (Exim 4.68) (envelope-from ) id 1NCWlj-0002Me-00; Mon, 23 Nov 2009 22:07:43 +1100 Date: Mon, 23 Nov 2009 22:07:42 +1100 From: Peter Wang To: notmuch@notmuchmail.org Message-ID: <20091123110742.GE1496@plug.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: [notmuch] Multithreaded access X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 11:07:49 -0000 Hi, I am also toying around with a curses frontend for notmuch :-) One thing that I would really like to have is asynchronous search: I should be able to begin reading mail even while search results are rolling in. At the moment I'm using one read-only database_t* and creating multiple queries off it. There's a background thread[1] slurping up search results at a time, then passes them to the main thread. The main thread also handles the pager. When the user goes to open a thread, it creates a separate query_t so that it can look up the messages and their headers and filenames. It seems to work, but sometimes crashes. I'm wondering if there is something inherently wrong with this design, so that I should try a different approach. A future concern is how to handle tag updates. Could I open the database for writing in one thread, and read-only in another? Peter [1] Actually, I am playing around with Go at the same time so they are really goroutines. Any problems could very well be related to this. From djcb.bulk@gmail.com Mon Nov 23 03:11:57 2009 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 C46BC431FBC for ; Mon, 23 Nov 2009 03:11:57 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ktd1Dh6Q4-D5 for ; Mon, 23 Nov 2009 03:11:57 -0800 (PST) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by olra.theworths.org (Postfix) with ESMTP id 026D1431FAE for ; Mon, 23 Nov 2009 03:11:56 -0800 (PST) Received: by fg-out-1718.google.com with SMTP id 19so2017038fgg.2 for ; Mon, 23 Nov 2009 03:11:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=zkh9rYN7E5CoNQXe02gbcaYSPgYWs6F/GNINri7hXy4=; b=vTCrtfQqDYLsPbdjJ8pZBmseZzhG9aFLqcj7yku0XXI6g9jXw/ZIROMl83pwHMFn5z 4Zb5JsRdQuUNe7epoedvqYqGEygVPe3hVvRWSbdRS6vybykMkDQFaBB6onoEa6oVZilC tGPNUzH3UcxiH5VBPC50gHCVwmGreVV4JMdiE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=lKKJowZDztoqPqGn7jJOV0M3AL3BQSIG/yXiFmQ2dw+YRwpaLBKognyCyD7gtoBGLz Poqixs/bjTBnek+F5CBy1Qu72k5WSdEuyDA29H5Iq1DNcWAhY97Pe13moe7omfQB63s2 Irz+8fjrvCNj5vgtxyDk4n8/kPMtF/rXduRec= MIME-Version: 1.0 Received: by 10.86.11.6 with SMTP id 6mr3928256fgk.27.1258974715317; Mon, 23 Nov 2009 03:11:55 -0800 (PST) In-Reply-To: References: <87skc5yd6v.wl%djcb@djcbsoftware.nl> Date: Mon, 23 Nov 2009 13:11:55 +0200 Message-ID: <1873022c0911230311o77e55fdqa5464a2dd16ec265@mail.gmail.com> From: Dirk-Jan Binnema To: Karl Wiberg Content-Type: multipart/alternative; boundary=0014852e1b28b00e75047907e469 Cc: "notmuch@notmuchmail org" , djcb@djcbsoftware.nl Subject: Re: [notmuch] [PATCH 1/2] * avoid gcc 4.4.1 compiler warnings due to ignored write return values X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 11:11:57 -0000 --0014852e1b28b00e75047907e469 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Nov 23, 2009 at 9:34 AM, Karl Wiberg wrote: > On Mon, Nov 23, 2009 at 7:20 AM, Dirk-Jan C. Binnema > wrote: > > > + ssize_t ignored; > > static char msg[] = "Stopping... \n"; > > - write(2, msg, sizeof(msg)-1); > > + > > + ignored = write(2, msg, sizeof(msg)-1); > > interrupted = 1; > > } > > Didn't the "(void)" suggestion work? > > I actually preferred that solution, but unfortunately, it didn't stop gcc from complaining... Best wishes, Dirk. --0014852e1b28b00e75047907e469 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Mon, Nov 23, 2009 at 9:34 AM, Karl Wi= berg <kha@treskal.c= om> wrote:
On Mon, Nov 23, 2009 at 7:20 AM, Dirk-Jan C. Binnema
<djcb.bulk@gmail.com> wrot= e:

> + =A0 =A0ssize_t ignored;
> =A0 =A0 static char msg[] =3D "Stopping... =A0 =A0 =A0 =A0 \n&quo= t;;
> - =A0 =A0write(2, msg, sizeof(msg)-1);
> +
> + =A0 =A0ignored =3D write(2, msg, sizeof(msg)-1);
> =A0 =A0 interrupted =3D 1;
> =A0}

Didn't the "(void)" suggestion work?


I actually prefer= red that solution, but unfortunately, it didn't stop gcc from complaini= ng...

Best wishes,
Dirk.
--0014852e1b28b00e75047907e469-- From five9a2@gmail.com Mon Nov 23 03:49:23 2009 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 B2AED431FAE for ; Mon, 23 Nov 2009 03:49:23 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 2Zkpyb4bmIID for ; Mon, 23 Nov 2009 03:49:23 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 5D75D431FBC for ; Mon, 23 Nov 2009 03:49:23 -0800 (PST) Received: by bwz24 with SMTP id 24so3822957bwz.30 for ; Mon, 23 Nov 2009 03:49:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=iuKdFrIKdLQ/hBFi8k/ISM1H4H6uBpGjdpo3hB/jKPM=; b=yC989HGVj05xnVXme6xOzARMVDfzhptG3RlqQGynz6eUWjio5QCTARE9XK6dYiyz7u KyE8ihHEvThdXssZhTq8iFGfXeVbLYHhfxlMO8c4JrMbrjt/Vvibugc87TuujGGwrGAv cS9O10Vzwb5nhsOGy57rW/MZ6EzN9ZSMPzAIA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=K+5M1JlWNNPU9mFsr/JMlqDayw/sOi33sSdZbsHDDf+6KspAaC4vcik9al+wK4DzeN BCvRKwWQH7cDWQOOgp+xPnw/abPHnlfCzQOmNZLDyLy5ZxntRJ6wKSJkAgrNM8AvJrRN 18eqJG/HqPo/ukvEOGSv+6k/iUTtbYTFr85bA= Received: by 10.204.33.140 with SMTP id h12mr4523547bkd.167.1258976961606; Mon, 23 Nov 2009 03:49:21 -0800 (PST) Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 12sm5582609fks.9.2009.11.23.03.49.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 03:49:20 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org, cworth@cworth.org Date: Mon, 23 Nov 2009 12:49:26 +0100 Message-Id: <1258976966-22407-1-git-send-email-jed@59A2.org> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <87k4xhg8hq.fsf@yoom.home.cworth.org> References: <87k4xhg8hq.fsf@yoom.home.cworth.org> Subject: [notmuch] [PATCH] Make search filters handle disjunctive queries. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 11:49:23 -0000 notmuch-search-filter accepts now accepts an arbitrary query and will group if necessary so that we get tag:inbox AND (gravy OR biscuits) notmuch-search-filter-tag now handles multiple terms. All terms in the query except AND and OR are interpreted as tags. Signed-off-by: Jed Brown --- notmuch.el | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/notmuch.el b/notmuch.el index 0cabbe2..43e0566 100644 --- a/notmuch.el +++ b/notmuch.el @@ -1057,15 +1057,28 @@ search." Runs a new search matching only messages that match both the current search results AND the additional query string provided." (interactive "sFilter search: ") - (notmuch-search (concat notmuch-search-query-string " and " query) notmuch-search-oldest-first)) + (let ((grouped-query (if (string-match-p "\\<[oO][rR]\\>" query) (concat "( " query " )") query))) + (notmuch-search (concat notmuch-search-query-string " and " grouped-query) notmuch-search-oldest-first))) -(defun notmuch-search-filter-by-tag (tag) - "Filter the current search results based on a single tag. +(defun notmuch-search-filter-by-tag (query) + "Filter the current search results based on one or more tags. Runs a new search matching only messages that match both the -current search results AND that are tagged with the given tag." +current search results AND that are tagged with the given +expression involving tags. For example, the input + + chicken and (gravy or biscuits) + +will filter the current search by + + tag:chicken and ( tag:gravy or tag:biscuits )" (interactive "sFilter by tag: ") - (notmuch-search (concat notmuch-search-query-string " and tag:" tag) notmuch-search-oldest-first)) + (let ((tagged-query (replace-regexp-in-string "\\([_\+\-]\\|\\w\\)+" + (lambda (match) ; Prepend `tag:' to all matches except AND and OR + (if (string-match-p "\\([aA][nN][dD]\\)\\|\\([oO][rR]\\)" match) + match (concat "tag:" match))) + query))) + (notmuch-search-filter tagged-query))) (defun notmuch () "Run notmuch to display all mail with tag of 'inbox'" -- 1.6.5.3 From jrollins@finestructure.net Mon Nov 23 04:59:54 2009 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 0F2C2431FBC for ; Mon, 23 Nov 2009 04:59:54 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 sQFY-5Xl6bSf for ; Mon, 23 Nov 2009 04:59:53 -0800 (PST) Received: from tarap.cc.columbia.edu (tarap.cc.columbia.edu [128.59.29.7]) by olra.theworths.org (Postfix) with ESMTP id 63C62431FAE for ; Mon, 23 Nov 2009 04:59:53 -0800 (PST) Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com [72.227.128.66]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by tarap.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id nANCxqYM022350 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 23 Nov 2009 07:59:52 -0500 (EST) Received: from jrollins by servo.finestructure.net with local (Exim 4.69) (envelope-from ) id 1NCYWX-0000sH-8z for notmuch@notmuchmail.org; Mon, 23 Nov 2009 08:00:09 -0500 Date: Mon, 23 Nov 2009 08:00:09 -0500 From: Jameson Graef Rollins To: notmuch@notmuchmail.org Message-ID: <20091123130009.GA31695@finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.65 on 128.59.29.7 Subject: [notmuch] OpenPGP support X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 12:59:54 -0000 --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, folks. I know it's a hairy problem, but has anyone started looking into OpenPGP support for notmuch? jamie. --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: attachment -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJLCodWAAoJEO00zqvie6q8Un4QAKmtL9HVV9KrIGHH9+oeuvIa /uLu0BYLPVv6OVRudz+CPSHst3fpnPOhycB8OK1aRDJujCrTVKDY60eGUkb3wc0r 15KxcPcJUYA7DRKyOa/b/bULIIT16aHihM2sYZoFAxhj4yPl1QXYPuugad8hrOVt p2FeTeTjywR2336m0L8TC96vmTwnmCOoIeODrRh+KeDMy8MneRaeKvrO8vwqXhI1 oHQEwRXSTexC1kLEPAURJp64K1Lh8T02ZHFWzmX4dXH4LF1qzbMvBUXRpqgv/y68 QxhpmYjKUV2ICm2DQBnAkdktzEedjadiWpnp6pApLbkJ3BZHOXelvwfJjshRKHXD 8EagIx+UdsBCPpF9/ESfbSXXrLLmpmmLVXMsXvFqnvBNSJnjoRGn8iaSAau7SYKa YJWqQZG4yvCYeWdl9qrJMV3FqIZYXK8NV1jza2IZV0qE/lnr7+jCEfHMRTjp1HSb sKcwGX1XdkS2b9WfeY2Ij6ZujSQDRHhvFQTcx8zSVCL6oQ1xNhdygHSxBjMeK9/8 r4ZUk835Dpsp5nX44i23YntFly9o8iTjfbth/EfwHliAPJ1uRj1Ul+Q0lXjHuFyv mdZ90CT4dwyZyBbpKF6z4IjLD1p2HeV8EEur5O5BSCKRHOjpoI9jpCFkrtGbrHJA LUkPot05SvbscsxF8mcU =R9V9 -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g-- From five9a2@gmail.com Mon Nov 23 05:06:52 2009 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 1340F431FC0 for ; Mon, 23 Nov 2009 05:06:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 S3H9nSoDYBcm for ; Mon, 23 Nov 2009 05:06:51 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id D1E8B431FBC for ; Mon, 23 Nov 2009 05:06:50 -0800 (PST) Received: by bwz24 with SMTP id 24so3879783bwz.30 for ; Mon, 23 Nov 2009 05:06:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=u8lee9onceZ5rvYjZmQlHL0pPhyF+LUQA25XwR83PjE=; b=BJtBoijWdQsn1Mq5z1ch6b3mOa6hysyyHRBv+usGq6hIqZ3vrs6lNIFt+VabMXDZOb ByPhMNOAUWQ+gemmUsBts6C08B9Z89qIPzMrk6u1j5QqhUFl6Ed/yFoPzPH4NjSawoLM mlrLW8Y2wVTMYavRGhevWic56HK4axfGd2tmw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=OxWcPdPoZJFdfeRPOzbEtUC4ITlxQh6T0vN//WYF4SE2tWC7hiW1hhyGZVyeR6QemT ARlV1/ds1BKulpPQHW1V2qO5AFfR81/rhRzC0xIu06SUaMc2U+QKVxD0qYnJVUibnhrw mqz97x00C84dtV1IpsS7eMbspgzZA59FV8m0E= Received: by 10.204.148.78 with SMTP id o14mr4656564bkv.83.1258981609748; Mon, 23 Nov 2009 05:06:49 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 9sm5690477fks.52.2009.11.23.05.06.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 05:06:48 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Carl Worth , notmuch@notmuchmail.org In-Reply-To: <87ocmtg9ni.fsf@yoom.home.cworth.org> References: <1258920736-14205-1-git-send-email-jed@59A2.org> <87ocmtg9ni.fsf@yoom.home.cworth.org> Date: Mon, 23 Nov 2009 14:07:20 +0100 Message-ID: <87y6lx4cfr.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] New function notmuch-search-operate-all: operate on all messages in the current query. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 13:06:52 -0000 On Mon, 23 Nov 2009 05:14:25 +0100, Carl Worth wrote: > Second, I like that you just used the search string again, (as opposed > to just walking through the buffer looking at thread IDs). That seems > elegant. It was *easy*. > First, this creates a race condition in that the user will rightly > expect to only be adding/removing tags from the visible results. But if > new mail has been incorporated between creating the current view and > running '*' then threads could be tagged that were never seen and that > could be problematic. Agreed and I had also thought of the case you described. Note that Gmail does not solve the race condition. When in summary mode: * Marking a thread as read applies to all messages in the thread. The thread contents are being updated concurrently so you may mark threads you have already seen. * Same story with archiving (aka. remove inbox). * Starring a thread applies to the last message in the thread, this could be a newly arrived message that is not currently displayed. I think that handling a concurrent changes to the match results is a somewhat hard problem. You have to store the message ids of everything in the current query if you want to avoid the race. > Second, since we're in the search view which shows threads, we should > really be operating on threads. But this tag command won't work like the > '+' and '-' commands in this buffer. Those commands will add/remove a > tag to/from every message in the thread[*]. The new '*' command, however > will only be changing tags on messages that match the query. I'm not convinced that we want to operate on the entire thread. Applying the tag only to the matched messages is enough to find the thread, and it may really be desirable to only have it applied to certain messages in the thread. For example, I might have constructed an elaborate query to find five messages, including a couple that are burried in 100-message threads in which case I would definitely not want to tag entire threads. > So I think we should fix both of these issues by looping over each line > of the buffer and calling (notmuch-search-add-tag) or > (notmuch-search-remove-tag). Presumably you don't mean this literally because that would be horribly slow. What you want is to gather up all the message ids in all the threads with at least one message matching the current query (and currently displayed). I think this is only possible if notmuch-search holds message IDs for everything in the matched threads. If we are happy to just tag the matched messages instead of the entire thread, we would only store the message ids for the matched messages. > Oh, here's one: We could add something like "notmuch tag --expecting= > 1/23 " that would not do the tag unless the search string > matched 1 message out of 23 total messages in the thread. Then we could > give a warning to the user. I like this, but it still presents a minor race condition (suppose another client swaps the unread tag on two messages in the same thread). The only way to guarantee that you are operating on the displayed messages is to store their message ids. > That works for the single-thread case, but the warning would be harder > for the user to deal with in the '*' case. Or maybe not---the emacs > function could just stop on the first line with the error and then the > user would see what's going on. If you can implement notmuch tag --expecting with similar efficiency to the present, then I would vote for notifying the user and asking for confirmation if the number of matches has changed. This would be significantly safer than what Gmail does which ought to be sufficient for now given the age of notmuch. Jed From kha@treskal.com Mon Nov 23 05:19:21 2009 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 28360431FBF for ; Mon, 23 Nov 2009 05:19:21 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 jxIFZSG2Efo4 for ; Mon, 23 Nov 2009 05:19:20 -0800 (PST) Received: from mail1.space2u.com (mail1.space2u.com [62.20.1.135]) by olra.theworths.org (Postfix) with ESMTP id 46A77431FBC for ; Mon, 23 Nov 2009 05:19:20 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) (authenticated bits=0) by mail1.space2u.com (8.14.3/8.14.3) with ESMTP id nANDJ7cw028661 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NOT) for ; Mon, 23 Nov 2009 14:19:07 +0100 Received: by bwz24 with SMTP id 24so3889339bwz.30 for ; Mon, 23 Nov 2009 05:19:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.11.17 with SMTP id r17mr4869095bkr.41.1258982358062; Mon, 23 Nov 2009 05:19:18 -0800 (PST) In-Reply-To: <1873022c0911230311o77e55fdqa5464a2dd16ec265@mail.gmail.com> References: <87skc5yd6v.wl%djcb@djcbsoftware.nl> <1873022c0911230311o77e55fdqa5464a2dd16ec265@mail.gmail.com> Date: Mon, 23 Nov 2009 14:19:18 +0100 Message-ID: From: Karl Wiberg To: Dirk-Jan Binnema Content-Type: text/plain; charset=UTF-8 Cc: "notmuch@notmuchmail org" , djcb@djcbsoftware.nl Subject: Re: [notmuch] [PATCH 1/2] * avoid gcc 4.4.1 compiler warnings due to ignored write return values X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 13:19:21 -0000 On Mon, Nov 23, 2009 at 12:11 PM, Dirk-Jan Binnema wrote: > On Mon, Nov 23, 2009 at 9:34 AM, Karl Wiberg wrote: > > > Didn't the "(void)" suggestion work? > > I actually preferred that solution, but unfortunately, it didn't > stop gcc from complaining... Hmpf. I'd argue that that's a gcc bug, forcing the user to use an unnecessarily complicated way to pretend to use the return value. Oh well. -- Karl Wiberg, kha@treskal.com subrabbit.wordpress.com www.treskal.com/kalle From jeff@ocjtech.us Mon Nov 23 05:44:04 2009 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 49A78431FBC for ; Mon, 23 Nov 2009 05:44:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 66Fn8nEUPGBZ for ; Mon, 23 Nov 2009 05:44:03 -0800 (PST) Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com [209.85.210.204]) by olra.theworths.org (Postfix) with ESMTP id 6CA60431FAE for ; Mon, 23 Nov 2009 05:44:03 -0800 (PST) Received: by yxe42 with SMTP id 42so5402599yxe.22 for ; Mon, 23 Nov 2009 05:44:03 -0800 (PST) Received: by 10.150.22.36 with SMTP id 36mr8691463ybv.19.1258983843023; Mon, 23 Nov 2009 05:44:03 -0800 (PST) Received: from lt26923.campus.dmacc.edu ([69.57.47.215]) by mx.google.com with ESMTPS id 14sm2157267gxk.14.2009.11.23.05.43.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 05:43:59 -0800 (PST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by lt26923.campus.dmacc.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NCZCr-0007Hp-09 for notmuch@notmuchmail.org; Mon, 23 Nov 2009 07:43:54 -0600 From: "Jeffrey C. Ollie" To: Not Much Mail Date: Mon, 23 Nov 2009 07:43:29 -0600 Message-Id: <1258983810-27522-1-git-send-email-jeff@ocjtech.us> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <87bpiughr3.fsf@yoom.home.cworth.org> References: <87bpiughr3.fsf@yoom.home.cworth.org> Subject: Re: [notmuch] [PATCH] Mac OS X compatibility fixes X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 13:44:04 -0000 Here's a patch that adds private implementations of strndup and getline. They are unconditionally compiled so that compiler errors in these functions can be detected on any platform, even those that provide strndup and getline in the standard library. I'll have a patch that handles the strndup/getline detection later today (I've already done it in SCons, just need to figure out how I want to do it in plain shell for the current configure script). From jeff@ocjtech.us Mon Nov 23 05:44:08 2009 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 CA03B431FC4 for ; Mon, 23 Nov 2009 05:44:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Ob-gCvvJIig4 for ; Mon, 23 Nov 2009 05:44:07 -0800 (PST) Received: from mail-yw0-f200.google.com (mail-yw0-f200.google.com [209.85.211.200]) by olra.theworths.org (Postfix) with ESMTP id BCC58431FBF for ; Mon, 23 Nov 2009 05:44:07 -0800 (PST) Received: by ywh38 with SMTP id 38so4839962ywh.6 for ; Mon, 23 Nov 2009 05:44:07 -0800 (PST) Received: by 10.150.109.7 with SMTP id h7mr4222931ybc.349.1258983847264; Mon, 23 Nov 2009 05:44:07 -0800 (PST) Received: from lt26923.campus.dmacc.edu ([69.57.47.215]) by mx.google.com with ESMTPS id 16sm2067660gxk.3.2009.11.23.05.44.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 05:44:05 -0800 (PST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by lt26923.campus.dmacc.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NCZD1-0007Hp-Qr; Mon, 23 Nov 2009 07:44:03 -0600 From: "Jeffrey C. Ollie" To: Not Much Mail Date: Mon, 23 Nov 2009 07:43:30 -0600 Message-Id: <1258983810-27522-2-git-send-email-jeff@ocjtech.us> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1258983810-27522-1-git-send-email-jeff@ocjtech.us> References: <87bpiughr3.fsf@yoom.home.cworth.org> <1258983810-27522-1-git-send-email-jeff@ocjtech.us> Subject: [notmuch] [PATCH] Add private implementations of strndup and getline. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 13:44:09 -0000 Add private implementations of strndup and getline for those platforms that don't have them (notably Mac OS X) no matter what preprocessor symbols you define. Signed-off-by: Jeffrey C. Ollie --- lib/xutil.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/xutil.h | 6 +++ 2 files changed, 105 insertions(+), 0 deletions(-) diff --git a/lib/xutil.c b/lib/xutil.c index 6fa5eb0..61467f1 100644 --- a/lib/xutil.c +++ b/lib/xutil.c @@ -79,6 +79,105 @@ xstrdup (const char *s) return ret; } +/* Mac OS X don't have strndup even if _GNU_SOURCE is defined */ +char * +_notmuch_strndup (const char *s, size_t n) +{ + size_t len = strlen (s); + char *ret; + + if (len <= n) + return strdup (s); + + ret = malloc(n + 1); + strncpy(ret, s, n); + ret[n] = '\0'; + return ret; +} + +/* getline implementation is copied from glibc. */ + +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif +#ifndef SSIZE_MAX +# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) +#endif + +ssize_t +_notmuch_getline (char **lineptr, size_t *n, FILE *fp) +{ + ssize_t result; + size_t cur_len = 0; + + if (lineptr == NULL || n == NULL || fp == NULL) + { + errno = EINVAL; + return -1; + } + + if (*lineptr == NULL || *n == 0) + { + *n = 120; + *lineptr = (char *) malloc (*n); + if (*lineptr == NULL) + { + result = -1; + goto end; + } + } + + for (;;) + { + int i; + + i = getc (fp); + if (i == EOF) + { + result = -1; + break; + } + + /* Make enough space for len+1 (for final NUL) bytes. */ + if (cur_len + 1 >= *n) + { + size_t needed_max = + SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; + size_t needed = 2 * *n + 1; /* Be generous. */ + char *new_lineptr; + + if (needed_max < needed) + needed = needed_max; + if (cur_len + 1 >= needed) + { + result = -1; + goto end; + } + + new_lineptr = (char *) realloc (*lineptr, needed); + if (new_lineptr == NULL) + { + result = -1; + goto end; + } + + *lineptr = new_lineptr; + *n = needed; + } + + (*lineptr)[cur_len] = i; + cur_len++; + + if (i == '\n') + break; + } + (*lineptr)[cur_len] = '\0'; + result = cur_len ? (ssize_t) cur_len : result; + +end: + return result; +} + char * xstrndup (const char *s, size_t n) { diff --git a/lib/xutil.h b/lib/xutil.h index b973f7d..d13259a 100644 --- a/lib/xutil.h +++ b/lib/xutil.h @@ -39,6 +39,12 @@ char * xstrdup (const char *s); char * +_notmuch_strndup (const char *s, size_t n); + +ssize_t +_notmuch_getline (char **lineptr, size_t *n, FILE *stream); + +char * xstrndup (const char *s, size_t n); void -- 1.6.5.2 From tassilo@member.fsf.org Mon Nov 23 05:55:46 2009 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 705DE431FBC for ; Mon, 23 Nov 2009 05:55:46 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 OG3kc55OzGwy for ; Mon, 23 Nov 2009 05:55:45 -0800 (PST) Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15]) by olra.theworths.org (Postfix) with ESMTP id B2E45431FAE for ; Mon, 23 Nov 2009 05:55:45 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 931D2789B93D for ; Mon, 23 Nov 2009 14:55:44 +0100 (CET) Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02463-02 for ; Mon, 23 Nov 2009 14:55:44 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Received: from thinkpad.tsdh.de (unknown [141.26.95.131]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 380C27899111 for ; Mon, 23 Nov 2009 14:55:41 +0100 (CET) From: Tassilo Horn To: notmuch@notmuchmail.org References: <87ws1hldmu.fsf@thinkpad.tsdh.de> Mail-Copies-To: never Date: Mon, 23 Nov 2009 14:55:40 +0100 In-Reply-To: <87ws1hldmu.fsf@thinkpad.tsdh.de> (Tassilo Horn's message of "Mon, 23 Nov 2009 11:49:29 +0100") Message-ID: <87einpl50j.fsf@thinkpad.tsdh.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at uni-koblenz.de Subject: [notmuch] Notmuch doesn't index new mails when mail location contains symlinks (was: Notmuch doesn't index new mails) X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 13:55:46 -0000 Tassilo Horn writes: Hi all, I've investigated a bit further. > [notmuch doesn't index new mails although all directories and files > are readable and writable.] In my config, I have: --8<---------------cut here---------------start------------->8--- [database] path=/home/horn/Mail/Dovecot --8<---------------cut here---------------end--------------->8--- In that directory, there are two symlinks pointing to the real mail location in /var/spool/mail: --8<---------------cut here---------------start------------->8--- [horn@localhost][~/Mail/Dovecot][0][5213] [:)] % ll total 0 lrwxrwxrwx 1 horn horn 34 Nov 23 14:49 fastmail -> /var/spool/mail/fastmail/mailboxes lrwxrwxrwx 1 horn horn 29 Nov 23 14:49 uni -> /var/spool/mail/uni/mailboxes --8<---------------cut here---------------end--------------->8--- Whenever I delete those symlinks and created them anew, the new mails get indexed with the next "notmuch new". Of course, I could create a script that does exactly that, but there should be a better way, right? Bye, Tassilo From dottedmag@dottedmag.net Mon Nov 23 06:02:13 2009 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 499B8431FBF for ; Mon, 23 Nov 2009 06:02:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 P867oGov5-I3 for ; Mon, 23 Nov 2009 06:02:12 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id 77982431FBC for ; Mon, 23 Nov 2009 06:02:12 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 0563D8C979 for ; Mon, 23 Nov 2009 15:02:11 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NCZUU-0000Ko-8H for notmuch@notmuchmail.org; Mon, 23 Nov 2009 20:02:06 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org In-Reply-To: <87einpl50j.fsf@thinkpad.tsdh.de> (Tassilo Horn's message of "Mon, 23 Nov 2009 14:55:40 +0100") References: <87ws1hldmu.fsf@thinkpad.tsdh.de> <87einpl50j.fsf@thinkpad.tsdh.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Date: Mon, 23 Nov 2009 20:02:01 +0600 Message-ID: <87ljhxjq5i.fsf@vertex.dottedmag> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] Notmuch doesn't index new mails when mail location contains symlinks X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 14:02:13 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Twas brillig at 14:55:40 23.11.2009 UTC+01 when tassilo@member.fsf.org did = gyre and gimble: TH> Whenever I delete those symlinks and created them anew, the new TH> mails get indexed with the next "notmuch new". Of course, I could TH> create a script that does exactly that, but there should be a TH> better way, right? Probably mail does not get indexed due to mtime checks. Please try whether touch'ing directory with mailboxes makes it work. =2D-=20 http://fossarchy.blogspot.com/ --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAEBAgAGBQJLCpXaAAoJEJ0g9lA+M4iIBNEQAMux/6uNZaynLgEM3DHmQBDi 9tFMrfTi9J2q1bg8gix5iYnvGY+tjVdd4R4uzUntbzDkEzOXwAefqy2dbhRbLxsy Rv6lVnsVWmJ89vYb75YIZ8wW9AjSLTmpsOgzNs5cy19uLmVpY0xLre0bxngs54Ir m3HlKXQd7JqSor8tqvAJHc37WtEToRj/Z64yznNLOkKb6DSVZKQgk3TtDNOJdPDV zS4gN0s9VQv0Mp7+yDIQFKWHQj2ni1N6/DZ0f9d0MUG+1ko6Ud277S50TkQ12B7N 0vEvquzJIg+mrLY+ikjcagbDs6hAO9KnLt9C38NfD671UjWsRkPzzZSqXr2xg9ML GSkOhQbS+ydHZ6SbrES687gRrbCUoH9reVDqLFKSXKl5gCK5slThASSp5pb9OMwG 12+qijZU8caSE3ohe37kUaq4mWaHZKH/WQ4y/I6dvENxvZ73znwChapGcz7ujp14 QZUAEYFUjB0Aryx8SAgSeZdp+XUi5I9/Sf3ZQR8VVZ7zj1u1bu8jKqVOLkYUskpE RuMHaA3EPoW58C6W9JaBSulhHrrduISZaFDe/4Byi9e0WUNKEMPUdy86mEQd53pu gFhlp7jD6/0rq32lfM8eKpTBD15jveZ6VeWVNes07kYvCbbhfqAarqRYPZ4yorL4 jLh9Z3ZMKK8Q4cnN8gwE =TEHU -----END PGP SIGNATURE----- --=-=-=-- From five9a2@gmail.com Mon Nov 23 06:24:18 2009 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 BFDA7431FBC for ; Mon, 23 Nov 2009 06:24:18 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 b0YQhekNKv0l for ; Mon, 23 Nov 2009 06:24:18 -0800 (PST) Received: from mail-bw0-f210.google.com (mail-bw0-f210.google.com [209.85.218.210]) by olra.theworths.org (Postfix) with ESMTP id C0E25431FAE for ; Mon, 23 Nov 2009 06:24:17 -0800 (PST) Received: by bwz2 with SMTP id 2so5274215bwz.0 for ; Mon, 23 Nov 2009 06:24:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=hwDxi7CbZxlHBpyVwsYNPBmR2n4X1ydbCBb2e7bZ6PM=; b=KnoT1DLrgxdUtf2iCIZptkc6UIeKEWrQ36WyoMtjz2MU5ED1xmgt5PJa53hIEHycft 3ve3q8E/L60XdoLgqu+x2voSSd9/4uwoWic6XFommRZvxcGaXkNypXncCwWD7RmXG78I zRojaT1wdXW5Rs1igiUm4/hoj9abjc+0YKda8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=EUbqDt+QD6C+cNU0bY2X4ftoZtM1twifbX3H7iyLFldXLG6WNeh2dU9cVuZYqrTleq CcZ+Fh026Ag+sA/hrHhB620bj7jUeEaUoD3m/ZYrKSOLM/zCLM35JUWi6qpafh1Gwxht VZZV7ho2ZShrt3knPPs3GRyRElrbK2nvprdPs= Received: by 10.204.2.73 with SMTP id 9mr4687447bki.159.1258986256520; Mon, 23 Nov 2009 06:24:16 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 31sm5790992fkt.1.2009.11.23.06.24.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 06:24:15 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Karl Wiberg , Dirk-Jan Binnema In-Reply-To: References: <87skc5yd6v.wl%djcb@djcbsoftware.nl> <1873022c0911230311o77e55fdqa5464a2dd16ec265@mail.gmail.com> Date: Mon, 23 Nov 2009 15:24:46 +0100 Message-ID: <87ws1h48up.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "notmuch@notmuchmail org" , djcb@djcbsoftware.nl Subject: Re: [notmuch] [PATCH 1/2] * avoid gcc 4.4.1 compiler warnings due to ignored write return values X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 14:24:18 -0000 On Mon, 23 Nov 2009 14:19:18 +0100, Karl Wiberg wrote: > On Mon, Nov 23, 2009 at 12:11 PM, Dirk-Jan Binnema wrote: > > > On Mon, Nov 23, 2009 at 9:34 AM, Karl Wiberg wrote: > > > > > Didn't the "(void)" suggestion work? > > > > I actually preferred that solution, but unfortunately, it didn't > > stop gcc from complaining... > > Hmpf. I'd argue that that's a gcc bug, forcing the user to use an > unnecessarily complicated way to pretend to use the return value. Oh > well. >From the gcc man page: -Wunused-value Warn whenever a statement computes a result that is explicitly not used. To suppress this warning cast the unused expression to void. This includes an expression-statement or the left- hand side of a comma expression that contains no side effects. For example, an expression such as x[i,j] will cause a warning, while x[(void)i,j] will not. This warning is enabled by -Wall. But I'm confused here because I don't currently see any warnings with gcc-4.4.2. Actually this must be a bug because I get no warnings for the blatantly unused malloc(5); with -Wall -Wextra -pedantic. Anyway, if your system headers specify __attribute__((warn_unused_result)) for write, then you could be running into this bug/feature http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35579 Jed From tassilo@member.fsf.org Mon Nov 23 06:43:46 2009 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 4C109431FBC for ; Mon, 23 Nov 2009 06:43:46 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 wa5MNIcMfvep for ; Mon, 23 Nov 2009 06:43:43 -0800 (PST) Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15]) by olra.theworths.org (Postfix) with ESMTP id B48A7431FAE for ; Mon, 23 Nov 2009 06:43:42 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id F103D78A3171; Mon, 23 Nov 2009 15:43:41 +0100 (CET) Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 14355-04; Mon, 23 Nov 2009 15:43:41 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Received: from thinkpad.tsdh.de (unknown [141.26.95.131]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 59CD078A3170; Mon, 23 Nov 2009 15:43:41 +0100 (CET) From: Tassilo Horn To: Mikhail Gusarov References: <87ws1hldmu.fsf@thinkpad.tsdh.de> <87einpl50j.fsf@thinkpad.tsdh.de> <87ljhxjq5i.fsf@vertex.dottedmag> Mail-Copies-To: never Date: Mon, 23 Nov 2009 15:43:41 +0100 In-Reply-To: <87ljhxjq5i.fsf@vertex.dottedmag> (Mikhail Gusarov's message of "Mon, 23 Nov 2009 20:02:01 +0600") Message-ID: <876391l2si.fsf@thinkpad.tsdh.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at uni-koblenz.de Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Notmuch doesn't index new mails when mail location contains symlinks X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 14:43:46 -0000 Mikhail Gusarov writes: Hi Mikhail, > TH> Whenever I delete those symlinks and created them anew, the new > TH> mails get indexed with the next "notmuch new". Of course, I could > TH> create a script that does exactly that, but there should be a > TH> better way, right? > > Probably mail does not get indexed due to mtime checks. Please try > whether touch'ing directory with mailboxes makes it work. No, it seems that doesn't help either. First, I only touched the two symlinks. This didn't help. Then I used "find . -type d | xargs touch" to touch all directories inside the directories the symlinks point to. But still no luck. Finally, I deleted the symlinks and created them anew, and then it indexed the 12 new mails that arrived in the meantime. Bye, Tassilo From aneesh.kumar@linux.vnet.ibm.com Mon Nov 23 06:51:09 2009 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 9A2E5431FBF for ; Mon, 23 Nov 2009 06:51:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 5ujliMmazqMa for ; Mon, 23 Nov 2009 06:51:08 -0800 (PST) Received: from e28smtp09.in.ibm.com (e28smtp09.in.ibm.com [122.248.162.9]) by olra.theworths.org (Postfix) with ESMTP id 4C548431FBC for ; Mon, 23 Nov 2009 06:51:07 -0800 (PST) Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp09.in.ibm.com (8.14.3/8.13.1) with ESMTP id nANEVsjs017324 for ; Mon, 23 Nov 2009 20:01:54 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nANEp46Y2314320 for ; Mon, 23 Nov 2009 20:21:04 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nANEp4ED026132 for ; Mon, 23 Nov 2009 20:21:04 +0530 Received: from localhost.localdomain ([9.77.127.154]) by d28av01.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nANEp2Aa025619; Mon, 23 Nov 2009 20:21:03 +0530 From: "Aneesh Kumar K.V" To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 20:20:59 +0530 Message-Id: <1258987859-25557-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.6.5.2.74.g610f9 Subject: [notmuch] [PATCH] notmuch.el: Use variable notmuch-search-oldest-first to decide the search order X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 14:51:09 -0000 Make sure we use notmuch-search-oldest-first to decide the how the search result should be displayed. This helps to set the value to nil and have latest mail shown first Signed-off-by: Aneesh Kumar K.V --- notmuch.el | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/notmuch.el b/notmuch.el index af4ceec..5582132 100644 --- a/notmuch.el +++ b/notmuch.el @@ -840,7 +840,8 @@ thread from that buffer can be show when done with this one)." (fset 'notmuch-search-mode-map notmuch-search-mode-map) (defvar notmuch-search-query-string) -(defvar notmuch-search-oldest-first) +(defvar notmuch-search-oldest-first t + "Show the oldest mail first in the search-mode") (defun notmuch-search-scroll-up () "Scroll up, moving point to last message in thread if at end." @@ -1106,7 +1107,7 @@ current search results AND that are tagged with the given tag." (defun notmuch () "Run notmuch to display all mail with tag of 'inbox'" (interactive) - (notmuch-search "tag:inbox" t)) + (notmuch-search "tag:inbox" notmuch-search-oldest-first)) (setq mail-user-agent 'message-user-agent) @@ -1176,7 +1177,7 @@ results for the search terms in that line. (setq folder (notmuch-folder-find-name))) (let ((search (assoc folder notmuch-folders))) (if search - (notmuch-search (cdr search) t)))) + (notmuch-search (cdr search) notmuch-search-oldest-first)))) (defun notmuch-folder () "Show the notmuch folder view and update the displayed counts." -- 1.6.5.2.74.g610f9 From tassilo@member.fsf.org Mon Nov 23 07:01:43 2009 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 9D376431FBF for ; Mon, 23 Nov 2009 07:01:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 JAu2kr6mG36p for ; Mon, 23 Nov 2009 07:01:42 -0800 (PST) Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15]) by olra.theworths.org (Postfix) with ESMTP id C8761431FAE for ; Mon, 23 Nov 2009 07:01:42 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 38C8578A23D5; Mon, 23 Nov 2009 16:01:42 +0100 (CET) Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20617-01; Mon, 23 Nov 2009 16:01:41 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Received: from thinkpad.tsdh.de (unknown [141.26.95.131]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 8F0E878A2133; Mon, 23 Nov 2009 16:01:41 +0100 (CET) From: Tassilo Horn To: Mikhail Gusarov References: <87ws1hldmu.fsf@thinkpad.tsdh.de> <87einpl50j.fsf@thinkpad.tsdh.de> <87ljhxjq5i.fsf@vertex.dottedmag> <876391l2si.fsf@thinkpad.tsdh.de> Mail-Copies-To: never Date: Mon, 23 Nov 2009 16:01:41 +0100 In-Reply-To: <876391l2si.fsf@thinkpad.tsdh.de> (Tassilo Horn's message of "Mon, 23 Nov 2009 15:43:41 +0100") Message-ID: <871vjpl1yi.fsf@thinkpad.tsdh.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at uni-koblenz.de Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Notmuch doesn't index new mails when mail location contains symlinks X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 15:01:43 -0000 Tassilo Horn writes: Hi Mikhail, >> TH> Whenever I delete those symlinks and created them anew, the new >> TH> mails get indexed with the next "notmuch new". Of course, I could >> TH> create a script that does exactly that, but there should be a >> TH> better way, right? >> >> Probably mail does not get indexed due to mtime checks. Please try >> whether touch'ing directory with mailboxes makes it work. > > No, it seems that doesn't help either. Ah, I'm stupid! I don't have to touch the symlinks or the directories inside the locations the symlinks point to, but instead I have to touch the top-level directory where the symlinks are contained in. Then it works as expected, AFAICT. Thanks a lot, Tassilo From five9a2@gmail.com Mon Nov 23 07:02:32 2009 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 B70BA431FBF for ; Mon, 23 Nov 2009 07:02:32 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 9OrubqNU9PgF for ; Mon, 23 Nov 2009 07:02:32 -0800 (PST) Received: from mail-bw0-f210.google.com (mail-bw0-f210.google.com [209.85.218.210]) by olra.theworths.org (Postfix) with ESMTP id DDDBC431FAE for ; Mon, 23 Nov 2009 07:02:31 -0800 (PST) Received: by bwz2 with SMTP id 2so5315709bwz.0 for ; Mon, 23 Nov 2009 07:02:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=MRhkMd4enYkDgVHoyGVPvkGf7JK6gtMHHUGb9Gnn508=; b=Y8YNrOMUflsk/DaaU/7PakJOoYYIhD52751CV1yxsmyZV4uOeBDf3UMx6ruSuQg5n1 tA/ldE79BRahCfwq+t3Wq7y+aphXd40+tCBWDHe1rV2NUaedjklaa2GmqdmR7VNRgA+B cHP7UcOXlYuGEV6qx/6d8MOmn0uP6/maUFpIM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=aHHT/GOPjJgQDnGZuntXJXCF31w3w8UQw2ldb5liHOvvqC/H0qLAiq6ZzVo+H3S3h3 H2jXqLMcmLgx86P6e1ZTHGDpOsaM0mG3c+TnwsMC4cZoSv+lJhbTlUgX4kqCYOnX7Me0 TBcWH6XSpRugFyQYREweHDb5F2Rlts8jUSARo= Received: by 10.204.10.2 with SMTP id n2mr4668027bkn.91.1258988550061; Mon, 23 Nov 2009 07:02:30 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 18sm5823228fks.4.2009.11.23.07.02.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 07:02:29 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Tassilo Horn , Mikhail Gusarov In-Reply-To: <876391l2si.fsf@thinkpad.tsdh.de> References: <87ws1hldmu.fsf@thinkpad.tsdh.de> <87einpl50j.fsf@thinkpad.tsdh.de> <87ljhxjq5i.fsf@vertex.dottedmag> <876391l2si.fsf@thinkpad.tsdh.de> Date: Mon, 23 Nov 2009 16:03:00 +0100 Message-ID: <87vdh1472z.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Notmuch doesn't index new mails when mail location contains symlinks X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 15:02:32 -0000 On Mon, 23 Nov 2009 15:43:41 +0100, Tassilo Horn wrote: > First, I only touched the two symlinks. Unfortunately, this actually touched the file pointed to by the symlink, if you stat the symlink you will see that mtime did not change. > This didn't help. Then I used > "find . -type d | xargs touch" to touch all directories inside the > directories the symlinks point to. Actually, this would not have followed the symlinks so it does the same thing as before. I think it is actually hard (or not possible) to change mtime on symlinks under Linux. > But still no luck. Finally, I deleted the symlinks and created them > anew, and then it indexed the 12 new mails that arrived in the > meantime. If /var is on the same filesystem, you could use hard links instead of symlinks. Otherwise I would just add the appropriate ln -sf in the hook before notmuch new. The real solution is for notmuch to check mtime of whatever the symlink's target. Jed From dottedmag@dottedmag.net Mon Nov 23 07:10:18 2009 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 23DC2431FBF for ; Mon, 23 Nov 2009 07:10:18 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 xHKj-d9eVU+F for ; Mon, 23 Nov 2009 07:10:17 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id 37960431FAE for ; Mon, 23 Nov 2009 07:10:17 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 704428C979 for ; Mon, 23 Nov 2009 16:10:15 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NCaYJ-00012U-9i for notmuch@notmuchmail.org; Mon, 23 Nov 2009 21:10:07 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org References: <87ws1hldmu.fsf@thinkpad.tsdh.de> <87einpl50j.fsf@thinkpad.tsdh.de> <87ljhxjq5i.fsf@vertex.dottedmag> <876391l2si.fsf@thinkpad.tsdh.de> <871vjpl1yi.fsf@thinkpad.tsdh.de> Date: Mon, 23 Nov 2009 21:10:01 +0600 In-Reply-To: <871vjpl1yi.fsf@thinkpad.tsdh.de> (Tassilo Horn's message of "Mon, 23 Nov 2009 16:01:41 +0100") Message-ID: <87aaydjn06.fsf@vertex.dottedmag> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] Notmuch doesn't index new mails when mail location contains symlinks X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 15:10:18 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Twas brillig at 16:01:41 23.11.2009 UTC+01 when tassilo@member.fsf.org did = gyre and gimble: >>> Probably mail does not get indexed due to mtime checks. Please try >>> whether touch'ing directory with mailboxes makes it work. >> No, it seems that doesn't help either. TH> Ah, I'm stupid! I don't have to touch the symlinks or the TH> directories inside the locations the symlinks point to, but instead TH> I have to touch the top-level directory where the symlinks are TH> contained in. Then it works as expected, AFAICT. Really odd. =2D-=20 http://fossarchy.blogspot.com/ --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAEBAgAGBQJLCqXKAAoJEJ0g9lA+M4iICf4QAJtjZrdUrd+zUEv/WyiFKu89 3wEM18Jorsc17dnLj8GEhn23jE5yqUWWGr8EVBO+pHne1erB+wQa4eIwHulqxHLn ZgNAtseU8bGL4GZDnc430EoC2BBcacXLezEUXj3YRAY2wJ3XJqG6OApLTRpHL9Si Ul5LviV5ETS/R2AaWVi62yLl5N1wQjzb8xnxHcOwM5i70jyrjTA5SOqZbpecFpx5 sfhi0RU/1T4PATzHqJE8EwVEZDYJIY63IF2WGcBqg+3fp1Q02lLN0mJ3uoksnNiv ho193MdwRyduI5USV4hsnRYG10AznUZpDJMBrJ0nmBWTTsb4Ou5COS5Dn2C06TbM PDRRY+xoNlLTn9NMS0x0kRnXxKX8ZikXc9PMv46pXNFD7NSEUZMAoTopsquof+C/ TOKDeoBkkRrUVHvcX85JtOKYYH4GwFOoMuDUMZLTGGzmoClweKrm1OJzcr1gCOZm 6HgJQnUGNqiua9HTOWj2qoO6iT19GV3wDEld+Cjqltgn0T7WWH/Vd/D5T1ntgmrf CLTbT67o0hdaHrHGCDbfub/gdU3OK1dcv+d4qPcKMvz7WtgBN4ozKbSu64xNnMEC IFZanmIUQgG2pp0sh8AMJ/PKFgw0AQrsSJXzdSD4f2gw4OmvI8lz3CHZoEWRPMPQ SfLSvxiDGW09MQ/em7cm =etu3 -----END PGP SIGNATURE----- --=-=-=-- From dottedmag@dottedmag.net Mon Nov 23 07:11:17 2009 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 CA0F6431FBF for ; Mon, 23 Nov 2009 07:11:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 quiTKws7ZXsZ for ; Mon, 23 Nov 2009 07:11:17 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id 1DB1F431FAE for ; Mon, 23 Nov 2009 07:11:17 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 805778C979 for ; Mon, 23 Nov 2009 16:11:15 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NCaZI-00012o-0I for notmuch@notmuchmail.org; Mon, 23 Nov 2009 21:11:08 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org References: <87ws1hldmu.fsf@thinkpad.tsdh.de> <87einpl50j.fsf@thinkpad.tsdh.de> <87ljhxjq5i.fsf@vertex.dottedmag> <876391l2si.fsf@thinkpad.tsdh.de> <87vdh1472z.fsf@59A2.org> Date: Mon, 23 Nov 2009 21:11:07 +0600 In-Reply-To: <87vdh1472z.fsf@59A2.org> (Jed Brown's message of "Mon, 23 Nov 2009 16:03:00 +0100") Message-ID: <876391jmyc.fsf@vertex.dottedmag> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] Notmuch doesn't index new mails when mail location contains symlinks X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 15:11:18 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Twas brillig at 16:03:00 23.11.2009 UTC+01 when jed@59A2.org did gyre and g= imble: JB> The real solution is for notmuch to check mtime of whatever the JB> symlink's target. It does exactly this AFACT, stat() everywhere, not lstat(). =2D-=20 http://fossarchy.blogspot.com/ --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAEBAgAGBQJLCqYLAAoJEJ0g9lA+M4iIw24P/14Dne78CrVt3mBBsFkKQM8S kqlnUQTs3fNbhVYUorgfIAzbVqyGayCdyq3DA4y12OV4rHHjgrqnB+59rFCV0DM6 5bQTyVWOwtbbODJW1d7LkMRB98ZAx9RJxcpmXO83wEjYo2AdWpFEYgzRqyJw8/19 RMBLuMW8j2k+baks3u3oXcrhwjwhPcSzoE1zODZx5pawzbbANYhD0sXiNtGNtHSf cAk44aYlOSxSwpKc/u9J/cVUy0jjmgvdTGKac54conlNxt7z6Udk5F1BMHtrAgoH P1x58thbZwgDXFshZbVcDfz72Tnlvg4XGWurwgI8hz6babkWaBoNOAj9V9Dh2ByS yr7/N1VwG9n+tqLi9EJXVpcYj/fQxJnFpCKE8rv7o2B8p0TUb/Fk7bd9tppqmoOI 2yRw0wR8B5Qm9JP7P41XBSODFaGcwMbrQU/6PKBadh6n9a3bRcew3Qvg+vYnnMHz dfVRE++871iUeoZw+7hSL4Zza4xB7/4rES0xCgChR7pdgr+vLzFVCVpfD7kg53xE Yw/uGKnksrlFOOaOFNb9njKW2ZNQaIoLZ7+bKSN0dWYSHwrXYSIou4r7fvxaRDcq et5tS+4Mj609sERLN9OSZrD3MN8eKNbQ+wplUY8RbljMGC8Q3EMtGvsR9xctYKF+ CyelPwDlk2J4m8h7xqGL =2JpW -----END PGP SIGNATURE----- --=-=-=-- From five9a2@gmail.com Mon Nov 23 07:16:30 2009 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 0456E431FBF for ; Mon, 23 Nov 2009 07:16:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 VKwz49qiBKru for ; Mon, 23 Nov 2009 07:16:29 -0800 (PST) Received: from mail-bw0-f210.google.com (mail-bw0-f210.google.com [209.85.218.210]) by olra.theworths.org (Postfix) with ESMTP id 1145F431FAE for ; Mon, 23 Nov 2009 07:16:28 -0800 (PST) Received: by bwz2 with SMTP id 2so5331320bwz.0 for ; Mon, 23 Nov 2009 07:16:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=+aIEuOf/4k18Per14zsupsFm+aA9K+KWiTWUbeNc8XE=; b=GQUlTxNjib2VgVvYNP1FlHB4UEPEc3YIOXCqiUbXsX61achB9ICSCxTQzr/Ui4PtG7 hKBOo+W9zntHnQ/RsKA9Ux086Tag6Rhwcm0E2Pg4kq49YrOucHKvtNPt+EjlVAutinWI 8HXAYMNKOlabJ9ozt+FCxtN+/9I8ChV1xU7DI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=LT684svN2bRvyb/x3s2Y/NzcwT3vjenjP8Yiv6LvMTB2wskz3+4jqekWKG/MVm2EJe soBj2BcL8xjbaeYHuMDMWcxItlrnnXUXHSOtfIVIdKKQ9b11jxMwQdX7adkpiazERNzN FFM0ZGj3guwwOUn9O4xKK0hBjzg0jDONvKjXA= Received: by 10.204.24.83 with SMTP id u19mr4927294bkb.22.1258989387888; Mon, 23 Nov 2009 07:16:27 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id g28sm5836576fkg.38.2009.11.23.07.16.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 07:16:26 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Tassilo Horn , Mikhail Gusarov In-Reply-To: <871vjpl1yi.fsf@thinkpad.tsdh.de> References: <87ws1hldmu.fsf@thinkpad.tsdh.de> <87einpl50j.fsf@thinkpad.tsdh.de> <87ljhxjq5i.fsf@vertex.dottedmag> <876391l2si.fsf@thinkpad.tsdh.de> <871vjpl1yi.fsf@thinkpad.tsdh.de> Date: Mon, 23 Nov 2009 16:16:58 +0100 Message-ID: <87tywl46fp.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Notmuch doesn't index new mails when mail location contains symlinks X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 15:16:30 -0000 On Mon, 23 Nov 2009 16:01:41 +0100, Tassilo Horn wrote: > Tassilo Horn writes: > I don't have to touch the symlinks or the directories inside the > locations the symlinks point to, but instead I have to touch the > top-level directory where the symlinks are contained in. Ah, it's slightly more subtle. Notmuch correctly uses stat() instead of lstat() to check whether the link target changed. However, mtime for your mail root directory (containing the symlinks) does not get updated when the target of the symlinks is updated. I think the only way to fix this is to replace the current search (which skips a directory as soon as it's mtime is older than the database) with one that enters all directories so that symlinks are actually followed. Jed From dominik.epple@googlemail.com Mon Nov 23 07:30:31 2009 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 0F63B431FC0 for ; Mon, 23 Nov 2009 07:30:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 n8yfeTYoljsi for ; Mon, 23 Nov 2009 07:30:30 -0800 (PST) Received: from mail-yw0-f200.google.com (mail-yw0-f200.google.com [209.85.211.200]) by olra.theworths.org (Postfix) with ESMTP id 667B6431FAE for ; Mon, 23 Nov 2009 07:30:30 -0800 (PST) Received: by ywh38 with SMTP id 38so4945617ywh.6 for ; Mon, 23 Nov 2009 07:30:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=EzpUNdpNvUz1kIRvLOZ4zE7eJTx7Bu6vD0LLchJSUck=; b=AMip8UgGsV9fnYnmd9qjv5swcKBnYUV0uvb2MMqzMcI40JJYIXi94oRKi+otLU/a/t aEcB8XZfUp/bNVO56hUGRoZ/pmlJFfMo5+XxGQDfM4b3A+Q235xP3sT5LkNCe6Abm3av ZAnhISX5fgyIY4QxP7vBFOLtMAYn4flGqu9uU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=QWe1ww+yjei2TCGNiLcD5ZNATB267YdOmnNDhReWEnK76rOdySGy2N2ypQxsNsIZgs VtEHWTMLvgt87/hCE6NEROM2Rrz6wSN1D/xPrysVcsne4C/1UWOnGh6J8a8ki7DBPY92 Jhb6kpDgcFpLmWkn8aaVcC/xAi6z5ZhjtT1FY= MIME-Version: 1.0 Received: by 10.90.12.19 with SMTP id 19mr6640983agl.96.1258990229878; Mon, 23 Nov 2009 07:30:29 -0800 (PST) In-Reply-To: <877htlmbhu.fsf@yoom.home.cworth.org> References: <123554aa0911200056h73def158pb0db64a2a78ed687@mail.gmail.com> <877htlmbhu.fsf@yoom.home.cworth.org> Date: Mon, 23 Nov 2009 16:30:29 +0100 Message-ID: <123554aa0911230730t72d36378rd45459462496034a@mail.gmail.com> From: Dominik Epple To: Carl Worth Content-Type: text/plain; charset=ISO-8859-1 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] notmuch new: Memory problem X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 15:30:31 -0000 Hi, Thanks for your help. Here is the information you requested: 2009/11/20 Carl Worth : > I'm curious how big your .notmuch directory ended up after this > operation. (And how that compares in size to the total size of your > collection of mail.) I guess you mean these directories: $ du -sh Maildir 2,8G Maildir $ cd Maildir $ du -sh .notmuch 1,1G .notmuch > That's definitely not too much mail. I think you should expect "notmuch > new" currently to index on the order of 10 - 100 messages/sec. > > Your "notmuch new" process should have been reporting a count once per > second as it progressed, (at least until things went wrong). How far did > you see that go? It started quickly, but its speed decreased, and I interrupted it at some 4000 messages, if I remember correctly. Regards Dominik From brett.viren@gmail.com Mon Nov 23 07:31:49 2009 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 3ED5A431FBF for ; Mon, 23 Nov 2009 07:31:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 yBmrpjFX8fs9 for ; Mon, 23 Nov 2009 07:31:48 -0800 (PST) Received: from mail-pw0-f51.google.com (mail-pw0-f51.google.com [209.85.160.51]) by olra.theworths.org (Postfix) with ESMTP id 9AA41431FAE for ; Mon, 23 Nov 2009 07:31:48 -0800 (PST) Received: by pwj10 with SMTP id 10so3471636pwj.30 for ; Mon, 23 Nov 2009 07:31:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=5Q9e9jwxcevwb7HuYNdXoh7DCNgcnOfx8+cO7+3ChOQ=; b=KWGZ+mJox7RLVvSJ7ygjA/GWYqjYCAv2C9r37rdmIL4JV+7O+kHfC43T7Tvd76n2rh mphPDuzkikujZJ4xUl+6cguAsYvAhf9VUKZRjMZ3oyLMeGm8b/aW3zK/Xb/7MZx/+rsn SGNhDiOrrN017ETd9mPDrUW2IuivCcYBH7/Yk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=HzQ2l7IYyMRiDsqf3c1cv0c3ygvRUCdlS1wkb+rxNycm5mEXrQYjRQXm7wOk32DyJs Q4t36QvurweeHzRI6zya/o9/ZjIridw2YRaHTqPIefb6vDT4vZcKmhNYq0Epg+mkvv2K pfulM/bOfr63wEN+wEmod7ZjViF2ELLHFqUAM= MIME-Version: 1.0 Received: by 10.114.163.13 with SMTP id l13mr9241795wae.139.1258990307431; Mon, 23 Nov 2009 07:31:47 -0800 (PST) Date: Mon, 23 Nov 2009 10:31:47 -0500 Message-ID: <46263c600911230731i529f2db5rec11bed02f84ef13@mail.gmail.com> From: Brett Viren To: notmuch@notmuchmail.org Content-Type: text/plain; charset=ISO-8859-1 Subject: [notmuch] [patch] Trivial fix for non-root install X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 15:31:49 -0000 Installing as a normal user fails because the bash completion config files try to install into /etc. This trivial patch fixes this. diff --git a/Makefile.config b/Makefile.config index ddc7436..c04d57a 100644 --- a/Makefile.config +++ b/Makefile.config @@ -1,3 +1,2 @@ -prefix = /usr/local -bash_completion_dir = /etc/bash_completion.d +bash_completion_dir = $(prefix)/etc/bash_completion.d CFLAGS += -DHAVE_VALGRIND -Brett. From ingmar@exherbo.org Mon Nov 23 07:41:25 2009 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 2AFA7431FBF for ; Mon, 23 Nov 2009 07:41:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 dw8FEnv8tqmq for ; Mon, 23 Nov 2009 07:41:24 -0800 (PST) Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by olra.theworths.org (Postfix) with ESMTP id 7DAB3431FAE for ; Mon, 23 Nov 2009 07:41:24 -0800 (PST) Received: from [83.101.72.69] (helo=localhost) by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NCb2Z-0006J3-P1 for notmuch@notmuchmail.org; Mon, 23 Nov 2009 15:41:23 +0000 Content-Type: text/plain; charset=utf8 From: Ingmar Vanhassel To: notmuch In-reply-to: <46263c600911230731i529f2db5rec11bed02f84ef13@mail.gmail.com> References: <46263c600911230731i529f2db5rec11bed02f84ef13@mail.gmail.com> Date: Mon, 23 Nov 2009 16:41:23 +0100 Message-Id: <1258990831-sup-2789@cannonball> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Subject: Re: [notmuch] [patch] Trivial fix for non-root install X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 15:41:25 -0000 Excerpts from Brett Viren's message of Mon Nov 23 16:31:47 +0100 2009: > Installing as a normal user fails because the bash completion config > files try to install into /etc. This trivial patch fixes this. NAK Your patch breaks the more common case of installing as root user. It now installs into /usr/etc where bash completions most likely won't be found. > diff --git a/Makefile.config b/Makefile.config > index ddc7436..c04d57a 100644 > --- a/Makefile.config > +++ b/Makefile.config > @@ -1,3 +1,2 @@ > -prefix = /usr/local > -bash_completion_dir = /etc/bash_completion.d > +bash_completion_dir = $(prefix)/etc/bash_completion.d > CFLAGS += -DHAVE_VALGRIND > > > -Brett. -- Exherbo KDE, X.org maintainer From djcb.bulk@gmail.com Mon Nov 23 08:14:14 2009 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 397D9431FBC for ; Mon, 23 Nov 2009 08:14:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 WUA+Cq2rRtUR for ; Mon, 23 Nov 2009 08:14:13 -0800 (PST) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by olra.theworths.org (Postfix) with ESMTP id 78136431FAE for ; Mon, 23 Nov 2009 08:14:13 -0800 (PST) Received: by fg-out-1718.google.com with SMTP id 19so835389fgg.2 for ; Mon, 23 Nov 2009 08:14:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=F4bu6hj39pAsk/BPcqCwtvifSyjo71NnFTrn7+by2xo=; b=M2TYb+CLRiugdXizrgqiIWjF1m5Sw2SksS1j9HIVvAxReJ2ferqIY7UYsLOMOtSJai ufD0TS3bDEm3fXLqNEW4pDHD89uK09OU0opyZjsFTxcpi/W51YlwrzEYs7f3qqUfsTvW d9mKR9w9GG1W2w/Jv5h0prkpt6BoSEKX142m4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Lb/a6AJpRpgN9xrOMR69ms0YlEXOYBgtUjdNOSyZGIZko7l8UAwtaMvQLoMg/sVWOO caflHYpJXBpuDkkxphRjELcd5x3XyRBRYccfCsfIaFJMM+Ox8j3HhLkzBkrKGY01mgbl GUHwjspEffjn5wAs/IJKaPvKxJBW3fVdUi/ok= MIME-Version: 1.0 Received: by 10.87.76.8 with SMTP id d8mr4271600fgl.66.1258992852579; Mon, 23 Nov 2009 08:14:12 -0800 (PST) In-Reply-To: <87ws1h48up.fsf@59A2.org> References: <87skc5yd6v.wl%djcb@djcbsoftware.nl> <1873022c0911230311o77e55fdqa5464a2dd16ec265@mail.gmail.com> <87ws1h48up.fsf@59A2.org> Date: Mon, 23 Nov 2009 18:14:12 +0200 Message-ID: <1873022c0911230814y783f14ffn23f12d13c73e5acc@mail.gmail.com> From: Dirk-Jan Binnema To: Jed Brown Content-Type: multipart/alternative; boundary=001485f8d182c0b5fc04790c1d94 Cc: "notmuch@notmuchmail org" , djcb@djcbsoftware.nl Subject: Re: [notmuch] [PATCH 1/2] * avoid gcc 4.4.1 compiler warnings due to ignored write return values X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 16:14:14 -0000 --001485f8d182c0b5fc04790c1d94 Content-Type: text/plain; charset=ISO-8859-1 Hi Jed, On Mon, Nov 23, 2009 at 4:24 PM, Jed Brown wrote: > > > But I'm confused here because I don't currently see any warnings with > gcc-4.4.2. Actually this must be a bug because I get no warnings for > the blatantly unused > > malloc(5); > Did you try it with -O2? Without optimizations many of the warnings are not issued. Best wishes, Dirk. --001485f8d182c0b5fc04790c1d94 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Jed,

On Mon, Nov 23, 2009 at 4:24 PM, = Jed Brown <jed@59a2.or= g> wrote:


But I'm confused here because I don't currently see any warnings wi= th
gcc-4.4.2. =A0Actually this must be a bug because I get no warnings for
the blatantly unused

=A0malloc(5);

Did you try it with -O2? Without op= timizations many of the warnings are not issued.

Best wishes,
Dir= k.
--001485f8d182c0b5fc04790c1d94-- From dominik.epple@googlemail.com Mon Nov 23 08:26:42 2009 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 594A7431FBF for ; Mon, 23 Nov 2009 08:26:42 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 RUXZIT2QX6To for ; Mon, 23 Nov 2009 08:26:41 -0800 (PST) Received: from mail-gx0-f221.google.com (mail-gx0-f221.google.com [209.85.217.221]) by olra.theworths.org (Postfix) with ESMTP id 96046431FAE for ; Mon, 23 Nov 2009 08:26:41 -0800 (PST) Received: by gxk21 with SMTP id 21so4801871gxk.10 for ; Mon, 23 Nov 2009 08:26:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=8AFa7rDAzE+o0TZXqMCJIBtlzQtVfiEIkzPdpHsUOcs=; b=rv44UcNPFj4APsNwDaJjjUXiDJT6z9ENWhmtyCVeH6ZkhCR6whmnafcqQAnJ3J3opZ Sj9opl5JKVXnpoFuZWq2o+3tbeFNYVnPCdLjHwphuE5fWwk9DKzHqqOvbKDZyfTbIH7K nS9cNXZZGYFfjdfcLcPcT05RZlnsHLdlPTE78= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=TstgJ6bOxTVhyjX5+Rz/Hfu0c46PpBerJvVcOV2OKD2SwmdstWHbyULy1067fXK/FI a7hAgdyyCjrBpXkrwoxE9TStzLeVPRz1Tk9PoAP19W+b6Yard5M6LJvJD5PWKFMBWuo1 DEu62k99FNjOrdt0miNKzFzCmvFGvHWIYpVFI= MIME-Version: 1.0 Received: by 10.90.150.17 with SMTP id x17mr1842627agd.57.1258993601174; Mon, 23 Nov 2009 08:26:41 -0800 (PST) In-Reply-To: <87skc8oqyn.fsf@yoom.home.cworth.org> References: <123554aa0911200056h73def158pb0db64a2a78ed687@mail.gmail.com> <87skc8oqyn.fsf@yoom.home.cworth.org> Date: Mon, 23 Nov 2009 17:26:41 +0100 Message-ID: <123554aa0911230826o11e54d5ckc90e5ae8dab6ffd3@mail.gmail.com> From: Dominik Epple To: Carl Worth Content-Type: text/plain; charset=ISO-8859-1 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] notmuch new: Memory problem X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 16:26:42 -0000 Hi, 2009/11/20 Carl Worth : > On Fri, 20 Nov 2009 09:56:50 +0100, Dominik Epple wrote: >> Is there a problem with the number of my mails? I currently have over >> 40.000 Mails... they live currently in mbox files, I created a Maildir >> with mb2md-3.20.pl. > > I'm suspecting that you have some big files in there, (such as indexes > from some other mail program). We had code in notmuch to detect and > ignore these, but a recent bug had broken that. > > I just fixed this code as of the below commit. So please update and try > again and let us know if things work any better. Ok, one of the problems seems to be solved. One can learn from the info: output that the code actually ignores non-email data. These files are small and fragments of real mail. Obviously the mb2md code made errors there. But I run in a different issue. I have a lot of files in the Maildir which contain base64 encoded binary data. (Some remote site sends my its daily backup logs.) Those files are all of 2.4 megabyte in size. By adding some debug code to notmuch-new.c, I find out that the program becomes very slow and consumes a lot of memory when adding these files. I just killed it when it consumed 2 GByte again. So as you suspected, the problem seems to stem from large files. But those large files are not indices or stuff like that from different mail programs, but they are valid emails which contain a lot of (encoded) binary data. Perhaps we should be able to configure notmuch such that he ignores all mails that match specific pattern (like "Subject: Backup logs from.*") Regards Dominik From five9a2@gmail.com Mon Nov 23 08:38:13 2009 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 EAFA1431FBC for ; Mon, 23 Nov 2009 08:38:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 IX4hPSHqf4e7 for ; Mon, 23 Nov 2009 08:38:13 -0800 (PST) Received: from mail-bw0-f210.google.com (mail-bw0-f210.google.com [209.85.218.210]) by olra.theworths.org (Postfix) with ESMTP id DFCEE431FAE for ; Mon, 23 Nov 2009 08:38:12 -0800 (PST) Received: by bwz2 with SMTP id 2so5423356bwz.0 for ; Mon, 23 Nov 2009 08:38:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=FXeE7CZm+UTeuS7f2Xr5DoBGPii4HTRC7UzEGOXYdls=; b=IjRfNRMUx6rMkiMZm1orV4kUn/seFyZLSjtz7/7RCtaRKRV2mASJYwuuhPg8NgLSkH 9nlpac00qGxx24eDCxFXdmuovvR/OYv1mr07hvf9kIFkUhFVLFAWT0Ug8Oct9NR1NVCF 6hFJxNknhUZ5npqMILzBEfdOmzFy5n3F6esoQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=VaeAlQFCxG+1ss8h7b7uYbCwkYzDVrVo/JZmq5X9MyRQTWcPvfAA+KMIeUIe6NjTsH oLdc9A79sA7HEZjuWZCiZpfLQfMdy8BnmqyCkWfeeOiEU0gDvTF5QuVt5SZRDbK/GhwY Tns5YAc13ghEzIkieF4SEY2LLysnUNvIm7iRA= Received: by 10.204.152.151 with SMTP id g23mr582265bkw.148.1258994291779; Mon, 23 Nov 2009 08:38:11 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 22sm5937992fkr.27.2009.11.23.08.38.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 08:38:10 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Dirk-Jan Binnema , Jed Brown In-Reply-To: <1873022c0911230814y783f14ffn23f12d13c73e5acc@mail.gmail.com> References: <87skc5yd6v.wl%djcb@djcbsoftware.nl> <1873022c0911230311o77e55fdqa5464a2dd16ec265@mail.gmail.com> <87ws1h48up.fsf@59A2.org> <1873022c0911230814y783f14ffn23f12d13c73e5acc@mail.gmail.com> Date: Mon, 23 Nov 2009 17:38:42 +0100 Message-ID: <87skc542nh.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "notmuch@notmuchmail org" , djcb@djcbsoftware.nl Subject: Re: [notmuch] [PATCH 1/2] * avoid gcc 4.4.1 compiler warnings due to ignored write return values X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 16:38:14 -0000 On Mon, 23 Nov 2009 18:14:12 +0200, Dirk-Jan Binnema wrote: > Did you try it with -O2? Without optimizations many of the warnings are not > issued. Yes, $ cat > foo.c #include #include int main() { malloc(5); write(2,0,10); return 0; } $ gcc -static -std=c89 -O0 -Wall -Wextra -pedantic -o foo foo.c $ objdump -d -M intel foo |grep -A12 '
' 00000000004002a4
: 4002a4: 55 push rbp 4002a5: 48 89 e5 mov rbp,rsp 4002a8: bf 05 00 00 00 mov edi,0x5 4002ad: e8 6e 61 00 00 call 406420 <__libc_malloc> 4002b2: ba 0a 00 00 00 mov edx,0xa 4002b7: be 00 00 00 00 mov esi,0x0 4002bc: bf 02 00 00 00 mov edi,0x2 4002c1: e8 ea a0 00 00 call 40a3b0 <__libc_write> 4002c6: b8 00 00 00 00 mov eax,0x0 4002cb: c9 leave 4002cc: c3 ret 4002cd: 90 nop $ gcc -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../configure --prefix=/usr --enable-shared --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-threads=posix --mandir=/usr/share/man --infodir=/usr/share/info --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch --with-tune=generic Thread model: posix gcc version 4.4.2 (GCC) $ uname -a Linux kunyang 2.6.31-ARCH #1 SMP PREEMPT Tue Nov 10 19:01:40 CET 2009 x86_64 Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz GenuineIntel GNU/Linux Seems fishy. Jed From tassilo@member.fsf.org Mon Nov 23 08:57:34 2009 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 276BD431FBC for ; Mon, 23 Nov 2009 08:57:34 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 lPTtLEafCU41 for ; Mon, 23 Nov 2009 08:57:33 -0800 (PST) Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15]) by olra.theworths.org (Postfix) with ESMTP id 5179D431FAE for ; Mon, 23 Nov 2009 08:57:33 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 3103B78A1FF9 for ; Mon, 23 Nov 2009 17:57:32 +0100 (CET) Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17346-04-2 for ; Mon, 23 Nov 2009 17:57:31 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Received: from thinkpad.tsdh.de (unknown [141.26.95.131]) by deliver.uni-koblenz.de (Postfix) with ESMTP id ABDF178A1FD0 for ; Mon, 23 Nov 2009 17:57:31 +0100 (CET) From: Tassilo Horn To: notmuch@notmuchmail.org Mail-Copies-To: never Date: Mon, 23 Nov 2009 17:57:31 +0100 Message-ID: <87tywlji10.fsf@thinkpad.tsdh.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at uni-koblenz.de Subject: [notmuch] [PATCH] Return unpropertized strings for filename and message-id X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 16:57:34 -0000 Hi! Here's my first patch. It changes that notmuch-show-get-filename and notmuch-show-get-message-id return simple strings and not propertited strings. Bye, Tassilo --- notmuch.el | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/notmuch.el b/notmuch.el index 0cabbe2..c2839c0 100644 --- a/notmuch.el +++ b/notmuch.el @@ -169,7 +169,7 @@ Unlike builtin `next-line' this version accepts no arguments." (if (not (looking-at notmuch-show-message-begin-regexp)) (re-search-backward notmuch-show-message-begin-regexp)) (re-search-forward notmuch-show-id-regexp) - (buffer-substring (match-beginning 1) (match-end 1)))) + (buffer-substring-no-properties (match-beginning 1) (match-end 1)))) (defun notmuch-show-get-filename () (save-excursion @@ -177,7 +177,7 @@ Unlike builtin `next-line' this version accepts no arguments." (if (not (looking-at notmuch-show-message-begin-regexp)) (re-search-backward notmuch-show-message-begin-regexp)) (re-search-forward notmuch-show-filename-regexp) - (buffer-substring (match-beginning 1) (match-end 1)))) + (buffer-substring-no-properties (match-beginning 1) (match-end 1)))) (defun notmuch-show-set-tags (tags) (save-excursion -- 1.6.5.3 From five9a2@gmail.com Mon Nov 23 10:07:12 2009 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 19FDC431FBF for ; Mon, 23 Nov 2009 10:07:12 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 kWMPwgP64IOM for ; Mon, 23 Nov 2009 10:07:11 -0800 (PST) Received: from mail-bw0-f210.google.com (mail-bw0-f210.google.com [209.85.218.210]) by olra.theworths.org (Postfix) with ESMTP id E73D7431FAE for ; Mon, 23 Nov 2009 10:07:10 -0800 (PST) Received: by bwz2 with SMTP id 2so5521364bwz.0 for ; Mon, 23 Nov 2009 10:07:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=wS1uR8Jzdr43cW2h/O5cK1D7IcDlwzYrpX1lxKOpacs=; b=G14ZeXGQRamEZuTBuqLCDRbRaOBcdBXjewGh+oiXntOSsK3B4k/sVdl55Xa4jJGaVo CZGbXFmACmLqLLTHkPy34SLE9i9g8flr61JLDYHqeRZjQhwuNWHTHQUjbZa/3SwmBGR5 2S3744/ux7TVms/qdXflBD9YpATa6MWIQW9q8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=cQ3DRQouHVdr3lDoCP5pn6zQ3Tpd0enj3K0NWGiU4gGUl8x32XL+vJDIxkcsHVV0TM HcoXdNl861xZhRn+ms4CY6Qwj1xrday9aP7UH9UinV2yzX9PJZTWD8vPm5+yiKvU+jpV ZCsSulM+59hKdlqoNNfPfEk4kbX/fp4jo1ZHU= Received: by 10.204.49.68 with SMTP id u4mr5108142bkf.42.1258999629698; Mon, 23 Nov 2009 10:07:09 -0800 (PST) Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 9sm6053600fks.52.2009.11.23.10.07.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 10:07:08 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org, cworth@cworth.org Date: Mon, 23 Nov 2009 19:07:23 +0100 Message-Id: <1258999643-30742-1-git-send-email-jed@59A2.org> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1258976966-22407-1-git-send-email-jed@59A2.org> References: <1258976966-22407-1-git-send-email-jed@59A2.org> Subject: [notmuch] [PATCH] Make search filters handle disjunctive queries. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 18:07:12 -0000 notmuch-search-filter accepts now accepts an arbitrary query and will group if necessary so that we get tag:inbox AND (gravy OR biscuits) notmuch-search-filter-tag now handles multiple terms. All terms in the query except AND and OR are interpreted as tags. This version has nice regexes and handles NOT. Signed-off-by: Jed Brown --- notmuch.el | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/notmuch.el b/notmuch.el index 0cabbe2..fdd30ae 100644 --- a/notmuch.el +++ b/notmuch.el @@ -828,6 +828,10 @@ thread from that buffer can be show when done with this one)." (defvar notmuch-search-query-string) (defvar notmuch-search-oldest-first) +(defvar notmuch-search-boolean-operator-regexp "\\([aA][nN][dD]\\|[oO][rR]\\|[nN][oO][tT]\\)") +(defvar notmuch-search-valid-term-regexp "\\([-+_.[:word:]]+\\)") +(defvar notmuch-search-disjunctive-regexp "\\<[oO][rR]\\>") + (defun notmuch-search-scroll-up () "Scroll up, moving point to last message in thread if at end." (interactive) @@ -1057,15 +1061,28 @@ search." Runs a new search matching only messages that match both the current search results AND the additional query string provided." (interactive "sFilter search: ") - (notmuch-search (concat notmuch-search-query-string " and " query) notmuch-search-oldest-first)) + (let ((grouped-query (if (string-match-p notmuch-search-disjunctive-regexp query) (concat "( " query " )") query))) + (notmuch-search (concat notmuch-search-query-string " and " grouped-query) notmuch-search-oldest-first))) -(defun notmuch-search-filter-by-tag (tag) - "Filter the current search results based on a single tag. +(defun notmuch-search-filter-by-tag (query) + "Filter the current search results based on one or more tags. Runs a new search matching only messages that match both the -current search results AND that are tagged with the given tag." +current search results AND that are tagged with the given +expression involving tags. For example, the input + + chicken and (gravy or biscuits) + +will filter the current search by + + tag:chicken and ( tag:gravy or tag:biscuits )" (interactive "sFilter by tag: ") - (notmuch-search (concat notmuch-search-query-string " and tag:" tag) notmuch-search-oldest-first)) + (let ((tagged-query (replace-regexp-in-string notmuch-search-valid-term-regexp + (lambda (match) ; Prepend `tag:' to all except boolean operators + (if (string-match-p notmuch-search-boolean-operator-regexp match) + match (concat "tag:" match))) + query))) + (notmuch-search-filter tagged-query))) (defun notmuch () "Run notmuch to display all mail with tag of 'inbox'" -- 1.6.5.3 From jeff@ocjtech.us Mon Nov 23 10:14:25 2009 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 C25CD431FBC for ; Mon, 23 Nov 2009 10:14:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 vdvHrDos8JbG for ; Mon, 23 Nov 2009 10:14:25 -0800 (PST) Received: from mail-bw0-f210.google.com (mail-bw0-f210.google.com [209.85.218.210]) by olra.theworths.org (Postfix) with ESMTP id E824D431FAE for ; Mon, 23 Nov 2009 10:14:24 -0800 (PST) Received: by bwz2 with SMTP id 2so5529207bwz.0 for ; Mon, 23 Nov 2009 10:14:24 -0800 (PST) Received: by 10.103.37.38 with SMTP id p38mr2351632muj.134.1259000064027; Mon, 23 Nov 2009 10:14:24 -0800 (PST) Received: from lt26923.campus.dmacc.edu ([69.57.47.215]) by mx.google.com with ESMTPS id 23sm16753662mum.33.2009.11.23.10.14.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 10:14:23 -0800 (PST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by lt26923.campus.dmacc.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NCdQZ-0003va-QL; Mon, 23 Nov 2009 12:14:19 -0600 From: "Jeffrey C. Ollie" To: Not Much Mail Date: Mon, 23 Nov 2009 12:14:15 -0600 Message-Id: <1259000055-15068-1-git-send-email-jeff@ocjtech.us> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1258983810-27522-2-git-send-email-jeff@ocjtech.us> References: <1258983810-27522-2-git-send-email-jeff@ocjtech.us> Subject: [notmuch] [PATCH] Add tests to configure script to detect strndup and getline X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 18:14:25 -0000 Add some simple tests to the configure script to detect strndup and getline. It's not important that the tests run, just that they compile and link without any errors. Signed-off-by: Jeffrey C. Ollie --- configure | 20 +++++++++++++++++++- getlinetest.c | 13 +++++++++++++ strnduptest.c | 10 ++++++++++ 3 files changed, 42 insertions(+), 1 deletions(-) create mode 100644 getlinetest.c create mode 100644 strnduptest.c diff --git a/configure b/configure index b4770ec..44c1700 100755 --- a/configure +++ b/configure @@ -118,6 +118,24 @@ EOF exit 1 fi +if ! gcc -o strnduptest strnduptest.c > /dev/null 2>&1 +then + echo "Checking for strndup... No." + strndup=-Dstrndup=_notmuch_strndup +else + echo "Checking for strndup... Yes." +fi +rm -f strnduptest + +if ! gcc -o getlinetest getlinetest.c > /dev/null 2>&1 +then + echo "Checking for getline... No." + getline=-Dgetline=_notmuch_getline +else + echo "Checking for getline... Yes." +fi +rm -f getlinetest + cat < Makefile.config < +#include + +int main() +{ + ssize_t count = 0; + size_t n = 0; + char **lineptr = NULL; + FILE *stream = NULL; + + count = getline(lineptr, &n, stream); +} diff --git a/strnduptest.c b/strnduptest.c new file mode 100644 index 0000000..97c7c80 --- /dev/null +++ b/strnduptest.c @@ -0,0 +1,10 @@ +#include + +int main() +{ + char *d; + const char *s = ""; + size_t n = 0; + + d = strndup(s, n); +} -- 1.6.5.2 From alec@thened.net Mon Nov 23 10:21:45 2009 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 93221431FBC for ; Mon, 23 Nov 2009 10:21:45 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 RM6NP05N5gsx for ; Mon, 23 Nov 2009 10:21:44 -0800 (PST) Received: from ives.vdov.net (129.210.68.208.dnsptr.net [208.68.210.129]) by olra.theworths.org (Postfix) with ESMTP id E63DF431FAE for ; Mon, 23 Nov 2009 10:21:44 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by ives.vdov.net (Postfix) with ESMTP id 4945D24F018; Mon, 23 Nov 2009 12:21:46 -0600 (CST) Received: from ives.vdov.net ([127.0.0.1]) by localhost (ives.vdov.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id weUNrm1dwt0H; Mon, 23 Nov 2009 12:21:42 -0600 (CST) Received: from localhost (adsl-179-17-158.bna.bellsouth.net [74.179.17.158]) by ives.vdov.net (Postfix) with ESMTPSA id 6298624EE27; Mon, 23 Nov 2009 12:21:37 -0600 (CST) Date: Mon, 23 Nov 2009 12:21:44 -0600 From: Alec Berryman To: Brett Viren Message-ID: <20091123182144.GA7730@thened.net> References: <46263c600911230731i529f2db5rec11bed02f84ef13@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46263c600911230731i529f2db5rec11bed02f84ef13@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Hashcash: 1:24:091123:brett.viren@gmail.com::udxAhIQmZYxFiIPk:0000000000000000000000000000000000000000O/1+ X-Hashcash: 1:24:091123:notmuch@notmuchmail.org::ECooD2CqjVCythWo:00000000000000000000000000000000000000aaRp Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [patch] Trivial fix for non-root install X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 18:21:45 -0000 Brett Viren on 2009-11-23 10:31:47 -0500: > Installing as a normal user fails because the bash completion config > files try to install into /etc. This trivial patch fixes this. I worked around this by using $DESTDIR as the prefix and unsetting prefix during the install. From keithp@keithp.com Mon Nov 23 10:26:54 2009 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 EE09C431FAE for ; Mon, 23 Nov 2009 10:26:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 W4mxHZfasADF for ; Mon, 23 Nov 2009 10:26:52 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 42935431FBC for ; Mon, 23 Nov 2009 10:26:52 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 8967C7600E3; Mon, 23 Nov 2009 10:26:51 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Uxyq+LQL6hZq; Mon, 23 Nov 2009 10:26:48 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id AB0F7B84011; Mon, 23 Nov 2009 10:26:48 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 9E58C7600E3; Mon, 23 Nov 2009 10:26:48 -0800 (PST) From: Keith Packard To: Jed Brown , notmuch@notmuchmail.org, cworth@cworth.org In-Reply-To: <1258999643-30742-1-git-send-email-jed@59A2.org> References: <1258976966-22407-1-git-send-email-jed@59A2.org> <1258999643-30742-1-git-send-email-jed@59A2.org> Date: Mon, 23 Nov 2009 10:26:47 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] Make search filters handle disjunctive queries. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 18:26:54 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Mon, 23 Nov 2009 19:07:23 +0100, Jed Brown wrote: > notmuch-search-filter accepts now accepts an arbitrary query and will > group if necessary so that we get >=20 > tag:inbox AND (gravy OR biscuits) >=20 > notmuch-search-filter-tag now handles multiple terms. All terms in the > query except AND and OR are interpreted as tags. Remember to split patches which do more than one thing into separate commits. > + (let ((grouped-query (if (string-match-p notmuch-search-disjunctive-re= gexp query) (concat "( " query " )") query))) > + (notmuch-search (concat notmuch-search-query-string " and " grouped-= query) notmuch-search-oldest-first))) Is there some reason not to just always add the parens? > + (let ((tagged-query (replace-regexp-in-string notmuch-search-valid-ter= m-regexp > + (lambda (match) ; Prepend `tag:' to all except boolean operators > + (if (string-match-p notmuch-search-boolean-operator-regexp match) > + match (concat "tag:" match))) > + query))) This seems useful; how does it deal with the tag completion stuff? =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLCtPoQp8BWwlsTdMRAl1BAJ9mOfP6NR4FpfkWfrfbjU/4EArVpwCfUazA dnK9vAUjOe/iVYyTwOOtEh4= =hGvK -----END PGP SIGNATURE----- --=-=-=-- From five9a2@gmail.com Mon Nov 23 10:29:26 2009 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 3F731431FBC for ; Mon, 23 Nov 2009 10:29:26 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 pwJshMU-XFUA for ; Mon, 23 Nov 2009 10:29:25 -0800 (PST) Received: from mail-bw0-f210.google.com (mail-bw0-f210.google.com [209.85.218.210]) by olra.theworths.org (Postfix) with ESMTP id 679FC431FAE for ; Mon, 23 Nov 2009 10:29:25 -0800 (PST) Received: by bwz2 with SMTP id 2so5545362bwz.0 for ; Mon, 23 Nov 2009 10:29:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer; bh=GsZ30rYyCv1Y3zZF3E/jdJq8F4pEOJqPQLn8CcKqtUk=; b=D40yURe2HwQebtIJsUIE/+5Fe8Ao40lp3+YM2tigOqlJFH5pDdndv9p4BRKl4TPWfo LOS6CgA6uAVQG62TwhRIdjyjX/nVAFPo+OlrhnHkgkIwvEE+0N8fpk9dkIQrRTLJ2AQ7 xLtM0RxlfjDTt6YY6pQVJTD+tZ804kvMt2wPs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=lflQE37PtucWgouWD3awibK4+Xsp5jPoHYz6Z32uBizP4mT14bUHn0pm5YACuSJhTI hzEXrRE55vh1rVKaziJYbG6kJxGqiDVO3f9QDzBLgyR02jFlvs2FTT6dbZKqbAfrZuko OxbdBw30tew2oeiHM43ICdij7ckqXbQm8QRvs= Received: by 10.204.7.197 with SMTP id e5mr4984860bke.184.1259000964486; Mon, 23 Nov 2009 10:29:24 -0800 (PST) Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id p9sm6054851fkb.44.2009.11.23.10.29.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 10:29:23 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 19:29:52 +0100 Message-Id: <1259000992-31796-1-git-send-email-jed@59A2.org> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] Make addresses case insensitive for the purpose of constructing replies. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 18:29:26 -0000 The domain is alway case insensitive, but in principle the username is case sensitive. Few systems actually enforce this so I think a good default is to treat the entire address as case insensitive, it will eliminate a lot of superfluous self-addressed messages and reply from the correct address in these cases. Signed-off-by: Jed Brown --- notmuch-reply.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index 44e1766..cd81e76 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -97,12 +97,12 @@ address_is_users (const char *address, notmuch_config_t *config) size_t i, other_len; primary = notmuch_config_get_user_primary_email (config); - if (strcmp (primary, address) == 0) + if (strcasecmp (primary, address) == 0) return 1; other = notmuch_config_get_user_other_email (config, &other_len); for (i = 0; i < other_len; i++) - if (strcmp (other[i], address) == 0) + if (strcasecmp (other[i], address) == 0) return 1; return 0; -- 1.6.5.3 From five9a2@gmail.com Mon Nov 23 10:48:18 2009 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 EA15A431FBF for ; Mon, 23 Nov 2009 10:48:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 TP+FWhdaVijh for ; Mon, 23 Nov 2009 10:48:17 -0800 (PST) Received: from mail-bw0-f210.google.com (mail-bw0-f210.google.com [209.85.218.210]) by olra.theworths.org (Postfix) with ESMTP id 05F8A431FAE for ; Mon, 23 Nov 2009 10:48:16 -0800 (PST) Received: by bwz2 with SMTP id 2so5565604bwz.0 for ; Mon, 23 Nov 2009 10:48:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=31alTVKVoyOMxzJ8Zx8riuc6ikDq8vY3Jq3hSUtGDuw=; b=RuKtuxPotcCVengoYu6zBDmaE/AeBIOB3e4puCaPWxZO0869atOE1uFtutN96EjgAw 2B/rUpKcLV0yMUYYf9n3kijcwBudYlIGbpMDgBqHHl19Kftq7oqU5jecfgjWmL5CmBSz MCka2+xLEDvOiU0j6Y3N6/Z1Q3mMoN8RzwDjs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=pXpcYRy+tY+6s7Iv3z7wa6itLsmlx4X6hlNuXwUaIl7ielJ3MQu3szIu3Cfahbv9EO Zj78oRDRfzFcRR2jNkyrONxw/EZra8hbfx5NR7W07tqoK/OOPkHHMMqczn7rOqXJ/BPv 4AxkTxc237C8XdOHN/IMlOgvgzO131BDH6D9E= Received: by 10.204.34.201 with SMTP id m9mr5173982bkd.77.1259002096006; Mon, 23 Nov 2009 10:48:16 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 9sm6078948fks.22.2009.11.23.10.48.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 10:48:14 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Keith Packard , notmuch@notmuchmail.org, cworth@cworth.org In-Reply-To: References: <1258976966-22407-1-git-send-email-jed@59A2.org> <1258999643-30742-1-git-send-email-jed@59A2.org> Date: Mon, 23 Nov 2009 19:48:46 +0100 Message-ID: <87d439jcvl.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Make search filters handle disjunctive queries. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 18:48:18 -0000 On Mon, 23 Nov 2009 10:26:47 -0800, Keith Packard wrote: > Remember to split patches which do more than one thing into separate > commits. These are variants of the same operation, but I'll split in the future. > > + (let ((grouped-query (if (string-match-p notmuch-search-disjunctive-regexp query) (concat "( " query " )") query))) > > + (notmuch-search (concat notmuch-search-query-string " and " grouped-query) notmuch-search-oldest-first))) > > Is there some reason not to just always add the parens? That's what I did initially, but it's messy to look at in the mode line after applying successive filters. > This seems useful; how does it deal with the tag completion stuff? It doesn't do anything special, but I haven't been following that carefully. My thought was that eventually the regular interactive search and filters, would have semantic completion, e.g. the user enters tag:ab and tags would be completed, but they could also do from:long.unwieldy.addr In filter-by-tag, the natural thing would be to only complete tags, the user would be on their own to spell out AND, OR, and NOT. Unfortunately I'm not familiar enough with elisp to implement this quickly. A closely related issue is managing the address book. I guess the usual advice is to use BBDB. I don't know if it's better to hook into that or for Notmuch to have it's own lightweight approach. I could imagine harvesting addresses of everyone I've sent mail to and giving me a semi-automated way to merge addresses that are likely to point to the same person. Jed From ingmar@exherbo.org Mon Nov 23 12:02:13 2009 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 60E9A431FBC for ; Mon, 23 Nov 2009 12:02:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 cXwDBWWw-DqW for ; Mon, 23 Nov 2009 12:02:11 -0800 (PST) Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by olra.theworths.org (Postfix) with ESMTP id 0C06D431FAE for ; Mon, 23 Nov 2009 12:02:11 -0800 (PST) Received: from [83.101.72.69] (helo=localhost) by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NCf6w-0007AU-2w for notmuch@notmuchmail.org; Mon, 23 Nov 2009 20:02:10 +0000 Content-Type: text/plain; charset=utf8 From: Ingmar Vanhassel To: notmuch In-reply-to: <20091122051826.GA7299@thened.net> References: <20091122051826.GA7299@thened.net> Date: Mon, 23 Nov 2009 21:02:09 +0100 Message-Id: <1259006459-sup-2662@cannonball> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Subject: Re: [notmuch] [PATCH] Support multiple configuration files via $NOTMUCH_CONFIG X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 20:02:13 -0000 Excerpts from Alec Berryman's message of Sun Nov 22 06:18:26 +0100 2009: > If present, $NOTMUCH_CONFIG will be used as the configuration file > location. I'm a bit late to the party, but how about adding the more generic NOTMUCH_OPTIONS, and --config-file, -c options to pass the path to the configuration file? -- Exherbo KDE, X.org maintainer From keithp@keithp.com Mon Nov 23 12:29:49 2009 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 E5773431FBC for ; Mon, 23 Nov 2009 12:29:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 HKgPkIjfyyHq for ; Mon, 23 Nov 2009 12:29:49 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 0C68E431FAE for ; Mon, 23 Nov 2009 12:29:49 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 560F07600E3 for ; Mon, 23 Nov 2009 12:29:48 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ye71WFTl+cIh for ; Mon, 23 Nov 2009 12:29:45 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id A4F4EB84011; Mon, 23 Nov 2009 12:29:45 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 96A867600E3 for ; Mon, 23 Nov 2009 12:29:45 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 12:29:44 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: [notmuch] _notmuch_message_create_for_message_id makes extra call to notmuch_database_find_message X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 20:29:50 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Looking at _notmuch_message_create_for_message_id, the first thing it does is call notmuch_database_find_message, but the returned 'message' is never used. I haven't tried, but I suspect this call could just be removed. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLCvC5Qp8BWwlsTdMRApuiAJ9iYoPkvdECqxzWi3BylqZCqsoRVwCfT642 n1VZwFlYQANl1wN2zFaMirk= =uPnv -----END PGP SIGNATURE----- --=-=-=-- From five9a2@gmail.com Mon Nov 23 12:57:08 2009 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 AAFB2431FBF for ; Mon, 23 Nov 2009 12:57:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 GdUUG5JkVOHl for ; Mon, 23 Nov 2009 12:57:08 -0800 (PST) Received: from mail-bw0-f210.google.com (mail-bw0-f210.google.com [209.85.218.210]) by olra.theworths.org (Postfix) with ESMTP id EB74A431FBC for ; Mon, 23 Nov 2009 12:57:07 -0800 (PST) Received: by bwz2 with SMTP id 2so5699357bwz.0 for ; Mon, 23 Nov 2009 12:57:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer; bh=9PpHxd1LfMzb11zja6+7GbOb4z3MFYNtUOwkDiRi80o=; b=R2P8qzcd5CnD21CpGNGX9N+wxGnU3S5KXBMduFW0jHUZunBbQvUh2mwccOwfyIXPDm bpovIGcrkIgvZgwf5gA8r/QGD7Hr02YCIFXnmbp6c3Neutj/8/m01/JwjT4A0tCflGAQ s7YQqgHYlDNeU7C6rgl5ksY++sL3Say6iD1W0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=k+vPLKUptHdiE5bqRh6B339N+Jas66Hro/FUVi4w6L1EOanw3uHGMmF8e3BbJ5zviL CE6C6HvGe6OwGgmLJ6fa+8+JaESF3JiLc4OmN/Dwlfu0vn64HdRSPcEj8Rb87cdH6qwB KNTHcQ5bKiESXLhueA2haZSkS1uReCZGknBsg= Received: by 10.204.25.207 with SMTP id a15mr5262497bkc.8.1259009826861; Mon, 23 Nov 2009 12:57:06 -0800 (PST) Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id f31sm6215494fkf.42.2009.11.23.12.57.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 12:57:06 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 21:57:33 +0100 Message-Id: <1259009853-1634-1-git-send-email-jed@59A2.org> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] Stay out of tmp to respect the Maildir spec. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 20:57:08 -0000 --- notmuch-new.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 8172b49..e32b92a 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -159,6 +159,7 @@ add_files_recursive (notmuch_database_t *notmuch, * user specify files to be ignored. */ if (strcmp (entry->d_name, ".") == 0 || strcmp (entry->d_name, "..") == 0 || + strcmp (entry->d_name, "tmp") == 0 || strcmp (entry->d_name, ".notmuch") ==0) { continue; -- 1.6.5.3 From jrollins@phys.columbia.edu Mon Nov 23 07:46:13 2009 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 C3489431FBF for ; Mon, 23 Nov 2009 07:46:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 e-gQNjgnX10P for ; Mon, 23 Nov 2009 07:46:13 -0800 (PST) Received: from tarap.cc.columbia.edu (tarap.cc.columbia.edu [128.59.29.7]) by olra.theworths.org (Postfix) with ESMTP id 01217431FAE for ; Mon, 23 Nov 2009 07:46:12 -0800 (PST) Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com [72.227.128.66]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by tarap.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id nANFjXse002512 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Mon, 23 Nov 2009 10:45:33 -0500 (EST) Received: from jrollins by servo.finestructure.net with local (Exim 4.69) (envelope-from ) id 1NCb6s-0007df-BU; Mon, 23 Nov 2009 10:45:50 -0500 Date: Mon, 23 Nov 2009 10:45:50 -0500 From: Jameson Rollins To: Ingmar Vanhassel Message-ID: <20091123154550.GA27503@finestructure.net> References: <46263c600911230731i529f2db5rec11bed02f84ef13@mail.gmail.com> <1258990831-sup-2789@cannonball> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="C7zPtVaVf+AK4Oqc" Content-Disposition: inline In-Reply-To: <1258990831-sup-2789@cannonball> User-Agent: Mutt/1.5.20 (2009-06-14) X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.65 on 128.59.29.7 X-Mailman-Approved-At: Mon, 23 Nov 2009 18:06:02 -0800 Cc: notmuch Subject: Re: [notmuch] [patch] Trivial fix for non-root install X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 23 Nov 2009 15:46:13 -0000 --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 23, 2009 at 04:41:23PM +0100, Ingmar Vanhassel wrote: > Excerpts from Brett Viren's message of Mon Nov 23 16:31:47 +0100 2009: > > Installing as a normal user fails because the bash completion config > > files try to install into /etc. This trivial patch fixes this. > > Your patch breaks the more common case of installing as root user. It > now installs into /usr/etc where bash completions most likely won't be > found. I submitted a patch similar to Ingmar's the other day. I actually feel like the more common case is to install it locally as a local user, especially during early development. jamie. > > diff --git a/Makefile.config b/Makefile.config > > index ddc7436..c04d57a 100644 > > --- a/Makefile.config > > +++ b/Makefile.config > > @@ -1,3 +1,2 @@ > > -prefix =3D /usr/local > > -bash_completion_dir =3D /etc/bash_completion.d > > +bash_completion_dir =3D $(prefix)/etc/bash_completion.d > > CFLAGS +=3D -DHAVE_VALGRIND > >=20 > >=20 > > -Brett. > --=20 > Exherbo KDE, X.org maintainer > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch --C7zPtVaVf+AK4Oqc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: attachment -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJLCq4qAAoJEO00zqvie6q8EuUQAJkwQjHWt0aoObgGG2JgRIc/ gh5kmXWhR4UkavOKQv4p0cL8kIgpRoHowc44YlzfnfQNqY4y04XpuSB0hZVxPq1M 09E3kwivKj6m6VZwS49FFNlLU0SwvMPBFJ925AqQP0pFfSwZ2KpLOe2OO3wxaJbX cD5qwguCM3Nc+cTwlDV3/0KhRBwU0c8CcmE+SD+Q92N1wBUXEt38rYn4aCndT958 OdsM1i9V0VwctxYseEvJ1k6NZ4sbx75VdgvUMroGTNij7x+KeTX4eH6jw4w2dmUN ciot5OOfy7U6SX1j1pYa5I1dYVu6CVOhctXjjbOygU/TALRtEfjSwOE+jusS/5p1 RM6rpEFJy4NKuLcNnkAS66YZahiJLJnosuCv7lpl1EmVt9pgZvnuIUrnIyeSuVro RxVExDnxvEv+93V5FR/VTzCkyrIZKhI+t2ba/eAfJiqwwon0k8WI+LRdNY46HmGK fp9QdsSsf3n7vMGX+aUqca7bDFprc/Zzl679CvzvVhpqoGK6cH/np503ZVeWXzBZ EpFq2bzjBlm1cY/BzDEAwabVGLwU7RyoI3IEagb2yb8OyvjRsmmmvBO91s29wH2k w9SEZ16AcwMuA9aRA4Cklui0tOO2fDJWpQGfqPEbTUryLYfCYWVfLdNQWBp3BtxE yx+y+V0SxgP39gyMq6en =dzyH -----END PGP SIGNATURE----- --C7zPtVaVf+AK4Oqc-- From cworth@cworth.org Mon Nov 23 18:11:53 2009 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 2FDF2431FBF; Mon, 23 Nov 2009 18:11:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Ov4Sn-oQ8iyK; Mon, 23 Nov 2009 18:11:52 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 778B6431FAE; Mon, 23 Nov 2009 18:11:51 -0800 (PST) From: Carl Worth To: Peter Wang , notmuch@notmuchmail.org In-Reply-To: <20091123110742.GE1496@plug.localdomain> References: <20091123110742.GE1496@plug.localdomain> Date: Mon, 23 Nov 2009 18:11:39 -0800 Message-ID: <87ocms659g.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] Multithreaded access X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 02:11:53 -0000 On Mon, 23 Nov 2009 22:07:42 +1100, Peter Wang wrote: > I am also toying around with a curses frontend for notmuch :-) > One thing that I would really like to have is asynchronous search: > I should be able to begin reading mail even while search results > are rolling in. Absolutely! I just coded this up on my plane ride home for notmuch.el and it is *fantastic*. It takes notmuch from "OK, as long as your searches don't have a lot of results" to "Blisteringly fast, regardless of what you're doing." And it's not like sup, where you page down and then wait for more search results to page in. Things just keep filling up in the buffer while you're reading and navigating, just as it should be. I'll be cleaning this up and pushing it out soon. I'm very excited about it. > At the moment I'm using one read-only database_t* and creating multiple > queries off it. There's a background thread[1] slurping up search > results at a time, then passes them to the main thread. The main thread > also handles the pager. When the user goes to open a thread, it creates > a separate query_t so that it can look up the messages and their headers > and filenames. Hmmm... in my code with emacs, I'm just using separate processes, (which seems to be working fine). I haven't looked into Xapian's documentation with regard to threads yet, so I can't actually say how well notmuch's library work with threads yet. > A future concern is how to handle tag updates. Could I open the database > for writing in one thread, and read-only in another? Again, I don't know about the threading yet. But you can definitely open the database read-write in one process while also having it be opened read-only in another. -Carl From cworth@cworth.org Mon Nov 23 18:34:01 2009 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 71293431FBC; Mon, 23 Nov 2009 18:34:01 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 BJBI3tTMvoWh; Mon, 23 Nov 2009 18:34:01 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2455C431FAE; Mon, 23 Nov 2009 18:33:58 -0800 (PST) From: Carl Worth To: Jed Brown , notmuch@notmuchmail.org In-Reply-To: <1259009853-1634-1-git-send-email-jed@59A2.org> References: <1259009853-1634-1-git-send-email-jed@59A2.org> Date: Mon, 23 Nov 2009 18:33:44 -0800 Message-ID: <87my2c648n.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Stay out of tmp to respect the Maildir spec. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 02:34:01 -0000 On Mon, 23 Nov 2009 21:57:33 +0100, Jed Brown wrote: > if (strcmp (entry->d_name, ".") == 0 || > strcmp (entry->d_name, "..") == 0 || > + strcmp (entry->d_name, "tmp") == 0 || > strcmp (entry->d_name, ".notmuch") ==0) Thanks, Jed! I've pushed this now. And sorry about any "file not found" errors anybody is stuck with now. We'll need to add support for cleaning those up soon, (which is the same as supporting deleted mail). -Carl From cworth@cworth.org Mon Nov 23 18:35:47 2009 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 74119431FBC; Mon, 23 Nov 2009 18:35:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 K6uteMPXBnhb; Mon, 23 Nov 2009 18:35:46 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 74E74431FAE; Mon, 23 Nov 2009 18:35:45 -0800 (PST) From: Carl Worth To: Jed Brown , notmuch@notmuchmail.org In-Reply-To: <1259000992-31796-1-git-send-email-jed@59A2.org> References: <1259000992-31796-1-git-send-email-jed@59A2.org> Date: Mon, 23 Nov 2009 18:35:31 -0800 Message-ID: <87ljhw645o.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Make addresses case insensitive for the purpose of constructing replies. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 02:35:47 -0000 On Mon, 23 Nov 2009 19:29:52 +0100, Jed Brown wrote: > The domain is alway case insensitive, but in principle the username is > case sensitive. Few systems actually enforce this so I think a good > default is to treat the entire address as case insensitive, it will > eliminate a lot of superfluous self-addressed messages and reply from > the correct address in these cases. Good call. I've pushed this out now. -Carl From cworth@cworth.org Mon Nov 23 18:57:49 2009 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 438A2431FBF; Mon, 23 Nov 2009 18:57:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 iA4VAJlEEGUF; Mon, 23 Nov 2009 18:57:48 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4B572431FAE; Mon, 23 Nov 2009 18:57:46 -0800 (PST) From: Carl Worth To: djcb@djcbsoftware.nl In-Reply-To: <87pr79yaz1.wl%djcb@djcbsoftware.nl> References: <87aayggsjp.wl%djcb@djcbsoftware.nl> <87iqd43wot.fsf@yoom.home.cworth.org> <87skc6n3yp.wl%djcb@djcbsoftware.nl> <877htifa0e.fsf@yoom.home.cworth.org> <87pr79yaz1.wl%djcb@djcbsoftware.nl> Date: Mon, 23 Nov 2009 18:57:32 -0800 Message-ID: <87k4xg634z.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "notmuch@notmuchmail.org" Subject: Re: [notmuch] interesting project! X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 02:57:49 -0000 On Mon, 23 Nov 2009 09:08:34 +0200, Dirk-Jan C. Binnema wrote: > Well, the counter point to the OOM-problems is that is that in many programs, > the 'malloc returns NULL'-case is often not very well tested (because it's > rather hard to test), and that at least on Linux, it's unlikely that malloc > ever does return NULL. Lennart Poettering wrote this up in some more > detail[1]. Of course, the requirements for notmuch may be a bit different and > I definitely don't want to suggest any radical change here after only finding > out about notmuch a few days ago :) No problem. I'm glad to discuss things. That's how I learn and find out whether my decisions are sound or not. :-) I agree that trying to support OOM doesn't make sense without testing. But that's why I want to test notmuch with memory-fault injection. We've been doing this with the cairo library with good success for a while. As for "unlikely that malloc ever returns NULL", that's simply a system-configuration away (just turn off overcommit). And I can imagine notmuch being used in lots of places, (netbooks, web servers, etc.), so I do want to make it as robust as possible. > (BTW, there is a hashtable implementation in libc, (hcreate(3) etc.). Is that > one not sufficiently 'talloc-friendly'? It's not very user-friendly, but > that's another matter) Thanks for mentioning the hash table. The hash table is one of the few things that I *am* using from glib right now in notmuch. It's got a couple of bizarre things about it: 1. The simpler-appearing g_hash_table_new function is useless for common cases like hashing strings. It will just leak memory. So g_hash_table_new_full is the only one worth using. 2. There are two lookup functions, g_hash_table_lookup, and g_hash_table_lookup_extended. And a program like notmuch really does use the hash table in two ways. In the simpler case, we're using the hash to simply implement a set, (such as avoiding duplicates in a set of tags). In the more complex case, we're associating actual objects with the keys, (such as when linking messages together into a tree for the thread). So, it might make sense if a hash-table interface supported these two modes well. What's bizarre about GHashTable though, is that in the "just a set" case, we only use NULL as the value when inserting. And distinguish "previously inserted with NULL" from "never inserted" is the one thing that g_hash_table_lookup can't do. So I've only found that I could ever use g_hash_table_lookup_extended, (and pass a pair of NULLs for the return arguments I don't need). Fortunately, Eric Anholt spent *his* flight home coding up an nice implementation of an open-addressed hash designed specifically to be a tiny little implementation suitable for copying directly into project. He's testing it with Mesa now, and I might pull it into notmuch later. > I could imagine the string functions could replace the ones in talloc. There > are many more string functions, e.g., for handling file names / paths, which > are quite useful. Then there are wrappers for gcc'isms (G_UNLIKELY etc.) that > would make the ones in notmuch unneeded, and a lot of compatibility things > like G_DIR_SEPARATOR. And the datastructures (GSlice/GList/GHashtable) are > nice. The UTF8 functionality might come in handy. Yes. The portability stuff I think is actually interesting. I've thought it really might make sense to have something that gave you *just* that, (without a main loop, an object system, several memory allocators or pieces for making your own memory allocators, etc). I haven't had a chance to look into gnulib yet, but I'd like to. As for a list, I almost always find it cleaner to be able to just have my own list data structures, (to avoid casts, etc.). And for a hash table, I'm interested in what Eric's doing. I'm really not prejudiced against using code that's already been written, (in spite of what might appear I don't feel the need to re-solve every problem that's already been solved). But I have long thought that we could have better support for a "C programmers toolkit" of commonly needed things than we have before. I definitely like the idea of having tiny, focused libraries that do one thing and do it well, (and maybe even some things so tiny that they are actually designed to be copied into the application---like with gnulib and with Eric's new hash table). > Anyway, I was just curious, people have survived without GLib before, and if > you dislike the OOM-strategy, it's a bit of a no-no of course. Thanks for understanding. :-) And I enjoy the conversation, -Carl From cworth@cworth.org Mon Nov 23 19:17:11 2009 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 13867431FBF; Mon, 23 Nov 2009 19:17:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 t+7UIAwh0Vd6; Mon, 23 Nov 2009 19:17:10 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 3E038431FAE; Mon, 23 Nov 2009 19:17:08 -0800 (PST) From: Carl Worth To: Keith Packard , notmuch@notmuchmail.org In-Reply-To: References: <87639122sx.fsf@yoom.home.cworth.org> Date: Mon, 23 Nov 2009 19:16:54 -0800 Message-ID: <87bpismx21.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] notmuch 'index' mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 03:17:11 -0000 On Sun, 22 Nov 2009 23:18:33 -0800, Keith Packard wrote: > On Mon, 23 Nov 2009 07:06:06 +0100, Carl Worth wrote: > > > > * The mode documentation really needs to walk the user through how to > > setup a custom set of folders. > > You can use the standard emacs customization interface, although it's > not exactly well documented there. Additional docs are clearly > indicated. Yes. I think that's a bit too hidden. I'm imagining the case of a new user running notmuch. First, if we're going to allow them to start off from inside emacs rather than the command-line (and why not?) then I think we can pretty much just run "notmuch setup" and "notmuch new" for the user (and those walk the user through things well already. Then, I'd like the user to be seeing the folder view right away (since that's the primary view). We've got support for searching while still indexing, so if we refresh occasionally, the user will be able to see the inbox count just count up while indexing occurs. So what next for the user? We've got lots of empty space in the folder view, so I think what I'd like is to provide some suggestions on search strings to try, and then to make it obvious how to associate a name with a search string. And at that point, I'd like that name to be added to the folder view. And notice, I don't think we'll need to do the "virtual tag" thing of associating a tag name with a search and doing the work of making notmuch maintain the consistency of that tag and search string. It will be much more clean (and shouldn't be any less fast) to just do the searches for the original search terms, (rather than searching for tag terms that were previously applied by searching for the search terms). Then tags become something that are just for manual manipulation. What do you think? > > * It's not opening my "to-me" folder for some reason. (I thought it > > was the '-' at first, but "xorg-board" is working fine). I can debug > > this later. > > It shouldn't work on xorg-board either -- it just skips forward one > 'word' and assumes it's gotten the folder name. Lame programming, I > know. Should be easy to fix. Ah, that's it. So "xorg-board" only looked like it worked because I had a "xorg" folder as well. :-) > What more do you need? Pretty fonts? Icons? A pony? Heh. Just some guidance on what the user can do. It's nice that we have room to do this, (since we don't on the search results view). > Threads or messages? Threads are more expensive to compute, and when the > number is zero, it means the same thing. But, it is surprising to see a > huge number in the folder view and then get only a handful of threads in > the search view. Perhaps if the count is small enough we can go through > and actually figure out how many threads are involved. Maybe something like that. -Carl From keithp@keithp.com Mon Nov 23 19:43:32 2009 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 5898C431FAE for ; Mon, 23 Nov 2009 19:43:32 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 01TAMLvou8Lf for ; Mon, 23 Nov 2009 19:43:31 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 055DF431FBC for ; Mon, 23 Nov 2009 19:43:30 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 4C188B9402F; Mon, 23 Nov 2009 19:43:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4m-EcP8a0g5S; Mon, 23 Nov 2009 19:43:27 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 6BDDBB84011; Mon, 23 Nov 2009 19:43:27 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 5C395B80040; Mon, 23 Nov 2009 19:43:27 -0800 (PST) From: Keith Packard To: Carl Worth , notmuch@notmuchmail.org In-Reply-To: <87bpismx21.fsf@yoom.home.cworth.org> References: <87639122sx.fsf@yoom.home.cworth.org> <87bpismx21.fsf@yoom.home.cworth.org> Date: Mon, 23 Nov 2009 19:43:26 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] notmuch 'index' mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 03:43:32 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Mon, 23 Nov 2009 19:16:54 -0800, Carl Worth wrote: > So what next for the user? We've got lots of empty space in the folder > view, so I think what I'd like is to provide some suggestions on search > strings to try, and then to make it obvious how to associate a name with > a search string. And at that point, I'd like that name to be added to > the folder view. Right, associate a name for the search from the *search* view instead of the folder view. Then it's just a matter of using that command and typing a name. At that point, you get the new folder (or named search) added to the main window. That's a great plan. > Then tags become something that are just for manual manipulation. What > do you think? So you wouldn't generally end up using tags? And each time you wanted to view a folder you'd really get a new search result? I can see some benefits if you're using time-range based searches (show me all the mail From=20Carl that was received in the last week). And disadvantages as searching might actually be slow at some point? > Ah, that's it. So "xorg-board" only looked like it worked because I had > a "xorg" folder as well. :-) Yea, sorry 'bout that. > Maybe something like that. Let's figure it out later; it's just a number and we can change it without any penalty. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLC1ZeQp8BWwlsTdMRAuiBAJ43aIz8nRXV9XP/XFt6GMdX4YX0zwCgkpDE BkN3E2Rb3RIpz7QRiXF/Rpw= =vvwc -----END PGP SIGNATURE----- --=-=-=-- From alex.boterolowry@gmail.com Mon Nov 23 23:45:12 2009 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 5AAA1431FBC for ; Mon, 23 Nov 2009 23:45:12 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 oaYCoMvMA7sZ for ; Mon, 23 Nov 2009 23:45:11 -0800 (PST) Received: from mail-pz0-f171.google.com (mail-pz0-f171.google.com [209.85.222.171]) by olra.theworths.org (Postfix) with ESMTP id A3DC3431FAE for ; Mon, 23 Nov 2009 23:45:11 -0800 (PST) Received: by pzk1 with SMTP id 1so4588626pzk.33 for ; Mon, 23 Nov 2009 23:45:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :date:message-id:x-mailer; bh=8NWBNZ26LEs9F3fBTGqCUsNx0B6yB4MyefRY1TaixKg=; b=xAqxJz7NwEPS6DcEOt9ZNDFQDwIytvat4Tm1Qn1SGofpjJGsbNWWwNB314D4wbLqg+ BCNlG5vExvHqS4Ca735IoBRgA9bLoqwg7An8/d6N5b+58Mcmy5q0q2qKnI/KgI/IH2rf +/1C7KdwqNNDRwKH3tTkOeRF+nnYrjQ+6LAQY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=eb+vUH2K/ztV9kz+55KipTjS3vcqEleLa75a/h8kaHAdg7HXtBNy+jRtoPjOrfSbkv iG375oCsR8NqG62rA/vY9V/EJP+lxQMuqBwqFd/O8h54Fk+TpWoP1tq0hkzHSz/7Qt+W Uf0e5IRzlB+jLHoNzRc8WDZ2JENjSHSKNirbQ= Received: by 10.114.187.8 with SMTP id k8mr11321181waf.220.1259048709201; Mon, 23 Nov 2009 23:45:09 -0800 (PST) Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85]) by mx.google.com with ESMTPS id 22sm3089049pxi.2.2009.11.23.23.45.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 23:45:08 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo) id 7053 by fortitudo (DragonFly Mail Agent) Mon, 23 Nov 2009 23:45:13 -0800 From: Alexander Botero-Lowry To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 23:45:03 -0800 Message-Id: <1259048707-3062-1-git-send-email-alex.boterolowry@gmail.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH 1/5] make headers locally expandable/collapsable X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 07:45:13 -0000 --- notmuch.el | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/notmuch.el b/notmuch.el index fa6e7de..8aee286 100644 --- a/notmuch.el +++ b/notmuch.el @@ -605,7 +605,8 @@ which this thread was originally shown." (end-of-line) ; Inverse video for subject (overlay-put (make-overlay beg (point)) 'face '(:inverse-video t)) - (forward-line 2) + (forward-line 1) + (end-of-line) (let ((beg-hidden (point-marker))) (re-search-forward notmuch-show-header-end-regexp) (beginning-of-line) @@ -619,8 +620,19 @@ which this thread was originally shown." (forward-line) ) (indent-rigidly beg end depth) - (overlay-put (make-overlay beg-hidden end) - 'invisible 'notmuch-show-header) + (let ((invis-spec (make-symbol "notmuch-show-header"))) + (add-to-invisibility-spec (cons invis-spec t)) + (overlay-put (make-overlay beg-hidden end) + 'invisible invis-spec) + (goto-char beg) + (forward-line) + (let ((header-button (make-button (line-beginning-position) (line-end-position)))) + (button-put header-button 'invisibility-spec (cons invis-spec t)) + (button-put header-button 'action 'notmuch-toggle-invisible-action) + (button-put header-button 'follow-link t) + (button-put header-button 'help-echo + "mouse-1, RET: Show headers") + )) (goto-char end) (insert "\n") (set-marker beg nil) -- 1.6.5.2 From alex.boterolowry@gmail.com Mon Nov 23 23:45:22 2009 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 DFE00431FC3 for ; Mon, 23 Nov 2009 23:45:22 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 WlQzG8XU5rFM for ; Mon, 23 Nov 2009 23:45:22 -0800 (PST) Received: from mail-gx0-f225.google.com (mail-gx0-f225.google.com [209.85.217.225]) by olra.theworths.org (Postfix) with ESMTP id 70F79431FC0 for ; Mon, 23 Nov 2009 23:45:22 -0800 (PST) Received: by gxk25 with SMTP id 25so5944187gxk.0 for ; Mon, 23 Nov 2009 23:45:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=qRfrCGP55+BJ1M1Sx581PzEMIxdwfn+dqhSOrNP4Ixw=; b=ZAmfXFEoBuek50laFlZ1iR724VUc4HRuyhjDVSMZKwfUArGC9N+keyF44Z7mPIMz55 gq3k9KNP2+V33ZZojFDRSRcqczxD0pQNrGtwdzOIT0HyxSVbIkd38i9mOtBgcE0msRTd QAOYuLxnyXlUjoRQusGpDAbJn7SJhZR84a7n4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=slhXuxTbkhxh1e6oZlwzed52Dl97FY09IF40TcKJKlyEyMO54hBNEuotm7ZMBjOPz4 QbH7AhGu7TE71HzCg1+zKkmFUZK2TPfcwjd6kFEow68LvrdTNncreiTnLWk0fnRd6Ko7 S6ESoMxr2T2kdHmQyyWjGnAvld4rQrxAnIMww= Received: by 10.150.3.14 with SMTP id 14mr5802306ybc.228.1259048722072; Mon, 23 Nov 2009 23:45:22 -0800 (PST) Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85]) by mx.google.com with ESMTPS id 13sm2537484gxk.13.2009.11.23.23.45.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 23:45:21 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo) id 7059 by fortitudo (DragonFly Mail Agent) Mon, 23 Nov 2009 23:45:25 -0800 From: Alexander Botero-Lowry To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 23:45:05 -0800 Message-Id: <1259048707-3062-3-git-send-email-alex.boterolowry@gmail.com> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1259048707-3062-2-git-send-email-alex.boterolowry@gmail.com> References: <1259048707-3062-1-git-send-email-alex.boterolowry@gmail.com> <1259048707-3062-2-git-send-email-alex.boterolowry@gmail.com> Subject: [notmuch] [PATCH 3/5] make a nice function for generating invisibility toggle buttons X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 07:45:23 -0000 I realized I was replicating this code over and over again, so this way if I change my mind about something I only have to do it on one place. --- notmuch.el | 45 ++++++++++++++++----------------------------- 1 files changed, 16 insertions(+), 29 deletions(-) diff --git a/notmuch.el b/notmuch.el index ed1f7cb..23a07cc 100644 --- a/notmuch.el +++ b/notmuch.el @@ -497,6 +497,13 @@ which this thread was originally shown." (force-window-update) (redisplay t)) +(defun notmuch-configure-invisibility-button (btn invis-spec help-msg) + (button-put btn 'invisibility-spec invis-spec) + (button-put btn 'action 'notmuch-toggle-invisible-action) + (button-put btn 'follow-link t) + (button-put btn 'help-echo (concat "mouse-1, RET: " help-msg)) +) + (defun notmuch-show-markup-citations-region (beg end depth) (goto-char beg) (beginning-of-line) @@ -512,22 +519,13 @@ which this thread was originally shown." (invis-spec (make-symbol "notmuch-citation-region"))) (add-to-invisibility-spec invis-spec) (overlay-put overlay 'invisible invis-spec) - (let ( - (p (point)) + (let ((p (point)) (cite-button-text (concat "[" (number-to-string (count-lines beg-sub (point))) - "-line citation.]")) - ) + "-line citation.]"))) (goto-char (- beg-sub 1)) (insert (concat "\n" indent)) - (let ((cite-button (insert-button cite-button-text))) - (button-put cite-button 'invisibility-spec invis-spec) - (button-put cite-button 'action 'notmuch-toggle-invisible-action) - (button-put cite-button 'follow-link t) - (button-put cite-button 'help-echo - "mouse-1, RET: Show citation") - - ) + (notmuch-configure-invisibility-button (insert-button cite-button-text) invis-spec "Show citation") (insert "\n") (goto-char (+ (length cite-button-text) p)) )))) @@ -543,16 +541,9 @@ which this thread was originally shown." (goto-char (- beg-sub 1)) (insert (concat "\n" indent)) - (let ((sig-button (insert-button - (concat "[" (number-to-string sig-lines) - "-line signature.]")))) - (button-put sig-button 'invisibility-spec invis-spec) - (button-put sig-button 'action - 'notmuch-toggle-invisible-action) - (button-put sig-button 'follow-link t) - (button-put sig-button 'help-echo - "mouse-1, RET: Show signature") - ) + (notmuch-configure-invisibility-button + (insert-button (concat "[" (number-to-string sig-lines) + "-line signature.]")) invis-spec "Show signature") (insert "\n") (goto-char end)))))) (forward-line)))) @@ -623,13 +614,9 @@ which this thread was originally shown." 'invisible invis-spec) (goto-char beg) (forward-line) - (let ((header-button (make-button (line-beginning-position) (line-end-position)))) - (button-put header-button 'invisibility-spec (cons invis-spec t)) - (button-put header-button 'action 'notmuch-toggle-invisible-action) - (button-put header-button 'follow-link t) - (button-put header-button 'help-echo - "mouse-1, RET: Show headers") - )) + (notmuch-configure-invisibility-button + (make-button (line-beginning-position) (line-end-position)) + (cons invis-spec t) "Show headers")) (goto-char end) (insert "\n") (set-marker beg nil) -- 1.6.5.2 From alex.boterolowry@gmail.com Mon Nov 23 23:45:26 2009 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 6C118431FD2 for ; Mon, 23 Nov 2009 23:45:26 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 YSflKqeOvXxg for ; Mon, 23 Nov 2009 23:45:21 -0800 (PST) Received: from mail-yw0-f200.google.com (mail-yw0-f200.google.com [209.85.211.200]) by olra.theworths.org (Postfix) with ESMTP id C96AF431FAE for ; Mon, 23 Nov 2009 23:45:21 -0800 (PST) Received: by ywh38 with SMTP id 38so5718812ywh.6 for ; Mon, 23 Nov 2009 23:45:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=VaP9IFi7dmhl1NKwC84juvJ/3G7ROwGM42uQj55szu8=; b=u5XpJu5nvTqhMnmHjRuH+OxlBa9lgYg5eEbPELRhBSLUAmCbI6OXVH/Al40+ZV8qJ0 ctcn39gEgybmrwe0Gz8WnFAodJu3zD1RcvDMe7WAa9av5q31BNI9EwD7ZkMJFylMwXSc Fch/g+tRw4CAo100g5XlWFWQgvoG9UW7tDlV4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=UF3XalmuTk32Pg494KeXER+J/WBtPQllaYB7abwPjpAgXMNxDNMvCUJp5dvaVKGGhs IqwfeCB5d/p0a5WF5zlUkpaGmboMhTCGzqmKQ7v6XF4l0VQYp30uT/JEvNYgfAGdTTDe bZGV/6d4/I0IW7bbYN7P9GkbhZiQLNYEbnWfA= Received: by 10.150.172.38 with SMTP id u38mr10408252ybe.328.1259048721293; Mon, 23 Nov 2009 23:45:21 -0800 (PST) Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85]) by mx.google.com with ESMTPS id 15sm2489419gxk.4.2009.11.23.23.45.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 23:45:20 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo) id 7056 by fortitudo (DragonFly Mail Agent) Mon, 23 Nov 2009 23:45:24 -0800 From: Alexander Botero-Lowry To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 23:45:04 -0800 Message-Id: <1259048707-3062-2-git-send-email-alex.boterolowry@gmail.com> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1259048707-3062-1-git-send-email-alex.boterolowry@gmail.com> References: <1259048707-3062-1-git-send-email-alex.boterolowry@gmail.com> Subject: [notmuch] [PATCH 2/5] cleanup a lot of left-overs from the global invis X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 07:45:26 -0000 --- notmuch.el | 36 ------------------------------------ 1 files changed, 0 insertions(+), 36 deletions(-) diff --git a/notmuch.el b/notmuch.el index 8aee286..ed1f7cb 100644 --- a/notmuch.el +++ b/notmuch.el @@ -62,8 +62,6 @@ (define-key map "a" 'notmuch-show-archive-thread) (define-key map "A" 'notmuch-show-mark-read-then-archive-thread) (define-key map "b" 'notmuch-show-toggle-body-read-visible) - (define-key map "c" 'notmuch-show-toggle-citations-visible) - (define-key map "h" 'notmuch-show-toggle-headers-visible) (define-key map "m" 'message-mail) (define-key map "n" 'notmuch-show-next-message) (define-key map "N" 'notmuch-show-mark-read-then-next-open-message) @@ -72,7 +70,6 @@ (define-key map (kbd "C-p") 'notmuch-show-previous-line) (define-key map "q" 'kill-this-buffer) (define-key map "r" 'notmuch-show-reply) - (define-key map "s" 'notmuch-show-toggle-signatures-visible) (define-key map "v" 'notmuch-show-view-all-mime-parts) (define-key map "w" 'notmuch-show-view-raw-message) (define-key map "x" 'kill-this-buffer) @@ -666,39 +663,6 @@ which this thread was originally shown." (notmuch-show-markup-message))) (notmuch-show-hide-markers)) -(defun notmuch-show-toggle-citations-visible () - "Toggle visibility of citations" - (interactive) - (if notmuch-show-citations-visible - (add-to-invisibility-spec 'notmuch-show-citation) - (remove-from-invisibility-spec 'notmuch-show-citation)) - (set 'notmuch-show-citations-visible (not notmuch-show-citations-visible)) - ; Need to force the redisplay for some reason - (force-window-update) - (redisplay t)) - -(defun notmuch-show-toggle-signatures-visible () - "Toggle visibility of signatures" - (interactive) - (if notmuch-show-signatures-visible - (add-to-invisibility-spec 'notmuch-show-signature) - (remove-from-invisibility-spec 'notmuch-show-signature)) - (set 'notmuch-show-signatures-visible (not notmuch-show-signatures-visible)) - ; Need to force the redisplay for some reason - (force-window-update) - (redisplay t)) - -(defun notmuch-show-toggle-headers-visible () - "Toggle visibility of header fields" - (interactive) - (if notmuch-show-headers-visible - (add-to-invisibility-spec 'notmuch-show-header) - (remove-from-invisibility-spec 'notmuch-show-header)) - (set 'notmuch-show-headers-visible (not notmuch-show-headers-visible)) - ; Need to force the redisplay for some reason - (force-window-update) - (redisplay t)) - (defun notmuch-show-toggle-body-read-visible () "Toggle visibility of message bodies of read messages" (interactive) -- 1.6.5.2 From alex.boterolowry@gmail.com Mon Nov 23 23:45:29 2009 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 32363431FD6 for ; Mon, 23 Nov 2009 23:45:29 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 JtOc5ycgyMSk for ; Mon, 23 Nov 2009 23:45:26 -0800 (PST) Received: from mail-yw0-f200.google.com (mail-yw0-f200.google.com [209.85.211.200]) by olra.theworths.org (Postfix) with ESMTP id C53B2431FC2 for ; Mon, 23 Nov 2009 23:45:22 -0800 (PST) Received: by mail-yw0-f200.google.com with SMTP id 38so5718812ywh.6 for ; Mon, 23 Nov 2009 23:45:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=R1U0OvrP+WaIKX3PV3pf97l9MctI1czkDdSybtDMfFw=; b=u6w3fNaSLM3Vdt0qSBfjSUqaawi49oQZlW5s8u7EDShzOkJD//wzsnHdbvYKgpCkgX xIQZoPDdW1j8FhGBZ3aC3+hPsnRzufd2P9byBMLasS1E08xRHDTfST6JdXsT29NwGIJK k7Ch4fjH6/iiXtB6EKD/mW+Hp1+tTdYGWIWrw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=kFLmcwtRjT82tKaJUyr0lvFp3tJ43o6q2B7Zl/JSXz/covDrfVP3lTwG5SzM0BQN+2 qAzgML/DTfpIvk6lWWDhYam5/7YgcvRDa68xx6sn1UXWrztWgFWpcIP0sgvB4BnD0wod tRCTB/X5SaMvEOUZzDyFWe4qZUbZigdlRwVPg= Received: by 10.150.235.5 with SMTP id i5mr10478286ybh.271.1259048722445; Mon, 23 Nov 2009 23:45:22 -0800 (PST) Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85]) by mx.google.com with ESMTPS id 16sm2529192gxk.15.2009.11.23.23.45.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 23:45:21 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo) id 705c by fortitudo (DragonFly Mail Agent) Mon, 23 Nov 2009 23:45:25 -0800 From: Alexander Botero-Lowry To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 23:45:06 -0800 Message-Id: <1259048707-3062-4-git-send-email-alex.boterolowry@gmail.com> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1259048707-3062-3-git-send-email-alex.boterolowry@gmail.com> References: <1259048707-3062-1-git-send-email-alex.boterolowry@gmail.com> <1259048707-3062-2-git-send-email-alex.boterolowry@gmail.com> <1259048707-3062-3-git-send-email-alex.boterolowry@gmail.com> Subject: [notmuch] [PATCH 4/5] Make bodies locally toggleable X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 07:45:29 -0000 Having actually implemented this, I realized that my initial approach of providing a function to configure a button was wrong. Instead I've replaced that with button types. This then makes it possible to provide the fully expanded view when all threads in a message are unread. It also has the potential to allow global-expansion functions if that is desireable --- notmuch.el | 89 +++++++++++++++++++++++++++++++---------------------------- 1 files changed, 47 insertions(+), 42 deletions(-) diff --git a/notmuch.el b/notmuch.el index 23a07cc..af0c487 100644 --- a/notmuch.el +++ b/notmuch.el @@ -497,12 +497,15 @@ which this thread was originally shown." (force-window-update) (redisplay t)) -(defun notmuch-configure-invisibility-button (btn invis-spec help-msg) - (button-put btn 'invisibility-spec invis-spec) - (button-put btn 'action 'notmuch-toggle-invisible-action) - (button-put btn 'follow-link t) - (button-put btn 'help-echo (concat "mouse-1, RET: " help-msg)) -) +(define-button-type 'notmuch-button-invisibility-toggle-type 'action 'notmuch-toggle-invisible-action 'follow-link t) +(define-button-type 'notmuch-button-citation-toggle-type 'help-echo "mouse-1, RET: Show citation" + :supertype 'notmuch-button-invisibility-toggle-type) +(define-button-type 'notmuch-button-signature-toggle-type 'help-echo "mouse-1, RET: Show signature" + :supertype 'notmuch-button-invisibility-toggle-type) +(define-button-type 'notmuch-button-headers-toggle-type 'help-echo "mouse-1, RET: Show headers" + :supertype 'notmuch-button-invisibility-toggle-type) +(define-button-type 'notmuch-button-body-toggle-type 'help-echo "mouse-1, RET: Show message" + :supertype 'notmuch-button-invisibility-toggle-type) (defun notmuch-show-markup-citations-region (beg end depth) (goto-char beg) @@ -525,7 +528,9 @@ which this thread was originally shown." "-line citation.]"))) (goto-char (- beg-sub 1)) (insert (concat "\n" indent)) - (notmuch-configure-invisibility-button (insert-button cite-button-text) invis-spec "Show citation") + (insert-button cite-button-text + 'invisibility-spec invis-spec + :type 'notmuch-button-citation-toggle-type) (insert "\n") (goto-char (+ (length cite-button-text) p)) )))) @@ -541,9 +546,11 @@ which this thread was originally shown." (goto-char (- beg-sub 1)) (insert (concat "\n" indent)) - (notmuch-configure-invisibility-button - (insert-button (concat "[" (number-to-string sig-lines) - "-line signature.]")) invis-spec "Show signature") + (let ((sig-button-text (concat "[" (number-to-string sig-lines) + "-line signature.]"))) + (insert-button sig-button-text 'invisibility-spec invis-spec + :type 'notmuch-button-signature-toggle-type) + ) (insert "\n") (goto-char end)))))) (forward-line)))) @@ -572,16 +579,19 @@ which this thread was originally shown." (while (< (point) end) (notmuch-show-markup-part beg end depth)))) -(defun notmuch-show-markup-body (depth) +(defun notmuch-show-markup-body (depth btn) (re-search-forward notmuch-show-body-begin-regexp) (forward-line) (let ((beg (point-marker))) (re-search-forward notmuch-show-body-end-regexp) (let ((end (copy-marker (match-beginning 0)))) (notmuch-show-markup-parts-region beg end depth) - (if (not (notmuch-show-message-unread-p)) - (overlay-put (make-overlay beg end) - 'invisible 'notmuch-show-body-read)) + (let ((invis-spec (make-symbol "notmuch-show-body-read"))) + (overlay-put (make-overlay beg end) + 'invisible invis-spec) + (button-put btn 'invisibility-spec invis-spec) + (if (not (notmuch-show-message-unread-p)) + (add-to-invisibility-spec invis-spec))) (set-marker beg nil) (set-marker end nil) ))) @@ -589,10 +599,12 @@ which this thread was originally shown." (defun notmuch-show-markup-header (depth) (re-search-forward notmuch-show-header-begin-regexp) (forward-line) - (let ((beg (point-marker))) + (let ((beg (point-marker)) + (btn nil)) (end-of-line) ; Inverse video for subject (overlay-put (make-overlay beg (point)) 'face '(:inverse-video t)) + (setq btn (make-button beg (point) :type 'notmuch-button-body-toggle-type)) (forward-line 1) (end-of-line) (let ((beg-hidden (point-marker))) @@ -614,23 +626,25 @@ which this thread was originally shown." 'invisible invis-spec) (goto-char beg) (forward-line) - (notmuch-configure-invisibility-button - (make-button (line-beginning-position) (line-end-position)) - (cons invis-spec t) "Show headers")) + (make-button (line-beginning-position) (line-end-position) + 'invisibility-spec (cons invis-spec t) + :type 'notmuch-button-headers-toggle-type)) (goto-char end) (insert "\n") (set-marker beg nil) (set-marker beg-hidden nil) (set-marker end nil) - )))) + )) + btn)) (defun notmuch-show-markup-message () (if (re-search-forward notmuch-show-message-begin-regexp nil t) (progn (re-search-forward notmuch-show-depth-regexp) - (let ((depth (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))) - (notmuch-show-markup-header depth) - (notmuch-show-markup-body depth))) + (let ((depth (string-to-number (buffer-substring (match-beginning 1) (match-end 1)))) + (btn nil)) + (setq btn (notmuch-show-markup-header depth)) + (notmuch-show-markup-body depth btn))) (goto-char (point-max)))) (defun notmuch-show-hide-markers () @@ -650,17 +664,6 @@ which this thread was originally shown." (notmuch-show-markup-message))) (notmuch-show-hide-markers)) -(defun notmuch-show-toggle-body-read-visible () - "Toggle visibility of message bodies of read messages" - (interactive) - (if notmuch-show-body-read-visible - (add-to-invisibility-spec 'notmuch-show-body-read) - (remove-from-invisibility-spec 'notmuch-show-body-read)) - (set 'notmuch-show-body-read-visible (not notmuch-show-body-read-visible)) - ; Need to force the redisplay for some reason - (force-window-update) - (redisplay t)) - ;;;###autoload (defun notmuch-show-mode () "Major mode for viewing a thread with notmuch. @@ -689,14 +692,6 @@ view, (remove the \"inbox\" tag from each), with \\{notmuch-show-mode-map}" (interactive) (kill-all-local-variables) - (set (make-local-variable 'notmuch-show-headers-visible) t) - (notmuch-show-toggle-headers-visible) - (set (make-local-variable 'notmuch-show-body-read-visible) t) - (notmuch-show-toggle-body-read-visible) - (set (make-local-variable 'notmuch-show-citations-visible) t) - (notmuch-show-toggle-citations-visible) - (set (make-local-variable 'notmuch-show-signatures-visible) t) - (notmuch-show-toggle-signatures-visible) (add-to-invisibility-spec 'notmuch-show-marker) (use-local-map notmuch-show-mode-map) (setq major-mode 'notmuch-show-mode @@ -765,7 +760,16 @@ thread from that buffer can be show when done with this one)." (if (not (notmuch-show-message-unread-p)) (progn (goto-char (point-min)) - (notmuch-show-toggle-body-read-visible))))) + (let ((btn (forward-button 1))) + (while btn + (if (button-has-type-p btn 'notmuch-button-body-toggle-type) + (push-button)) + (condition-case err + (setq btn (forward-button 1)) + (error (setq btn nil))) + )) + (beginning-of-buffer) + )))) ))) (defvar notmuch-search-authors-width 40 @@ -803,6 +807,7 @@ thread from that buffer can be show when done with this one)." (defvar notmuch-search-query-string) (defvar notmuch-search-oldest-first) + (defun notmuch-search-scroll-up () "Scroll up, moving point to last message in thread if at end." (interactive) -- 1.6.5.2 From alex.boterolowry@gmail.com Mon Nov 23 23:45:31 2009 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 E0CFA431FC9 for ; Mon, 23 Nov 2009 23:45:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ROdjHLNPLJut for ; Mon, 23 Nov 2009 23:45:27 -0800 (PST) Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com [209.85.210.204]) by olra.theworths.org (Postfix) with ESMTP id 1FC42431FC3 for ; Mon, 23 Nov 2009 23:45:24 -0800 (PST) Received: by yxe42 with SMTP id 42so6279805yxe.22 for ; Mon, 23 Nov 2009 23:45:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=SENiAOeJTQBbXtX2BrbO4T321kmugU3OFPGW6IzNMM0=; b=LfETMczBODuVFCJ/2bd0KGBaSPpfwR4H1kWboKrQGrtpAPG0n2oOaUHmpEEIUme//C G3RwKCyuZNOM8ljdcvXtUFLwAj9xlNKmCl3zlAcR4KyoI2JttLSIOVSE8xn80IXVNSHy nhhXwgjvGLJUPp2ssYZQUpVWvW2/1lec1xDdY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=kystPU67M+0OeFpkXJyNhi0bPFfRz4KnlznDA8a7+RZNTADaHtE+xRAbpVhVTwTN7r tLZEJ9LSOoXGmMNmGpqIvTZX/ql+W6MKBIRWxnGqvZv5ASjczAw7vXkzRkBamp/rb2of cbiDT18r/YzfO+uAQ2rtM1KsA7MRWTuuWdbaU= Received: by 10.150.163.2 with SMTP id l2mr10465656ybe.272.1259048723546; Mon, 23 Nov 2009 23:45:23 -0800 (PST) Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85]) by mx.google.com with ESMTPS id 16sm2529195gxk.15.2009.11.23.23.45.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 23:45:21 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo) id 705f by fortitudo (DragonFly Mail Agent) Mon, 23 Nov 2009 23:45:26 -0800 From: Alexander Botero-Lowry To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 23:45:07 -0800 Message-Id: <1259048707-3062-5-git-send-email-alex.boterolowry@gmail.com> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1259048707-3062-4-git-send-email-alex.boterolowry@gmail.com> References: <1259048707-3062-1-git-send-email-alex.boterolowry@gmail.com> <1259048707-3062-2-git-send-email-alex.boterolowry@gmail.com> <1259048707-3062-3-git-send-email-alex.boterolowry@gmail.com> <1259048707-3062-4-git-send-email-alex.boterolowry@gmail.com> Subject: [notmuch] [PATCH 5/5] Remove the global expand body keymapping X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 07:45:31 -0000 --- notmuch.el | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/notmuch.el b/notmuch.el index af0c487..907df2c 100644 --- a/notmuch.el +++ b/notmuch.el @@ -61,7 +61,6 @@ ; overlays-at to query and manipulate the current overlay. (define-key map "a" 'notmuch-show-archive-thread) (define-key map "A" 'notmuch-show-mark-read-then-archive-thread) - (define-key map "b" 'notmuch-show-toggle-body-read-visible) (define-key map "m" 'message-mail) (define-key map "n" 'notmuch-show-next-message) (define-key map "N" 'notmuch-show-mark-read-then-next-open-message) -- 1.6.5.2 From tassilo@member.fsf.org Tue Nov 24 00:02:49 2009 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 E9638431FBC for ; Tue, 24 Nov 2009 00:02:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 PgA0ZmKZu1jU for ; Tue, 24 Nov 2009 00:02:49 -0800 (PST) Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15]) by olra.theworths.org (Postfix) with ESMTP id B13C6431FAE for ; Tue, 24 Nov 2009 00:02:48 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 923F878A23F2 for ; Tue, 24 Nov 2009 09:02:47 +0100 (CET) Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09054-10 for ; Tue, 24 Nov 2009 09:02:47 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Received: from thinkpad.tsdh.de (unknown [141.26.94.196]) by deliver.uni-koblenz.de (Postfix) with ESMTP id F264578A2375 for ; Tue, 24 Nov 2009 09:02:46 +0100 (CET) From: Tassilo Horn To: notmuch@notmuchmail.org Mail-Copies-To: never Mail-Followup-To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 09:02:46 +0100 Message-ID: <87zl6cl595.fsf@thinkpad.tsdh.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at uni-koblenz.de Subject: [notmuch] Snippet to jump to message in Gnus from notmuch-show buffer X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 08:02:50 -0000 Hi all, I'm a Gnus user and use notmuch mostly for searching. When I want to reply to a message, I need to get back to Gnus, so that my Gnus posting styles (gcc into that group, right email address, correct signature,...) are applied. Therefore, I created this small snippet. Now C-c C-c inside some message in the *notmuch-show* buffer opens this article in a Gnus *Summary* buffer, where I can reply to it, forward it, ... Of course, the translation from file name to Gnus group name is something that is different for any user. The essence of this code is the call to the org-gnus.el function `org-gnus-follow-link', which takes the group name and the message-id. It's included in Emacsen >= 23. --8<---------------cut here---------------start------------->8--- (require 'notmuch) (defun th-notmuch-file-to-group (file) "Calculate the Gnus group name from the given file name. Example: IN: /home/horn/Mail/Dovecot/uni/INBOX/dbox-Mails/u.4075 OUT: nnimap+Uni:INBOX" (concat "nnimap+" (replace-regexp-in-string "^\\([^/]+\\)/" "\\1:" (replace-regexp-in-string "/dbox-Mails/.*" "" (replace-regexp-in-string "/home/horn/Mail/Dovecot/" "" file))))) (defun th-notmuch-goto-message-in-gnus () "Open a summary buffer containing the current notmuch article." (interactive) (let ((group (th-notmuch-file-to-group (notmuch-show-get-filename))) (message-id (replace-regexp-in-string "^id:" "" (notmuch-show-get-message-id)))) (message "G: %s, mid: %s" group message-id) (if (and group message-id) (org-gnus-follow-link group message-id) (message "Couldn't get relevant infos for switching to Gnus.")))) (define-key notmuch-show-mode-map (kbd "C-c C-c") 'th-notmuch-goto-message-in-gnus) --8<---------------cut here---------------end--------------->8--- BTW, why does `notmuch-show-get-message-id' prefix the message-id with "id:"? Bye, Tassilo From five9a2@gmail.com Tue Nov 24 02:19:37 2009 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 1FB46431FBC for ; Tue, 24 Nov 2009 02:19:37 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 85DatuwuGCCL for ; Tue, 24 Nov 2009 02:19:35 -0800 (PST) Received: from mail-bw0-f210.google.com (mail-bw0-f210.google.com [209.85.218.210]) by olra.theworths.org (Postfix) with ESMTP id 20F1E431FAE for ; Tue, 24 Nov 2009 02:19:34 -0800 (PST) Received: by bwz2 with SMTP id 2so6097166bwz.0 for ; Tue, 24 Nov 2009 02:19:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=I65d9swiqW8aSIBnmOfqJezwxR2W9MK4TC1hodFq5yA=; b=w4xPr4aeevbv+S+W0eCpNFo+qGmusPg0mARFlAjmJYDOvZN3yntJEzxjVdydKrtJit KvvMGv78g0X2AKGMfpdYQiJjMl9VFqv4Km9j4V3p1XFE17FiYzfaqNskWQgcAF8Xfa2j Muj8rw4n65Zk8owopfWWjuMmQTV1yBXvQC8Zw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=O1pO1W0HnO+q0JJJ+APkG54Ry3k50hwTzm97kTEL/SZUKlZKms4/uuXjxsEg8rq3I1 V8RPGQNSzISb0H5k8x9izxeHa9wphzqrMEAbTXsz1H3oaIsd8eWvTgPBjRs3GRIkw02l VlOTLR0/4StyKg6JIeDpq8NpLP1lMKIz0z93Q= Received: by 10.204.24.17 with SMTP id t17mr5953037bkb.142.1259057972872; Tue, 24 Nov 2009 02:19:32 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 1sm6964695fkt.3.2009.11.24.02.19.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 02:19:31 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Keith Packard , Carl Worth , notmuch@notmuchmail.org In-Reply-To: References: <87639122sx.fsf@yoom.home.cworth.org> <87bpismx21.fsf@yoom.home.cworth.org> Date: Tue, 24 Nov 2009 11:20:02 +0100 Message-ID: <87tywkp6lp.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] notmuch 'index' mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 10:19:37 -0000 On Mon, 23 Nov 2009 19:43:26 -0800, Keith Packard wrote: > On Mon, 23 Nov 2009 19:16:54 -0800, Carl Worth wrote: > > Then tags become something that are just for manual manipulation. What > > do you think? I really think this is the way to go. > And disadvantages as searching might actually be slow at some point? If this happens, there is nothing to prevent notmuch from caching the search by actually writing a corresponding tag. This could be made automatic by logging the cost of each named search (and perhaps the frequency of making that search), and using a tradeoff function to decide which searches to optimize. Once a search was selected for optimization, there are at least two alternatives, depending on which queries xapian can answer quickly. 1. Log the time and spawn an asynchronous notmuch tag process. Searches for vtag:named-search (vtag: doesn't need to be a keyword, but I'm only distinguishing here for clarity) which was normally translated into long search expression becomes tag:named-search OR newer:timestamp AND (long search expression) This option guarantees that notmuch new remains fast and simple because it does no special tagging, but this query might not be any better. 2. Inform notmuch new that it should apply the chosen tag to messages matching the query and spawn the asynchronous notmuch tag process. Once the tag process has finished, searches for vtag:named-search are translated to tag:named-search. This implies concurrent modification of the database, otherwise it would cause a stall in incoming mail (not important if mass tagging somehow became faster). Admittedly my archive is not huge (100k messages in 3.5 GB plus 1.1 GB for .notmuch) but queries returning a reasonable number of messages are still quite fast. Additionally, searches for tags do not seem to be greatly faster than queries for complex queries returning a similar number of results. Jed From jan@ryngle.com Tue Nov 24 02:56:01 2009 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 4D629431FBF for ; Tue, 24 Nov 2009 02:56:01 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 pYpGKG04PQaM for ; Tue, 24 Nov 2009 02:56:00 -0800 (PST) Received: from mail-bw0-f210.google.com (mail-bw0-f210.google.com [209.85.218.210]) by olra.theworths.org (Postfix) with ESMTP id 71AE8431FAE for ; Tue, 24 Nov 2009 02:56:00 -0800 (PST) Received: by bwz2 with SMTP id 2so6121618bwz.0 for ; Tue, 24 Nov 2009 02:55:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.34.13 with SMTP id j13mr2282073bkd.32.1259060159399; Tue, 24 Nov 2009 02:55:59 -0800 (PST) In-Reply-To: <87hbslg7qp.fsf@yoom.home.cworth.org> References: <1258927116-528-1-git-send-email-jrollins@finestructure.net> <1258927116-528-2-git-send-email-jrollins@finestructure.net> <1258927116-528-3-git-send-email-jrollins@finestructure.net> <20091122221523.GA8703@finestructure.net> <20091122222453.GM17268@jukie.net> <20091122231419.GA8322@finestructure.net> <87hbslg7qp.fsf@yoom.home.cworth.org> Date: Tue, 24 Nov 2009 11:55:59 +0100 Message-ID: From: Jan Janak To: Carl Worth Content-Type: text/plain; charset=UTF-8 Cc: Bart Trojanowski , notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 3/3] change config file location to be ~/.notmuch/config X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 10:56:01 -0000 On Mon, Nov 23, 2009 at 5:55 AM, Carl Worth wrote: > On Sun, 22 Nov 2009 18:14:20 -0500, Jameson Graef Rollins wrote: >> I think Carl said he wanted to keep the ability to specify exactly >> where the database is stored, so if we could move away from something >> that makes any implicit assumptions about relative paths between the >> database and the maildir, then all should be ok. > > Well, I chose the relative-path assumptions intentionally. The idea is > that if I move my mail from ~/Mail to ~/mail then the .notmuch directory > moves with it and everything continues to work just fine. Yeah, having relative paths in the database is a really good thing, IMHO. I was pleasantly surprised that notmuch continued working after I moved my mail from one directory to another :-). -- Jan From jan@ryngle.com Tue Nov 24 04:14:16 2009 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 456DF431FBC for ; Tue, 24 Nov 2009 04:14:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 DRu5KemicwSc for ; Tue, 24 Nov 2009 04:14:16 -0800 (PST) Received: from mail-bw0-f210.google.com (mail-bw0-f210.google.com [209.85.218.210]) by olra.theworths.org (Postfix) with ESMTP id E5FB1431FAE for ; Tue, 24 Nov 2009 04:14:15 -0800 (PST) Received: by bwz2 with SMTP id 2so6177766bwz.0 for ; Tue, 24 Nov 2009 04:14:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.20.82 with SMTP id e18mr2287299bkb.168.1259064847561; Tue, 24 Nov 2009 04:14:07 -0800 (PST) In-Reply-To: <87bpismx21.fsf@yoom.home.cworth.org> References: <87639122sx.fsf@yoom.home.cworth.org> <87bpismx21.fsf@yoom.home.cworth.org> Date: Tue, 24 Nov 2009 13:14:07 +0100 Message-ID: From: Jan Janak To: Carl Worth Content-Type: text/plain; charset=UTF-8 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] notmuch 'index' mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 12:14:16 -0000 On Tue, Nov 24, 2009 at 4:16 AM, Carl Worth wrote: > And notice, I don't think we'll need to do the "virtual tag" thing of > associating a tag name with a search and doing the work of making > notmuch maintain the consistency of that tag and search string. It will > be much more clean (and shouldn't be any less fast) to just do the > searches for the original search terms, (rather than searching for tag > terms that were previously applied by searching for the search terms). > > Then tags become something that are just for manual manipulation. What > do you think? I like this. I think this is much cleaner than the "virtual tag" approach. -- Jan From djcb@djcbsoftware.nl Tue Nov 24 08:16:47 2009 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 38DFB431FBC for ; Tue, 24 Nov 2009 08:16:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 BuO12gVvwLxb for ; Tue, 24 Nov 2009 08:16:47 -0800 (PST) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by olra.theworths.org (Postfix) with ESMTP id 1AE19431FBF for ; Tue, 24 Nov 2009 08:16:46 -0800 (PST) Received: from djcbsoftware.nl (a88-112-254-208.elisa-laajakaista.fi [88.112.254.208]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by gw02.mail.saunalahti.fi (Postfix) with ESMTP id 6B24D1398E8; Tue, 24 Nov 2009 18:16:39 +0200 (EET) Received: from cthulhu.mindcrime.djcbsoftware.nl (localhost [127.0.0.1]) by djcbsoftware.nl (Postfix) with ESMTP id 747F339C53A; Tue, 24 Nov 2009 16:16:58 +0200 (EET) Date: Tue, 24 Nov 2009 16:16:58 +0200 Message-ID: <874ook80th.wl%djcb@djcbsoftware.nl> From: Dirk-Jan C. Binnema To: Carl Worth In-Reply-To: <87k4xg634z.fsf@yoom.home.cworth.org> References: <87aayggsjp.wl%djcb@djcbsoftware.nl> <87iqd43wot.fsf@yoom.home.cworth.org> <87skc6n3yp.wl%djcb@djcbsoftware.nl> <877htifa0e.fsf@yoom.home.cworth.org> <87pr79yaz1.wl%djcb@djcbsoftware.nl> <87k4xg634z.fsf@yoom.home.cworth.org> Mail-Reply-To: djcb@djcbsoftware.nl User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.1 Mule/6.0 (HANACHIRUSATO) Organization: DJCBSoftware MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "notmuch@notmuchmail.org" Subject: Re: [notmuch] interesting project! X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: djcb@djcbsoftware.nl 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, 24 Nov 2009 16:16:47 -0000 Hi Carl, >>>>> "Carl" =3D=3D Carl Worth writes: Carl> I agree that trying to support OOM doesn't make sense without Carl> testing. But that's why I want to test notmuch with memory-fault Carl> injection. We've been doing this with the cairo library with good Carl> success for a while. Carl> As for "unlikely that malloc ever returns NULL", that's simply a Carl> system-configuration away (just turn off overcommit). And I can i= magine Carl> notmuch being used in lots of places, (netbooks, web servers, etc= .), so Carl> I do want to make it as robust as possible. That is a very laudable goal! But it's also quite hard to achieve, consider= ing that both GMime and Xapian may have some different ideas about that. And at least in the current code, I see fprintfs in 'malloc-returns-NULL'-cases -- but fprintf itself will probably allocate memory too. Also, at least now, t= he bad=C2=A0alloc exceptions for C++ are not caught. Of course, that can be ch= anged, but it's just to show that these things are hard to get right. Carl> Thanks for mentioning the hash table. The hash table is one of th= e few Carl> things that I *am* using from glib right now in notmuch. It's got= a Carl> couple of bizarre things about it: Carl> 1. The simpler-appearing g_hash_table_new function is useless Carl> for common cases like hashing strings. It will just leak Carl> memory. So g_hash_table_new_full is the only one worth using. Hmmm, I never noticed that behavior. Tf you are using dynamically allocated strings, GHashTable won't free them for you -- but I can really see how it could (given that it takes generic pointers), so you have to free those yourself. But any memleaks beyond that? Carl> 2. There are two lookup functions, g_hash_table_lookup, and Carl> g_hash_table_lookup_extended. Carl> So, it might make sense if a hash-table interface supported Carl> these two modes well. What's bizarre about GHashTable though, Carl> is that in the "just a set" case, we only use NULL as the Carl> value when inserting. And distinguish "previously inserted Carl> with NULL" from "never inserted" is the one thing that Carl> g_hash_table_lookup can't do. So I've only found that I could Carl> ever use g_hash_table_lookup_extended, (and pass a pair of Carl> NULLs for the return arguments I don't need). Hmmn, well in I found that returning NULL for 'not set' works in many cases, and it makes it quite easy for that. If you need to distinguish between NULL and 'not set', you can use either the _extended version as you mention, or = use some special NOT_SET static ptr you can compare with (and handle it appropriately in the destructor). Carl> I definitely like the idea of having tiny, focused libraries that= do Carl> one thing and do it well, (and maybe even some things so tiny that Carl> they are actually designed to be copied into the application---li= ke Carl> with gnulib and with Eric's new hash table). Ok; glib fills the role pretty well for me, and I don't really pay for the parts that I don't use. But tastes differ, no problem ;-) Carl> Thanks for understanding. :-) Carl> And I enjoy the conversation, Same here :)=20 Best wishes, Dirk. --=20 Dirk-Jan C. Binnema Helsinki, Finland e:djcb@djcbsoftware.nl w:www.djcbsoftware.nl pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C From djcb@djcbsoftware.nl Tue Nov 24 08:16:48 2009 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 B8302431FBF for ; Tue, 24 Nov 2009 08:16:48 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 vyvxzL9IvHr5 for ; Tue, 24 Nov 2009 08:16:46 -0800 (PST) Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi [195.197.172.111]) by olra.theworths.org (Postfix) with ESMTP id B422E431FAE for ; Tue, 24 Nov 2009 08:16:45 -0800 (PST) Received: from djcbsoftware.nl (a88-112-254-208.elisa-laajakaista.fi [88.112.254.208]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by gw03.mail.saunalahti.fi (Postfix) with ESMTP id 5443A216682 for ; Tue, 24 Nov 2009 18:16:39 +0200 (EET) Received: from cthulhu.mindcrime.djcbsoftware.nl (localhost [127.0.0.1]) by djcbsoftware.nl (Postfix) with ESMTP id 73FF039C53B for ; Tue, 24 Nov 2009 16:22:02 +0200 (EET) Date: Tue, 24 Nov 2009 16:22:02 +0200 Message-ID: <873a4480l1.wl%djcb@djcbsoftware.nl> From: Dirk-Jan C. Binnema To: "notmuch@notmuchmail org" Mail-Reply-To: djcb@djcbsoftware.nl User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.1 Mule/6.0 (HANACHIRUSATO) Organization: DJCBSoftware MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Subject: [notmuch] [PATCH] notmuch-count: make sure all created items are freed, even in error paths X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: djcb@djcbsoftware.nl 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, 24 Nov 2009 16:16:48 -0000 Another minor patch, fixing a couple of resource leaks in error paths. --- notmuch-count.c | 52 ++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 36 insertions(+), 16 deletions(-) diff --git a/notmuch-count.c b/notmuch-count.c index 77aa433..b5808f5 100644 --- a/notmuch-count.c +++ b/notmuch-count.c @@ -28,7 +28,8 @@ notmuch_count_command (void *ctx, int argc, char *argv[]) notmuch_database_t *notmuch; notmuch_query_t *query; char *query_str; - int i; + int i, retval; + #if 0 char *opt, *end; int i, first = 0, max_threads = -1; @@ -76,35 +77,54 @@ notmuch_count_command (void *ctx, int argc, char *argv[]) argc -= i; argv += i; + config = NULL; + query_str = NULL; + notmuch = NULL; + query = NULL; + config = notmuch_config_open (ctx, NULL, NULL); - if (config == NULL) - return 1; - - notmuch = notmuch_database_open (notmuch_config_get_database_path (config), - NOTMUCH_DATABASE_MODE_READ_ONLY); - if (notmuch == NULL) - return 1; - + if (config == NULL) { + retval = 1; + goto out; + } + query_str = query_string_from_args (ctx, argc, argv); if (query_str == NULL) { fprintf (stderr, "Out of memory.\n"); - return 1; + retval = 1; + goto out; } if (*query_str == '\0') { fprintf (stderr, "Error: notmuch count requires at least one count term.\n"); - return 1; + retval = 1; + goto out; } - + + notmuch = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READ_ONLY); + if (notmuch == NULL) { + fprintf (stderr, "Failed to open database at %s\n", + notmuch_config_get_database_path (config)); + retval = 1; + goto out; + } + query = notmuch_query_create (notmuch, query_str); if (query == NULL) { fprintf (stderr, "Out of memory\n"); - return 1; + retval = 1; + goto out; } printf ("%u\n", notmuch_query_count_messages(query)); + retval = 0; +out: + talloc_free (query_str); + notmuch_config_close (config); notmuch_query_destroy (query); - notmuch_database_close (notmuch); - - return 0; + if (notmuch) /* _close does not allow NULL */ + notmuch_database_close (notmuch); + + return retval; } -- 1.6.3.3 From keithp@keithp.com Tue Nov 24 08:38:25 2009 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 989F7431FBF for ; Tue, 24 Nov 2009 08:38:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 VsSZ6-XfDysU for ; Tue, 24 Nov 2009 08:38:25 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id E1557431FAE for ; Tue, 24 Nov 2009 08:38:24 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 0E2DE76012A; Tue, 24 Nov 2009 08:38:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id NXgMZUs7KZ9E; Tue, 24 Nov 2009 08:38:21 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 29B19B84011; Tue, 24 Nov 2009 08:38:21 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 1AC8976012A; Tue, 24 Nov 2009 08:38:21 -0800 (PST) From: Keith Packard To: Jan Janak , Carl Worth In-Reply-To: References: <87639122sx.fsf@yoom.home.cworth.org> <87bpismx21.fsf@yoom.home.cworth.org> Date: Tue, 24 Nov 2009 08:38:20 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] notmuch 'index' mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 16:38:25 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Tue, 24 Nov 2009 13:14:07 +0100, Jan Janak wrote: > I like this. I think this is much cleaner than the "virtual tag" > approach. A disadvantage I see is that you would not see this 'virtual tags' in the list of tags on each message. And, we'd have to put the virtual tags in the .config file or the command line would become a lot less useful. Speaking of which, we should put the folders in the .config file in any case, and provide command line syntax to use them. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLDAv8Qp8BWwlsTdMRAi49AJ9qZZmYBzYyaTFZEWAZhLDXiZqDqwCgq0sy 1fFzPCvhNhNilrJOIgV935o= =T+gQ -----END PGP SIGNATURE----- --=-=-=-- From five9a2@gmail.com Tue Nov 24 09:13:43 2009 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 5F416431FAE for ; Tue, 24 Nov 2009 09:13:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 kgK5oHm3Hf1i for ; Tue, 24 Nov 2009 09:13:42 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 3A3EA431FBC for ; Tue, 24 Nov 2009 09:13:42 -0800 (PST) Received: by bwz24 with SMTP id 24so5150871bwz.30 for ; Tue, 24 Nov 2009 09:13:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=nZXi4c+ci4G0yTrXncR4C6n7FErF9l/mOKjjwSycpuk=; b=t1XiuxpNwEN6cgESURbQAE/xd5JtXWBkysiV8CATLA7P9vf0jakrdAvewhSbEwEi0l /TslCDH4PbY2iEZsFEMHwxf1BtPDhi5RDTUb9+zeoUu+0xz1p2CjhOCH8eHYxo1Urazr 7xr4Cwh6NJr8pGWsQNw4S7nePlImoP4D+mEr4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=cdHyEqwzRL0BMYSva4bv8hYK6S0ahNIMISo06viU0q2YHvzLTtoiuJkF4vugojWomT LQrNOXZ/ChLz37PugrEfMnmswMgdyelziv8jfQp2TfoNmeZcGYZfDPEi2f+B21lwBhqm t9x2lwXTaOGdVpgAkrOhRAFYpVp5zMeqjTVbI= Received: by 10.204.20.143 with SMTP id f15mr527847bkb.49.1259082821024; Tue, 24 Nov 2009 09:13:41 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id b17sm7413782fka.46.2009.11.24.09.13.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 09:13:38 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Keith Packard , Jan Janak , Carl Worth In-Reply-To: References: <87639122sx.fsf@yoom.home.cworth.org> <87bpismx21.fsf@yoom.home.cworth.org> Date: Tue, 24 Nov 2009 18:14:11 +0100 Message-ID: <87zl6byhek.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] notmuch 'index' mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 17:13:43 -0000 On Tue, 24 Nov 2009 08:38:20 -0800, Keith Packard wrote: > A disadvantage I see is that you would not see this 'virtual tags' in > the list of tags on each message. Is it not cheap to check the current search results against the vtags (named searches) that you have defined. Then you can show them right up there with the real tags. Jed From jan@ryngle.com Tue Nov 24 09:51:22 2009 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 412BF431FBC for ; Tue, 24 Nov 2009 09:51:22 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 5DP3ygFiPSgi for ; Tue, 24 Nov 2009 09:51:18 -0800 (PST) Received: from mail-ew0-f220.google.com (mail-ew0-f220.google.com [209.85.219.220]) by olra.theworths.org (Postfix) with ESMTP id ABCA1431FAE for ; Tue, 24 Nov 2009 09:51:18 -0800 (PST) Received: by ewy20 with SMTP id 20so3194614ewy.0 for ; Tue, 24 Nov 2009 09:51:17 -0800 (PST) Received: by 10.213.23.80 with SMTP id q16mr5503093ebb.3.1259085077282; Tue, 24 Nov 2009 09:51:17 -0800 (PST) Received: from x61s.janakj ([213.192.30.141]) by mx.google.com with ESMTPS id 23sm2798515eya.35.2009.11.24.09.51.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 09:51:15 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id 8F718440651; Tue, 24 Nov 2009 18:51:03 +0100 (CET) Date: Tue, 24 Nov 2009 18:51:03 +0100 From: Jan Janak To: Keith Packard Message-ID: <20091124175103.GG7669@ryngle.com> References: <87639122sx.fsf@yoom.home.cworth.org> <87bpismx21.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] notmuch 'index' mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 17:51:22 -0000 On 24-11 08:38, Keith Packard wrote: > On Tue, 24 Nov 2009 13:14:07 +0100, Jan Janak wrote: > > > I like this. I think this is much cleaner than the "virtual tag" > > approach. > > A disadvantage I see is that you would not see this 'virtual tags' in > the list of tags on each message. Maybe I don't understand how virtual tags are really supposed to work. I thought that the term "virtual tags" is just another name for "named" search terms and it is named "virtual tags" because they can actually be attached to messages stored in the database. And if I remember it correctly, Carl said somewhere that virtual tags will be added/removed automatically to messages if the corresponding search term gets changed. If my understanding is correct, then we won't be able to show virtual tags along with "normal" tags anyway. We would probably need a separate list just for virtual tags. One of the reasons is that you can add and remove normal tags to messages manually, but you cannot easily do the same with virtual tags. If you remove a virtual tag from a message and then update the search term bound to that virtual tag, as soon as you change the search term, the virtual tag might be added to the message again if the new search expression still matches the message. Unlike real tags, the user won't be able to add and remove virtual tags to messages arbitrarily without the risk that notmuch changes the selection behind his back on the next update of the configuration file (assuming that the search expression is stored in the configuration file). We would probably need to make sure that the user knows which tags are virtual and which are real and that means notmuch would have to present them differently, possibly in a separate list. Thinking more about this, we could probably make it possible to add and remove virtual tags to messages manually by storing the information about what the user did with the virtual tag along with the message (i.e. this virtual tag is pinned to the message so don't remove it when the search term is changed). Maybe I just don't understand how virtual tags are really supposed to work, but it seems to me as a can of worms just waiting to be opened :-). -- Jan From five9a2@gmail.com Tue Nov 24 10:34:55 2009 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 C7753431FBC for ; Tue, 24 Nov 2009 10:34:55 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 vso6kOf9yguM for ; Tue, 24 Nov 2009 10:34:55 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id C450C431FAE for ; Tue, 24 Nov 2009 10:34:54 -0800 (PST) Received: by bwz24 with SMTP id 24so5235563bwz.30 for ; Tue, 24 Nov 2009 10:34:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer; bh=6NkH322v57aWLmiyxTjO9/1kX0t8Wq2zNS6vDTFr9QM=; b=L0Qr49GN17icR4PAFjnBaI7XlgGZZGjyLFbNij+vrjluRMjc4XxiV2uHu3+ZhN7tHE I6IAFHz3DCQPCIwGu7DBBaGTtm6ia2tjojW5IRt5oppPeogwXzMq9Ch6YdKWBpTxzD8z Sdi1cfZzWw2L+Ld1sP3UiBN15x/VP6DVyXY/Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=pkCcqP+Nk3Zps5tnL2zD2UePRmuUc3mM3LNs4fcfcj93fBw8k57iVPWSCY8y5zws27 kimGv23QYk1TsyDFjGbJC0YdrihaulWgrurWgiuQEC3doMvnRWNabgnRFMvfIBC9DIPL 2PuXcFtLB1MmyM+GxXUeQCf7J1/oCLBIxxtdc= Received: by 10.204.19.146 with SMTP id a18mr2417636bkb.135.1259087693650; Tue, 24 Nov 2009 10:34:53 -0800 (PST) Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id f31sm7557240fkf.12.2009.11.24.10.34.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 10:34:52 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 19:35:12 +0100 Message-Id: <1259087712-18844-1-git-send-email-jed@59A2.org> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] New function notmuch-show-kill-message-id, puts current message ID in the kill ring. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 18:34:55 -0000 This is useful any time you want to explicitly refer to the message, such as in the body of another message, through git format-patch, or on IRC. It is bound to "C-c i". Signed-off-by: Jed Brown --- notmuch.el | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/notmuch.el b/notmuch.el index fa6e7de..071ee5a 100644 --- a/notmuch.el +++ b/notmuch.el @@ -84,6 +84,7 @@ (define-key map "?" 'describe-mode) (define-key map (kbd "TAB") 'notmuch-show-next-button) (define-key map (kbd "M-TAB") 'notmuch-show-previous-button) + (define-key map (kbd "C-c i") 'notmuch-show-kill-ring-save-message-id) map) "Keymap for \"notmuch show\" buffers.") (fset 'notmuch-show-mode-map notmuch-show-mode-map) @@ -698,6 +699,17 @@ which this thread was originally shown." (force-window-update) (redisplay t)) +(defun notmuch-show-kill-ring-save-message-id () + "Put the current message id in the kill ring. + +This is useful for referencing messages or running external +queries." + (interactive) + (let ((message-id (notmuch-show-get-message-id))) + (kill-new message-id) + (when (called-interactively-p 'interactive) + (message "Saved message ID: \"%s\"" message-id)))) + ;;;###autoload (defun notmuch-show-mode () "Major mode for viewing a thread with notmuch. -- 1.6.5.3 From cworth@cworth.org Tue Nov 24 11:40:39 2009 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 C8346431FBF; Tue, 24 Nov 2009 11:40:39 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 8uFL1daMcD75; Tue, 24 Nov 2009 11:40:39 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id F013B431FAE; Tue, 24 Nov 2009 11:40:38 -0800 (PST) From: Carl Worth To: Alexander Botero-Lowry , notmuch@notmuchmail.org In-Reply-To: <1259048707-3062-1-git-send-email-alex.boterolowry@gmail.com> References: <1259048707-3062-1-git-send-email-alex.boterolowry@gmail.com> Date: Tue, 24 Nov 2009 11:40:24 -0800 Message-ID: <87aaybd847.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH 1/5] make headers locally expandable/collapsable X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 19:40:40 -0000 On Mon, 23 Nov 2009 23:45:03 -0800, Alexander Botero-Lowry wrote: > --- > notmuch.el | 18 +++++++++++++++--- > 1 files changed, 15 insertions(+), 3 deletions(-) Hmm... no real content for me to reply to here... :-) Anyway, this is really great stuff, Alexander. Thanks for coding it up! I've pushed it out now, (with a little bit more in the way of commit messages---thanks for humoring me). I noticed that I could open and re-collapse a message that notmuch initially presents as hidden, but I didn't seem to be able to collapse an initially-open message. Now, I'm sure that's due to broken-ness in code I wrote myself originally. But as a future-feature request, that might be some consistency that would be nice to have. -Carl From chris@chris-wilson.co.uk Tue Nov 24 11:41:28 2009 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 62DA8431FBF for ; Tue, 24 Nov 2009 11:41:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 G-fEI0kFy7Ja for ; Tue, 24 Nov 2009 11:41:27 -0800 (PST) Received: from fmsmga102.fm.intel.com (mga10.intel.com [192.55.52.92]) by olra.theworths.org (Postfix) with ESMTP id AA3C1431FBC for ; Tue, 24 Nov 2009 11:41:27 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 24 Nov 2009 11:37:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,280,1257148800"; d="scan'208";a="750047982" Received: from unknown (HELO localhost.localdomain) ([10.255.16.197]) by fmsmga001.fm.intel.com with ESMTP; 24 Nov 2009 11:47:50 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 19:41:20 +0000 Message-Id: <1259091680-29598-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] notmuch-new: Remove the tiresome joke from the output. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 19:41:28 -0000 As I see this every time I poll for new mail, the joke becomes very old very quickly. The other instances of "not much" are shown much less often and have a much more natural style, this one however feels forced, impairing the humorous effect. Signed-off-by: Chris "the critic" Wilson --- notmuch-new.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index e32b92a..3cde3a7 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -483,12 +483,10 @@ notmuch_new_command (void *ctx, int argc, char *argv[]) } } if (add_files_state.added_messages) { - printf ("Added %d new %s to the database (not much, really).\n", + printf ("Added %d new %s to the database.\n", add_files_state.added_messages, add_files_state.added_messages == 1 ? "message" : "messages"); - } else { - printf ("No new mail---and that's not much.\n"); } if (elapsed > 1 && ! add_files_state.saw_read_only_directory) { -- 1.6.5.3 From alex.boterolowry@gmail.com Tue Nov 24 11:49:41 2009 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 6B335431FBF for ; Tue, 24 Nov 2009 11:49:41 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 uuayMTQroLY6 for ; Tue, 24 Nov 2009 11:49:40 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 9617C431FBC for ; Tue, 24 Nov 2009 11:49:40 -0800 (PST) Received: by bwz24 with SMTP id 24so5308726bwz.30 for ; Tue, 24 Nov 2009 11:49:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=9L9htNH8ONOdlL7pm3JO89FoSwJS2TRMi+SEYPKhvmU=; b=sUrwUuJWr06JR2QJJ81e8gH8BTYpA87pcNubRFzgeqeWXwg3SmpPnn9tE2WOGfYEo+ N7FZ7AddHTWctXWLbw2k4t6PZOSMcQ725aLy7ReQ6/ioPV2qOWkE7AkJxm/RQ1+il8dh Yh7khmLqVAkrixgBw3zBCclmHa9DHUapjkVsw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-type; b=QBLq278ZL9Zbr+hOu7ch5MOmsTLe3KOkSkr9EOm95vdugP3FK9FNGIufxEj5Y94CKo Xw6U2zFHhB5/XgPoNQpEeP8IVIpGxNRuXVjQcQGqSIHX5UjVrEt8rig6EQTx69l31UoH pCiJ72/qxgqNOSxHoprc+zj/V8ustaoRik/CM= Received: by 10.204.150.77 with SMTP id x13mr6438667bkv.100.1259092179505; Tue, 24 Nov 2009 11:49:39 -0800 (PST) Received: from fortitudo (nat08.metaweb.com [208.68.111.135]) by mx.google.com with ESMTPS id 13sm1942376fxm.1.2009.11.24.11.49.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 11:49:38 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo.i-did-not-set--mail-host-address--so-tickle-me) id 70c5 by fortitudo (DragonFly Mail Agent) Tue, 24 Nov 2009 11:49:40 -0800 From: Alexander Botero-Lowry To: Carl Worth , notmuch@notmuchmail.org In-Reply-To: <87aaybd847.fsf@yoom.home.cworth.org> References: <1259048707-3062-1-git-send-email-alex.boterolowry@gmail.com> <87aaybd847.fsf@yoom.home.cworth.org> Date: Tue, 24 Nov 2009 11:49:40 -0800 Message-ID: <86aaybbt4b.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH 1/5] make headers locally expandable/collapsable X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 19:49:41 -0000 On Tue, 24 Nov 2009 11:40:24 -0800, Carl Worth wrote: [snip] > Anyway, this is really great stuff, Alexander. Thanks for coding it up! > Awesome thanks. Makes things much more useable anyway. :) > I've pushed it out now, (with a little bit more in the way of commit > messages---thanks for humoring me). > Ahh, come on, Lorem Ipsum was such a clear and detailed commit message. :D > I noticed that I could open and re-collapse a message that notmuch > initially presents as hidden, but I didn't seem to be able to collapse > an initially-open message. Now, I'm sure that's due to broken-ness in > code I wrote myself originally. But as a future-feature request, that > might be some consistency that would be nice to have. > Odd. I wouldn't be suprised were that behavior the case, but I can not reproduce it locally. I totally agree it should be the case, but I seem to be able to expand collapse already open messages without a problem.. alex From five9a2@gmail.com Tue Nov 24 12:22:10 2009 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 8B955431FBC for ; Tue, 24 Nov 2009 12:22:10 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 JPQ9yYHoV0Bm for ; Tue, 24 Nov 2009 12:22:10 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 36367431FAE for ; Tue, 24 Nov 2009 12:22:10 -0800 (PST) Received: by bwz24 with SMTP id 24so5337101bwz.30 for ; Tue, 24 Nov 2009 12:22:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=3xm/PgJm4QXOP+ATfLmYjGlTPlVqPBwbaOcXPAClmiA=; b=Zy2OV+nuiyik/9bUGxwdtkdz1HRkMvQTyRutecVJ8Fo1Cb7gXQbDkvcDytxDhqtXow 4c18XsUuP7iwCbaHPsZx2mgA0HRPoc4L3AMheOEV1SICwlNOzUWG1Bqu4FW9/TchnHD6 6iPyfy4X5EnPhbEjjfy/nRL28cxp1dSHKPxMg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=Gc9rS2IQEIJX6WdVE/Krh5WRXPCaZOdLs/R+8R5NeX3Rx+TTT7o/ATpl4L9KRB7K1k McnWOtoJgvffeCtTHhVCO2zjseOC0CNOp0/KxITRv6tzWEFiR/njljnmQ7pOE+C097/3 fSpTKIP4zxY4wN2q54vHdjpcqB8giuqv9V3xA= Received: by 10.204.2.196 with SMTP id 4mr3069078bkk.7.1259094128152; Tue, 24 Nov 2009 12:22:08 -0800 (PST) Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 21sm7650256fkx.25.2009.11.24.12.22.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 12:22:07 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 21:22:11 +0100 Message-Id: <1259094131-32405-1-git-send-email-jed@59A2.org> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: References: Subject: [notmuch] [PATCH] New function notmuch-show-kill-ring-save-message-id. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 20:22:10 -0000 Puts current message ID in the kill ring. This is useful any time you want to explicitly refer to the message, such as in the body of another message, through git format-patch, or on IRC. It is bound to "C-c i". Corrected spelling of function name in commit message, and updated to apply against HEAD after c1e16435cfe4471c3415d9f625f7230d59c8afb4 Signed-off-by: Jed Brown --- notmuch.el | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/notmuch.el b/notmuch.el index 907df2c..e3e0e06 100644 --- a/notmuch.el +++ b/notmuch.el @@ -80,6 +80,7 @@ (define-key map "?" 'describe-mode) (define-key map (kbd "TAB") 'notmuch-show-next-button) (define-key map (kbd "M-TAB") 'notmuch-show-previous-button) + (define-key map (kbd "C-c i") 'notmuch-show-kill-ring-save-message-id) map) "Keymap for \"notmuch show\" buffers.") (fset 'notmuch-show-mode-map notmuch-show-mode-map) @@ -663,6 +664,17 @@ which this thread was originally shown." (notmuch-show-markup-message))) (notmuch-show-hide-markers)) +(defun notmuch-show-kill-ring-save-message-id () + "Put the current message id in the kill ring. + +This is useful for referencing messages or running external +queries." + (interactive) + (let ((message-id (notmuch-show-get-message-id))) + (kill-new message-id) + (when (called-interactively-p 'interactive) + (message "Saved message ID: \"%s\"" message-id)))) + ;;;###autoload (defun notmuch-show-mode () "Major mode for viewing a thread with notmuch. -- 1.6.5.3 From five9a2@gmail.com Tue Nov 24 12:29:28 2009 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 05449431FAE for ; Tue, 24 Nov 2009 12:29:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 puzxUOm1Ryit for ; Tue, 24 Nov 2009 12:29:26 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 2EF56431FBC for ; Tue, 24 Nov 2009 12:29:26 -0800 (PST) Received: by bwz24 with SMTP id 24so5343011bwz.30 for ; Tue, 24 Nov 2009 12:29:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=dW1Gm7lbRMsP0ptDK3ZPLfAMRo1HD5yNX9LZcXFW+qo=; b=JPjKu7XJC5DPT1d+l4fmsuDKB9akbtc8TofST30f7ffTm+TKcw/HWIsg+b8VSEGTA9 sFDPW2++zGoeE+pSRMsAGambn0Q7UU4XIg2nkXPyOHLltUCWW61Ii3IJwIKofPkgKseO vAH7HvAAHTUGxTFXLK0Pjb29Q4Z6G5JGXZoPc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=RlR3LfI73bN5FhQX9q7QC+0x/z3St3UIJOd4b+YS+7pWYXJ7L4V4CeXWVL13n5yQ8B tVsv81oLlIf9Mdd5jC91+B3q+gaKcBVxZivtfS9gnAxgGzKOEkalrSM/CJHVuaJ1tEiL R8LjsZXh3/UG8qXGavpwbe1j8StFjv9NOFvU4= Received: by 10.204.25.150 with SMTP id z22mr1353118bkb.138.1259094565093; Tue, 24 Nov 2009 12:29:25 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 18sm7667927fkq.41.2009.11.24.12.29.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 12:29:23 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org In-Reply-To: <1259094131-32405-1-git-send-email-jed@59A2.org> References: <1259094131-32405-1-git-send-email-jed@59A2.org> <1259087712-18844-1-git-send-email-jed@59A2.org> Date: Tue, 24 Nov 2009 21:29:56 +0100 Message-ID: <87my2bfyyj.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] New function notmuch-show-kill-ring-save-message-id. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 20:29:28 -0000 It turns out that this ID has id: prefixed (which I thought was fine because I'm frequently doing another query with it). But git send-email doesn't strip that, so this was not threaded correctly. Would this be better with the id: prefix stripped? Jed From jan@ryngle.com Tue Nov 24 14:10:34 2009 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 76E47431FC2 for ; Tue, 24 Nov 2009 14:10:34 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 2z7sO9jMDB2b for ; Tue, 24 Nov 2009 14:10:34 -0800 (PST) Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com [209.85.220.214]) by olra.theworths.org (Postfix) with ESMTP id E5B08431FBC for ; Tue, 24 Nov 2009 14:10:33 -0800 (PST) Received: by fxm6 with SMTP id 6so7397324fxm.0 for ; Tue, 24 Nov 2009 14:10:33 -0800 (PST) Received: by 10.102.181.16 with SMTP id d16mr290156muf.120.1259100633217; Tue, 24 Nov 2009 14:10:33 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id s10sm20059762mue.21.2009.11.24.14.10.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 14:10:32 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id A5E4D440656; Tue, 24 Nov 2009 23:10:30 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 23:10:27 +0100 Message-Id: <1259100630-13673-2-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1259100630-13673-1-git-send-email-jan@ryngle.com> References: <1259100630-13673-1-git-send-email-jan@ryngle.com> Subject: [notmuch] [PATCH 1/4] notmuch-new: Remove tag_add_inbox_unread in favor of a generic solution. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 22:10:34 -0000 Instead of adding 'inbox' and 'unread' tags directly in the code of 'notmuch-new', we can specify a list of tags to be added to newly created messages with a configuration file option or a command line option. That's more flexible, it allows the user to select which tags should be added. Signed-off-by: Jan Janak --- notmuch-new.c | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index e32b92a..9970407 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -41,13 +41,6 @@ handle_sigint (unused (int sig)) } static void -tag_inbox_and_unread (notmuch_message_t *message) -{ - notmuch_message_add_tag (message, "inbox"); - notmuch_message_add_tag (message, "unread"); -} - -static void add_files_print_progress (add_files_state_t *state) { struct timeval tv_now; @@ -198,7 +191,6 @@ add_files_recursive (notmuch_database_t *notmuch, /* success */ case NOTMUCH_STATUS_SUCCESS: state->added_messages++; - tag_inbox_and_unread (message); break; /* Non-fatal issues (go on to next file) */ case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: -- 1.6.3.3 From jan@ryngle.com Tue Nov 24 14:10:35 2009 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 F165B431FC3 for ; Tue, 24 Nov 2009 14:10:34 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 zap7gjCqN2Lq for ; Tue, 24 Nov 2009 14:10:34 -0800 (PST) Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com [209.85.220.214]) by olra.theworths.org (Postfix) with ESMTP id E631A431FBF for ; Tue, 24 Nov 2009 14:10:33 -0800 (PST) Received: by fxm6 with SMTP id 6so7397321fxm.0 for ; Tue, 24 Nov 2009 14:10:33 -0800 (PST) Received: by 10.103.81.12 with SMTP id i12mr3003622mul.37.1259100633033; Tue, 24 Nov 2009 14:10:33 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id 23sm740146mun.41.2009.11.24.14.10.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 14:10:32 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id AB8E4440657; Tue, 24 Nov 2009 23:10:30 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 23:10:28 +0100 Message-Id: <1259100630-13673-3-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1259100630-13673-2-git-send-email-jan@ryngle.com> References: <1259100630-13673-1-git-send-email-jan@ryngle.com> <1259100630-13673-2-git-send-email-jan@ryngle.com> Subject: [notmuch] [PATCH 2/4] notmuch: Config option to specify tags to be applied by 'notmuch new'. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 22:10:35 -0000 Add support for section [new] in the configuration file. This section is supposed to contain options for 'notmuch new'. Currently there is only one option called tags. The tags option can be used to configure a set of tags to be applied by 'notmuch new'. Individual tags are separated by semicolon. 'notmuch new' is modified not to apply 'inbox' and 'unread' by default, but instead it obtains the set of tags to be applied from the new configuration file option. Signed-off-by: Jan Janak --- notmuch-client.h | 3 +++ notmuch-config.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ notmuch-new.c | 19 ++++++++++++++++++- 3 files changed, 65 insertions(+), 1 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index c04eaeb..0fb9c19 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -184,6 +184,9 @@ notmuch_config_set_user_other_email (notmuch_config_t *config, const char *other_email[], size_t length); +char ** +notmuch_config_get_new_tags (notmuch_config_t *config, size_t *length); + notmuch_bool_t debugger_is_active (void); diff --git a/notmuch-config.c b/notmuch-config.c index fc65d6b..7f62a80 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -22,6 +22,7 @@ #include #include +#include static const char toplevel_config_comment[] = " .notmuch-config - Configuration file for the notmuch mail system\n" @@ -62,6 +63,9 @@ struct _notmuch_config { char *user_primary_email; char **user_other_email; size_t user_other_email_length; + + char **new_tags; + size_t new_tags_length; }; static int @@ -199,6 +203,8 @@ notmuch_config_open (void *ctx, config->user_primary_email = NULL; config->user_other_email = NULL; config->user_other_email_length = 0; + config->new_tags = NULL; + config->new_tags_length = 0; if (! g_key_file_load_from_file (config->key_file, config->filename, @@ -450,3 +456,41 @@ notmuch_config_set_user_other_email (notmuch_config_t *config, talloc_free (config->user_other_email); config->user_other_email = NULL; } + +char ** +notmuch_config_get_new_tags (notmuch_config_t *config, size_t *length) +{ + char **tags; + size_t len; + unsigned int i; + char *start, *end; + + if (config->new_tags == NULL) { + config->new_tags_length = 0; + tags = g_key_file_get_string_list (config->key_file, "new", "tags", + &len, NULL); + + if (tags) { + config->new_tags = talloc_size (config, sizeof(char*) * + (len + 1)); + for (i = 0; i < len; i++) { + /* Remove leading and trailing white space around the tag and + * filter out empty tags. */ + start = tags[i]; + end = start + strlen (start) - 1; + while (isspace (*start)) start++; + while (end > start && isspace (*end)) end--; + if (end >= start) { + config->new_tags[config->new_tags_length++] = + talloc_strndup (config->new_tags, start, + end - start + 1); + } + } + config->new_tags[config->new_tags_length] = NULL; + g_strfreev (tags); + } + } + + *length = config->new_tags_length; + return config->new_tags; +} diff --git a/notmuch-new.c b/notmuch-new.c index 9970407..10745e8 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -24,6 +24,8 @@ static volatile sig_atomic_t do_add_files_print_progress = 0; +static notmuch_config_t *config = NULL; + static void handle_sigalrm (unused (int signal)) { @@ -68,6 +70,21 @@ add_files_print_progress (add_files_state_t *state) fflush (stdout); } +static void +apply_tags (notmuch_message_t *message) +{ + char** tags; + unsigned int count, i; + + if ((tags = notmuch_config_get_new_tags (config, &count)) == NULL) + return; + + for (i = 0; i < count; i++) { + if (tags[i]) + notmuch_message_add_tag (message, tags[i]); + } +} + static int ino_cmp(const struct dirent **a, const struct dirent **b) { return ((*a)->d_ino < (*b)->d_ino) ? -1 : 1; @@ -191,6 +208,7 @@ add_files_recursive (notmuch_database_t *notmuch, /* success */ case NOTMUCH_STATUS_SUCCESS: state->added_messages++; + apply_tags (message); break; /* Non-fatal issues (go on to next file) */ case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: @@ -388,7 +406,6 @@ count_files (const char *path, int *count) int notmuch_new_command (void *ctx, int argc, char *argv[]) { - notmuch_config_t *config; notmuch_database_t *notmuch; add_files_state_t add_files_state; double elapsed; -- 1.6.3.3 From jan@ryngle.com Tue Nov 24 14:10:35 2009 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 6D3D7431FBF for ; Tue, 24 Nov 2009 14:10:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 pMATWfm5RZ+h for ; Tue, 24 Nov 2009 14:10:35 -0800 (PST) Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com [209.85.220.214]) by olra.theworths.org (Postfix) with ESMTP id 35FB2431FC0 for ; Tue, 24 Nov 2009 14:10:34 -0800 (PST) Received: by mail-fx0-f214.google.com with SMTP id 6so7397311fxm.0 for ; Tue, 24 Nov 2009 14:10:34 -0800 (PST) Received: by 10.102.165.24 with SMTP id n24mr3020096mue.47.1259100633651; Tue, 24 Nov 2009 14:10:33 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id b9sm3192794mug.9.2009.11.24.14.10.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 14:10:32 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id BDB8044065A; Tue, 24 Nov 2009 23:10:30 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 23:10:30 +0100 Message-Id: <1259100630-13673-5-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1259100630-13673-4-git-send-email-jan@ryngle.com> References: <1259100630-13673-1-git-send-email-jan@ryngle.com> <1259100630-13673-2-git-send-email-jan@ryngle.com> <1259100630-13673-3-git-send-email-jan@ryngle.com> <1259100630-13673-4-git-send-email-jan@ryngle.com> Subject: [notmuch] [PATCH 4/4] notmuch-new: New cmdline option --tag=. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 22:10:35 -0000 The list of tags to be applied by 'notmuch new' can be configured in the configuration file. This command line option can be used to override the list of tags from the coonfiguration file on the command line. You may repeat the option several times if you want to apply more than one tag: notmuch new --tag=apple --tag=orange This is useful, for example, if you have an archive of messages you would like to add to the database with a special tag so that they can be easily identified later. To do that, you could simply copy the files from the archive to the database directory and then index them all with: notmuch new --tag=prehistory Tags to be applied every time 'notmuch new' is run can be specified in the configuration file. One-time tags for individual runs can be specified on the command line with this new option. Signed-off-by: Jan Janak --- notmuch-new.c | 40 ++++++++++++++++++++++++++++++++++------ notmuch.c | 8 +++++++- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 10745e8..94036da 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -26,6 +26,9 @@ static volatile sig_atomic_t do_add_files_print_progress = 0; static notmuch_config_t *config = NULL; +static char **cmdline_tags = NULL; +static unsigned int cmdline_tags_count = 0; + static void handle_sigalrm (unused (int signal)) { @@ -76,12 +79,19 @@ apply_tags (notmuch_message_t *message) char** tags; unsigned int count, i; - if ((tags = notmuch_config_get_new_tags (config, &count)) == NULL) - return; + if (cmdline_tags_count) { + for (i = 0; i < cmdline_tags_count; i++) { + if (cmdline_tags[i]) + notmuch_message_add_tag (message, cmdline_tags[i]); + } + } else { + if ((tags = notmuch_config_get_new_tags (config, &count)) == NULL) + return; - for (i = 0; i < count; i++) { - if (tags[i]) - notmuch_message_add_tag (message, tags[i]); + for (i = 0; i < count; i++) { + if (tags[i]) + notmuch_message_add_tag (message, tags[i]); + } } } @@ -413,7 +423,8 @@ notmuch_new_command (void *ctx, int argc, char *argv[]) int ret = 0; struct stat st; const char *db_path; - char *dot_notmuch_path; + char *dot_notmuch_path, *opt; + char **tmp; struct sigaction action; int i; @@ -423,6 +434,23 @@ notmuch_new_command (void *ctx, int argc, char *argv[]) for (i = 0; i < argc && argv[i][0] == '-'; i++) { if (STRNCMP_LITERAL (argv[i], "--verbose") == 0) { add_files_state.verbose = 1; + } else if (STRNCMP_LITERAL (argv[i], "--tag=") == 0) { + opt = argv[i] + sizeof ("--tag=") - 1; + /* FIXME: We should check for leading and trailing white-space in + * option value here and remove it. + */ + if (*opt == '\0') { + fprintf (stderr, "Option value missing: %s\n", argv[i]); + return 1; + } + tmp = talloc_realloc (ctx, cmdline_tags, char*, + cmdline_tags_count + 1); + if (tmp == NULL) { + fprintf (stderr, "Notmuch ran out of memory.\n"); + return 1; + } + tmp[cmdline_tags_count++] = opt; + cmdline_tags = tmp; } else { fprintf (stderr, "Unrecognized option: %s\n", argv[i]); return 1; diff --git a/notmuch.c b/notmuch.c index b84e284..fb0c2a7 100644 --- a/notmuch.c +++ b/notmuch.c @@ -123,7 +123,7 @@ command_t commands[] = { "\t\tInvoking notmuch with no command argument will run setup if\n" "\t\tthe setup command has not previously been completed." }, { "new", notmuch_new_command, - "[--verbose]", + "[--verbose] [--tag=]", "\t\tFind and import new messages to the notmuch database.", "\t\tScans all sub-directories of the mail directory, performing\n" "\t\tfull-text indexing on new messages that are found. Each new\n" @@ -145,6 +145,12 @@ command_t commands[] = { "\t\t\tVerbose operation. Shows paths of message files as\n" "\t\t\tthey are being indexed.\n" "\n" + "\t\t--tag=\n" + "\n" + "\t\t\tAdd the tag to all messages newly added to the\n" + "\t\t\tdatabase. You may repeat this option several times if\n" + "\t\t\tyou want to add more tags.\n" + "\n" "\t\tNote: \"notmuch new\" runs (other than the first run) will\n" "\t\tskip any read-only directories, so you can use that to mark\n" "\t\tdirectories that will not receive any new mail (and make\n" -- 1.6.3.3 From jan@ryngle.com Tue Nov 24 14:10:36 2009 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 3033B431FBF for ; Tue, 24 Nov 2009 14:10:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 E1nKBnS1gPu7 for ; Tue, 24 Nov 2009 14:10:33 -0800 (PST) Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com [209.85.220.214]) by olra.theworths.org (Postfix) with ESMTP id A97F1431FAE for ; Tue, 24 Nov 2009 14:10:33 -0800 (PST) Received: by fxm6 with SMTP id 6so7397311fxm.0 for ; Tue, 24 Nov 2009 14:10:32 -0800 (PST) Received: by 10.102.14.4 with SMTP id 4mr3091420mun.2.1259100632770; Tue, 24 Nov 2009 14:10:32 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id 14sm109259muo.34.2009.11.24.14.10.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 14:10:31 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id 9A4B0440651; Tue, 24 Nov 2009 23:10:30 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 23:10:26 +0100 Message-Id: <1259100630-13673-1-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH 0/4] Make tags applied by 'notmuch new' configurable. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 22:10:36 -0000 I would like to propose that we make the list of tags applied by 'notmuch new' configurable. Right now notmuch applies two tags to all new messages added to the database, 'inbox' and 'unread'. The two tags are added by the C code in notmuch-new.c and they cannot be changed without editing the source file and recompiling notmuch. The four patches that follow this email allow for configuring the tags to be added by 'notmuch new' either in the configuration file or on the command line. This change was motivated by my desire to remove both tags from newly added messages. My rules for adding these two tags are more complex and I do it in a script run after 'notmuch new'. Instead of 'inbox' and 'unread', I configure 'notmuch new' to add a new tag called 'new' (and only that one). This tag marks newly added messages that haven't been properly tagged yet by my auto-tagging scripts. The last script I run after 'notmuch new' removes that tag. My auto-tagging scripts process only messages with the tag 'new'. On a side note; It may seem logical to add/omit the tag 'unread' directly in 'notmuch new' based on the Maildir flags extracted from the filename of the message. I suggest that we don't do that in 'notmuch new'. A better way would be writing a small script or command that can be run *after* 'notmuch new'. We could then distribute it with notmuch (maybe with other small tagging scripts for common situations). I think Maildir flags should be processed after 'notmuch new' is because if there are multiple copies of a message with different flags, we may need to see all flags from all filenames to set corresponding tags properly and we may also need to take the directory part into consideration (i.e. the new mail is in 'new', not 'cur'). The list of tags to be applied by notmuch can be configured in the configuration file. There is a new section [new] which contains configuration options for 'notmuch new'. There is only one option called 'tags'. The option contains a semicolon separated list of tags: [new] tags=inbox;unread # Emulate the original behavior One of the patches updates 'notmuch setup' to create the section and add the tags option with tags 'inbox' and 'unread', but only if a new configuration file is being created. If the configuration file already exists then it just copies the contents from the old configuration file to the new one. We do not ask the user for the list of tags in the interactive part, that would have been too much. Users can edit the configuration file manually if they want to change the list of tags. If they create a new configuration file then they probably want to accept the default anyway. There is one catch for users who already have a configuration file and start using the patches. They will need to add the new section and the tags option manually if they want to preserve current behavior of applying 'inbox' and 'unread' automatically by 'notmuch new'. The last patch in the set adds a new command line option to 'notmuch new'. The name of the option is --tag and it can be used to override any tags configured in the configuration file. For example: notmuch new --tag=outbox --tag=read adds the tags 'outbox' and 'read' and ignores any tags from the configuration file. Comments and opinions are welcome! -- Jan From jan@ryngle.com Tue Nov 24 14:10:36 2009 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 568A6431FAE for ; Tue, 24 Nov 2009 14:10:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Amkgx8SNvhKo for ; Tue, 24 Nov 2009 14:10:35 -0800 (PST) Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com [209.85.220.214]) by olra.theworths.org (Postfix) with ESMTP id A4BA7431FBC for ; Tue, 24 Nov 2009 14:10:34 -0800 (PST) Received: by fxm6 with SMTP id 6so7397332fxm.0 for ; Tue, 24 Nov 2009 14:10:33 -0800 (PST) Received: by 10.103.125.23 with SMTP id c23mr2961077mun.41.1259100633482; Tue, 24 Nov 2009 14:10:33 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id 23sm740148mun.41.2009.11.24.14.10.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 14:10:32 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id B8CF7440659; Tue, 24 Nov 2009 23:10:30 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 23:10:29 +0100 Message-Id: <1259100630-13673-4-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1259100630-13673-3-git-send-email-jan@ryngle.com> References: <1259100630-13673-1-git-send-email-jan@ryngle.com> <1259100630-13673-2-git-send-email-jan@ryngle.com> <1259100630-13673-3-git-send-email-jan@ryngle.com> Subject: [notmuch] [PATCH 3/4] notmuch-setup: Copy/create the new section with tags for 'notmuch-new'. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 22:10:36 -0000 If the user runs 'notmuch setup' and there is no configuration file yet then we also add the new section [new] to the configuration file and set the tags option as: tags=inbox;unread This will be picked up by 'notmuch new' and all new mail added to the database will be tagged with the two tags as before. If the user already has a configuration file and runs 'notmuch setup' then we just copy whatever tags we find in the old configuration file to the new one. If there are no tags in the old configuration file then we assume that the user configured notmuch that way and the new config file would also have no tags in the section [new]. We never ask the user interactively for the list of tags to be used by 'notmuch new', it is assumed that beginners would want to stick to the defaults and advanced users can edit the configuration manually. Signed-off-by: Jan Janak --- notmuch-client.h | 4 ++++ notmuch-config.c | 40 ++++++++++++++++++++++++++++++++++++++++ notmuch-setup.c | 14 ++++++++++++++ 3 files changed, 58 insertions(+), 0 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index 0fb9c19..bb7d3d4 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -187,6 +187,10 @@ notmuch_config_set_user_other_email (notmuch_config_t *config, char ** notmuch_config_get_new_tags (notmuch_config_t *config, size_t *length); +void +notmuch_config_set_new_tags (notmuch_config_t *config, const char *tags[], + size_t length); + notmuch_bool_t debugger_is_active (void); diff --git a/notmuch-config.c b/notmuch-config.c index 7f62a80..e884621 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -54,6 +54,16 @@ static const char user_config_comment[] = " recipient list of replies, and will set the From address based on the\n" " address to which the original email was addressed.\n"; +static const char new_config_comment[] = + " Configuration section for 'notmuch new'\n" + "\n" + " The only supported value at the moment is 'tags. This option contains a\n" + " list of tags (separated by ';') that should be automatically applied to\n" + " newly added messages.\n" + "\n" + " Note that 'notmuch new' also has a command line option which can be used\n" + " to add additional tags to the ones configured here.\n"; + struct _notmuch_config { char *filename; GKeyFile *key_file; @@ -174,6 +184,7 @@ notmuch_config_open (void *ctx, GError *error = NULL; int is_new = 0; char *notmuch_config_env = NULL; + const char* def_new_tags[2] = {"inbox", "unread"}; if (is_new_ret) *is_new_ret = 0; @@ -270,6 +281,20 @@ notmuch_config_open (void *ctx, } } + /* If we have no configuration file then we configure "inbox" and "unread" + * tags by default for 'notmuch new'. This ensures that the Emacs mode + * would still work as expected. + * + * We do not ask the user for tags to be used by 'notmuch new'. That's too + * much detail for beginners and others can edit the configuration file by + * hand. + */ + if (is_new) { + notmuch_config_set_new_tags (config, def_new_tags, + sizeof(def_new_tags) / + sizeof(const char*)); + } + /* When we create a new configuration file here, we add some * comments to help the user understand what can be done. */ if (is_new) { @@ -279,6 +304,8 @@ notmuch_config_open (void *ctx, database_config_comment, NULL); g_key_file_set_comment (config->key_file, "user", NULL, user_config_comment, NULL); + g_key_file_set_comment (config->key_file, "new", NULL, + new_config_comment, NULL); } if (is_new_ret) @@ -494,3 +521,16 @@ notmuch_config_get_new_tags (notmuch_config_t *config, size_t *length) *length = config->new_tags_length; return config->new_tags; } + +void +notmuch_config_set_new_tags (notmuch_config_t *config, + const char *tags[], + size_t length) +{ + g_key_file_set_string_list (config->key_file, + "new", "tags", + tags, length); + + talloc_free (config->new_tags); + config->user_other_email = NULL; +} diff --git a/notmuch-setup.c b/notmuch-setup.c index d06fbf8..c1406db 100644 --- a/notmuch-setup.c +++ b/notmuch-setup.c @@ -96,6 +96,8 @@ notmuch_setup_command (unused (void *ctx), notmuch_config_t *config; char **old_other_emails; size_t old_other_emails_len; + char **new_tags; + unsigned int new_tags_len; GPtrArray *other_emails; unsigned int i; int is_new; @@ -147,6 +149,18 @@ notmuch_setup_command (unused (void *ctx), other_emails->len); g_ptr_array_free (other_emails, TRUE); + /* If we already have a configuration file then we preserve the tags + * configured there. If the original configuration file contains no tags + * then we assume that the user configured it that way and add no tags. + */ + if (!is_new) { + new_tags = notmuch_config_get_new_tags (config, &new_tags_len); + if (new_tags) { + notmuch_config_set_new_tags (config, (const char**)new_tags, + new_tags_len); + } + } + prompt ("Top-level directory of your email archive [%s]: ", notmuch_config_get_database_path (config)); if (strlen (response)) { -- 1.6.3.3 From brett.viren@gmail.com Tue Nov 24 14:50:18 2009 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 59E48431FBC for ; Tue, 24 Nov 2009 14:50:18 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 22AVrhAsjDhK for ; Tue, 24 Nov 2009 14:50:17 -0800 (PST) Received: from mail-pz0-f197.google.com (mail-pz0-f197.google.com [209.85.222.197]) by olra.theworths.org (Postfix) with ESMTP id B3681431FAE for ; Tue, 24 Nov 2009 14:50:17 -0800 (PST) Received: by pzk35 with SMTP id 35so5185785pzk.22 for ; Tue, 24 Nov 2009 14:50:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=IOo6sGJR1ZoP+RnZwoxoZo1tfovglXm1WJDT53HLm7k=; b=XtlozQ6voOL48llR77HL2BhnVjzBw/qV9JOyUNVtEhb/xDNoI89+V5eXEwYaYZSbVg HanYcL8h8s+bIQVg1/eAlA3TjvEY7S4QC5cdgYcW8LXbfxYFeAzeomB6zJwGkRmbGI1i slFYY3fMAWylunNFvmL4ethzese9rCy4pg5X8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=s6oHPiF/c7COBRDzfaK05j8d2jIhS183XusjI5msb9GMbVsmh5pRljMWo9LRKDPGjI LJwQZ+d3ZN67pmOKDlZdjBAQ1N6TA4PMQaCkIEIo0Sjq8qrWVKNPwccC+qEVldNbb4bA hrxkhfG4R/Pp6n9F5sRi1HGtKlfvZIe6YevbM= MIME-Version: 1.0 Received: by 10.114.248.20 with SMTP id v20mr126594wah.132.1259103014540; Tue, 24 Nov 2009 14:50:14 -0800 (PST) In-Reply-To: <1259100630-13673-1-git-send-email-jan@ryngle.com> References: <1259100630-13673-1-git-send-email-jan@ryngle.com> Date: Tue, 24 Nov 2009 17:50:14 -0500 Message-ID: <46263c600911241450q11e5c2bev4762ee449fd3e28a@mail.gmail.com> From: Brett Viren To: Jan Janak Content-Type: text/plain; charset=ISO-8859-1 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 0/4] Make tags applied by 'notmuch new' configurable. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 22:50:18 -0000 On Tue, Nov 24, 2009 at 5:10 PM, Jan Janak wrote: > I would like to propose that we make the list of tags applied by 'notmuch new' > configurable. Right now notmuch applies two tags to all new messages added to > the database, 'inbox' and 'unread'. The two tags are added by the C code in > notmuch-new.c and they cannot be changed without editing the source file and > recompiling notmuch. Personally I would like this. I can't find myself leaving GNUS and so am using notmuch as "just" a search engine. Now I manually remove "inbox" and "unread" after each "new" since they just clutter up an inbox I never read. Cheers, -Brett. From bart@jukie.net Tue Nov 24 15:40:43 2009 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 B2B5B431FBC for ; Tue, 24 Nov 2009 15:40:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 s9oz7uBvOF+L for ; Tue, 24 Nov 2009 15:40:41 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 6166A431FAE for ; Tue, 24 Nov 2009 15:40:41 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id 9647FC00F85; Tue, 24 Nov 2009 18:40:40 -0500 (EST) Date: Tue, 24 Nov 2009 18:40:40 -0500 From: Bart Trojanowski To: Keith Packard Message-ID: <20091124234040.GB29312@jukie.net> References: <87639122sx.fsf@yoom.home.cworth.org> <87bpismx21.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] notmuch 'index' mode. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 24 Nov 2009 23:40:43 -0000 * Keith Packard [091124 11:38]: > A disadvantage I see is that you would not see this 'virtual tags' in > the list of tags on each message. And, we'd have to put the virtual tags > in the .config file or the command line would become a lot less > useful. Speaking of which, we should put the folders in the .config file > in any case, and provide command line syntax to use them. I too would vote for this approach. I'd like to keep as much smarts in the notmuch executable as it would mean less to port to other (non emacs) interfaces. -Bart -- WebSig: http://www.jukie.net/~bart/sig/ From five9a2@gmail.com Tue Nov 24 17:35:06 2009 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 A2D61431FAE for ; Tue, 24 Nov 2009 17:35:06 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 U9tzdOBnZ29E for ; Tue, 24 Nov 2009 17:35:05 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 18871431FBC for ; Tue, 24 Nov 2009 17:35:04 -0800 (PST) Received: by bwz24 with SMTP id 24so5514914bwz.30 for ; Tue, 24 Nov 2009 17:35:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer; bh=N1VoJ/jHpaLnoKkf/tItg8yQIA53uMVqxpyomM0TrUI=; b=p0R6bVjmp26v4UVbF3tjNFz1WpRmqO+eWSJk7vHpq4SqDfwLMk/e2+BlIQQQUBI7of HO/vxkYu4kVytuATsyDtflF+XJsDDa6dw6XksNfniy90dDkfs3YoVn8fh4ezFwNvFUsS ZPZS1vpqsq4e1koaAPsQjhu+eSHZFw1fccV9Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=qtZasYVcYzQ05wug3MfifZHAmdNOqE0l+t0njwVyeFfIZ0Vqk2AYuoOZ/ZQQ3JZWoi v765D+QJnQRU44BnLRbzKZiHqOXPWcgOLBL2floKa1nElJpA1UT42V+f7/rMNupJOGZE i/gQEbJ38HgfqyFrAspdxMhuYoqNnkg9JKs9s= Received: by 10.204.8.151 with SMTP id h23mr6783099bkh.194.1259112904033; Tue, 24 Nov 2009 17:35:04 -0800 (PST) Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 35sm7911394fkt.40.2009.11.24.17.35.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 17:35:03 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org Date: Wed, 25 Nov 2009 02:35:12 +0100 Message-Id: <1259112914-19806-1-git-send-email-jed@59A2.org> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] Notmuch-side support for git send-email --notmuch id: X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 01:35:06 -0000 These two patches provide support for features like the one in the subject line. Along with these two patches, I have one for git format-patch (which I will submit upstream soon) that uses the output from notmuch reply --format=headers-only to build a reply with proper referencing, To, and Cc fields. Since options for git send-email are passed to git format-patch, git send-email --notmuch id: is a substitute for git send-email --in-reply-to --to --cc --add-header 'References: ...' From five9a2@gmail.com Tue Nov 24 17:35:12 2009 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 B45A5431FBC for ; Tue, 24 Nov 2009 17:35:12 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 ypHYMU4q4yqe for ; Tue, 24 Nov 2009 17:35:12 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id D0FE0431FC2 for ; Tue, 24 Nov 2009 17:35:11 -0800 (PST) Received: by mail-bw0-f224.google.com with SMTP id 24so5514914bwz.30 for ; Tue, 24 Nov 2009 17:35:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=ZwuYLICj5WOi56vRA5vpD22zPJ0OU2fik+/HhvuZnX4=; b=lD2s99vp6nNo1oVlz01oHKRPq9VUpp8xE23ATFlRuSY/AtJKhowdXKxcx1nX07xeiC 4lwvS5/09ZDnCyBO5Tm4JZGOppPKI4lX2HF1f0F1ijkwIn5RQ3T644cngmeUxPmcpRJM qo8R4B249jvqHnZks5cdpCQpykQadlrex+0CA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=bRIDD2dDu2cXUtH8Auvria0nF4Y7jFpPeuQLdwZ7/oNSsT4FE0lVef9zCg9UfErRRf irsZIH0zginzx1GJM7WVczvxyOcH375/1tYlkFCU1/YZDRewm2JKLcdl/tFLieEACz9w kPpjaTHUTTlk2JW5yXJbtJAHBKcrGqE1WZ92A= Received: by 10.204.10.8 with SMTP id n8mr6923194bkn.48.1259112911049; Tue, 24 Nov 2009 17:35:11 -0800 (PST) Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 35sm7911394fkt.40.2009.11.24.17.35.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 17:35:10 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org Date: Wed, 25 Nov 2009 02:35:13 +0100 Message-Id: <1259112914-19806-2-git-send-email-jed@59A2.org> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1259112914-19806-1-git-send-email-jed@59A2.org> References: <1259112914-19806-1-git-send-email-jed@59A2.org> Subject: [notmuch] [PATCH 1/2] notmuch-reply.c: accept the --format=default default option. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 01:35:12 -0000 This factors actual generation of the reply out of notmuch_reply_command into notmuch_reply_format_default(), in preparation for other --format= options. Signed-off-by: Jed Brown --- notmuch-reply.c | 121 +++++++++++++++++++++++++++++++++++------------------- 1 files changed, 78 insertions(+), 43 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index 65bd356..17eb38d 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -23,6 +23,17 @@ #include "notmuch-client.h" #include "gmime-filter-reply.h" +static const struct { + const char *header; + const char *fallback; + GMimeRecipientType recipient_type; +} reply_to_map[] = { + { "reply-to", "from", GMIME_RECIPIENT_TYPE_TO }, + { "to", NULL, GMIME_RECIPIENT_TYPE_TO }, + { "cc", NULL, GMIME_RECIPIENT_TYPE_CC }, + { "bcc", NULL, GMIME_RECIPIENT_TYPE_BCC } +}; + static void reply_part_content (GMimeObject *part) { @@ -182,58 +193,17 @@ add_recipients_for_string (GMimeMessage *message, return add_recipients_for_address_list (message, config, type, list); } -int -notmuch_reply_command (void *ctx, int argc, char *argv[]) +static int +notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_t *query) { - notmuch_config_t *config; - notmuch_database_t *notmuch; - notmuch_query_t *query; GMimeMessage *reply; - char *query_string; notmuch_messages_t *messages; notmuch_message_t *message; - int ret = 0; const char *subject, *recipients, *from_addr = NULL; const char *in_reply_to, *orig_references, *references; char *reply_headers; - struct { - const char *header; - const char *fallback; - GMimeRecipientType recipient_type; - } reply_to_map[] = { - { "reply-to", "from", GMIME_RECIPIENT_TYPE_TO }, - { "to", NULL, GMIME_RECIPIENT_TYPE_TO }, - { "cc", NULL, GMIME_RECIPIENT_TYPE_CC }, - { "bcc", NULL, GMIME_RECIPIENT_TYPE_BCC } - }; unsigned int i; - config = notmuch_config_open (ctx, NULL, NULL); - if (config == NULL) - return 1; - - query_string = query_string_from_args (ctx, argc, argv); - if (query_string == NULL) { - fprintf (stderr, "Out of memory\n"); - return 1; - } - - if (*query_string == '\0') { - fprintf (stderr, "Error: notmuch reply requires at least one search term.\n"); - return 1; - } - - notmuch = notmuch_database_open (notmuch_config_get_database_path (config), - NOTMUCH_DATABASE_MODE_READ_ONLY); - if (notmuch == NULL) - return 1; - - query = notmuch_query_create (notmuch, query_string); - if (query == NULL) { - fprintf (stderr, "Out of memory\n"); - return 1; - } - for (messages = notmuch_query_search_messages (query); notmuch_messages_has_more (messages); notmuch_messages_advance (messages)) @@ -310,6 +280,71 @@ notmuch_reply_command (void *ctx, int argc, char *argv[]) notmuch_message_destroy (message); } + return 0; +} + +int +notmuch_reply_command (void *ctx, int argc, char *argv[]) +{ + notmuch_config_t *config; + notmuch_database_t *notmuch; + notmuch_query_t *query; + char *opt, *query_string; + int i, ret = 0; + int (*reply_format_func)(void *ctx, notmuch_config_t *config, notmuch_query_t *query); + + reply_format_func = notmuch_reply_format_default; + + for (i = 0; i < argc && argv[i][0] == '-'; i++) { + if (strcmp (argv[i], "--") == 0) { + i++; + break; + } + if (STRNCMP_LITERAL (argv[i], "--format=") == 0) { + opt = argv[i] + sizeof ("--format=") - 1; + if (strcmp (opt, "default") == 0) { + reply_format_func = notmuch_reply_format_default; + } else { + fprintf (stderr, "Invalid value for --format: %s\n", opt); + return 1; + } + } else { + fprintf (stderr, "Unrecognized option: %s\n", argv[i]); + return 1; + } + } + + argc -= i; + argv += i; + + config = notmuch_config_open (ctx, NULL, NULL); + if (config == NULL) + return 1; + + query_string = query_string_from_args (ctx, argc, argv); + if (query_string == NULL) { + fprintf (stderr, "Out of memory\n"); + return 1; + } + + if (*query_string == '\0') { + fprintf (stderr, "Error: notmuch reply requires at least one search term.\n"); + return 1; + } + + notmuch = notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READ_ONLY); + if (notmuch == NULL) + return 1; + + query = notmuch_query_create (notmuch, query_string); + if (query == NULL) { + fprintf (stderr, "Out of memory\n"); + return 1; + } + + if (reply_format_func (ctx, config, query) != 0) + return 1; notmuch_query_destroy (query); notmuch_database_close (notmuch); -- 1.6.5.3 From five9a2@gmail.com Tue Nov 24 17:35:18 2009 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 170AB431FC9 for ; Tue, 24 Nov 2009 17:35:18 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 QNlxXLGaMvD4 for ; Tue, 24 Nov 2009 17:35:17 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 8E5F3431FBC for ; Tue, 24 Nov 2009 17:35:16 -0800 (PST) Received: by mail-bw0-f224.google.com with SMTP id 24so5514914bwz.30 for ; Tue, 24 Nov 2009 17:35:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=4++x3HFF3KcDPZFjuT4QxhwyOx5q35MMbfUt16Z7yH4=; b=R/rL30kLrIK13ulDwxYZ8nujKqpCVp7ePmxZrzWBs/uQTxjnfpBpY7RNtRkxLSsxCf dIZoMeqH+K+rYwQnCPLYe2nTeHyKGEp3zlFK5uv7EsSwFj66i6WtsWSyrB0vPwQbpP6P X1RbOIiCWsnx8cCIXBJ1O2XHSAI0uWyHyJXNA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=rTeWZQTtNo/9E2wDebkT8ASo3/LJfDsEacaqYSIUNF0xmy5m0sGAqbVqGW2wWVl/oU FwSdlupfcI8Hs6dxH6rFFopLxfFPd9MXGTfwhyFWXNtImyZM3tVJQ0pZh2GTP/R25B3D A4dtLiKGz7QHnSjkv7g3TWg/l/ZusF1RyyA2o= Received: by 10.204.150.68 with SMTP id x4mr6803275bkv.151.1259112916316; Tue, 24 Nov 2009 17:35:16 -0800 (PST) Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 35sm7911394fkt.40.2009.11.24.17.35.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 17:35:15 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org Date: Wed, 25 Nov 2009 02:35:14 +0100 Message-Id: <1259112914-19806-3-git-send-email-jed@59A2.org> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1259112914-19806-2-git-send-email-jed@59A2.org> References: <1259112914-19806-1-git-send-email-jed@59A2.org> <1259112914-19806-2-git-send-email-jed@59A2.org> Subject: [notmuch] [PATCH 2/2] notmuch-reply.c: implement notmuch_reply_format_headers_only X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 01:35:18 -0000 This command only generates References, To, and Cc headers. The purpose is primarily for use in git send-email --notmuch id: to get proper threading and address the relevant parties. Hooks for other SCMs may come later. Signed-off-by: Jed Brown --- notmuch-reply.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 70 insertions(+), 0 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index 17eb38d..e85568c 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -283,6 +283,74 @@ notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_ return 0; } +/* This format is currently tuned for a git send-email --notmuch hook */ +static int +notmuch_reply_format_headers_only(void *ctx, notmuch_config_t *config, notmuch_query_t *query) +{ + GMimeMessage *reply; + notmuch_messages_t *messages; + notmuch_message_t *message; + const char *recipients, *in_reply_to, *orig_references, *references; + char *reply_headers; + unsigned int i; + + for (messages = notmuch_query_search_messages (query); + notmuch_messages_has_more (messages); + notmuch_messages_advance (messages)) + { + message = notmuch_messages_get (messages); + + /* The 0 means we do not want headers in a "pretty" order. */ + reply = g_mime_message_new (0); + if (reply == NULL) { + fprintf (stderr, "Out of memory\n"); + return 1; + } + + in_reply_to = talloc_asprintf (ctx, "<%s>", + notmuch_message_get_message_id (message)); + + orig_references = notmuch_message_get_header (message, "references"); + + /* We print References first because git format-patch treats it specially. + * Git uses the first entry of References to create In-Reply-To. + */ + references = talloc_asprintf (ctx, "%s%s%s", + in_reply_to, + orig_references ? orig_references : "", + orig_references ? " " : ""); + g_mime_object_set_header (GMIME_OBJECT (reply), + "References", references); + + for (i = 0; i < ARRAY_SIZE (reply_to_map); i++) { + const char *addr; + + recipients = notmuch_message_get_header (message, + reply_to_map[i].header); + if ((recipients == NULL || recipients[0] == '\0') && reply_to_map[i].fallback) + recipients = notmuch_message_get_header (message, + reply_to_map[i].fallback); + + addr = add_recipients_for_string (reply, config, + reply_to_map[i].recipient_type, + recipients); + } + + g_mime_object_set_header (GMIME_OBJECT (reply), "Bcc", + notmuch_config_get_user_primary_email (config)); + + reply_headers = g_mime_object_to_string (GMIME_OBJECT (reply)); + printf ("%s", reply_headers); + free (reply_headers); + + g_object_unref (G_OBJECT (reply)); + reply = NULL; + + notmuch_message_destroy (message); + } + return 0; +} + int notmuch_reply_command (void *ctx, int argc, char *argv[]) { @@ -304,6 +372,8 @@ notmuch_reply_command (void *ctx, int argc, char *argv[]) opt = argv[i] + sizeof ("--format=") - 1; if (strcmp (opt, "default") == 0) { reply_format_func = notmuch_reply_format_default; + } else if (strcmp (opt, "headers-only") == 0) { + reply_format_func = notmuch_reply_format_headers_only; } else { fprintf (stderr, "Invalid value for --format: %s\n", opt); return 1; -- 1.6.5.3 From bart@jukie.net Tue Nov 24 18:04:13 2009 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 AC2DA431FBC for ; Tue, 24 Nov 2009 18:04:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 IVogKQ7T2AQb for ; Tue, 24 Nov 2009 18:04:13 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 04106431FAE for ; Tue, 24 Nov 2009 18:04:12 -0800 (PST) Received: from localhost.localdomain (oxygen.jukie.net [10.10.10.8]) by tau.jukie.net (Postfix) with ESMTP id 36249C00F83 for ; Tue, 24 Nov 2009 21:04:12 -0500 (EST) From: Bart Trojanowski To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 21:03:28 -0500 Message-Id: <1259114609-15959-1-git-send-email-bart@jukie.net> X-Mailer: git-send-email 1.6.4.4.2.gc2f148 Subject: [notmuch] (no subject) X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 02:04:13 -0000 Hi, I find this patch useful for searching my mail. I realize that the option is horrendously long, and I would take any suggestions to shorten it or to use a short op, like -m. -Bart From bart@jukie.net Tue Nov 24 18:04:27 2009 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 C9087431FC2 for ; Tue, 24 Nov 2009 18:04:27 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 vAaZmgqEaqpA for ; Tue, 24 Nov 2009 18:04:27 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id AE219431FC0 for ; Tue, 24 Nov 2009 18:04:26 -0800 (PST) Received: from localhost.localdomain (oxygen.jukie.net [10.10.10.8]) by tau.jukie.net (Postfix) with ESMTP id 3A63AC00F84; Tue, 24 Nov 2009 21:04:26 -0500 (EST) From: Bart Trojanowski To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 21:03:29 -0500 Message-Id: <1259114609-15959-2-git-send-email-bart@jukie.net> X-Mailer: git-send-email 1.6.4.4.2.gc2f148 In-Reply-To: <1259114609-15959-1-git-send-email-bart@jukie.net> References: <1259114609-15959-1-git-send-email-bart@jukie.net> Cc: Bart Trojanowski Subject: [notmuch] [PATCH] notmuch-show: add option to limit display to only matching messages X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 02:04:28 -0000 This patch adds support for notmuch show --only-matching-messages which limits the output to only the top level messages matching the search terms provides. Example: $ notmuch search subject:git AND thread:23d99d0f364f93e90e15df8b42eddb5b thread:23d99d0f364f93e90e15df8b42eddb5b July 31 [4/12] Johan Herland; [RFCv2 00/12] Foreign VCS helper program for CVS repositories (inbox unread) Note that in this thread 4 out of 12 messages matched. The default show behaviour is to show all messages in the thread: $ notmuch show subject:git AND thread:23d99d0f364f93e90e15df8b42eddb5b | grep 'message{' | wc -l 12 With the --only-matching-messages option the output is limited to the matching messages only: $ notmuch show --only-matching-messages subject:git AND thread:23d99d0f364f93e90e15df8b42eddb5b | grep 'message{' | wc -l 4 Signed-off-by: Bart Trojanowski --- notmuch-show.c | 48 +++++++++++++++++++++++++++++++++++++----------- notmuch.c | 7 +++++++ 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index edebaca..8599c6c 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -211,6 +211,24 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) notmuch_thread_t *thread; notmuch_messages_t *messages; char *query_string; + int only_matching = 0; + int i; + + for (i = 0; i < argc && argv[i][0] == '-'; i++) { + if (strcmp (argv[i], "--") == 0) { + i++; + break; + } + if (strcmp(argv[i], "--only-matching-messages") == 0) { + only_matching = 1; + } else { + fprintf (stderr, "Unrecognized option: %s\n", argv[i]); + return 1; + } + } + + argc -= i; + argv += i; config = notmuch_config_open (ctx, NULL, NULL); if (config == NULL) @@ -238,21 +256,29 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) return 1; } - for (threads = notmuch_query_search_threads (query); - notmuch_threads_has_more (threads); - notmuch_threads_advance (threads)) - { - thread = notmuch_threads_get (threads); + if (only_matching) { + messages = notmuch_query_search_messages (query); + if (messages == NULL) + INTERNAL_ERROR ("No messages.\n"); + show_messages (ctx, messages, 0); - messages = notmuch_thread_get_toplevel_messages (thread); + } else { + for (threads = notmuch_query_search_threads (query); + notmuch_threads_has_more (threads); + notmuch_threads_advance (threads)) + { + thread = notmuch_threads_get (threads); - if (messages == NULL) - INTERNAL_ERROR ("Thread %s has no toplevel messages.\n", - notmuch_thread_get_thread_id (thread)); + messages = notmuch_thread_get_toplevel_messages (thread); - show_messages (ctx, messages, 0); + if (messages == NULL) + INTERNAL_ERROR ("Thread %s has no toplevel messages.\n", + notmuch_thread_get_thread_id (thread)); + + show_messages (ctx, messages, 0); - notmuch_thread_destroy (thread); + notmuch_thread_destroy (thread); + } } notmuch_query_destroy (query); diff --git a/notmuch.c b/notmuch.c index f45b692..a817ae3 100644 --- a/notmuch.c +++ b/notmuch.c @@ -177,6 +177,13 @@ command_t commands[] = { "\t\t(all replies to a particular message appear immediately\n" "\t\tafter that message in date order).\n" "\n" + "\t\tSupported options for show include:\n" + "\n" + "\t\t--only-matching-messages\n" + "\n" + "\t\t\tUsing this option will prevent output of any messages\n" + "\t\t\tthat do not match the search terms.\n" + "\n" "\t\tThe output format is plain-text, with all text-content\n" "\t\tMIME parts decoded. Various components in the output,\n" "\t\t('message', 'header', 'body', 'attachment', and MIME 'part')\n" -- 1.6.4.4.2.gc2f148 From bdale@gag.com Tue Nov 24 19:07:58 2009 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 C8C18431FBC for ; Tue, 24 Nov 2009 19:07:58 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 RVUb26-Vn47d for ; Tue, 24 Nov 2009 19:07:58 -0800 (PST) Received: from winfree.gag.com (winfree.gag.com [192.133.104.8]) by olra.theworths.org (Postfix) with ESMTP id 3FF8C431FAE for ; Tue, 24 Nov 2009 19:07:58 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by winfree.gag.com (Postfix) with ESMTP id 81E683041; Tue, 24 Nov 2009 20:07:57 -0700 (MST) X-Virus-Scanned: Debian amavisd-new at gag.com Received: from winfree.gag.com ([127.0.0.1]) by localhost (winfree.gag.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U4-0tQ9il38L; Tue, 24 Nov 2009 20:07:56 -0700 (MST) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by winfree.gag.com (Postfix) with ESMTP id 4E4C23028; Tue, 24 Nov 2009 20:07:56 -0700 (MST) From: Bdale Garbee To: Jan Janak In-Reply-To: <1259100630-13673-1-git-send-email-jan@ryngle.com> References: <1259100630-13673-1-git-send-email-jan@ryngle.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 24 Nov 2009 20:07:55 -0700 Message-ID: <1259118475.5437.1.camel@rover> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 0/4] Make tags applied by 'notmuch new' configurable. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 03:07:58 -0000 On Tue, 2009-11-24 at 23:10 +0100, Jan Janak wrote: > Instead of 'inbox' and 'unread', I configure > 'notmuch new' to add a new tag called 'new' (and only that one). This tag > marks newly added messages that haven't been properly tagged yet by my > auto-tagging scripts. Oh, brilliant! I like it. Bdale From jan@ryngle.com Tue Nov 24 19:30:32 2009 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 16D1C431FBF for ; Tue, 24 Nov 2009 19:30:32 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 MZVYX--60eKu for ; Tue, 24 Nov 2009 19:30:31 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 43124431FAE for ; Tue, 24 Nov 2009 19:30:31 -0800 (PST) Received: by bwz24 with SMTP id 24so5548847bwz.30 for ; Tue, 24 Nov 2009 19:30:30 -0800 (PST) Received: by 10.204.157.24 with SMTP id z24mr6964174bkw.208.1259119830174; Tue, 24 Nov 2009 19:30:30 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id 16sm1608458bwz.15.2009.11.24.19.30.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 19:30:29 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id DB9D7440656; Wed, 25 Nov 2009 04:30:22 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Wed, 25 Nov 2009 04:30:22 +0100 Message-Id: <1259119822-22593-2-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1259119822-22593-1-git-send-email-jan@ryngle.com> References: <1258935056-9746-2-git-send-email-jan@ryngle.com> <1259119822-22593-1-git-send-email-jan@ryngle.com> Subject: [notmuch] [PATCH 2/2] search-tags: Add support for search-terms. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 03:30:32 -0000 This patch adds support for search-terms to 'notmuch search-tags'. If no search-term is provided then the command returns a list of all tags from the database. If the user provides one or more search-terms as arguments then the command collects tags from matching messages only. This could be used by functions in the Emacs mode to further limit the list of tags offered for completion. For example, functions that remove tags from message(s) could offer only tags present in the message(s). Signed-off-by: Jan Janak --- notmuch-search-tags.c | 55 ++++++++++++++++++++++++++++++++++++------------ notmuch.c | 13 +++++++---- 2 files changed, 49 insertions(+), 19 deletions(-) diff --git a/notmuch-search-tags.c b/notmuch-search-tags.c index 1201165..7a1305e 100644 --- a/notmuch-search-tags.c +++ b/notmuch-search-tags.c @@ -21,34 +21,31 @@ #include "notmuch-client.h" -static int -list_all_tags (notmuch_database_t* db) +static void +print_tags (notmuch_tags_t *tags) { - notmuch_tags_t* tags; - const char* t; + const char *t; - if ((tags = notmuch_database_get_all_tags (db)) == NULL) { - fprintf (stderr, "Error while obtaining tags from the database.\n"); - return 1; - } - - while((t = notmuch_tags_get (tags))) { + while ((t = notmuch_tags_get (tags))) { printf ("%s\n", t); notmuch_tags_advance (tags); } - - notmuch_tags_destroy (tags); - return 0; } int notmuch_search_tags_command (void *ctx, int argc, char *argv[]) { + notmuch_messages_t *msgs; + notmuch_tags_t *tags; notmuch_config_t *config; notmuch_database_t *db; + notmuch_query_t *query; + char *query_str; + tags = NULL; config = NULL; db = NULL; + query = NULL; if ((config = notmuch_config_open (ctx, NULL, NULL)) == NULL) { goto error; @@ -60,12 +57,42 @@ notmuch_search_tags_command (void *ctx, int argc, char *argv[]) goto error; } - if (list_all_tags (db) != 0) goto error; + if (argc > 0) { + if ((query_str = query_string_from_args (ctx, argc, argv)) == NULL) { + fprintf (stderr, "Out of memory.\n"); + goto error; + } + + if (*query_str == '\0') { + fprintf (stderr, "Error: Invalid search string.\n"); + goto error; + } + + if ((query = notmuch_query_create (db, query_str)) == NULL) { + fprintf (stderr, "Out of memory\n"); + goto error; + } + + + msgs = notmuch_query_search_messages (query); + if ((tags = notmuch_messages_collect_tags (msgs)) == NULL) goto error; + } else { + if ((tags = notmuch_database_get_all_tags (db)) == NULL) { + fprintf (stderr, "Error while getting tags from the database.\n"); + goto error; + } + } + + print_tags (tags); + notmuch_tags_destroy (tags); + if (query) notmuch_query_destroy (query); notmuch_database_close (db); return 0; error: + if (tags) notmuch_tags_destroy (tags); + if (query) notmuch_query_destroy (query); if (db) notmuch_database_close (db); return 1; } diff --git a/notmuch.c b/notmuch.c index c57bb5c..5b0284c 100644 --- a/notmuch.c +++ b/notmuch.c @@ -255,11 +255,14 @@ command_t commands[] = { "\t\t\"notmuch restore\" command provides you a way to import\n" "\t\tall of your tags (or labels as sup calls them)." }, { "search-tags", notmuch_search_tags_command, - NULL, - "List all tags found in the database.", - "\t\tThis command returns an alphabetically sorted list of all tags\n" - "\t\tthat are present in the database. In other words, the resulting\n" - "\t\tlist is a collection of all tags from all messages." }, + "[ [...] ]", + "\t\tList all tags found in the database or matching messages.", + "\t\tRun this command without any search-term(s) to obtain a list\n" + "\t\tof all tags found in the database. If you provide one or more\n" + "\t\tsearch-terms as argument(s) then the resulting list will\n" + "\t\tcontain tags only from messages that match the search-term(s).\n" + "\n" + "\t\tIn both cases the list will be alphabetically sorted." }, { "help", notmuch_help_command, "[]", "\t\tThis message, or more detailed help for the named command.", -- 1.6.3.3 From jan@ryngle.com Tue Nov 24 19:30:32 2009 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 56815431FAE for ; Tue, 24 Nov 2009 19:30:32 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 CI8+1m7tLGIW for ; Tue, 24 Nov 2009 19:30:31 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 5E988431FBC for ; Tue, 24 Nov 2009 19:30:31 -0800 (PST) Received: by bwz24 with SMTP id 24so5548849bwz.30 for ; Tue, 24 Nov 2009 19:30:30 -0800 (PST) Received: by 10.204.153.220 with SMTP id l28mr6968577bkw.86.1259119829994; Tue, 24 Nov 2009 19:30:29 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id 15sm1599936bwz.4.2009.11.24.19.30.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 19:30:29 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id C86CF440651; Wed, 25 Nov 2009 04:30:22 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Wed, 25 Nov 2009 04:30:21 +0100 Message-Id: <1259119822-22593-1-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1258935056-9746-2-git-send-email-jan@ryngle.com> References: <1258935056-9746-2-git-send-email-jan@ryngle.com> Subject: [notmuch] [PATCH 1/2] lib: New function to collect tags from a list of messages. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 03:30:32 -0000 This patch adds a new function that can be used to collect a list of unique tags from a list of messages. 'notmuch search-tags' uses the function to get a list of tags from messages matching a search-term, but it has the potential to be used elsewhere so we put it in the lib. Signed-off-by: Jan Janak --- lib/messages.c | 40 ++++++++++++++++++++++++++++++++++++++++ lib/notmuch.h | 15 +++++++++++++++ 2 files changed, 55 insertions(+), 0 deletions(-) diff --git a/lib/messages.c b/lib/messages.c index 54c0ab0..aa92535 100644 --- a/lib/messages.c +++ b/lib/messages.c @@ -20,6 +20,8 @@ #include "notmuch-private.h" +#include + /* Create a new notmuch_message_list_t object, with 'ctx' as its * talloc owner. * @@ -140,3 +142,41 @@ notmuch_messages_destroy (notmuch_messages_t *messages) { talloc_free (messages); } + + +notmuch_tags_t * +notmuch_messages_collect_tags (notmuch_messages_t *messages) +{ + notmuch_tags_t *tags, *msg_tags; + notmuch_message_t *msg; + GHashTable *htable; + GList *keys, *l; + const char *tag; + + tags = _notmuch_tags_create (messages); + if (tags == NULL) return NULL; + + htable = g_hash_table_new_full (g_str_hash, g_str_equal, free, NULL); + + while ((msg = notmuch_messages_get (messages))) { + msg_tags = notmuch_message_get_tags (msg); + while ((tag = notmuch_tags_get (msg_tags))) { + g_hash_table_insert (htable, xstrdup (tag), NULL); + notmuch_tags_advance (msg_tags); + } + notmuch_tags_destroy (msg_tags); + notmuch_message_destroy (msg); + notmuch_messages_advance (messages); + } + + keys = g_hash_table_get_keys (htable); + for (l = keys; l; l = l->next) { + _notmuch_tags_add_tag (tags, (char *)l->data); + } + + g_list_free (keys); + g_hash_table_destroy (htable); + + _notmuch_tags_prepare_iterator (tags); + return tags; +} diff --git a/lib/notmuch.h b/lib/notmuch.h index c05e802..9fa2770 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -635,6 +635,21 @@ notmuch_messages_advance (notmuch_messages_t *messages); void notmuch_messages_destroy (notmuch_messages_t *messages); +/* Return a list of tags from all messages. + * + * The resulting list is guaranteed not to contain duplicated tags. + * + * WARNING: You can no longer iterate over messages after calling this + * function, because the iterator will point at the end of the list. + * We do not have a function to reset the iterator yet and the only + * way how you can iterate over the list again is to recreate the + * message list. + * + * The function returns NULL on error. + */ +notmuch_tags_t * +notmuch_messages_collect_tags (notmuch_messages_t *messages); + /* Get the message ID of 'message'. * * The returned string belongs to 'message' and as such, should not be -- 1.6.3.3 From bart@jukie.net Tue Nov 24 19:35:33 2009 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 0AA79431FBC for ; Tue, 24 Nov 2009 19:35:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 uJV58lPFa87a for ; Tue, 24 Nov 2009 19:35:32 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 3AA74431FAE for ; Tue, 24 Nov 2009 19:35:32 -0800 (PST) Received: by tau.jukie.net (Postfix, from userid 1000) id B48FDC00F84; Tue, 24 Nov 2009 22:35:31 -0500 (EST) Date: Tue, 24 Nov 2009 22:35:31 -0500 From: Bart Trojanowski To: Jan Janak Message-ID: <20091125033531.GC29312@jukie.net> References: <1259100630-13673-1-git-send-email-jan@ryngle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1259100630-13673-1-git-send-email-jan@ryngle.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 0/4] Make tags applied by 'notmuch new' configurable. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 03:35:33 -0000 * Jan Janak [091124 17:11]: > I would like to propose that we make the list of tags applied by 'notmuch new' > configurable. Right now notmuch applies two tags to all new messages added to > the database, 'inbox' and 'unread'. The two tags are added by the C code in > notmuch-new.c and they cannot be changed without editing the source file and > recompiling notmuch. I like it. -Bart -- WebSig: http://www.jukie.net/~bart/sig/ From jan@ryngle.com Tue Nov 24 20:05:44 2009 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 28E40431FBC for ; Tue, 24 Nov 2009 20:05:44 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 eE1VO8el3woL for ; Tue, 24 Nov 2009 20:05:43 -0800 (PST) Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com [209.85.220.214]) by olra.theworths.org (Postfix) with ESMTP id 9E3A9431FAE for ; Tue, 24 Nov 2009 20:05:43 -0800 (PST) Received: by fxm6 with SMTP id 6so7558174fxm.0 for ; Tue, 24 Nov 2009 20:05:42 -0800 (PST) Received: by 10.103.78.38 with SMTP id f38mr3145143mul.72.1259121942518; Tue, 24 Nov 2009 20:05:42 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id j2sm726727mue.5.2009.11.24.20.05.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 20:05:41 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id BFC5D440651; Wed, 25 Nov 2009 05:05:39 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Wed, 25 Nov 2009 05:05:39 +0100 Message-Id: <1259121939-23040-1-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1258935056-9746-3-git-send-email-jan@ryngle.com> References: <1258935056-9746-3-git-send-email-jan@ryngle.com> Subject: [notmuch] [PATCH] notmuch.el: When removing tags, offer only those a msg/thread has set. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 04:05:44 -0000 When removing a tag from a message or thread, build a completion buffer which contains only tags that the message or thread has really set. Signed-off-by: Jan Janak --- notmuch.el | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/notmuch.el b/notmuch.el index a9f534b..9594f63 100644 --- a/notmuch.el +++ b/notmuch.el @@ -137,11 +137,11 @@ within the current window." (or (memq prop buffer-invisibility-spec) (assq prop buffer-invisibility-spec))))) -(defun notmuch-select-tag-with-completion (prompt) +(defun notmuch-select-tag-with-completion (prompt &rest search-terms) (let ((tag-list (with-output-to-string (with-current-buffer standard-output - (call-process notmuch-command nil t nil "search-tags"))))) + (apply 'call-process notmuch-command nil t nil "search-tags" search-terms))))) (completing-read prompt (split-string tag-list "\n+" t) nil nil nil))) (defun notmuch-show-next-line () @@ -218,7 +218,7 @@ Unlike builtin `next-line' this version accepts no arguments." (defun notmuch-show-remove-tag (&rest toremove) "Remove a tag from the current message." (interactive - (list (notmuch-select-tag-with-completion "Tag to remove: "))) + (list (notmuch-select-tag-with-completion "Tag to remove: " (notmuch-show-get-message-id)))) (let ((tags (notmuch-show-get-tags))) (if (intersection tags toremove :test 'string=) (progn @@ -968,7 +968,7 @@ and will also appear in a buffer named \"*Notmuch errors*\"." (defun notmuch-search-remove-tag (tag) (interactive - (list (notmuch-select-tag-with-completion "Tag to remove: "))) + (list (notmuch-select-tag-with-completion "Tag to remove: " (notmuch-search-find-thread-id)))) (notmuch-call-notmuch-process "tag" (concat "-" tag) (notmuch-search-find-thread-id)) (notmuch-search-set-tags (delete tag (notmuch-search-get-tags)))) -- 1.6.3.3 From bart@jukie.net Tue Nov 24 20:55:19 2009 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 5C423431FC2 for ; Tue, 24 Nov 2009 20:55:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Jzjf-8ZQULby for ; Tue, 24 Nov 2009 20:55:18 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 65EF7431FAE for ; Tue, 24 Nov 2009 20:55:18 -0800 (PST) Received: from localhost.localdomain (oxygen.jukie.net [10.10.10.8]) by tau.jukie.net (Postfix) with ESMTP id BEBCAC00F83 for ; Tue, 24 Nov 2009 23:55:17 -0500 (EST) From: Bart Trojanowski To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 23:54:32 -0500 Message-Id: <1259124875-28212-1-git-send-email-bart@jukie.net> X-Mailer: git-send-email 1.6.4.4.2.gc2f148 Subject: [notmuch] notmuch show should tell us what messages matched the search expression X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 04:55:19 -0000 The following 3 patches implement this feature. Internally the message object learns about flags. Only a single flag is defined to denote that a message matched the search expression. That flag is then rendered on the "message{" line in the output of notmuch show like this: message{ id:... depth:4 match:0 filename:... message{ id:... depth:4 match:1 filename:... This can now be used by UI interfaces to hide or collapse less interesting messages. -Bart From bart@jukie.net Tue Nov 24 20:55:20 2009 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 0D0DB431FAE for ; Tue, 24 Nov 2009 20:55:20 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 WsPasMks4Yon for ; Tue, 24 Nov 2009 20:55:19 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 69F66431FBF for ; Tue, 24 Nov 2009 20:55:18 -0800 (PST) Received: from localhost.localdomain (oxygen.jukie.net [10.10.10.8]) by tau.jukie.net (Postfix) with ESMTP id E1721C00F85; Tue, 24 Nov 2009 23:55:17 -0500 (EST) From: Bart Trojanowski To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 23:54:34 -0500 Message-Id: <1259124875-28212-3-git-send-email-bart@jukie.net> X-Mailer: git-send-email 1.6.4.4.2.gc2f148 In-Reply-To: <1259124875-28212-2-git-send-email-bart@jukie.net> References: <1259124875-28212-1-git-send-email-bart@jukie.net> <1259124875-28212-2-git-send-email-bart@jukie.net> Cc: Bart Trojanowski Subject: [notmuch] [PATCH 2/3] have _notmuch_thread_create mark which messages matched the query X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 04:55:20 -0000 When _notmuch_thread_create() is given a query string, it can return more messages than just those matching the query. To distinguish those that matched the query expression, the MATCHING_SEARCH flag is set appropriately. Signed-off-by: Bart Trojanowski --- lib/notmuch.h | 1 + lib/thread.cc | 8 ++++++++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index c232c58..3974820 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -686,6 +686,7 @@ notmuch_message_get_filename (notmuch_message_t *message); /* Message flags */ typedef enum _notmuch_message_flag { + NOTMUCH_MSG_FLAG_MATCHING_SEARCH, } notmuch_message_flag_t; /* Get a value of a flag for the email corresponding to 'message'. */ diff --git a/lib/thread.cc b/lib/thread.cc index 58d88c2..9e4cb5c 100644 --- a/lib/thread.cc +++ b/lib/thread.cc @@ -132,6 +132,7 @@ _thread_add_matched_message (notmuch_thread_t *thread, notmuch_message_t *message) { time_t date; + notmuch_message_t *hashed_message; date = notmuch_message_get_date (message); @@ -142,6 +143,13 @@ _thread_add_matched_message (notmuch_thread_t *thread, thread->newest = date; thread->matched_messages++; + + if (g_hash_table_lookup_extended (thread->message_hash, + notmuch_message_get_message_id (message), NULL, + (void **) &hashed_message)) { + notmuch_message_set_flag (hashed_message, + NOTMUCH_MSG_FLAG_MATCHING_SEARCH, 1); + } } static void -- 1.6.4.4.2.gc2f148 From bart@jukie.net Tue Nov 24 20:55:20 2009 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 BD926431FC2 for ; Tue, 24 Nov 2009 20:55:20 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 cXCnpuGYmDE3 for ; Tue, 24 Nov 2009 20:55:18 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 67DE7431FBC for ; Tue, 24 Nov 2009 20:55:18 -0800 (PST) Received: from localhost.localdomain (oxygen.jukie.net [10.10.10.8]) by tau.jukie.net (Postfix) with ESMTP id D1993C00F84; Tue, 24 Nov 2009 23:55:17 -0500 (EST) From: Bart Trojanowski To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 23:54:33 -0500 Message-Id: <1259124875-28212-2-git-send-email-bart@jukie.net> X-Mailer: git-send-email 1.6.4.4.2.gc2f148 In-Reply-To: <1259124875-28212-1-git-send-email-bart@jukie.net> References: <1259124875-28212-1-git-send-email-bart@jukie.net> Cc: Bart Trojanowski Subject: [notmuch] [PATCH 1/3] message: add flags to notmuch_message_t X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 04:55:21 -0000 This patch allows for different flags, internal to notmuch, to be set on a message object. The patch does not define any such flags, just the facilities to manage these flags. Signed-off-by: Bart Trojanowski --- lib/message.cc | 19 +++++++++++++++++++ lib/notmuch.h | 14 ++++++++++++++ 2 files changed, 33 insertions(+), 0 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index 1e325e2..e0834f1 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -37,6 +37,7 @@ struct _notmuch_message { char *filename; notmuch_message_file_t *message_file; notmuch_message_list_t *replies; + unsigned long flags; Xapian::Document doc; }; @@ -108,6 +109,7 @@ _notmuch_message_create (const void *talloc_owner, message->doc_id = doc_id; message->frozen = 0; + message->flags = 0; /* Each of these will be lazily created as needed. */ message->message_id = NULL; @@ -445,6 +447,23 @@ notmuch_message_get_filename (notmuch_message_t *message) return message->filename; } +notmuch_bool_t +notmuch_message_get_flag (notmuch_message_t *message, + notmuch_message_flag_t flag) +{ + return message->flags & (1 << flag); +} + +void +notmuch_message_set_flag (notmuch_message_t *message, + notmuch_message_flag_t flag, notmuch_bool_t enable) +{ + if (enable) + message->flags |= (1 << flag); + else + message->flags &= ~(1 << flag); +} + time_t notmuch_message_get_date (notmuch_message_t *message) { diff --git a/lib/notmuch.h b/lib/notmuch.h index 8bba442..c232c58 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -684,6 +684,20 @@ notmuch_message_get_replies (notmuch_message_t *message); const char * notmuch_message_get_filename (notmuch_message_t *message); +/* Message flags */ +typedef enum _notmuch_message_flag { +} notmuch_message_flag_t; + +/* Get a value of a flag for the email corresponding to 'message'. */ +notmuch_bool_t +notmuch_message_get_flag (notmuch_message_t *message, + notmuch_message_flag_t flag); + +/* Set a value of a flag for the email corresponding to 'message'. */ +void +notmuch_message_set_flag (notmuch_message_t *message, + notmuch_message_flag_t flag, notmuch_bool_t value); + /* Get the date of 'message' as a time_t value. * * For the original textual representation of the Date header from the -- 1.6.4.4.2.gc2f148 From bart@jukie.net Tue Nov 24 20:55:21 2009 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 D5F80431FD2 for ; Tue, 24 Nov 2009 20:55:21 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 hw8zPRqeWfwF for ; Tue, 24 Nov 2009 20:55:20 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 6BC40431FC0 for ; Tue, 24 Nov 2009 20:55:18 -0800 (PST) Received: from localhost.localdomain (oxygen.jukie.net [10.10.10.8]) by tau.jukie.net (Postfix) with ESMTP id E97CDC00F86; Tue, 24 Nov 2009 23:55:17 -0500 (EST) From: Bart Trojanowski To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 23:54:35 -0500 Message-Id: <1259124875-28212-4-git-send-email-bart@jukie.net> X-Mailer: git-send-email 1.6.4.4.2.gc2f148 In-Reply-To: <1259124875-28212-3-git-send-email-bart@jukie.net> References: <1259124875-28212-1-git-send-email-bart@jukie.net> <1259124875-28212-2-git-send-email-bart@jukie.net> <1259124875-28212-3-git-send-email-bart@jukie.net> Cc: Bart Trojanowski Subject: [notmuch] [PATCH 3/3] notmuch-show: identify which messages printed matched the query string X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 04:55:22 -0000 The show command outputs all messages in the threads that match the search-terms. This patch introduces a 'match:[01]' entry to the 'message{' line output by the show command. Value of 1 indicates that the message is matching the search expression. Signed-off-by: Bart Trojanowski --- notmuch-show.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 8599c6c..e9f0883 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -155,9 +155,10 @@ show_message (void *ctx, notmuch_message_t *message, int indent) const char *name, *value; unsigned int i; - printf ("\fmessage{ id:%s depth:%d filename:%s\n", + printf ("\fmessage{ id:%s depth:%d match:%d filename:%s\n", notmuch_message_get_message_id (message), indent, + notmuch_message_get_flag (message, NOTMUCH_MSG_FLAG_MATCHING_SEARCH), notmuch_message_get_filename (message)); printf ("\fheader{\n"); -- 1.6.4.4.2.gc2f148 From aneesh.kumar@linux.vnet.ibm.com Tue Nov 24 20:58:11 2009 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 1A469431FBF for ; Tue, 24 Nov 2009 20:58:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 hOHz6nH1n6cu for ; Tue, 24 Nov 2009 20:58:10 -0800 (PST) Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141]) by olra.theworths.org (Postfix) with ESMTP id A486A431FAE for ; Tue, 24 Nov 2009 20:58:09 -0800 (PST) Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp08.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAPFw6Sr027971 for ; Thu, 26 Nov 2009 02:58:06 +1100 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAP4w5Ci1777826 for ; Wed, 25 Nov 2009 15:58:05 +1100 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAP4w5wO010412 for ; Wed, 25 Nov 2009 15:58:05 +1100 Received: from localhost.localdomain ([9.124.31.111]) by d23av02.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAP4w25A010362; Wed, 25 Nov 2009 15:58:03 +1100 From: "Aneesh Kumar K.V" To: notmuch@notmuchmail.org Date: Wed, 25 Nov 2009 10:28:00 +0530 Message-Id: <1259125080-18708-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.6.5.2.74.g610f9 Subject: [notmuch] [PATCH -v4] notmuch.el: Add face support to search and show mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 04:58:11 -0000 This add two faces, notmuch-show-subject-face and notmuch-tag-face. The first face is used to show the subject line in the notmuch-show-mode and the second one to show tags in the notmuch-search-mode. We can selectively highlight each tag by setting notmuch-tag-face-alist as below (defface notmuch-tag-unread-face '((((class color) (background light)) (:foreground "goldenrod" :bold t)) (((class color) (background dark)) (:foreground "goldenrod" :bold t))) "Notmuch search mode face used to highligh tags.") (defface notmuch-tag-inbox-face '((((class color) (background light)) (:foreground "red" :bold t)) (((class color) (background dark)) (:foreground "red" :bold t))) "Notmuch search mode face used to highligh tags.") (setq notmuch-tag-face-alist '(("unread" . 'notmuch-tag-unread-face) ("inbox" . 'notmuch-tag-inbox-face))) (require 'notmuch) Signed-off-by: Aneesh Kumar K.V --- notmuch.el | 38 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 36 insertions(+), 2 deletions(-) diff --git a/notmuch.el b/notmuch.el index 551048a..5737f77 100644 --- a/notmuch.el +++ b/notmuch.el @@ -663,6 +663,17 @@ which this thread was originally shown." (notmuch-show-markup-message))) (notmuch-show-hide-markers)) +(defface notmuch-show-subject-face + '((((class color)) (:foreground "red"))) + "Notmuch show mode face used to highligh subject line." + :group 'notmuch) + +(defvar notmuch-show-font-lock-keywords + (list ;; header in font-lock-type-face + (list "\\(Subject:.*$\\)" + '(1 'notmuch-show-subject-face))) + "Additonal expression to hightlight in notmuch-show-mode") + ;;;###autoload (defun notmuch-show-mode () "Major mode for viewing a thread with notmuch. @@ -695,7 +706,9 @@ view, (remove the \"inbox\" tag from each), with (use-local-map notmuch-show-mode-map) (setq major-mode 'notmuch-show-mode mode-name "notmuch-show") - (setq buffer-read-only t)) + (setq buffer-read-only t) + (set (make-local-variable 'font-lock-defaults) + '(notmuch-show-font-lock-keywords t))) ;;;###autoload @@ -835,6 +848,16 @@ thread from that buffer can be show when done with this one)." (goto-char (point-max)) (forward-line -1)) +(defface notmuch-tag-face + '((((class color)) (:foreground "red"))) + "Notmuch search mode face used to highligh tags." + :group 'notmuch) + +(defvar notmuch-tag-face-alist nil + "List containing the tag list that need to be highlighed") + +(defvar notmuch-search-font-lock-keywords nil) + ;;;###autoload (defun notmuch-search-mode () "Major mode for searching mail with notmuch. @@ -865,7 +888,18 @@ global search. (setq truncate-lines t) (setq major-mode 'notmuch-search-mode mode-name "notmuch-search") - (setq buffer-read-only t)) + (setq buffer-read-only t) + (if (not notmuch-tag-face-alist) + (add-to-list 'notmuch-search-font-lock-keywords (list + "\\(([^)]*)$\\)" '(1 'notmuch-tag-face))) + (progn + (setq notmuch-search-tags (mapcar 'car notmuch-tag-face-alist)) + (loop for notmuch-search-tag in notmuch-search-tags + do (add-to-list 'notmuch-search-font-lock-keywords (list + (concat "\\(" notmuch-search-tag "\\)") + `(1 ,(cdr (assoc notmuch-search-tag notmuch-tag-face-alist)))))))) + (set (make-local-variable 'font-lock-defaults) + '(notmuch-search-font-lock-keywords t))) (defun notmuch-search-find-thread-id () "Return the thread for the current thread" -- 1.6.5.2.74.g610f9 From aneesh.kumar@linux.vnet.ibm.com Tue Nov 24 20:58:19 2009 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 9E201431FC3 for ; Tue, 24 Nov 2009 20:58:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 YqkbDf9-Tn49 for ; Tue, 24 Nov 2009 20:58:19 -0800 (PST) Received: from e23smtp05.au.ibm.com (e23smtp05.au.ibm.com [202.81.31.147]) by olra.theworths.org (Postfix) with ESMTP id 9B75E431FAE for ; Tue, 24 Nov 2009 20:58:18 -0800 (PST) Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp05.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAP4tHq6008192 for ; Wed, 25 Nov 2009 15:55:17 +1100 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAP4sk641552426 for ; Wed, 25 Nov 2009 15:54:46 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAP4wGnv012248 for ; Wed, 25 Nov 2009 15:58:16 +1100 Received: from localhost.localdomain ([9.124.31.111]) by d23av03.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAP4wE0O012225; Wed, 25 Nov 2009 15:58:15 +1100 From: "Aneesh Kumar K.V" To: notmuch@notmuchmail.org Date: Wed, 25 Nov 2009 10:28:13 +0530 Message-Id: <1259125093-18743-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.6.5.2.74.g610f9 Subject: [notmuch] [PATCH -v2] notmuch.el: Use variable notmuch-search-oldest-first to decide the search order X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 04:58:19 -0000 Make sure we use notmuch-search-oldest-first to decide the how the search result should be displayed. This helps to set the value to nil and have latest mail shown first. This also fix the notmuch-folder mode to use the right search order when we select a folder. Also the notmuch command is fixed to use the right ordering. Signed-off-by: Aneesh Kumar K.V --- notmuch.el | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/notmuch.el b/notmuch.el index 5737f77..45c3dc6 100644 --- a/notmuch.el +++ b/notmuch.el @@ -817,7 +817,8 @@ thread from that buffer can be show when done with this one)." (fset 'notmuch-search-mode-map notmuch-search-mode-map) (defvar notmuch-search-query-string) -(defvar notmuch-search-oldest-first) +(defvar notmuch-search-oldest-first t + "Show the oldest mail first in the search-mode") (defun notmuch-search-scroll-up () @@ -1129,7 +1130,7 @@ current search results AND that are tagged with the given tag." (defun notmuch () "Run notmuch to display all mail with tag of 'inbox'" (interactive) - (notmuch-search "tag:inbox" t)) + (notmuch-search "tag:inbox" notmuch-search-oldest-first)) (setq mail-user-agent 'message-user-agent) @@ -1199,7 +1200,7 @@ results for the search terms in that line. (setq folder (notmuch-folder-find-name))) (let ((search (assoc folder notmuch-folders))) (if search - (notmuch-search (cdr search) t)))) + (notmuch-search (cdr search) notmuch-search-oldest-first)))) (defun notmuch-folder () "Show the notmuch folder view and update the displayed counts." -- 1.6.5.2.74.g610f9 From aneesh.kumar@linux.vnet.ibm.com Tue Nov 24 20:58:31 2009 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 43373431FC0 for ; Tue, 24 Nov 2009 20:58:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 T+bY1WGzKNSz for ; Tue, 24 Nov 2009 20:58:30 -0800 (PST) Received: from e23smtp02.au.ibm.com (e2