Re: Hi all
[notmuch-archives.git] / 91 / e346d46cb9a7de80581db9b53353c59ea2d0ab
1 Return-Path: <jani@nikula.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id E77EE6DE0AC2\r
6  for <notmuch@notmuchmail.org>; Sat, 26 Sep 2015 00:36:09 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.525\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.525 tagged_above=-999 required=5 tests=[AWL=0.195,\r
12   RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01]\r
13  autolearn=disabled\r
14 Received: from arlo.cworth.org ([127.0.0.1])\r
15  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
16  with ESMTP id PUDY3CioV0X4 for <notmuch@notmuchmail.org>;\r
17  Sat, 26 Sep 2015 00:36:08 -0700 (PDT)\r
18 Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com\r
19  [209.85.212.180])\r
20  by arlo.cworth.org (Postfix) with ESMTPS id 9E0D46DE0924\r
21  for <notmuch@notmuchmail.org>; Sat, 26 Sep 2015 00:36:07 -0700 (PDT)\r
22 Received: by wiclk2 with SMTP id lk2so44145672wic.1\r
23  for <notmuch@notmuchmail.org>; Sat, 26 Sep 2015 00:36:05 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25  d=1e100.net; s=20130820;\r
26  h=x-gm-message-state:from:to:subject:in-reply-to:references\r
27  :user-agent:date:message-id:mime-version:content-type;\r
28  bh=za1Lkhv4/xMuAo3pav1Cd2DDIsm296vrW8ZlonUBjPc=;\r
29  b=BW9ILOV1fAblYC5icpI7kDhL7WgpRAiceayLu2LDugcEhS9ZqSGF1GZm+DfVUwZ8zH\r
30  dbL3R/ljxFp8IsqWllXWTQmdaTzDBgv9zfVtM2YZOOQRsFYuYFWaWOhaN5S63upUNxUM\r
31  PXgs7ng6TzfDx3oH74/hd61PaeXqtfKDkxBI8pRra8/KCqeSBX1bvN+VCAYU/f2kZhNn\r
32  +lO3x4tolBrzre1dM8dF9FLnggbiwNuLmE14kCGBU3Ddi2d5+01Nm7z9WzNsSfwbU7+v\r
33  Kq7qcnxWwWFIsb6VqXyzoUZ9TxF2/a6oq+/shNjmtzAB+l48ko0z2FdWC3xwssL101U6\r
34  aPmA==\r
35 X-Gm-Message-State:\r
36  ALoCoQkHj621hrx8ry9Fs6yisuTGijsRHxlyIae4dKY8+0j3l6z5HLptR0Sz8eR8NhoDyqjuK8P4\r
37 X-Received: by 10.194.190.75 with SMTP id go11mr10110286wjc.80.1443252965444; \r
38  Sat, 26 Sep 2015 00:36:05 -0700 (PDT)\r
39 Received: from localhost (mobile-access-bcee63-221.dhcp.inet.fi.\r
40  [188.238.99.221])\r
41  by smtp.gmail.com with ESMTPSA id vr8sm7072831wjc.26.2015.09.26.00.36.04\r
42  (version=TLSv1/SSLv3 cipher=OTHER);\r
43  Sat, 26 Sep 2015 00:36:04 -0700 (PDT)\r
44 From: Jani Nikula <jani@nikula.org>\r
45 To: "Wael M. Nasreddine" <wael.nasreddine@gmail.com>,\r
46  notmuch <notmuch@notmuchmail.org>\r
47 Subject: Re: expose notmuch_database_new to libraries?\r
48 In-Reply-To:\r
49  <CA+kKtKDBrfPPkM+HnNJLXMHGc4Ppr=8YeJkOPuZaFewUkBqh9w@mail.gmail.com>\r
50 References:\r
51  <CA+kKtKDBrfPPkM+HnNJLXMHGc4Ppr=8YeJkOPuZaFewUkBqh9w@mail.gmail.com>\r
52 User-Agent: Notmuch/0.20.2+66~gb33abd9 (http://notmuchmail.org) Emacs/24.4.1\r
53  (x86_64-pc-linux-gnu)\r
54 Date: Sat, 26 Sep 2015 10:35:47 +0300\r
55 Message-ID: <87k2rdmy3w.fsf@nikula.org>\r
56 MIME-Version: 1.0\r
57 Content-Type: text/plain\r
58 X-BeenThere: notmuch@notmuchmail.org\r
59 X-Mailman-Version: 2.1.18\r
60 Precedence: list\r
61 List-Id: "Use and development of the notmuch mail system."\r
62  <notmuch.notmuchmail.org>\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
64  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
66 List-Post: <mailto:notmuch@notmuchmail.org>\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
69  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
70 X-List-Received-Date: Sat, 26 Sep 2015 07:36:10 -0000\r
71 \r
72 On Sat, 26 Sep 2015, "Wael M. Nasreddine" <wael.nasreddine@gmail.com> wrote:\r
73 > I have a use case where I'd like to call 'notmuch new'\r
74 > programmatically via the bindings (custom Go bindings). Is it at all\r
75 > possible to expose notmuch_new_command[0] through lib/notmuch.h? The\r
76 > logic of notmuch_new_command would probably have to extracted to\r
77 > lib/database.cc for the exposure.\r
78 \r
79 Short answer, no.\r
80 \r
81 I'm afraid we don't have any documentation describing the split between\r
82 the library and the cli, apart from the library API. IIUC the history is\r
83 that it was originally all lumped together, and then the library was\r
84 abstracted as a toolbox for creating email programs on top. The cli\r
85 could be considered one such email program (and notmuch-emacs builds on\r
86 top of the cli).\r
87 \r
88 I don't think the notmuch new command would be a good fit in the\r
89 library. It has too much application level policy that doesn't belong in\r
90 the library. That said, I could imagine coming up with another, higher\r
91 level library consisting of the main building blocks of the cli, and\r
92 having bindings to that. It's just that it's a non-trivial amount of\r
93 work, requiring a significant programming *and* review effort.\r
94 \r
95 BR,\r
96 Jani.\r