Felipe Contreras [Wed, 16 Jun 2010 22:39:04 +0000 (01:39 +0300)]
vim: use sendmail directly
The problem with 'mailx' is that it's not standardized, and it doesn't
allow the -f option, which is pretty important on many sendmail
configurations.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Felipe Contreras [Wed, 4 May 2011 20:14:37 +0000 (23:14 +0300)]
vim: add myself (Felipe Contreras) as contributor
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Felipe Contreras [Thu, 9 Dec 2010 19:16:38 +0000 (21:16 +0200)]
vim: implement archive in show view
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Felipe Contreras [Thu, 9 Dec 2010 18:58:03 +0000 (20:58 +0200)]
vim: refactor tagging stuff
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Carl Worth [Mon, 25 Apr 2011 22:27:02 +0000 (15:27 -0700)]
TODO: Add item for remembing files detected as not email.
As recently discussed on the mailing list. See, for example:
id:"874o5m802d.fsf@servo.factory.finestructure.net"
Carl Worth [Mon, 25 Apr 2011 22:16:49 +0000 (15:16 -0700)]
test: Mark the search-insufficient-from-quoting tests to expect success
Theses were expected failures only due to a bug in GMime (with
versions of GMime before 2.4.18). As of GMime version 2.4.18 this bug
is fixed and these tests now pass.
Carl Worth [Mon, 25 Apr 2011 21:26:42 +0000 (14:26 -0700)]
Merge remote-tracking branch 'amdragon/eager-metadata-v4'
Jameson Graef Rollins [Sun, 27 Mar 2011 05:16:32 +0000 (22:16 -0700)]
use custom-face-edit value-type in notmuch-search-line-faces
This enables the proper face customization UI for
notmuch-search-line-faces.
Austin Clements [Mon, 21 Mar 2011 06:33:55 +0000 (02:33 -0400)]
Fixup string list author
Austin Clements [Thu, 9 Dec 2010 06:54:34 +0000 (01:54 -0500)]
Add the tag list to the unified message metadata pass.
Now each caller of notmuch_message_get_tags only gets a new iterator,
instead of a whole new list. In principle this could cause problems
with iterating while modifying tags, but through the magic of talloc
references, we keep the old tag list alive even after the cache in the
message object is invalidated.
This reduces my index search from the 3.102 seconds before the unified
metadata pass to 1.811 seconds (1.7X faster). Combined with the
thread search optimization in
b3caef1f0659dac8183441357c8fee500a940889,
that makes this query 2.5X faster than when I started.
Austin Clements [Thu, 9 Dec 2010 03:19:55 +0000 (22:19 -0500)]
Add the file name list to the unified message metadata pass.
Even if the caller never uses the file names, there is little cost to
simply fetching the file name terms. However, retrieving the full
paths requires additional database work, so the expansion from terms
to full paths is performed lazily.
This also simplifies clearing the filename cache, since that's now
handled by the generic metadata cache code.
This further reduces my inbox search from 3.102 seconds before the
unified metadata pass to 2.206 seconds (1.4X faster).
Austin Clements [Thu, 9 Dec 2010 05:32:35 +0000 (00:32 -0500)]
Add a generic function to get a list of terms with some prefix.
Replace _notmuch_convert_tags with this and simplify
_create_filenames_for_terms_with_prefix. This will also come in handy
shortly to get the message file name list.
Austin Clements [Thu, 9 Dec 2010 00:26:05 +0000 (19:26 -0500)]
Implement an internal generic string list and use it.
This replaces the guts of the filename list and tag list, making those
interfaces simple iterators over the generic string list. The
directory, message filename, and tags-related code now build generic
string lists and then wraps them in specific iterators. The real wins
come in later patches, when we use these for even more generic
functionality.
As a nice side-effect, this also eliminates the annoying dependency on
GList in the tag list.
Austin Clements [Sat, 27 Nov 2010 04:34:29 +0000 (23:34 -0500)]
Use a single unified pass to fetch scalar message metadata.
This performs a single pass over a message's term list to fetch the
thread ID, message ID, and reply-to, rather than requiring a pass for
each. Xapian decompresses the term list anew for each iteration, so
this reduces the amount of time spent decompressing message metadata.
This reduces my inbox search from 3.102 seconds to 2.555 seconds (1.2X
faster).
James Vasile [Wed, 16 Mar 2011 09:13:26 +0000 (10:13 +0100)]
python: Remove completed TODO item
Really just a left-over TODO item in the code, nothing spectacular to
see here.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Carl Worth [Fri, 11 Mar 2011 01:59:53 +0000 (17:59 -0800)]
emacs: Define notmuch-search-process-filter-data before first use.
To avoid a wraning about a reference to a free variable when compiling.
Carl Worth [Fri, 11 Mar 2011 00:53:46 +0000 (16:53 -0800)]
emacs: Don't drop error messages from "notmuch search"
With the previous commit, unexpected output before or between search results
would be displayed. However, trailing junk from the "notmuch search" output
would still be silently swallowed.
The most common case for an error message from "notmuch search" would be
an invalid command-line, and in that case, there would be no search results
and the trailing error message would get swallowed.
We fix the process sentinel to check for leftover data and add it to the
final buffer. We also add a test case to ensure this works.
Carl Worth [Thu, 10 Mar 2011 23:29:24 +0000 (15:29 -0800)]
emacs: Fix notmuch-search-process-filter to handle incomplete lines
This fixes the recently-added emacs-large-search-buffer test. This is
as simple as saving any trailing input and then pre-prepending it on
the next call.
MAny thanks to Thomas Schwinge <thomas@schwinge.name> for tracking
down this problem and contributing a preliminary version of this fix.
Carl Worth [Thu, 10 Mar 2011 23:18:40 +0000 (15:18 -0800)]
emacs: Display any unexpected output from notmuch search
Rather than silently swallowing unexpected output, the emacs interface will now
display it. This will allow error messages to actually arrive at the emacs
interface (though not in an especially pretty way). This also allows for easier
investigation of the inadvertent swallowing of search results that span page
boundaries (as demonstrated by the recent added emacs-large-search-buffer test).
The page-boundary bug has been present since a commit from 2009-11-24:
93af7b574598637c2766dd1f8ef343962c9a8efb
Many thanks to Thomas Schwinge for tracking that bug down and
contributing the test for it.
Carl Worth [Thu, 10 Mar 2011 21:22:04 +0000 (13:22 -0800)]
Rename/rewrite the new emacs-forgetfulness test (to emacs-large-search-buffer)
The new name is more descriptive of the bug being tested. Also, the test
is rewritten slightly so that it's much more plain to see how the bug
manifests itself, (that messages are droped from the emacs result at
regular intervals). Primarily, this is by collapsing the large blobs
used to inflate the message subjects.
Thomas Schwinge [Wed, 2 Feb 2011 23:56:38 +0000 (00:56 +0100)]
New test: Emacs' forgetfulness.
Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
Carl Worth [Thu, 10 Mar 2011 19:56:16 +0000 (11:56 -0800)]
new: Update comments for add_files_recursive
The most recent commit optimized the implementation of this
function. This commit simply updates the relevant comments to match
the new implementation.
Karel Zak [Fri, 4 Feb 2011 21:44:31 +0000 (22:44 +0100)]
new: read db_files and db_subdirs only if mtime changed
The db_files and db_subdirs are unnecessary for unchanged directories.
maildir with 10000 e-mails:
old version:
$ time ./notmuch new
No new mail.
real 0m0.053s
user 0m0.028s
sys 0m0.026s
new version:
$ time ./notmuch new
No new mail.
real 0m0.032s
user 0m0.009s
sys 0m0.023s
Signed-off-by: Karel Zak <kzak@redhat.com>
Reviewed-by: Austin Clements <amdragon@mit.edu>
Looks good (faster than, but provably equivalent to the original code!
notmuch_directory_get_child_* are side-effect free,
db_files/db_subdirs aren't used between where they were set in the old
code and where they are set in the new code, and db_files/db_subdirs
are initialized to NULL when declared).
Another timing data point:
Old code: ./notmuch new 0.77s user 0.28s system 99% cpu 1.051 total
New code: ./notmuch new 0.09s user 0.27s system 98% cpu 0.368 total
Carl Worth [Thu, 10 Mar 2011 19:30:06 +0000 (11:30 -0800)]
build: Save configure options and re-use them for automatic runs of configure
This supports the case of a user running "configure --prefix=/foo" then later
updating the soruce (including the configure script) and re-running make.
In this case, the make invocation will re-run configure. Before this change,
this run of configure would lose the user's carefully chosen prefix. This
is now fixed so that configrue is re-run with the user's options.
Carl Worth [Thu, 10 Mar 2011 19:29:13 +0000 (11:29 -0800)]
build: Fix a plain "make" to automatically run configure.
The recent change to support non-source-directory builds broke this case.
Carl Worth [Thu, 10 Mar 2011 19:05:49 +0000 (11:05 -0800)]
Merge remote branch 'amdragon/search-perf-3'
Carl Worth [Wed, 9 Mar 2011 23:02:42 +0000 (15:02 -0800)]
build: Add support for non-source-directory builds.
Such as:
mkdir build
cd build
../configure
make
This is implemented by having the configure script set a srcdir
variable in Makefile.config, and then sprinkling $(srcdir) into
various make rules. We also use vpath directives to convince GNU make
to find the source files from the original source directory.
Carl Worth [Sun, 30 Jan 2011 19:30:07 +0000 (05:30 +1000)]
TODO: Add item for the build system to support a non-source-dir build
This would be a handy feature that many people would expect to just
work.
Carl Worth [Sun, 30 Jan 2011 19:26:04 +0000 (05:26 +1000)]
json: Fix search result with no matches to be a valid json object.
In the original json code, search matching nothing would return a
valid, empty json array (that is, "[]"). I broke this in commit
6dcb7592e32ed5140ea0c0357ce78d6a37af6066 when adding support for
--output=threads|messages|tags. This time, while fixing the bug also
add a test to the test suite to help avoid future regressions.
Carl Worth [Fri, 28 Jan 2011 20:21:25 +0000 (06:21 +1000)]
test: Rename and clarify the search-lwn test
Now that we understand the bug here, we rename this test to
search-insufficient-from-quoting to clarify the bug being exercised,
(which occurs when the From: line contains an unquoted '.' character).
We also mark these tests as expected failures until the bug gets fixed.
Carl Worth [Fri, 28 Jan 2011 19:39:21 +0000 (05:39 +1000)]
search: Move lwn tests into their own file.
Since it's much easier to debug and fix these if they can be run on
their own.
Thomas Schwinge [Thu, 27 Jan 2011 10:31:49 +0000 (03:31 -0700)]
Add a few tests for searching LWN emails.
These tests should pass -- but they currently don't.
Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
Sebastien Binet [Thu, 3 Feb 2011 08:36:58 +0000 (09:36 +0100)]
update for go-release-2011-02-01:
* M bindings/go/cmds/notmuch-addrlookup.go
log.Exitf -> log.Fatalf
Ali Polatel [Wed, 2 Feb 2011 23:40:38 +0000 (01:40 +0200)]
ruby: Add generated files to .gitignore
Austin Clements [Mon, 31 Jan 2011 02:01:56 +0000 (21:01 -0500)]
Simplify _notmuch_doc_id_set_init interface.
Don't require the caller of _notmuch_doc_id_set_init to pass in a
correct bound; instead compute it from the array. This simplifies the
caller and makes this interface easier to use correctly.
Austin Clements [Mon, 31 Jan 2011 01:58:27 +0000 (20:58 -0500)]
Remove code repetition in the doc ID bitmap code.
Remove the repeated "sizeof (doc_ids->bitmap[0])" that bothered cworth
by instead defining macros to compute the word and bit offset of a
given bit in the doc ID set bitmap.
Thomas Schwinge [Thu, 27 Jan 2011 09:17:21 +0000 (02:17 -0700)]
Clarify usage of `additional_headers' in test/test-lib.sh:generate_message.
Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
Jameson Rollins [Wed, 26 Jan 2011 20:57:50 +0000 (12:57 -0800)]
emacs: send notmuch-query stderr to /dev/null
The call-process to notmuch in notmuch-query.el was previously sending
stderr into the output buffer. This means that if there is any stderr
the JSON parsing breaks. Unfortunately call-process does not support
sending stderr to a separate buffer or to the minibuffer [0], but it
does support sending it to /dev/null. So we do that here instead.
[0] a bug was filed against emacs (#7842)
Michal Sojka [Wed, 26 Jan 2011 13:06:57 +0000 (14:06 +0100)]
new: Print progress estimates only when we have sufficient information
Without this patch, it might happen that the remaining time or processing
rate were calculated just after start where nothing was processed yet.
This resulted into division by a very small number (or zero) and the
printed information was of little value.
Instead of printing nonsenses we print only that the operation is in
progress. The estimates will be printed later, after there is enough data.
Carl Worth [Wed, 26 Jan 2011 13:29:15 +0000 (23:29 +1000)]
Makefile: Quote variables used as filenames in shell commands
This allows support for filenames with spaces in them.
Michal Sojka [Wed, 26 Jan 2011 13:13:21 +0000 (23:13 +1000)]
configure: Drop global setting of IFS (without space in it).
This was originally intended to help support filenames with spaces in
them, but this actually breaks things when someone sets a command with
a space in it, (such as CC="ccache cc").
Instead, we now only set a custom IFS when acting on the
newline-separated list of files from /sbin/ldconfig.
Michal Sojka [Sun, 23 Jan 2011 10:45:50 +0000 (11:45 +0100)]
emacs: View the output of pipe command when it fails
Previously, the user didn't know whether the pipe command succeeded or
not. It was only possible to find it out by manually inspecting
the work done (or not done) by the command or by manually switching to
*notmuch-pipe* buffer and determine it from command output. For this
the user had to first find the text corresponding to the last run of
pipe command as the buffer accumulated the output from all pipe commands.
This patch changes the following. The *notmuch-pipe* buffer is erased
before every pipe command so it contains only the output from the last
command. Additionally, when the command failed, the *notmuch-pipe* buffer
is shown and an error message is displayed.
with the output of pipe command.
Michal Sojka [Sun, 23 Jan 2011 11:12:24 +0000 (12:12 +0100)]
test: Make it easier to resolve conflicts when adding new tests
Currently, there are two places in the test framework that contain very
long list on a single line. Whenever a test is added (or changed) in
several branches and these branches are merged, it results in conflict
which is hard to resolve because one has to go through the whole long
line to find where the conflict is.
This patch splits these long lists to several lines so that the
conflicts are easier to resolve.
Michal Sojka [Sun, 23 Jan 2011 20:57:07 +0000 (21:57 +0100)]
Fix installation of zsh completion
Cédric Cabessa [Sun, 23 Jan 2011 13:33:43 +0000 (14:33 +0100)]
configure: add options to disable emacs/zsh/bash and choose install dir.
add --bashcompletiondir and --zshcompletiondir (like --emacslispdir) to choose
installation dir for bash/zsh completion files
Make some features optional:
--without-emacs / --with-emacs=no do not install lisp file
--without-bash-completion / --with-bash-completion=no do not install bash
files
--without-zsh-completion / --with-zsh-completion=no do not install zsh files
By default, everything is enabled. You can reenable something with
--with-feature=yes
Michal Sojka [Fri, 21 Jan 2011 09:59:37 +0000 (10:59 +0100)]
new: Enhance progress reporting
notmuch new reports progress only during the "first" phase when the
files on disk are traversed and indexed. After this phase, other
operations like rename detection and maildir flags synchronization are
performed, but the user is not informed about them. Since these
operations can take significant time, we want to inform the user about
them.
This patch enhances the progress reporting facility that was already
present. The timer that triggers reporting is not stopped after the
first phase but continues to run until all operations are finished. The
rename detection and maildir flag synchronization are enhanced to report
their progress.
Michal Sojka [Fri, 21 Jan 2011 09:59:36 +0000 (10:59 +0100)]
new: Add all initial tags at once
If there are several tags applied to the new messages, it is beneficial
to store them to the database at one, because it saves some time,
especially when the notmuch new is run for the first time.
This patch decreased the time for initial import from 1h 35m to 1h 14m.
Austin Clements [Wed, 26 Jan 2011 11:52:54 +0000 (21:52 +1000)]
Do not defer maildir flag synchronization for new messages
This is a simplified version of a patch originally by Michal Sojka
<sojkam1@fel.cvut.cz> which is designed to have the same performance
benefits. Michal said the following:
When notmuch new is run for the first time, it is not necessary to
defer maildir flags synchronization to later because we already know
that no files will be removed.
Performing the maildinr flag synchronization immediately after the
message is added to the database has the advantage that the message
is likely hot in the disk cache so the synchronization is faster.
Additionally, we also save one database query for each message,
which must be performed when the operation is deferred.
Without this patch, the first notmuch new of 200k messages (3 GB)
took 1h and 46m out of which 20m was maildir flags
synchronization. With this patch, the whole operation took only 1h
and 36m.
Unlike Michal's patch, this version does the deferral for any new
message, rather than doing it only on the first run of "notmuch new".
Peter John Hartman [Wed, 26 Jan 2011 06:57:12 +0000 (16:57 +1000)]
vim: Get user email address from notmuch config file.
Here's a bitty patch to the vim plugin; it now calculates the primary email
of the user based on a call to notmuch config. There's still a lot of work
that needs to get done on notmuch.vim, e.g., the ability to have multiple
emails/accounts.
Carl Worth [Wed, 26 Jan 2011 05:53:14 +0000 (15:53 +1000)]
lib: Save and restore term position in message while indexing.
This fixes the recently addead search-position-overlap bug as
demonstrated in the test of the same name.
Carl Worth [Wed, 26 Jan 2011 05:19:31 +0000 (15:19 +1000)]
Add test demonstrating a position overlap bug.
Currently, whenever we call index_terms multiple times for a single
field, the term generator is being reset to position 0 each time. This
means that with text such as:
To: a@b.c, x@y.z
one can get a bogus match by searching for:
To: a@y.c
Thanks to Mark Anderson for reporting the bug, (and providing a nice,
minimal test case that inspired what is used here).
Carl Worth [Tue, 25 Jan 2011 13:40:35 +0000 (23:40 +1000)]
notmuch search: Clean up some memory leaks during search loop.
With talloc, we were already freeing all memory by the time we exited
the loop, but that didn't help with excess use of memory inside the
loop, (which was mostly from tallocing some objects with the incorrect
parent).
Thanks to Andrew Tridgell for sitting next to me and teaching me to
use talloc_report_full to find these leaks.
Sebastien Binet [Thu, 16 Dec 2010 22:13:09 +0000 (23:13 +0100)]
Migrate to goconfig pkg
Sebastien Binet [Wed, 10 Nov 2010 17:27:04 +0000 (18:27 +0100)]
bindings/go: Add a todo file
Sebastien Binet [Wed, 10 Nov 2010 17:24:14 +0000 (18:24 +0100)]
A minor, cosmetic change
Just trying to keep the line lengths in check.
Sebastien Binet [Wed, 10 Nov 2010 17:18:44 +0000 (18:18 +0100)]
Initial import of Go bindings for notmuch
Carl Worth [Thu, 20 Jan 2011 01:04:10 +0000 (17:04 -0800)]
TODO: Note that folder: has now been implemented.
This feature has been mentioned in the TODO file (more than once) for
quite some time now.
Ali Polatel [Mon, 10 Jan 2011 14:03:31 +0000 (16:03 +0200)]
ruby: Add wrapper for message_get_filenames
Ali Polatel [Mon, 10 Jan 2011 14:02:43 +0000 (16:02 +0200)]
ruby: Add wrappers for maildir sync. interface
New wrappers:
notmuch_message_maildir_flags_to_tags(): MESSAGE.maildir_flags_to_tags
notmuch_message_tags_to_maildir_flags(): MESSAGE.tags_to_maildir_flags
Ali Polatel [Mon, 10 Jan 2011 13:59:18 +0000 (15:59 +0200)]
ruby: Add wrappers for query_get_s{ort,tring}
New wrappers:
notmuch_query_get_sort(): QUERY.sort
notmuch_query_get_query_string(): QUERY.to_s
Carl Worth [Sat, 15 Jan 2011 22:18:45 +0000 (14:18 -0800)]
Add documentation for the recently added folder-based searching.
Augmenting both the builtin help as well as the manual page.
Carl Worth [Sat, 15 Jan 2011 22:09:04 +0000 (14:09 -0800)]
Add support for folder-based searching.
A new "folder:" prefix in the query string can now be used to match
the directories in which mail files are stored.
The addition of this feature causes the recently added
search-by-folder tests to now pass.
Carl Worth [Sat, 15 Jan 2011 22:05:10 +0000 (14:05 -0800)]
test: Add new tests for folder-based searching.
This is a new feature which is not implemente yet, so these tests mostly
fail currently. A subsequent commit will add the feature and cause these
tests to start passing.
These tests verify that we can search for containing folders of mail files
by word or by phrase and that the search terms are updated correctly when
directories are renamed.
Carl Worth [Sat, 15 Jan 2011 22:04:38 +0000 (14:04 -0800)]
Fix misspelling in a comment.
Just a simple change I noticed in passing.
Carl Worth [Sat, 15 Jan 2011 22:03:33 +0000 (14:03 -0800)]
test/basic: Ignore new files ending in ~
We don't need to complain that temporary editor backups are not added
to the list of tests to be run.
Carl Worth [Sat, 15 Jan 2011 22:01:43 +0000 (14:01 -0800)]
Tighten up a memory allocation.
Using the local talloc context ensures that the memory we are using
here will be freed shortly, (rather than hanging on for a long time
with the notmuch database object).
Carl Worth [Thu, 13 Jan 2011 01:04:10 +0000 (17:04 -0800)]
Correct some minor typos in a comment
Nothing too important here. Just some misspellings I noticed while reading
nearby code.
Sebastian Spaeth [Thu, 13 Jan 2011 11:35:59 +0000 (12:35 +0100)]
python: Update metainformation to point to new URL and version number
Convert the meta information to point to the notmuchmail.org repository, rather
than the old cnotmuch location. I will delete the "cnotmuch" package
from http://pypi.python.org/pypi/cnotmuch and create a new "notmuch"
package there that contains the current versions.
Also bump the version number to 0.4. I will need to upgrade the API
first before I can release the 0.5 of the bindings, there are still some
methods missing.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Austin Clements [Wed, 17 Nov 2010 19:28:26 +0000 (14:28 -0500)]
Optimize thread search using matched docid sets.
This reduces thread search's 1+2t Xapian queries (where t is the
number of matched threads) to 1+t queries and constructs exactly one
notmuch_message_t for each message instead of 2 to 3.
notmuch_query_search_threads eagerly fetches the docids of all
messages matching the user query instead of lazily constructing
message objects and fetching thread ID's from term lists.
_notmuch_thread_create takes a seed docid and the set of all matched
docids and uses a single Xapian query to expand this docid to its
containing thread, using the matched docid set to determine which
messages in the thread match the user query instead of using a second
Xapian query.
This reduces the amount of time required to load my inbox from 4.523
seconds to 3.025 seconds (1.5X faster).
Carl Worth [Wed, 8 Dec 2010 00:35:47 +0000 (16:35 -0800)]
Update test suite for 7 tests that were recently fixed.
These tests had been broken, but were fixed by the preceding commit,
so update the test suite to print PASS rather than FIXED for these.
Carl Worth [Wed, 8 Dec 2010 00:33:29 +0000 (16:33 -0800)]
notmuch search: Fix to display authors in date order.
Previously, the authors of the thread were displayed in
reverse-chronological order, which was fairly confusing.
Carl Worth [Wed, 8 Dec 2010 00:26:38 +0000 (16:26 -0800)]
lib: Set thread subject at the same time as setting thread->{oldest,newest}
We really want to change the thread subject at the same time we set
the date, (if the sort order indicates this is necessary). The
previous code for setting the thread subject was sensitive on the
query sort when adding matching messages. An independent bug fix is
about to change that query sort order, so we remove the dependency on
it here.
Carl Worth [Tue, 7 Dec 2010 23:28:44 +0000 (15:28 -0800)]
Revert "test: Break on test script (or other) error"
This reverts commit
f22a7ec1e28d1264cf9d67d78796b8ab22e09a35.
Interrupting the test suite due to an actual bug in a test script
would be just fine, but interrupting the run of the entire test suite
at the first test failure is unacceptable.
Carl Worth [Tue, 7 Dec 2010 22:24:00 +0000 (14:24 -0800)]
test: Leave tmp.<testname> for broken tests
Previously, this directory was only preserved for failing tests. But
it's important to be able to easily debug known-broken tests, so
preserve the actual vs. expected output for those as well.
Austin Clements [Wed, 17 Nov 2010 19:27:59 +0000 (14:27 -0500)]
Make author order tests more strict.
Use varying dates in the test messages to test the order authors are
listed in. Add tests with repeated author names and unusual date
ordering. Most of these are broken at the moment, but will be fixed
shortly.
Edited-by: Carl Worth <cworth@cworth.org>: Also update the expected
results for existing emacs tests that currently codify the incorrect
author ordering, (and similarly note them as broken in the current
test suite).
Austin Clements [Wed, 17 Nov 2010 19:27:20 +0000 (14:27 -0500)]
Fix handling of broken tests.
Make sure to close the subtest for test_expect_equal_failure, just
like in test_expect_equal.
David Edmondson [Wed, 17 Nov 2010 13:32:33 +0000 (13:32 +0000)]
emacs: Remove over-eager regular expressions from notmuch-wash-tidy-citations.
The removed expressions, which were used to ensure that citations were
both preceded and followed by a blank line, were poorly implemented
and caused a regexp stack overflow on messages more than a few
thousand lines long.
David Edmondson [Wed, 17 Nov 2010 12:05:04 +0000 (12:05 +0000)]
emacs: Improve the display of truncated authors.
Incremental search does not match strings that span a
visible/invisible boundary. This results in failure to correctly
isearch for authors in `notmuch-search' mode if the name of the author
is split between the visible and invisible components of the authors
string. To avoid this, attempt to truncate the visible component of
the authors string on a boundary between authors, such that the
entirety of an author's name is either visible or invisible.
David Edmondson [Fri, 12 Nov 2010 08:07:02 +0000 (08:07 +0000)]
emacs: Use truenames for Fcc paths.
Appease the test suite by using the true name for the Fcc directory
path, otherwise a value for `notmuch-database-path' which includes
symbolic links causes test suite failures.
David Edmondson [Fri, 12 Nov 2010 08:07:01 +0000 (08:07 +0000)]
test: Ignore files created during test failures.
When a test fails, a tmp.<testname> file is left behind. These files
are useful for the person debugging the test failure, but are never
anything we want to commit.
Edited-by: Carl Worth <cworth@cworth.org>: Changed from tmp.emacs to
tmp.* and added explanation in the commit message.
Carl Worth [Sun, 5 Dec 2010 09:40:16 +0000 (01:40 -0800)]
notmuch new: Scan directory whenever fs mtime is not equal to db mtime
Previously, we would only scan a directory if the filesystem
modification time was strictly newer than the database modification
time for the directory. This would cause a problem for systems with an
unstable clock, (if a new mail was added to the filesystem, then the
system clock rolled backward, "notmuch new" would not find the message
until the clock caught up and the directory was modified again).
Now, we always scan the directory if the modification time of the
directory is not exactly the same between the filesystem and the
database. This avoids the problem described above even with an
unstable system clock.
Carl Worth [Wed, 24 Nov 2010 02:11:04 +0000 (18:11 -0800)]
Fix to index the "Re" term present in any subject.
This was a misfeature where notmuch had extra code that just threw
away legitimate information. It was never indexing an initial "Re"
term in a subject. But some users have legitimately wanted to search
for this term.
The original code was written this way merely for strict compatiblity
with the indexing performed by sup, but we're not taking advantage of
that now anyway.
Carl Worth [Wed, 24 Nov 2010 01:58:00 +0000 (17:58 -0800)]
notmuch search: Fix missing final newline in "notmuch search --output=tags"
As mentioned in the recent test commits, this also fixes the missing
'[' and ']' characters in the --format=json variant of "notmuch search
--output=tags" as well.
Carl Worth [Wed, 24 Nov 2010 01:54:47 +0000 (17:54 -0800)]
test: Add --format=json testing to the "notmuch search --format" tests.
This testing *does* capture the bug of missing '[' and ']' characters
int "notmuch search --output=tags" case. This is another manifestation
of the same bug causing the missing final newline (as mentioned in the
previous commit).
Carl Worth [Wed, 24 Nov 2010 01:41:25 +0000 (17:41 -0800)]
test: Add simple tests for "notmuch search --output=<>"
This code simply wasn't being exercised by the test suite before, so
this will be useful.
Meanwhile, there's currently a bug in "notmuch search --output=tags"
in that it doesn't print a final newline. But the current test suite
isn't able to catch this bug since the $() construct of the shell
doesn't preserve the distinction of whether the final newline is
present or not.
Carl Worth [Wed, 24 Nov 2010 01:25:54 +0000 (17:25 -0800)]
TODO: Note missing keybindings for next/previous thread in emacs client.
Seems a fairly obvious shortcoming to have survived this long.
James Vasile [Sun, 28 Feb 2010 01:34:45 +0000 (20:34 -0500)]
compatibility with emacs22
Emacs22 lacks apply-partially and mouse-event-p, so define them if emacs
version is less than 23. With this change, I was able to begin using
notmuch in emacs22.
The definitions of apply-partially and mouse-event-p are copied from
the emacs 23 distribution, (which is distributed under the GPLv3+ just
as notmuch).
Carl Worth [Tue, 16 Nov 2010 20:03:03 +0000 (12:03 -0800)]
TODO: Add several items recently mentioned on the mailing list.
Getting things listed here means that I can safely archive away those
messages without worrying that the ideas will get lost.
Carl Worth [Tue, 16 Nov 2010 19:29:47 +0000 (11:29 -0800)]
test: Don't print a test result for preliminary test setup
This test script does some initial test setup (generating a few
messages), which is all well and good, but we don't need to print that
as a test result---particularly since the test result was effectively
hard-coded to always pass.
Michal Sojka [Sun, 14 Nov 2010 21:54:32 +0000 (22:54 +0100)]
test: Fix bugs detected thanks to the previous commit
Michal Sojka [Sun, 14 Nov 2010 21:54:31 +0000 (22:54 +0100)]
test: Detect unfinished subsets
When test_begin_subtest is not followed by corresponding test_expect_equal,
the output of the rest of the test script is errornously suppressed. Add
code to detect these bugs in test scripts.
Michal Sojka [Sun, 14 Nov 2010 21:54:30 +0000 (22:54 +0100)]
test: Break on test script (or other) error
Break notmuch-test whenever a test script returns non-zero status.
This happens either when some test from the script fails or when there
is an error in the script.
This is especially useful in the latter case since the error may not
appear in the final aggregated results.
Michal Sojka [Sun, 14 Nov 2010 21:54:29 +0000 (22:54 +0100)]
test: Add trailing newline to error messages
The newline was removed from say_color in commit
222926ab to allow
printing test status in the beginning of the line. Error messages are
never followed by other text so we add the newline to error function.
Michal Sojka [Sun, 14 Nov 2010 21:54:28 +0000 (22:54 +0100)]
test: Better handling of stdout and stderr
Git-style tests (test_expect_success etc.) suppress stdout and stderr
unless -v is given. Notmuch-style tests (created by test_begin_subtest
and test_expect_equal) do not have this behavior so implement it the
same.
Additionally, for both test styles, the test-lib.sh is changed so that
the content of suppressed stdout and stderr is shown in case of failed
test.
Finally a test for this functionality is added to basic tests.
David Edmondson [Mon, 15 Nov 2010 14:21:53 +0000 (14:21 +0000)]
emacs: Use `view-mode' when examining raw messages.
Explained-by: Carl Worth: This gives convenient keybindings for
navigating the file and for quitting from the buffer, (since, with a
raw message file the user will generally want to just view the
message, not edit it).
Carl Worth [Tue, 16 Nov 2010 17:00:34 +0000 (09:00 -0800)]
configure: Add explicit check for glib >= 2.14
For cases where GMime is present, but happy with glib 2.12, for example.
Carl Worth [Tue, 16 Nov 2010 16:51:50 +0000 (08:51 -0800)]
configure: Use pkg-config --exists rather than --modversion
With --modversion we were asking for output that we were just throwing
away anyway. The --exists option does just what we want, (no output
and communivating only via return value).
Also, --exists allows for testing versions of the package as well.
Carl Worth [Fri, 12 Nov 2010 04:54:41 +0000 (20:54 -0800)]
lib: Fix missing initialization of status field.
This could have been a problematic bug. Fortuinately "gcc -O2" warns
about it.
Carl Worth [Fri, 12 Nov 2010 04:53:21 +0000 (20:53 -0800)]
lib: Add two missing static qualifiers
The debian packaging is nice enough to notice when we accidentally
leak private symbols to the public interface.
Carl Worth [Fri, 12 Nov 2010 04:51:29 +0000 (20:51 -0800)]
debian: Update list of symbols for libnotmuch
This release adds three new functions to the library interface.