Tcl bindings for notmuch
authorEric J <eric@deptj.eu>
Sun, 14 Feb 2016 12:05:28 +0000 (13:05 +0100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:21:07 +0000 (16:21 -0700)
21/fc0cda27be8825b9ad835c9abcf78f1ce69433 [new file with mode: 0644]

diff --git a/21/fc0cda27be8825b9ad835c9abcf78f1ce69433 b/21/fc0cda27be8825b9ad835c9abcf78f1ce69433
new file mode 100644 (file)
index 0000000..579aa21
--- /dev/null
@@ -0,0 +1,112 @@
+Return-Path: <eric@deptj.eu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 35E296DE0A9A\r
+ for <notmuch@notmuchmail.org>; Sun, 14 Feb 2016 04:33:42 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.09\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.09 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001,\r
+ RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_DKIM_INVALID=0.01]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id jM-Gp2u4MgU9 for <notmuch@notmuchmail.org>;\r
+ Sun, 14 Feb 2016 04:33:39 -0800 (PST)\r
+X-Greylist: delayed 1470 seconds by postgrey-1.35 at arlo;\r
+ Sun, 14 Feb 2016 04:33:38 PST\r
+Received: from mx1.solardns.com (mx1.solardns.com [109.73.127.119])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id BAA3E6DE0943\r
+ for <notmuch@notmuchmail.org>; Sun, 14 Feb 2016 04:33:38 -0800 (PST)\r
+Received: from [213.129.84.218] (helo=luna.solardns.com)\r
+ by mx1.solardns.com with esmtps (TLSv1.2:DHE-RSA-AES256-SHA:256)\r
+ (Exim 4.85) (envelope-from <eric@deptj.eu>) id 1aUvU5-0005fP-Nc\r
+ for notmuch@notmuchmail.org; Sun, 14 Feb 2016 12:09:04 +0000\r
+DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deptj.eu;\r
+ s=default; h=Date:Message-ID:To:Subject:From;\r
+ bh=ijAcvGXuofS/i3dFXLivPd6IgcYJGdWBKhPanfMm9z0=; b=XyP+xPPKaBYg8BnFUkNLu5waWa\r
+ mmLeXduPIEVGiBCRjH9HIiiFbi9PsO0/RUZoLVKNZpAQwBTkk8JQ4mz1F6vHef3NU36wY+IR0xlMM\r
+ xudY8/xUG0RzDRBzUaxZ3/RpZEMhbziXx+d6ke0Kx1yctWM/j4Vr3yEqsJABAMW6myw4=;\r
+Received: from [92.135.160.170] (port=42858 helo=bruno.deptj.eu)\r
+ by luna.solardns.com with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256)\r
+ (Exim 4.86) (envelope-from <eric@deptj.eu>) id 1aUvU5-0042bi-E6\r
+ for notmuch@notmuchmail.org; Sun, 14 Feb 2016 12:09:01 +0000\r
+Received: from eric by bruno.deptj.eu with local (Exim 4.84)\r
+ (envelope-from <eric@deptj.eu>) id 1aUvU4-0005XB-P5\r
+ for notmuch@notmuchmail.org; Sun, 14 Feb 2016 13:09:00 +0100\r
+From: Eric J <eric@deptj.eu>\r
+Subject: Tcl bindings for notmuch\r
+To: notmuch@notmuchmail.org\r
+Message-ID: <0379758d60f150aa79777a12361b036358b8d949-NM@bruno.deptj.eu>\r
+Date: Sun, 14 Feb 2016 13:05:28 +0100 (CET)\r
+X-AuthUser: deptjeu\r
+X-Filter-ID:\r
+ s0sct1PQhAABKnZB5plbIZxxbsbMXbbOVqDrOlLQDPCKLoLP9dSDpksiPa3sfcfQiw3bi2TEXpBy\r
+ KOgMDJLxZ2gLr13hkJnqYlE8dI2PqoFC/lGsrXcsS0xY0J18f6o7xB66CWvXcfKDfXjTU++u6ydW\r
+ J/gBXtdMrDiqSWWJHV4A8jheTXcTWok5SYh8oudiZuM7jUXIESohoO51xWmU8U0XxLGz4gGrl7np\r
+ YUMMsx7Zx6js8RMGZ+eyCM03IideZE/8G6RrW+hPYRmHOym9VEp4OmAp9SwcFw57ijAOXur1H/aA\r
+ warQpYDOYx/6JtUOKIpz/KyJk6xidDbrtJGeIvwS+mRNB2u5eXMTyiRDCl4blv/7/GYDGL6pBAPx\r
+ 3RhxuHrpSpJU4PQlqFj9797wgsGhIeDBws4kvu4hgViYIJSOH7FelTFEA57OugCjQqJvq5XDlSi1\r
+ S/CAqp6x6giLUpAadaOpLL7vzAlHz9Vt0lJbH3q7FSJEAvmcpRDg+DcXMCx8qKfWo/2nfeswSb/v\r
+ XOidX4Ts4xdG+C13IyWeZaJClvAWyUAUCSYHhmge3quet8geXjZWRvaT/RbJ/nX/IFFm7SbdEzck\r
+ 901Ob2Iq9tC/Vh1lis0iI/S1HLwoHXf0\r
+X-Report-Abuse-To: spam@mx1.solardns.com\r
+X-Filter-Fingerprint:\r
+ IFrWXGses7OKB5S5G8/dJdIz5bb8V0ykx8BnFBnunHBA3cTUQ1R++keuE7RDJ8Kg3RbMLUalw1oC\r
+ mj99/u+Poh38tEMU4IgC4sNz49qn3HHnhRv/ZJ3kEy8bfiAr+Fb/UpndEJ0YoaLytXXo8BMTaVt0\r
+ ARHRi6XGuAluI1udprGClI6bm+u9ssQgM5AHe3Zacv4uJct5wtJvPpZ2dlBHCwDSxr3Vz+LJ/RhM\r
+ 2JZ0ECN5dnq47RWft7iCyM9+PbHelB4qP9S6mTzNwoPraFy6ieiDqMHb2a0eZvGOvr7RaxKWGCKO\r
+ us9nABr0Pk/4CplP\r
+X-Originating-IP: 213.129.84.218\r
+X-SpamExperts-Domain: out.solardns.com\r
+X-SpamExperts-Username: 213.129.84.218\r
+Authentication-Results: solardns.com;\r
+ auth=pass smtp.auth=213.129.84.218@out.solardns.com\r
+X-SpamExperts-Outgoing-Class: unsure\r
+X-SpamExperts-Outgoing-Evidence: Combined (0.82)\r
+X-Recommended-Action: accept\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 14 Feb 2016 12:33:42 -0000\r
+\r
+I have been using notmuch for a while and I wanted to be able to use\r
+notmuch queries in some Tcl stuff I have been using for a rather longer\r
+while. I could have just called the notmuch CLI every time, but I thought\r
+"no, it's a library, there should be bindings".\r
+\r
+Bindings made me think of SWIG, which seems to have been tried for\r
+notmuch in the past but abandoned. However, with some time available...\r
+\r
+... I can now, from Tcl, use the API functions from the library to\r
+create a database, close and open it, add messages, tag them, run queries\r
+and retrieve information about the results. I haven't tested every API\r
+function yet, but I will be able to go on with my own needs at least. It\r
+is only functions with pointer-to-pointer arguments that need special\r
+attention, and that is all in the SWIG interface file. You can see that at\r
+http://chiselapp.com/user/emj/repository/tclnotmuch/artifact/527aee944d?txt=1&ln=0\r
+- its about 50 lines (plus some blanks).\r
+\r
+That's a Fossil repository, with a home page at\r
+http://chiselapp.com/user/emj/repository/tclnotmuch , if anyone wants\r
+to look further. I think it may benefit from more wrapping from the Tcl\r
+side, just for usability.\r
+\r
+BTW, I have no idea if or how the interface file would have to be changed\r
+for other languages.\r
+\r
+Eric\r
+-- \r
+ms fnd in a lbry\r