aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-10-29contrib: pick: move lisp names from pick to treeMark Walters
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.
2013-10-28new: Don't scan unchanged directories with no sub-directoriesAustin Clements
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.
2013-10-27emacs: Add a space after completed tag operationsAustin Clements
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.
2013-10-27emacs: Sanitize authors and subjects in search and showAustin Clements
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.
2013-10-25emacs: Remove interactive behavior of `notmuch-tag'Austin Clements
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.
2013-10-25pick: Use interactive specifications for tag changesAustin Clements
2013-10-25pick: Use list form of tag-changes in testAustin Clements
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.
2013-10-25pick: Fix incorrect use of `notmuch-pick-tag'Austin Clements
`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.
2013-10-25emacs: Use interactive specifications for tag changes in searchAustin Clements
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.
2013-10-25emacs: Use interactive specifications for tag changes in showAustin Clements
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.
2013-10-25emacs: Take prompt and current tags in `notmuch-read-tag-changes'Austin Clements
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'.
2013-10-25emacs: Fix misuse of `notmuch-tag'Austin Clements
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.
2013-10-25perf: Clean corpus and caches in distclean, not cleanAustin Clements
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.
2013-10-25Place extra_cflags before CONFIGURE_CFLAGSMoritz Wilhelmy
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)
2013-10-19emacs: show: use interactive instead of current-prefix-argMark Walters
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.
2013-10-14contrib: pick: update notmuch-show callsMark Walters
Remove some unneeded nil arguments in notmuch-show calls.
2013-10-14test: set mail host in emacs_deliverMark Walters
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.
2013-10-12emacs: distinguish tag `flagged' on terminalGregor Zattler
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.
2013-10-10emacs: Improved `notmuch-describe-keymap' documentationAustin Clements
2013-10-09notmuch-compact: Add man pageBen Gamari
Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
2013-10-09notmuch-compact: Initial commit of CLIBen Gamari
Introduce the user command exposing the new compaction facility. Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
2013-10-09database: Add notmuch_database_compact_closeBen Gamari
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>
2013-10-07News for Emacs help improvementsAustin Clements
2013-10-07emacs: Improve interactive use documentationAustin Clements
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).
2013-10-07emacs: Support overriding help and describing prefix actionAustin Clements
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.
2013-10-07emacs: Clean up a few documentation stringsAustin Clements
Correct some grammatical errors, fix some violations of standard documentation string formatting conventions, and be more precise.
2013-10-07emacs: `notmuch-mua-new-reply' is also not interactiveAustin Clements
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.
2013-10-07emacs: `notmuch-mua-new-forward-message' is not interactiveAustin Clements
`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.
2013-10-02contrib: pick: remove temporary keybindingMark Walters
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.
2013-10-02contrib: pick: move M-RET to prefix-arg RETMark Walters
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.
2013-09-23contrib: pick: tidy up pick-format-fieldMark Walters
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.
2013-09-23contrib: pick: remove unused notmuch-pick-from-helloMark Walters
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).
2013-09-23contrib: pick: use the new notmuch-common-keymap for pick entryMark Walters
Austin recently added a global keymap: use this for pick entry.
2013-09-23contrib: pick: remove some superfluous quotesMark Walters
Pick adds some keybindings to keymaps for other modes (for entry to pick). These quoted the keymaps which appears to be unnecessary and to rely on the fact that these keymaps have the same entry in the function cell as the value cell (perhaps for historical reasons?) Remove these quotes.
2013-09-15contrib: pick: make the tree graphics a proper part of the formatMark Walters
Previously the box graphics in the pick view were always attached to the subject. Make them a field in their own right. We use the recursive insert to change the default notmuch-pick-result-format so that the user view does not change. (The subject touches the tree box graphics but the next column (tags) is still vertically aligned.)
2013-09-15contrib: pick: allow recursive message field formatsMark Walters
Previously, the message format was fixed: each part had to be a certain width and either left or right justified. This allows the user to specify that two parts can be variable width but that combined they should be some fixed width. We do this by allowing the user to set as a "field" a list of the normal result-format form which is formatted and then itself inserted according to the format string specified. This means all existing formats work but allows more general things too. This will be used in the next patch to allow the user to specify where the tree box graphics are drawn but allow, e.g., the total width of the tree box graphics and subject to be specified.
2013-09-15contrib: pick: move the insertion of fields up a levelMark Walters
This moves the actual insertion of message fields up from the field formatting function into the message insertion function. This will be useful in the next patch as we can apply further formatting to the insertion string before inserting.
2013-09-15contrib: pick: print () for a message with no tagsMark Walters
Dating back to the earliest notmuch-pick we have not printed anything for the tag field for a message with no tags. This is inconsistent with search and show both of which print "()". Change pick to be consistent.
2013-09-15contrib: pick: use global keymapMark Walters
Austin recently introduced a new global keymap. This makes pick use this global map. In most cases pick needs to override this global map because it wants to close the message pane before doing the action. However, this documents the over-rides and makes it less likely that the pick bindings will get out of sync with the main bindings.
2013-09-15contrib: pick: bugfix use of mini-buffer historyMark Walters
pick was meant to use the same mini-buffer history but this failed because the interactive definition took place before the use search mini-buffer history part. Remove the interactive prompt to ensure the correct history is used.
2013-09-15emacs: bugfix unquoted symbolMark Walters
In the recent changes for search order handling the default-value of notmuch-search-oldest-first was used. However, default-value needs a symbol so the symbol-name needs to be quoted. This missing quote was causing strange sort-orders in some cases.
2013-09-14lib/cli: pass GMIME_ENABLE_RFC2047_WORKAROUNDS to g_mime_init()Jani Nikula
As explained by Jeffrey Stedfast, the author of GMime, quoted in [1]: > Passing the GMIME_ENABLE_RFC2047_WORKAROUNDS flag to g_mime_init() > *should* solve the decoding problem mentioned in the thread. This > flag should be safe to pass into g_mime_init() without any bad side > effects and my unit tests do test that code-path. The thread being referred to is [2]. [1] id:87bo56viyo.fsf@nikula.org [2] id:08cb1dcd-c5db-4e33-8b09-7730cb3d59a2@gmail.com
2013-09-14test: add known broken tests for known broken RFC 2047 encodingsJani Nikula
Some common broken RFC 2047 encodings that we currently let gmime parse strictly. We could tell gmime to be forgiving in what it accepts as RFC 2047 encoding, making these tests pass.
2013-09-10emacs: Move ?, q, s, m, =, and G to the common keymapAustin Clements
The only user-visible effect of this should be that "G" now works in show mode (previously it was unbound for no apparent reason). This shared keymap gives us one place to put global commands, which both forces us to think about what commands should be global, and ensures their bindings can't diverge (like the missing "G" in show).
2013-09-10emacs: Define a common shared keymap for all of notmuchAustin Clements
This defines a single, currently empty keymap that all other notmuch mode maps inherit from.
2013-09-10emacs: Make notmuch-help work with arbitrary keymapsAustin Clements
This converts notmuch-help to use map-keymap for all keymap traversal. This generally cleans up and simplifies construction of keymap documentation, and also makes notmuch-help support anything that can be in a keymap, including more esoteric stuff like multiple inheritance.
2013-09-10emacs: Add unified refresh-this-buffer functionAustin Clements
This unifies the various refresh and poll-and-refresh functions we have for different modes. Now all modes bind "=" and "G" (except show, which doesn't bind "G" for some reason) to `notmuch-refresh-this-buffer' and `notmuch-poll-and-refresh-this-buffer', respectively.
2013-09-10emacs: Move `notmuch-poll' to notmuch-libAustin Clements
2013-09-10emacs: Remove notmuch-search quit continuationAustin Clements
Since notmuch-hello doesn't need this any more, we can remove this hack. This also eliminates `notmuch-search-quit', so now all modes bind "q" to `notmuch-kill-this-buffer'.
2013-09-10emacs: Bind "s" to notmuch-search in hello-modeAustin Clements
Since there is now no difference between notmuch-hello-search and notmuch-search when called interactively, bind "s" to notmuch-search in notmuch-hello-mode-map. Now all modes bind "s" this way.