aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* test: commit database checksum, ignore actual databasesGravatar David Bremner2014-03-11
| | | | | | | | | The checksum file is used by the test infrastructure to verify the downloaded test database is the one we had in mind. Note that this test is rather strict, and the the checksum file needs to be recommitted when the database is regenerated. add a pattern .gitignore to ignore the actual databases
* devel: add script to generate test databasesGravatar Jani Nikula2014-03-11
| | | | | | | | | Add script to generate notmuch test databases using specified versions of notmuch. This is useful for generating material for database upgrade tests. This reuses the test infrastructure to have a sandbox environment for notmuch new etc.
* test: add database upgrade test from format version 1 to 2Gravatar Jani Nikula2014-03-11
| | | | | | | | | | | | | | | | | Test the upgrade from probabilistic to boolean folder: terms, and addition of path: terms. The test depends on the pre-built test corpus and database tarball and checksum file being in place. If it's not, the test is skipped. The mechanism to fetch the test database will be added later. At the time of writing, a working test database and checksum file is available at http://notmuchmail.org/releases/test-databases/ It has been noted that some non-GNU environments make lack sha256sum. We leave this portability issue for a followup patch.
* test: add tests for the new boolean folder: and path: prefixesGravatar Jani Nikula2014-03-11
| | | | | Additional tests for the boolean folder: and path: prefixes using the full corpus.
* lib: make folder: prefix literalGravatar Jani Nikula2014-03-11
| | | | | | | | | | | | | | | | | | | | | In xapian terms, convert folder: prefix from probabilistic to boolean prefix, matching the paths, relative from the maildir root, of the message files, ignoring the maildir new and cur leaf directories. folder:foo matches all message files in foo, foo/new, and foo/cur. folder:foo/new does *not* match message files in foo/new. folder:"" matches all message files in the top level maildir and its new and cur subdirectories. This change constitutes a database change: bump the database version and add database upgrade support for folder: terms. The upgrade also adds path: terms. Finally, fix the folder search test for literal folder: search, as some of the folder: matching capabilities are lost in the probabilistic to boolean prefix change.
* test: make insert test use the path: prefixGravatar Jani Nikula2014-03-11
| | | | This is a more strict test for the insert test.
* lib: add support for path: prefix searchesGravatar Jani Nikula2014-03-11
| | | | | | | | | | | | | | | | | The path: prefix is a literal boolean prefix matching the paths, relative from the maildir root, of the message files. path:foo matches all message files in foo (but not in foo/new or foo/cur). path:foo/new matches all message files in foo/new. path:"" matches all message files in the top level maildir. path:foo/** matches all message files in foo and recursively in all subdirectories of foo. path:** matches all message files recursively, i.e. all messages.
* lib: refactor folder term update after filename removalGravatar Jani Nikula2014-03-11
| | | | Abstract some blocks of code for reuse. No functional changes.
* test: rearrange the test corpus into subfolders, fix testsGravatar Jani Nikula2014-03-11
| | | | | | | | | | | | | | We will need this for improved folder search tests, but having some folders should exercise our code paths better anyway. Modify the relevant test accordingly to make it pass. This reorganization triggers a bug in the test suite, namely that it expects the output of --output=files to be in a certain order. So we add the fix for that into the same commit. This mainly involves sorting, although the case --duplicate=$n requires more subtlety.
* test: add notmuch_search_files_sanitize and use itGravatar Jani Nikula2014-03-11
| | | | We do this in a lot of places, so make it a helper in the test-lib.
* test: add utility function to sort a json listGravatar David Bremner2014-03-11
| | | | So far we only need this one place, but it's a bit messy to inline
* doc: remove preformatted nroff pagesGravatar David Bremner2014-03-09
| | | | From now on, we should edit the rst source.
* doc: automatically read version from fileGravatar David Bremner2014-03-09
| | | | This avoids having to recreate the update-man-versions rule
* doc: install sphinx version of man pagesGravatar David Bremner2014-03-09
| | | | | | | | The python script mkdocdeps.py is used to import the list of man pages from the sphinx configuration to make. This will delete the (release only) target update-man-versions. This will be replaced in a followup commit.
* doc: add target rst2man to build man pages using rst2manGravatar David Bremner2014-03-09
| | | | | Many people have docutils installed, but not sphinx. Allow these people to build the man pages.
* doc: convert sphinx based docsGravatar David Bremner2014-03-09
| | | | | | | | This is the output from sphinx-quickstart, massaged a bit, along with our existing man pages converted to rst. A skeleton notmuch-emacs manual is also included. It is not suitable for end user use yet.
* util: make sanitize string available in string util for reuseGravatar Jani Nikula2014-03-09
| | | | No functional changes.
* cli: refactor reply from guessingGravatar Jani Nikula2014-03-09
| | | | | | | The guess_from_received_header() function had grown quite big. Chop it up into smaller functions. No functional changes.
* cli: sanitize tabs and newlines to spaces in notmuch searchGravatar Jani Nikula2014-03-09
| | | | | | | | | Sanitize tabs and newlines to spaces rather than question marks in --output=summary --format=text output. This will also hide any difference in unfolding a header that has been folded with a tab. Our own header parser replaces tabs with spaces, while gmime would retain the tab.
* support for generating decreasing dates in bash 4.0 and 4.1Gravatar Tomi Ollila2014-03-09
| | | | | | | | The printf builtin "%(fmt)T" specifier (which allows time values to use strftime-like formatting) is introduced in bash 4.2. Trying to execute this in pre-4.2 bash will fail -- and if this happens execute the fallback piece of perl code to do the same thing.
* test: NOTMUCH_SKIP_TESTS accepts test names with or without Tddd- prefixGravatar Tomi Ollila2014-03-09
| | | | | | | | | | The test names assigned to NOTMUCH_SKIP_TESTS variable can now be given with or without the Tddd- prefix for tester convenience: The test name without Tddd -prefix stays constant even when test filenames are renumbered. The test name with Tddd -prefix is printed out when tests run.
* test: don't use $(dir) in recipes.Gravatar David Bremner2014-03-09
| | | | | | | According the semantics of make, the expansion of $(dir) in recipes uses dynamic scope, i.e. the value at the time the recipe is run. This means if test/Makefile.local is not the last sub-makefile included, all heck breaks loose.
* debian: add dependency on bash-completionGravatar David Bremner2014-03-07
| | | | | | At some point we decided to only install bash completion for notmuch if the bash-completion file was present. Add the corresponding debian build dependency.
* test: Print the number of the test along with its nameGravatar Austin Clements2014-03-06
| | | | | | | Previously, we stripped the "Tnnn-" part from the test name when printing its description at the beginning of each test. However, this makes it difficult to find the source script for a test (e.g., when a test fails). Put this prefix back.
* cli: add missing \n in error messageGravatar Jani Nikula2014-03-06
| | | | The error messages returned by illegal_tag() don't contain newlines.
* test: add tests for invalid new.tagsGravatar Jani Nikula2014-03-06
| | | | Similar tests for both notmuch new and insert.
* cli: make sure notmuch new and insert don't add invalid tagsGravatar Jani Nikula2014-03-06
| | | | | Check new.tags configuration values before doing anything, and bail out on invalid values.
* cli: export function for illegal tag checkingGravatar Jani Nikula2014-03-06
| | | | | This lets us check for forbidden tags consistently across the cli. No functional changes.
* emacs: use the originating buffer's working directory for pipeGravatar Jani Nikula2014-03-04
| | | | | | | | | | | | | Currently notmuch-show-pipe-message runs the command in the working directory of the *notmuch-pipe* buffer if it exists, and the current buffer's working directory (which is inherited to the new *notmuch-pipe* buffer) otherwise. This is all very surprising to the user, and it's difficult to know or change where the command will be run. Always use the current show buffer's working directory for piping. The user can check that with M-x pwd and change it with M-x cd. This is consistent with notmuch-show-pipe-part.
* emacs: Simplify and fix `notmuch-mua-prompt-for-sender'Gravatar Austin Clements2014-03-04
| | | | | | | | | | | | | | | | | | | | `notmuch-mua-prompt-for-sender' is over-engineered and often wrong. It attempts to detect when all identities have the same name and specialize the prompt to just the email address part. However, to do this it uses `mail-extract-address-components', which is meant for displaying email addresses, not general-purpose parsing, and hence performs many canonicalizations that can interfere with this use. For example, configuring notmuch-identities to ("Austin <austin@example.com>"), will cause `notmuch-mua-prompt-for-sender' to lose the name part entirely and return " <austin@example.com>". This patch rewrites `notmuch-mua-prompt-for-sender' to simply prompt for a full identity when notmuch-identities is configured, or to prompt for a sender address when it isn't. The original code also did several strange things, like using `eval' and specifying that this function was interactive. As a side-effect, this patch fixes these problems. And it adds a docstring.
* NEWS: note closing of id:87ty19pi85.fsf@zancas.localnetGravatar David Bremner2014-03-03
| | | | Also close the original debian bug.
* debian: note closing of debian bug 739556Gravatar David Bremner2014-03-03
| | | | This one doesn't seem NEWS-worthy.
* NEWS: note closing of bug id:87wqhcxb5j.fsf@maritornes.cs.unb.caGravatar David Bremner2014-03-03
| | | | This is also/originally Debian bug 737496, so close that too.
* Merge tag 'debian/0.17-5'Gravatar David Bremner2014-03-03
|\ | | | | | | uploaded to unstable
| * debian: fix typo in postinst (Debian bug 740325), clean up empty directoryGravatar David Bremner2014-03-03
| | | | | | | | | | Try to remove the directory /0755 ; if that fails assume it has something in it to preserve.
* | test: Simplify CLEAN list constructionGravatar Austin Clements2014-02-25
| | | | | | | | | | Construct as much of the CLEAN list from TEST_BINARIES as possible, rather than duplicating this information by hand.
* | cli: command line option parser cleanupGravatar Jani Nikula2014-02-25
| | | | | | | | Reduce the indentation for clarity. No functional changes.
* | emacs: remove newlines from input to notmuch count --batchGravatar David Bremner2014-02-25
| | | | | | | | | | | | | | | | | | | | | | Since a newline starts a new query in batch mode, this causes mysterious crashes in the emacs interface if saved searches contain newlines. See the discussion at id:87wqhcxb5j.fsf@maritornes.cs.unb.ca In general newlines seem to be just whitespace to the xapian query parser, so this should be mainly harmless.
* | man: escape backslash in notmuch-tag exampleGravatar David Bremner2014-02-23
| | | | | | | | | | | | | | | | The example was originally intended to have a literal backslash in it, but '\ ' is interpreted by nroff as a non-breaking space. It doesn't make much difference to the example, but the non-breaking space triggers a bug in doclifter.
* | emacs: Fix `notmuch-user-other-email' when no other emails are configuredGravatar Austin Clements2014-02-22
| | | | | | | | | | | | Thanks to the previous patch, this no longer crashes in this situation, but now would return (""). Fix it to return () when no emails are configured.
* | emacs: Fix exception when fetching empty or unconfigured settingsGravatar Austin Clements2014-02-22
| | | | | | | | | | | | | | | | | | | | | | | | When "notmuch config" is called with the name of an empty or unconfigured setting, it prints nothing (not even a new line). Previously, `notmuch-config-get' assumed it would always print a newline. As a result, when `notmuch-config-get' was called with the name of an empty of unconfigured setting, it would attempt to (substring "" 0 -1) to strip the newline, which would fail with a (args-out-of-range "" 0 -1) exception. Fix this by only stripping the newline if there actually is one.
* | emacs: Build forwarded message buffer more directlyGravatar Austin Clements2014-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we used `message-forward' to build forwarded messages, but this function is simply too high-level to be a good fit for some of what we do. First, since `message-forward' builds a full forward message buffer given the message to forward, we have to duplicate much of the logic in `notmuch-mua-mail' to patch the notmuch-y things into the built buffer. Second, `message-forward' constructs the From header from user-full-name and user-mail-address. As a result, if we prompt the user for an identity, we have to parse it into name and address components, just to have it put back together by `message-forward'. This process is not entirely loss-less because `mail-extract-address-components' does a lot of canonicalization (since it's intended for displaying addresses, not for parsing them). To fix these problems, don't use `message-forward' at all. `message-forward' itself is basically just a call to `message-mail' and `message-forward-make-body'. Do this ourselves, but call `notmuch-mua-mail' instead of `message-mail' so we can directly build a notmuch-y message and control the From header. This also fixes a bug that was a direct consequence of our use of `mail-extract-address-components': if the user chose an identity that had no name part (or the name part matched the mailbox), we would bind user-full-name to nil, which would cause an exception in the bowels of message-mode because user-full-name is expected to always be a string (even if it's just "").
* | man: fix typo in notmuch.1Gravatar David Bremner2014-02-21
| | | | | | | | Fix for Debian bug 739556
* | ruby bindings message: docstring typoGravatar Gaute Hope2014-02-21
| |
* | nmbug-status: replace __values__() with values() in OrderedDict stubGravatar Tomi Ollila2014-02-21
| | | | | | | | | | | | | | | | Python dict() object does not have __values__() function which OrderedDict().values() (the stub provided in nmbug-status) could call to provide ordered list of values. By renaming this thinko to values() will make our stub work as expected -- dict items listed out in order those were added to the dictionary.
* | emacs: Avoid rebuilding .eldeps even when there's nothing to doGravatar Austin Clements2014-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we updated .eldeps only if the file contents actually needed to change. This was done to avoid unnecessary make restarts (if the .eldeps rule changes the mtime of .eldeps, make has to restart to collect the new dependencies). However, this meant that, after a modification to any .el file that did not change dependencies, .eldeps would always be out of date, so every make invocation would run the .eldeps rule, which is both expensive because it starts up Emacs and noisy. This was true even when there was nothing to do. E.g., $ make clean && make ... $ touch emacs/notmuch-lib.el && make ... $ make Use "make V=1" to see the verbose compile lines. EMACS emacs/.eldeps make: Nothing to be done for `all'. $ make Use "make V=1" to see the verbose compile lines. EMACS emacs/.eldeps make: Nothing to be done for `all'. Fix this by replacing .eldeps with two files with identical content. One tracks the mtime of the dependency information and triggers the Emacs call to rebuild dependencies only when it may be necessary. The other tracks the content only; this rule over-triggers in the same way the old rule did, but this rule is cheap and quiet.
* | Merge tag 'debian/0.17-4'Gravatar David Bremner2014-02-21
|\| | | | | | | uploaded to Debian unstable
| * changelog stanza for 0.17-4Gravatar David Bremner2014-02-18
| |
| * debian: update ruby binary extension install pathGravatar David Bremner2014-02-18
| | | | | | | | | | | | | | | | | | | | | | | | From Christian Hofstaedler, Debian bug 739120: When ruby-defaults > 1:2.0 will be uploaded to sid, the version of Ruby provided by the 'ruby' and 'ruby-dev' packages will change to version 2.0. This version change includes a change to the path for binary extensions. This patch works for Ruby 1.9.1 as well as Ruby 2.0, so it's safe to apply now.
* | emacs: update alist for mail-archive.com API changeGravatar Jed Brown2014-02-16
| | | | | | | | | | | | | | | | Searching by Message-Id no longer works via the old mail-archive.com API, though I have contacted them in hopes that they restore it to prevent dead links. Anyway, the new API is cleaner. Acked-by: Austin Clements <amdragon@MIT.EDU>