Re: [PATCH] configure: change default bash completion location to /usr/share

2017-03-25 Thread David Bremner
David Bremner  writes:

> At least Fedora and Debian now use
> /usr/share/bash-completion/completions now. Apparently
> /etc/bash_completion.d will be phased out at some point in the future.

pushed to master.

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 3/4] test: add known broken tests wildcard search in from and subject

2017-03-25 Thread David Bremner
David Bremner  writes:

> This was broken by the addition of regexp searching. The detection of
> wildcards is not currently done in the recursive call to parse_query,
> because of quoting issues.

Patches 3 and 4 pushed to release and master.

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] NEWS: initial NEWS changes for 0.24.1

2017-03-25 Thread David Bremner
I expect these to be updated as a few more patches are added to the release.
---
 NEWS | 30 ++
 1 file changed, 30 insertions(+)

diff --git a/NEWS b/NEWS
index 3756590e..b2fab8d2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,26 @@
+Notmuch 0.24.1 (UNRELEASED)
+===
+
+General
+---
+
+Restore Xapian wildcard search to `from:` and `subject:`.
+
+  This was a regression in 0.24 caused by the introduction of regexp
+  search.
+
+Command Line Interface
+--
+
+Fix several memory leaks in `notmuch show`.
+
+Update NEWS for 0.24 to mention schema changes.
+
+Library Changes
+---
+
+Fix a read-after-free in the library.
+
 Notmuch 0.24 (2017-03-12)
 =
 
@@ -18,6 +41,13 @@ Run external `notmuch-` prefixed commands as subcommands
   have notmuch run them as if they were notmuch commands. See the
   `notmuch(1)` man page for details
 
+New default output format to 3
+
+  See devel/schemata for details. Users of the structured output
+  format are reminded of the `--format-version` argument to `notmuch
+  show` and `notmuch search` which can prevent breakage when the
+  default format changes.
+
 Emacs
 -
 
-- 
2.11.0

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Drop HTML tags when indexing

2017-03-25 Thread David Bremner
David Bremner  writes:

> Steven Allen pointed out [2] that the previous scanner [1] was a
> little too simplistic. This version handles (or claims to) quoted
> strings in attributes, which can apparently contain '>'and '<'
> characters. This required generalizing the state machine runner a bit
> [3] to handle states with out-degree more than two.

For what it is worth, this series shrunk my index by about the same
amount as skipping html messages entirely: I have about 15% messages
with html parts, and this series made the index about 15% smaller.

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 2/2] lib: handle empty string in regexp field processors

2017-03-25 Thread David Bremner
David Bremner  writes:

> +if (str.size () == 0)
> + return Xapian::Query(Xapian::Query::OP_AND_NOT,
> +  Xapian::Query::MatchAll,
> +  Xapian::Query (Xapian::Query::OP_WILDCARD, 
> term_prefix));
> +

Full disclosure, this is a pretty expensive query. On an older i7, it
takes about 7.5s (elapsed) on my 466k messages to find 702 messages
without a subject.  I don't think it's a big deal, since I don't think

 notmuch search 'subject:""'

is likely to be typed by mistake.

For comparison, "grep -R '^Subject:$'" (which is not exactly the same
query,  since some messages completely lack a Subject: line).
takes about 390s (elapsed).
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] tests: add compatibility layer

2017-03-25 Thread David Bremner
Mikhail  writes:

> On 16:32 09-Mar 2017 David Bremner wrote:
>> From: Mikhail 
>> 
>> Make test-lib-common.sh load test-lib-<$PLATFORM>.sh to create
>> additional shim for platform specifics.
>> 
>> Use test-lib-FREEBSD.sh to call GNU utilities instead of native ones.
>> 
>> - amended by db following Tomi's suggestions
>
> I've tested the patch on FreeBSD and it works fine.

Thanks for all your work on this, I've pushed the patch to master.  By
the way, I'm not sure if it's also an issue for FreeBSD, but we've
renamed libutil.a to libnotmuch_util.a to avoid a name conflict on some
BSD-ish systems.

d


___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch