notmuch.git
12 years agotest: fix sed error in basic tests
Dmitry Kurochkin [Fri, 18 Nov 2011 15:21:00 +0000 (19:21 +0400)]
test: fix sed error in basic tests

The error is easy to miss, because the test passes and stderr is not
printed.  But if you run basic tests in verbose mode (./basic
--verbose), you get:

  sed: can't read notmuch-test: No such file or directory

The issue is that sed command is given two files: notmuch-test and
$TEST_DIRECTORY/notmuch-test.  And there is no notmuch-test file in
the current directory (test/tmp.basic/).  The patch just removes the
non-existing file from the sed command.

12 years agotest: remove executable permissions from test-lib.sh
Dmitry Kurochkin [Sat, 26 Nov 2011 06:12:25 +0000 (10:12 +0400)]
test: remove executable permissions from test-lib.sh

It is not supposed to be run, only sourced.

12 years agoemacs: test notmuch show with fourfold message indentation
Gregor Zattler [Thu, 24 Nov 2011 22:03:24 +0000 (23:03 +0100)]
emacs: test notmuch show with fourfold message indentation

Previous behaviour was to indent messages in a thread according
to depth by one space per level.  This commit tests if setting
notmuch-indent-messages-width to `4' provides a message thread
with four spaces of indentation thread depth.

12 years agoemacs: test: notmuch show without indentation
Gregor Zattler [Thu, 24 Nov 2011 22:03:23 +0000 (23:03 +0100)]
emacs: test: notmuch show without indentation

Previous behaviour was to indent messages in a thread according
to depth by one space per level.  In
id:1311028119-50637-1-git-send-email-fgeller@gmail.com Felix
Geller proposed a patch in order to turn indentation off.  This
commit tests if instead setting notmuch-indent-messages-width to
`0' does turn off indentation.

12 years agoemacs: test notmuch-indent-messages-width default
Gregor Zattler [Thu, 24 Nov 2011 22:03:22 +0000 (23:03 +0100)]
emacs: test notmuch-indent-messages-width default

Previous behaviour was to indent messages in a thread according
to depth by one space per level.  This is still the case with
notmuch-indent-messages-width default value `1'.  This test
succeeds if output with default value is same as in "Basic
notmuch-show view in emacs".

12 years agoemacs: make message indentation width customisable
Gregor Zattler [Thu, 24 Nov 2011 22:03:21 +0000 (23:03 +0100)]
emacs: make message indentation width customisable

Till now Emacs UI indents messages according to their respecive
depth of neting in the thread.  The actual width of indentation
per level is hardcoded to `1' space.
This patch makes message indentation customisable by introducing
a variable `notmuch-indent-messages-width' which defaults to `1',
which is the same as before.  Felix could set this variable to
`0' in order to disable indentation, I tested it with a value of
`4' for a clearer separation of messages in a thread.

12 years agomake release: use sed to check debian version
Tomi Ollila [Mon, 21 Nov 2011 16:34:24 +0000 (18:34 +0200)]
make release: use sed to check debian version

Use common sed tool instead of dpkg-parsechangelog (which is usually
available on debian systems only) to verify that debian version
information is consistent with version file.

12 years agomake release: added goal verify-version-manpage
Tomi Ollila [Mon, 21 Nov 2011 16:27:09 +0000 (18:27 +0200)]
make release: added goal verify-version-manpage

Check that the version mentioned in notmuch manual page
is consistent with the version file.

12 years agomake release: verify-version-*: change comparison logic
Tomi Ollila [Mon, 21 Nov 2011 15:55:20 +0000 (17:55 +0200)]
make release: verify-version-*: change comparison logic

verfy-version-debian, verify-version-python and verify-version-components
checked noneqality of the comparison strings and if got "positive"
answer then made that goal fail. But in case of the test ([ ])
execution failed it never got to the 'then' part of the line (and
the 'if [ ... ] then ... fi ' construct doesn't make the script line
fail in case of problems inside [ ].
This commit inverses the "logic", so that only if the comparison for
equality succeeds the script line will exit with 0 and execution
can continue past the failure case to the next line (executed by another
shell) with '@echo done'

12 years agoemacs: Avoid unnecessary markers.
Austin Clements [Mon, 21 Nov 2011 01:07:02 +0000 (20:07 -0500)]
emacs: Avoid unnecessary markers.

This is just cleanup.  These markers are all immediately resolved to
points by Emacs, so using markers here is just unncessary overhead.

12 years agoemacs: Don't record undo information for search or show buffers.
Austin Clements [Mon, 21 Nov 2011 01:00:55 +0000 (20:00 -0500)]
emacs: Don't record undo information for search or show buffers.

There's no reason to record undo information for read-only,
programmatically-constructed buffers.  The undo list just chews up
memory keeping track of our calls to insert.

12 years agodebian/control: require dtach version >= 0.8 in Build-Depends
Tomi Ollila [Mon, 21 Nov 2011 15:18:00 +0000 (17:18 +0200)]
debian/control: require dtach version >= 0.8 in Build-Depends

Since version 0.8 of dtach -n does no longer require controlling
tty to be present when executed. Currently controlling tty is not
always (if ever) present when tests are executed.

12 years agoMerge branch 'release'
David Bremner [Wed, 23 Nov 2011 20:02:47 +0000 (16:02 -0400)]
Merge branch 'release'

12 years agodebian: changelog stanza for 0.10 0.10
David Bremner [Wed, 23 Nov 2011 11:46:39 +0000 (07:46 -0400)]
debian: changelog stanza for 0.10

Give a brief summary of (and pointer to) NEWS

12 years agoNEWS: set (approximate) date for 0.10 release
David Bremner [Wed, 23 Nov 2011 11:43:01 +0000 (07:43 -0400)]
NEWS: set (approximate) date for 0.10 release

It doesn't really matter if we are off by a day.

12 years agoversion: update to 0.10
David Bremner [Wed, 23 Nov 2011 11:37:02 +0000 (07:37 -0400)]
version: update to 0.10

12 years agoNEWS: item for silent killing of search buffers.
David Bremner [Wed, 23 Nov 2011 11:34:22 +0000 (07:34 -0400)]
NEWS: item for silent killing of search buffers.

This is maybe borderline for inclusion in NEWS, but maybe the NEWS
item helps someone who thinks there is a bug.

12 years agocontrib/notmuch-deliver: don't export from git
David Bremner [Wed, 23 Nov 2011 11:25:24 +0000 (07:25 -0400)]
contrib/notmuch-deliver: don't export from git

This prevents it from being part of the release tarballs. Hopefully
this is only temporary while we sort out the GPL2 versus GPL3
question.

12 years agoemacs: Make saving new saved searches append, not prepend
Jani Nikula [Fri, 23 Sep 2011 18:57:38 +0000 (21:57 +0300)]
emacs: Make saving new saved searches append, not prepend

Append new saved searches at the end of saved searches rather than insert
in front.

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agoemacs: Add new customization option to sort saved searches
Jani Nikula [Fri, 23 Sep 2011 18:57:37 +0000 (21:57 +0300)]
emacs: Add new customization option to sort saved searches

Add new customization option notmuch-saved-search-sort-function to sort
saved searches in user-defined order. Provide a sort function to sort the
saved searches in alphabetical order. Setting the search function to nil
causes the saved searches not to be sorted, as before. This also remains
the default. The function only affects display of the saved searches, not
the order in which they are stored by custom.

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agotags_to_maildir_flags: Cleanup double assignement
Louis Rilling [Wed, 14 Sep 2011 22:23:19 +0000 (00:23 +0200)]
tags_to_maildir_flags: Cleanup double assignement

The for loop right after already does the job.

Signed-off-by: Louis Rilling <l.rilling@av7.net>
12 years agolib: Kill last usage of C++ type bool
Louis Rilling [Wed, 14 Sep 2011 22:23:18 +0000 (00:23 +0200)]
lib: Kill last usage of C++ type bool

Signed-off-by: Louis Rilling <l.rilling@av7.net>
12 years agoMerge branch 'release'
David Bremner [Mon, 21 Nov 2011 11:26:11 +0000 (07:26 -0400)]
Merge branch 'release'

12 years agofix a double // to single /
Florian Friesdorf [Sun, 20 Nov 2011 21:15:24 +0000 (13:15 -0800)]
fix a double // to single /

12 years agoemacs: breakout notmuch-show-advance functionality from notmuch-show-advance-and...
Jameson Graef Rollins [Sun, 13 Nov 2011 21:16:48 +0000 (13:16 -0800)]
emacs: breakout notmuch-show-advance functionality from notmuch-show-advance-and-archive

This patch breaks out much of the functionality of
notmuch-show-advance-and-archive into a new function:
notmuch-show-advance.  This new function does all the advancing
through a show buffer that notmuch-show-advance-and-archive did,
without all the invasive thread archiving.  The return value of
notmuch-show-advance is nil if the bottom of the thread is not
reached, and t if it is.

notmuch-show-advance-and-archive is modified to just call
notmuch-show-advance, and then call notmuch-show-archive-thread if the
return value is true.  In this way the previous functionality of
notmuch-show-advance-and-archive is preserved.

This provides a way for people to rebind the space bar to a more sane
function if they don't like the default behavior.

12 years agoDon't link libnotmuch if libutil isn't linked in properly.
Tom Prince [Sun, 13 Nov 2011 16:34:42 +0000 (11:34 -0500)]
Don't link libnotmuch if libutil isn't linked in properly.

For some reason, on my machine, the link is picking up
/usr/lib/libutil.so instead of util/libutil.a. This causes there to be
undefined symbols in libnotmuch, making it unuseable. This patch causes
the link to fail instead.

12 years agoRELEASING: document the semi-automated version propagation.
David Bremner [Fri, 18 Nov 2011 02:26:26 +0000 (22:26 -0400)]
RELEASING: document the semi-automated version propagation.

The instructions are purposely a bit coy about what files are updated,
so we don't have to update immediately when something else is plugged
into the make recipe.

12 years agobuild system: add target update-versions to propagate version
David Bremner [Fri, 18 Nov 2011 02:26:25 +0000 (22:26 -0400)]
build system: add target update-versions to propagate version

The version from file "version" is propagated to the man page and the
python bindings via sed. Note that the git version is ignored because
of the check for MAKECMDGOALS.

12 years agobuild system: use $(filter ...) to test MAKECMDGOALS
David Bremner [Fri, 18 Nov 2011 02:26:24 +0000 (22:26 -0400)]
build system: use $(filter ...) to test MAKECMDGOALS

This makes the test easier to extend to more targets. It also corrects
a bug where "special" targets were only detected when given alone.

12 years agoversion: update version info for 0.10~rc2 0.10_rc2 debian/0.10_rc2-1
David Bremner [Sat, 19 Nov 2011 12:23:40 +0000 (08:23 -0400)]
version: update version info for 0.10~rc2

Arguably editing debian/changelog violates the "do one thing at a
time" rule, but all of these versions need to be kept in sync.

13 years agotest: make all tests terminable with Ctrl-c
Tomi Ollila [Tue, 8 Nov 2011 16:02:25 +0000 (18:02 +0200)]
test: make all tests terminable with Ctrl-c

Some tests don't break when HUP signal is sent tho those (by
pressing ctrl-c on the terminal). Therefore, the top-level
test script catches the HUP and sends TERM signal to the
started test script.

13 years agotest: emacs: tidy up "Stashing in notmuch-show" test
Pieter Praet [Wed, 16 Nov 2011 11:38:19 +0000 (12:38 +0100)]
test: emacs: tidy up "Stashing in notmuch-show" test

Merge expected output into the actual test, so we can verify the stashed
filename using ${gen_msg_filename} instead of doing sed tricks.

13 years agotest: attempt to send QUIT to smtp-dummy in case mail send failed
Tomi Ollila [Wed, 16 Nov 2011 21:25:19 +0000 (23:25 +0200)]
test: attempt to send QUIT to smtp-dummy in case mail send failed

If mail sending from emacs fails before it has chance to connect
to the smtp-dummy mail server, the opportunistic QUIT message
sending makes smtp-dummy to exit.

13 years agotest: create dtach's session socket in $TEST_TMPDIR
Tomi Ollila [Wed, 16 Nov 2011 20:50:06 +0000 (22:50 +0200)]
test: create dtach's session socket in $TEST_TMPDIR

Due to 108-character limit in unix domain socket path this change
is required; it is more probable that length of ${TMPDIR:-/tmp} is
shorter than length of path to the current directory of notmuch test
source directory. One can expect to create reasonable-length unix
domain sockets wherever $TMPDIR points to.

13 years agotest: create TEST_TMPDIR for holding temporary files
Tomi Ollila [Wed, 16 Nov 2011 19:09:00 +0000 (21:09 +0200)]
test: create TEST_TMPDIR for holding temporary files

The TEST_TMPDIR if first needed to hold dtach's socket (due
to 108-character limit in socket file names). Later it can be
used to hold other temporary files; directory deleted at exit.

13 years agobuild system: tweak VERSION so that debian-snapshot works for N.NN~rcN
David Bremner [Thu, 17 Nov 2011 16:40:50 +0000 (12:40 -0400)]
build system: tweak VERSION so that debian-snapshot works for N.NN~rcN

The problem was that the version is recovered from the git tag, which
has the ~ replaced by _. This broke the sequencing of version numbers.

13 years agoNEWS: fix some old typos and trailing whitespace
Pieter Praet [Wed, 16 Nov 2011 20:37:50 +0000 (21:37 +0100)]
NEWS: fix some old typos and trailing whitespace

(with a further M-x whitespace-cleanup by db)

13 years agoNEWS: add entries for stashing-related keybinding and tests
Pieter Praet [Wed, 16 Nov 2011 20:37:49 +0000 (21:37 +0100)]
NEWS: add entries for stashing-related keybinding and tests

Add news entries for commits:
  f9764bfacc97457d1154c2d2a6001a6564f13ec3
  64febdf71c4184ca369f5d11d7f196704a3ec1a6

13 years agoNEWS entry for id-links
Daniel Schoepe [Wed, 16 Nov 2011 17:53:13 +0000 (18:53 +0100)]
NEWS entry for id-links

This adds a NEWS entry for commit 4a4ada73b751b1916c5dc4d408a8056411566e38

(second try, with whitespace fix)

13 years agoRevert "NEWS entry for id-links"
David Bremner [Wed, 16 Nov 2011 18:14:08 +0000 (14:14 -0400)]
Revert "NEWS entry for id-links"

This reverts commit e93bf1f842d4d06b2468d1cdbd5e4e25877c7a44.

reverting to fix whitespace

13 years agoNEWS entry for id-links
Daniel Schoepe [Wed, 16 Nov 2011 17:53:13 +0000 (18:53 +0100)]
NEWS entry for id-links

This adds a NEWS entry for commit 4a4ada73b751b1916c5dc4d408a8056411566e38

13 years agoNEWS entry for adding tab-completion to notmuch-search
Daniel Schoepe [Wed, 16 Nov 2011 17:53:12 +0000 (18:53 +0100)]
NEWS entry for adding tab-completion to notmuch-search

Add a news entry for commit6a280088e6769015ade7758b9790384997a21ff3.

13 years agoNEWS: mention improved search buffer performance, change Optimizations to Performance
David Bremner [Wed, 16 Nov 2011 17:05:19 +0000 (13:05 -0400)]
NEWS: mention improved search buffer performance, change Optimizations to Performance

via email: id:"20111116154317.GC2852@mit.edu"

13 years agonotmuch.1: bump version number
David Bremner [Wed, 16 Nov 2011 11:44:00 +0000 (07:44 -0400)]
notmuch.1: bump version number

More of a leap than a bump.  This is a bit silly keeping 3 files
syncronized. At least for this file, I would prefer a solution that
generates notmuch.1 from some template at build time.

13 years agoRELEASING: update description of "make release".
David Bremner [Wed, 16 Nov 2011 11:41:44 +0000 (07:41 -0400)]
RELEASING: update description of "make release".

The additional "safety feature" documented here is motivated by the
fact that I use gpg-agent and I don't always get the GPG prompt that
Carl was relying on as an abort point. The new version also allows
more to be done in "dry run" mode.

13 years agoRELEASING: update discussion of version handling
David Bremner [Wed, 16 Nov 2011 11:25:57 +0000 (07:25 -0400)]
RELEASING: update discussion of version handling

This is definitely reaching the point where it should be automated.

13 years agoRELEASING: update symbol handling description for current practice.
David Bremner [Wed, 16 Nov 2011 11:21:35 +0000 (07:21 -0400)]
RELEASING: update symbol handling description for current practice.

We really did bump SONAME, and we probably will again, but not just
for a simple symbol addition.

Debian versions generally need to be removed from symbols file; this
wasn't a problem before because there was no Debian versions

13 years agoNEWS: discuss contrib and nmbug
David Bremner [Wed, 16 Nov 2011 03:06:38 +0000 (23:06 -0400)]
NEWS: discuss contrib and nmbug

I mention the possibility of a seperate license here because currently
notmuch-deliver is licensed GPL v2 only.

13 years agodebian/libnotmuch2.symbols: add notmuch_query_count_threads 0.10_rc1 debian/0.10_rc1-1
David Bremner [Wed, 16 Nov 2011 00:14:59 +0000 (20:14 -0400)]
debian/libnotmuch2.symbols: add notmuch_query_count_threads

Since this is only an added symbol, no soname bump required.

13 years agodebian: new changelog stanza for 0.10~rc1-1
David Bremner [Tue, 15 Nov 2011 23:49:50 +0000 (19:49 -0400)]
debian: new changelog stanza for 0.10~rc1-1

The changelog is a bit minimalist, but we'll do better for the real
release.

13 years agoversion: update to 0.10~rc1
David Bremner [Tue, 15 Nov 2011 23:46:08 +0000 (19:46 -0400)]
version: update to 0.10~rc1

and the usual dance with the python bindings version.

13 years agotest: add tests for notmuch search --offset and --limit
Jani Nikula [Tue, 15 Nov 2011 20:08:53 +0000 (22:08 +0200)]
test: add tests for notmuch search --offset and --limit

Signed-off-by: Jani Nikula <jani@nikula.org>
13 years agotest: add tests for notmuch count
Jani Nikula [Tue, 15 Nov 2011 20:08:52 +0000 (22:08 +0200)]
test: add tests for notmuch count

Signed-off-by: Jani Nikula <jani@nikula.org>
13 years agocli: add support for --output parameter in notmuch count
Jani Nikula [Tue, 15 Nov 2011 20:08:51 +0000 (22:08 +0200)]
cli: add support for --output parameter in notmuch count

Add support for --output=messages (which remains the default) and
--output=threads to notmuch count.

Signed-off-by: Jani Nikula <jani@nikula.org>
13 years agocli: drop unused code from notmuch count
Jani Nikula [Tue, 15 Nov 2011 20:08:50 +0000 (22:08 +0200)]
cli: drop unused code from notmuch count

Remove unused code within #if 0 blocks from notmuch count.

Signed-off-by: Jani Nikula <jani@nikula.org>
13 years agocli: add options --offset and --limit to notmuch search
Jani Nikula [Tue, 15 Nov 2011 20:08:49 +0000 (22:08 +0200)]
cli: add options --offset and --limit to notmuch search

Add options --offset=[-]N and --limit=M to notmuch search to determine the
first result and maximum number of results to display.

Option --limit=M limits the maximum number of results to display to M.

Option --offset=[-]N skips the first N results; with the leading '-' skip
until the Nth result from the end.

Note that --offset with a negative N for thread or summary output requires
counting the number of matching threads in advance.

Signed-off-by: Jani Nikula <jani@nikula.org>
13 years agolib: add function to get the number of threads matching a search
Jani Nikula [Tue, 15 Nov 2011 20:08:48 +0000 (22:08 +0200)]
lib: add function to get the number of threads matching a search

Add function notmuch_query_count_threads() to get the number of threads
matching a search. This is done by performing a search and figuring out the
number of unique thread IDs in the matching messages, a significantly
heavier operation than notmuch_query_count_messages().

Signed-off-by: Jani Nikula <jani@nikula.org>
13 years agotest: Add a test script for "notmuch tag"
Austin Clements [Tue, 8 Nov 2011 03:57:11 +0000 (22:57 -0500)]
test: Add a test script for "notmuch tag"

13 years agonews: Store "from" and "subject" headers in the database.
Austin Clements [Tue, 15 Nov 2011 01:15:33 +0000 (20:15 -0500)]
news: Store "from" and "subject" headers in the database.

13 years agoStore "from" and "subject" headers in the database.
Austin Clements [Sun, 6 Nov 2011 17:17:36 +0000 (12:17 -0500)]
Store "from" and "subject" headers in the database.

This is a rebase and cleanup of Istvan Marko's patch from
id:m3pqnj2j7a.fsf@zsu.kismala.com

Search retrieves these headers for every message in the search
results.  Previously, this required opening and parsing every message
file.  Storing them directly in the database significantly reduces IO
and computation, speeding up search by between 50% and 10X.

Taking full advantage of this requires a database rebuild, but it will
fall back to the old behavior for messages that do not have headers
stored in the database.

13 years agotest/atomicity: change shebang to '#!/usr/bin/env bash'
Tomi Ollila [Sun, 13 Nov 2011 08:52:35 +0000 (10:52 +0200)]
test/atomicity: change shebang to '#!/usr/bin/env bash'

13 years agoemacs: add notmuch-show-worker function for specifying crypto processing directly
Jameson Graef Rollins [Sun, 13 Nov 2011 19:15:21 +0000 (11:15 -0800)]
emacs: add notmuch-show-worker function for specifying crypto processing directly

The main reason to introduce this new unexposed function is to allow
the buffer redisplay crypto switch to behaving in a more expected way.
The prefix to notmuch-show-redisplay buffer now switches the crypto
processing of the current show buffer, as opposed to switching the
logic of the notmuch-crypto-process-mime customization variable.  This
behavior is more intuitive.

13 years agoemacs: add documentation for notmuch-show crypto-switch option
Jameson Graef Rollins [Sun, 13 Nov 2011 19:15:20 +0000 (11:15 -0800)]
emacs: add documentation for notmuch-show crypto-switch option

13 years agoLink libutil using filenmae, rather than using -l.
Tom Prince [Sun, 13 Nov 2011 17:05:03 +0000 (12:05 -0500)]
Link libutil using filenmae, rather than using -l.

glibc includes a libutil, so if the wrong -L options get passed, we
will pick up glibc's version, rather than our own.

13 years agotest: make smtp-dummy work with Emacs 24
Thomas Jost [Mon, 3 Oct 2011 16:47:27 +0000 (18:47 +0200)]
test: make smtp-dummy work with Emacs 24

In Emacs 24, a space is expected after a SMTP response code. If we don't respect
that, smtpmail-send-it will wait forever.

13 years agotest: do not hide test_emacs errors
Dmitry Kurochkin [Fri, 1 Jul 2011 02:23:48 +0000 (06:23 +0400)]
test: do not hide test_emacs errors

Do not redirect test_emacs stderr to /dev/null.  Test_emacs uses
emacsclient(1) now and it does not print unwanted messages (like
those from `message') to stderr.  But it does print useful
errors, e.g. when emacs server connection fails, given expression
is not valid or undefined function is called.

13 years agoexec emacs at the end of run_emacs script
Tomi Ollila [Thu, 10 Nov 2011 23:43:03 +0000 (01:43 +0200)]
exec emacs at the end of run_emacs script

In the last line of run_emacs, exec the emacs process.
With one fork less the process list is (also) neater.

13 years agocontrib/nmbug: new script for sharing tags with a given prefix.
David Bremner [Sun, 13 Nov 2011 01:24:25 +0000 (21:24 -0400)]
contrib/nmbug: new script for sharing tags with a given prefix.

The main idea is consider the notmuch database as analogous to the
work-tree. A bare git repo is maintained in the users home directory,
with a tree of the form tags/$message-id/$tag

Like notmuch and git, we have a set of subcommnds, mainly modelled on
git.

Implementation wise, the heavy lifting is in the following functions.

   commit xapian -> git
   checkout git -> xapian
   merge fetched git + git -> xapian
   status find differences between xapian, git, and remote git.

The central implementation trick, from an idea I think due to
tomprince on IRC is manipulate the git index directly from the xapian
tag information.  The merge routine is still done using a temporary
checkout as I wasn't able to get it working with the index only.

There are also some convenience wrappers around git commands, like "fetch"
that essential just set GIT_DIR in the environment.

In order to encode tags (viewed as octet sequences) into filenames,
we whitelist a smallish set of characters and %hex escape anything outside.

The prefix is omitted in git, which lets one save and restore to
different prefixes (although this is only lightly tested).

Thanks to Tomi Ollila for a huge amount of feedback and patches while
putting this together.

13 years agoemacs: update notmuch-crypto-process-mime config variable documentation.
Jameson Graef Rollins [Tue, 31 May 2011 17:06:00 +0000 (10:06 -0700)]
emacs: update notmuch-crypto-process-mime config variable documentation.

This mentions the fact that prefix arguments are now used to enable to
crypto switch.

13 years agoemacs: Unbind M-RET as display of thread with crypto switch.
Jameson Graef Rollins [Sun, 29 May 2011 00:09:44 +0000 (17:09 -0700)]
emacs: Unbind M-RET as display of thread with crypto switch.

Use prefix argument instead to set switch.

13 years agotest: stashing in notmuch-{show,search}
Pieter Praet [Thu, 30 Jun 2011 08:23:23 +0000 (10:23 +0200)]
test: stashing in notmuch-{show,search}

Should provide full test coverage of the stashing feature.

Signed-off-by: Pieter Praet <pieter@praet.org>
13 years agoemacs: add keybind and function to stash Message-ID without prefix
Pieter Praet [Thu, 30 Jun 2011 08:20:50 +0000 (10:20 +0200)]
emacs: add keybind and function to stash Message-ID without prefix

Add function `notmuch-show-stash-message-id-stripped'
which stashes a Message-ID after ripping off the prefix and quotes,
add bind it to "I" key in `notmuch-show-stash-map'.

Simplifying `notmuch-show-get-message-id' instead might seem better,
but that would require concat'ing in 9 places instead of 1.

Signed-off-by: Pieter Praet <pieter@praet.org>
13 years agoNEWS: mention dtach instead of screen in the description of testing changes
David Bremner [Sat, 12 Nov 2011 15:46:13 +0000 (10:46 -0500)]
NEWS: mention dtach instead of screen in the description of testing changes

This brings NEWS back in line with the actual code.

13 years agoemacs: add invisible space after the search widget field in notmuch-hello
Dmitry Kurochkin [Mon, 4 Jul 2011 06:47:05 +0000 (10:47 +0400)]
emacs: add invisible space after the search widget field in notmuch-hello

It is very convenient when C-e (bound to `widget-end-of-line') ignores
trailing spaces inside the search widget.  But it only does so if a
widget is not followed by a newline (that is why it works in the saved
search widgets).  The patch just adds an invisible space after the
search widget to get the desirable behavior of `widget-end-of-line'.
The extra space is also added to expected results of emacs tests.

13 years agoemacs: Use a single buffer invisibility spec to fix quadratic search cost.
Austin Clements [Wed, 9 Nov 2011 02:55:28 +0000 (21:55 -0500)]
emacs: Use a single buffer invisibility spec to fix quadratic search cost.

Buffer redisplay requires traversing the buffer's invisibility spec
for every part of the display that has an 'invisible text or overlay
property.  Previously, the search buffer's invisibility spec list
contained roughly one entry for each search result.  As a result,
redisplay took O(NM) time where N is the number of visible lines and M
is the total number of results.  On a slow computer, this is enough to
make even buffer motion noticeably slow.  Worse, during a search
operation, redisplay is triggered for each search result (even if
there are no visible buffer changes), so search was quadratic
(O(NM^2)) in the number of search results.

This change switches to using a single element buffer invisibility
spec.  To un-hide authors, instead of removing an entry from the
invisibility spec, it simply removes the invisibility overlay from
those authors.

I tested using a query with 6633 results on a 9 year old machine.
Before this patch, Emacs took 70 seconds to fill the search buffer;
toward the end of the search, Emacs consumed 10-20x as much CPU as
notmuch; and moving point in the buffer took about a second.  With
this patch, the same query takes 40 seconds, Emacs consumes ~3x the
CPU of notmuch by the end, and there's no noticeable lag to moving
point.  (There's still some source of non-linearity, because Emacs and
notmuch consume roughly the same amount of CPU early in the search.)

13 years agosmtp-dummy: clear sockaddr_in structure before use in bind()
Tomi Ollila [Sat, 12 Nov 2011 09:57:22 +0000 (11:57 +0200)]
smtp-dummy: clear sockaddr_in structure before use in bind()

Any junk bytes in sockaddr_in structure before passing that
to bind() system call may cause problems.

13 years agodebian: update build dependency on dtach instead of screen
Jameson Graef Rollins [Fri, 11 Nov 2011 00:17:57 +0000 (16:17 -0800)]
debian: update build dependency on dtach instead of screen

This reflects a modification to the test suite to use dtach instead of
screen.

13 years agodebian: clean up Uploaders and Build-Depends fields in debian/control
Jameson Graef Rollins [Fri, 11 Nov 2011 00:17:56 +0000 (16:17 -0800)]
debian: clean up Uploaders and Build-Depends fields in debian/control

No functional change, but this will make for cleaner diffs down the
line.

13 years agotest: use dtach(1) instead of screen(1) in emacs tests
Tomi Ollila [Fri, 11 Nov 2011 21:33:58 +0000 (23:33 +0200)]
test: use dtach(1) instead of screen(1) in emacs tests

dtach is simpler than screen and is not setuid/setgid program so
TMPDIR does not get cleared by dynamic loader when executed

13 years agoDo not query on notmuch-search exit
Michal Sojka [Sat, 27 Aug 2011 12:38:26 +0000 (14:38 +0200)]
Do not query on notmuch-search exit

Emacs 23.2 queries by default about killing existing processes. This
is annoying when one wants to interrupt long search with 'q' key.
Disable this behavior for notmuch.

13 years agoemacs: remove unused `point-invisible-p' function
Dmitry Kurochkin [Sun, 6 Nov 2011 09:04:01 +0000 (13:04 +0400)]
emacs: remove unused `point-invisible-p' function

`point-invisible-p' does not work correctly when `invisible'
property is a list.  There are standard `invisible-p' and related
functions that should be used instead.

13 years agoemacs: remove no longer used functions from notmuch-show.el
Dmitry Kurochkin [Sun, 6 Nov 2011 09:04:00 +0000 (13:04 +0400)]
emacs: remove no longer used functions from notmuch-show.el

Remove `notmuch-show-move-past-invisible-backward' and
`notmuch-show-move-past-invisible-forward' functions which are
unused.

13 years agoemacs: improve hidden signatures handling in notmuch-show-advance-and-archive
Dmitry Kurochkin [Sun, 6 Nov 2011 09:03:59 +0000 (13:03 +0400)]
emacs: improve hidden signatures handling in notmuch-show-advance-and-archive

Use `previous-single-char-property-change' instead of going
through each character by hand and testing it's visibility.  This
fixes `notmuch-show-advance-and-archive' to work for the last
message in thread with hidden signature.

13 years agotest: `notmuch-show-advance-and-archive' with invisible signature
Dmitry Kurochkin [Sun, 6 Nov 2011 09:03:58 +0000 (13:03 +0400)]
test: `notmuch-show-advance-and-archive' with invisible signature

Add Emacs test to check that `notmuch-show-advance-and-archive'
works for the last message in thread with invisible signature.

13 years agoNEWS: tentative news item about requiring screen to run the test suite.
David Bremner [Sun, 6 Nov 2011 01:10:51 +0000 (22:10 -0300)]
NEWS: tentative news item about requiring screen to run the test suite.

Hopefully this will be fixed before release, but for the moment,
explain to people why their test suite might not be working like it
used to.

13 years agodebian: build-depend on screen.
David Bremner [Sun, 6 Nov 2011 01:08:00 +0000 (22:08 -0300)]
debian: build-depend on screen.

This is needed for emacs tests, now that those are run in screen.

13 years agotest: do not set frame width in emacs
Dmitry Kurochkin [Fri, 1 Jul 2011 04:55:18 +0000 (08:55 +0400)]
test: do not set frame width in emacs

No need for `set-frame-width' in emacs tests since it runs in
screen now.

13 years agotest: avoid using screen(1) configuration files
Dmitry Kurochkin [Fri, 1 Jul 2011 04:55:17 +0000 (08:55 +0400)]
test: avoid using screen(1) configuration files

Set SCREENRC and SYSSCREENRC environment variables to "/dev/null"
as suggested by Jim Paris to avoid potential problems with
screen(1) configuration files.

13 years agotest: run emacs inside screen
Dmitry Kurochkin [Fri, 1 Jul 2011 04:55:16 +0000 (08:55 +0400)]
test: run emacs inside screen

Before the change, emacs run in daemon mode without any visible
buffers.  Turns out that this affects emacs behavior in some
cases.  In particular, `window-end' function returns `point-max'
instead of the last visible position.  That makes it hard or
impossible to implement some tests.  The patch runs emacs in a
detached screen(1) session.  So that it works exactly as if it
has a visible window.

Note: screen terminates when emacs exits.  So the patch does not
introduce new "running processes left behind" issues.

13 years agotest: json show format of message with inline attachment with filename
Dmitry Kurochkin [Fri, 1 Jul 2011 02:03:50 +0000 (06:03 +0400)]
test: json show format of message with inline attachment with filename

The patch adds a test to check that json show format includes
filenames for attachments with inline disposition.

13 years agonotmuch-deliver: update gitignore
Ali Polatel [Mon, 10 Jan 2011 14:59:18 +0000 (16:59 +0200)]
notmuch-deliver: update gitignore

13 years agonotmuch-deliver: Don't read errno inappropriately.
Thomas Schwinge [Wed, 29 Dec 2010 19:35:02 +0000 (20:35 +0100)]
notmuch-deliver: Don't read errno inappropriately.

Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
13 years agonotmuch-deliver: Won't deliver to more than one folder.
Thomas Schwinge [Wed, 29 Dec 2010 19:31:41 +0000 (20:31 +0100)]
notmuch-deliver: Won't deliver to more than one folder.

Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
13 years agonotmuch-deliver: Advance imported files to maildrop-2.5.2 release.
Thomas Schwinge [Wed, 29 Dec 2010 11:14:45 +0000 (12:14 +0100)]
notmuch-deliver: Advance imported files to maildrop-2.5.2 release.

13 years agonotmuch-deliver: Import said files from maildrop-2.2.0 release.
Thomas Schwinge [Wed, 29 Dec 2010 11:02:29 +0000 (12:02 +0100)]
notmuch-deliver: Import said files from maildrop-2.2.0 release.

We won't use all of the included build infrastructure files, but adding them
nevertheless helps to track changes that are applied to them upstream.

Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
13 years agoMove files copied from maildrop to a separate hierarchy.
Thomas Schwinge [Wed, 29 Dec 2010 11:00:30 +0000 (12:00 +0100)]
Move files copied from maildrop to a separate hierarchy.

Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
13 years agoMake it build in a separate build directory.
Thomas Schwinge [Wed, 29 Dec 2010 10:57:53 +0000 (11:57 +0100)]
Make it build in a separate build directory.

Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
13 years agonotmuch-deliver: Add mailmap
Ali Polatel [Wed, 26 May 2010 11:32:27 +0000 (14:32 +0300)]
notmuch-deliver: Add mailmap

13 years agonotmuch-deliver: Fix utter failure
alip [Wed, 26 May 2010 14:27:30 +0000 (14:27 +0000)]
notmuch-deliver: Fix utter failure

13 years agonotmuch-deliver: Use splice() if it's available
Ali Polatel [Wed, 26 May 2010 11:21:15 +0000 (14:21 +0300)]
notmuch-deliver: Use splice() if it's available

NOTMUCH_DELIVER_NO_SPLICE environment variable may be set to fallback to
the read/write method.