[PATCH] test: test folder renames

2014-02-23 Thread Jani Nikula
On Sun, 23 Feb 2014, Mark Walters wrote: > I was experimenting with letting notmuch new take an argument to tell it > to scan only a particular directory (and sub-directories) for new > messages. I came across the following strange behaviour which is also > present in master (with a fresh

[PATCH v3 3/3] emacs: defun notmuch-hello-versions and bind 'v' in hello mode to it

2014-02-23 Thread Tomi Ollila
If notmuch cli & notmuch emacs MUA versions differ, print also the emacs MUA version string (along with the cli version) to the minibuffer. --- emacs/notmuch-hello.el | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-hello.el

[PATCH v3 2/3] emacs: defconst notmuch-emacs-version to a value during byte compilation

2014-02-23 Thread Tomi Ollila
The notmuch cli program and emacs lisp versions may differ. For now we can help users with their emacs client problems better if we can ask what version of emacs MUA they are running. In the future we can put the emacs MUA version to User-Agent: string in outgoing mail. --- emacs/Makefile.local |

[PATCH v3 1/3] build: write version.stamp file containing $(VERSION) string

2014-02-23 Thread Tomi Ollila
This version file will be as prerequisite to the target files that use the version info for some purpose, like printing it for the user to examine. The contents of the version.stamp file is seldom read by the build system itself as the $(VERSION) variable has the same information. Thanks to

v3 of version change detection and notmuch emacs/hello version(s)

2014-02-23 Thread Tomi Ollila
This is v3 of id:1393024837-30394-1-git-send-email-tomi.ollila at iki.fi The only change is that version.stamp was added to root .gitignore file.

[DRAFT PATCH] notmuch new: do not ignore '.notmuch' in non-toplevel directories

2014-02-23 Thread Tomi Ollila
So that users may have email in subdir/.notmuch directories. --- Compiles, current tests pass. might ignore database_path/.notmuch and might descent into database_path/.../.notmuch :D Tomi notmuch-new.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git

[PATCH 0/3] check new.tags for invalid tags

2014-02-23 Thread Tomi Ollila
On Sun, Feb 23 2014, Jani Nikula wrote: > On Sun, 23 Feb 2014, Rob Browning wrote: >> In the [new] section, "tags=;" will cause notmuch to create empty tags >> that are fairly hard to remove from the command line. > > Clearly broken. This series fixes the issue at the cli > level. (Forbidding

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

2014-02-23 Thread David Bremner
Tomi Ollila writes: > Anyway, I tried to build manual pages using 'make man' and got this: > > $ make man > sphinx-build -b man -d doc/_build/doctrees -q -c doc doc doc/_build/man > Sphinx error: > Builder name man not registered It seems you need sphinx version 1.0, from July 2010 for

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

2014-02-23 Thread Tomi Ollila
On Sun, Feb 23 2014, David Bremner wrote: > Many people have docutils installed, but not sphinx. Allow these > people to build the man pages. +1 from me to start having manuals in reStructuredText format and then converting these to the target formats. Some comments on the patch series below:

[PATCH 3/3] test: add tests for invalid new.tags

2014-02-23 Thread Jani Nikula
Similar tests for both notmuch new and insert. --- test/T050-new.sh| 17 + test/T070-insert.sh | 19 +++ 2 files changed, 36 insertions(+) diff --git a/test/T050-new.sh b/test/T050-new.sh index b7668ff0c4bc..ad46ee6d51b6 100755 --- a/test/T050-new.sh +++

[PATCH 2/3] cli: make sure notmuch new and insert don't add invalid tags

2014-02-23 Thread Jani Nikula
Check new.tags configuration values before doing anything, and bail out on invalid values. --- notmuch-insert.c | 9 + notmuch-new.c| 14 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index cd6de88f6891..6752fc8de255

[PATCH 1/3] cli: export function for illegal tag checking

2014-02-23 Thread Jani Nikula
This lets us check for forbidden tags consistently across the cli. No functional changes. --- tag-util.c | 9 + tag-util.h | 12 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tag-util.c b/tag-util.c index 3bde4097372a..e2d5b795acc3 100644 --- a/tag-util.c

[PATCH 0/3] check new.tags for invalid tags

2014-02-23 Thread Jani Nikula
On Sun, 23 Feb 2014, Rob Browning wrote: > In the [new] section, "tags=;" will cause notmuch to create empty tags > that are fairly hard to remove from the command line. Clearly broken. This series fixes the issue at the cli level. (Forbidding empty tags at the lib level is slightly more

[PATCH v2 00/13] literal folder: prefix, new path: prefix

2014-02-23 Thread Tomi Ollila
On Sun, Feb 23 2014, Mark Walters wrote: > I have read most of this series, tested it and run the tests and LGTM +1. > > I read the C code fairly carefully, the tests rather less so but they > looked sane, and I didn't really look at patch 9 for building old > databases. Well, I can add (at

[PATCH v2 05/13] test: fix test for literal folder: search

2014-02-23 Thread David Bremner
Jani Nikula writes: > Some of the folder: matching capabilities are lost in the > probabilistic to boolean prefix change. Fix them. the first 5 look copacetic. d

[PATCH] man: escape backslash in notmuch-tag example

2014-02-23 Thread David Bremner
The example was originally intended to have a literal backslash in it, but '\ ' is interpreted by nroff as a non-breaking space. It doesn't make much difference to the example, but the non-breaking space triggers a bug in doclifter. --- Tomi sortof convinced me on IRC that \e was a better choice

Weird behaviour in notmuch new

2014-02-23 Thread Mark Walters
Hi I was experimenting with letting notmuch new take an argument to tell it to scan only a particular directory (and sub-directories) for new messages. I came across the following strange behaviour which is also present in master (with a fresh database) I have a bunch of maildirs in /home/mail:

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

2014-02-23 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

[PATCH v2 12/13] man: update man pages for folder: and path: search terms

2014-02-23 Thread Jani Nikula
--- man/man7/notmuch-search-terms.7 | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/man/man7/notmuch-search-terms.7 b/man/man7/notmuch-search-terms.7 index a768b630a4d1..907403dd6f2e 100644 --- a/man/man7/notmuch-search-terms.7 +++

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

2014-02-23 Thread Jani Nikula
Test the upgrade from probabilistic to boolean folder: terms, and addition of path: terms. --- test/T530-upgrade.sh | 103 +++ 1 file changed, 103 insertions(+) create mode 100755 test/T530-upgrade.sh diff --git a/test/T530-upgrade.sh

[PATCH v2 10/13] test: add test database in format version 1

2014-02-23 Thread Jani Nikula
Generated using: $ cd test $ ../devel/gen-testdb.sh -v 0.17 -c $PWD/corpus/folders -s v1 This database contains old style probabilistic folder: terms and no path: terms. --- corpus/database content dropped to save bandwidth, see

[PATCH v2 09/13] devel: add script to generate test databases

2014-02-23 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 | 124

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

2014-02-23 Thread Jani Nikula
Additional tests for the boolean folder: and path: prefixes. --- test/T101-search-by-folder-and-path.sh | 83 ++ 1 file changed, 83 insertions(+) create mode 100755 test/T101-search-by-folder-and-path.sh diff --git a/test/T101-search-by-folder-and-path.sh

[PATCH v2 07/13] test: add new corpus with folders

2014-02-23 Thread Jani Nikula
--- corpus content dropped to save bandwidth, see https://gitorious.org/jani/notmuch/commit/3aff18b55de46e3b27748376a59cda41b6cd7f6d test/corpus/folders/01:2, | 34 test/corpus/folders/02:2, | 32 +++ test/corpus/folders/bar/17:2, | 23 +++

[PATCH v2 06/13] test: make it possible to have several corpora

2014-02-23 Thread Jani Nikula
Move the existing corpus under corpus/default, and make it possible to have multiple corpora under the directory. --- test/.gitignore | 2 +- test/Makefile.local | 2 +- test/T480-hex-escaping.sh | 4 ++-- test/corpus/{ => default}/cur/01:2, | 0

[PATCH v2 05/13] test: fix test for literal folder: search

2014-02-23 Thread Jani Nikula
Some of the folder: matching capabilities are lost in the probabilistic to boolean prefix change. Fix them. --- test/T100-search-by-folder.sh | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/test/T100-search-by-folder.sh b/test/T100-search-by-folder.sh

[PATCH v2 04/13] lib: make folder: prefix literal

2014-02-23 Thread Jani Nikula
In xapian terms, convert folder: prefix from probabilistic to boolean prefix, matching the paths, relative form 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*

[PATCH v2 03/13] test: make insert test use the path: prefix

2014-02-23 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 e8dc4c099ed1..5de5da43cebb 100755 --- a/test/T070-insert.sh +++ b/test/T070-insert.sh @@ -126,14

[PATCH v2 02/13] lib: add support for path: prefix searches

2014-02-23 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 v2 01/13] lib: refactor folder term update after filename removal

2014-02-23 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 ---

[PATCH v2 00/13] literal folder: prefix, new path: prefix

2014-02-23 Thread Jani Nikula
Hi all, this is v2 of id:cover.1389304779.git.jani at nikula.org. The new path: prefix is a literal boolean prefix matching the paths, relative from the maildir root, of the message files. There's no interpretation of the maildir special cur/new folders, but a recursive match is provided with

Re: [PATCH v2 00/13] literal folder: prefix, new path: prefix

2014-02-23 Thread Tomi Ollila
On Sun, Feb 23 2014, Mark Walters markwalters1...@gmail.com wrote: I have read most of this series, tested it and run the tests and LGTM +1. I read the C code fairly carefully, the tests rather less so but they looked sane, and I didn't really look at patch 9 for building old databases.

[PATCH] man: escape backslash in notmuch-tag example

2014-02-23 Thread David Bremner
The example was originally intended to have a literal backslash in it, but '\ ' is interpreted by nroff as a non-breaking space. It doesn't make much difference to the example, but the non-breaking space triggers a bug in doclifter. --- Tomi sortof convinced me on IRC that \e was a better choice

[PATCH 2/3] cli: make sure notmuch new and insert don't add invalid tags

2014-02-23 Thread Jani Nikula
Check new.tags configuration values before doing anything, and bail out on invalid values. --- notmuch-insert.c | 9 + notmuch-new.c| 14 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index cd6de88f6891..6752fc8de255

[PATCH 3/3] test: add tests for invalid new.tags

2014-02-23 Thread Jani Nikula
Similar tests for both notmuch new and insert. --- test/T050-new.sh| 17 + test/T070-insert.sh | 19 +++ 2 files changed, 36 insertions(+) diff --git a/test/T050-new.sh b/test/T050-new.sh index b7668ff0c4bc..ad46ee6d51b6 100755 --- a/test/T050-new.sh +++

[PATCH 0/3] check new.tags for invalid tags

2014-02-23 Thread Jani Nikula
On Sun, 23 Feb 2014, Rob Browning r...@defaultvalue.org wrote: In the [new] section, tags=; will cause notmuch to create empty tags that are fairly hard to remove from the command line. Clearly broken. This series fixes the issue at the cli level. (Forbidding empty tags at the lib level is

[PATCH 1/3] cli: export function for illegal tag checking

2014-02-23 Thread Jani Nikula
This lets us check for forbidden tags consistently across the cli. No functional changes. --- tag-util.c | 9 + tag-util.h | 12 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tag-util.c b/tag-util.c index 3bde4097372a..e2d5b795acc3 100644 --- a/tag-util.c

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

2014-02-23 Thread Tomi Ollila
On Sun, Feb 23 2014, David Bremner da...@tethera.net wrote: Many people have docutils installed, but not sphinx. Allow these people to build the man pages. +1 from me to start having manuals in reStructuredText format and then converting these to the target formats. Some comments on the patch

Re: [PATCH 0/3] check new.tags for invalid tags

2014-02-23 Thread Tomi Ollila
On Sun, Feb 23 2014, Jani Nikula j...@nikula.org wrote: On Sun, 23 Feb 2014, Rob Browning r...@defaultvalue.org wrote: In the [new] section, tags=; will cause notmuch to create empty tags that are fairly hard to remove from the command line. Clearly broken. This series fixes the issue at the

[DRAFT PATCH] notmuch new: do not ignore '.notmuch' in non-toplevel directories

2014-02-23 Thread Tomi Ollila
So that users may have email in subdir/.notmuch directories. --- Compiles, current tests pass. might ignore database_path/.notmuch and might descent into database_path/.../.notmuch :D Tomi notmuch-new.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git

[PATCH v3 1/3] build: write version.stamp file containing $(VERSION) string

2014-02-23 Thread Tomi Ollila
This version file will be as prerequisite to the target files that use the version info for some purpose, like printing it for the user to examine. The contents of the version.stamp file is seldom read by the build system itself as the $(VERSION) variable has the same information. Thanks to

[PATCH v3 3/3] emacs: defun notmuch-hello-versions and bind 'v' in hello mode to it

2014-02-23 Thread Tomi Ollila
If notmuch cli notmuch emacs MUA versions differ, print also the emacs MUA version string (along with the cli version) to the minibuffer. --- emacs/notmuch-hello.el | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-hello.el

v3 of version change detection and notmuch emacs/hello version(s)

2014-02-23 Thread Tomi Ollila
This is v3 of id:1393024837-30394-1-git-send-email-tomi.oll...@iki.fi The only change is that version.stamp was added to root .gitignore file. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v3 2/3] emacs: defconst notmuch-emacs-version to a value during byte compilation

2014-02-23 Thread Tomi Ollila
The notmuch cli program and emacs lisp versions may differ. For now we can help users with their emacs client problems better if we can ask what version of emacs MUA they are running. In the future we can put the emacs MUA version to User-Agent: string in outgoing mail. --- emacs/Makefile.local |

[PATCH] test: test folder renames

2014-02-23 Thread Jani Nikula
On Sun, 23 Feb 2014, Mark Walters markwalters1...@gmail.com wrote: I was experimenting with letting notmuch new take an argument to tell it to scan only a particular directory (and sub-directories) for new messages. I came across the following strange behaviour which is also present in master

Re: [DRAFT PATCH] notmuch new: do not ignore '.notmuch' in non-toplevel directories

2014-02-23 Thread Jani Nikula
On Sun, 23 Feb 2014, Tomi Ollila tomi.oll...@iki.fi wrote: So that users may have email in subdir/.notmuch directories. --- Compiles, current tests pass. might ignore database_path/.notmuch and might descent into database_path/.../.notmuch :D Tomi notmuch-new.c | 18 ++

Re: [PATCH] test: test folder renames

2014-02-23 Thread Tomi Ollila
On Sun, Feb 23 2014, Jani Nikula j...@nikula.org wrote: On Sun, 23 Feb 2014, Mark Walters markwalters1...@gmail.com wrote: I was experimenting with letting notmuch new take an argument to tell it to scan only a particular directory (and sub-directories) for new messages. I came across the

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

2014-02-23 Thread David Bremner
Tomi Ollila tomi.oll...@iki.fi writes: Anyway, I tried to build manual pages using 'make man' and got this: $ make man sphinx-build -b man -d doc/_build/doctrees -q -c doc doc doc/_build/man Sphinx error: Builder name man not registered It seems you need sphinx version 1.0, from

Re: v3 of sphinx docs

2014-02-23 Thread Mark Walters
This looks good to me. It will obviously need a little tweaking but I like it. There is some error in the conversion for SYNOPSIS for dump, restore and tag (which may also have caused the problem for compact?) Otherwise there were a small number of oddities in indentation, and a general