[PATCH 2/2] configure: add debug flags by default.

2014-10-03 Thread David Bremner
This makes development (in particular the test suite) easier. Those concerned about the extra diskspace can override the default or use strip. --- configure | 2 +- test/T000-basic.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/configure b/configure index

[PATCH 1/2] test: check for debug symbols in notmuch

2014-10-03 Thread David Bremner
In the future, tests may rely on debug symbols being present in notmuch, so we plan to switch the default flags. The main purpose of this test is to help explain the perhaps mysterious failures of other tests which rely on symbols being present. --- test/T000-basic.sh | 5 + 1 file changed,

[PATCH] debian: append elinks to notmuch-vim dependencies

2014-10-03 Thread Sergei Shilovsky
notmuch-vim uses elinks to convert HTML messages to text. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 6298deb..146dfea 100644 --- a/debian/control +++ b/debian/control @@ -128,7 +128,7 @@ Architecture: all Section:

[PATCH v2] VIM: Use notmuch CLI for config

2014-10-03 Thread Sergei Shilovsky
The patch works fine for me. Ian, though I could not test whether result='' matters or not, cause 'notmuch get' looks to always return a string. It also fixes id:CAHc2pO19AZabAiJhdfQR1rL5t0GufLAq5cKb_7w-Z8y+JXT5+g at mail.gmail.com On Fri, Oct 3, 2014 at 10:54 AM, David Bremner wrote: > Ian

[PATCH v5] nmbug: Translate to Python

2014-10-03 Thread Tomi Ollila
On Fri, Oct 03 2014, David Bremner wrote: > "W. Trevor King" writes: > >> This allows us to capture stdout and stderr separately, and do other >> explicit subprocess manipulation without resorting to external >> packages. It should be compatible with Python 2.6 and later >> (including the 3.x

[PATCH] test: Port atomicity test to Python

2014-10-03 Thread Austin Clements
On Fri, 03 Oct 2014, Austin Clements wrote: > Previously, this was implemented using a horrible GDB script (because > there is no such thing as a non-horrible GDB script). This GDB script > often broke with newer versions of GDB for mysterious reasons. Port > the test script to GDB's Python

[PATCH] test: Port atomicity test to Python

2014-10-03 Thread Austin Clements
Previously, this was implemented using a horrible GDB script (because there is no such thing as a non-horrible GDB script). This GDB script often broke with newer versions of GDB for mysterious reasons. Port the test script to GDB's Python API, which makes the code much cleaner and, hopefully,

[PATCH v2] VIM: Use notmuch CLI for config

2014-10-03 Thread Ian Main
David Bremner wrote: > Ian Main writes: > > > This patch switches from reading .notmuch-config directly to using > > the CLI the same way that emacs does it. It actually uses less code > > and is probably less error prone. > > > > Ian > > The general approach seems sane; it seems quite

[PATCH v6 2/2] nmbug: Add a 'help' command for folks who don't like --help

2014-10-03 Thread W. Trevor King
The 'if args.func == help' block at the end avoids: AttributeError: 'functools.partial' object has no attribute '__code__' --- devel/nmbug/nmbug | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug index

[PATCH v6 1/2] nmbug: Translate to Python

2014-10-03 Thread W. Trevor King
This allows us to capture stdout and stderr separately, and do other explicit subprocess manipulation without resorting to external packages. It should be compatible with Python 2.7 and later (including the 3.x series). Most of the user-facing interface is the same, but there are a few changes,

[PATCH v6 0/2] nmbug: Translate to Python

2014-10-03 Thread W. Trevor King
Hopefully the last round :). Changes since v5 [1]: * Dropped 2.6 compatibility claim from the first patch's commit message, since Tomi pointed out that at least the '{}'.format() syntax is just since 2.7. * Added a new 'help' command as a separate patch at David's request. [1]:

[PATCH v5] nmbug: Translate to Python

2014-10-03 Thread David Bremner
"W. Trevor King" writes: > This allows us to capture stdout and stderr separately, and do other > explicit subprocess manipulation without resorting to external > packages. It should be compatible with Python 2.6 and later > (including the 3.x series), although with 2.6 you'll need the external

[PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-03 Thread David Bremner
Austin Clements writes: > This patch simplifies notmuch_database_close to explicitly abort any > outstanding transaction and then just call Database::close. This > works for both read-only and read/write databases, takes care of > committing changes, unifies the exception handling path, and

[PATCH] doc: Emacs manual improvements and expansions

2014-10-03 Thread Austin Clements
Fix several typos, improve general wording and flow, and add some information on notmuch-jump. --- Sorry I didn't tease these changes apart. I went through it linearly and it didn't seem worth the trouble of separating them after the fact. doc/notmuch-emacs.rst | 50

[PATCH] NEWS: News for notmuch-jump

2014-10-03 Thread Austin Clements
--- NEWS | 15 +++ 1 file changed, 15 insertions(+) diff --git a/NEWS b/NEWS index 2d85090..fa57e5d 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,21 @@ Notmuch 0.19 (UNRELEASED) = +Emacs Interface +--- + +Use the `j` key to access saved searches from

[PATCH 11/11] lib: Remove unnecessary thread linking steps when using ghost messages

2014-10-03 Thread Austin Clements
From: Austin Clements Previously, it was necessary to link new messages to children to work around some (though not all) problems with the old metadata-based approach to stored thread IDs. With ghost messages, this is no longer necessary, so don't bother with child linking

[PATCH 10/11] test: Test upgrade to ghost messages feature

2014-10-03 Thread Austin Clements
--- test/T530-upgrade.sh | 21 + 1 file changed, 21 insertions(+) diff --git a/test/T530-upgrade.sh b/test/T530-upgrade.sh index c4c4ac8..6b42a69 100755 --- a/test/T530-upgrade.sh +++ b/test/T530-upgrade.sh @@ -116,4 +116,25 @@ MAIL_DIR/bar/new/21:2, MAIL_DIR/bar/new/22:2,

[PATCH 09/11] lib: Enable ghost messages feature

2014-10-03 Thread Austin Clements
From: Austin Clements This fixes the broken thread order test. --- lib/database-private.h| 2 +- test/T260-thread-order.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/database-private.h b/lib/database-private.h index e2e4bc8..15e03cc 100644 ---

[PATCH 08/11] lib: Implement upgrade to ghost messages feature

2014-10-03 Thread Austin Clements
From: Austin Clements Somehow this is the first upgrade pass that actually does *any* error checking, so this also adds the bit of necessary infrastructure to handle that. --- lib/database.cc | 64 +++-- 1 file changed, 62

[PATCH 07/11] lib: Implement ghost-based thread linking

2014-10-03 Thread Austin Clements
From: Austin Clements This updates the thread linking code to use ghost messages instead of user metadata to link messages into threads. In contrast with the old approach, this is actually correct. Previously, thread merging updated only the thread IDs of message documents,

[PATCH 06/11] lib: Internal support for querying and creating ghost messages

2014-10-03 Thread Austin Clements
From: Austin Clements This updates the message abstraction to support ghost messages: it adds a message flag that distinguishes regular messages from ghost messages, and an internal function for initializing a newly created (blank) message as a ghost message. ---

[PATCH 05/11] lib: Update database schema doc for ghost messages

2014-10-03 Thread Austin Clements
From: Austin Clements This describes the structure of ghost mail documents. Ghost messages are not yet implemented. --- lib/database.cc | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index

[PATCH 04/11] lib: Add a ghost messages database feature

2014-10-03 Thread Austin Clements
From: Austin Clements This will be implemented over the next several patches. The feature is not yet "enabled" (this does not add it to NOTMUCH_FEATURES_CURRENT). --- lib/database-private.h | 7 +++ lib/database.cc| 2 ++ 2 files changed, 9 insertions(+) diff

[PATCH 03/11] lib: Handle empty date value

2014-10-03 Thread Austin Clements
From: Austin Clements In the interest of robustness, avoid undefined behavior of sortable_unserialise if the date value is missing. This shouldn't happen now, but ghost messages will have blank date values. --- lib/message.cc | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH 02/11] lib: Refactor _notmuch_database_link_message

2014-10-03 Thread Austin Clements
From: Austin Clements This moves the code to retrieve and clear the metadata thread ID out of _notmuch_database_link_message into its own function. This will simplify future changes. --- lib/database.cc | 69 +++-- 1 file

[PATCH 01/11] lib: Move message ID compression to _notmuch_message_create_for_message_id

2014-10-03 Thread Austin Clements
From: Austin Clements Previously, this was performed by notmuch_database_add_message. This happens to be the only caller currently (which is why this was safe), but we're about to introduce more callers, and it makes more sense to put responsibility for ID compression in the

[PATCH 00/11] Add ghost messages and fix thread linking

2014-10-03 Thread Austin Clements
This series modifies our database representation of messages that have been referenced by other messages, but for which we don't have the message itself. Currently, we store this information as Xapian metadata, but this has several downsides for performance and complexity and results in

[PATCH v2] VIM: Use notmuch CLI for config

2014-10-03 Thread David Bremner
Ian Main writes: > This patch switches from reading .notmuch-config directly to using > the CLI the same way that emacs does it. It actually uses less code > and is probably less error prone. > > Ian The general approach seems sane; it seems quite brittle to read the config file directly.

Re: [PATCH v2] VIM: Use notmuch CLI for config

2014-10-03 Thread David Bremner
Ian Main im...@stemwinder.org writes: This patch switches from reading .notmuch-config directly to using the CLI the same way that emacs does it. It actually uses less code and is probably less error prone. Ian The general approach seems sane; it seems quite brittle to read the config

Re: [PATCH v5] nmbug: Translate to Python

2014-10-03 Thread David Bremner
W. Trevor King wk...@tremily.us writes: This allows us to capture stdout and stderr separately, and do other explicit subprocess manipulation without resorting to external packages. It should be compatible with Python 2.6 and later (including the 3.x series), although with 2.6 you'll need

Re: [PATCH v2] VIM: Use notmuch CLI for config

2014-10-03 Thread Sergei Shilovsky
The patch works fine for me. Ian, though I could not test whether result='' matters or not, cause 'notmuch get' looks to always return a string. It also fixes id:cahc2po19azabaijhdfqr1rl5t0guflaq5ckb_7w-z8y+jxt...@mail.gmail.com On Fri, Oct 3, 2014 at 10:54 AM, David Bremner da...@tethera.net

Re: [PATCH v5] nmbug: Translate to Python

2014-10-03 Thread Tomi Ollila
On Fri, Oct 03 2014, David Bremner brem...@debian.org wrote: W. Trevor King wk...@tremily.us writes: This allows us to capture stdout and stderr separately, and do other explicit subprocess manipulation without resorting to external packages. It should be compatible with Python 2.6 and

[PATCH 11/11] lib: Remove unnecessary thread linking steps when using ghost messages

2014-10-03 Thread Austin Clements
From: Austin Clements amdra...@mit.edu Previously, it was necessary to link new messages to children to work around some (though not all) problems with the old metadata-based approach to stored thread IDs. With ghost messages, this is no longer necessary, so don't bother with child linking when

[PATCH 05/11] lib: Update database schema doc for ghost messages

2014-10-03 Thread Austin Clements
From: Austin Clements amdra...@mit.edu This describes the structure of ghost mail documents. Ghost messages are not yet implemented. --- lib/database.cc | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index

[PATCH 00/11] Add ghost messages and fix thread linking

2014-10-03 Thread Austin Clements
This series modifies our database representation of messages that have been referenced by other messages, but for which we don't have the message itself. Currently, we store this information as Xapian metadata, but this has several downsides for performance and complexity and results in

[PATCH 06/11] lib: Internal support for querying and creating ghost messages

2014-10-03 Thread Austin Clements
From: Austin Clements amdra...@mit.edu This updates the message abstraction to support ghost messages: it adds a message flag that distinguishes regular messages from ghost messages, and an internal function for initializing a newly created (blank) message as a ghost message. --- lib/message.cc

[PATCH 08/11] lib: Implement upgrade to ghost messages feature

2014-10-03 Thread Austin Clements
From: Austin Clements amdra...@mit.edu Somehow this is the first upgrade pass that actually does *any* error checking, so this also adds the bit of necessary infrastructure to handle that. --- lib/database.cc | 64 +++-- 1 file changed, 62

[PATCH 02/11] lib: Refactor _notmuch_database_link_message

2014-10-03 Thread Austin Clements
From: Austin Clements amdra...@mit.edu This moves the code to retrieve and clear the metadata thread ID out of _notmuch_database_link_message into its own function. This will simplify future changes. --- lib/database.cc | 69 +++-- 1 file

[PATCH 09/11] lib: Enable ghost messages feature

2014-10-03 Thread Austin Clements
From: Austin Clements amdra...@mit.edu This fixes the broken thread order test. --- lib/database-private.h| 2 +- test/T260-thread-order.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/database-private.h b/lib/database-private.h index e2e4bc8..15e03cc 100644 ---

[PATCH 10/11] test: Test upgrade to ghost messages feature

2014-10-03 Thread Austin Clements
--- test/T530-upgrade.sh | 21 + 1 file changed, 21 insertions(+) diff --git a/test/T530-upgrade.sh b/test/T530-upgrade.sh index c4c4ac8..6b42a69 100755 --- a/test/T530-upgrade.sh +++ b/test/T530-upgrade.sh @@ -116,4 +116,25 @@ MAIL_DIR/bar/new/21:2, MAIL_DIR/bar/new/22:2,

[PATCH 04/11] lib: Add a ghost messages database feature

2014-10-03 Thread Austin Clements
From: Austin Clements amdra...@mit.edu This will be implemented over the next several patches. The feature is not yet enabled (this does not add it to NOTMUCH_FEATURES_CURRENT). --- lib/database-private.h | 7 +++ lib/database.cc| 2 ++ 2 files changed, 9 insertions(+) diff --git

[PATCH 03/11] lib: Handle empty date value

2014-10-03 Thread Austin Clements
From: Austin Clements amdra...@mit.edu In the interest of robustness, avoid undefined behavior of sortable_unserialise if the date value is missing. This shouldn't happen now, but ghost messages will have blank date values. --- lib/message.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 07/11] lib: Implement ghost-based thread linking

2014-10-03 Thread Austin Clements
From: Austin Clements amdra...@mit.edu This updates the thread linking code to use ghost messages instead of user metadata to link messages into threads. In contrast with the old approach, this is actually correct. Previously, thread merging updated only the thread IDs of message documents, not

[PATCH 01/11] lib: Move message ID compression to _notmuch_message_create_for_message_id

2014-10-03 Thread Austin Clements
From: Austin Clements amdra...@mit.edu Previously, this was performed by notmuch_database_add_message. This happens to be the only caller currently (which is why this was safe), but we're about to introduce more callers, and it makes more sense to put responsibility for ID compression in the

[PATCH] NEWS: News for notmuch-jump

2014-10-03 Thread Austin Clements
--- NEWS | 15 +++ 1 file changed, 15 insertions(+) diff --git a/NEWS b/NEWS index 2d85090..fa57e5d 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,21 @@ Notmuch 0.19 (UNRELEASED) = +Emacs Interface +--- + +Use the `j` key to access saved searches from

[PATCH] doc: Emacs manual improvements and expansions

2014-10-03 Thread Austin Clements
Fix several typos, improve general wording and flow, and add some information on notmuch-jump. --- Sorry I didn't tease these changes apart. I went through it linearly and it didn't seem worth the trouble of separating them after the fact. doc/notmuch-emacs.rst | 50

[PATCH] debian: append elinks to notmuch-vim dependencies

2014-10-03 Thread Sergei Shilovsky
notmuch-vim uses elinks to convert HTML messages to text. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 6298deb..146dfea 100644 --- a/debian/control +++ b/debian/control @@ -128,7 +128,7 @@ Architecture: all Section:

[PATCH] test: Port atomicity test to Python

2014-10-03 Thread Austin Clements
Previously, this was implemented using a horrible GDB script (because there is no such thing as a non-horrible GDB script). This GDB script often broke with newer versions of GDB for mysterious reasons. Port the test script to GDB's Python API, which makes the code much cleaner and, hopefully,

Re: [PATCH] test: Port atomicity test to Python

2014-10-03 Thread Austin Clements
On Fri, 03 Oct 2014, Austin Clements acleme...@csail.mit.edu wrote: Previously, this was implemented using a horrible GDB script (because there is no such thing as a non-horrible GDB script). This GDB script often broke with newer versions of GDB for mysterious reasons. Port the test script

[PATCH v6 2/2] nmbug: Add a 'help' command for folks who don't like --help

2014-10-03 Thread W. Trevor King
The 'if args.func == help' block at the end avoids: AttributeError: 'functools.partial' object has no attribute '__code__' --- devel/nmbug/nmbug | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug index

[PATCH v6 0/2] nmbug: Translate to Python

2014-10-03 Thread W. Trevor King
Hopefully the last round :). Changes since v5 [1]: * Dropped 2.6 compatibility claim from the first patch's commit message, since Tomi pointed out that at least the '{}'.format() syntax is just since 2.7. * Added a new 'help' command as a separate patch at David's request. [1]:

[PATCH v6 1/2] nmbug: Translate to Python

2014-10-03 Thread W. Trevor King
This allows us to capture stdout and stderr separately, and do other explicit subprocess manipulation without resorting to external packages. It should be compatible with Python 2.7 and later (including the 3.x series). Most of the user-facing interface is the same, but there are a few changes,

Re: [PATCH v2] VIM: Use notmuch CLI for config

2014-10-03 Thread Ian Main
David Bremner wrote: Ian Main im...@stemwinder.org writes: This patch switches from reading .notmuch-config directly to using the CLI the same way that emacs does it. It actually uses less code and is probably less error prone. Ian The general approach seems sane; it seems

[PATCH 1/2] test: check for debug symbols in notmuch

2014-10-03 Thread David Bremner
In the future, tests may rely on debug symbols being present in notmuch, so we plan to switch the default flags. The main purpose of this test is to help explain the perhaps mysterious failures of other tests which rely on symbols being present. --- test/T000-basic.sh | 5 + 1 file changed,

[PATCH 2/2] configure: add debug flags by default.

2014-10-03 Thread David Bremner
This makes development (in particular the test suite) easier. Those concerned about the extra diskspace can override the default or use strip. --- configure | 2 +- test/T000-basic.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/configure b/configure index

Re: [PATCH 1/2] test: check for debug symbols in notmuch

2014-10-03 Thread Tomi Ollila
On Fri, Oct 03 2014, David Bremner da...@tethera.net wrote: In the future, tests may rely on debug symbols being present in notmuch, so we plan to switch the default flags. The main purpose of this test is to help explain the perhaps mysterious failures of other tests which rely on symbols

RE: notmuch-vim doesn't respect notmuch config defaults

2014-10-03 Thread Ian Main
Sergei Shilovsky wrote: I would suggest to use `notmuch config list` to get configuration values in vim if possible Reproduction example follows: /home/sh cat .notmuch-config [new] tags=new;inbox;unread ignore= [search] exclude_tags=deleted;spam [maildir]

[no subject]

2014-10-03 Thread David Bremner
This is in some sense a successor to id:cover.1411914914.git.j...@nikula.org It includes the first two patches of that series verbatim, and adds some tests. ___ notmuch mailing list notmuch@notmuchmail.org

[Patch v2.5 3/4] cli/insert: require succesful message indexing for success status

2014-10-03 Thread David Bremner
From: Jani Nikula j...@nikula.org Add --keep option to keep any remaining stuff in index or file. We could distinguish between failures to index and failures to apply tags or maildir sync, but for simplicity just have one. --- doc/man1/notmuch-insert.rst | 19 ---

[Patch v2.5 4/4] test/insert: check that indexing errors are accepted with --keep

2014-10-03 Thread David Bremner
This is overkill for the current code path, but should provide some robustness for future changes in error handling. --- test/T070-insert.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/test/T070-insert.sh b/test/T070-insert.sh index be8060e..80a22c1 100755 --- a/test/T070-insert.sh

[Patch v2.5 1/4] test/insert: add known broken tests for indexing failures

2014-10-03 Thread David Bremner
These tests are written with the assumption that we want all indexing failures to be considered as failures by notmuch insert. --- test/T070-insert.sh | 22 ++ 1 file changed, 22 insertions(+) diff --git a/test/T070-insert.sh b/test/T070-insert.sh index ea9db07..40a7636

[Patch v2.5 2/4] cli/insert: add fail path to add_file_to_database

2014-10-03 Thread David Bremner
From: Jani Nikula j...@nikula.org Handle failures gracefully in add_file_to_database, renamed simply add_file while at it. Add keep option to not remove the message from database if tagging or tag syncing to maildir flags fails. Expand the function documentation to cover the changes. ---

Re:

2014-10-03 Thread David Bremner
David Bremner da...@tethera.net writes: This is in some sense a successor to id:cover.1411914914.git.j...@nikula.org It includes the first two patches of that series verbatim, and adds some tests. I should have said _almost_ verbatim; it marks some tests non-broken.

Re: [PATCH 07/11] lib: Implement ghost-based thread linking

2014-10-03 Thread Carl Worth
On Fri, Oct 03 2014, Austin Clements wrote: This updates the thread linking code to use ghost messages instead of user metadata to link messages into threads. In contrast with the old approach, this is actually correct. Hi Austin, I've read through your commit messages, (not the code), and I

Re: [PATCH] Add default configuration values to the man page

2014-10-03 Thread David Bremner
Sergei Shilovsky sshilov...@gmail.com writes: **new.tags** A list of tags that will be added to all messages incorporated by **notmuch new**. +Default: ``unread;inbox``. + There is actually something a bit subtle about some of these defaults. Some of them

Re: [PATCH] NEWS: News for notmuch-jump

2014-10-03 Thread David Bremner
Austin Clements acleme...@csail.mit.edu writes: --- NEWS | 15 +++ 1 file changed, 15 insertions(+) pushed, with thanks. d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch