aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
...
* Makefile: Simplify the release targets.Gravatar Carl Worth2010-04-15
| | | | | | | | | | | | | 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.
* Makefile.local: Fix typo in comment.Gravatar Carl Worth2010-04-15
| | | | Just an extra word that clearly didn't belong.
* RELEASING: Remove obsolete step about updating micro version number.Gravatar Carl Worth2010-04-15
| | | | | | | 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.
* Makefile: Make "make release" run the test suite.Gravatar Carl Worth2010-04-15
| | | | | This drops one manual step from our release process, (helping to ensure we don't forget anything during the release).
* make test: Actually count and report on failures.Gravatar Carl Worth2010-04-15
| | | | | | | | 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).
* test: Unify all tests to use the pass_if_equal function.Gravatar Carl Worth2010-04-15
| | | | | | | | | | | 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.
* test: Align the PASS/FAIL column.Gravatar Carl Worth2010-04-15
| | | | Just to make things a little more pleasant to look at.
* Makefile: Add a "make test" target.Gravatar Carl Worth2010-04-15
| | | | | | | 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".
* lib: search_threads: Fix nested search to handle original search of "*"Gravatar Carl Worth2010-04-15
| | | | | | | | | | | | | | 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.
* test: Add a test for "notmuch search '*'"Gravatar Carl Worth2010-04-15
| | | | | | | | | 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).
* test: Use an older date for the generated messages.Gravatar Carl Worth2010-04-15
| | | | | | 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.
* test: Remove test-message filenames from generated messagesGravatar Carl Worth2010-04-15
| | | | | | | | | | 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.
* test: Disentangle execution of notmuch from the examination of the results.Gravatar Carl Worth2010-04-15
| | | | | | | | | | | | | | 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.
* TODO: Add some ideas for improving the emacs interface.Gravatar Carl Worth2010-04-15
| | | | | | | | 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.
* TODO: Add some ideas about better search syntaxGravatar Carl Worth2010-04-15
| | | | | | 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).
* Merge bugfix for test-suite correctness.Gravatar Carl Worth2010-04-14
|\ | | | | | | | | | | | | The test suite was recently broken, and subsequently fixed (at the commit that introduced the breakage). This merges that fixup commit: f1776f8b51013bb66eb21e64c8084ddfe73c3a5c
| * test: Fix reply tests to track insignificant change in output.Gravatar Carl Worth2010-04-14
| | | | | | | | | | | | | | | | | | | | 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.
* | Makefile: Fix final linking of notmuch binary for OS X.Gravatar Carl Worth2010-04-14
| | | | | | | | | | | | | | | | | | | | | | | | Apparently the OS X linker can't resolve symbols when linking a program (notmuch) against a library (libnotmuch) when the library depends on another library (libgmime) that the program doesn't depend on directly. For this case, we need to link the program directly against both libraries, but we don't want to do this on Linux, where the linker can do this on its own and the explicit, unneeded link would cause problems.
* | Makefile: Add library version information on OS X.Gravatar Carl Worth2010-04-14
| | | | | | | | | | | | | | This encodes the library version into the library, where the linking binary can pick it up, and the linker can even enforce mismatches in the minor release, (such as linking a binary against version 1.2 and then attempting to run it against version 1.1).
* | Makefile: Fix library linking command for OS XGravatar Carl Worth2010-04-14
| | | | | | | | | | | | | | | | | | I'm not sure which system Aaron used, but on the machine I have access to, (Darwin 8.11.0), the -shared and -dylib_install_name options are not recognized. Instead I use -dynamic_lib and -install_name as documented here: http://www.finkproject.org/doc/porting/shared.php
* | Add infrastructure for building shared library on OS X.Gravatar Aaron Ecay2010-04-14
| | | | | | | | | | | | | | | | This patch adds a configure check for OS X (actually Darwin), and sets up the Makefiles to build a proper shared library on that platform. Signed-off-by: Aaron Ecay <aaronecay@gmail.com>
* | Makefile: Move compat sources from the client code to the library.Gravatar Carl Worth2010-04-14
| | | | | | | | Since the library code needs these as well.
* | Add simplistic reimplementation of strcasestr to compat libraryGravatar Dirk Hohndel2010-04-14
| | | | | | | | | | | | | | | | | | | | While all systems that I have access to support strcasestr, it is in fact not part of POSIX. So here's a fallback reimplementation based on POSIX functions. Signed-off-by: Dirk Hohndel <hohndel@infradead.org> Tested-by: Tomas Carnecky <tom@dbservice.com> (on OpenSolaris snv_134)
* | Makefile: Move include of Makefile.config up from Makefile.localGravatar Carl Worth2010-04-14
| | | | | | | | | | | | | | The recent change to include sub-directory Makefile.local files before the top-level Makefile.local means that we need to include the Makefile.config before those. So move it up from Makefile.local to Makefile.
* | Fix up Makefile for build.Gravatar Aaron Ecay2010-04-14
| | | | | | | | | | | | | | | | | | | | | | Must set extra_c(xx)flags before including subdir Makefile.local's, so that there is a blank slate that the subdirs can add on to. Must include subdir Makefile.local's before global one, otherwise the compat sources are not added to the list of those to be compiled. Signed-off-by: Aaron Ecay <aaronecay@gmail.com>
* | Use C++ compiler to link notmuch binariesGravatar Aaron Ecay2010-04-14
| | | | | | | | | | | | | | Since the binaries contain C++ code, it is necessary to use the C++ linker, or errors result on some platforms (OS X). Signed-off-by: Aaron Ecay <aaronecay@gmail.com>
* | Clean up code duplication in adding or removing tag by region.Gravatar Jesse Rosenthal2010-04-14
| | | | | | | | | | | | Clean up code duplication, as per Carl's suggestion, by making notmuch-search-{add/remove}-tag-thread a special case of the -region commands, where the region in question is between (point) and (point).
* | Fix bug in adding or removing tag by region.Gravatar Jesse Rosenthal2010-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a bug in notmuch-search-{add,remove}-tag-region, which would not behave correctly if the region went beyond the last message. Now, instead of simply iterating to the last line of the region, these functions will iterate to the minimum of the last line of the region and the last possible line, i.e. (- (line-number-at-pos (point-max)) 2) Tested-by: Carl Worth <cworth@cworth.org> Note that the old, buggy behavior included infinite loops of emacs lisp code, so the new behavior is significantly better than that.
* | TODO: Capture some recent ideas expressed on the mailing list.Gravatar Carl Worth2010-04-13
|/ | | | | | There's a potential simplification of notmuch-reply.c and some emacs improvements that might require extending message-mode to a notmuch-message-mode.
* Decode headers in replyGravatar Michal Sojka2010-04-13
| | | | | | | | | | | | | | When headers contain non-ASCII characters, they are encoded according to rfc2047. Nomtuch reply command emits the headers in the encoded form, which makes them hard to read by humans who compose the reply. For example instead of "Subject: Re: Rozlučka" one currently sees "Subject: Re: =?iso-8859-2?q?Rozlu=E8ka?=". This patch adds a new GMime filter which is used to decode headers to UTF-8 and uses this filter when notmuch reply outputs headers. Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
* notmuch.el: quote args in notmuch-show to facilitate remote useGravatar Jesse Rosenthal2010-04-13
| | | | | | | | | | | | | | | | | | | | Put single-quotes around the argument of the `show --entire-thread' command in notmuch-show. This change should have no effect on normal usage. However, it allows us to use the notmuch.el client with a remote notmuch binary and database over ssh (by, e.g., setting `notmuch-command' to a simple shell script). Without the quotes, ssh will not send the command properly. One very simple example script is as follows. (Note that it requires keypair login to the ssh server.) #!/bin/sh SSH_BIN="/path/to/local/ssh" NOTMUCH_HOST="my.remote.server" NOTMUCH_REMOTE_PATH="/path/to/remote/notmuch" $SSH_BIN $NOTMUCH_HOST $NOTMUCH_REMOTE_PATH $@
* TODO: Note GMime bug that needs to be tested and upstreamed.Gravatar Carl Worth2010-04-13
| | | | | This bug was recently noted in a commit message, so we should hold onto it until we've passed it along to the GMime project.
* Do not segfault on empty mime partsGravatar martin f. krafft2010-04-13
| | | | | | | | | | | | | | | | | notmuch previously unconditionally checked mime parts for various properties, but not for NULL, which is the case if libgmime encounters an empty mime part. Upon encounter of an empty mime part, the following is printed to stderr (the second line due to my patch): (process:17197): gmime-CRITICAL **: g_mime_message_get_mime_part: assertion `GMIME_IS_MESSAGE (message)' failed Warning: Not indexing empty mime part. This is probably a bug that should get addressed in libgmime, but for not, my patch is an acceptable workaround. Signed-off-by: martin f. krafft <madduck@madduck.net>
* Prevent data loss caused by SIGINT during notmuch newGravatar Michal Sojka2010-04-13
| | | | | | | | | | When Ctrl-C is pressed in a wrong time during notmuch new, it can lead to removal of messages from the database even if the files were not removed. It happened at least once to me. Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
* Fix typo in notmuch.h documentation regarding database open modesGravatar Michael Forney2010-04-13
| | | | | | | | | | Reviewed-by: Carl Worth <cworth@cworth.org>: The original proposal for having different open modes used the name WRITABLE. I didn't like that name, (easy to misspell as WRITEABLE even for native English speakers). So we renamed it to READ_WRITE immediately, but apparently some of the documentation held the old name for a while.
* TODO: Make an explicit note that we need to start testing --format=jsonGravatar Carl Worth2010-04-13
| | | | | | The recent fix to handle utf8 in the JSON output is the kind of bug I'd never like to see again, (so that I'd like the test suite to be helping us track that).
* Fix json_quote_str to handle non-ASCII charactersGravatar Gregor Hoffleit2010-04-13
| | | | | | | | | | | | | The current code in json_quote_str() only accepts strict printable ASCII code points (i.e. 32-127), all other code points are dropped from the JSON output. The code is attempting to drop only non-printable ASCII characters, but doing a signed comparison of the byte value is also dropping characters with values >= 128. This patch uses an unsigned comparison to accept code points 32-255. Reviewed-by: Carl Worth <cworth@cworth.org> (with some additional details for commit message).
* TODO: Note several changes we want to make to the database schema.Gravatar Carl Worth2010-04-13
| | | | | Since database upgrades can be fairly painful, we'll want to do all of these within a single release.
* lib: Remove condition regarding a NULL parent_thread_id.Gravatar Carl Worth2010-04-12
| | | | | A recent change guaranteed that a message ID can never be resolved to a NULL thread ID, so we don't need this extra case.
* lib: Always add reference terms to the database.Gravatar Carl Worth2010-04-12
| | | | | | | | Previously, we were only adding the reference terms for cases where the referenced message did not yet exist in the database. For thread presentation, it's useful to have the connection information provided by the references, even when the messages are present. So add this term unconditionally.
* lib: Document the metadata stored within the Xapian database.Gravatar Carl Worth2010-04-12
| | | | | We are currently storing "version", "last_thread_id", and "thread_id_*" values so document how each of these are used.
* lib: Fix line-wrapping in _notmuch_database_link_message.Gravatar Carl Worth2010-04-12
| | | | | | This function had some excessively long lines due to nested expressions. It's simple enough to un-nest these and have readable line lengths.
* lib: Fix internal documentation of _notmuch_database_link_messageGravatar Carl Worth2010-04-12
| | | | | | This function was recently modified, (to include a metadata lookup for a message's thread ID before looking for parent/child thread IDs), but the documentation wasn't updated. Fix that.
* lib: Simplify code flow in _resolve_message_id_to_thread_idGravatar Carl Worth2010-04-12
| | | | | | There are two primary cases in this function, (the message exists in the database or it does not). Previously the code for these two cases was split and intermingled with goto-spaghetti connections.
* lib: Fix internal documentation of _resolve_message_id_to_thread_idGravatar Carl Worth2010-04-12
| | | | | We no longer return NULL, but instead generate a new thread ID for messages that we haven't seen yet.
* Store thread ids for messages that we haven't seen yetGravatar James Westby2010-04-12
| | | | | | | | | | | | | | | | This allows us to thread messages even when we receive them out of order, or never receive the root. The thread ids for messages that aren't present but are referred to are stored as metadata in the database and then retrieved if we ever get that message. When determining the thread id for a message we also check for this metadata so that we can thread descendants of a message together before we receive it. Edited by Carl Worth <cworth@cworth.org>: Split this portion of the commit from the earlier-applied portion adding test cases.
* test: Add new tests for out-of-order messages.Gravatar James Westby2010-04-12
| | | | | | | | | | | | | | | | | | | | | These new tests demonstrate a bug as follows: Multiple messages are added to the database All of these message references a common parent The parent message does not exist in the databas In this scenario, the messages will not be recognized as belonging to the same thread. We consider this a bug, and the new tests treat this as a failure. Edited by Carl Worth <cworth@cworth.org>: Split these tests into their own commit (before the fix of the bug). This lets me see the actual failure in the test suite, before the fix is applied. Also fix the alignment of new messages from test suite, (so that the PASS portions all line up---which is important while we're still manually verifying test-suite results).
* RELEASING: Update instructions for new version technique.Gravatar Carl Worth2010-04-09
| | | | | We pass this in on the "make release" command-line rather than editing the Makefile.
* Derive version numbers from gitGravatar Michal Sojka2010-04-09
| | | | | | | | | | | | | | | | | I often have several versions of notmuch compiled and it would be very helpful to be able to distinguish between them. Git has a very nice feature to make intermediate numbering automatic and unambiguous so let's use it here. For tagged versions, the version is the name of the tag, for intermediate versions, the unique ID of the commit is appended to the tag name. When notmuch is compiled from a release tarball, there is no git repository and therefore the tarball contains a special file 'version', which contains the version of release tarball. To create a new release one has to run 'make release VERSION=X.Y'.
* nomtuch.1: Add documentation for "notmuch count"Gravatar Carl Worth2010-04-09
| | | | Somehow this has been missing from our manual. Add it now.