[PATCH] test: Use small Python script for JSON normalization instead of json.tool

2017-08-16 Thread Vladimir Panteleev
json.tool does not sort or otherwise normalize the order of JSON keys in its output, which can result in test failures on some test systems. Instead, use a one-line Python script passed to the interpreter directly on its command line. Use sort_keys=True for json.dump to ensure the key order is

[PATCH] doc: Disable SmartyPants in generated manual pages

2017-08-14 Thread Vladimir Panteleev
By default, Sphinx tries to pre-process text through SmartyPants, which attempts to convert ASCII quotes and dashes to Unicode characters. Unfortunately, this mangles technical text such as command lines. For instance, this excerpt from notmuch-tag.rst: **notmuch** **tag** **--batch**

[PATCH] emacs: Refuse requests to refresh tree views while a refresh is running

2017-08-14 Thread Vladimir Panteleev
notmuch-tree did not protect against concurrent refreshes like notmuch-search, meaning, hitting '=' (notmuch-refresh-this-buffer) quickly will spawn multiple parallel notmuch processes, and clobber the existing results in the current buffer. * notmuch-tree.el: Add a guard to

[PATCH 1/2] notmuch-tag.el: Fix minor grammar error

2017-08-13 Thread Vladimir Panteleev
--- emacs/notmuch-tag.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el index 09d182df..0500927d 100644 --- a/emacs/notmuch-tag.el +++ b/emacs/notmuch-tag.el @@ -457,7 +457,7 @@ QUERY should be a string containing the search-terms.

[PATCH 0/2] Update search results when tags change

2017-08-13 Thread Vladimir Panteleev
One of the things that stood out to me right after I tried using notmuch, is that whenever I performed a search (which included some unread messages), opened an unread search result, and went back to the search buffer, it would still show that thread as unread. To update the display, I'd need to

[PATCH 2/2] emacs: Add notmuch-update-search-tags

2017-08-13 Thread Vladimir Panteleev
Implement an option which, when enabled, causes any tag changes done from within notmuch-emacs to instantly update matching threads in open search buffers. --- emacs/notmuch-tag.el | 16 emacs/notmuch.el | 15 +++ 2 files changed, 31 insertions(+) diff --git

[PATCH 1/2] test: Update extant references to corpus.mail

2017-08-16 Thread Vladimir Panteleev
971cdc72cdb80f060193bc0914dc9badcc29696b renamed corpus.mail to corpora.mail. Although 971cdc72cdb80f060193bc0914dc9badcc29696b updated some of the remaining corpus.mail references, two remained, causing the test suite to leave behind an unignored corpora.mail directory. --- test/.gitignore | 2

[PATCH 2/2] Use rooted paths in .gitignore files

2017-08-16 Thread Vladimir Panteleev
A leading / in paths in a .gitignore file matches the beginning of the path, meaning that for patterns without slashes, git will match files only in the current directory as opposed to in any subdirectory. Prefix relevant paths with / in .gitignore files, to prevent accidentally ignoring files in

[PATCH 0/2] .gitignore tweaks

2017-08-16 Thread Vladimir Panteleev
I tried to make sure the path changes are accurate and reflect where ignored files can occur in the tree for all .gitignore files, except for the one in debian/. Vladimir Panteleev (2): test: Update extant references to corpus.mail Use rooted paths in .gitignore files .gitignore

[PATCH 0/8] notmuch on Windows (Cygwin) and AppVeyor

2017-08-22 Thread Vladimir Panteleev
/commits/appveyor Vladimir Panteleev (8): lib: Fix talloc not being defined on Cygwin Split CONFIGURE_LDFLAGS out of FINAL_LIBNOTMUCH_LDFLAGS lib: Fix libnotmuch.so link under Cygwin configure: Refactor uname parsing into a case statement configure: Detect Cygwin, and set PLATFORM

[PATCH 4/8] configure: Refactor uname parsing into a case statement

2017-08-22 Thread Vladimir Panteleev
From: Vladimir Panteleev <vladi...@thecybershadow.net> This will allow matching unames using patterns. --- configure | 101 +- 1 file changed, 54 insertions(+), 47 deletions(-) diff --git a/configure b/configure index c5

[PATCH 6/8] Fix linking shared library on Cygwin

2017-08-22 Thread Vladimir Panteleev
From: Vladimir Panteleev <vladi...@thecybershadow.net> Apparently due to historical reasons, when given -lfoo, Cygwin's ld will prefer to link against libfoo.a over libfoo.so (or even libfoo.dll). As such, we need to explicitly specify the library file name when on Cygwin to avoid cr

[PATCH 2/8] Split CONFIGURE_LDFLAGS out of FINAL_LIBNOTMUCH_LDFLAGS

2017-08-22 Thread Vladimir Panteleev
Previously, FINAL_LIBNOTMUCH_LDFLAGS contained two different kinds of flags: - Linker configuration flags (LDFLAGS and AS_NEEDED_FLAGS) - List of items to link (CONFIGURE_LDFLAGS) As it can be necessary to prepend to the list of items to link, while still allow them to be affected by the

[PATCH 1/8] lib: Fix talloc not being defined on Cygwin

2017-08-22 Thread Vladimir Panteleev
From: Vladimir Panteleev <vladi...@thecybershadow.net> With GNU libc, talloc will not be declared unless _GNU_SOURCE is defined before including stdio.h. Although this is done in notmuch-private.h, that file is included after including inttypes.h in database-private.h. On Cygwin, this appa

[PATCH 7/8] test: Don't attempt to build symbol-test on Cygwin

2017-08-22 Thread Vladimir Panteleev
From: Vladimir Panteleev <vladi...@thecybershadow.net> The test fails to build on Cygwin; since Windows PE exports are already namespaced (by module name), the test is likely unnecessary on Windows anyway. --- test/Makefile.local | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

[PATCH 3/8] lib: Fix libnotmuch.so link under Cygwin

2017-08-22 Thread Vladimir Panteleev
libnotmuch_util.a was specified before -lgmime-2.6 on the linker command line, even though it uses symbols from it. On Cygwin, this lead to a link error. * Makefile.local: Fix the order of the arguments so that dependencies always occur after their dependents. --- lib/Makefile.local | 2 +- 1

[PATCH 5/8] configure: Detect Cygwin, and set PLATFORM accordingly

2017-08-22 Thread Vladimir Panteleev
From: Vladimir Panteleev <vladi...@thecybershadow.net> --- configure | 5 + 1 file changed, 5 insertions(+) diff --git a/configure b/configure index 17ac67bb..f7a54dec 100755 --- a/configure +++ b/configure @@ -699,6 +699,11 @@ case "$uname" in printf &q

[PATCH 8/8] Add AppVeyor CI configuration and test script

2017-08-22 Thread Vladimir Panteleev
From: Vladimir Panteleev <vladi...@thecybershadow.net> At the time of writing, this successfully builds notmuch and runs the test suite, with 550/793 tests passing. Whether or not actually testing on AppVeyor is desirable, the test script illustrates a verifiably working method to build n

[PATCH 4/7] test: Fix T050-new.sh on some Travis CI machines

2017-08-17 Thread Vladimir Panteleev
On some system configurations, setting a breakpoint on the "add_file" function then issuing "continue" in gdb causes the debugger to seemingly jump over the add_file invocation. This results in a test failure, as the "Handle files vanishing between scandir and add_file" subtest expects add_file to

[PATCH 3/7] .travis.yml: Replace manual zlib installation with "dist: trusty"

2017-08-17 Thread Vladimir Panteleev
Travis now offers Ubuntu Trusty (14.04 LTS) VMs as test runners, which is gradually becoming the default. We can opt in to using Trusty now so that we no longer need to manually update zlib to a newer version. --- .travis.yml | 13 - 1 file changed, 4 insertions(+), 9 deletions(-)

[PATCH 1/7] .travis.yml: Invoke `make download-test-databases' before running tests

2017-08-17 Thread Vladimir Panteleev
Download the test message database used for the T530-upgrade.sh test. If the additional load on the web server is undesired, Travis can be instructed to cache the file. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 6bd397ef..d1aa68b3 100644

[PATCH 2/7] .travis.yml: Add gdb and gpgsm dependencies

2017-08-17 Thread Vladimir Panteleev
This allows running more tests which were previously skipped due to missing dependencies. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d1aa68b3..505c4e22 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: c

[PATCH 5/7] .travis.yml: Switch to "sudo: false" for faster builds

2017-08-17 Thread Vladimir Panteleev
Builds not requiring sudo access run in a container, which will have better performance and less overhead on the Travis infrastructure. Use the apt addon to install dependencies instead of explicit apt-get commands. --- .travis.yml | 15 +++ 1 file changed, 11 insertions(+), 4

[PATCH 6/7] test: Fix T350-crypto.sh on Emacs snapshots

2017-08-17 Thread Vladimir Panteleev
The "reply to encrypted message" subtest of T350-crypto.sh was failing with Emacs snapshots because it assumed the "In-Reply-To" and "References" headers it attempts to filter out would never be line-wrapped. This apparently changed in the latest Emacs versions, which causes the test to fail when

Re: [PATCH 2/2] emacs: Add notmuch-update-search-tags

2017-08-25 Thread Vladimir Panteleev
On 2017-08-25 11:12, David Bremner wrote: One side effect of this seems to be a regression, namely that in the current buffer the "visual history" of tag changes is broken. Previously deletions were shown by red strike-through and additions by green underline. The deletions are now removed by

[PATCH v2] emacs: Add notmuch-update-search-tags

2017-08-25 Thread Vladimir Panteleev
From: Vladimir Panteleev <g...@thecybershadow.net> Implement an option which, when enabled, causes any tag changes done from within notmuch-emacs to instantly update matching threads in open search buffers. * notmuch.el: Add notmuch-search-update-results. * notmuch-tag.el: Add notmuch-

Re: [PATCH v2] emacs: Add notmuch-update-search-tags

2017-08-26 Thread Vladimir Panteleev
On 2017-08-26 10:23, Mark Walters wrote: 1) Suppose a new message arrives in the thread. Then triggering a tag change in the show buffer, (eg notmuch automatically removing an unread tag) pulls that message into original search buffer. 2) If that new message has some tags that aren't in the

Re: [PATCH 0/8] notmuch on Windows (Cygwin) and AppVeyor

2017-08-25 Thread Vladimir Panteleev
On 2017-08-25 11:35, David Bremner wrote: If I understand correctly, then the series as a whole is mainly of potential interest to developers wishing to take the notmuch-on-cygwin project farther, rather than to end users. That's correct. It's possible that despite the test suite failures, a

[PATCH 7/7] .travis.yml: Test against several Emacs versions

2017-08-17 Thread Vladimir Panteleev
Use an env matrix and Flycheck's emacs-travis project to install and test against multiple Emacs versions (currently 24.3, 24.5, 25.1, and the latest development snapshot). --- .travis.yml | 12 1 file changed, 12 insertions(+) diff --git a/.travis.yml b/.travis.yml index

[PATCH 0/7] Travis and test suite improvements

2017-08-17 Thread Vladimir Panteleev
Test more things better on Travis CI, and fix things in the test suite that did not run properly on Travis CI. I've enabled Travis on my GitHub fork, so you can see what the results would look like here: https://travis-ci.org/CyberShadow/notmuch Vladimir Panteleev (7): .travis.yml: Invoke

[PATCH 1/2] emacs: Refactor subprocess stderr propagation

2017-08-17 Thread Vladimir Panteleev
Load subprocess error output to a string in the callers, and propagate the error messages as a string parameter instead of a path to file names. Required to be able to avoid using temporary files for subprocess error output. * notmuch-lib.el: Update notmuch-check-async-exit-status,

[PATCH 2/2] emacs: Use make-process when available

2017-08-17 Thread Vladimir Panteleev
make-process is a new function introduced in Emacs 25, which provides greater control over process creation. Crucially, it allows separately redirecting stderr directly to a buffer, which allows us to avoid needing to use the shell to redirect to a temporary file in order to correctly distinguish

[PATCH 0/2] Use make-process when available

2017-08-17 Thread Vladimir Panteleev
Hopefully that should avoid any issues with the hardcoded /bin/sh path for users of Emacs 25 and newer. Vladimir Panteleev (2): emacs: Refactor subprocess stderr propagation emacs: Use make-process when available emacs/notmuch-lib.el | 105

Re: [PATCH 7/7] .travis.yml: Test against several Emacs versions

2017-09-04 Thread Vladimir Panteleev
On 2017-09-02 00:41, David Bremner wrote: I take it travis doesn't object to building 4 versions of emacs from scratch? I don't know why they would. There are many open-source projects with much higher computational demands using Travis' free service. There are also many projects doing the

Re: [PATCH v2] emacs: Add notmuch-update-search-tags

2017-09-04 Thread Vladimir Panteleev
On 2017-08-29 01:18, David Bremner wrote: Maybe I'm overthinking this, but it seems like we'd need some way to recognize various faces. There is a package called faceup that is targeted at roughly this problem. I know that racket-mode uses it to test highlighting. Perhaps that's an dependancy

Re: web interface to notmuch

2017-10-24 Thread Vladimir Panteleev
Hi, Sorry to barge in, I noticed this thread and thought I'd try to have a go at setting up a test DFeed instance. Here it is: http://dfeed-notmuch.k3.1azy.net/ There is some more info on the help page: http://dfeed-notmuch.k3.1azy.net/help Posting is supported, but it is currently