[WIP PATCH 1/4] lib: Only sync modified message documents

2014-10-13 Thread Austin Clements
From: Austin Clements <amdra...@mit.edu> Previously, we updated the database copy of a message on every call to _notmuch_message_sync, even if nothing had changed. In particular, this always happens on a thaw, so a freeze/thaw pair with no modifications between still caused a database

[WIP PATCH 0/4] Add message revision tracking

2014-10-13 Thread Austin Clements
This implements message revision tracking. This is definitely a work-in-progress, but I wanted to post it since I don't know when I'll be able to work on it next (and maybe someone else can run with it in the mean time). I think this makes all of the necessary library-side changes, but doesn't

[WIP PATCH 0/4] Add message revision tracking

2014-10-13 Thread Austin Clements
This implements message revision tracking. This is definitely a work-in-progress, but I wanted to post it since I don't know when I'll be able to work on it next (and maybe someone else can run with it in the mean time). I think this makes all of the necessary library-side changes, but doesn't

[WIP PATCH 3/4] lib: API to retrieve database revision and UUID

2014-10-13 Thread Austin Clements
This exposes the committed database revision to library users along with a UUID that can be used to detect when revision numbers are no longer comparable (e.g., because the database has been replaced). --- lib/database-private.h | 1 + lib/database.cc| 11 +++ lib/notmuch.h

[WIP PATCH 4/4] lib: Add lastmod: queries for filtering by last modification

2014-10-13 Thread Austin Clements
From: Austin Clements amdra...@mit.edu XXX Includes reference to notmuch search --db-revision, which doesn't exist. --- doc/man7/notmuch-search-terms.rst | 8 lib/database-private.h| 1 + lib/database.cc | 4 3 files changed, 13 insertions(+) diff

[WIP PATCH 2/4] lib: Add per-message last modification tracking

2014-10-13 Thread Austin Clements
From: Austin Clements amdra...@mit.edu This adds a new document value that stores the revision of the last modification to message metadata, where the revision number increases monotonically with each database commit. An alternative would be to store the wall-clock time of the last modification

[WIP PATCH 1/4] lib: Only sync modified message documents

2014-10-13 Thread Austin Clements
From: Austin Clements amdra...@mit.edu Previously, we updated the database copy of a message on every call to _notmuch_message_sync, even if nothing had changed. In particular, this always happens on a thaw, so a freeze/thaw pair with no modifications between still caused a database update. We

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

2014-10-06 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 l

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

2014-10-06 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 v2 10/12] lib: Enable ghost messages feature

2014-10-06 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

[PATCH v2 09/12] lib: Implement upgrade to ghost messages feature

2014-10-06 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 | 66 +++-- 1 file chang

[PATCH v2 08/12] lib: Implement ghost-based thread linking

2014-10-06 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 doc

[PATCH v2 07/12] lib: Internal support for querying and creating ghost messages

2014-10-06 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. --

[PATCH v2 06/12] lib: Introduce macros for bit operations

2014-10-06 Thread Austin Clements
These macros help clarify basic bit-twiddling code and are written to be robust against C undefined behavior of shift operators. --- lib/message.cc| 6 +++--- lib/notmuch-private.h | 11 +++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/message.cc

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

2014-10-06 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 8

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

2014-10-06 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 ins

[PATCH v2 03/12] lib: Handle empty date value

2014-10-06 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(+)

[PATCH v2 02/12] lib: Refactor _notmuch_database_link_message

2014-10-06 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 +++--

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

2014-10-06 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 compr

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

2014-10-06 Thread Austin Clements
This is v2 of the id:1412345958-8278-1-git-send-email-aclements at csail.mit.edu. This adds some comments and clarifies some code as suggested by David. Patch 6 is new in v2 and adds some bit-twiddling macros for clarity and robustness in later patches. The diff from v1 is below. diff --git

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

2014-10-06 Thread Austin Clements
On Mon, 06 Oct 2014, David Bremner wrote: > Austin Clements writes: > >> >> I'm used to reading this stuff, so either way is fine with me. Do we >> have bit set / clear / read macros? >> > > I guess not. the things we have in query.cc are related but diffe

[PATCH 02/11] lib: Refactor _notmuch_database_link_message

2014-10-06 Thread Austin Clements
Quoth David Bremner on Oct 06 at 8:04 am: > Austin Clements writes: > > > Quoth David Bremner on Oct 05 at 9:45 am: > >> Austin Clements writes: > >> > +void *local = talloc_new (NULL); > >> > >> What's the advantage of using a local tal

Re: [PATCH 02/11] lib: Refactor _notmuch_database_link_message

2014-10-06 Thread Austin Clements
Quoth David Bremner on Oct 06 at 8:04 am: Austin Clements acleme...@csail.mit.edu writes: Quoth David Bremner on Oct 05 at 9:45 am: Austin Clements acleme...@csail.mit.edu writes: +void *local = talloc_new (NULL); What's the advantage of using a local talloc context here

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

2014-10-06 Thread Austin Clements
On Mon, 06 Oct 2014, David Bremner da...@tethera.net wrote: Austin Clements acleme...@csail.mit.edu writes: I'm used to reading this stuff, so either way is fine with me. Do we have bit set / clear / read macros? I guess not. the things we have in query.cc are related but different. I

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

2014-10-06 Thread Austin Clements
This is v2 of the id:1412345958-8278-1-git-send-email-acleme...@csail.mit.edu. This adds some comments and clarifies some code as suggested by David. Patch 6 is new in v2 and adds some bit-twiddling macros for clarity and robustness in later patches. The diff from v1 is below. diff --git

[PATCH v2 07/12] lib: Internal support for querying and creating ghost messages

2014-10-06 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 v2 05/12] lib: Update database schema doc for ghost messages

2014-10-06 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 8fd7fad

[PATCH v2 06/12] lib: Introduce macros for bit operations

2014-10-06 Thread Austin Clements
These macros help clarify basic bit-twiddling code and are written to be robust against C undefined behavior of shift operators. --- lib/message.cc| 6 +++--- lib/notmuch-private.h | 11 +++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/message.cc

[PATCH v2 08/12] lib: Implement ghost-based thread linking

2014-10-06 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

[PATCH v2 02/12] lib: Refactor _notmuch_database_link_message

2014-10-06 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 v2 09/12] lib: Implement upgrade to ghost messages feature

2014-10-06 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 | 66 +++-- 1 file changed, 64

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

2014-10-06 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 v2 03/12] lib: Handle empty date value

2014-10-06 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 v2 11/12] test: Test upgrade to ghost messages feature

2014-10-06 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 v2 04/12] lib: Add a ghost messages database feature

2014-10-06 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 v2 01/12] lib: Move message ID compression to _notmuch_message_create_for_message_id

2014-10-06 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

[PATCH v2 10/12] lib: Enable ghost messages feature

2014-10-06 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 08/11] lib: Implement upgrade to ghost messages feature

2014-10-05 Thread Austin Clements
Quoth David Bremner on Oct 05 at 10:56 am: > Austin Clements writes: > > +if (new_features & NOTMUCH_FEATURE_GHOSTS) { > > + t_end = db->metadata_keys_end ("thread_id_"); > > + for (t = db->metadata_keys_begin ("thread_id_"); t != t_end;

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

2014-10-05 Thread Austin Clements
Quoth David Bremner on Oct 05 at 10:30 am: > Austin Clements writes: > > > + message->flags &= ~(1 << NOTMUCH_MESSAGE_FLAG_GHOST); > > What do you think about using bit set / clear / read macros? I don't > insist, but I wonder if it would make

[PATCH 02/11] lib: Refactor _notmuch_database_link_message

2014-10-05 Thread Austin Clements
Quoth David Bremner on Oct 05 at 9:45 am: > Austin Clements writes: > > +void *local = talloc_new (NULL); > > What's the advantage of using a local talloc context here? Is this just > an optimization? There are a few allocations that wind up going in to this loc

Re: [PATCH 02/11] lib: Refactor _notmuch_database_link_message

2014-10-05 Thread Austin Clements
Quoth David Bremner on Oct 05 at 9:45 am: Austin Clements acleme...@csail.mit.edu writes: +void *local = talloc_new (NULL); What's the advantage of using a local talloc context here? Is this just an optimization? There are a few allocations that wind up going in to this local context

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

2014-10-05 Thread Austin Clements
Quoth David Bremner on Oct 05 at 10:30 am: Austin Clements acleme...@csail.mit.edu writes: + message-flags = ~(1 NOTMUCH_MESSAGE_FLAG_GHOST); What do you think about using bit set / clear / read macros? I don't insist, but I wonder if it would make this part more readable. I'm

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

2014-10-05 Thread Austin Clements
Quoth David Bremner on Oct 05 at 10:56 am: Austin Clements acleme...@csail.mit.edu writes: +if (new_features NOTMUCH_FEATURE_GHOSTS) { + t_end = db-metadata_keys_end (thread_id_); + for (t = db-metadata_keys_begin (thread_id_); t != t_end; ++t) + ++total

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

2014-10-04 Thread Austin Clements
On Sat, 04 Oct 2014, Tomi Ollila wrote: > On Fri, Oct 03 2014, Austin Clements wrote: > >> 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, w

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

2014-10-04 Thread Austin Clements
On Sat, 04 Oct 2014, Tomi Ollila tomi.oll...@iki.fi wrote: On Fri, Oct 03 2014, Austin Clements acleme...@csail.mit.edu wrote: 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

[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'

[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] 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 <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 l

[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 <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

[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 chang

[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 doc

[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. --

[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 8

[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 ins

[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(+)

[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 +++--

[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 compr

[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 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 8fd7fad

[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

[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

[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] 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 v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread Austin Clements
On Thu, 02 Oct 2014, "W. Trevor King" wrote: > On Thu, Oct 02, 2014 at 03:19:08PM -0400, Austin Clements wrote: >> This patch simplifies notmuch_database_close to explicitly abort any >> outstanding transaction and then just call Database::close. This >> works fo

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

2014-10-02 Thread Austin Clements
From: Austin Clements <amdra...@mit.edu> In Xapian, closing a database implicitly aborts any outstanding transaction and commits changes. For historical reasons, notmuch_database_close had grown to almost, but not quite duplicate this behavior. Before closing the database, it would expl

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

2014-10-02 Thread Austin Clements
On Wed, 24 Sep 2014, "W. Trevor King" wrote: > On Wed, Sep 24, 2014 at 05:32:50PM -0400, Austin Clements wrote: >> + * If the caller is currently in an atomic section (there was a >> + * notmuch_database_begin_atomic without a matching >> + * notmuch_databa

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

2014-10-02 Thread Austin Clements
From: Austin Clements amdra...@mit.edu In Xapian, closing a database implicitly aborts any outstanding transaction and commits changes. For historical reasons, notmuch_database_close had grown to almost, but not quite duplicate this behavior. Before closing the database, it would explicitly

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

2014-10-02 Thread Austin Clements
On Wed, 24 Sep 2014, W. Trevor King wk...@tremily.us wrote: On Wed, Sep 24, 2014 at 05:32:50PM -0400, Austin Clements wrote: + * If the caller is currently in an atomic section (there was a + * notmuch_database_begin_atomic without a matching + * notmuch_database_end_atomic), this will abort

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

2014-10-02 Thread Austin Clements
On Thu, 02 Oct 2014, W. Trevor King wk...@tremily.us wrote: On Thu, Oct 02, 2014 at 03:19:08PM -0400, Austin Clements wrote: 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

Bug#762950: digikam: Removes all images from database when docker.io is running

2014-09-26 Thread Austin Clements
Package: digikam Version: 4:4.1.0-1+b1 Severity: important Dear Maintainer, Digikam has a serious incompatibility with docker.io due to the particular way the docker daemon manages mounts. If the docker daemon is running and the user starts Digikam, Digikam will delete all album metadata from

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

2014-09-24 Thread Austin Clements
From: Austin Clements <amdra...@mit.edu> In Xapian, closing a database implicitly aborts any outstanding transaction and commits changes. For historical reasons, notmuch_database_close had grown to almost, but not quite duplicate this behavior. Before closing the database, it would expl

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

2014-09-24 Thread Austin Clements
From: Austin Clements <amdra...@mit.edu> In Xapian, closing a database implicitly aborts any outstanding transaction and commits changes. For historical reasons, notmuch_database_close had grown to almost, but not quite duplicate this behavior. Before closing the database, it would expl

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

2014-09-24 Thread Austin Clements
From: Austin Clements amdra...@mit.edu In Xapian, closing a database implicitly aborts any outstanding transaction and commits changes. For historical reasons, notmuch_database_close had grown to almost, but not quite duplicate this behavior. Before closing the database, it would explicitly

[PATCH] emacs: jump: fix compile warning on emacs 23

2014-09-22 Thread Austin Clements
LGTM. I'm a little surprised this is necessary, but whatever. I think the eval-and-compile has to be top-level; it's certainly not wrong for it to be top-level. (I like the comment in the eval-and-compile implementation: ";; Remember, it's magic.") On Thu, 04 Sep 2014, Mark Walters wrote: >

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

2014-09-22 Thread Austin Clements
Quoth W. Trevor King on Sep 22 at 9:59 am: > On Mon, Sep 22, 2014 at 11:43:35AM -0400, Austin Clements wrote: > > This patch simplifies notmuch_database_close to just call > > Database::close. This works for both read-only and read/write > > databases, takes care of commit

Do path: searches handle spaces correctly?

2014-09-22 Thread Austin Clements
Quoth Keith Amidon on Sep 22 at 7:42 am: > On Mon, 2014-09-22 at 11:20 +0200, David Bremner wrote: > > Keith Amidon writes: > > > > > > notmuch search --output=files path:'dir/INBOX/INBOX/Sent Items' > > > > > > I don't get any results, but it seems like the two results above should > > > be

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

2014-09-22 Thread Austin Clements
In Xapian, closing a database implicitly aborts any outstanding transaction and commits changes. For historical reasons, notmuch_database_close had grown to almost, but not quite duplicate this behavior. Before closing the database, it would explicitly (and unnecessarily) commit it. However, if

[PATCH] Add configurable changed tag to messages that have been changed on disk

2014-09-22 Thread Austin Clements
On Mon, 22 Sep 2014, Gaute Hope wrote: > Excerpts from Gaute Hope's message of August 6, 2014 10:29: >> Austin Clements wrote on Fri, 01 Aug 2014 14:55:05 >> -0400: >>> I have a prototype implementation of message modification times on my >>> lastmod-v1 branch

Re: Do path: searches handle spaces correctly?

2014-09-22 Thread Austin Clements
Quoth Keith Amidon on Sep 22 at 7:42 am: On Mon, 2014-09-22 at 11:20 +0200, David Bremner wrote: Keith Amidon ke...@awakenetworks.com writes: notmuch search --output=files path:'dir/INBOX/INBOX/Sent Items' I don't get any results, but it seems like the two results above should

Re: [PATCH] Add configurable changed tag to messages that have been changed on disk

2014-09-22 Thread Austin Clements
On Mon, 22 Sep 2014, Gaute Hope e...@gaute.vetsj.com wrote: Excerpts from Gaute Hope's message of August 6, 2014 10:29: Austin Clements amdra...@mit.edu wrote on Fri, 01 Aug 2014 14:55:05 -0400: I have a prototype implementation of message modification times on my lastmod-v1 branch

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

2014-09-22 Thread Austin Clements
In Xapian, closing a database implicitly aborts any outstanding transaction and commits changes. For historical reasons, notmuch_database_close had grown to almost, but not quite duplicate this behavior. Before closing the database, it would explicitly (and unnecessarily) commit it. However, if

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

2014-09-22 Thread Austin Clements
Quoth W. Trevor King on Sep 22 at 9:59 am: On Mon, Sep 22, 2014 at 11:43:35AM -0400, Austin Clements wrote: This patch simplifies notmuch_database_close to just call Database::close. This works for both read-only and read/write databases, takes care of committing changes, unifies

Re: [PATCH] emacs: jump: fix compile warning on emacs 23

2014-09-22 Thread Austin Clements
LGTM. I'm a little surprised this is necessary, but whatever. I think the eval-and-compile has to be top-level; it's certainly not wrong for it to be top-level. (I like the comment in the eval-and-compile implementation: ;; Remember, it's magic.) On Thu, 04 Sep 2014, Mark Walters

Bug#760653: dovecot-core: failure to create self-signed certificate

2014-09-06 Thread Austin Clements
Package: dovecot-core Version: 1:2.2.13-4 Severity: normal Dear Maintainer, When attempting to freshly install Dovecot with an installer-generated self-signed certificate, I get the following error from postinst: Warning : Bad SSL config, can't generate certificate. Openssl output was:

[PATCH] cli: Be more helpful when .notmuch-config does not exist

2014-09-03 Thread Austin Clements
Previously, if the user ran any subcommand that required a configuration (e.g., notmuch new) but didn't have a configuration, notmuch would give the rather un-friendly and un-actionable message Error reading configuration file .notmuch-config: No such file or directory Since this condition is

[PATCH] cli: Be more helpful when .notmuch-config does not exist

2014-09-03 Thread Austin Clements
Previously, if the user ran any subcommand that required a configuration (e.g., notmuch new) but didn't have a configuration, notmuch would give the rather un-friendly and un-actionable message Error reading configuration file .notmuch-config: No such file or directory Since this condition is

<    1   2   3   4   5   6   7   8   9   10   >