[PATCH 11/11] lib: add recipients to database

2012-08-19 Thread Jameson Graef Rollins
This adds just the "to" recipients, but probably "cc"s should be included as well. --- lib/database.cc |2 +- lib/message.cc|4 lib/notmuch-private.h |2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/database.cc b/lib/database.cc index 761dc1a.

[PATCH 05/11] lib: add ability to store recipients in message structure

2012-08-19 Thread Jameson Graef Rollins
Added as a string, in parallel to the authors element. --- lib/message.cc| 18 ++ lib/notmuch-private.h |9 + 2 files changed, 27 insertions(+) diff --git a/lib/message.cc b/lib/message.cc index 978de06..fa28073 100644 --- a/lib/message.cc +++ b/lib/message.c

[PATCH 10/11] emacs: add function to toggle showing authors/recipients in search

2012-08-19 Thread Jameson Graef Rollins
New function, notmuch-search-toggle-tofrom, toggles whether thread authors or recipients are shown in the 'authors' fields in the search results. This is bound to the '/' key. --- emacs/notmuch.el | 11 +++ 1 file changed, 11 insertions(+) diff --git a/emacs/notmuch.el b/emacs/notmuch.

[PATCH 02/11] lib: use new addresses structure for thread authors

2012-08-19 Thread Jameson Graef Rollins
Now that we have the infrastructure in place, we modify the thread object and associated functions to use the new addresses structure for storing thread authors. --- lib/thread.cc | 41 +++-- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/lib/

[PATCH 03/11] lib: give _thread_cleanup_author a more generic name

2012-08-19 Thread Jameson Graef Rollins
We will use this for cleaning non-author address fields, so we give it the more generic name _thread_cleanup_address. --- lib/thread.cc | 43 ++- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/lib/thread.cc b/lib/thread.cc index 9e0e5cb..b

[PATCH 06/11] lib: store thread recipients in thread structure

2012-08-19 Thread Jameson Graef Rollins
This utilizes the new thread addresses struct to store thread recipients, again in parallel to authors. Since message recipients are not stored in the database, including recipients in the thread structure exacts a significant overhead as the recipients are retrieved from the original message file

[PATCH 09/11] emacs: add ability to show recipients instead of author in search

2012-08-19 Thread Jameson Graef Rollins
A new boolean argument is added to notmuch-search to control whether thread authors or recipients are shown in the 'authors' field. --- emacs/notmuch-hello.el |6 +++--- emacs/notmuch.el | 40 +--- 2 files changed, 32 insertions(+), 14 deletions(-)

[PATCH 08/11] cli: add thread recipients to search output

2012-08-19 Thread Jameson Graef Rollins
This adds a "--include-recipients" option to notmuch search. With structured output formats (e.g. json), a new recipients field will be included that holds recipients of the thread. Matched and non-matched recipients are delineated as with authors. As mentioned in the previous patch for the unde

[PATCH 07/11] test: search recipient output

2012-08-19 Thread Jameson Graef Rollins
Simple json test for a new additional recipient field. known_broken to be removed with next patch. --- test/json | 14 ++ 1 file changed, 14 insertions(+) diff --git a/test/json b/test/json index ac8fa8e..ac423a8 100755 --- a/test/json +++ b/test/json @@ -60,4 +60,18 @@ test_expect

[PATCH 01/11] lib: new thread addresses structure

2012-08-19 Thread Jameson Graef Rollins
This new structure holds addresses associated with a thread, both matched and unmatched. Initially this will be used to replace the existing infrastructure for storing the addresses of thread authors. Further patches will use it to store the addresses of threads recipients. Init and destructor fu

[PATCH 04/11] lib: remove no longer needed author-specific thread functions

2012-08-19 Thread Jameson Graef Rollins
The _add_author, _add_matched_author, and _resolve_thread_authors_string functions have been replaced by the more generic _address functions that utilize the new notmuch_thread_addresses_t. --- lib/thread.cc | 91 - 1 file changed, 91 delet

[PATCH 00/11] add recipients to search output

2012-08-19 Thread Jameson Graef Rollins
This series is an attempt to add thread recipients to the search output. My personal overall goal of this series is to support the handling of drafts in the emacs ui. For drafts we want to see recipients, instead of authors, in the search output. I can imagine other uses for this series as well,

[PATCH 11/11] lib: add recipients to database

2012-08-19 Thread Jameson Graef Rollins
This adds just the "to" recipients, but probably "cc"s should be included as well. --- lib/database.cc |2 +- lib/message.cc|4 lib/notmuch-private.h |2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/database.cc b/lib/database.cc index 761dc1a.

[PATCH 10/11] emacs: add function to toggle showing authors/recipients in search

2012-08-19 Thread Jameson Graef Rollins
New function, notmuch-search-toggle-tofrom, toggles whether thread authors or recipients are shown in the 'authors' fields in the search results. This is bound to the '/' key. --- emacs/notmuch.el | 11 +++ 1 file changed, 11 insertions(+) diff --git a/emacs/notmuch.el b/emacs/notmuch.

[PATCH 09/11] emacs: add ability to show recipients instead of author in search

2012-08-19 Thread Jameson Graef Rollins
A new boolean argument is added to notmuch-search to control whether thread authors or recipients are shown in the 'authors' field. --- emacs/notmuch-hello.el |6 +++--- emacs/notmuch.el | 40 +--- 2 files changed, 32 insertions(+), 14 deletions(-)

[PATCH 08/11] cli: add thread recipients to search output

2012-08-19 Thread Jameson Graef Rollins
This adds a "--include-recipients" option to notmuch search. With structured output formats (e.g. json), a new recipients field will be included that holds recipients of the thread. Matched and non-matched recipients are delineated as with authors. As mentioned in the previous patch for the unde

[PATCH 07/11] test: search recipient output

2012-08-19 Thread Jameson Graef Rollins
Simple json test for a new additional recipient field. known_broken to be removed with next patch. --- test/json | 14 ++ 1 file changed, 14 insertions(+) diff --git a/test/json b/test/json index ac8fa8e..ac423a8 100755 --- a/test/json +++ b/test/json @@ -60,4 +60,18 @@ test_expect

[PATCH 06/11] lib: store thread recipients in thread structure

2012-08-19 Thread Jameson Graef Rollins
This utilizes the new thread addresses struct to store thread recipients, again in parallel to authors. Since message recipients are not stored in the database, including recipients in the thread structure exacts a significant overhead as the recipients are retrieved from the original message file

[PATCH 05/11] lib: add ability to store recipients in message structure

2012-08-19 Thread Jameson Graef Rollins
Added as a string, in parallel to the authors element. --- lib/message.cc| 18 ++ lib/notmuch-private.h |9 + 2 files changed, 27 insertions(+) diff --git a/lib/message.cc b/lib/message.cc index 978de06..fa28073 100644 --- a/lib/message.cc +++ b/lib/message.c

[PATCH 04/11] lib: remove no longer needed author-specific thread functions

2012-08-19 Thread Jameson Graef Rollins
The _add_author, _add_matched_author, and _resolve_thread_authors_string functions have been replaced by the more generic _address functions that utilize the new notmuch_thread_addresses_t. --- lib/thread.cc | 91 - 1 file changed, 91 delet

[PATCH 03/11] lib: give _thread_cleanup_author a more generic name

2012-08-19 Thread Jameson Graef Rollins
We will use this for cleaning non-author address fields, so we give it the more generic name _thread_cleanup_address. --- lib/thread.cc | 43 ++- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/lib/thread.cc b/lib/thread.cc index 9e0e5cb..b

[PATCH 02/11] lib: use new addresses structure for thread authors

2012-08-19 Thread Jameson Graef Rollins
Now that we have the infrastructure in place, we modify the thread object and associated functions to use the new addresses structure for storing thread authors. --- lib/thread.cc | 41 +++-- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/lib/

[PATCH 01/11] lib: new thread addresses structure

2012-08-19 Thread Jameson Graef Rollins
This new structure holds addresses associated with a thread, both matched and unmatched. Initially this will be used to replace the existing infrastructure for storing the addresses of thread authors. Further patches will use it to store the addresses of threads recipients. Init and destructor fu

[PATCH 00/11] add recipients to search output

2012-08-19 Thread Jameson Graef Rollins
This series is an attempt to add thread recipients to the search output. My personal overall goal of this series is to support the handling of drafts in the emacs ui. For drafts we want to see recipients, instead of authors, in the search output. I can imagine other uses for this series as well,

[PATCH] devel: add release-checks.sh

2012-08-19 Thread David Bremner
Tomi Ollila writes: > Currently Makefile.local contains some machine executable release > checking functionality. This is unnecessarily complex way to do it: Hi Tomi; Overall this looks good, but there seems to be one minor bug: - If there are extra files under man/man1 (e.g. from "make upda

[Patch v3 6/6] test: add broken roundtrip test

2012-08-19 Thread da...@tethera.net
From: David Bremner We demonstrate the current notmuch restore parser being confused by message-id's and tags containing non alpha numeric characters (particularly space and parentheses are problematic because they are not escaped by notmuch dump). We save the files as hex escaped on disk so tha

[Patch v3 5/6] test: add generator for random "stub" messages

2012-08-19 Thread da...@tethera.net
From: David Bremner Initial use case is testing dump and restore, so we only have message-ids and tags. The message ID's are nothing like RFC compliant, but it doesn't seem any harder to roundtrip random UTF-8 strings than RFC-compliant ones. Tags are UTF-8, even though notmuch is in principle

[Patch v3 4/6] test: add database routines for testing.

2012-08-19 Thread da...@tethera.net
From: David Bremner Initially, provide a way to create "stub" messages in the notmuch database without corresponding files. This is essentially cut and paste from lib/database.cc. This is a seperate file since we don't want to export these symbols from libnotmuch or bloat the library with non-ex

[Patch v3 3/6] test/hex-escaping: new test for hex escaping routines

2012-08-19 Thread da...@tethera.net
From: David Bremner These are more like unit tests, to (try to) make sure the library functionality is working before building more complicated things on top of it. --- test/hex-escaping | 26 ++ test/notmuch-test |1 + 2 files changed, 27 insertions(+) create mode

[Patch v3 2/6] test/hex-xcode: new test binary

2012-08-19 Thread da...@tethera.net
From: David Bremner This program is used both as a test-bed/unit-tester for ../util/hex-escape.c, and also as a utility in future tests of dump and restore. --- test/.gitignore |1 + test/Makefile.local | 11 +- test/basic |2 +- test/hex-xcode.c| 103

[Patch v3 1/6] hex-escape: (en|de)code strings to/from restricted character set

2012-08-19 Thread da...@tethera.net
From: David Bremner The character set is chosen to be suitable for pathnames, and the same as that used by contrib/nmbug [With additions by Jani Nikula] --- util/Makefile.local |2 +- util/hex-escape.c | 168 +++ util/hex-escape.h | 41

random corpus generator, v3

2012-08-19 Thread da...@tethera.net
This obsoletes the series at: id:"134431-4301-1-git-send-email-bremner at debian.org" Changes since v2: - clean up new test-binaries and objects - remove the "set -o pipefail" leftover from debugging. Possibly this makes sense as a global setting, but in a seperate patch. - add hex