]> git.notmuchmail.org Git - notmuch/log
notmuch
10 years agocli: initialize quiet variable in compact
Jani Nikula [Fri, 10 Jan 2014 20:23:09 +0000 (22:23 +0200)]
cli: initialize quiet variable in compact

Surprisingly there's no compiler warning!

10 years agotest: renamed test scripts to format T\d\d\d-name.sh
Tomi Ollila [Thu, 9 Jan 2014 15:18:59 +0000 (17:18 +0200)]
test: renamed test scripts to format T\d\d\d-name.sh

All test scripts to be executed are now named as T\d\d\d-name.sh,
numers in increments of 10.

This eases adding new tests and developers to see which are test scripts
that are executed by test suite and in which order.

10 years agotest: basic: drop 'ensure all available tests are run'
Tomi Ollila [Thu, 9 Jan 2014 15:18:58 +0000 (17:18 +0200)]
test: basic: drop 'ensure all available tests are run'

When naming test scripts in format 'T\d\d\d-name.sh' the list of
tests to run are created dynamically. This makes test

'Ensure that all available tests will be run by notmuch-test'

in test/basic obsolete.

10 years agoemacs: tree remove comma separator tags
Mark Walters [Thu, 19 Dec 2013 19:12:23 +0000 (19:12 +0000)]
emacs: tree remove comma separator tags

Previously the tags on each line in tree view were separarted by ", "
not just " ". This is different from show and search views.

This patch removes this comma. This is a large patch as essentially
every line of each of the expected outputs in the tree tests needs
updating.

Apart from aesthetic reasons this simplifies the switch to
notmuch-tag-format-tags in the next patch.

10 years agobuild: remove trailing '/.' when doing mkdir -p .deps/.
Tomi Ollila [Sun, 3 Nov 2013 14:05:35 +0000 (16:05 +0200)]
build: remove trailing '/.' when doing mkdir -p .deps/.

When make variable $@ does not contain directory part, $(@D)
resolves as '.'. In this case .deps/$(@D) is '.deps/.'
In some systems `mkdir [-p] directory/.` fails.
To make this compatible with more system substitute trailing
'/.' (slashdot) with '' (empty string) whenever it occurs there.

10 years agoemacs: Makefile.local: HAVE_EMACS usage fixes
Tomi Ollila [Tue, 27 Aug 2013 19:00:47 +0000 (22:00 +0300)]
emacs: Makefile.local: HAVE_EMACS usage fixes

If we don't have emacs, disable targets that used EMACS while doing
the recipes of that target.

If we do have emacs, make install-emacs depend on *.elc files,
as making the target will attempt to install those.

10 years agoMerge tag 'debian/0.17-3'
David Bremner [Sun, 12 Jan 2014 23:56:25 +0000 (19:56 -0400)]
Merge tag 'debian/0.17-3'

uploaded to Debian unstable

10 years agodebian: add single-debian-patch
David Bremner [Sun, 12 Jan 2014 12:55:00 +0000 (08:55 -0400)]
debian: add single-debian-patch

The point of fancy patch systems is to share things with upstream. We
have met the upstream and he is us.

10 years agodebian: finalize changelog for 0.17-3
David Bremner [Sun, 12 Jan 2014 12:53:28 +0000 (08:53 -0400)]
debian: finalize changelog for 0.17-3

10 years agotest/emacs: replace the use of process-attributes with signal-process
David Bremner [Sat, 11 Jan 2014 17:25:39 +0000 (13:25 -0400)]
test/emacs: replace the use of process-attributes with signal-process

In some environments (at least Hurd), process-attributes is
unimplimented and always returns nil.  This ends up causing test
failures (see e.g. id:87a9ffofsc.fsf@zancas.localnet).

Historically and according to POSIX 1003.1-2001, a signal of 0 can be
used to check the validity of a pid. This seems less heinous than
parsing the output of ps(1).

10 years agodebian: update notmuch-emacs for emacs policy 2.0.6
David Bremner [Sun, 12 Jan 2014 03:05:33 +0000 (23:05 -0400)]
debian: update notmuch-emacs for emacs policy 2.0.6

This involves
- the meta-flavour emacs has gone away
- a compat file is needed (also installed by dh_installemacsen)
- a conflict with pre-2.0.0 emacsen-common
- manually managing the "installed" semaphore file

10 years agolib: modify notmuch.h for automatic document generation
Jani Nikula [Wed, 1 Jan 2014 17:52:54 +0000 (19:52 +0200)]
lib: modify notmuch.h for automatic document generation

Minimal changes to produce a sensible result.

10 years agodevel: add doxygen configuration file
Jani Nikula [Wed, 1 Jan 2014 17:52:53 +0000 (19:52 +0200)]
devel: add doxygen configuration file

This is a pretty basic config to get started, generated using 'doxygen
-s -g' and mildly tweaked.

To generate the library man page man/man3/notmuch.3 from lib/notmuch.h
use:

$ doxygen devel/doxygen.cfg

10 years agoinsert: respect maildir.synchronize_flags
Jani Nikula [Wed, 1 Jan 2014 15:20:14 +0000 (17:20 +0200)]
insert: respect maildir.synchronize_flags

Don't synchronize maildir flags if the user doesn't want it.

10 years agotest: notmuch insert with maildir.synchronize_flags=false
Jani Nikula [Wed, 1 Jan 2014 15:20:13 +0000 (17:20 +0200)]
test: notmuch insert with maildir.synchronize_flags=false

Known broken, notmuch insert does not respect the config option.

10 years agoemacs: tree: bare-id in tree
Mark Walters [Thu, 19 Dec 2013 19:16:51 +0000 (19:16 +0000)]
emacs: tree: bare-id in tree

Previously notmuch-tree-get-message-id always returned the id
including the prefix "id:". Modify the function to take an optional
`bare' argument saying to return the raw string.

This will be useful later and brings the function in line with
notmuch-show-get-message-id.

10 years agotest: tree: pick remnants removed
Mark Walters [Sat, 14 Dec 2013 22:58:32 +0000 (22:58 +0000)]
test: tree: pick remnants removed

Some no longer needed traces of pick remain in the emacs-tree
test. Remove these.

10 years agoMerge tag 'debian/0.17-2'
David Bremner [Wed, 1 Jan 2014 11:53:25 +0000 (07:53 -0400)]
Merge tag 'debian/0.17-2'

uploaded to unstable

10 years agodebian: rename NEWS.Debian to NEWS debian/0.17-2
David Bremner [Wed, 1 Jan 2014 11:23:25 +0000 (07:23 -0400)]
debian: rename NEWS.Debian to NEWS

Apparently I had it backwards: NEWS is installed as NEWS.Debian, not
vice-versa.

10 years agoMerge tag '0.17'
David Bremner [Tue, 31 Dec 2013 00:52:32 +0000 (20:52 -0400)]
Merge tag '0.17'

notmuch 0.17 release

10 years agodevel/release-checks.sh: adjust to LIBNOTMUCH version checks 0.17 debian/0.17-1
Tomi Ollila [Wed, 4 Dec 2013 19:31:58 +0000 (21:31 +0200)]
devel/release-checks.sh: adjust to LIBNOTMUCH version checks

NOTMUCH_VERSION_* macros in lib/notmuch.h are replaced with
LIBNOTMUCH_VERSION_* macros. Check that the values of those
match the LIBNOTMUCH_*_VERSION values in lib/Makefile.local.

10 years agoversion: bump to 0.17
David Bremner [Tue, 31 Dec 2013 00:34:23 +0000 (20:34 -0400)]
version: bump to 0.17

10 years agodebian: add changelog and NEWS.Debian for release
David Bremner [Tue, 31 Dec 2013 00:32:53 +0000 (20:32 -0400)]
debian: add changelog and NEWS.Debian for release

NEWS.Debian is displayed at install, so we include the news item about
the disruptive change in sha1 computation.

10 years agodebian: disable atomicity tests on ia64
David Bremner [Sun, 29 Dec 2013 15:24:23 +0000 (11:24 -0400)]
debian: disable atomicity tests on ia64

The following fails on Debian ia64:

% gdb /bin/mv
(gdb) break rename

Since this breaks our atomicity test, disable them until someone is
motivated to figure out whose fault that is.

10 years agoMerge tag '0.17_rc4'
David Bremner [Sun, 29 Dec 2013 01:45:19 +0000 (21:45 -0400)]
Merge tag '0.17_rc4'

notmuch 0.17~rc4 release

10 years agoversion: bump to 0.17~rc4
David Bremner [Sat, 28 Dec 2013 22:40:05 +0000 (18:40 -0400)]
version: bump to 0.17~rc4

Unfortunately release-checks.sh will whine a bit because it has not
caught up with the renaming of the version macros.

10 years agotest: Fix transient error in 'new' test
Austin Clements [Mon, 23 Dec 2013 20:20:36 +0000 (15:20 -0500)]
test: Fix transient error in 'new' test

This fixes a non-deterministic failure in "Ignore files and
directories specified in new.ignore (multiple occurrences)".  The test
assumed that all directories would be scanned, even though nothing
updated the mtime of ${MAIL_DIR}.  It *usually* worked nevertheless
because the tests run quickly enough that the directory mtime is
usually the same as the current time, so notmuch new does not update
the mtime in the database (because more changes could occur in the
same second).  However, when it occasionally did update the mtime in
the database, the notmuch new call in this test would (correctly) skip
"pass 2" of scanning ${MAIL_DIR}, causing it to skip the following
expected lines:

  (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/.git
  (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file
  (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/ignored_file

This patch fixes this problem by touching ${MAIL_DIR} to ensure it
gets scanned and by rearranging the test to ensure the directories are
touched immediately before the main notmuch new call in the test.

10 years agotest: remove call to notmuch-hello from emacs_deliver_message
David Bremner [Sat, 14 Dec 2013 14:49:43 +0000 (22:49 +0800)]
test: remove call to notmuch-hello from emacs_deliver_message

There is an obscure bug in notmuch-hello that very occasionally causes
emacs_deliver_message to fail. Since it it doesn't serve any actual
purpose in the function we delete it, and leave tracking down the the
bug for another day.

10 years agotest: add emacs_fcc_message that does not use smtp-dummy
David Bremner [Sat, 14 Dec 2013 14:39:54 +0000 (22:39 +0800)]
test: add emacs_fcc_message that does not use smtp-dummy

Most of the tests previously using emacs_deliver_message do not use
the actual transmitted message, so we replace it with a simpler (and
presumably more reliable function) that only saves (and indexes) an
fcc copy of the message.

10 years agoperf-test: bump version to 0.4, use manifest files
David Bremner [Sun, 1 Dec 2013 03:00:03 +0000 (23:00 -0400)]
perf-test: bump version to 0.4, use manifest files

The new revision of the performance test includes manifests for each corpus,
so update the support library to use these manifests at the same time.

10 years agoemacs: add '?' to some prefix keymaps to describe its bindings
Mark Walters [Thu, 14 Nov 2013 09:49:46 +0000 (09:49 +0000)]
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).

10 years agotest: implement and document NOTMUCH_TEST_QUIET variable usage
Tomi Ollila [Thu, 5 Dec 2013 12:46:00 +0000 (14:46 +0200)]
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).

10 years agotest: print empty line at the beginning of test script, not at end
Tomi Ollila [Mon, 25 Nov 2013 17:08:18 +0000 (19:08 +0200)]
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.

10 years agotest: resolve `basename "$0" .sh` once for all in test-lib.sh
Tomi Ollila [Mon, 25 Nov 2013 17:08:17 +0000 (19:08 +0200)]
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.

10 years agotest: give unique timestamps to messages
David Bremner [Sun, 8 Dec 2013 15:29:38 +0000 (23:29 +0800)]
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.

10 years agotest: sanitize dates in emacs, raw, and text output
David Bremner [Sun, 8 Dec 2013 14:52:41 +0000 (22:52 +0800)]
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.

10 years agotest: sanitize Date and timestamp fields in json
David Bremner [Sun, 8 Dec 2013 08:41:34 +0000 (16:41 +0800)]
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

10 years agotest: pass expected output through json_sanitize in 2 places
David Bremner [Sun, 8 Dec 2013 08:39:05 +0000 (16:39 +0800)]
test: pass expected output through json_sanitize in 2 places

This makes the tests more robust against changes in the
sanitization rules.

10 years agoversion: bump version
David Bremner [Sat, 7 Dec 2013 09:02:08 +0000 (17:02 +0800)]
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.

10 years agolib: Bump library version from 3.0.0 to 3.1.0
Austin Clements [Wed, 4 Dec 2013 16:19:46 +0000 (11:19 -0500)]
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.

10 years agolib: Replace NOTMUCH_*_VERSION with LIBNOTMUCH_*_VERSION
Austin Clements [Wed, 4 Dec 2013 16:19:45 +0000 (11:19 -0500)]
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.

10 years agolib: Make VERSION macros agree with soname version
Austin Clements [Wed, 4 Dec 2013 16:19:44 +0000 (11:19 -0500)]
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.)

10 years agoNews updates for Mark's bugfixes
Mark Walters [Sat, 30 Nov 2013 13:53:41 +0000 (13:53 +0000)]
News updates for Mark's bugfixes

10 years agodebian: reformat changelog to avoid lintian warning.
David Bremner [Sat, 30 Nov 2013 15:23:57 +0000 (11:23 -0400)]
debian: reformat changelog to avoid lintian warning.

10 years agoNEWS: bump date 0.17_rc2
David Bremner [Fri, 29 Nov 2013 01:01:43 +0000 (21:01 -0400)]
NEWS: bump date

10 years agoversion: bump to 0.17~rc2
David Bremner [Fri, 29 Nov 2013 01:00:52 +0000 (21:00 -0400)]
version: bump to 0.17~rc2

10 years agodebian: update changelog for new release candidate
David Bremner [Fri, 29 Nov 2013 00:59:32 +0000 (20:59 -0400)]
debian: update changelog for new release candidate

10 years agotest/crypto: disable gpg version printing
David Bremner [Wed, 27 Nov 2013 15:35:46 +0000 (11:35 -0400)]
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.

10 years agovim: NEWS for vim interface
David Bremner [Thu, 28 Nov 2013 10:25:19 +0000 (06:25 -0400)]
vim: NEWS for vim interface

Transcribed from Felipe's email.

10 years agodebian: remove warning about emacs24
David Bremner [Wed, 27 Nov 2013 12:17:46 +0000 (08:17 -0400)]
debian: remove warning about emacs24

10 years agoutil: detect byte order
David Bremner [Tue, 26 Nov 2013 02:55:24 +0000 (22:55 -0400)]
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

10 years agoNEWS: News for big endian sha1 bug fix.
David Bremner [Sun, 24 Nov 2013 21:29:43 +0000 (17:29 -0400)]
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.

10 years agolib: fix byte order test in libsha1.c
David Bremner [Sun, 24 Nov 2013 21:29:42 +0000 (17:29 -0400)]
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.

10 years agodebian: disable gdb as a build-dependency on s390x
David Bremner [Sun, 24 Nov 2013 22:51:37 +0000 (18:51 -0400)]
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

10 years agoAdd NEWS entry for notmuch-compact
Ben Gamari [Wed, 20 Nov 2013 14:05:07 +0000 (09:05 -0500)]
Add NEWS entry for notmuch-compact

Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
10 years agodebian: add notmuch_database_compact to symbols file. 0.17_rc1 debian/0.17_rc1-1
David Bremner [Thu, 21 Nov 2013 00:06:36 +0000 (20:06 -0400)]
debian: add notmuch_database_compact to symbols file.

This change does not require an SONAME bump because it only adds a symbol.

10 years agodebian: changelog stanza for release candidate
David Bremner [Wed, 20 Nov 2013 23:43:34 +0000 (19:43 -0400)]
debian: changelog stanza for release candidate

10 years agoversion: bump to 0.17~rc1
David Bremner [Wed, 20 Nov 2013 23:42:00 +0000 (19:42 -0400)]
version: bump to 0.17~rc1

Various other files are synched using "make update-versions".  NEWS
has to be hand edited.

10 years agoNEWS: remove blank line.
David Bremner [Wed, 20 Nov 2013 23:39:37 +0000 (19:39 -0400)]
NEWS: remove blank line.

Tomi says I have to.

10 years agotest: replace $PWD with YYY in emacs & emacs-show tests
David Bremner [Sat, 23 Nov 2013 11:01:16 +0000 (07:01 -0400)]
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.

10 years agoemacs: show: stop stderr appearing in buffer
Mark Walters [Mon, 18 Nov 2013 21:10:33 +0000 (21:10 +0000)]
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).

10 years agovim: add help file
Felipe Contreras [Sat, 2 Nov 2013 13:47:12 +0000 (07:47 -0600)]
vim: add help file

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: check compose is done on delete
Felipe Contreras [Sat, 2 Nov 2013 10:40:01 +0000 (04:40 -0600)]
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>
10 years agovim: remove unnecessary buffer queue
Felipe Contreras [Sat, 2 Nov 2013 10:38:33 +0000 (04:38 -0600)]
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>
10 years agovim: add wrapper for old variable names
Felipe Contreras [Sat, 2 Nov 2013 06:49:53 +0000 (00:49 -0600)]
vim: add wrapper for old variable names

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: move default sets to set_defaults()
Felipe Contreras [Sat, 2 Nov 2013 06:52:22 +0000 (00:52 -0600)]
vim: move default sets to set_defaults()

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: rename public notmuch_rb variables
Felipe Contreras [Sat, 2 Nov 2013 06:44:40 +0000 (00:44 -0600)]
vim: rename public notmuch_rb variables

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: rename internal notmuch_rb variables
Felipe Contreras [Sat, 2 Nov 2013 06:42:53 +0000 (00:42 -0600)]
vim: rename internal notmuch_rb variables

Now we are the official one.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: add option to compose new messages
Felipe Contreras [Mon, 14 Oct 2013 06:58:20 +0000 (01:58 -0500)]
vim: add option to compose new messages

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: refactor open_reply()
Felipe Contreras [Mon, 14 Oct 2013 06:57:28 +0000 (01:57 -0500)]
vim: refactor open_reply()

In preparation for composing new messages.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: trivial cleanup
Felipe Contreras [Mon, 14 Oct 2013 05:54:13 +0000 (00:54 -0500)]
vim: trivial cleanup

Using $email_address is more straight forward.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: don't execute search if it's cancelled
Felipe Contreras [Mon, 14 Oct 2013 06:19:50 +0000 (01:19 -0500)]
vim: don't execute search if it's cancelled

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: generate custom message-id
Felipe Contreras [Mon, 14 Oct 2013 06:19:05 +0000 (01:19 -0500)]
vim: generate custom message-id

Using Mail as a reference.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: split $email_address
Felipe Contreras [Mon, 14 Oct 2013 05:52:51 +0000 (00:52 -0500)]
vim: split $email_address

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: allow calling with arguments
Felipe Contreras [Mon, 14 Oct 2013 04:25:44 +0000 (23:25 -0500)]
vim: allow calling with arguments

For example:

  :NotMuch date:today

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: add option to save the patches of a patch series
Felipe Contreras [Mon, 14 Oct 2013 03:38:38 +0000 (22:38 -0500)]
vim: add option to save the patches of a patch series

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: use much clearer sort constant
Felipe Contreras [Sat, 12 Oct 2013 09:33:30 +0000 (04:33 -0500)]
vim: use much clearer sort constant

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: show first message of the thread
Felipe Contreras [Sat, 12 Oct 2013 09:33:06 +0000 (04:33 -0500)]
vim: show first message of the thread

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: refactor database handling
Felipe Contreras [Mon, 30 Sep 2013 21:06:48 +0000 (16:06 -0500)]
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>
10 years agovim: use notmuch fields
Felipe Contreras [Sun, 29 Sep 2013 18:20:37 +0000 (13:20 -0500)]
vim: use notmuch fields

They are better encoded than Ruby's Mail.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: don't automatically refresh after tagging
Felipe Contreras [Sun, 29 Sep 2013 18:17:58 +0000 (13:17 -0500)]
vim: don't automatically refresh after tagging

This operation might take a while, and even if it only takes fractions
of a second, that's not what the user might want.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agovim: run mutt in default term
Charlie Allom [Mon, 21 May 2012 09:06:26 +0000 (10:06 +0100)]
vim: run mutt in default term

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoNEWS: insert quotable parts in reply as they are displayed in show view
Jani Nikula [Sun, 17 Nov 2013 13:38:17 +0000 (15:38 +0200)]
NEWS: insert quotable parts in reply as they are displayed in show view

News for
commit 5c19eb46a906819744a022463ee3fd7cdfaabbb9
Author: Jani Nikula <jani@nikula.org>
Date:   Sun Sep 1 20:59:53 2013 +0300

    emacs: insert quotable parts in reply as they are displayed in show view

10 years agoemacs: do not put quoted reply in primary selection
Mark Walters [Sun, 17 Nov 2013 12:04:09 +0000 (12:04 +0000)]
emacs: do not put quoted reply in primary selection

In current emacs (24.3) select-active-regions is set to t by
default. The reply insertion code sets the region to the quoted
message to make it easy to delete (kill-region or C-w). These two
things combine to put the quoted message in the primary selection.

This is not what the user wanted and is a privacy risk (accidental
pasting of the quoted message). We can avoid some of the problems
by let-binding select-active-regions to nil. This fixes if the
primary selection was previously in a non-emacs window but not if
it was in an emacs window. To avoid the problem in the latter case
we deactivate mark.

One key test (which fails under many simpler "fixes") is: open emacs
24.3 with notmuch, open 2 windows (viewing different notmuch buffers),
highlight some text in one, and then reply to a message in the
other. In many of my earlier attempts to fix this big this test fails.

10 years agocompact: improve error messages on failures after compaction
Tomi Ollila [Thu, 14 Nov 2013 22:03:27 +0000 (00:03 +0200)]
compact: improve error messages on failures after compaction

The error messages written during the steps replacing old
database with new now includes relevant paths and strerror.

10 years agocompact: unconditionally remove old wip database compact directory
Tomi Ollila [Thu, 14 Nov 2013 22:03:26 +0000 (00:03 +0200)]
compact: unconditionally remove old wip database compact directory

In case previous notmuch compact has been interrupted there is old
work-in-progress database compact directory partially filled. Remove
it just before starting to fill the directory with new files.

10 years agocompact: preserve backup database until compacted database is in place
Tomi Ollila [Thu, 14 Nov 2013 22:03:25 +0000 (00:03 +0200)]
compact: preserve backup database until compacted database is in place

It is less error prone and window of failure opportunity is smaller
if the old (backup) database is always renamed (instead of sometimes
rmtree'd) before new (compacted) database is put into its place.
Finally rmtree() old database in case old database backup is not kept.

10 years agocompact: catch Xapian::Error consistently
Tomi Ollila [Wed, 13 Nov 2013 17:02:44 +0000 (19:02 +0200)]
compact: catch Xapian::Error consistently

catch Xapian::Error in compact code in lib/database.cc to be consistent
with other code in addition to not making software crash on uncaught
other Xapian error.

10 years agocompact: tidy formatting
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.

10 years agoNews for tree-view
Mark Walters [Sat, 16 Nov 2013 08:05:16 +0000 (08:05 +0000)]
News for tree-view

10 years agoemacs: tree: use remap for the over-ridden global bindings
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.]

10 years agoemacs: help: add a special function to deal with remaps
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.

10 years agoemacs: help: add base-keymap
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.

10 years agoemacs: help: split out notmuch-describe-key as a function
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.

10 years agoemacs: help: remove duplicate bindings
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"

10 years agoemacs: help: save-match-data
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.

10 years agoemacs: help: check for nil key binding
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.

10 years agoemacs: Correct documentation of `notmuch-poll-script'
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.

10 years agoNEWS: emacs: fix notmuch-mua-reply point placement
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.

10 years agoremove notmuch-pick
Mark Walters [Wed, 13 Nov 2013 12:51:27 +0000 (12:51 +0000)]
remove notmuch-pick