aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* doc: fix out-of-tree buildGravatar David Bremner2014-03-25
| | | | | | | | The subtle part is adding .rst and .py files to vpath so they can be used as dependencies without prefixing with $(srcdir) We also change the interface to mkbuildeps.py: rather than getting the containing directory from the conf file path, we go the other way.
* test: use $(srcdir) instead of . as include pathGravatar David Bremner2014-03-25
| | | | | This is needed for out of tree builds. The functional change is the modification of extra_cflags; the other changes are cosmetic.
* build: move canonical list of subdirectories to configure scriptGravatar David Bremner2014-03-25
| | | | | The configure script needs this list for out of tree builds. Grabbing it from the Makefile via sed was fragile and broken.
* emacs: tree: use orig-tags in searchGravatar Mark Walters2014-03-24
| | | | | | | This uses the recent functionality to show the tag changes in the tree buffer. Currently this is only used to show changes the tree buffer makes itself: i.e., it does not make display any changes reflecting tagging done by other notmuch-buffers.
* emacs: search: use orig-tags in searchGravatar Mark Walters2014-03-24
| | | | | | | This uses the recent functionality to show the tag changes in the search buffer. Currently this is only used to show changes the search buffer makes itself: i.e., it does not make display any changes reflecting tagging done by other notmuch-buffers.
* emacs: show: use orig-tags for tag displayGravatar Mark Walters2014-03-24
| | | | | This uses the previous patch to show the tag changes that have occured in the show buffer since it was last loaded/refreshed.
* emacs: show: mark tags changed since buffer loadedGravatar Mark Walters2014-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows (and requires) the original-tags to be passed along with the current-tags to be passed to notmuch-tag-format-tags. This allows the tag formatting to show added and deleted tags.By default a removed tag is displayed with strike-through in red (if strike-through is not available, eg on a terminal, inverse video is used instead) and an added tag is displayed underlined in green. If the caller does not wish to use the new feature it can pass current-tags for both arguments and, at this point, we do exactly that in the three callers of this function. Note, we cannot tidily allow original-tags to be optional because we would need to distinguish nil meaning "we are not specifying original-tags" from nil meaning there were no original-tags (an empty list). We use this in subsequent patches to make it clear when a message was unread when you first loaded a show buffer (previously the unread tag could be removed before a user realised that it had been unread). The code adds into the existing tag formatting code. The user can specify exactly how a tag should be displayed normally, when deleted, or when added. Since the formatting code matches regexps a user can match all deleted tags with a ".*" in notmuch-tag-deleted-formats. For example setting notmuch-tag-deleted-formats to '((".*" nil)) tells notmuch not to show deleted tags at all. All the variables are customizable; however, more complicated cases like changing the face depending on the type of display will require custom lisp. Currently this overrides notmuch-tag-deleted-formats for the tests setting it to '((".*" nil)) so that they get removed from the display and, thus, all tests still pass.
* emacs: tag: add customize for deleted/added tag formatsGravatar Mark Walters2014-03-24
| | | | | | | | | | | | | | Add customize options for deleted/added tag formats. These are not used yet but will be later in the series. We switch to using `notmuch-apply-face' rather than `propertize' in the defcustom for faces so that the faces for deleted/added tags add to the default face attributes for the tag. We special case deleting the unread tag as that tag is a strong visual cue and we don't need that cue when we are just saying it used to be unread. Thus, we revert to the normal tag face with strikethough for deleted unread tags.
* emacs: tag split customise option for format-tags into a widgetGravatar Mark Walters2014-03-24
| | | | | | We will re-use the customize option for format-tags for formattting deleted tags to added tags in the next patch so split it into a widget. There should be no functional change.
* Make keys of notmuch-tag-formats regexps and use cachingGravatar Austin Clements2014-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This modifies `notmuch-tag-format-tag' to treat the keys of `notmuch-tag-formats' as (anchored) regexps, rather than literal strings. This is clearly more flexible, as it allows for prefix matching, defining a fallback format, etc. This may cause compatibility problems if people have customized `notmuch-tag-formats' to match tags that contain regexp specials, but this seems unlikely. Regular expression matching has quite a performance hit over string lookup, so this also introduces a simple cache from exact tags to formatted strings. The number of unique tags is likely to be quite small, so this cache should have a high hit rate. In addition to eliminating the regexp lookup in the common case, this cache stores fully formatted tags, eliminating the repeated evaluation of potentially expensive, user-specified formatting code. This makes regexp lookup at least as fast as assoc for unformatted tags (e.g., inbox) and *faster* than the current code for formatted tags (e.g., unread): inbox (usec) unread (usec) assoc: 0.4 2.8 regexp: 3.2 7.2 regexp+caching: 0.4 0.4 (Though even at 7.2 usec, tag formatting is not our top bottleneck.) This cache must be explicitly cleared to keep it coherent, so this adds the appropriate clearing calls.
* emacs: Combine notmuch-combine-face-text-property{, -string}Gravatar Austin Clements2014-03-24
| | | | | | | | | This combines our two face combining functions into one, easy to use function with a much shorter name: `notmuch-apply-face'. This function takes the full set of arguments that `notmuch-combine-face-text-property' took, but takes them in a more convenient order and provides smarter defaults that make the function easy to use on both strings and buffers.
* nmbug-status: make output title and blurb configurableGravatar Jani Nikula2014-03-23
| | | | | | | | Make nmbug-status more generally usable outside of nmbug by not hardcoding notmuch related things. This lets anyone publish html search views to mailing list messages with a custom config file, independent of nmbug.
* nmbug-status: parameterize title and blurb in the page headerGravatar Jani Nikula2014-03-23
| | | | Prepare for more general use.
* emacs: add path: prefix to query completionGravatar Jani Nikula2014-03-23
| | | | Complete to the new path: prefix.
* doc: cosmetic fix for prerst2man.pyGravatar David Bremner2014-03-18
| | | | | Fix a particular egregious combination of format and string concatenation.
* doc: configure detection of sphinx and rst2manGravatar David Bremner2014-03-18
| | | | | | | | | Because sphinx-build does not provide a convenient way of listing which builders exist, and some people actually have pre 1.0 sphinx, we try loading a relevant python module. Currently the assumption is that no python in path -> no sphinx-build in path.
* doc: build man pages into hierarchy, fix help test.Gravatar David Bremner2014-03-18
| | | | | | | | | It turns out there was a reason the old man pages were stored in a man compatible hierarchy, namely so that we could run man on them before installing. Hardcode doc build location into test suite. This isn't ideal, but let's unbreak the test suite for now.
* doc: build man pages at build time; introduce HAVE_SPHINX, HAVE_RST2MANGravatar David Bremner2014-03-18
| | | | | | | | This helps avoid build artifacts (namely, nroff and gzipped-nroff man pages) owned by root. The variables allow choosing which generator to use for the man page. These will be hooked to configure in a following commit.
* util: Fix two corner-cases in boolean term quoting functionGravatar Austin Clements2014-03-15
| | | | | | | | | Previously, make_boolean_term did not quote empty boolean terms or boolean terms that started with '('. These cases are incompatible with Xapian: empty terms cannot be omitted, and boolean terms that start with '(' trigger an alternate term quoting syntax. Fix this by quoting empty terms and terms that contain '('.
* perf-test: use command line arguments for directoriesGravatar David Bremner2014-03-14
| | | | | | It seems that between version 1.26 and 1.27 of gnu tar, directories to be extracted read with --files-from are no longer recursively extacted. This patch puts them on the command line instead.
* man: try to clarify the folder: and path: vs. --output=files confusionGravatar Jani Nikula2014-03-11
|
* man: update man pages for folder: and path: search termsGravatar Jani Nikula2014-03-11
| | | | Text from review by Austin Clements <amdragon@MIT.EDU>.
* test: add machinery to download and verify databasesGravatar David Bremner2014-03-11
| | | | | Note that it is intentional that the checksum file is not downloaded. The intent is to check those into git.
* 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.