From: Jani Nikula <jani@nikula.org>
To: "Wael M. Nasreddine" <wael.nasreddine@gmail.com>,
notmuch <notmuch@notmuchmail.org>
Subject: Re: expose notmuch_database_new to libraries?
Date: Sat, 26 Sep 2015 10:35:47 +0300 [thread overview]
Message-ID: <87k2rdmy3w.fsf@nikula.org> (raw)
In-Reply-To: <CA+kKtKDBrfPPkM+HnNJLXMHGc4Ppr=8YeJkOPuZaFewUkBqh9w@mail.gmail.com>
On Sat, 26 Sep 2015, "Wael M. Nasreddine" <wael.nasreddine@gmail.com> wrote:
> I have a use case where I'd like to call 'notmuch new'
> programmatically via the bindings (custom Go bindings). Is it at all
> possible to expose notmuch_new_command[0] through lib/notmuch.h? The
> logic of notmuch_new_command would probably have to extracted to
> lib/database.cc for the exposure.
Short answer, no.
I'm afraid we don't have any documentation describing the split between
the library and the cli, apart from the library API. IIUC the history is
that it was originally all lumped together, and then the library was
abstracted as a toolbox for creating email programs on top. The cli
could be considered one such email program (and notmuch-emacs builds on
top of the cli).
I don't think the notmuch new command would be a good fit in the
library. It has too much application level policy that doesn't belong in
the library. That said, I could imagine coming up with another, higher
level library consisting of the main building blocks of the cli, and
having bindings to that. It's just that it's a non-trivial amount of
work, requiring a significant programming *and* review effort.
BR,
Jani.
prev parent reply other threads:[~2015-09-26 7:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-26 2:43 expose notmuch_database_new to libraries? Wael M. Nasreddine
2015-09-26 7:35 ` Jani Nikula [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k2rdmy3w.fsf@nikula.org \
--to=jani@nikula.org \
--cc=notmuch@notmuchmail.org \
--cc=wael.nasreddine@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).