Sebastian Spaeth [Fri, 23 Apr 2010 11:34:38 +0000 (13:34 +0200)]
python: Delete unused files
No more .hg files needed in the git repo.
No stock notmuch-test suite needed in a subdirectory.
We have the real one in this repository
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Carl Worth [Fri, 23 Apr 2010 00:17:11 +0000 (17:17 -0700)]
test: Put the json tests into their own section.
Not that the sections actually mean anything yet, but it makes for
clean output.
Carl Worth [Fri, 23 Apr 2010 00:06:25 +0000 (17:06 -0700)]
notmuch search: Fix timezone of timestamp in --format=json output
This is one of those cases that I move love. Deleting code fixes
a bug, (test suite now passes again).
Gregor Hoffleit [Tue, 13 Apr 2010 16:37:57 +0000 (18:37 +0200)]
First tests for JSON output and UTF-8 in mail body and subject
The test suite doesn't yet cover --format=json output nor UTF-8 in
subject or body.
This patch starts with test cases for 'search --format=json' and
'show --format=json'.
Furthermore, it has test cases for a search for a UTF-8 string in a mail
body for a UTF-8 string in a mail subject.
Finally, it has a test case for --format=json with UTF-8 messages,
demonstrating the fix in
1267697893-sup-4538@sam.mediasupervision.de.
Reviewed-by: Carl Worth <cworth@cworth.org>
Updated tests to current implementation of the test suite.
These tests demonstrate a bug in the current implementation
of "notmuch show --format=json", (timestamp output is changed
depending on current timezone).
Carl Worth [Fri, 23 Apr 2010 00:08:08 +0000 (17:08 -0700)]
test: Make existing "notmuch show" test more resilient
If future updates to the test suite add more messages to the database
before this "notmuch show" test, then the message-ID numbers in the
expected output will all change. But we can at least compute the
numbers so that this test will continue to pass.
David Edmondson [Fri, 16 Apr 2010 11:47:49 +0000 (12:47 +0100)]
json: Replace `date_unix' with `timestamp' in show output
Search output was already using `timestamp' for a very similar field,
so follow that.
Carl Worth [Thu, 22 Apr 2010 21:46:15 +0000 (14:46 -0700)]
emacs: Add customize treatment and rename refresh-script to notmuch-poll-script
With defcustom the user can easily find this variable (and its
documentation) within "M-x customize-group" "notmuch" (though finding
*that* is still tricky).
The new name of notmuch-poll-script is also easier to remember, (for
me at least).
Carl Worth [Thu, 22 Apr 2010 21:24:37 +0000 (14:24 -0700)]
emacs: Use consistent naming for the two new poll functions.
Emacs scoping rules strongly encourage us to have fully-namespaced
function names. A prefix like "notmuch-search" is a pretty ugly
namespace name, but it's what we have for now.
Dirk Hohndel [Fri, 9 Apr 2010 19:53:26 +0000 (12:53 -0700)]
Add 'G' keybinding to folder and search view that triggers external poll
The new functions first check if an external poll script has been defined in
the variable 'notmuch-external-refresh-script and if yes, runs that script
before executing the existing refresh function (which is bound to '=')
This can be used to have 'G' mimic the mutt behavior of polling an external
mail server - or if the mail polling is already automatic, it can trigger
the call to notmuch new and any necessary automatic tagging of new email.
Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
Carl Worth [Thu, 22 Apr 2010 21:00:44 +0000 (14:00 -0700)]
Revert "thread: Simplify code for assigning the subject."
This reverts commit
36e4459a328b8449b3e9d510be81a332a9b35aaa.
With the two previous reverts, this fixes the recent message-sorting
regression, so the test suite now passes again.
Carl Worth [Thu, 22 Apr 2010 21:00:33 +0000 (14:00 -0700)]
Revert "thread: Fix sort of search when constructing threads."
This reverts commit
f43990ce134d838cdb2cdd5d0752a602e81cfdd9.
Carl Worth [Thu, 22 Apr 2010 21:00:17 +0000 (14:00 -0700)]
Revert "thread: Removed unsed sort argument from _thread_add_matched_message"
This reverts commit
7fb56f9dc5d8e66f717f5e48ecbfbc11c8190182.
Carl Worth [Thu, 22 Apr 2010 20:26:37 +0000 (13:26 -0700)]
test: Add a test to demonstrate message-sorting regression.
In the recent change to rename threads based on changing subject
lines, I broke message ordering within "notmuch show" output. But our
test suite didn't catch that regressions, because we didn't have any
tests of "notmuch show".
This adds one "notmuch show" test along with the thread-naming
tests. It's not a whole suite of "notmuch show" testing, but it does
catch this regression at least.
Carl Worth [Thu, 22 Apr 2010 20:22:08 +0000 (13:22 -0700)]
test: When a test fails, show diff only (save complete output to a file)
We're starting to get test output that's fairly long, so it's much
kinder to just show a diff rather than displaying the complete
expected and actual output. To allow the user to investigate things
after the fact, we save the expected and actual output to files named
test-${test_number}.expected and test-${test_number}.output .
Carl Worth [Thu, 22 Apr 2010 20:21:15 +0000 (13:21 -0700)]
test: Improve grammar in test-message subjects.
Before codifying these in any expected test output, I'd like them to
at least resemble English.
Jameson Rollins [Wed, 21 Apr 2010 15:49:21 +0000 (11:49 -0400)]
Fix help message for "show"
Help message for "show" mistakenly refers to '--output' instead of
'--format'.
Carl Worth [Thu, 22 Apr 2010 00:29:48 +0000 (17:29 -0700)]
Merge Sebastian Spaeth's python bindings into bindings/python
Sebastian offered to maintain these bindings within the notmuch
repository and offered them in the following repository:
git://github.com/spaetz/python-notmuch.git
These are the bindings formerly known as "cnotmuch" and now known
simply as "notmuch" from within python.
The bindings are not yet integrated into the build system and
packaging of the primary ntomuch repository.
Carl Worth [Thu, 22 Apr 2010 00:23:49 +0000 (17:23 -0700)]
Move everything down into a bindings/python directory.
In preparation for merging the python bindings into the notmuch
repository.
Carl Worth [Thu, 22 Apr 2010 00:05:16 +0000 (17:05 -0700)]
thread: Removed unsed sort argument from _thread_add_matched_message
The reworked solution for naming a thread based on the subject of
oldest/newest matching message no longer needs this argument.
Carl Worth [Thu, 22 Apr 2010 00:04:36 +0000 (17:04 -0700)]
emacs: Move definition of notmuch-folders to earlier in the file.
To avoid a warning about a free variable from the emacs compiler.
Servilio Afre Puentes [Mon, 19 Apr 2010 03:55:50 +0000 (23:55 -0400)]
emacs: Try to name search buffers using info in notmuch-folders
As the user has already defined aliases for certain searches in
notmuch-folders, search buffer names that use these aliases will
be easier to identify.
Sebastian Spaeth [Fri, 16 Apr 2010 06:38:48 +0000 (08:38 +0200)]
notmuch-tag: don't sort messages before applying tag changes
It's not neccessary to sort the results before we apply tags. Xapian
contributor Olly Betts says that savings might be bigger with a cold
file cache and (as unsorted implies really sorted by document id) a better
cache locality when applying tags to messages.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Sebastian Spaeth [Fri, 16 Apr 2010 06:38:46 +0000 (08:38 +0200)]
query.cc: allow to return query results unsorted
Previously, we always sorted the returned results by some string value,
(newest-to-oldest by default), however in some cases (as when applying
tags to a search result) we are not interested in any special order.
This introduces a NOTMUCH_SORT_UNSORTED value that does just that. It is
not used at the moment anywhere in the code.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Carl Worth [Wed, 21 Apr 2010 22:54:03 +0000 (15:54 -0700)]
notmuch: Abort if specified configuration file is not found.
When there is no configuration file at all, (and none specified),
notmuch works correctly by assuming correct default values. But when
the user specifies a configuration file (with the NOTMUCH_CONFIG
environment variable) and that file doesn't exist, then notmuch should
aboirt and let the user know about the problem.
Carl Worth [Wed, 21 Apr 2010 22:52:28 +0000 (15:52 -0700)]
thread: Fix sort of search when constructing threads.
The thread-naming feature depends on the matched messages being passed
down in a precise order, (the order of the top-level search). We fix
the feature by passing that sort order down.
Carl Worth [Wed, 21 Apr 2010 22:50:33 +0000 (15:50 -0700)]
test: Add tests for naming threads with changing subjects.
We recently added a feature to name threads based on the messages that
actually matched the search, (as opposed to simply the oldest or
newest message in the thread whether it matched or not). So add tests
for that, and (surprise, surprise!) the feature does not entirely
work.
Carl Worth [Wed, 21 Apr 2010 22:06:02 +0000 (15:06 -0700)]
thread: Simplify code for assigning the subject.
We know that matched messages are always added in order, so we can
always just grab the subject from the first message. This is the same
approach that was used previously in _thread_add_message. That is, the
recent feature of renaming a thread based on the subject of the
"first" matched message is as simple as moving the subject assignment
from _thread_add_message to _thread_add_matched_message.
Jesse Rosenthal [Sat, 17 Apr 2010 17:59:22 +0000 (13:59 -0400)]
Name thread based on matching msgs instead of first msg.
At the moment all threads are named based on the name of the first message
in the thread. However, this can cause problems if people either start
new threads by replying-all (as unfortunately, many out there do) or
change the subject of their mails to reflect a shift in a thread on a
list.
This patch names threads based on (a) matches for the query, and (b) the
search order. If the search order is oldest-first (as in the default
inbox) it chooses the oldest matching message as the subject. If the
search order is newest-first it chooses the newest one.
Reply prefixes ("Re: ", "Aw: ", "Sv: ", "Vs: ") are ignored
(case-insensitively) so a Re: won't change the subject.
Note that this adds a "sort" argument to _notmuch_thread_create and
_thread_add_matched_message, so that when constructing the thread we can
be aware of the sort order.
Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>
Carl Worth [Wed, 21 Apr 2010 21:18:56 +0000 (14:18 -0700)]
configure: Print version of Xapian found during configure check.
This might be handy to know, (since there are important performance
considerations that depend on the Xapian version).
Carl Worth [Wed, 21 Apr 2010 21:14:36 +0000 (14:14 -0700)]
configure: Generalize the GMime configure checks.
This way when GMime 2.8 comes out we can simply add it to the list
rather than adding an additional block of conditional code for it.
Also GMime 2.6 is now preferred over GMime 2.4.
Adrien Bustany [Thu, 15 Apr 2010 23:41:55 +0000 (19:41 -0400)]
configure: Add support for GMime 2.6
Notmuch compiles just fine with GMime 2.6, so accept it in the configure
script.
Carl Worth [Wed, 21 Apr 2010 21:16:20 +0000 (14:16 -0700)]
emacs: Fix notmuch-search-authors-width declaration.
Our defcustom call was missing the 'notmuch group, which emacs was
nice enough to warn about during compilation.
David Edmondson [Mon, 12 Apr 2010 07:51:30 +0000 (08:51 +0100)]
emacs: Support for customizing search result display
This patch helps in customizing search result display similar to
mutt's index_format. The customization is done by defining an alist as
below:
(setq notmuch-search-result-format '(("date" . "%s ")
("authors" . "%-40s ")
("subject" . "%s ")))
The supported keywords are date, count, authors, subject and tags.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Signed-off-by: David Edmondson <dme@dme.org>
Carl Worth [Wed, 21 Apr 2010 20:19:19 +0000 (13:19 -0700)]
emacs/notmuch-show.el: Part headers are real buttons that save the part
Convert the part headers into buttons that save the part when
activated.
David Edmondson [Thu, 1 Apr 2010 17:33:46 +0000 (18:33 +0100)]
emacs: Display all body parts using `notmuch part --part=<n>'
Use the `notmuch part' command to access body parts not currently
included in the JSON output and display those body parts
appropriately.
David Edmondson [Tue, 23 Mar 2010 11:54:05 +0000 (11:54 +0000)]
emacs: Use mailcap.el to guess the type of application/octet-stream parts
Use the mailcap functionality to guess a MIME type for attachments of
type application/octet-stream and, presuming successful, feed the
attachment back into the display code with the determine type.
This is mostly useless at the moment, as the JSON output from notmuch
does not include the content of application/octet-stream parts, so
they cannot be displayed even if the guess is a good one.
David Edmondson [Tue, 23 Mar 2010 11:54:05 +0000 (11:54 +0000)]
emacs: Use `mm-display-part' when possible
For parts that the mm-decode/mm-view functions can inline and we have
the content, use `mm-display-part' to insert the part in the
buffer.
David Edmondson [Tue, 23 Mar 2010 10:06:00 +0000 (10:06 +0000)]
emacs/notmuch-show.el: Improved part labelling
If a text/plain part is not the first part in a message, add a label
in order that a user can see that multiple parts are present.
If a part has a 'filename' attribute, include it in any label
describing the part.
David Edmondson [Mon, 22 Mar 2010 16:49:16 +0000 (16:49 +0000)]
emacs: Move body markup to a separate file
Move the citation and signature markup for text/plain parts to a new
file (notmuch-wash.el) and call it using a hook mechanism rather than
directly.
Carl Worth [Wed, 21 Apr 2010 19:50:10 +0000 (12:50 -0700)]
emacs: Rename body-invis-spec to message-invis-spec
This is more consistent with the related names (toggle-message,
:message-visible, etc.)
Carl Worth [Wed, 21 Apr 2010 19:32:29 +0000 (12:32 -0700)]
emacs: Remove the notmuch-show-toggle-body command (with "b" binding)
In the recent switch to a JSON-based emacs interface, RET now toggles
message visibility anywhere in the message, (rather than only on the
summary line). So we no longer need this separate "b" binding for this.
Additionally, the body toggle was implemented independently from RET,
so after hiding a message with "b" one could not make it visible with
RET. This confusing state is now no longer possible, (since the
:body-visible property is removed entirely).
David Edmondson [Sun, 11 Apr 2010 07:58:43 +0000 (08:58 +0100)]
emacs: JSON based implementation
Re-implement notmuch-show.el using the JSON output format of the
notmuch command. Most functionality is retained - HTML display is
noticeably missing.
Anthony [Tue, 20 Apr 2010 15:55:31 +0000 (08:55 -0700)]
json_quote_chararray: Always return a newly talloced array
The special case for len==0 was wrong---the normal code path is to
talloc to get a newly allocated, editable string, that might be
talloc_free'd later. It makes more sense just to let the len==0
behaviour fall through into the normal case code.
Reviewed-by: Carl Worth <cworth@cworth.org>
This results in the same value being returned, but with the proper
memory handling.
David Edmondson [Tue, 6 Apr 2010 07:24:00 +0000 (08:24 +0100)]
json: Avoid calling strlen(NULL)
MIME parts may have no filename, which previously resulted in calling
strlen(NULL).
Sebastian Spaeth [Mon, 19 Apr 2010 19:36:14 +0000 (21:36 +0200)]
python: Adapt README somewhat
Sebastian Spaeth [Mon, 19 Apr 2010 19:30:43 +0000 (21:30 +0200)]
python: Rename notmuch binary to notmuch.py
If we have it in the toplevel directory we can run it without having
to install the library, which is great for testing purposes.
--HG--
rename : docs/notmuch => notmuch.py
Sebastian Spaeth [Mon, 19 Apr 2010 19:29:40 +0000 (21:29 +0200)]
Remove all traces of cnotmuch
import cnotmuch.notmuch is dead. Long live import notmuch!
Sebastian Spaeth [Mon, 19 Apr 2010 19:25:05 +0000 (21:25 +0200)]
python: adapt docs to the notmuch module renaming
Sebastian Spaeth [Mon, 19 Apr 2010 19:21:38 +0000 (21:21 +0200)]
rename module to just 'notmuch'
So you need to do e.g. 'from notmuch import Database' rather than the
previous from cnotmuch.notmuch import Database.
Alse recreate our fake python 'notmuch' binary in the docs directory for now
--HG--
rename : notmuch/notmuch.py => notmuch/__init__.py
Sebastian Spaeth [Mon, 19 Apr 2010 19:14:47 +0000 (21:14 +0200)]
cnotmuch -> notmuch
and GPL v3+ boilerplate code to each source file.
--HG--
rename : cnotmuch/__init__.py => notmuch/__init__.py
rename : cnotmuch/database.py => notmuch/database.py
rename : cnotmuch/globals.py => notmuch/globals.py
rename : cnotmuch/message.py => notmuch/message.py
rename : cnotmuch/notmuch.py => notmuch/notmuch.py
rename : cnotmuch/tag.py => notmuch/tag.py
rename : cnotmuch/thread.py => notmuch/thread.py
David Edmondson [Wed, 24 Mar 2010 15:50:11 +0000 (15:50 +0000)]
emacs/notmuch.el: Enable `hl-line-mode' in `notmuch-search-mode'
David Edmondson [Mon, 22 Mar 2010 14:50:20 +0000 (14:50 +0000)]
emacs/notmuch-show.el: Avoid passing unintended format strings to `message'
If the text being stashed included %, `message' was unhappy and
complained.
Carl Worth [Mon, 19 Apr 2010 17:13:29 +0000 (10:13 -0700)]
debian: Make git ignore several intermediate files.
The "make release" target doesn't cause these to be left around, but
manually doing something like ./debian/rules/build can.
Carl Worth [Fri, 16 Apr 2010 20:13:12 +0000 (13:13 -0700)]
make release: Add Debian package building and upload
Finally, a single button to push to do all the uploading.
Carl Worth [Fri, 16 Apr 2010 20:02:03 +0000 (13:02 -0700)]
Increment version to 0.2.
Only minor features added this time--nothing that merits a 1.0.
Carl Worth [Fri, 16 Apr 2010 20:00:35 +0000 (13:00 -0700)]
make release: Add a check that version and debian/changelog are consistent
Eventually I'd like to automate this so that one or the other of these
files is canonical and the other is generated from it. Until then, add
this check to the release process to avoid a skewed release being
shipped.
Carl Worth [Fri, 16 Apr 2010 19:10:23 +0000 (12:10 -0700)]
Makefile: Avoid complaining about .first-build-message not existing
This cleans up a few spurious warnings from the build.
Carl Worth [Fri, 16 Apr 2010 18:51:56 +0000 (11:51 -0700)]
Fix final link of notmuch binary to use C compiler if possible.
On Linux, a C program that depends on a C library which in turn
depends on a C++ can be linked with the C compiler, (avoiding a direct
link from the program to the C++ runtime libraries).
Other platforms with less fancy linkers need to use the C++ compiler
for this linking.
Carl Worth [Fri, 16 Apr 2010 18:35:33 +0000 (11:35 -0700)]
debian: Remove watch file.
We're switching to a native package, where we build the upstream and
debian releases simultaneously, so there's no need for a watch file.
Carl Worth [Fri, 16 Apr 2010 18:32:41 +0000 (11:32 -0700)]
debian: Switch to "3.0 (native)" source format.
To keep lintian happy.
Carl Worth [Fri, 16 Apr 2010 18:24:43 +0000 (11:24 -0700)]
Makefile: Fix conditionals to avoid calling git when no .git is present
Otherwise, building from a tar-file snapshot or release caused a bunch
of error messages from unnecessary git invocations.
Carl Worth [Fri, 16 Apr 2010 18:08:56 +0000 (11:08 -0700)]
Makefile: Add a top-level "make snapshot" target.
Useful for verifying that our tar-file creation works. The tar-file
name can't easily be used as a target directly since it depends on the
current git revision.
Carl Worth [Fri, 16 Apr 2010 18:03:25 +0000 (11:03 -0700)]
Makefile: Rework the version checks slightly.
Theese were previously pointing to "make VERSION=X.Y release", but
we've recently changed to an alternate scheme involving the updated
version in a file named "version".
Carl Worth [Fri, 16 Apr 2010 17:58:53 +0000 (10:58 -0700)]
RELEASING: Add a step to upgrade the version in the "version" file.
It is annoying to have an extra step here, but it does at least mean
that we are back to just "make release" rather than "make VERSION=X.Y
release".
Carl Worth [Fri, 16 Apr 2010 17:37:32 +0000 (10:37 -0700)]
Makefile: Add an explicit version file to the repository.
We do this so that "git archive" produces a usable tar file without us
having to post-modify it, (since tools like git-buildpackage might not
give us an easy way to hook into the tar-file-creation step).
To support this we also have to change our preference to prefer the
git-described-based version (if available) and only if not available
do we fallback to using what's in the "version" file. Finally, we also
ovverride this preference when releasing, (where what's in the
"version" file wins).
Note that using our Makefile's rule to create a tar file still will
insert the git-based version into the tar file. This is useful for
creating snapshots which will correctly report the git version from
which they were created.
Carl Worth [Fri, 16 Apr 2010 17:24:38 +0000 (10:24 -0700)]
debian/changelog: Create an entry for the 0.2 release.
A (very slightly filtered) version of what already appears in NEWS.
Carl Worth [Fri, 16 Apr 2010 17:23:50 +0000 (10:23 -0700)]
RELEASING: Add a (manual!) step to create a debian/changelog entry
I'd like to have this be fully automated in the future, but for now,
it's an extra step.
Carl Worth [Fri, 16 Apr 2010 17:00:11 +0000 (10:00 -0700)]
debian: Don't auto-generate debian/changelog.
David Bremner informs me that shoving everything from the notmuch "git
log" into the debian/changelog is a bit excessive. Instead, we'll
start manually updating this file, (which feels a bit redundant with
NEWS, but perhaps makes us a better Debian-comunity member).
Carl Worth [Fri, 16 Apr 2010 15:49:09 +0000 (08:49 -0700)]
debian: Add a gbp.conf to start using git-buildpackage
On Bdale Garbee's recommendation I'm switching from gitpkg, (which
constructed a source tree but still required me to go run debuild), to
git-buildpackage. I hadn't originally used git-buildpackage because it
didn't seem to work without a configuration file, (where gitpkg was
fine).
Bdale was kind enough to point me to his fw/altos source at
git.gag.com where I found an example gpb.conf file as well as a target
in debian/rules to automatically update debian/changelog with the new
version number.
Carl Worth [Fri, 16 Apr 2010 15:33:31 +0000 (08:33 -0700)]
make release: Don't print the release message on stdout.
It's just too long for copy/paste, so just let the user know the name
of the file containing the message instead.
Carl Worth [Fri, 16 Apr 2010 15:31:46 +0000 (08:31 -0700)]
Makefile: Fix "make release" to print the current release announcement.
This was accidentally hard-coded to always print the 0.1 NEWS blurb.
Carl Worth [Fri, 16 Apr 2010 15:28:05 +0000 (08:28 -0700)]
NEWS: Add release notes for the 0.2 release.
Carl Worth [Fri, 16 Apr 2010 14:53:10 +0000 (07:53 -0700)]
Revert "notmuch.el: 'F' in search mode takes us to a list of folders."
This reverts commit
fbec989fe3272d6eff038369587be076347b96f0.
I only pushed this accidentally. See message
id:871ver6u9r.fsf@yoom.home.cworth.org for the various reasons I
didn't like this patch, (mostly I think the association of 'F' is
wrong).
Sebastian Spaeth [Fri, 16 Apr 2010 07:06:02 +0000 (09:06 +0200)]
notmuch.c: Shorten version string
We previously output "notmuch version 0.1" as response to notmuch --version.
Shorten this to "notmuch 0.1" as we know that we will receive a version
number when we explicitely ask for it.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Carl Worth [Fri, 16 Apr 2010 04:22:57 +0000 (21:22 -0700)]
emacs: Fix search filtering of a global search ("*")
With the recent addition of "*" being a special case for a search
matching all messages, we have to take care when doing a filter
operation. In this case it's not legal to simply append and get:
* and <some-new-search-terms>
Instead we carefully construct a new search string of only:
<some-new-search-terms>
This could all be avoided if we had a parser that could understand
"*" with the meaning we want.
Carl Worth [Fri, 16 Apr 2010 03:52:27 +0000 (20:52 -0700)]
TODO: Add two tasks that both have to do with auditing the library API
It was noted today in IRC that libnotmuch is not yet careful about
wrapping all Xapian calls with try/catch blocks to print nicer error
messages. It seems it would be natural to audit that at the same time
as doing the symbol-hiding work.
Carl Worth [Fri, 16 Apr 2010 03:50:46 +0000 (20:50 -0700)]
RELEASING: Change wording of libnotmuch version instruction
We actually want this version to be incremented by the commits that
extend the interface. So the release process really is not to just
verify two things (NEWS and libnotmuch version), then run "make
VERSION=x.y release", and send the mail. Quite nice.
Carl Worth [Fri, 16 Apr 2010 03:03:30 +0000 (20:03 -0700)]
make release: Enforce a clean source tree before release.
Where by clean, we check that no files are known to git to be
modified.
Carl Worth [Fri, 16 Apr 2010 02:55:11 +0000 (19:55 -0700)]
RELEASING: Remove a meaningless step from the release process.
The entire "make sure the code you want is in place" thing is part of
a larger release process that we don't document here at all. Instead,
we just focus here on the mechanics of pushing things out once the
larger process has determined the code is ready.
And the fewer steps there are, the better, (for making the
release-process as painless as possible and for avoiding any
mistakes).
Gregor Hoffleit [Thu, 15 Apr 2010 09:51:47 +0000 (11:51 +0200)]
configure: Fix syntax error (spaces in assignment).
Before and after the assignment operator, no spaces are allowed.
I don't know if there are any /bin/sh which allow spaces, but at least
in bash, csh and zsh, the former code was no valid assigment.
Ben Gamari [Sun, 24 Jan 2010 21:23:34 +0000 (16:23 -0500)]
Fix typo in message
Carl Worth [Fri, 16 Apr 2010 01:40:08 +0000 (18:40 -0700)]
make release: Provide a kinder message when VERSION is forgotten.
I'm unlikely to always remember to pass VERSION=X.Y so it's nice for
make release to remind me.
Carl Worth [Thu, 15 Apr 2010 23:28:13 +0000 (16:28 -0700)]
Makefile: Re-order the commands in "make release" slightly.
We put verify-version as a dependency, not a recursive action to keep
its output clean, (I know that I will always type "make release"
instead of "make VERSION=X.Y release" so I want a nice, neat
reminder).
Also, put the various ssh-based commands together, and after the
build, (so that it doesn't ask for a password/passphrase both before
and after building).
Carl Worth [Thu, 15 Apr 2010 23:23:57 +0000 (16:23 -0700)]
Makefile: Simplify the release targets.
Previously, we had a separate release-upload target that a user might
mistake as something useful to call directly, (which would have the
undesired effect or uploading a new package, but without first making
all the checks that we want).
So we eliminate that target, (folding its actions into "make
release"), and we also rename the several release-verify-foo targets
to simply verify-foo. This leaves as the only targets with "release"
in the name as "release" and "release-message". Both of these are
intended for the user to call directly.
Carl Worth [Thu, 15 Apr 2010 23:17:32 +0000 (16:17 -0700)]
Makefile.local: Fix typo in comment.
Just an extra word that clearly didn't belong.
Carl Worth [Thu, 15 Apr 2010 23:09:43 +0000 (16:09 -0700)]
RELEASING: Remove obsolete step about updating micro version number.
We've now changed to using "git describe" to automatically report a
version number that changes with every git commit. So we no longer
need to manually update anything in the Makefile during the release
process.
Carl Worth [Thu, 15 Apr 2010 23:08:37 +0000 (16:08 -0700)]
Makefile: Make "make release" run the test suite.
This drops one manual step from our release process, (helping
to ensure we don't forget anything during the release).
Carl Worth [Thu, 15 Apr 2010 22:18:30 +0000 (15:18 -0700)]
make test: Actually count and report on failures.
Hurrah---no more manual verification of that PASS column.
This means that "make test" can actually be a useful part of the
release process now, (since it will exit with non-zero status if there
are any failures).
Carl Worth [Thu, 15 Apr 2010 22:09:21 +0000 (15:09 -0700)]
test: Unify all tests to use the pass_if_equal function.
Previously some tests (dump/restore) were doing ad-hoc verification of
values and their own printing of PASS/FAIL, etc. This made it
impossible to count test pass/fail rates in a single place.
The only reason these tests were written that way was because the old
execute_expecting function only worked if one could directly test the
stdout output of a notmuch command. The recent switch to pass_if_equal
means that all tests can use it.
Carl Worth [Thu, 15 Apr 2010 22:06:00 +0000 (15:06 -0700)]
test: Align the PASS/FAIL column.
Just to make things a little more pleasant to look at.
Carl Worth [Thu, 15 Apr 2010 21:56:21 +0000 (14:56 -0700)]
Makefile: Add a "make test" target.
I just wasted far too much time looking for a bug that wasn't actually
there only because I hadn't recompiled before running the test
suite. Now we can take advantage of actual dependency information to
force a rebuild for "make test".
Carl Worth [Thu, 15 Apr 2010 16:15:10 +0000 (09:15 -0700)]
lib: search_threads: Fix nested search to handle original search of "*"
When constructing a thread, we usually run a nested query to find all
messages in the thread that match the original search string. However,
we need to have special-case handling of an original search string of
"*" now that that is a supported means of specifying all messages.
The special-case ends up bein quite simple---we do less work, (just
skipping the nested search since we know that all messages must
match). I had been wanting to write this identical code to more
efficiently handle "notmuch search thread:<foo>" which was previously
running two identical searches. So that case is now more efficient as
well.
Carl Worth [Thu, 15 Apr 2010 21:06:10 +0000 (14:06 -0700)]
test: Add a test for "notmuch search '*'"
This feature was added recently and should have gotten a new test at
the time.
As this test demonstrates, the code is broken, ("notmuch search '*'
returns bogus dates of the Unix epoch for any threads where the
term "and" does not appear in any messages).
Carl Worth [Thu, 15 Apr 2010 21:09:07 +0000 (14:09 -0700)]
test: Use an older date for the generated messages.
Using a date in the current year makes the test suite fragile since
the search output will include a date of "January 05" for now, but
will start doing "2010-01-05" in the future.
Carl Worth [Thu, 15 Apr 2010 21:01:54 +0000 (14:01 -0700)]
test: Remove test-message filenames from generated messages
The filenames aren't predictable (including the current directory) nor
stable from one run to the next (including the PID). This makes it
hard to predict the output from a search command that returns such a
message (such as "*").
The original goal was simply to ensure that each generated message was
distinguishable somehow. So just use the message counter instead.
Carl Worth [Thu, 15 Apr 2010 20:44:00 +0000 (13:44 -0700)]
test: Disentangle execution of notmuch from the examination of the results.
The old execute_expecting function was doing far too much for its own
good. One of the worst aspects of this was that it introduced
shell-quoting challengers where the caller could not easily control
the precise invocation of the command to be executed.
I personally couldn't find a way to test "notmuch search '*'" without
the shell expanding * against files in the current directory, or
having bogus quotation marks appearing in the search string,
(defeating the recognition of "*" as a special search term).
Hopefully this aspect of the test suite will be much easier to maintain now.
Carl Worth [Thu, 15 Apr 2010 20:19:19 +0000 (13:19 -0700)]
TODO: Add some ideas for improving the emacs interface.
One of these is a bad bug I noticed this morning, (archiving messages I had
never read when going through a search of "tag:inbox and tag:to-me" and
hitting space bar).
The other ideas came from recent conversations with Dirk and Eric.
Carl Worth [Thu, 15 Apr 2010 20:15:27 +0000 (13:15 -0700)]
TODO: Add some ideas about better search syntax
Recent coding around the "*" feature suggests some improvements that
we could make, (some of which might push us into writing a custom
query parser rather than using the one that exists in Xapian).
Carl Worth [Thu, 15 Apr 2010 00:19:42 +0000 (17:19 -0700)]
Merge bugfix for test-suite correctness.
The test suite was recently broken, and subsequently fixed (at the
commit that introduced the breakage). This merges that fixup commit:
f1776f8b51013bb66eb21e64c8084ddfe73c3a5c
Carl Worth [Thu, 15 Apr 2010 00:17:50 +0000 (17:17 -0700)]
test: Fix reply tests to track insignificant change in output.
The recent fix to properly decode encoded headers made the expected
output of "notmuch reply" differ by a single space, (previously, there
were two spaces before the References: value and now there is just
one).
Fix the test suite so that these are all noted as correct results
again.