Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-30 Thread Austin Clements
Quoth Jani Nikula on Jan 25 at 5:38 pm: On Sat, 25 Jan 2014, Jani Nikula j...@nikula.org wrote: Perhaps we need to have two prefixes, one of which is the literal filesystem folder and another which hides the implementation details, like I mentioned in my mail to Peter [1]. But consider

[PATCH 0/5] lib: make folder: prefix literal

2014-01-29 Thread Austin Clements
Quoth Carl Worth on Jan 29 at 11:32 am: > Jani Nikula writes: > > Unfortunately, I haven't had the time to experiment with this. But it > > bugs me that the probabilistic folder: prefix has stemming and it's case > > insensitive. It's possible to work around the stemming with the anchors > > you

Unexpected search results

2014-01-28 Thread Austin Clements
Notmuch uses word-based indexing, not a sub-string indexing (think Google, not grep), which is why your prefix searches didn't return anything. Based on your search results, it looks like the emails you found were from "Demiurg HG ". from:demiurg returned these results because it matched the

[PATCH 1/1] emacs: ad-activate 'mm-shr after ad-disable-advice 'mm-shr

2014-01-28 Thread Austin Clements
On Mon, 27 Jan 2014, Tomi Ollila wrote: > Imitated from "Enabling advice" in Emacs lisp manual... > > ad-disable-advice by itself only changes the enable flag for a > piece of advice. To make the change take effect in the > advised definition, the advice needs to be activated again. Oops, looks

[PATCH 2/5] test: fix insert folder: searches

2014-01-24 Thread Austin Clements
This is the other reason I disagree with including cur/new. If we strip it, people's existing folder: searches will mostly continue to work. If we include it, such saved searches, scripted searches, and post-new hooks are guaranteed to break. On Thu, 09 Jan 2014, Jani Nikula wrote: > folder:

[PATCH 1/5] lib: make folder: prefix literal

2014-01-24 Thread Austin Clements
On Thu, 09 Jan 2014, Jani Nikula wrote: > In xapian terms, convert folder: prefix from probabilistic to boolean > prefix. This change constitutes a database change: bump the database > version and add database upgrade support. > --- > lib/database.cc | 39 - > lib/message.cc

[PATCH 0/5] lib: make folder: prefix literal

2014-01-24 Thread Austin Clements
On Thu, 09 Jan 2014, Jani Nikula wrote: > Hi all, this series makes the folder: search prefix literal, or switches > it from a probabilistic prefix to a boolean prefix. With this, you have > to give the path from the maildir root to the folder you want in full, > including the maildir cur/new

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-24 Thread Austin Clements
On Thu, 09 Jan 2014, Jani Nikula j...@nikula.org wrote: Hi all, this series makes the folder: search prefix literal, or switches it from a probabilistic prefix to a boolean prefix. With this, you have to give the path from the maildir root to the folder you want in full, including the maildir

Re: [PATCH 1/5] lib: make folder: prefix literal

2014-01-24 Thread Austin Clements
On Thu, 09 Jan 2014, Jani Nikula j...@nikula.org wrote: In xapian terms, convert folder: prefix from probabilistic to boolean prefix. This change constitutes a database change: bump the database version and add database upgrade support. --- lib/database.cc | 39 -

Re: [PATCH 2/5] test: fix insert folder: searches

2014-01-24 Thread Austin Clements
This is the other reason I disagree with including cur/new. If we strip it, people's existing folder: searches will mostly continue to work. If we include it, such saved searches, scripted searches, and post-new hooks are guaranteed to break. On Thu, 09 Jan 2014, Jani Nikula j...@nikula.org

[PATCH 2/2] insert: respect maildir.synchronize_flags

2014-01-01 Thread Austin Clements
LGTM. Quoth Jani Nikula on Jan 01 at 5:20 pm: > Don't synchronize maildir flags if the user doesn't want it.

Re: [PATCH 2/2] insert: respect maildir.synchronize_flags

2014-01-01 Thread Austin Clements
LGTM. Quoth Jani Nikula on Jan 01 at 5:20 pm: Don't synchronize maildir flags if the user doesn't want it. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH] test: Fix transient error in 'new' test

2013-12-23 Thread Austin Clements
This fixes a non-deterministic failure in "Ignore files and directories specified in new.ignore (multiple occurrences)". The test assumed that all directories would be scanned, even though nothing updated the mtime of ${MAIL_DIR}. It *usually* worked nevertheless because the tests run quickly

[PATCH] test: Fix transient error in 'new' test

2013-12-23 Thread Austin Clements
This fixes a non-deterministic failure in Ignore files and directories specified in new.ignore (multiple occurrences). The test assumed that all directories would be scanned, even though nothing updated the mtime of ${MAIL_DIR}. It *usually* worked nevertheless because the tests run quickly

display text/html by default

2013-12-17 Thread Austin Clements
Quoth Jameson Graef Rollins on Dec 17 at 7:54 am: > On Mon, Dec 16 2013, David Belohrad wrote: > > could someone help: > > > > when I open an email, it is automatically displayed as 'text/plain'. If > > this mail has however CID attachments (pictures), they are not in this > > view displayed by

Re: display text/html by default

2013-12-17 Thread Austin Clements
Quoth Jameson Graef Rollins on Dec 17 at 7:54 am: On Mon, Dec 16 2013, David Belohrad da...@belohrad.ch wrote: could someone help: when I open an email, it is automatically displayed as 'text/plain'. If this mail has however CID attachments (pictures), they are not in this view

[PATCH v3 part 3/3] test: implement and document NOTMUCH_TEST_QUIET variable usage

2013-12-08 Thread Austin Clements
v3 LGTM. Quoth Tomi Ollila on Dec 05 at 2:46 pm: > When NOTMUCH_TEST_QUIET environment variable is set to non-null value > messages when new test script starts and when test PASSes are disabled. > This eases picking the cases when tests FAIL (as those are still printed). > --- > > Diffdiff of

[PATCH 4/4] test: give unique timestamps to messages

2013-12-08 Thread Austin Clements
Quoth David Bremner on Dec 08 at 11:52 pm: > The choice of decreasing timestamps is a hack which reduces the number > of existing tests which fail. This can be changed to increasing > if/when somebody wants update another 47 tests. > --- > test/excludes| 4 ++-- > test/test-lib.sh | 2 +- >

[PATCH 3/4] test: sanitize dates in emacs, raw, and text output

2013-12-08 Thread Austin Clements
Quoth David Bremner on Dec 08 at 11:52 pm: > add a new function notmuch_date_sanitize for rfc822-ish things. Add > date sanitization to notmuch_show_sanitize_all and use it more places. > > This is all in aid of a transition to unique timestamps on messages. > --- > test/emacs | 12

Re: [PATCH 3/4] test: sanitize dates in emacs, raw, and text output

2013-12-08 Thread Austin Clements
Quoth David Bremner on Dec 08 at 11:52 pm: add a new function notmuch_date_sanitize for rfc822-ish things. Add date sanitization to notmuch_show_sanitize_all and use it more places. This is all in aid of a transition to unique timestamps on messages. --- test/emacs | 12 +++-

Re: [PATCH 4/4] test: give unique timestamps to messages

2013-12-08 Thread Austin Clements
Quoth David Bremner on Dec 08 at 11:52 pm: The choice of decreasing timestamps is a hack which reduces the number of existing tests which fail. This can be changed to increasing if/when somebody wants update another 47 tests. --- test/excludes| 4 ++-- test/test-lib.sh | 2 +- 2 files

Re: [PATCH v3 part 3/3] test: implement and document NOTMUCH_TEST_QUIET variable usage

2013-12-08 Thread Austin Clements
v3 LGTM. Quoth Tomi Ollila on Dec 05 at 2:46 pm: When NOTMUCH_TEST_QUIET environment variable is set to non-null value messages when new test script starts and when test PASSes are disabled. This eases picking the cases when tests FAIL (as those are still printed). --- Diffdiff of part 3

[PATCH 3/3] test: implement and document NOTMUCH_TEST_QUIET variable usage

2013-12-04 Thread Austin Clements
On Wed, 04 Dec 2013, Austin Clements wrote: > I just tried to use this and realized it hadn't been pushed yet. > > This series LGTM except one minor nit below and the fact that it > introduces a lot of tab-indented code in sections of test-lib.sh that > appear to be space-i

[PATCH 1/2] lib: add return status to database close and destroy

2013-12-04 Thread Austin Clements
Quoth Jani Nikula on Dec 01 at 3:13 pm: > notmuch_database_close may fail in Xapian ->flush() or ->close(), so > report the status. Similarly for notmuch_database_destroy which calls > close. > > This is required for notmuch insert to report error status if message > indexing failed. > > Bump

[PATCH 3/3] lib: Bump library version from 3.0.0 to 3.1.0

2013-12-04 Thread Austin Clements
This version of the library introduces LIBNOTMUCH_CHECK_VERSION and the *_VERSION macros. Bumping the version number is also necessary to make the comment on LIBNOTMUCH_CHECK_VERSION no longer a lie. --- lib/Makefile.local | 2 +- lib/notmuch.h | 8 2 files changed, 5

[PATCH 2/3] lib: Replace NOTMUCH_*_VERSION with LIBNOTMUCH_*_VERSION

2013-12-04 Thread Austin Clements
This makes it clear that these macros refer to the *library* version, and not to the notmuch application-level release. Since there are no consumers of these macros yet, this is now or never. --- lib/notmuch.h | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff

[PATCH 1/3] lib: Make VERSION macros agree with soname version

2013-12-04 Thread Austin Clements
We have two distinct "library version" numbers: the soname version and the version macros. We need both for different reasons: the version macros enable easy compile-time version detection (and conditional compilation), while the soname version enables runtime version detection (which includes

[PATCH 3/3] test: implement and document NOTMUCH_TEST_QUIET variable usage

2013-12-04 Thread Austin Clements
I just tried to use this and realized it hadn't been pushed yet. This series LGTM except one minor nit below and the fact that it introduces a lot of tab-indented code in sections of test-lib.sh that appear to be space-indented. Given that test-lib.sh is already a mess of indentation styles, I

[PATCH 3/3] lib: Bump library version from 3.0.0 to 3.1.0

2013-12-04 Thread Austin Clements
This version of the library introduces LIBNOTMUCH_CHECK_VERSION and the *_VERSION macros. Bumping the version number is also necessary to make the comment on LIBNOTMUCH_CHECK_VERSION no longer a lie. --- lib/Makefile.local | 2 +- lib/notmuch.h | 8 2 files changed, 5

[PATCH 1/3] lib: Make VERSION macros agree with soname version

2013-12-04 Thread Austin Clements
We have two distinct library version numbers: the soname version and the version macros. We need both for different reasons: the version macros enable easy compile-time version detection (and conditional compilation), while the soname version enables runtime version detection (which includes the

[PATCH 2/3] lib: Replace NOTMUCH_*_VERSION with LIBNOTMUCH_*_VERSION

2013-12-04 Thread Austin Clements
This makes it clear that these macros refer to the *library* version, and not to the notmuch application-level release. Since there are no consumers of these macros yet, this is now or never. --- lib/notmuch.h | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff

Re: [PATCH 3/3] test: implement and document NOTMUCH_TEST_QUIET variable usage

2013-12-04 Thread Austin Clements
I just tried to use this and realized it hadn't been pushed yet. This series LGTM except one minor nit below and the fact that it introduces a lot of tab-indented code in sections of test-lib.sh that appear to be space-indented. Given that test-lib.sh is already a mess of indentation styles, I

Re: [PATCH 1/2] lib: add return status to database close and destroy

2013-12-04 Thread Austin Clements
Quoth Jani Nikula on Dec 01 at 3:13 pm: notmuch_database_close may fail in Xapian -flush() or -close(), so report the status. Similarly for notmuch_database_destroy which calls close. This is required for notmuch insert to report error status if message indexing failed. Bump the notmuch

Re: [PATCH 3/3] test: implement and document NOTMUCH_TEST_QUIET variable usage

2013-12-04 Thread Austin Clements
On Wed, 04 Dec 2013, Austin Clements amdra...@mit.edu wrote: I just tried to use this and realized it hadn't been pushed yet. This series LGTM except one minor nit below and the fact that it introduces a lot of tab-indented code in sections of test-lib.sh that appear to be space-indented

Re: [PATCH 2/2] lib: introduce notmuch_database_new for initializing a database handle

2013-12-04 Thread Austin Clements
Quoth Jani Nikula on Dec 01 at 3:14 pm: There is a need for setting options before opening a database, such as setting a logging function to use instead of writing to stdout or stderr. It would be possible to do this by adding new parameters to notmuch_database_create and

[PATCH 2/2] NEWS: News for big endian sha1 bug fix.

2013-11-24 Thread Austin Clements
Quoth david at tethera.net on Nov 24 at 5:29 pm: > From: David Bremner > > We could give more details about how to migrate tags, but I'm not sure > that it's a practical problem, or just a theoretical one. > --- > NEWS | 14 +- > 1 file changed, 13 insertions(+), 1 deletion(-) > >

Re: [PATCH 2/2] NEWS: News for big endian sha1 bug fix.

2013-11-24 Thread Austin Clements
Quoth da...@tethera.net on Nov 24 at 5:29 pm: From: David Bremner da...@tethera.net We could give more details about how to migrate tags, but I'm not sure that it's a practical problem, or just a theoretical one. --- NEWS | 14 +- 1 file changed, 13 insertions(+), 1

[PATCH] new: Detect dirent.d_type support at configure time

2013-11-23 Thread Austin Clements
Support for dirent.d_type is OS-specific. Previously, we used _DIRENT_HAVE_D_TYPE to detect support for this, but this is apparently a glic-ism (FreeBSD, for example, supports d_type, but does not define this). Since there's no cross-platform way to detect support for dirent.d_type, detect it

[PATCH] new: Detect dirent.d_type support at configure time

2013-11-23 Thread Austin Clements
Support for dirent.d_type is OS-specific. Previously, we used _DIRENT_HAVE_D_TYPE to detect support for this, but this is apparently a glic-ism (FreeBSD, for example, supports d_type, but does not define this). Since there's no cross-platform way to detect support for dirent.d_type, detect it

[PATCH] emacs: Correct documentation of `notmuch-poll-script'

2013-11-12 Thread Austin Clements
The functions referred to in the documentation for this variable were replaced by the unified `notmuch-poll-and-refresh-this-buffer' in 21474f0e. Update the documentation to reflect the new function. --- emacs/notmuch-lib.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH 8/8] emacs: Remove interactive behavior of `notmuch-tag'

2013-11-12 Thread Austin Clements
Quoth Jameson Graef Rollins on Nov 03 at 4:42 pm: > On Tue, Oct 22 2013, Austin Clements wrote: > > We no longer use this, since we've lifted all interactive behavior to > > the appropriate interactive entry points. Because of this, > > `notmuch-tag' also no longer ne

[PATCH 3/3] test: implement and document NOTMUCH_TEST_QUIET variable usage

2013-11-12 Thread Austin Clements
Quoth Tomi Ollila on Nov 12 at 10:41 pm: > When NOTMUCH_TEST_QUIET environment variable is set to non-null value > messages when new test script starts and when test PASSes are disabled. > This eases picking the cases when tests FAIL (as those are still printed). > --- > test/README

[PATCH v4 0/7] emacs: help: remap keybindings

2013-11-12 Thread Austin Clements
LGTM. Quoth Mark Walters on Nov 12 at 8:10 pm: > This is v4 of this patch set. v3 is at > id:1383932419-12533-1-git-send-email-markwalters1009 at gmail.com. > > David found a bug in v3 which I tracked down to some match-data being > over-written. This included the bugfix >

[PATCH] Accumulated news for Austin's changes

2013-11-12 Thread Austin Clements
--- NEWS | 52 1 file changed, 52 insertions(+) diff --git a/NEWS b/NEWS index 4f3b98a..1cbca9f 100644 --- a/NEWS +++ b/NEWS @@ -17,15 +17,67 @@ New options to better support handling duplicate messages bigger than the number of matching

[PATCH] notmuch: Add "maildir:" search option

2013-11-12 Thread Austin Clements
On Tue, 12 Nov 2013, Austin Clements wrote: > I think this is a great idea. Personally I think this is how folder: > should work. I find the semantics of folder: to be useless except where > they happen to coincide with the boolean semantics used here. > Unfortunately, changing f

[PATCH] notmuch: Add "maildir:" search option

2013-11-12 Thread Austin Clements
I think this is a great idea. Personally I think this is how folder: should work. I find the semantics of folder: to be useless except where they happen to coincide with the boolean semantics used here. Unfortunately, changing folder: would require versioning the database, which we have only

[PATCH] emacs: help: bugfix

2013-11-12 Thread Austin Clements
On Sun, 10 Nov 2013, Mark Walters wrote: > Hi > > David found a bug in the this remap/help series. He has a global > keybinding of "C-c s" for notmuch-search and this causes help in > tree-mode to hang. > > I have mostly diagnosed this: the problem comes that all the construct > help routines are

Re: [PATCH] notmuch: Add maildir: search option

2013-11-12 Thread Austin Clements
I think this is a great idea. Personally I think this is how folder: should work. I find the semantics of folder: to be useless except where they happen to coincide with the boolean semantics used here. Unfortunately, changing folder: would require versioning the database, which we have only

[PATCH] Accumulated news for Austin's changes

2013-11-12 Thread Austin Clements
--- NEWS | 52 1 file changed, 52 insertions(+) diff --git a/NEWS b/NEWS index 4f3b98a..1cbca9f 100644 --- a/NEWS +++ b/NEWS @@ -17,15 +17,67 @@ New options to better support handling duplicate messages bigger than the number of matching

Re: [PATCH v4 0/7] emacs: help: remap keybindings

2013-11-12 Thread Austin Clements
LGTM. Quoth Mark Walters on Nov 12 at 8:10 pm: This is v4 of this patch set. v3 is at id:1383932419-12533-1-git-send-email-markwalters1...@gmail.com. David found a bug in v3 which I tracked down to some match-data being over-written. This included the bugfix

Re: [PATCH 8/8] emacs: Remove interactive behavior of `notmuch-tag'

2013-11-12 Thread Austin Clements
Quoth Jameson Graef Rollins on Nov 03 at 4:42 pm: On Tue, Oct 22 2013, Austin Clements amdra...@mit.edu wrote: We no longer use this, since we've lifted all interactive behavior to the appropriate interactive entry points. Because of this, `notmuch-tag' also no longer needs to return

[PATCH] emacs: Correct documentation of `notmuch-poll-script'

2013-11-12 Thread Austin Clements
The functions referred to in the documentation for this variable were replaced by the unified `notmuch-poll-and-refresh-this-buffer' in 21474f0e. Update the documentation to reflect the new function. --- emacs/notmuch-lib.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH v3 0/7] emacs: help: remap keybindings

2013-11-08 Thread Austin Clements
LGTM. Quoth Mark Walters on Nov 08 at 5:40 pm: > This is version 3 of the series. v2 is at > id:1383870096-14627-1-git-send-email-markwalters1009 at gmail.com > > The changes are in response to Austin's review of v2. I have not > changed notmuch-describe-key. > > The other change is to add a

Re: [PATCH v3 0/7] emacs: help: remap keybindings

2013-11-08 Thread Austin Clements
LGTM. Quoth Mark Walters on Nov 08 at 5:40 pm: This is version 3 of the series. v2 is at id:1383870096-14627-1-git-send-email-markwalters1...@gmail.com The changes are in response to Austin's review of v2. I have not changed notmuch-describe-key. The other change is to add a base-keymap

[PATCH v2 4/5] emacs: help: add a special function to deal with remaps

2013-11-07 Thread Austin Clements
I like the way you separated this out. Quoth Mark Walters on Nov 08 at 12:21 am: > remaps are a rather unusual keymap consisting of "first key" 'remap > and then "second-key" the remapped-function. Thus we do the > documentation for it separately. > --- > emacs/notmuch-lib.el | 25

[PATCH v2 3/5] emacs: help: split out notmuch-describe-key as a function

2013-11-07 Thread Austin Clements
Quoth Mark Walters on Nov 08 at 12:21 am: > The actual documentation function notmuch-describe-keymap was getting > rather complicated so split out the code for a single key into its own > function notmuch-describe-key. > --- > emacs/notmuch-lib.el | 42

[PATCH v2 2/5] emacs: help: remove duplicate bindings

2013-11-07 Thread Austin Clements
Quoth Mark Walters on Nov 08 at 12:21 am: > If the user (or a mode) overrides a keybinding from the common keymap > in one of the modes then both help lines appear in the help screen > even though only one of the is applicable. s/the/them/ > > Fix this by checking if we already have that key

[PATCH 3/4] emacs: help: remap support

2013-11-07 Thread Austin Clements
I originally wanted to see these concerns separated -- to have a separate function that took care of resolving remaps to keep the logic out of notmuch-describe-keymap -- but then I tried to write that function and gave up. If you can think of a way to do that, I think it would make this code

[PATCH 1/4] emacs: help: check for nil key binding

2013-11-07 Thread Austin Clements
On Sat, 26 Oct 2013, Mark Walters wrote: > A standard way to unset a key binding is local-unset-key which is equivalent > to > (define-key (current-local-map) key nil) > Currently notmuch-help gives an error and fails if a user has done this. > > To fix this we check for a nil binding

Re: [PATCH 1/4] emacs: help: check for nil key binding

2013-11-07 Thread Austin Clements
On Sat, 26 Oct 2013, Mark Walters markwalters1...@gmail.com wrote: A standard way to unset a key binding is local-unset-key which is equivalent to (define-key (current-local-map) key nil) Currently notmuch-help gives an error and fails if a user has done this. To fix this we check for

Re: [PATCH 3/4] emacs: help: remap support

2013-11-07 Thread Austin Clements
I originally wanted to see these concerns separated -- to have a separate function that took care of resolving remaps to keep the logic out of notmuch-describe-keymap -- but then I tried to write that function and gave up. If you can think of a way to do that, I think it would make this code

Re: [PATCH v2 2/5] emacs: help: remove duplicate bindings

2013-11-07 Thread Austin Clements
Quoth Mark Walters on Nov 08 at 12:21 am: If the user (or a mode) overrides a keybinding from the common keymap in one of the modes then both help lines appear in the help screen even though only one of the is applicable. s/the/them/ Fix this by checking if we already have that key

Re: [PATCH v2 3/5] emacs: help: split out notmuch-describe-key as a function

2013-11-07 Thread Austin Clements
Quoth Mark Walters on Nov 08 at 12:21 am: The actual documentation function notmuch-describe-keymap was getting rather complicated so split out the code for a single key into its own function notmuch-describe-key. --- emacs/notmuch-lib.el | 42 +- 1

Re: [PATCH v2 4/5] emacs: help: add a special function to deal with remaps

2013-11-07 Thread Austin Clements
I like the way you separated this out. Quoth Mark Walters on Nov 08 at 12:21 am: remaps are a rather unusual keymap consisting of first key 'remap and then second-key the remapped-function. Thus we do the documentation for it separately. --- emacs/notmuch-lib.el | 25

[PATCH v2] new: Don't scan unchanged directories with no sub-directories

2013-10-24 Thread Austin Clements
This can substantially reduce the cost of notmuch new in some situations, such as when the file system cache is cold or when the Maildir is on NFS. --- This should fix the problem with directories containing symlinks to other directories, but no actual sub-directories. notmuch-new.c | 29

[PATCH] emacs: Add a space after completed tag operations

2013-10-24 Thread Austin Clements
Previously, when a user fully completed a tag operation, they had to press space to begin entering another tag operation. This is different from, say, shell file name completion, which typically inserts a space after an unambiguous completion under the assumption that the user will want to enter

[PATCH] new: Don't scan unchanged directories with no sub-directories

2013-10-24 Thread Austin Clements
There might be a problem with this patch. Directory entries that are *symlinks* to other directories do not increase the containing directory's link count, but we do count them as directories in add_files pass 1 and traverse in to them. Hence, if you had a directory that contained no

[PATCH] new: Don't scan unchanged directories with no sub-directories

2013-10-24 Thread Austin Clements
This can substantially reduce the cost of notmuch new in some situations, such as when the file system cache is cold or when the Maildir is on NFS. --- notmuch-new.c | 20 1 file changed, 20 insertions(+) diff --git a/notmuch-new.c b/notmuch-new.c index faa33f1..364c73a

[PATCH v2 11/11] emacs: Fix search tagging races

2013-10-24 Thread Austin Clements
This fixes races in thread-local and global tagging in notmuch-search (e.g., "+", "-", "a", "*", etc.). Previously, these would modify tags of new messages that arrived after the search. Now they only operate on the messages that were in the threads when the search was performed. This prevents

[PATCH v2 10/11] emacs: Add known-broken tests for search tagging races

2013-10-24 Thread Austin Clements
These tests check that both thread-local and global search tagging operations are race-free. They are currently known-broken because they aren't race-free. --- test/emacs | 26 ++ 1 file changed, 26 insertions(+) diff --git a/test/emacs b/test/emacs index

[PATCH v2 09/11] Add TODO about more efficient stable thread queries

2013-10-24 Thread Austin Clements
--- devel/TODO | 6 ++ 1 file changed, 6 insertions(+) diff --git a/devel/TODO b/devel/TODO index 844555e..f212483 100644 --- a/devel/TODO +++ b/devel/TODO @@ -114,6 +114,12 @@ are multiple ideas that might make sense. Some consensus needs to be reached on this issue, and then both reply

[PATCH v2 07/11] emacs: Use notmuch tag --batch for large tag queries

2013-10-24 Thread Austin Clements
(Unfortunately, it's difficult to first demonstrate this problem with a known-broken test because modern Linux kernels have argument length limits in the megabytes, which makes Emacs really slow!) --- emacs/notmuch-lib.el | 8 emacs/notmuch-tag.el | 15 +-- test/emacs

[PATCH v2 06/11] emacs: Support passing input via `notmuch-call-notmuch-*'

2013-10-24 Thread Austin Clements
This adds support for passing a string to write to notmuch's stdin to `notmuch-call-notmuch-process' and `notmuch-call-notmuch-sexp'. Since this makes both interfaces a little more complicated, it also unifies their documentation better. --- emacs/notmuch-lib.el | 39

[PATCH v2 05/11] emacs: Move `notmuch-call-notmuch-process' to notmuch-lib

2013-10-24 Thread Austin Clements
Previously, this was in notmuch.el, but all of the other notmuch call wrappers were in notmuch-lib.el. Move `notmuch-call-notmuch-process' to live with its friends. This happens to fix a missing dependency from notmuch-tag.el, which required notmuch-lib, but not notmuch. ---

[PATCH v2 04/11] test: Fix missing erase-buffer in emacs test

2013-10-24 Thread Austin Clements
The first subprocess error exit code test assumed the *Notmuch errors* buffer would be empty. Rather than assuming, make it so. --- test/emacs | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/emacs b/test/emacs index 5bc3efc..05295af 100755 --- a/test/emacs +++

[PATCH v2 03/11] lib: Document extent of some return values

2013-10-24 Thread Austin Clements
This documents the extent of the notmuch_messages_t* pointers returned by notmuch_thread_get_toplevel_messages and notmuch_thread_get_messages. --- lib/notmuch.h | 4 1 file changed, 4 insertions(+) diff --git a/lib/notmuch.h b/lib/notmuch.h index 9dab555..0fb7121 100644 --- a/lib/notmuch.h

[PATCH v2 02/11] cli: Separate current and deprecated format version

2013-10-24 Thread Austin Clements
Previously, the CLI would print a deprecation warning if a client requested any format version other than the current one. However, if we add fields that are backwards-compatible, but want clients to be able to depend on, we need to bump the version, but that doesn't make the older version

[PATCH v2 01/11] schemata: Disambiguate non-terminal names

2013-10-24 Thread Austin Clements
Previously, the show schema and the search schema used different "thread" non-terminals. While these schemata don't interact, this is still confusing, so rename search's "thread" to "thread_summary". To further limit confusion, prefix all top-level search non-terminals now begin with "search_".

[PATCH v2 00/11] Fix search tagging races

2013-10-24 Thread Austin Clements
This is v2 of id:1381185201-25197-1-git-send-email-amdragon at mit.edu. It fixes several comments from Mark and Jani. This has been rebased on top of the tag completion changes, so doing * from a large search buffer will no longer crash. Hence, this series depends on the (currently pending)

[PATCH v2 02/11] cli: Separate current and deprecated format version

2013-10-24 Thread Austin Clements
Previously, the CLI would print a deprecation warning if a client requested any format version other than the current one. However, if we add fields that are backwards-compatible, but want clients to be able to depend on, we need to bump the version, but that doesn't make the older version

[PATCH v2 06/11] emacs: Support passing input via `notmuch-call-notmuch-*'

2013-10-24 Thread Austin Clements
This adds support for passing a string to write to notmuch's stdin to `notmuch-call-notmuch-process' and `notmuch-call-notmuch-sexp'. Since this makes both interfaces a little more complicated, it also unifies their documentation better. --- emacs/notmuch-lib.el | 39

[PATCH v2 03/11] lib: Document extent of some return values

2013-10-24 Thread Austin Clements
This documents the extent of the notmuch_messages_t* pointers returned by notmuch_thread_get_toplevel_messages and notmuch_thread_get_messages. --- lib/notmuch.h | 4 1 file changed, 4 insertions(+) diff --git a/lib/notmuch.h b/lib/notmuch.h index 9dab555..0fb7121 100644 --- a/lib/notmuch.h

[PATCH v2 04/11] test: Fix missing erase-buffer in emacs test

2013-10-24 Thread Austin Clements
The first subprocess error exit code test assumed the *Notmuch errors* buffer would be empty. Rather than assuming, make it so. --- test/emacs | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/emacs b/test/emacs index 5bc3efc..05295af 100755 --- a/test/emacs +++

[PATCH v2 00/11] Fix search tagging races

2013-10-24 Thread Austin Clements
This is v2 of id:1381185201-25197-1-git-send-email-amdra...@mit.edu. It fixes several comments from Mark and Jani. This has been rebased on top of the tag completion changes, so doing * from a large search buffer will no longer crash. Hence, this series depends on the (currently pending) series

[PATCH v2 09/11] Add TODO about more efficient stable thread queries

2013-10-24 Thread Austin Clements
--- devel/TODO | 6 ++ 1 file changed, 6 insertions(+) diff --git a/devel/TODO b/devel/TODO index 844555e..f212483 100644 --- a/devel/TODO +++ b/devel/TODO @@ -114,6 +114,12 @@ are multiple ideas that might make sense. Some consensus needs to be reached on this issue, and then both reply

[PATCH v2 08/11] search: Add stable queries to thread search results

2013-10-24 Thread Austin Clements
These queries will match exactly the set of messages currently in the thread, even if more messages later arrive. Two queries are provided: one for matched messages and one for unmatched messages. This can be used to fix race conditions with tagging threads from search results. While tagging

[PATCH v2 11/11] emacs: Fix search tagging races

2013-10-24 Thread Austin Clements
This fixes races in thread-local and global tagging in notmuch-search (e.g., +, -, a, *, etc.). Previously, these would modify tags of new messages that arrived after the search. Now they only operate on the messages that were in the threads when the search was performed. This prevents

[PATCH v2 10/11] emacs: Add known-broken tests for search tagging races

2013-10-24 Thread Austin Clements
These tests check that both thread-local and global search tagging operations are race-free. They are currently known-broken because they aren't race-free. --- test/emacs | 26 ++ 1 file changed, 26 insertions(+) diff --git a/test/emacs b/test/emacs index

[PATCH v2 05/11] emacs: Move `notmuch-call-notmuch-process' to notmuch-lib

2013-10-24 Thread Austin Clements
Previously, this was in notmuch.el, but all of the other notmuch call wrappers were in notmuch-lib.el. Move `notmuch-call-notmuch-process' to live with its friends. This happens to fix a missing dependency from notmuch-tag.el, which required notmuch-lib, but not notmuch. ---

[PATCH v2 01/11] schemata: Disambiguate non-terminal names

2013-10-24 Thread Austin Clements
Previously, the show schema and the search schema used different thread non-terminals. While these schemata don't interact, this is still confusing, so rename search's thread to thread_summary. To further limit confusion, prefix all top-level search non-terminals now begin with search_. ---

[PATCH] new: Don't scan unchanged directories with no sub-directories

2013-10-24 Thread Austin Clements
This can substantially reduce the cost of notmuch new in some situations, such as when the file system cache is cold or when the Maildir is on NFS. --- notmuch-new.c | 20 1 file changed, 20 insertions(+) diff --git a/notmuch-new.c b/notmuch-new.c index faa33f1..364c73a

Re: [PATCH] new: Don't scan unchanged directories with no sub-directories

2013-10-24 Thread Austin Clements
There might be a problem with this patch. Directory entries that are *symlinks* to other directories do not increase the containing directory's link count, but we do count them as directories in add_files pass 1 and traverse in to them. Hence, if you had a directory that contained no

[PATCH] emacs: Add a space after completed tag operations

2013-10-24 Thread Austin Clements
Previously, when a user fully completed a tag operation, they had to press space to begin entering another tag operation. This is different from, say, shell file name completion, which typically inserts a space after an unambiguous completion under the assumption that the user will want to enter

[PATCH v2] new: Don't scan unchanged directories with no sub-directories

2013-10-24 Thread Austin Clements
This can substantially reduce the cost of notmuch new in some situations, such as when the file system cache is cold or when the Maildir is on NFS. --- This should fix the problem with directories containing symlinks to other directories, but no actual sub-directories. notmuch-new.c | 29

[PATCH 1/3] cli: add insert --must-index option

2013-10-23 Thread Austin Clements
Quoth Tomi Ollila on Oct 23 at 10:05 pm: > On Thu, Oct 10 2013, David Bremner wrote: > > > Tomi Ollila writes: > >>> I'm not opposed to doing an SONAME bump for 0.17. Are there other ABI > >>> breaking changes that we have been holding back on? Can these maybe go > >>> through at the same time?

[PATCH 0/8] Improve tag change completion

2013-10-23 Thread Austin Clements
Quoth Mark Walters on Oct 23 at 10:56 am: > > Hi > > On Wed, 23 Oct 2013, Austin Clements wrote: > > Quoth Mark Walters on Oct 22 at 10:43 pm: > >> This looks good to me +1. It makes the code clearer and nicer to read as > >> well as giving a better use

Re: [PATCH 0/8] Improve tag change completion

2013-10-23 Thread Austin Clements
Quoth Mark Walters on Oct 23 at 10:56 am: Hi On Wed, 23 Oct 2013, Austin Clements amdra...@mit.edu wrote: Quoth Mark Walters on Oct 22 at 10:43 pm: This looks good to me +1. It makes the code clearer and nicer to read as well as giving a better user experience, and it is makes fixing

Re: [PATCH 1/3] cli: add insert --must-index option

2013-10-23 Thread Austin Clements
Quoth Tomi Ollila on Oct 23 at 10:05 pm: On Thu, Oct 10 2013, David Bremner da...@tethera.net wrote: Tomi Ollila tomi.oll...@iki.fi writes: I'm not opposed to doing an SONAME bump for 0.17. Are there other ABI breaking changes that we have been holding back on? Can these maybe go

[PATCH v2 8/8] emacs: Remove interactive behavior of `notmuch-tag'

2013-10-22 Thread Austin Clements
We no longer use this, since we've lifted all interactive behavior to the appropriate interactive entry points. Because of this, `notmuch-tag' also no longer needs to return the tag changes list, since the caller always passes it in. --- emacs/notmuch-tag.el | 19 --- 1 file

[PATCH v2 7/8] pick: Use interactive specifications for tag changes

2013-10-22 Thread Austin Clements
--- contrib/notmuch-pick/notmuch-pick.el | 36 +--- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el index 8f504ed..13682ea 100644 --- a/contrib/notmuch-pick/notmuch-pick.el

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