Commit graph

4894 commits

Author SHA1 Message Date
Mark Walters
6d6006bea9 emacs: add '?' to some prefix keymaps to describe its bindings
Added function notmuch-subkeymap-help to describe keybindings of a
subkeymap (eg after . or c in notmuch-search and notmuch-show).
2013-12-10 03:52:54 +08:00
Tomi Ollila
88e6a2995a test: implement and document NOTMUCH_TEST_QUIET variable usage
When NOTMUCH_TEST_QUIET environment variable is set to non-null value
messages when new test script starts and when test PASSes are disabled.
This eases picking the cases when tests FAIL (as those are still printed).
2013-12-09 23:29:11 +08:00
Tomi Ollila
f05e7f3ce5 test: print empty line at the beginning of test script, not at end
In preparation for quiet mode print empty line before writing the
test description. This is done now in function designed for it --
it will also be called when test fails.
2013-12-09 23:25:41 +08:00
Tomi Ollila
5985438e05 test: resolve basename "$0" .sh once for all in test-lib.sh
test-lib.sh sometimes did equivalent of `basename "$0" .sh`, sometimes
skipping the basename part and sometimes .sh part. This worked as
we never had path components in $0 (more than ./) nor .sh ending.

Now the equivalent of `basename "$0" .sh` is done once and used
everywhere. In the future we may have .sh suffix in test names
-- removing those is a good idea.
2013-12-09 23:25:28 +08:00
David Bremner
b421f00a05 test: give unique timestamps to messages
The choice of decreasing timestamps is a hack which reduces the number
of existing tests which fail.  This can be changed to increasing
if/when somebody wants update another 47 tests.
2013-12-09 21:20:28 +08:00
David Bremner
72ff135ac3 test: sanitize dates in emacs, raw, and text output
add a new function notmuch_date_sanitize for rfc822-ish things. Add
date sanitization to notmuch_show_sanitize_all and use it more places.

This is all in aid of a transition to unique timestamps on messages.
2013-12-09 21:20:27 +08:00
David Bremner
18921be2e9 test: sanitize Date and timestamp fields in json
Eventually we want test messages to have distinct dates to avoid
reproducability problems. This sanitization will prevent some test
failures when that change is made.

Replace the use of a local function in maildir-sync with
notmuch_json_show_sanitize
2013-12-09 21:20:27 +08:00
David Bremner
20f78709fa test: pass expected output through json_sanitize in 2 places
This makes the tests more robust against changes in the
sanitization rules.
2013-12-09 21:20:15 +08:00
David Bremner
bb390f89a1 version: bump version
Roll (one last?) release candidate because of Austin's
LIBNOTMUCH_VERSION changes.

Atomically bump the manually (NEWS, debian/changelog) and
automatically (everywhere else) updated places version is mentioned.
2013-12-07 17:07:15 +08:00
Austin Clements
3d4b0930bd lib: Bump library version from 3.0.0 to 3.1.0
This version of the library introduces LIBNOTMUCH_CHECK_VERSION and
the *_VERSION macros.  Bumping the version number is also necessary to
make the comment on LIBNOTMUCH_CHECK_VERSION no longer a lie.
2013-12-07 10:31:19 +08:00
Austin Clements
8fb16e277e lib: Replace NOTMUCH_*_VERSION with LIBNOTMUCH_*_VERSION
This makes it clear that these macros refer to the *library* version,
and not to the notmuch application-level release.  Since there are no
consumers of these macros yet, this is now or never.
2013-12-07 10:31:11 +08:00
Austin Clements
4b14ccf0d6 lib: Make VERSION macros agree with soname version
We have two distinct "library version" numbers: the soname version and
the version macros.  We need both for different reasons: the version
macros enable easy compile-time version detection (and conditional
compilation), while the soname version enables runtime version
detection (which includes the version checking done by things like the
Python bindings).

However, currently, these two version numbers are different, which is
unnecessary and can lead to confusion (especially in things like
Debian, which include the soname version in the package name).  This
patch makes them the same by bumping the version macros up to agree
with the soname version.

(We should probably keep the version number in just one place so they
can't get out of sync, but that can be done in another patch.)
2013-12-07 10:31:04 +08:00
Mark Walters
b121a386d7 News updates for Mark's bugfixes 2013-12-01 16:52:12 -04:00
David Bremner
e41ca03f63 debian: reformat changelog to avoid lintian warning. 2013-11-30 11:23:57 -04:00
David Bremner
4dd7c7b517 NEWS: bump date 2013-11-28 21:01:43 -04:00
David Bremner
6c9cd7d20c version: bump to 0.17~rc2 2013-11-28 21:00:52 -04:00
David Bremner
ec09c4903b debian: update changelog for new release candidate 2013-11-28 20:59:32 -04:00
David Bremner
456799d514 test/crypto: disable gpg version printing
This was causing test failures because version strings varied in
length between GNU/Linux and GNU/KFreeBSD. One can also imagine
different versions of gnupg causing the same failure.
2013-11-28 07:02:15 -04:00
David Bremner
118731254b vim: NEWS for vim interface
Transcribed from Felipe's email.
2013-11-28 06:25:19 -04:00
David Bremner
e341abd2d6 debian: remove warning about emacs24 2013-11-27 08:17:46 -04:00
David Bremner
b9f0e6923d util: detect byte order
Unfortunately old versions of GCC and clang do not provide byte order
macros, so we re-invent them.

If UTIL_BYTE_ORDER is not defined or defined to 0, we fall back to
macros supported by recent versions of GCC and clang
2013-11-27 07:43:29 -04:00
David Bremner
7f07bfd6d0 NEWS: News for big endian sha1 bug fix.
We could give more details about how to migrate tags, but I'm not sure
that it's a practical problem, or just a theoretical one.
2013-11-25 08:02:50 -04:00
David Bremner
20adfe39d7 lib: fix byte order test in libsha1.c
Previously PLATFORM_BYTE_ORDER and IS_LITTLE_ENDIAN were not defined,
so the little endian code was always compiled in.

This will have the effect that the "SHA1s" on big endian architectures
will change (i.e. become actual sha1s). So someone re-indexing their
database could conceivable lose tags on messages without a message-id
header.
2013-11-25 07:55:54 -04:00
David Bremner
89bf67fe41 debian: disable gdb as a build-dependency on s390x
Gdb is currently broken on s390x buildd's and porterboxes (see #728705).
By removing it as a build-dep, we disable the (failing) atomicity test on this
architecture
2013-11-24 19:34:45 -04:00
Ben Gamari
05e889523f Add NEWS entry for notmuch-compact
Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
2013-11-24 12:39:25 -04:00
David Bremner
5dba5f4a62 debian: add notmuch_database_compact to symbols file.
This change does not require an SONAME bump because it only adds a symbol.
2013-11-23 20:29:46 -04:00
David Bremner
d976fee655 debian: changelog stanza for release candidate 2013-11-23 20:29:46 -04:00
David Bremner
bd0c56b2bd version: bump to 0.17~rc1
Various other files are synched using "make update-versions".  NEWS
has to be hand edited.
2013-11-23 20:29:46 -04:00
David Bremner
5886886f11 NEWS: remove blank line.
Tomi says I have to.
2013-11-23 20:29:46 -04:00
David Bremner
2560996b7e test: replace $PWD with YYY in emacs & emacs-show tests
When executed command line is written to *Notmuch errors* buffer,
shell-quote-argument will backslash-escape any char that is not in
"POSIX filename characters" (i.e. matching "[^-0-9a-zA-Z_./\n]").

Currently in two emacs tests shell has expanded $PWD as part of
emacs variable, which will later be fed to #'shell-quote-argument
and finally written to ERROR file. If $PWD contained non-POSIX
filename characters, data in ERROR file will not match $PWD when
later comparing in shell. Therefore, in these two particular cases
the escaped $PWD is replaced with YYY in ERROR file and expected
content is adjusted accordingly.
2013-11-23 20:25:29 -04:00
Mark Walters
9c25d4bbf0 emacs: show: stop stderr appearing in buffer
In emacs 24.3+ the stdout/stderr from externally displaying an
attachment gets inserted into the show buffer. This is caused by
changes in mm-display-external in mm-decode.el.

Ideally, we would put this output in the notmuch errors buffer but the
handler is called asynchronously so we don't know when the output will
appear. Thus if we put it straight into the errors buffer it could get
interleaved with other errors. Also we can't easily tell when we
have got all the error output so can't wait until the process is complete.

One solution would be to create a new buffer for the stderr of each
attachment viewed. Again, since we can't tell when the process has
finished, we can't close these buffers automatically so this will
leave lots of buffers around.

Thus we add a debug variable notmuch-show-attachment-debug: it this is
non-nil we create a new buffer for each viewer; if this variable is
nil we just use a temp buffer which means all error output is
discarded (this is the same behaviour as with emacs pre 24.3).
2013-11-20 18:14:35 -04:00
Felipe Contreras
42ff2d3a0d vim: add help file
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:30 -06:00
Felipe Contreras
3d15ed9290 vim: check compose is done on delete
Not on unload, which happens when we switch buffers.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:30 -06:00
Felipe Contreras
062a73b931 vim: remove unnecessary buffer queue
Vim handles the buffers just fine: when one is deleted, we go to the
previous one.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:30 -06:00
Felipe Contreras
2c3623703f vim: add wrapper for old variable names
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:30 -06:00
Felipe Contreras
8d3b4ffb56 vim: move default sets to set_defaults()
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
2dedd23943 vim: rename public notmuch_rb variables
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
77c2853d7d vim: rename internal notmuch_rb variables
Now we are the official one.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
24dc32aef7 vim: add option to compose new messages
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
de74431cfe vim: refactor open_reply()
In preparation for composing new messages.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
2ec69fd39e vim: trivial cleanup
Using $email_address is more straight forward.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
568a541262 vim: don't execute search if it's cancelled
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
ce5f3f3809 vim: generate custom message-id
Using Mail as a reference.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
6ff607d6a0 vim: split $email_address
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
a760e4ab47 vim: allow calling with arguments
For example:

  :NotMuch date:today

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
77c2c3143b vim: add option to save the patches of a patch series
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
2d583fb17a vim: use much clearer sort constant
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
01859bd7ce vim: show first message of the thread
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
85b3dc9f0f vim: refactor database handling
To minimize memory usage we need to destroy the queries and the
databases, so we should keep track of them.

Each buffer gets a database connection that is destroyed when the buffer
is destroyed, and all the queries along with it.

Ideally notmuch should destroy the queries when the database is
destroyed, but it's not doing that at the moment.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
47e1f39c56 vim: use notmuch fields
They are better encoded than Ruby's Mail.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00