Re: [Patch v3 04/15] lib: make folder: prefix literal

2014-03-09 Thread Jani Nikula
On Sun, 09 Mar 2014, Austin Clements wrote: > Quoth David Bremner on Mar 08 at 5:19 pm: >> From: Jani Nikula >> >> In xapian terms, convert folder: prefix from probabilistic to boolean >> prefix, matching the paths, relative form the maildir root, of the > > s/form/from/ > >> message files, ign

Smime signature verification in Notmuch - Emacs

2014-03-09 Thread Baptiste
Hi, I made a little Emacs advice for notmuch-show-insert-part-multipart/signed to deal with mails signed with SMIME mechanism. It calls openssl to create missing :sigstatus. Here it is : https://github.com/bateast/notmuch-openssl (it is an org-file, in Emacs, use org-babel-tangle on it to ex

[Patch v3 4/4] doc: automatically read version from file

2014-03-09 Thread David Bremner
This avoids having to recreate the update-man-versions rule --- doc/conf.py | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 6c2806d..a926fe4 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -14,10 +14,16 @@ master_doc = 'index' project

sphinx docs, v3

2014-03-09 Thread David Bremner
Small changes to notmuch-search-terms synopsis due to mark, and I made one commit message more formal, because Tomi is a stickler for that kind of thing ;). ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[Patch v3 3/4] doc: install sphinx version of man pages

2014-03-09 Thread David Bremner
The python script mkdocdeps.py is used to import the list of man pages from the sphinx configuration to make. This will delete the (release only) target update-man-versions. This will be replaced in a followup commit. --- Makefile | 2 +- Makefile.local | 2 +- doc/Makefile.local

[Patch v3 2/4] doc: add target rst2man to build man pages using rst2man

2014-03-09 Thread David Bremner
Many people have docutils installed, but not sphinx. Allow these people to build the man pages. --- doc/Makefile.local | 7 ++ doc/prerst2man.py | 62 ++ 2 files changed, 69 insertions(+) create mode 100644 doc/prerst2man.py diff --git a/

Re: [PATCH] test: don't use $(dir) in recipes.

2014-03-09 Thread David Bremner
David Bremner writes: > According the semantics of make, the expansion of $(dir) in recipes > uses dynamic scope, i.e. the value at the time the recipe is run. This > means if test/Makefile.local is not the last sub-makefile included, > all heck breaks loose. > --- > > This was originally part of

Re: [PATCH v2] test: NOTMUCH_SKIP_TESTS accepts test names with or without Tddd- prefix

2014-03-09 Thread David Bremner
Tomi Ollila writes: > The test names assigned to NOTMUCH_SKIP_TESTS variable can now be given > with or without the Tddd- prefix for tester convenience: > pushed. d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listin

Re: [PATCH v2] support for generating decreasing dates in bash 4.0 and 4.1

2014-03-09 Thread David Bremner
Tomi Ollila writes: > The printf builtin "%(fmt)T" specifier (which allows time values > to use strftime-like formatting) is introduced in bash 4.2. > > Trying to execute this in pre-4.2 bash will fail -- and if this > happens execute the fallback piece of perl code to do the same pushed. d __

Re: [PATCH v3 3/6] util: make sanitize string available in string util for reuse

2014-03-09 Thread David Bremner
David Bremner writes: > The first 3 patches in this series seem uncontroverisal, and pushable > alone. so I did. d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

WARNING: database upgrade coming

2014-03-09 Thread David Bremner
I will fairly soon push some version of jani's patches changing folder: matching to master. This will require an irreversible database upgrade. Of course we believe everything is going to go smoothly, but you probably should not run this upcoming version of notmuch on your live mail store until y

Re: [Patch v3 04/15] lib: make folder: prefix literal

2014-03-09 Thread Austin Clements
Quoth Jani Nikula on Mar 09 at 10:45 am: > On Sun, 09 Mar 2014, Austin Clements wrote: > > Quoth David Bremner on Mar 08 at 5:19 pm: > >> From: Jani Nikula > >> > >> In xapian terms, convert folder: prefix from probabilistic to boolean > >> prefix, matching the paths, relative form the maildir

Re: [PATCH] nmbug: Add 'clone' and replace FETCH_HEAD with @{upstream}

2014-03-09 Thread David Bremner
"W. Trevor King" writes: >> >> I think doing a fetch immediately after a clone deserves a comment. > > I commented in the commit message. Basically everything from “One > tricky bit is that bare repositories don't set upstream tracking > branches by default” down through “gives us the master-bra

[PATCH v4 00/13] boolean folder: and path: searches

2014-03-09 Thread Jani Nikula
This is v4 of id:1394313585-28422-1-git-send-email-da...@tethera.net. Changes since v3, mostly addressing Austin's review and comments on IRC: * Removed the extra corpus for folder tests. Instead, arranged the existing corpus into more folders. (Patch 01.) * Changed the folder/path tests to re

[PATCH v4 01/13] test: rearrange the test corpus into subfolders

2014-03-09 Thread Jani Nikula
We will need this for improved folder search tests, but having some folders should exercise our code paths better anyway. Modify the relevant test accordingly to make it pass. --- test/T090-search-output.sh | 168 - test/corpus/{cur => }/01:2,

[PATCH v4 02/13] test: add notmuch_search_files_sanitize and use it

2014-03-09 Thread Jani Nikula
We do this in a lot of places, so make it a helper in the test-lib. --- test/T090-search-output.sh | 8 test/T370-search-folder-coherence.sh | 2 +- test/test-lib.sh | 5 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/test/T090-search-o

[PATCH v4 03/13] lib: refactor folder term update after filename removal

2014-03-09 Thread Jani Nikula
Abstract some blocks of code for reuse. No functional changes. --- lib/message.cc | 135 - 1 file changed, 66 insertions(+), 69 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index c91f3a59836f..7aff4ae5111a 100644 --- a/lib/messa

[PATCH v4 04/13] lib: add support for path: prefix searches

2014-03-09 Thread Jani Nikula
The path: prefix is a literal boolean prefix matching the paths, relative from the maildir root, of the message files. path:foo matches all message files in foo (but not in foo/new or foo/cur). path:foo/new matches all message files in foo/new. path:"" matches all message files in the top level

[PATCH v4 09/13] man: update man pages for folder: and path: search terms

2014-03-09 Thread Jani Nikula
Text from review by Austin Clements . --- man/man7/notmuch-search-terms.7 | 41 ++--- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/man/man7/notmuch-search-terms.7 b/man/man7/notmuch-search-terms.7 index a768b630a4d1..a33c8d78c122 100644 --- a/m

[PATCH v4 05/13] test: make insert test use the path: prefix

2014-03-09 Thread Jani Nikula
This is a more strict test for the insert test. --- test/T070-insert.sh | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/T070-insert.sh b/test/T070-insert.sh index b77c5e13c87f..ea9db07e2fa2 100755 --- a/test/T070-insert.sh +++ b/test/T070-insert.sh @@ -126,14 +1

[PATCH v4 06/13] lib: make folder: prefix literal

2014-03-09 Thread Jani Nikula
In xapian terms, convert folder: prefix from probabilistic to boolean prefix, matching the paths, relative from the maildir root, of the message files, ignoring the maildir new and cur leaf directories. folder:foo matches all message files in foo, foo/new, and foo/cur. folder:foo/new does *not* m

[PATCH v4 08/13] test: add database upgrade test from format version 1 to 2

2014-03-09 Thread Jani Nikula
Test the upgrade from probabilistic to boolean folder: terms, and addition of path: terms. The test depends on the pre-built test corpus and database tarball and checksum file being in place. If it's not, the test is skipped. The mechanism to fetch the test database will be added later. At the ti

[PATCH v4 07/13] test: add tests for the new boolean folder: and path: prefixes

2014-03-09 Thread Jani Nikula
Additional tests for the boolean folder: and path: prefixes using the full corpus. --- test/T100-search-by-folder.sh | 93 ++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/test/T100-search-by-folder.sh b/test/T100-search-by-folder.sh index a

[PATCH v4 12/13] test: commit folders-v1.tar.xz checksum, ignore actual databases

2014-03-09 Thread Jani Nikula
From: David Bremner The checksum file is used by the test infrastructure to verify the downloaded test database is the one we had in mind. Note that this test is rather strict, and the the checksum file needs to be recommitted when the database is regenerated. add a pattern .gitignore to ignore

[PATCH v4 11/13] devel: add script to generate test databases

2014-03-09 Thread Jani Nikula
Add script to generate notmuch test databases using specified versions of notmuch. This is useful for generating material for database upgrade tests. This reuses the test infrastructure to have a sandbox environment for notmuch new etc. --- devel/gen-testdb.sh | 131 ++

[PATCH v4 13/13] test: add machinery to download and verify databases

2014-03-09 Thread Jani Nikula
From: David Bremner Note that it is intentional that the checksum file is not downloaded. The intent is to check those into git. --- Makefile | 3 ++- test/README| 8 test/T530-upgrade.sh | 2 +- test/test-databases/Make

[PATCH v4 10/13] man: try to clarify the folder: and path: vs. --output=files confusion

2014-03-09 Thread Jani Nikula
--- man/man1/notmuch-search.1 | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/man/man1/notmuch-search.1 b/man/man1/notmuch-search.1 index 55a81e79fce4..a2b1ae43f411 100644 --- a/man/man1/notmuch-search.1 +++ b/man/man1/notmuch-search.1 @@ -82,8 +82,14 @@ one per line

[PATCH v2] nmbug: Add 'clone' and replace FETCH_HEAD with @{upstream}

2014-03-09 Thread W. Trevor King
With two branches getting fetched (master and config), the branch referenced by FETCH_HEAD is ambiguous. For example, I have: $ cat FETCH_HEAD 41d7bfa7184cc93c9dac139d1674e9530799e3b0 \ not-for-merge branch 'config' of http://nmbug.tethera.net/git/nmbug-tags acd379ccb973c45713eee9db17

Re: sphinx docs, v3

2014-03-09 Thread David Bremner
David Bremner writes: > Small changes to notmuch-search-terms synopsis due to mark, and I made > one commit message more formal, because Tomi is a stickler for that > kind of thing ;). I pushed this version, along with the promised deletion of the nroff man pages. I'm about go mark some patches

[PATCH v5] test: add machinery to download and verify databases

2014-03-09 Thread Jani Nikula
From: David Bremner Note that it is intentional that the checksum file is not downloaded. The intent is to check those into git. --- Makefile | 3 ++- test/README| 8 test/T530-upgrade.sh | 2 +- test/test-databases/Make

[PATCH v5] man: update man pages for folder: and path: search terms

2014-03-09 Thread Jani Nikula
Text from review by Austin Clements . --- doc/man7/notmuch-search-terms.rst | 32 +--- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/doc/man7/notmuch-search-terms.rst b/doc/man7/notmuch-search-terms.rst index 20bc6f1e1488..1acdaa0b38de 100644 --- a/doc

[PATCH v5] man: try to clarify the folder: and path: vs. --output=files confusion

2014-03-09 Thread Jani Nikula
--- doc/man1/notmuch-search.rst | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/man1/notmuch-search.rst b/doc/man1/notmuch-search.rst index 7ac6c68e68ac..90160f21e23c 100644 --- a/doc/man1/notmuch-search.rst +++ b/doc/man1/notmuch-search.rst @@ -64,8 +64,13 @@ Supp

[Patch v3 04/15] lib: make folder: prefix literal

2014-03-09 Thread Jani Nikula
On Sun, 09 Mar 2014, Austin Clements wrote: > Quoth David Bremner on Mar 08 at 5:19 pm: >> From: Jani Nikula >> >> In xapian terms, convert folder: prefix from probabilistic to boolean >> prefix, matching the paths, relative form the maildir root, of the > > s/form/from/ > >> message files, ign

sphinx docs, v3

2014-03-09 Thread David Bremner
Small changes to notmuch-search-terms synopsis due to mark, and I made one commit message more formal, because Tomi is a stickler for that kind of thing ;).

[Patch v3 4/4] doc: automatically read version from file

2014-03-09 Thread David Bremner
This avoids having to recreate the update-man-versions rule --- doc/conf.py | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 6c2806d..a926fe4 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -14,10 +14,16 @@ master_doc = 'index' project

[Patch v3 1/4] doc: convert sphinx based docs

2014-03-09 Thread David Bremner
This is the output from sphinx-quickstart, massaged a bit, along with our existing man pages converted to rst. A skeleton notmuch-emacs manual is also included. It is not suitable for end user use yet. --- INSTALL | 18 ++- Makefile | 2 +- de

[Patch v3 2/4] doc: add target rst2man to build man pages using rst2man

2014-03-09 Thread David Bremner
Many people have docutils installed, but not sphinx. Allow these people to build the man pages. --- doc/Makefile.local | 7 ++ doc/prerst2man.py | 62 ++ 2 files changed, 69 insertions(+) create mode 100644 doc/prerst2man.py diff --git a/

[Patch v3 3/4] doc: install sphinx version of man pages

2014-03-09 Thread David Bremner
The python script mkdocdeps.py is used to import the list of man pages from the sphinx configuration to make. This will delete the (release only) target update-man-versions. This will be replaced in a followup commit. --- Makefile | 2 +- Makefile.local | 2 +- doc/Makefile.local

[PATCH] test: don't use $(dir) in recipes.

2014-03-09 Thread David Bremner
David Bremner writes: > According the semantics of make, the expansion of $(dir) in recipes > uses dynamic scope, i.e. the value at the time the recipe is run. This > means if test/Makefile.local is not the last sub-makefile included, > all heck breaks loose. > --- > > This was originally part of

[PATCH v2] test: NOTMUCH_SKIP_TESTS accepts test names with or without Tddd- prefix

2014-03-09 Thread David Bremner
Tomi Ollila writes: > The test names assigned to NOTMUCH_SKIP_TESTS variable can now be given > with or without the Tddd- prefix for tester convenience: > pushed. d

[PATCH v2] support for generating decreasing dates in bash 4.0 and 4.1

2014-03-09 Thread David Bremner
Tomi Ollila writes: > The printf builtin "%(fmt)T" specifier (which allows time values > to use strftime-like formatting) is introduced in bash 4.2. > > Trying to execute this in pre-4.2 bash will fail -- and if this > happens execute the fallback piece of perl code to do the same pushed. d

[PATCH v3 3/6] util: make sanitize string available in string util for reuse

2014-03-09 Thread David Bremner
David Bremner writes: > The first 3 patches in this series seem uncontroverisal, and pushable > alone. so I did. d

WARNING: database upgrade coming

2014-03-09 Thread David Bremner
I will fairly soon push some version of jani's patches changing folder: matching to master. This will require an irreversible database upgrade. Of course we believe everything is going to go smoothly, but you probably should not run this upcoming version of notmuch on your live mail store until y

[Patch v3 04/15] lib: make folder: prefix literal

2014-03-09 Thread Austin Clements
Quoth Jani Nikula on Mar 09 at 10:45 am: > On Sun, 09 Mar 2014, Austin Clements wrote: > > Quoth David Bremner on Mar 08 at 5:19 pm: > >> From: Jani Nikula > >> > >> In xapian terms, convert folder: prefix from probabilistic to boolean > >> prefix, matching the paths, relative form the maildir

[PATCH] nmbug: Add 'clone' and replace FETCH_HEAD with @{upstream}

2014-03-09 Thread David Bremner
"W. Trevor King" writes: >> >> I think doing a fetch immediately after a clone deserves a comment. > > I commented in the commit message. Basically everything from ?One > tricky bit is that bare repositories don't set upstream tracking > branches by default? down through ?gives us the master-bra

[PATCH v4 01/13] test: rearrange the test corpus into subfolders

2014-03-09 Thread Jani Nikula
We will need this for improved folder search tests, but having some folders should exercise our code paths better anyway. Modify the relevant test accordingly to make it pass. --- test/T090-search-output.sh | 168 - test/corpus/{cur => }/01:2,

[PATCH v4 00/13] boolean folder: and path: searches

2014-03-09 Thread Jani Nikula
This is v4 of id:1394313585-28422-1-git-send-email-david at tethera.net. Changes since v3, mostly addressing Austin's review and comments on IRC: * Removed the extra corpus for folder tests. Instead, arranged the existing corpus into more folders. (Patch 01.) * Changed the folder/path tests to

[PATCH v4 02/13] test: add notmuch_search_files_sanitize and use it

2014-03-09 Thread Jani Nikula
We do this in a lot of places, so make it a helper in the test-lib. --- test/T090-search-output.sh | 8 test/T370-search-folder-coherence.sh | 2 +- test/test-lib.sh | 5 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/test/T090-search-o

[PATCH v4 03/13] lib: refactor folder term update after filename removal

2014-03-09 Thread Jani Nikula
Abstract some blocks of code for reuse. No functional changes. --- lib/message.cc | 135 - 1 file changed, 66 insertions(+), 69 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index c91f3a59836f..7aff4ae5111a 100644 --- a/lib/messa

[PATCH v4 04/13] lib: add support for path: prefix searches

2014-03-09 Thread Jani Nikula
The path: prefix is a literal boolean prefix matching the paths, relative from the maildir root, of the message files. path:foo matches all message files in foo (but not in foo/new or foo/cur). path:foo/new matches all message files in foo/new. path:"" matches all message files in the top level

[PATCH v4 05/13] test: make insert test use the path: prefix

2014-03-09 Thread Jani Nikula
This is a more strict test for the insert test. --- test/T070-insert.sh | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/T070-insert.sh b/test/T070-insert.sh index b77c5e13c87f..ea9db07e2fa2 100755 --- a/test/T070-insert.sh +++ b/test/T070-insert.sh @@ -126,14 +1

[PATCH v4 06/13] lib: make folder: prefix literal

2014-03-09 Thread Jani Nikula
In xapian terms, convert folder: prefix from probabilistic to boolean prefix, matching the paths, relative from the maildir root, of the message files, ignoring the maildir new and cur leaf directories. folder:foo matches all message files in foo, foo/new, and foo/cur. folder:foo/new does *not* m

[PATCH v4 07/13] test: add tests for the new boolean folder: and path: prefixes

2014-03-09 Thread Jani Nikula
Additional tests for the boolean folder: and path: prefixes using the full corpus. --- test/T100-search-by-folder.sh | 93 ++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/test/T100-search-by-folder.sh b/test/T100-search-by-folder.sh index a

[PATCH v4 08/13] test: add database upgrade test from format version 1 to 2

2014-03-09 Thread Jani Nikula
Test the upgrade from probabilistic to boolean folder: terms, and addition of path: terms. The test depends on the pre-built test corpus and database tarball and checksum file being in place. If it's not, the test is skipped. The mechanism to fetch the test database will be added later. At the ti

[PATCH v4 09/13] man: update man pages for folder: and path: search terms

2014-03-09 Thread Jani Nikula
Text from review by Austin Clements . --- man/man7/notmuch-search-terms.7 | 41 ++--- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/man/man7/notmuch-search-terms.7 b/man/man7/notmuch-search-terms.7 index a768b630a4d1..a33c8d78c122 100644 --- a/m

[PATCH v4 10/13] man: try to clarify the folder: and path: vs. --output=files confusion

2014-03-09 Thread Jani Nikula
--- man/man1/notmuch-search.1 | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/man/man1/notmuch-search.1 b/man/man1/notmuch-search.1 index 55a81e79fce4..a2b1ae43f411 100644 --- a/man/man1/notmuch-search.1 +++ b/man/man1/notmuch-search.1 @@ -82,8 +82,14 @@ one per line

[PATCH v4 12/13] test: commit folders-v1.tar.xz checksum, ignore actual databases

2014-03-09 Thread Jani Nikula
From: David Bremner The checksum file is used by the test infrastructure to verify the downloaded test database is the one we had in mind. Note that this test is rather strict, and the the checksum file needs to be recommitted when the database is regenerated. add a pattern .gitignore to ignore

[PATCH v4 11/13] devel: add script to generate test databases

2014-03-09 Thread Jani Nikula
Add script to generate notmuch test databases using specified versions of notmuch. This is useful for generating material for database upgrade tests. This reuses the test infrastructure to have a sandbox environment for notmuch new etc. --- devel/gen-testdb.sh | 131 ++

[PATCH v4 13/13] test: add machinery to download and verify databases

2014-03-09 Thread Jani Nikula
From: David Bremner Note that it is intentional that the checksum file is not downloaded. The intent is to check those into git. --- Makefile | 3 ++- test/README| 8 test/T530-upgrade.sh | 2 +- test/test-databases/Make

[PATCH v2] nmbug: Add 'clone' and replace FETCH_HEAD with @{upstream}

2014-03-09 Thread W. Trevor King
With two branches getting fetched (master and config), the branch referenced by FETCH_HEAD is ambiguous. For example, I have: $ cat FETCH_HEAD 41d7bfa7184cc93c9dac139d1674e9530799e3b0 \ not-for-merge branch 'config' of http://nmbug.tethera.net/git/nmbug-tags acd379ccb973c45713eee9db17

sphinx docs, v3

2014-03-09 Thread David Bremner
David Bremner writes: > Small changes to notmuch-search-terms synopsis due to mark, and I made > one commit message more formal, because Tomi is a stickler for that > kind of thing ;). I pushed this version, along with the promised deletion of the nroff man pages. I'm about go mark some patches