Tomi Ollila [Wed, 13 Nov 2013 17:02:43 +0000 (19:02 +0200)]
compact: tidy formatting
Notmuch compact code whitespace changes to match devel/STYLE.
Mark Walters [Sat, 16 Nov 2013 08:05:16 +0000 (08:05 +0000)]
News for tree-view
Mark Walters [Tue, 12 Nov 2013 20:10:59 +0000 (20:10 +0000)]
emacs: tree: use remap for the over-ridden global bindings
Following a suggestion by Austin in id:
20130915153642.GY1426@mit.edu
we use remap for the over-riding bindings in pick. This means that if
the user modifies the global keymap these modifications will happen in
the tree-view versions of them too.
[tree-view overrides these to do things like close the message pane
before doing the action, so the functionality is very close to the
original common keymap function.]
Mark Walters [Tue, 12 Nov 2013 20:10:58 +0000 (20:10 +0000)]
emacs: help: add a special function to deal with remaps
remaps are a rather unusual keymap consisting of "first key" 'remap
and then "second-key" the remapped-function. Thus we do the
documentation for it separately.
Mark Walters [Tue, 12 Nov 2013 20:10:57 +0000 (20:10 +0000)]
emacs: help: add base-keymap
To support key remapping in emacs help we need to know the base keymap
when looking at the remapping. keep track of this while we recurse
down the sub-keymaps in help.
Mark Walters [Tue, 12 Nov 2013 20:10:56 +0000 (20:10 +0000)]
emacs: help: split out notmuch-describe-key as a function
The actual documentation function notmuch-describe-keymap was getting
rather complicated so split out the code for a single key into its own
function notmuch-describe-key.
Mark Walters [Tue, 12 Nov 2013 20:10:55 +0000 (20:10 +0000)]
emacs: help: remove duplicate bindings
If the user (or a mode) overrides a keybinding from the common keymap
in one of the modes then both help lines appear in the help screen
even though only one of them is applicable.
Fix this by checking if we already have that key binding. We do this
by constructing an list of (key . docstring) pairs so it is easy to
check if we have already had that binding. Then the actual print help
routine changes these pairs into strings "key \t docstring"
Mark Walters [Tue, 12 Nov 2013 20:10:54 +0000 (20:10 +0000)]
emacs: help: save-match-data
The routines that construct the help page in notmuch-lib rely on
match-data being preserved across some fairly complicated code. This
is currently valid but will not be when this series is finished. Thus
place everything between the string-match and replace-match inside a
save-match-data.
Mark Walters [Tue, 12 Nov 2013 20:10:53 +0000 (20:10 +0000)]
emacs: help: check for nil key binding
A standard way to unset a key binding is local-unset-key which is equivalent to
(define-key (current-local-map) key nil)
Currently notmuch-help gives an error and fails if a user has done this.
To fix this we only add a help line if the binding is non-nil.
Austin Clements [Wed, 13 Nov 2013 03:49:53 +0000 (22:49 -0500)]
emacs: Correct documentation of `notmuch-poll-script'
The functions referred to in the documentation for this variable were
replaced by the unified `notmuch-poll-and-refresh-this-buffer' in
21474f0e. Update the documentation to reflect the new function.
Tomi Ollila [Wed, 13 Nov 2013 22:39:24 +0000 (00:39 +0200)]
NEWS: emacs: fix notmuch-mua-reply point placement
News for commit
4ceeaf8038ff241f438ad2a5d0bbda1c78aee385
Minor grammar edit by db.
Mark Walters [Wed, 13 Nov 2013 12:51:27 +0000 (12:51 +0000)]
remove notmuch-pick
Austin Clements [Tue, 12 Nov 2013 22:44:12 +0000 (17:44 -0500)]
Accumulated news for Austin's changes
Jani Nikula [Wed, 6 Nov 2013 19:25:37 +0000 (21:25 +0200)]
completion: update bash completion
Update bash completion to cover new commands and options:
notmuch compact --quiet --backup=DIR
notmuch count --output=files --batch --input=FILE
notmuch insert --folder=DIR --create-folder
notmuch search --exclude=all --duplicate=N
notmuch show --include-html
notmuch tag --batch --input=FILE --remove-all
Tomi Ollila [Fri, 8 Nov 2013 17:30:56 +0000 (19:30 +0200)]
devel/release-checks.sh: check NOTMUCH_(MAJOR|MINOR|MICRO)_VERSION
New defines NOTMUCH_MAJOR_VERSION, NOTMUCH_MINOR_VERSION and
NOTMUCH_MICRO_VERSION were added to lib/notmuch.h.
Check that these match the current value defined in ./version.
Austin Clements [Thu, 24 Oct 2013 15:19:11 +0000 (11:19 -0400)]
emacs: Fix search tagging races
This fixes races in thread-local and global tagging in notmuch-search
(e.g., "+", "-", "a", "*", etc.). Previously, these would modify tags
of new messages that arrived after the search. Now they only operate
on the messages that were in the threads when the search was
performed. This prevents surprises like archiving messages that
arrived in a thread after the search results were shown.
This eliminates `notmuch-search-find-thread-id-region(-search)'
because these functions strongly encouraged racy usage.
This fixes the two broken tests added by the previous patch.
Austin Clements [Thu, 24 Oct 2013 15:19:10 +0000 (11:19 -0400)]
emacs: Add known-broken tests for search tagging races
These tests check that both thread-local and global search tagging
operations are race-free. They are currently known-broken because
they aren't race-free.
Austin Clements [Thu, 24 Oct 2013 15:19:09 +0000 (11:19 -0400)]
Add TODO about more efficient stable thread queries
Austin Clements [Thu, 24 Oct 2013 15:19:08 +0000 (11:19 -0400)]
search: Add stable queries to thread search results
These queries will match exactly the set of messages currently in the
thread, even if more messages later arrive. Two queries are provided:
one for matched messages and one for unmatched messages.
This can be used to fix race conditions with tagging threads from
search results. While tagging based on a thread: query can affect
messages that arrived after the search, tagging based on stable
queries affects only the messages the user was shown in the search UI.
Since we want clients to be able to depend on the presence of these
queries, this ushers in schema version 2.
Austin Clements [Thu, 24 Oct 2013 15:19:07 +0000 (11:19 -0400)]
emacs: Use notmuch tag --batch for large tag queries
(Unfortunately, it's difficult to first demonstrate this problem with
a known-broken test because modern Linux kernels have argument length
limits in the megabytes, which makes Emacs really slow!)
Austin Clements [Thu, 24 Oct 2013 15:19:06 +0000 (11:19 -0400)]
emacs: Support passing input via `notmuch-call-notmuch-*'
This adds support for passing a string to write to notmuch's stdin to
`notmuch-call-notmuch-process' and `notmuch-call-notmuch-sexp'. Since
this makes both interfaces a little more complicated, it also unifies
their documentation better.
Austin Clements [Thu, 24 Oct 2013 15:19:05 +0000 (11:19 -0400)]
emacs: Move `notmuch-call-notmuch-process' to notmuch-lib
Previously, this was in notmuch.el, but all of the other notmuch call
wrappers were in notmuch-lib.el. Move `notmuch-call-notmuch-process'
to live with its friends. This happens to fix a missing dependency
from notmuch-tag.el, which required notmuch-lib, but not notmuch.
Austin Clements [Thu, 24 Oct 2013 15:19:04 +0000 (11:19 -0400)]
test: Fix missing erase-buffer in emacs test
The first subprocess error exit code test assumed the *Notmuch errors*
buffer would be empty. Rather than assuming, make it so.
Austin Clements [Thu, 24 Oct 2013 15:19:03 +0000 (11:19 -0400)]
lib: Document extent of some return values
This documents the extent of the notmuch_messages_t* pointers returned
by notmuch_thread_get_toplevel_messages and
notmuch_thread_get_messages.
Austin Clements [Thu, 24 Oct 2013 15:19:02 +0000 (11:19 -0400)]
cli: Separate current and deprecated format version
Previously, the CLI would print a deprecation warning if a client
requested any format version other than the current one. However, if
we add fields that are backwards-compatible, but want clients to be
able to depend on, we need to bump the version, but that doesn't make
the older version deprecated.
Hence, separate out the "minimum active" version and only print a
warning for requests below this version number.
Austin Clements [Thu, 24 Oct 2013 15:19:01 +0000 (11:19 -0400)]
schemata: Disambiguate non-terminal names
Previously, the show schema and the search schema used different
"thread" non-terminals. While these schemata don't interact, this is
still confusing, so rename search's "thread" to "thread_summary". To
further limit confusion, prefix all top-level search non-terminals now
begin with "search_".
Jani Nikula [Wed, 6 Nov 2013 16:38:56 +0000 (18:38 +0200)]
man: document notmuch compact --quiet and --backup=DIRECTORY options
Jani Nikula [Wed, 6 Nov 2013 16:38:55 +0000 (18:38 +0200)]
cli: add compact --quiet option and silence output with it
Provide a way to silence the output.
Jani Nikula [Wed, 6 Nov 2013 19:01:41 +0000 (21:01 +0200)]
lib: add library version check macro
There have been some plans for making build incompatible changes to
the library API. This is inconvenient, but it is much more so without
a way to easily conditional build against multiple versions of
notmuch.
The macro has been lifted from glib.
Mark Walters [Fri, 1 Nov 2013 09:23:45 +0000 (09:23 +0000)]
emacs: move the show entry to tree into show.el
Move the keybinding and show specific helper from tree.el to show.el
Mark Walters [Fri, 1 Nov 2013 09:23:44 +0000 (09:23 +0000)]
emacs: add z to common keymap
Add the main entry "z" to notmuch-tree to the common keymap.
Mark Walters [Fri, 1 Nov 2013 09:23:43 +0000 (09:23 +0000)]
emacs: move search based tree functions to notmuch.el
Move a couple of the search mode specifc caller helpers for tree from
tree into notmuch.el.
Mark Walters [Fri, 1 Nov 2013 09:23:42 +0000 (09:23 +0000)]
test: tree: remove require from tests
Now tree is included by default we don't need to "require it" in the
test.
Mark Walters [Fri, 1 Nov 2013 09:23:41 +0000 (09:23 +0000)]
emacs: minimal change to load notmuch-tree by default
We want to load notmuch-tree when notmuch is loaded, so include it as
a require in notmuch.el. To avoid circular dependency we need to move
one keybinding from notmuch-tree.el to notmuch.el: it makes sense for
it to be defined there anyway.
Since tree is now loaded by default there is no need to print a
message when it is loaded.
Mark Walters [Tue, 29 Oct 2013 22:55:33 +0000 (22:55 +0000)]
emacs: tree: remove test for emacs from tree test
Now the test is in mainline we can remove the check that emacs exists.
Mark Walters [Tue, 29 Oct 2013 22:55:32 +0000 (22:55 +0000)]
test: move emacs-tree test into mainline
We move the emacs-tree test and associated files into the main test
directory and add the test to the list in notmuch-test.
Mark Walters [Tue, 29 Oct 2013 22:55:31 +0000 (22:55 +0000)]
emacs: add tree to the makefile
Mark Walters [Tue, 29 Oct 2013 22:55:30 +0000 (22:55 +0000)]
emacs: move notmuch-tree from contrib to mainline
Mark Walters [Tue, 29 Oct 2013 22:55:29 +0000 (22:55 +0000)]
emacs: tree: remove unneeded declarations
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.
Mark Walters [Tue, 29 Oct 2013 22:55:28 +0000 (22:55 +0000)]
emacs: move notmuch-help to lib
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.
Jani Nikula [Sun, 3 Nov 2013 12:24:49 +0000 (14:24 +0200)]
cli: add compact --backup=DIRECTORY option, don't backup by default
It's the user's decision. The recommended way is to do a database dump
anyway. Clean up the relevant printfs too.
Jani Nikula [Sun, 3 Nov 2013 12:24:48 +0000 (14:24 +0200)]
cli: return error status if compaction fails
As is customary for any tool.
Jani Nikula [Sun, 3 Nov 2013 12:24:47 +0000 (14:24 +0200)]
lib: use the compaction backup path provided by the caller
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.
David Bremner [Sun, 3 Nov 2013 12:24:46 +0000 (14:24 +0200)]
lib: update documentation of callback functions for database_compact and database_upgrade.
Compact was missing callback documentation entirely, and upgrade did not discuss the
closure parameter.
Jani Nikula [Sun, 3 Nov 2013 12:24:45 +0000 (14:24 +0200)]
lib: add closure parameter to compact status update callback
This provides much more flexibility for the caller.
Jani Nikula [Sun, 3 Nov 2013 12:24:44 +0000 (14:24 +0200)]
lib: do not leak the database in compaction
Destroy instead of close the database after compaction, and also on
error path, to not leak the database.
Jani Nikula [Sun, 3 Nov 2013 12:24:43 +0000 (14:24 +0200)]
lib: check talloc success in compact
In line with the allocation checks all around.
Jani Nikula [Sun, 3 Nov 2013 12:24:42 +0000 (14:24 +0200)]
lib: construct compactor within try block to catch any exceptions
Constructors may also throw exceptions. Catch them.
David Bremner [Sun, 3 Nov 2013 12:24:41 +0000 (14:24 +0200)]
test: fix compact backup / restore test
It was looking in completely the wrong place for the backup and the
(test) xapian database. Unfortunately test_begin_subtest hides the
relevant errors.
Felipe Contreras [Mon, 30 Sep 2013 16:04:21 +0000 (11:04 -0500)]
query: bind queries to database objects
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>
Ben Gamari [Thu, 31 Oct 2013 04:10:08 +0000 (00:10 -0400)]
test: Add compact test
Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
Jani Nikula [Mon, 28 Oct 2013 14:09:19 +0000 (15:09 +0100)]
lib: fix build on !HAVE_XAPIAN_COMPACT
Minimal change to build notmuch against xapian that doesn't have
compaction support.
Mark Walters [Sat, 26 Oct 2013 22:02:08 +0000 (23:02 +0100)]
pick: rename test emacs-pick to emacs-tree
Also fixup run-tests.sh
Mark Walters [Sat, 26 Oct 2013 22:02:07 +0000 (23:02 +0100)]
pick: rename test outputs from pick to tree
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.
Mark Walters [Sat, 26 Oct 2013 22:02:06 +0000 (23:02 +0100)]
pick: Change the test names and print out for pick tests
Change from the pick name to the tree name
Mark Walters [Sat, 26 Oct 2013 22:02:05 +0000 (23:02 +0100)]
contrib: pick: move lisp names from pick to tree
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.
Austin Clements [Thu, 24 Oct 2013 21:38:59 +0000 (17:38 -0400)]
new: Don't scan unchanged directories with no sub-directories
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.
Austin Clements [Thu, 24 Oct 2013 21:30:27 +0000 (17:30 -0400)]
emacs: Add a space after completed tag operations
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.
Austin Clements [Fri, 11 Oct 2013 13:53:39 +0000 (09:53 -0400)]
emacs: Sanitize authors and subjects in search and show
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.
Austin Clements [Wed, 23 Oct 2013 00:22:01 +0000 (20:22 -0400)]
emacs: Remove interactive behavior of `notmuch-tag'
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.
Austin Clements [Wed, 23 Oct 2013 00:22:00 +0000 (20:22 -0400)]
pick: Use interactive specifications for tag changes
Austin Clements [Wed, 23 Oct 2013 00:21:59 +0000 (20:21 -0400)]
pick: Use list form of tag-changes in test
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.
Austin Clements [Wed, 23 Oct 2013 00:21:58 +0000 (20:21 -0400)]
pick: Fix incorrect use of `notmuch-pick-tag'
`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.
Austin Clements [Wed, 23 Oct 2013 00:21:57 +0000 (20:21 -0400)]
emacs: Use interactive specifications for tag changes in search
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.
Austin Clements [Wed, 23 Oct 2013 00:21:56 +0000 (20:21 -0400)]
emacs: Use interactive specifications for tag changes in show
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.
Austin Clements [Wed, 23 Oct 2013 00:21:55 +0000 (20:21 -0400)]
emacs: Take prompt and current tags in `notmuch-read-tag-changes'
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'.
Austin Clements [Wed, 23 Oct 2013 00:21:54 +0000 (20:21 -0400)]
emacs: Fix misuse of `notmuch-tag'
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.
Austin Clements [Tue, 22 Oct 2013 00:55:38 +0000 (20:55 -0400)]
perf: Clean corpus and caches in distclean, not clean
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.
Moritz Wilhelmy [Tue, 15 Oct 2013 07:30:45 +0000 (09:30 +0200)]
Place extra_cflags before CONFIGURE_CFLAGS
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)
Mark Walters [Sun, 13 Oct 2013 07:39:12 +0000 (08:39 +0100)]
emacs: show: use interactive instead of current-prefix-arg
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.
Mark Walters [Sun, 13 Oct 2013 07:49:00 +0000 (08:49 +0100)]
contrib: pick: update notmuch-show calls
Remove some unneeded nil arguments in notmuch-show calls.
Mark Walters [Sat, 12 Oct 2013 07:36:30 +0000 (08:36 +0100)]
test: set mail host in emacs_deliver
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.
Gregor Zattler [Wed, 4 Sep 2013 17:06:55 +0000 (19:06 +0200)]
emacs: distinguish tag `flagged' on terminal
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.
Austin Clements [Mon, 7 Oct 2013 22:48:51 +0000 (18:48 -0400)]
emacs: Improved `notmuch-describe-keymap' documentation
Ben Gamari [Wed, 2 Oct 2013 20:30:48 +0000 (16:30 -0400)]
notmuch-compact: Add man page
Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
Ben Gamari [Wed, 2 Oct 2013 20:30:47 +0000 (16:30 -0400)]
notmuch-compact: Initial commit of CLI
Introduce the user command exposing the new compaction facility.
Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
Ben Gamari [Wed, 2 Oct 2013 20:30:46 +0000 (16:30 -0400)]
database: Add notmuch_database_compact_close
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>
Austin Clements [Sun, 6 Oct 2013 03:22:48 +0000 (23:22 -0400)]
News for Emacs help improvements
Austin Clements [Sun, 6 Oct 2013 03:22:47 +0000 (23:22 -0400)]
emacs: Improve interactive use documentation
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).
Austin Clements [Sun, 6 Oct 2013 03:22:46 +0000 (23:22 -0400)]
emacs: Support overriding help and describing prefix action
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.
Austin Clements [Sun, 6 Oct 2013 03:22:45 +0000 (23:22 -0400)]
emacs: Clean up a few documentation strings
Correct some grammatical errors, fix some violations of standard
documentation string formatting conventions, and be more precise.
Austin Clements [Sun, 6 Oct 2013 03:22:44 +0000 (23:22 -0400)]
emacs: `notmuch-mua-new-reply' is also not interactive
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.
Austin Clements [Sun, 6 Oct 2013 03:22:43 +0000 (23:22 -0400)]
emacs: `notmuch-mua-new-forward-message' is not interactive
`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.
Mark Walters [Mon, 23 Sep 2013 19:52:59 +0000 (20:52 +0100)]
contrib: pick: remove temporary keybinding
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.
Mark Walters [Mon, 23 Sep 2013 19:52:58 +0000 (20:52 +0100)]
contrib: pick: move M-RET to prefix-arg RET
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.
Mark Walters [Sun, 15 Sep 2013 08:41:17 +0000 (09:41 +0100)]
contrib: pick: tidy up pick-format-field
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.
Mark Walters [Sun, 15 Sep 2013 14:35:06 +0000 (15:35 +0100)]
contrib: pick: remove unused notmuch-pick-from-hello
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).
Mark Walters [Sun, 15 Sep 2013 14:35:05 +0000 (15:35 +0100)]
contrib: pick: use the new notmuch-common-keymap for pick entry
Austin recently added a global keymap: use this for pick
entry.
Mark Walters [Sun, 15 Sep 2013 14:35:04 +0000 (15:35 +0100)]
contrib: pick: remove some superfluous quotes
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.
Mark Walters [Mon, 2 Sep 2013 03:28:08 +0000 (04:28 +0100)]
contrib: pick: make the tree graphics a proper part of the format
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.)
Mark Walters [Mon, 2 Sep 2013 03:28:07 +0000 (04:28 +0100)]
contrib: pick: allow recursive message field formats
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.
Mark Walters [Mon, 2 Sep 2013 03:28:06 +0000 (04:28 +0100)]
contrib: pick: move the insertion of fields up a level
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.
Mark Walters [Mon, 2 Sep 2013 03:28:05 +0000 (04:28 +0100)]
contrib: pick: print () for a message with no tags
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.
Mark Walters [Sun, 15 Sep 2013 08:17:48 +0000 (09:17 +0100)]
contrib: pick: use global keymap
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.
Mark Walters [Sun, 15 Sep 2013 08:19:33 +0000 (09:19 +0100)]
contrib: pick: bugfix use of mini-buffer history
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.
Mark Walters [Sat, 14 Sep 2013 20:17:07 +0000 (21:17 +0100)]
emacs: bugfix unquoted symbol
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.
Jani Nikula [Wed, 11 Sep 2013 17:36:43 +0000 (20:36 +0300)]
lib/cli: pass GMIME_ENABLE_RFC2047_WORKAROUNDS to g_mime_init()
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
Jani Nikula [Wed, 11 Sep 2013 17:36:42 +0000 (20:36 +0300)]
test: add known broken tests for known broken RFC 2047 encodings
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.
Austin Clements [Tue, 3 Sep 2013 21:45:25 +0000 (17:45 -0400)]
emacs: Move ?, q, s, m, =, and G to the common keymap
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).
Austin Clements [Tue, 3 Sep 2013 21:45:24 +0000 (17:45 -0400)]
emacs: Define a common shared keymap for all of notmuch
This defines a single, currently empty keymap that all other notmuch
mode maps inherit from.