From:
This patch adds a new struct type sprinter_t, which is used for
structured formatting, e.g. JSON or S-Expressions. The structure printer
is heavily based on code from Austin Clements
(id:87d34hsdx8@awakening.csail.mit.edu).
It includes the following functions:
/* Start a new map/d
From:
Using the new structured printer support in sprinter.h, implement
sprinter_json_create, which returns a new JSON structured output
formatter. The formatter prints output similar to the existing JSON, but
with differences in whitespace (mostly newlines, --output=summary prints
the entire mes
From:
This patch switches from the current ad-hoc printer to the structured
formatters in sprinter.h, sprinter-text.c and sprinter-json.c.
The JSON tests are changed slightly in order to make them PASS for the
new structured output formatter.
The text tests pass without adaptation.
---
notmuch
Currently there is no easy way to add support for different structured
formatters (like JSON). For example, adding support for S-Expressions
would result in code duplication.
This patch series amends the situation by introducing structured
formatters, which allow different implementations of struc
Quoth Adrien Bustany on Jul 19 at 9:25 pm:
> Le 18/07/2012 23:40, Austin Clements a ?crit :
> >This is subtle enough that I think it deserves a comment in the source
> >code explaining that tracking the talloc owner reference, combined
> >with the fact that Go finalizers are run in dependency orde
Calling notmuch_database_reopen is needed to refresh the database
contents when the database on disk was modified by another
notmuch_database_t instance, for example in a different thread.
---
lib/database.cc | 17 +
lib/notmuch.h |8
2 files changed, 25 insertions
This method explicitly flushes the pending modifications to disk. It is
useful if your program has various threads, each with a read only DB and
one writer thread with a read/write DB. In that case, you most likely
want the writer to sync the changes to disk so that the readers can see
them, withou
Xapian (and therefore Notmuch? I would not mind a confirmation here) is
thread safe as long as you don't share DB instances across threads. The
database backend supports one writer and several concurrent readers.
One possible model for multi threaded apps using Notmuch is to have one
thread with a
Well, thanks for the quick review :)
I have updated all the patches to take your fixes into account, there is
still the discussion left about the GC integration. Once we get that
sorted out, I'll send the updated version.
Le 18/07/2012 23:51, Austin Clements a ?crit :
> This series looks good t
Le 18/07/2012 23:40, Austin Clements a ?crit :
> This is subtle enough that I think it deserves a comment in the source
> code explaining that tracking the talloc owner reference, combined
> with the fact that Go finalizers are run in dependency order, ensures
> that the C objects will always be de
Quoth Adrien Bustany on Jul 19 at 9:25 pm:
> Le 18/07/2012 23:40, Austin Clements a écrit :
> >This is subtle enough that I think it deserves a comment in the source
> >code explaining that tracking the talloc owner reference, combined
> >with the fact that Go finalizers are run in dependency orde
Calling notmuch_database_reopen is needed to refresh the database
contents when the database on disk was modified by another
notmuch_database_t instance, for example in a different thread.
---
lib/database.cc | 17 +
lib/notmuch.h |8
2 files changed, 25 insertions
Xapian (and therefore Notmuch? I would not mind a confirmation here) is
thread safe as long as you don't share DB instances across threads. The
database backend supports one writer and several concurrent readers.
One possible model for multi threaded apps using Notmuch is to have one
thread with a
This method explicitly flushes the pending modifications to disk. It is
useful if your program has various threads, each with a read only DB and
one writer thread with a read/write DB. In that case, you most likely
want the writer to sync the changes to disk so that the readers can see
them, withou
Well, thanks for the quick review :)
I have updated all the patches to take your fixes into account, there is
still the discussion left about the GC integration. Once we get that
sorted out, I'll send the updated version.
Le 18/07/2012 23:51, Austin Clements a écrit :
This series looks good
Le 18/07/2012 23:40, Austin Clements a écrit :
This is subtle enough that I think it deserves a comment in the source
code explaining that tracking the talloc owner reference, combined
with the fact that Go finalizers are run in dependency order, ensures
that the C objects will always be destroye
tried that, but will do.
>
>>
>> Note that there is an important optimization in notmuch tag that you
>> might have to replicate. It manipulates the original query to exclude
>> messages that already have the desired tags, so that they get skipped
>> very efficiently at the earliest stage possible.
> I already have this in my original shell script.
> (wouldn't be too hard to automatically do, though.)
FYI, I've put this into a new notmuch-mtag go-based binary over here:
https://github.com/sbinet/notmuch/blob/dev/go-bindings/bindings/go/src/notmuch-mtag/main.go
-s
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL:
<http://notmuchmail.org/pipermail/notmuch/attachments/20120719/4a91371d/attachment-0001.pgp>
ccx at webprojekty.cz writes:
>
> I might not always have time to read the entirety of the ML, so it would
> be great if people CC me when posting there.
>
OK, please add some kind of README file explaining the best way to
report bugs.
>
> You can consider it public domain. I guess I should add
c...@webprojekty.cz writes:
>
> I might not always have time to read the entirety of the ML, so it would
> be great if people CC me when posting there.
>
OK, please add some kind of README file explaining the best way to
report bugs.
>
> You can consider it public domain. I guess I should add wt
Sebastien Binet writes:
> Austin Clements writes:
>
>> Quoth Sebastien Binet on Jul 09 at 10:25 am:
>>>
>>> hi there,
>>>
>>> I was trying to reduce the I/O stress during my usual email
>>> fetching+tagging by writing a little program using the go bindings to
>>> notmuch.
>>>
>>> ie:
>>> db,
20 matches
Mail list logo