aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* documentation: Add the "files" option to the synopsis of "search --output="Gravatar Carl Worth2010-10-28
| | | | | This was inadvertently left off when --output=files was recently added as a new option.
* python: lambda(p) is not P3k-compliantGravatar Sebastian Spaeth2010-10-28
| | | | Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* python: Import explicit including package nameGravatar Sebastian Spaeth2010-10-28
| | | | | | To make python3 happy Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* test: Emit a friendly error message if run with bash < 4.0.Gravatar Carl Worth2010-10-28
| | | | | | | | | | The bash code in the test suite is using associative arrays which were only added to bash as of release 4.0. If the test suite is run with an older bash, we now immediately error out and explain the situation, (instead of emitting confusing error messages and failing dozens of tests, which is what happened before this change).
* test: Avoid using unreliable, hard-coded thread ID values in test suite.Gravatar Carl Worth2010-10-28
| | | | | | | | | | Some recently-added tests used hard-coded thread ID values in search specifications. This is unreliable since the thread IDs depend on the order in which "notmuch new" encounters new files, (which in turn can depend on inode ordering within the filesystem). Fix these by using the new "notmuch search --output=threads" to find the correct thread IDs given a hard-coded (but reliable) message ID.
* emacs: Use copy-sequence instead of copy-seq.Gravatar Carl Worth2010-10-28
| | | | | | | | | I don't see copy-seq documented within emacs at all, and some users have encountered failures of the form: notmuch-show-del-tags-worker: Symbol's function definition is void: copy-seq This should eliminate that problem.
* notmuch search: Add a new "notmuch search --output=files"Gravatar Carl Worth2010-10-28
| | | | Yet another thing that will be extremely handy for scripts.
* notmuch search: Add a new --output=(summary|threads|messages|tags) option.Gravatar Carl Worth2010-10-28
| | | | | This can be handy for scripts which need to extract just a thread ID from a search term, for example.
* lib: Add two functions: notmuch_query_get_query_string and _get_sortGravatar Carl Worth2010-10-28
| | | | | It can be handy to be able to query these settings from an existing query object.
* TODO: Remove several items that have been completed.Gravatar Carl Worth2010-10-28
| | | | | We've done a lot of work recently without also taking care to update the TODO file to indicate the progress.
* emacs: Eliminate duplicate From header in replies.Gravatar Carl Worth2010-10-27
| | | | | | | | The original code was intended to work, but clearly wasn't tested. Use mail-header (as in existing code) to extract a header from a header alist. This fixes the duplicate-from-line bug that is exercised by the test just added to the test suite.
* test: Add test for reply functionality within emacs.Gravatar Carl Worth2010-10-27
| | | | | | The reply is primarily taken care of by "notmuch reply" which is already thoroughly tested. But a recent bug is inserting a duplicate From header in the emacs-based reply. So exercise that bug here.
* notmuch: Eliminate some const-correctness warnings.Gravatar Carl Worth2010-10-27
| | | | | | | | These were introduced as a side-effect of commit b9eac48c22f53f84ed1d9c1d8ca862a7b638c9ac (shame on me for doing side-effect commits like that!). For me, at least, compilation is now warning-free.
* emacs: Eliminate warning of calling function with excess arguments.Gravatar Carl Worth2010-10-27
| | | | | | | | Yet another case of "how could this have possibly worked before?!". I guess we were just getting very lucky with the emacs lisp calling conventions and what happens with extra arguments, but, ick! Much better now.
* emacs: Remove non-interactive call of goto-lineGravatar Carl Worth2010-10-27
| | | | | | As the emacs compiler warns, the goto-line function is only intended for interactive use. Instead use the approach recommended in the goto-line documentation to avoid this.
* emacs: Fix to eliminate warning in notmuch-query-map-auxGravatar Carl Worth2010-10-27
| | | | | | | | | This is one of those cases where the warning looks absolutely correct, (complaining about a free variable), but I'm left wondering how the original code could have worked at all. From what I can tell, this code wasn't actually being called by any of the current code in notmuch.
* emacs: Avoid runtime use of `cl'.Gravatar David Edmondson2010-10-27
| | | | | | | | | | | | | | | | | | | | | | | | | The GNU Emacs Lisp Reference Manual section D.1 says: > * Please don't require the cl package of Common Lisp extensions at > run time. Use of this package is optional, and it is not part of > the standard Emacs namespace. If your package loads cl at run time, > that could cause name clashes for users who don't use that package. > > However, there is no problem with using the cl package at compile > time, with (eval-when-compile (require 'cl)). That's sufficient for > using the macros in the cl package, because the compiler expands > them before generating the byte-code. Follow this advice, requiring the following changes where `cl' was used at runtime: - replace `rassoc-if' in `notmuch-search-buffer-title' with the `loop' macro and inline code. At the same time find the longest prefix which matches the query rather than simply the last, - replace `union', `intersection' and `set-difference' in `notmuch-show-add-tag' and `notmuch-show-remove-tag' with local code to calculate the result of adding and removing a list of tags from another list of tags.
* Move notmuch-fcc-header-setup to message-header-setup-hook.Gravatar Rob Browning2010-10-27
| | | | | | | | | Call notmuch-fcc-header-setup from message-header-setup-hook rather than message-send-hook. This allows you to see what's going to happen, and to make manual adjustments if desired. Gnus does something similar. Signed-off-by: Rob Browning <rlb@defaultvalue.org>
* test: Update tests with removal of bcc from replyGravatar Jameson Rollins2010-10-27
| | | | | | | | Update the tests so that they no longer expect the Bcc header in the output of "notmuch reply" now that it has been removed. Edited-by Carl Worth: Simply applying the change to our newly modularized test suite.
* Remove bcc header from notmuch reply.Gravatar Jameson Rollins2010-10-27
| | | | | | | | | | | | | Notmuch reply should not be Bcc'ing the sender by default. This is not the appropriate way to save copies of sent mail (which should probably be handled by an Fcc header[*]) and it doesn't give the user the option to not be bcc'd. This is really something that should be handled by the reader UI. For instance, emacs message-mode can easily be configured to add Bcc's if the user wishes. [*] Carl Worth: The FCC header is now in place by default in the emacs user-interface (and tested in the test suite) so the Bcc is ready to be eliminated.
* test: Add test for fully-roundtripped FCCGravatar Carl Worth2010-10-27
| | | | | | We test that the message we sent via (fake) SMTP is included in the mail index after a "notmuch new". This verifies that the FCC setting indeed successfully saved the sent message within the notmuch mail store.
* test: Use an explicit date in the message sent via (fake) SMTPGravatar Carl Worth2010-10-27
| | | | | | Simply setting an explicit date is cleaner than letting the current, (arbitrary), date get generated for the email message and then constantly filtering that date out of search results.
* emacs: Explicitly set the From address when composing a new message.Gravatar Carl Worth2010-10-27
| | | | | Previously, underlying emacs code was setting this header. Now, we do the right thing and query the notmuch configuration for the default value here.
* emacs: Enable FCC (to a directory named "sent") by default.Gravatar Carl Worth2010-10-27
| | | | | | Now that the FCC code is fixed to use the notmuch database path, we can actually enable this by default, which should be highly useful for all new users of notmuch.
* emacs: Change FCC to be relative to notmuch mail store, not message-directoryGravatar Carl Worth2010-10-27
| | | | | | | | | | | | | Otherwise, FCC is too hard to use, (user must set it and also set message- directory variable to match notmuch mail datbase path). As a rule, I'd like for users of notmuch to not be required to muck around with non-notmuch mail settings in emacs. The above is only really possible now thanks to the recent addition of the "notmuch config get" command which allows emacs to query the currently configured notmuch database path. This also now allows an absolute-path FCC to be set if desired.
* notmuch config: Allow for new "notmuch config set" in addition to getGravatar Carl Worth2010-10-27
| | | | | | It is now possible to set configuration items from the command-line in a manner quite similar to the support for querying configuration items.
* notmuch config: Provide support for querying non-standard configuration values.Gravatar Carl Worth2010-10-27
| | | | | | We might as well be general here, and allow the "notmuch config" command to query any stored value from the configuration file, (whether or not the rest of the code actually knows anything about that value).
* notmuch: Add a new "notmuch config" command for querying configuration.Gravatar Carl Worth2010-10-27
| | | | | So far, we implement only "notmuch config get". It won't be too much work from here to also implement "notmuch config set".
* TODO: Note idea for a new "notmuch compose"Gravatar Carl Worth2010-10-27
| | | | | | Which would also allow the recently added test of sending an email message with the emacs interface to be a little more honest about the From address.
* test: Add test that emacs interface actually sends mail.Gravatar Carl Worth2010-10-27
| | | | | | | | | Rather than *reall* sending mail here, we instead have a new test program, smtp-dummy which implements (a small piece of) the server-side SMTP protocol and saves a mail message to the filename provided. This gives us reasonable test coverage of a large chunk of the notmuch+emacs code base (down to talking to an SMTP server with the final mail contents).
* test: Set alternate HOME during tests.Gravatar Carl Worth2010-10-27
| | | | | | We set the HOME environment variable to the test directory to avoid the tests relying on any configuration files from the test author's own home directory, (such as ${HOME}/.emacs or similar).
* test: Fix false failure from the "available tests" test.Gravatar Carl Worth2010-10-22
| | | | | We recently added a new sub-directory below test, so we have to blacklist it explicitly in this test.
* notmuch search: Fix to handle failure of notmuch_query_search_threads.Gravatar Carl Worth2010-10-22
| | | | | | | Now that notmuch_query_search_threads can return NULL, (for example, due to a Xapian exception), we need to handle that case (rather than just segfault). It's simple enough to just return a non-zero exit code.
* lib: Fix notmuch_query_search_threads to return NULL on any Xapian exception.Gravatar Carl Worth2010-10-22
| | | | | | Previously, if the underlying search_messages hit an exception and returned NULL, this function would ignore that and return a non-NULL, (but empty) threads object. Fix this to properly propagate the error.
* emacs: Fix quoting of Message-Id to fix test case of Id containing ".."Gravatar Carl Worth2010-10-22
| | | | | | If Xapian sees unquoted ".." as in id:123..456 then it thinks that's a range specification. We avoid this problem by instead passing id:"123..456" to Xapian.
* test: Add test demonstrating failure in emacs interface when Message-Id has ..Gravatar Carl Worth2010-10-22
| | | | | Thanks to Jameson Rollins for pointing out this bug (id:87y6g7zr6q.fsf@servo.finestructure.net).
* test: Add tests for adding/removing tags within emacs interfaceGravatar Carl Worth2010-10-22
| | | | Exercising both the notmuch-search and notmuch-show views.
* test: Add simple tests for navigating notmuch-hello and notmuch-search viewsGravatar Carl Worth2010-10-22
| | | | | | | | | | | | | | | | | We simulate the act of selecting the "inbox" saved search from notmuch-hello and the act of selecting a desired thread from the notmuch-search results. The test for the navigation of notmuch-hello is currently marked as BROKEN since its output is in the opposite order compared to the '(notmuch-search "tag:inbox")' test. This question of ordering is a currently open issue on the notmuch mailing list, so we'll let the test suite reflect that for now. Finally, this commit also abstracts some common emacs lisp code, (waiting for the current buffer's process to complete), into a new notmuch-test-wait function that is made available to anything calling test_emacs.
* test: Add a new test_expect_equal_failureGravatar Carl Worth2010-10-22
| | | | | Which allows us to have a known-broken test that would otherwise use test_expect_equal.
* test: Add tests for emacs notmuch-search and notmuch-show functions.Gravatar Carl Worth2010-10-22
| | | | | Moving the expected output into individual files (rather than inline) to keep the test script much easier to read.
* emacs: Remove the joke from the first line of the notmuch-hello view.Gravatar Carl Worth2010-10-22
| | | | Overuse just makes the joke unfunny.
* test: Add the most rudimentary testing of the emacs interface.Gravatar Carl Worth2010-10-22
| | | | | | So far, this is doing nothing more than adding a corpus of email and ensuring that the `notmuch-hello' function produces the desired output.
* test: Add a new test_emacs function to test-lib.shGravatar Carl Worth2010-10-22
| | | | | | | | This should be quite handy for doing automated testing of the emacs-based functionality in notmuch. This function invokes emacs with the necessary command-line arguments, (to run in batch mode with no local initialization, to load the notmuch code from the source directory, and to ensure an 80-column width).
* test: Fix add_email_corpus function to be quiet.Gravatar Carl Worth2010-10-22
| | | | This simply avoids some unneeded noise in the "make test" output.
* emacs: Fix notmuch-hello to not break when given a very narrow window.Gravatar Carl Worth2010-10-22
| | | | | | Simply ensure that some subtractions never result in a negative number, (since emacs complains when asked to create a string with a negative length).
* TODO: Add some notes to fix some recently noted problems.Gravatar Carl Worth2010-10-12
| | | | Just don't want to forget about things that people have pointed out.
* emacs: Fix bug when parsing a subject cotaining: \[[0-9/]\]Gravatar Carl Worth2010-09-23
| | | | | | That is, a subject with a bracketed set of digits (and optionally a slash), for example "[2010]" would cause the emacs code to misparse the search results. Fix this by tweaking the regular expression.
* lib: Fix "make install"Gravatar Carl Worth2010-09-21
| | | | | This has been broken since the addition of the test sub-directory to our non-recursive make system.
* test/README: Document add_email_corpus (and add_message/generate_message)Gravatar Carl Worth2010-09-20
| | | | | | While adding the documentation here for add_email_corpus I noticed that the other email-adding functions in test-lib.sh were not yet documented here, so add all of that documentation.
* test: Fix the search and dump-restore tests to operator on non-empty mail store.Gravatar Carl Worth2010-09-20
| | | | | We do this with a new add_email_corpus function that establishes a mail store with 50 messages from the notmuch mailing list.