* expose notmuch_database_new to libraries?
@ 2015-09-26 2:43 Wael M. Nasreddine
2015-09-26 7:35 ` Jani Nikula
0 siblings, 1 reply; 2+ messages in thread
From: Wael M. Nasreddine @ 2015-09-26 2:43 UTC (permalink / raw)
To: notmuch
Hello,
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.
Thanks,
Wael
[0]: https://github.com/notmuch/notmuch/blob/master/notmuch-new.c#L933
--
Wael Nasreddine | Senior Full Stack Engineer at Dailymotion | (650) 933-3448
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: expose notmuch_database_new to libraries?
2015-09-26 2:43 expose notmuch_database_new to libraries? Wael M. Nasreddine
@ 2015-09-26 7:35 ` Jani Nikula
0 siblings, 0 replies; 2+ messages in thread
From: Jani Nikula @ 2015-09-26 7:35 UTC (permalink / raw)
To: Wael M. Nasreddine, notmuch
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-26 7:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-26 2:43 expose notmuch_database_new to libraries? Wael M. Nasreddine
2015-09-26 7:35 ` Jani Nikula
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).