Add mechanism for running user defined hooks. Hooks are executables or
symlinks to executables stored under the new notmuch hooks directory,
/.notmuch/hooks.
No hooks are introduced here, but adding support for a hook is now a simple
matter of calling the new notmuch_run_hook() function at an appr
Run notmuch new pre and post hooks, named "pre-new" and "post-new", if
present in the notmuch hooks directory. The hooks will be run before and
after incorporating new messages to the database.
Typical use cases for pre-new and post-new hooks are fetching or delivering
new mail to the maildir, and
On Thu, 17 Nov 2011 22:07:38 +0200, Jani Nikula wrote:
> Add support for limiting the maximum number of results initially displayed
> in search results. When enabled, the search results will contain push
> buttons to double the number of results displayed or to show unlimited
> results.
>
> The a
On Sat, 3 Dec 2011 22:42:10 -0500, Austin Clements wrote:
> I like it. See below for some nits.
Thanks for the review!
> Quoth Jani Nikula on Dec 04 at 1:16 am:
> > Add mechanism for running user defined hooks. Hooks are executables or
> > symlinks to executables stored under the new notmuch h
I decided to start a new thread since the other one
id:"1322808114-11854-1-git-send-email-david at tethera.net" was getting
pretty long, and there was no actual relevant discussion there.
I think these patches are getting close to ready.
One thing to discuss is the inclusion of single element op
From: David Bremner
The output file is handled via positional arguments. There are
currently no "normal" options.
---
notmuch-dump.c | 32
1 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/notmuch-dump.c b/notmuch-dump.c
index a490917..6fbdc81 10
From: David Bremner
The switch on format_sel is slightly clunky, but it doesn't seem worth
special casing argument processing for function pointers, when I think
the function pointer approach will be modified/abandoned.
---
notmuch-search.c | 110
From: David Bremner
As we noticed when Jani kindly converted things to getopt_long, much
of the work in argument parsing in notmuch is due to the the key-value
style arguments like --format=(raw|json|text).
In this version I implement Austin Clements' suggestion of basing the
main API on taking
From: David Bremner
The new argument handling is a bit more concise, and bit more
flexible. It allows the input file name to go before the --accumulate
option.
---
notmuch-restore.c | 38 --
1 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/n
From: David Bremner
The goal here is to have a simple way of making sure all of the
binaries needed to run tests are available.
---
test/Makefile.local |5 -
test/README |3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/test/Makefile.local b/test/Makefile
Quoth Jani Nikula on Dec 04 at 2:35 pm:
> > > +int
> > > +notmuch_run_hook (const char *db_path, const char *hook)
> > > +{
> > > +char *hook_path;
> > > +int status = 0;
> >
> > You use status as both a notmuch_status_t and for generic C library
> > results. This seems a little weird.
On Sun, 4 Dec 2011 01:16:49 +0200, Jani Nikula wrote:
> Run notmuch new pre and post hooks, named "pre-new" and "post-new", if
> present in the notmuch hooks directory. The hooks will be run before and
> after incorporating new messages to the database.
>
> Typical use cases for pre-new and post
Hi!
Following an alot bug report [1] I created a small python script that
causes a segmentation fault in notmuch:
#!/usr/bin/env python2
import notmuch
db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)
q_new = notm
On Sun, 4 Dec 2011 15:35:39 -0200, Kazuo Teramoto wrote:
> Hi!
>
> Following an alot bug report [1] I created a small python script that
> causes a segmentation fault in notmuch:
>
> #!/usr/bin/env python2
> import notmuch
>
Quoth David Bremner on Dec 04 at 2:14 pm:
> On Sun, 4 Dec 2011 15:35:39 -0200, Kazuo Teramoto
> wrote:
> > Hi!
> >
> > Following an alot bug report [1] I created a small python script that
> > causes a segmentation fault in notmuch:
> > ==
Thanks for the review. A new version is on its way...
Quoth Jani Nikula on Nov 29 at 9:11 pm:
> > +mctx->stream = g_mime_stream_file_new (mctx->file);
>
> AFAICT the GMimeStreamFile object owns the FILE * pointer now, and
> closes it later. Calling fclose() on it in _mime_node_context_free(
This version addresses the comments in Jani's review
(id:8739d6u4ju.fsf at nikula.org).
In addition to simplifying the code, we'll need the notmuch_message_t*
in show_message_body shortly.
---
notmuch-client.h |2 +-
notmuch-reply.c |3 +--
notmuch-show.c |3 +--
show-message.c |3 ++-
4 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/notmuch-client.
This function matches how we number parts for the --part argument to
show. It will allow us to jump directly to the desired part, rather
than traversing the entire tree and carefully tracking whether or not
we're "in the zone".
---
mime-node.c | 25 +
notmuch-client
This wraps all of the complex MIME part handling in a single, simple
function that gets part N from *any* MIME object, so traversing a MIME
part tree becomes a two-line for loop. Furthermore, the MIME node
structure provides easy access to envelopes for message parts as well
as cryptographic infor
This removes all of the MIME traversal logic from show_message_body
and leaves only its interaction with the format callbacks.
Besides isolating concerns, since traversal happens behind a trivial
interface, there is now much less code duplication in
show_message_part. Also, this uses mime_node_se
From: David Bremner
We want to make sure g_type_init is called before any GObject
functionality is used.
---
This seems to fix the segfault for me. Any other comments/experiences?
lib/database.cc |4
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/database.cc b/lib/d
On Sat, 3 Dec 2011 23:00:47 -0500, Austin Clements wrote:
> Quoth Jani Nikula on Dec 04 at 1:16 am:
> > Run notmuch new pre and post hooks, named "pre-new" and "post-new", if
> > present in the notmuch hooks directory. The hooks will be run before and
> > after incorporating new messages to the d
On Sun, 04 Dec 2011 21:36:21 +0200, Jani Nikula wrote:
> > > +if (run_hooks && !ret && !interrupted)
> > > + ret = notmuch_run_hook (db_path, "post-new");
> >
> > Does it matter at this point if the hook fails? I'm not sure.
>
> I wasn't sure either, but I ended up thinking that the hooks b
On Sun, 04 Dec 2011 11:46:38 -0500, Tom Prince
wrote:
> On Sun, 4 Dec 2011 01:16:49 +0200, Jani Nikula wrote:
> > Run notmuch new pre and post hooks, named "pre-new" and "post-new", if
> > present in the notmuch hooks directory. The hooks will be run before and
> > after incorporating new messa
From: David Bremner
We start modestly, with a (slightly modified) test case from Kazuo
Teramoto. Originally it just made sure the bindings didn't crash; here
we check that by comparing the output with that of notmuch search.
---
test/notmuch-test |1 +
test/python | 20 ++
On Sat, 3 Dec 2011 22:42:10 -0500, Austin Clements wrote:
> I like it. See below for some nits.
Thanks for the review!
> Quoth Jani Nikula on Dec 04 at 1:16 am:
> > Add mechanism for running user defined hooks. Hooks are executables or
> > symlinks to executables stored under the new notmuch h
I decided to start a new thread since the other one
id:"1322808114-11854-1-git-send-email-da...@tethera.net" was getting
pretty long, and there was no actual relevant discussion there.
I think these patches are getting close to ready.
One thing to discuss is the inclusion of single element optio
From: David Bremner
The output file is handled via positional arguments. There are
currently no "normal" options.
---
notmuch-dump.c | 32
1 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/notmuch-dump.c b/notmuch-dump.c
index a490917..6fbdc81 10
From: David Bremner
The switch on format_sel is slightly clunky, but it doesn't seem worth
special casing argument processing for function pointers, when I think
the function pointer approach will be modified/abandoned.
---
notmuch-search.c | 110
From: David Bremner
As we noticed when Jani kindly converted things to getopt_long, much
of the work in argument parsing in notmuch is due to the the key-value
style arguments like --format=(raw|json|text).
In this version I implement Austin Clements' suggestion of basing the
main API on taking
From: David Bremner
The new argument handling is a bit more concise, and bit more
flexible. It allows the input file name to go before the --accumulate
option.
---
notmuch-restore.c | 38 --
1 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/n
From: David Bremner
The goal here is to have a simple way of making sure all of the
binaries needed to run tests are available.
---
test/Makefile.local |5 -
test/README |3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/test/Makefile.local b/test/Makefile
Quoth Jani Nikula on Dec 04 at 2:35 pm:
> > > +int
> > > +notmuch_run_hook (const char *db_path, const char *hook)
> > > +{
> > > +char *hook_path;
> > > +int status = 0;
> >
> > You use status as both a notmuch_status_t and for generic C library
> > results. This seems a little weird.
On Sun, 4 Dec 2011 01:16:49 +0200, Jani Nikula wrote:
> Run notmuch new pre and post hooks, named "pre-new" and "post-new", if
> present in the notmuch hooks directory. The hooks will be run before and
> after incorporating new messages to the database.
>
> Typical use cases for pre-new and post
Hi!
Following an alot bug report [1] I created a small python script that
causes a segmentation fault in notmuch:
#!/usr/bin/env python2
import notmuch
db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)
q_new = notm
On Sun, 4 Dec 2011 15:35:39 -0200, Kazuo Teramoto wrote:
> Hi!
>
> Following an alot bug report [1] I created a small python script that
> causes a segmentation fault in notmuch:
>
> #!/usr/bin/env python2
> import notmuch
>
Quoth David Bremner on Dec 04 at 2:14 pm:
> On Sun, 4 Dec 2011 15:35:39 -0200, Kazuo Teramoto wrote:
> > Hi!
> >
> > Following an alot bug report [1] I created a small python script that
> > causes a segmentation fault in notmuch:
> > =
Thanks for the review. A new version is on its way...
Quoth Jani Nikula on Nov 29 at 9:11 pm:
> > +mctx->stream = g_mime_stream_file_new (mctx->file);
>
> AFAICT the GMimeStreamFile object owns the FILE * pointer now, and
> closes it later. Calling fclose() on it in _mime_node_context_free(
This version addresses the comments in Jani's review
(id:8739d6u4ju@nikula.org).
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch
In addition to simplifying the code, we'll need the notmuch_message_t*
in show_message_body shortly.
---
notmuch-client.h |2 +-
notmuch-reply.c |3 +--
notmuch-show.c |3 +--
show-message.c |3 ++-
4 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/notmuch-client.
This function matches how we number parts for the --part argument to
show. It will allow us to jump directly to the desired part, rather
than traversing the entire tree and carefully tracking whether or not
we're "in the zone".
---
mime-node.c | 25 +
notmuch-client
This wraps all of the complex MIME part handling in a single, simple
function that gets part N from *any* MIME object, so traversing a MIME
part tree becomes a two-line for loop. Furthermore, the MIME node
structure provides easy access to envelopes for message parts as well
as cryptographic infor
This removes all of the MIME traversal logic from show_message_body
and leaves only its interaction with the format callbacks.
Besides isolating concerns, since traversal happens behind a trivial
interface, there is now much less code duplication in
show_message_part. Also, this uses mime_node_se
From: David Bremner
We want to make sure g_type_init is called before any GObject
functionality is used.
---
This seems to fix the segfault for me. Any other comments/experiences?
lib/database.cc |4
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/database.cc b/lib/d
On Sat, 3 Dec 2011 23:00:47 -0500, Austin Clements wrote:
> Quoth Jani Nikula on Dec 04 at 1:16 am:
> > Run notmuch new pre and post hooks, named "pre-new" and "post-new", if
> > present in the notmuch hooks directory. The hooks will be run before and
> > after incorporating new messages to the d
On Sun, 04 Dec 2011 21:36:21 +0200, Jani Nikula wrote:
> > > +if (run_hooks && !ret && !interrupted)
> > > + ret = notmuch_run_hook (db_path, "post-new");
> >
> > Does it matter at this point if the hook fails? I'm not sure.
>
> I wasn't sure either, but I ended up thinking that the hooks b
On Sun, 04 Dec 2011 11:46:38 -0500, Tom Prince wrote:
> On Sun, 4 Dec 2011 01:16:49 +0200, Jani Nikula wrote:
> > Run notmuch new pre and post hooks, named "pre-new" and "post-new", if
> > present in the notmuch hooks directory. The hooks will be run before and
> > after incorporating new messag
From: David Bremner
We start modestly, with a (slightly modified) test case from Kazuo
Teramoto. Originally it just made sure the bindings didn't crash; here
we check that by comparing the output with that of notmuch search.
---
test/notmuch-test |1 +
test/python | 20 ++
49 matches
Mail list logo