aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* emacs: move notmuch-tree from contrib to mainlineGravatar Mark Walters2013-11-07
|
* emacs: tree: remove unneeded declarationsGravatar Mark Walters2013-11-07
| | | | | | There are some crufty declare-functions and requires in notmuch-tree: since it requires notmuch.el itself this all works but in preparation for the move to mainline tidy this up.
* emacs: move notmuch-help to libGravatar Mark Walters2013-11-07
| | | | | | notmuch-help is in notmuch.el not notmuch-lib.el and this is incovenient for the way pick/tree uses it. I think lib makes more sense anyway so move it there.
* cli: add compact --backup=DIRECTORY option, don't backup by defaultGravatar Jani Nikula2013-11-07
| | | | | It's the user's decision. The recommended way is to do a database dump anyway. Clean up the relevant printfs too.
* cli: return error status if compaction failsGravatar Jani Nikula2013-11-07
| | | | As is customary for any tool.
* lib: use the compaction backup path provided by the callerGravatar Jani Nikula2013-11-07
| | | | | | | | The extra path component added by the lib is a magic value that the caller just has to know. This is demonstrated by the current code, which indeed has "xapian.old" both sides of the interface. Use the backup path provided by the lib caller verbatim, without adding anything to it.
* lib: update documentation of callback functions for database_compact and ↵Gravatar David Bremner2013-11-07
| | | | | | | database_upgrade. Compact was missing callback documentation entirely, and upgrade did not discuss the closure parameter.
* lib: add closure parameter to compact status update callbackGravatar Jani Nikula2013-11-07
| | | | This provides much more flexibility for the caller.
* lib: do not leak the database in compactionGravatar Jani Nikula2013-11-07
| | | | | Destroy instead of close the database after compaction, and also on error path, to not leak the database.
* lib: check talloc success in compactGravatar Jani Nikula2013-11-06
| | | | In line with the allocation checks all around.
* lib: construct compactor within try block to catch any exceptionsGravatar Jani Nikula2013-11-06
| | | | Constructors may also throw exceptions. Catch them.
* test: fix compact backup / restore testGravatar David Bremner2013-11-06
| | | | | | It was looking in completely the wrong place for the backup and the (test) xapian database. Unfortunately test_begin_subtest hides the relevant errors.
* query: bind queries to database objectsGravatar Felipe Contreras2013-11-02
| | | | | | | | The queries don't really work after a database is closed, and we would like them to be freed if the database is destroyed. Acknowledged-by: David Bremner <david@tethera.net> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* test: Add compact testGravatar Ben Gamari2013-10-31
| | | | Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
* lib: fix build on !HAVE_XAPIAN_COMPACTGravatar Jani Nikula2013-10-30
| | | | | Minimal change to build notmuch against xapian that doesn't have compaction support.
* pick: rename test emacs-pick to emacs-treeGravatar Mark Walters2013-10-29
| | | | Also fixup run-tests.sh
* pick: rename test outputs from pick to treeGravatar Mark Walters2013-10-29
| | | | | | Rename all the test output files to tree rather than pick, move the containing directory to a tree.expected-output and fix up the references in the test.
* pick: Change the test names and print out for pick testsGravatar Mark Walters2013-10-29
| | | | Change from the pick name to the tree name
* contrib: pick: move lisp names from pick to treeGravatar Mark Walters2013-10-29
| | | | | | This changes all the lisp names from pick to tree (variables, functions etc). It also changes the lisp in the emacs-pick test files to match the new names.
* new: Don't scan unchanged directories with no sub-directoriesGravatar Austin Clements2013-10-28
| | | | | | This can substantially reduce the cost of notmuch new in some situations, such as when the file system cache is cold or when the Maildir is on NFS.
* emacs: Add a space after completed tag operationsGravatar Austin Clements2013-10-27
| | | | | | | | | | | | | | Previously, when a user fully completed a tag operation, they had to press space to begin entering another tag operation. This is different from, say, shell file name completion, which typically inserts a space after an unambiguous completion under the assumption that the user will want to enter more input. This patch tweaks `notmuch-read-tag-changes' to act more like shell file name completion: after an unambiguous tag completion, it now inserts a space, ready and waiting for another tagging operation from the user. This is backwards-compatible with old habits, since there's no harm in putting an extra space.
* emacs: Sanitize authors and subjects in search and showGravatar Austin Clements2013-10-27
| | | | | | Authors and subjects can contain embedded, encoded control characters like "\n" and "\t" that mess up display. Transform control characters into spaces everywhere we display them in search and show.
* emacs: Remove interactive behavior of `notmuch-tag'Gravatar Austin Clements2013-10-25
| | | | | | | We no longer use this, since we've lifted all interactive behavior to the appropriate interactive entry points. Because of this, `notmuch-tag' also no longer needs to return the tag changes list, since the caller always passes it in.
* pick: Use interactive specifications for tag changesGravatar Austin Clements2013-10-25
|
* pick: Use list form of tag-changes in testGravatar Austin Clements2013-10-25
| | | | | | Currently we support both string and list forms of tag-changes for historical reasons. This is about to change, so fix pick's tests that use the legacy string form of tag-changes.
* pick: Fix incorrect use of `notmuch-pick-tag'Gravatar Austin Clements2013-10-25
| | | | | | | `notmuch-pick-tag' takes a list of tag changes, but `notmuch-pick-archive-message' passes it a &rest argument. This happens to work if `notmuch-archive-tags' contains a single tag (which it usually does), but will break if it does not.
* emacs: Use interactive specifications for tag changes in searchGravatar Austin Clements2013-10-25
| | | | | | | | | | This is similar to the previous commit, but applies to search. Search is somewhat more complicated because its tagging operations can also apply to a region. Hence, this lifts interactive prompting into a helper function. This also takes advantage of the new ability to provide a prompt to distinguish tagging a single thread from tagging a region of threads.
* emacs: Use interactive specifications for tag changes in showGravatar Austin Clements2013-10-25
| | | | | | | | | | | | | | | This modifies all tagging operations in show to call `notmuch-read-tag-changes' in their interactive specification to input tag changes, rather than depending on lower-level functions to prompt for tag changes regardless of their calling context. Besides being more Elispy and providing a more consistent programmatic API, this enables callers to provide two call site-specific pieces of information: an appropriate prompt, and the set of visible tags. The prompt lets us differentiate * from +/-. Providing visible tags enables a more consistent user experience than retrieving the (potentially different) tags from the database, and avoids a round-trip to the CLI and database.
* emacs: Take prompt and current tags in `notmuch-read-tag-changes'Gravatar Austin Clements2013-10-25
| | | | | | | | | | This modifies the interface of `notmuch-read-tag-changes' to take an optional prompt string as well as a list of existing tags instead of a query. This list of tags is used to populate the tag removal completions and lets the caller compute these in a more efficient/consistent manner than performing a potentially large or complex query. This patch also updates the sole current caller of `notmuch-read-tag-changes'.
* emacs: Fix misuse of `notmuch-tag'Gravatar Austin Clements2013-10-25
| | | | | | | | | The calling convention for `notmuch-tag' changed in commit 97aa3c06 to take a list of tag changes instead of a &rest argument, but the call from `notmuch-search-tag-all' still passed a &rest argument. This happened to work for interactive calls because tag-changes would be nil, so the `apply' call would pass only the query string to `notmuch-tag' and simply omit the &optional tag-changes argument.
* perf: Clean corpus and caches in distclean, not cleanGravatar Austin Clements2013-10-25
| | | | | | | | Previously, we cleaned the downloaded performance corpus and the cached indexes on 'make clean'. This seems heavy-handed, since these take a long time to download, unpack, and index. They also aren't make targets to begin with. Move cleaning these to 'make distclean'. This isn't exactly the right meaning of "distclean", but it's closer.
* Place extra_cflags before CONFIGURE_CFLAGSGravatar Moritz Wilhelmy2013-10-25
| | | | | | | This ensures that the build will not attempt to use an existing notmuch.h when an older version of notmuch is already installed elsewhere (e.g. in /usr/local) and /usr/local/include is added to CONFIGURE_CFLAGS by one of the libraries (talloc, in my case)
* emacs: show: use interactive instead of current-prefix-argGravatar Mark Walters2013-10-19
| | | | | | | | | Currently notmuch-show looks at the prefix-arg directly via current-prefix-arg. This changes it to use the interactive specification. One test (for elide-toggle functionality) set the prefix arg directly. Update this test to set the new argument directly.
* contrib: pick: update notmuch-show callsGravatar Mark Walters2013-10-14
| | | | Remove some unneeded nil arguments in notmuch-show calls.
* test: set mail host in emacs_deliverGravatar Mark Walters2013-10-14
| | | | | | | | | | | | | | | | | | One test (reply to encrypted message in the crypto test) recently started failing on some systems. The failure I saw were two extra lines of the form <87d2nbc5xg.fsf@host.i-did-not-set--mail-host-address--so-tickle-me> The test pipes the output through grep -v -e '^In-Reply-To:' -e '^References:' which would normally these two ids but it does not, in this case, because they are so long they get put on a separate line in the output. To fix this we set mail-host-address for emacs deliver. example.com seems a sensible address to use. This is short enough that we don't get the line breaks above and the tests then all pass.
* emacs: distinguish tag `flagged' on terminalGravatar Gregor Zattler2013-10-12
| | | | | | | Change foreground color to `blue' like lines representing threads with flagged messages in notmuch-search. Before tag `flagged' was shown in notmuch-show buffers as image star on graphical frames while there was no visible distinction to other flags on terminal frames.
* emacs: Improved `notmuch-describe-keymap' documentationGravatar Austin Clements2013-10-10
|
* notmuch-compact: Add man pageGravatar Ben Gamari2013-10-09
| | | | Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
* notmuch-compact: Initial commit of CLIGravatar Ben Gamari2013-10-09
| | | | | | Introduce the user command exposing the new compaction facility. Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
* database: Add notmuch_database_compact_closeGravatar Ben Gamari2013-10-09
| | | | | | | | | This function uses Xapian's Compactor machinery to compact the notmuch database. The compacted database is built in a temporary directory and later moved into place while the original uncompacted database is preserved. Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
* News for Emacs help improvementsGravatar Austin Clements2013-10-07
|
* emacs: Improve interactive use documentationGravatar Austin Clements2013-10-07
| | | | | | | | | | | | This improves the function documentation for many interactive commands, either by improving their documentation string where the improvement also makes sense for programmatic use or by adding a 'notmuch-doc property where it doesn't. For nearly all commands that support a prefix argument, this adds a 'notmuch-prefix-doc property to document their prefixed behavior This omits prefix documentation for a few commands where I thought the prefixed behavior was too obscure (or too complex to fit in one line).
* emacs: Support overriding help and describing prefix actionGravatar Austin Clements2013-10-07
| | | | | | | | | | | | | | | | | | | | | | | | Traditionally, function documentation strings are intended primarily for programmers, rather than users. They're written from the perspective of calling the function, not interactively invoking it. They're only ever displayed along with the function prototype (and often refer to argument names). And built-in help commands like `describe-bindings' show the name of the command, not its documentation. The notmuch help system is like `describe-bindings', but tries to be more user-friendly by displaying documentation strings, rather than Elisp command names. For most commands, this is fine, but for some the "programmer description" is inappropriate for interactive use. This is particularly noticeable for commands that take an optional prefix argument. This patch adds support for two symbol properties: notmuch-doc and notmuch-prefix-doc, which let a command override its interactive documentation and provide separate documentation for its prefixed invocation. If notmuch-prefix-doc is present, we add an extra line to the help giving the prefixed key sequence along with the documentation for the prefixed command.
* emacs: Clean up a few documentation stringsGravatar Austin Clements2013-10-07
| | | | | Correct some grammatical errors, fix some violations of standard documentation string formatting conventions, and be more precise.
* emacs: `notmuch-mua-new-reply' is also not interactiveGravatar Austin Clements2013-10-07
| | | | | | | | | Like `notmuch-mua-new-forward-message', this is meant to be invoked programmatically by something that can provide a reasonable query string. In fact, `notmuch-mua-new-reply's interactive specification didn't match its arguments, so it wouldn't have worked interactively.
* emacs: `notmuch-mua-new-forward-message' is not interactiveGravatar Austin Clements2013-10-07
| | | | | | | | | | | `notmuch-mua-new-forward-message' must be called from a buffer containing a raw RFC2822-formatted message to forward. Hence, it's intended to be invoked programmatically through something else that sets up this buffer (like `notmuch-show-forward-message'), not interactively. Remove its interactive specification and update the documentation string to mention the requirements on the current buffer.
* contrib: pick: remove temporary keybindingGravatar Mark Walters2013-10-02
| | | | | | | | | We would like to bind prefix-arg RET in search view to "pick show this thread" (i.e. notmuch-pick-from-search-thread). It is not easy to do this cleanly from contrib so I have been using M-RET instead. Temporarily remove this functionality in preparation for entering mainline and binding to prefix-arg RET.
* contrib: pick: move M-RET to prefix-arg RETGravatar Mark Walters2013-10-02
| | | | | | | | | | | | In pick the user has the option of showing the selected message in a subpane (the message pane) or in the full frame. This is customisable using the variable notmuch-pick-show-out. At the moment RET is bound to the default option and M-RET the other option. This is messy and involves tricks to make sure the keymap is setup at the right time. This changes this to prefix-arg RET for the other option which simplifies the code and makes things cleaner.
* contrib: pick: tidy up pick-format-fieldGravatar Mark Walters2013-09-23
| | | | | | | | | | Previously this function used a temporary variable to store the return value but we can just use the return value of the cond statement directly. The only tiny subtlety is that in one case (subject) we need to slightly reorder the logic to make sure the formatted-field is the last thing computed.
* contrib: pick: remove unused notmuch-pick-from-helloGravatar Mark Walters2013-09-23
| | | | | | | This function was used for pick entry from hello but isn't needed anymore. It was modelled on notmuch-hello-search which is now only used non-interactively (and notmuch-pick does now add to the recent-search history correctly).