Austin Clements [Wed, 7 Nov 2012 15:27:01 +0000 (10:27 -0500)]
show: More aggressively document the presence of devel/schemata
Previously, the only mention of devel/schemata was a comment at the
top of format_part_json, but the JSON output code is spread across
several functions that are distributed across notmuch-show.c. Add
references from the other three key JSON output functions.
Austin Clements [Wed, 7 Nov 2012 15:27:00 +0000 (10:27 -0500)]
devel: Add Reply-to to the schemata
The code got out of sync with the documentation in
7d3c06dc.
Tomi Ollila [Sun, 21 Oct 2012 13:35:09 +0000 (16:35 +0300)]
emacs/notmuch-show.el: handle bodypart insert error
When inserting of email bodypart failes, insert a failure message
to the buffer (and continue) instead of halting the insertion of
the rest of that email thread in question.
Peter Wang [Tue, 30 Oct 2012 10:12:47 +0000 (21:12 +1100)]
test: add test for showing Reply-To headers
Test that show --format=json now outputs Reply-To header fields when
present.
Peter Wang [Tue, 30 Oct 2012 10:12:46 +0000 (21:12 +1100)]
show: include Reply-To header in json output
Output the Reply-To header field if present in a message.
I want to be able to see what the sender intended in my mail client,
before hitting the reply key. Only json output is changed,
like the recently added Bcc field.
Tomi Ollila [Fri, 2 Nov 2012 14:07:06 +0000 (16:07 +0200)]
uncrustify.cfg: added 3 new types for uncrustify to know
Added FILE, notmuch_show_params_t and sprinter_t to be
types when uncrustifying sources. This affect spacing
when uncrustify is deciding for type declaration instead
of binary multiplication operation.
Jani Nikula [Tue, 30 Oct 2012 20:32:38 +0000 (22:32 +0200)]
test: add tests for date:since..until range queries
A brief initial test set.
Jani Nikula [Tue, 30 Oct 2012 20:32:40 +0000 (22:32 +0200)]
NEWS: date range search support
Jani Nikula [Tue, 30 Oct 2012 20:32:39 +0000 (22:32 +0200)]
man: document the date:since..until range queries
Jani Nikula [Tue, 30 Oct 2012 20:32:37 +0000 (22:32 +0200)]
lib: add date range query support
Add a custom value range processor to enable date and time searches of
the form date:since..until, where "since" and "until" are expressions
understood by the previously added date/time parser, to restrict the
results to messages within a particular time range (based on the Date:
header).
If "since" or "until" describes date/time at an accuracy of days or
less, the values are rounded according to the accuracy, towards past
for "since" and towards future for "until". For example,
date:november..yesterday would match from the beginning of November
until the end of yesterday. Expressions such as date:today..today
means since the beginning of today until the end of today.
Open-ended ranges are supported (since Xapian 1.2.1), i.e. you can
specify date:..until or date:since.. to not limit the start or end
date, respectively.
CAVEATS:
Xapian does not support spaces in range expressions. You can replace
the spaces with '_', or (in most cases) '-', or (in some cases) leave
the spaces out altogether.
Entering date:expr without ".." (for example date:yesterday) will not
work as you might expect. You can achieve the expected result by
duplicating the expr both sides of ".." (for example
date:yesterday..yesterday).
Open-ended ranges won't work with pre-1.2.1 Xapian, but they don't
produce an error either.
Signed-off-by: Jani Nikula <jani@nikula.org>
Jani Nikula [Tue, 30 Oct 2012 20:32:36 +0000 (22:32 +0200)]
build: build parse-time-string as part of the notmuch lib and static cli
Jani Nikula [Tue, 30 Oct 2012 20:32:35 +0000 (22:32 +0200)]
test: add smoke tests for the date/time parser module
Test the date/time parser module directly, independent of notmuch,
using the parse-time test tool.
Credits to Michal Sojka <sojkam1@fel.cvut.cz> for writing most of the
tests.
Jani Nikula [Tue, 30 Oct 2012 20:32:34 +0000 (22:32 +0200)]
test: add new test tool parse-time for date/time parser
Add a smoke testing tool to support testing the date/time parser
module directly and independent of the rest of notmuch.
Credits to Michal Sojka <sojkam1@fel.cvut.cz> for the stdin parsing
idea and consequent massive improvement in testability.
Jani Nikula [Tue, 30 Oct 2012 20:32:33 +0000 (22:32 +0200)]
parse-time-string: add a date/time parser to notmuch
Add a date/time parser to notmuch, to be used for adding date range
query support for notmuch lib later on. Add the parser to a directory
of its own to make it independent of the rest of the notmuch code
base.
Signed-off-by: Jani Nikula <jani@nikula.org>
Jani Nikula [Tue, 30 Oct 2012 20:32:32 +0000 (22:32 +0200)]
build: drop the -Wswitch-enum warning
-Wswitch-enum is a bit awkward if a switch statement is intended to
handle just some of the named codes of an enumeration especially, and
leave the rest to the default label.
We already have -Wall, which enables -Wswitch by default, and per GCC
documentation, "The only difference between -Wswitch and this option
[-Wswitch-enum] is that this option gives a warning about an omitted
enumeration code even if there is a default label."
Drop -Wswitch-enum to not force listing all named codes of
enumerations in switch statements that have a default label.
Mark Walters [Sat, 27 Oct 2012 09:34:12 +0000 (10:34 +0100)]
emacs: Move the incremental JSON parser to notmuch-lib.el
This just moves the newly split out incremental json parser (together
with its state variables) to lib.
There should be no functional change.
Mark Walters [Sat, 27 Oct 2012 09:34:11 +0000 (10:34 +0100)]
emacs: Rename incremental JSON internal variables
This patch just renames the internal variables for the JSON parser now
it is no longer specific to search mode. It also fixes up the white
space after the previous patch. There should be no functional changes.
Mark Walters [Sat, 27 Oct 2012 09:34:10 +0000 (10:34 +0100)]
emacs: Split out the incremental json parser into its own function
This patch splits out the incremental json parser into its own
function.
It moves the main logic of the parser to happen inside the parse
buffer rather than inside the results buffer, but makes sure all
results and all errors are displayed in the results buffer.
It also changes the local parser variables from being buffer
local to the results buffer to being buffer local to the parse buffer,
and sets them up automatically so the caller does not need to.
Finally to keep the diff small this patch does not fix the whitespace,
nor complete the code movement (these are done in subsequent patches)
but it should contain all the functional changes.
Mark Walters [Sat, 27 Oct 2012 11:26:40 +0000 (12:26 +0100)]
contrib: add pick TODO file
Mark Walters [Sat, 27 Oct 2012 13:38:26 +0000 (14:38 +0100)]
contrib: add pick README.
Mark Walters [Sat, 27 Oct 2012 11:26:38 +0000 (12:26 +0100)]
contrib: add notmuch-pick.el file itself
This adds the main notmuch-pick.el file.
Austin Clements [Wed, 24 Oct 2012 21:43:28 +0000 (17:43 -0400)]
Support OpenBSD
OpenBSD's build flags are identical to FreeBSD, except that libraries
need to be explicitly linked against libc. No code changes are
necessary.
From: Cody Cutler <ccutler@csail.mit.edu>
Austin Clements [Fri, 26 Oct 2012 20:18:12 +0000 (16:18 -0400)]
emacs: Escape tag queries suggested by tab completion
Austin Clements [Fri, 26 Oct 2012 20:18:11 +0000 (16:18 -0400)]
emacs: Escape tag queries performed by hello
Austin Clements [Fri, 26 Oct 2012 20:18:10 +0000 (16:18 -0400)]
emacs: Introduce generic boolean term escaping function
Currently, we only properly escape stashed id queries, but there are
other places where the Emacs UI constructs queries for boolean terms.
Since this escaping function is meant to be used in other places, it
avoids escaping strings that don't need escaping.
Austin Clements [Fri, 26 Oct 2012 20:54:13 +0000 (16:54 -0400)]
News for restrictions on tag names
Austin Clements [Fri, 26 Oct 2012 20:54:12 +0000 (16:54 -0400)]
tag: Disallow adding malformed tags to messages
This disallows adding empty tags, since nothing but confusion follows
in their wake, and disallows adding tags that begin with "-" because
they are also confusing, the tag "-" is impossible to remove using the
CLI, and because the syntax for removing such tags conflicts with long
argument syntax.
This does not place any restrictions on what tags can be removed, as
that would make it difficult for people who have the misfortune of
already having malformed tags to remove these tags.
Tomi Ollila [Wed, 24 Oct 2012 06:59:59 +0000 (09:59 +0300)]
contrib/nmbug/nmbug-status: combine thread messages
Newer patch email containing In-Reply-To: to an email sent some time ago
(i.e. to a "thread") was not visible in that "thread" in patch view when
another patch "thread" was submitted in between. This change collects
all messages in every (notmuch-created) thread together before printing
all these threads out in a patch view.
Thanks to Ethan Glasser-Camp for initial review and suggestions with
code examples.
Tomi Ollila [Wed, 24 Oct 2012 06:59:58 +0000 (09:59 +0300)]
contrib/nmbug/nmbug-status: added table of views
In latest configuration quite a few long views were added to the
Notmuch Patches page. To ease navigating to the views a 'Views'
section was added to the beginning of page containing hyperlink
to every view.
Michal Nazarewicz [Mon, 10 Sep 2012 06:35:30 +0000 (08:35 +0200)]
notmuch-show: include Bcc header in json output
With this change, emacs users can use notmuch-message-headers
variable to configure notmuch-show display Bcc header.
Ethan Glasser-Camp [Sun, 21 Oct 2012 13:14:58 +0000 (09:14 -0400)]
test: new: Fix intermittent test failures with --debug
Although messages are created in a particular order, it seems that
when they are created on a tmpfs, they do not always come back in the
same order, leading to the same files being ignored but being output
in a different order. This causes the test to fail because the outputs
being compared are the same.
Fix the failures by sorting the output of notmuch --debug and
comparing this to a hand-sorted version of its output.
Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
Tomi Ollila [Tue, 18 Sep 2012 14:23:02 +0000 (17:23 +0300)]
test/test-lib.sh: take the --background feature in smtp-dummy into use
The use of --background option (instead of shell '&') ensures that
smtp-dummy is listening its server socket until execution of shell
script can continue, thus the client will always have socket where
to connect.
smtp-dummy outputs smtp_dummy_pid variable in shell assignment format;
eval'ing that output makes that variable available for the shell.
As the smtp-dummy instance is no longer child process of the script
the SIGKILL signal sent to it will ensure it is going away in case
the mail sender fails to connect to smtp-dummy.
Tomi Ollila [Tue, 18 Sep 2012 14:23:01 +0000 (17:23 +0300)]
test/smtp-dummy: add --background option and functionality
When shell executes background process using '&' the scheduling of
that new process is arbitrary. It could be that smtp-dummy doesn't
get execution time to listen() it's server socket until some other
process attempts to connect() to it. The --background option in
smtp-dummy makes it to go background *after* it started to listen
its server socket.
When --background option is used, the line "smtp_dummy_pid='<pid>'"
is printed to stdout from where shell can eval it.
Pieter Praet [Fri, 12 Oct 2012 19:32:38 +0000 (15:32 -0400)]
test: another test wrt ignoring user-specified files and directories
Demonstrates that *every* file/directory which matches one of the values
in 'new.ignore' will be ignored, independent of its depth/location in
the mail store.
Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
Pieter Praet [Sun, 19 Feb 2012 20:47:55 +0000 (21:47 +0100)]
test-lib.sh: pass 'NOTMUCH_NEW's args down to 'notmuch new'
Obviates the need to create a 'NOTMUCH_NEW' clone which runs
'notmuch new --debug'. This will be used in a later patch.
Doesn't cause any issues for other tests.
Pieter Praet [Sun, 19 Feb 2012 20:47:54 +0000 (21:47 +0100)]
cli: notmuch new: optionally output debug information when ignoring files/directories
When running 'notmuch new' with the '--debug' option, output debug
information regarding explicitly ignored files and directories.
Pieter Praet [Sun, 19 Feb 2012 20:47:53 +0000 (21:47 +0100)]
cli: add '--debug' option to 'notmuch new'
This will be used in later patches to test the 'new.ignore'
config option more thoroughly.
Pieter Praet [Wed, 22 Feb 2012 18:43:30 +0000 (19:43 +0100)]
emacs: rename `notmuch-show-toggle-headers' to `notmuch-show-toggle-visibility-headers'
* emacs/notmuch-show.el
(notmuch-show-toggle-headers):
Rename to `notmuch-show-toggle-visibility-headers'.
(notmuch-show-mode-map):
Update "h" binding wrt renamed `notmuch-show-toggle-headers'.
(notmuch-message-headers):
Update docstring wrt renamed `notmuch-show-toggle-headers'.
(notmuch-message-headers-visible):
Update docstring wrt renamed `notmuch-show-toggle-headers'.
Also fixed a small typo.
* test/emacs:
Update subtest wrt renamed `notmuch-show-toggle-headers':
- "notmuch-show: hide message headers (w/ notmuch-show-toggle-headers)"
Pieter Praet [Wed, 22 Feb 2012 18:43:29 +0000 (19:43 +0100)]
test: emacs: new tests "notmuch-show: {, un}collapse all messages in thread"
* test/emacs:
- New subtest "notmuch-show: collapse all messages in thread":
`notmuch-show-open-or-close-all' with prefix arg ("C-u M-RET")
collapses all messages in thread.
- New subtest "notmuch-show: uncollapse all messages in thread":
`notmuch-show-open-or-close-all' without prefix arg ("M-RET")
uncollapses all messages in thread.
Pieter Praet [Wed, 22 Feb 2012 18:43:28 +0000 (19:43 +0100)]
test: emacs: new tests "notmuch-show: {show, hide} message headers"
* test/emacs:
- New subtest "notmuch-show: show message headers":
Setting `notmuch-message-headers-visible' to t causes all headers
defined in `notmuch-message-headers' to be shown.
- New subtest "notmuch-show: hide message headers":
Setting `notmuch-message-headers-visible' to nil causes all headers
defined in `notmuch-message-headers' to be hidden.
("Subject:" may be an exception; See the use of `headers-start' in
`notmuch-show-insert-msg')
- New subtest "notmuch-show: hide message headers (w/ notmuch-show-toggle-headers)":
Setting `notmuch-message-headers-visible' to t causes all headers
defined in `notmuch-message-headers' to be shown, but they can be
hidden for the current message by running `notmuch-show-toggle-headers'.
Ethan Glasser-Camp [Thu, 18 Oct 2012 02:16:52 +0000 (22:16 -0400)]
test: Move tests from emacs to emacs-show
This requires changing the contents of the crypto tests, as one thread
that was marked read by the earlier tests in test/emacs is no longer
marked read.
This moves tests for:
-
09d19ac "test: emacs: toggle eliding of non-matching messages in
`notmuch-show'", which should have actually read: "test: emacs:
toggle processing of cryptographic MIME parts in `notmuch-show'".
See commit
19ec74c5.
-
5ea1dbe "test: emacs: toggle eliding of non-matching messages in
`notmuch-show'"
-
345faab "test: emacs: toggle thread content indentation in
`notmuch-show'"
Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
Ethan Glasser-Camp [Fri, 12 Oct 2012 20:43:28 +0000 (16:43 -0400)]
test: handle filenames that have directories in them
Since $TEST_DIRECTORY is an absolute path, any filenames generated
with it will be complete paths. Only use the basename to generate
suffixes for filenames.
Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
Pieter Praet [Sun, 19 Feb 2012 20:56:30 +0000 (21:56 +0100)]
test: emacs: toggle thread content indentation in `notmuch-show'
See commit
c205e8ff.
Pieter Praet [Sun, 19 Feb 2012 20:56:29 +0000 (21:56 +0100)]
test: emacs: toggle eliding of non-matching messages in `notmuch-show'
See commits
44a544ed,
866ce8b1,
668b66ec.
Pieter Praet [Wed, 17 Oct 2012 23:59:59 +0000 (19:59 -0400)]
test: emacs: toggle eliding of non-matching messages in `notmuch-show'
See commits
44a544ed,
866ce8b1,
668b66ec.
Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
Austin Clements [Sat, 29 Sep 2012 18:03:43 +0000 (14:03 -0400)]
emacs: Work around gnus-inhibit-images bug in mm-shr
Emacs 24's mm-shr HTML email renderer fails to load gnus-art before
referencing gnus-inhibit-images, resulting in a void-variable error
when notmuch attempts to render an HTML email with inline images.
This works around this bug by advising mm-shr to load gnus-art.
mm-shr is the only function outside of gnus-art itself that references
gnus-inhibit-images, so this workaround should be correct. If this
ever changes, hopefully they will have fixed this bug upstream first.
This fixes the "Rendering HTML mail with images" test for Emacs 24.
Austin Clements [Sat, 29 Sep 2012 17:55:13 +0000 (13:55 -0400)]
test: Add a test for HTML email with inline images
Currently this test passes in Emacs 23 but fails in Emacs 24 (at least
on some Linux distributions).
Austin Clements [Sat, 29 Sep 2012 17:55:12 +0000 (13:55 -0400)]
test: Clear test-output output file before running Emacs tests
Most Emacs tests end with a call to (test-output), which saves the
buffer to a filed called OUTPUT. Previously, if the test code failed
with an exception before this call, the test framework would then
compare against the OUTPUT file from the last Emacs test, resulting in
confusing diffs.
This requires one tweak to an emacs test that made two calls to
test_emacs and expected an OUTPUT file from the first call. We simply
reverse the order of the test_emacs calls.
Jani Nikula [Sun, 30 Sep 2012 07:36:12 +0000 (10:36 +0300)]
emacs: simplify point placement in notmuch-hello refresh
notmuch-hello (called also through notmuch-hello-update, bound to '='
by default) tries to find the widget under or following point before
refresh, and put the point back to the widget afterwards. The code has
grown quite complicated, and has at least the following issues:
1) All the individual section functions have to include code to
support point placement. If there is no such support, point is
dropped to the search box. Only saved searches and all tags
sections support point placement.
2) Point placement is based on widget-value. If there are two widgets
with the same widget-value (for example a saved search with the
same name as a tag) the point is moved to the earlier one, even if
point was on the later one.
3) When first entering notmuch-hello notmuch-hello-target is nil, and
point is dropped to the search box.
Moving the point to the search box is annoying because the user is
required to move the point before being able to enter key bindings.
Simplify the code by removing all point placement based on widgets, as
it does not work properly, and trying to fix that would unnecessarily
complicate the code.
Save current line and column before refresh, and restore them
afterwards. Sometimes, if notmuch-show-empty-saved-searches is nil,
and the refresh adds or removes saved searches from the list, this has
the appearance of moving the point relative to the nearest
widgets. This is a much smaller and less frequent problem than the
ones listed above.
Justus Winter [Mon, 24 Sep 2012 15:21:20 +0000 (17:21 +0200)]
Avoid potentially dereferencing a NULL pointer
GMIME_IS_MULTIPART and GMIME_IS_MESSAGE both handle NULL pointers
gracefully, but the G_OBJECT_TYPE used in the error handling block
dereferences it without checking it first.
Fix this by checking whether parent->part is valid.
Found using the clang static analyzer.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Justus Winter [Mon, 24 Sep 2012 15:21:19 +0000 (17:21 +0200)]
Annotate internal_error with the attribute noreturn
Annotating functions that do not return with the noreturn attribute
(which is understood by both gcc and clang) prevents static analyzers
from generating false positives (internal_error is used to terminate
the process and is used extensively in error handling code paths).
Remove the return statement that was placed there to appease the
compiler. Functions annotated with noreturn are not supposed to return
any values.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Justus Winter [Mon, 24 Sep 2012 15:21:18 +0000 (17:21 +0200)]
Fix the COERCE_STATUS macro
Fix the COERCE_STATUS macro to handle _internal_error being declared
as void function.
Note that the function _internal_error does not return. Evaluating to
NOTMUCH_STATUS_SUCCESS is done purely to appease the compiler.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Justus Winter [Mon, 24 Sep 2012 15:21:17 +0000 (17:21 +0200)]
Extend compat/README
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Justus Winter [Mon, 24 Sep 2012 15:21:16 +0000 (17:21 +0200)]
Provide a NORETURN_ATTRIBUTE macro similar to PRINTF_ATTRIBUTE
This attribute is understood by gcc since version 2.5. clang provides
support for testing for function attributes using __has_attribute. For
other compilers this macro evaluates to the empty string.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Justus Winter [Mon, 24 Sep 2012 15:21:15 +0000 (17:21 +0200)]
Provide a __has_attribute compatibility macro
__has_attribute is defined by clang and tests whether a given function
attribute is supported by clang.
Add a compatibility macro for other compilers.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Damien Cassou [Mon, 17 Sep 2012 16:43:28 +0000 (18:43 +0200)]
Run `notmuch-show-hook' after setting `header-line-format'
This patch makes it possible for notmuch-show hooks to change the
header line.
Signed-off-by: Damien Cassou <damien.cassou@gmail.com>
Jani Nikula [Thu, 6 Sep 2012 15:32:42 +0000 (18:32 +0300)]
emacs: add support for reversing notmuch-show-mark-read tag changes
Since marking a message as read can now be a user customized set of
tag changes, make reversing this easier. Allow a prefix argument to
notmuch-show-mark-read to reverse the marking as read, similar to the
unarchiving in notmuch-show-archive-message.
While at it, update the relevant documentation to match that of other
automatic tagging (i.e. archive and reply).
Jani Nikula [Thu, 6 Sep 2012 15:32:41 +0000 (18:32 +0300)]
emacs: add support for reversing notmuch-search-archive-thread tag changes
Since archiving a thread can now be a user customized set of tag
changes, make reversing this easier. Allow a prefix argument to
notmuch-search-archive-thread to reverse the archiving, similar to the
unarchiving in notmuch-show-archive-message.
Jani Nikula [Thu, 6 Sep 2012 15:32:40 +0000 (18:32 +0300)]
emacs: add support for custom tag changes on message/thread archive
Add support for customization of the tag changes that are applied when
a message or a thread is archived. Instead of hard-coded removal of
the "inbox" tag, the user can now specify a list of tag changes to
perform.
Jani Nikula [Thu, 6 Sep 2012 15:32:39 +0000 (18:32 +0300)]
emacs: use new tag change helper to mark messages as replied
Clarify documentation while at it.
Jani Nikula [Thu, 6 Sep 2012 15:32:38 +0000 (18:32 +0300)]
emacs: fix notmuch-message-replied-tags defcustom type
Jani Nikula [Thu, 6 Sep 2012 15:32:37 +0000 (18:32 +0300)]
emacs: add helper for tag change list manipulation
Add a helper to create (and optionally reverse) a list of tag changes.
Tomi Ollila [Tue, 4 Sep 2012 14:49:13 +0000 (17:49 +0300)]
{., man}/Makefile.local: edit/remove release-checks.sh related targets
Use new target release-checks in place of verify-version-debian,
verify-version-python verify-version-manpage. This target executes
devel/release-checks.sh which does all the verifications the three
dropped targets did, and some more.
Tomi Ollila [Tue, 4 Sep 2012 14:49:12 +0000 (17:49 +0300)]
devel: add release-checks.sh
Currently Makefile.local contains some machine executable release
checking functionality. This is unnecessarily complex way to do it:
Multiline script functionality is hard to embed -- from Makefile point
of view there is just one line split using backslashes and every line
ends with ';'. It is hard to maintain such "script" when it gets longer.
The embedded script does not fail as robust as separate script; set -eu
could be added to get same level of robustness -- but the provided
Bourne Again Shell (bash) script exceeds this with 'set -o pipefail',
making the script to fail when any of the commands in pipeline fails
(and not just the last one).
Checking for release is done very seldom compared to all other use;
The whole Makefile.local gets simpler and easier to grasp when most
release checking targets are removed.
When release checking is done, the steps are executed sequentially;
nothing is allowed to be skipped due to some satisfied dependency.
Mike Kelly [Wed, 30 May 2012 07:02:03 +0000 (03:02 -0400)]
test/atomicity: use a more portable 'cp' form
-a already implies -r/-R, so no need for both.
FreeBSD's cp complains:
cp: the -R and -r options may not be specified together
Mike Kelly [Wed, 30 May 2012 07:02:01 +0000 (03:02 -0400)]
test/basic: use portable args for find
`-executable` isn't available in FreeBSD's version of find, so use a
more portable version, `-perm +111`.
Mike Kelly [Wed, 30 May 2012 07:02:00 +0000 (03:02 -0400)]
tests: Test against source man pages.
Without this, help-test tests against the installed man pages, rather
than the default ones.
Mike Kelly [Wed, 30 May 2012 07:01:59 +0000 (03:01 -0400)]
test/smtp-dummy.c: fix compilation on FreeBSD
Use the more portable netint/in.h, instead of netint/ip.h, to include
htons(3), etc.
Mike Kelly [Wed, 30 May 2012 07:01:57 +0000 (03:01 -0400)]
test/Makefile.local: Use $(XAPIAN_LDFLAGS) for symbol-test
On FreeBSD, and probably anywhere else someone installed xapian to
some other prefix, we need to use XAPIAN_LDFLAGS to make the linker can
actually find libxapian.
Mike Kelly [Wed, 30 May 2012 07:01:56 +0000 (03:01 -0400)]
configure: Add support for FreeBSD.
This makes FreeBSD a recognized platform. Follow up patches make it
work properly.
Dmitry Kurochkin [Wed, 1 Feb 2012 07:19:54 +0000 (11:19 +0400)]
test: make test_expect_equal_file() arguments flexible
Before the change, test_expect_equal_file() function treated the first
argument as "actual output file" and the second argument as "expected
output file". When the test fails, the files are copied for later
inspection. The first files was copied to "$testname.output" and the
second file to "$testname.expected". The argument order for
test_expect_equal_file() is often wrong which results in confusing
diff output and incorrectly named files.
The patch solves the issue by changing test_expect_equal_file() to
treat arguments just as two files, without any special properties
(like "actual" and "expected"). The file names for copying is now
based on the given file name: "$testname.$file1" and
"$testname.$file2". E.g. if test_expect_equal_file() is called with
"OUTPUT" and "EXPECTED", the copied files can be named
"emacs.1.OUTPUT" and "emacs.1.EXPECTED".
The down side of this approach is that diff argument order depends on
test_expect_equal_file() argument order. So sometimes we get diff
from expected to actual results, and sometimes the other way around.
But the files are always named correctly.
Pieter Praet [Wed, 22 Feb 2012 20:09:14 +0000 (21:09 +0100)]
emacs: correct `notmuch-search-mode's docstring wrt `notmuch-search-tag-all'
* emacs/notmuch.el (notmuch-search-mode):
`notmuch-search-tag-all' currently uses the current query string
instead of `notmuch-search-find-thread-id-region-search', which
might cause a race condition.
Mark Walters [Tue, 5 Jun 2012 14:36:36 +0000 (15:36 +0100)]
cli: make the command line parser's errors more informative.
Previously, the cli parser was a little erratic in what errors it
reported and would fail silently in many cases (for example, when no
argument was passed to an integer option). This was particularly
annoying as the user could not (easily) tell whether the command
failed or just there were no search results.
This patch tries to make the handling consistent and return a helpful
error message in all cases.
Sascha Silbe [Sun, 24 Jun 2012 16:29:24 +0000 (18:29 +0200)]
lib: fix NULL checks for filenames iterators
The API documentation (notmuch.h) states that the parameter may be NULL,
but the implementation only checked the current element, potentially
dereferencing a NULL pointer in the process.
Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
Mark Walters [Tue, 24 Jul 2012 21:21:48 +0000 (22:21 +0100)]
emacs: make notmuch-show return its buffer
notmuch-pick uses the returned buffer to try and make sure it does not
close the wrong buffer.
Tomi Ollila [Fri, 24 Aug 2012 17:29:21 +0000 (20:29 +0300)]
contrib/nmbug/nmbug-status: if realname empty, use part of mailaddr
When the From: field in patch email does not contain 'realname'
field, the patch listing does not show anything as patch sender.
In this case use the part before '@' in mail address as the sender
identification in patch listing.
David Bremner [Fri, 31 Aug 2012 01:05:51 +0000 (22:05 -0300)]
test: use (format "%S") to print nil in emacs test.
The behaviour of "emacsclient --eval nil" changed from emacs23 to
emacs24, and in emacs24 it prints 'nil' rather than an empty string.
(format "%S" foo) produces a sexpr form of foo, and is consistent
between the two versions.
David Bremner [Thu, 30 Aug 2012 01:09:54 +0000 (22:09 -0300)]
test: canonicalize content-type in "Sending a message via (fake) SMTP"
The version of message.el in emacs24 omits the charset=us-ascii,
causing the current version of this test to fail. With this patch, we
accept either option. According to RFC 2046, they are semantically
equivalent.
Tomi Ollila [Sun, 5 Aug 2012 11:13:02 +0000 (14:13 +0300)]
test: emacs: run list-processes after accept-process-output in emacs 23.1
When running emacs tests using emacs 23.1.1 the tests block (until timeout)
when emacs function (notmuch-test-wait) is called.
There is an emacs bug #2930 titled:
23.0.92; `accept-process-output' and `sleep-for' do not run sentinel
It seems this is present in emacs 23.1.
Calling list-processes after accept-process-output seems work around
this problem; in case Emacs version is 23.1 a defadvice is activated
to do just that.
Tomi Ollila [Sun, 5 Aug 2012 11:13:01 +0000 (14:13 +0300)]
test: emacs: call accept-process-output in notmuch-test-wait
notmuch-test-wait called sleep-for in a loop to wait unconditionally 0.1
seconds while waiting for process to exit.
accept-process-output returns as soon as there is any data available
from process, so using it avoids unnecessary fixed delays.
Both of these functions run process sentinels.
Michal Nazarewicz [Tue, 21 Aug 2012 13:13:36 +0000 (15:13 +0200)]
notmuch-show: add notmuch-show-mark-read-tags option
The `notmuch-show-mark-read-tags' lists tags that are to be applied when
message is read. By default, the only value is "-unread" which will remove
the unread tag. Among other uses, this variable can be used to stop
notmuch-show from modifying tags when message is shown (by setting the
variable to an empty list).
Tomi Ollila [Fri, 24 Aug 2012 08:19:41 +0000 (11:19 +0300)]
NEWS: 2 minor consistency changes in sections 0.13.1 and 0.13.2
0.13.2: `contrib/notmuch-deliver` is in backticks elsewhere in
NEWS file. Commands are generally written in backticks in latest
NEWS entries.
0.13.1: Dropped period at the end of Title
'Fix compilation of ruby bindings',
as all other titles do not end with a period.
David Bremner [Tue, 21 Aug 2012 08:41:39 +0000 (10:41 +0200)]
debian: mention some upstream news in changelog
David Bremner [Tue, 21 Aug 2012 08:39:58 +0000 (10:39 +0200)]
debian: set distribution to experimental
This is to simplify potential bugfix uploads during Debian freeze.
David Bremner [Mon, 20 Aug 2012 12:48:00 +0000 (14:48 +0200)]
version: propagate version changes
These are the result of running "make update-versions"
David Bremner [Mon, 20 Aug 2012 12:46:31 +0000 (14:46 +0200)]
debian: set date for changelog.
Make d/changelog match NEWS
David Bremner [Mon, 20 Aug 2012 12:46:15 +0000 (14:46 +0200)]
NEWS: set date for release.
David Bremner [Mon, 20 Aug 2012 11:53:50 +0000 (13:53 +0200)]
version: bump primary version
The date for man pages is taken from the last commit, so in this case
it makes sense to do this in two commits.
Austin Clements [Mon, 13 Aug 2012 15:27:19 +0000 (11:27 -0400)]
News for new 'previous' behavior
Austin Clements [Sat, 14 Jul 2012 03:47:48 +0000 (23:47 -0400)]
emacs: Make moving to the previous message move to the previous boundary
Previously, notmuch-show-previous-message would move to the beginning
of the message before the message containing point. This patch makes
it instead move to the previous message *boundary*. That is, if point
isn't already at the beginning of the message, it moves to the
beginning of the current message. This is consistent with
notmuch-show-next-message, which can be thought of as moving to the
next message boundary. Several people have expressed a preference for
this.
Austin Clements [Tue, 7 Aug 2012 12:57:10 +0000 (08:57 -0400)]
reply: Convert JSON format to use sprinter
Almost all of reply was already being formatted using the sprinter.
This patch converts the top-level dictionary to use the sprinter
interface.
Austin Clements [Tue, 7 Aug 2012 13:04:27 +0000 (09:04 -0400)]
cli: Remove now-unused json.c
The string buffer quoting functions in json.c have been superseded by
the new sprinter interface and are no longer used. Remove them.
Mark Walters [Tue, 7 Aug 2012 16:32:18 +0000 (17:32 +0100)]
emacs: notmuch search bugfix
The recent change to use json for notmuch-search.el introduced a bug
in the code for keeping position on refresh. The problem is a
comparison between (plist-get result :thread) and a thread-id returned
by notmuch-search-find-thread-id: the latter is prefixed with
"thread:"
We fix this by adding an option to notmuch-search-find-thread-id to
return the bare thread-id. It appears that notmuch-search-refresh-view
is the only caller of notmuch-search that supplies a thread-id so this
change should be safe (but could theoretically break users .emacs
functions).
Mark Walters [Wed, 8 Aug 2012 21:23:33 +0000 (22:23 +0100)]
sprinters: bugfix when NULL passed for a string.
The string function in a sprinter may be called with a NULL string
pointer (eg if a header is absent). This causes a segfault. We fix
this by checking for a null pointer in the string functions and update
the sprinter documentation.
At the moment some output when format=text is done directly rather than
via an sprinter: in that case a null pointer is passed to printf or
similar and a "(null)" appears in the output. That behaviour is not
changed in this patch.
Austin Clements [Wed, 8 Aug 2012 01:28:33 +0000 (21:28 -0400)]
test: Add test for messages with missing headers
Currently the JSON tests for search and show are broken because
notmuch attempts to dereference a NULL pointer.
Austin Clements [Wed, 8 Aug 2012 21:40:10 +0000 (17:40 -0400)]
emacs: Fix "not defined at runtime" warning
Previously, the Emacs byte compiler produced the warning
the function `remove-if-not' might not be defined at runtime.
because we only required cl at compile-time (not runtime). This fixes
this warning by requiring cl at runtime, ensuring that the definition
of remove-if-not is available.
David Bremner [Sun, 5 Aug 2012 15:05:10 +0000 (12:05 -0300)]
NEWS: discuss changes for dump and restore syntax.
The duplication in NEWS.Debian is so that Debian users will be warned
during upgrade.
David Bremner [Sat, 4 Aug 2012 12:55:45 +0000 (09:55 -0300)]
notmuch-restore: replace positional argument for input with option
Since notmuch dump doesn't use positional arguments anymore, it seems
better to be consistent.
David Bremner [Sat, 4 Aug 2012 02:23:11 +0000 (23:23 -0300)]
notmuch-dump: remove deprecated positional argument for output file
The syntax --output=filename is a smaller change than deleting the
output argument completely, and conceivably useful e.g. when running
notmuch under a debugger.
David Bremner [Fri, 3 Aug 2012 00:56:26 +0000 (21:56 -0300)]
debian: alternately depend on emacs24 for notmuch-emacs, build
This should allow users to install notmuch-emacs with only emacs24
installed on their system. For good measure, allow building with
emacs24 as a 4th choice.