Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id AA18D431FBC for ; Thu, 14 Jan 2010 00:47:18 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.381 X-Spam-Level: X-Spam-Status: No, score=-0.381 tagged_above=-999 required=5 tests=[AWL=-0.382, BAYES_50=0.001] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VDwZ6N4X9iUS for ; Thu, 14 Jan 2010 00:47:17 -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 99ED5431FAE for ; Thu, 14 Jan 2010 00:47:17 -0800 (PST) Received: by fxm9 with SMTP id 9so21672372fxm.30 for ; Thu, 14 Jan 2010 00:47:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=HqAG+PL7mMq/SRLnWWCTJOGh9Sj6Q8W/KpcZH51d7rg=; b=lpNcd76kmVePksS9gv/TeggqeRXOsnpjgPftqRbJh6ICSN0eHOxi4zf5OA97h6d5hh 5irXkThWGFfftclkOmjxRU6Y3qvQq34apJf9/L9Ntk00/6mMeuKUK3ILBVW44is1fPEF PSZjYABOjZzQ10HP7XrvNlZ7wVYQDmUZtybZk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=rv/eLhbCVNx2JFXuTiJVoIrgjv+4OPiLdT5lg/LQ0BPJgwqIVeiohbm5U91ZyFT1Mn dgxLgnAJsQuvm5OLoMKY0fXzMMJdYy2knJBo+gskgPvuK5ov/eI4iDJhzXPkLGQDYr6Z KOGlvTGGXJtFMCu38QZqq0V2FcZbGvDWTOlis= Received: by 10.223.20.85 with SMTP id e21mr599014fab.25.1263458836461; Thu, 14 Jan 2010 00:47:16 -0800 (PST) Received: from harikalardiyari ([78.179.59.77]) by mx.google.com with ESMTPS id 15sm193359fxm.2.2010.01.14.00.47.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 14 Jan 2010 00:47:15 -0800 (PST) Sender: Ali Polatel Date: Thu, 14 Jan 2010 10:47:13 +0200 From: Ali Polatel To: notmuch@notmuchmail.org Message-ID: <20100114084713.GA22273@harikalardiyari> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: [notmuch] Thoughts on notmuch and Lua X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 08:47:18 -0000 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Before trying to implement anything I decided to send a mail to the list to ask people's opinion. What's the problem? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Notmuch isn't very configurable. How can Lua integration solve this? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Here are initial thoughts on how to integrate Lua with notmuch. Any comments appreciated. 1. Configuration file: The configuration file can be a Lua script that allows more dynamic configuration. Here's an example: # notmuch configuration file: config =3D {} config.dbpath =3D "/path/to/maildir" config.exclude =3D function (maildir) return not string.match(maildir, ".*Trash.*") end =2E.. 2. Hooks: This is a feature I really miss having switched from sup. There can be many hooks, a hook that formats search output, a hook that is called before adding messages to the database which may be used to add initial tags depending on headers etc. Why Lua? =3D=3D=3D=3D=3D=3D=3D=3D Lua has many advantages over other scripting languages when it comes to integration with a C program. It has a very clean and easy C API, the overhead of running Lua scripts is not noticable among other things. --=20 Regards, Ali Polatel --uAKRQypu60I7Lcqm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iEYEABECAAYFAktO2hEACgkQQU4yORhF8iAlVgCfb6TlURip35d+nL2mtj1PYDRw YcUAmQEFGaHXfXFS2hzzqVM4RdM5uS60 =tinA -----END PGP SIGNATURE----- --uAKRQypu60I7Lcqm--