]> git.notmuchmail.org Git - notmuch/log
notmuch
14 years agoRELEASING: Add a step to upgrade the version in the "version" file.
Carl Worth [Fri, 16 Apr 2010 17:58:53 +0000 (10:58 -0700)]
RELEASING: Add a step to upgrade the version in the "version" file.

It is annoying to have an extra step here, but it does at least mean
that we are back to just "make release" rather than "make VERSION=X.Y
release".

14 years agoMakefile: Add an explicit version file to the repository.
Carl Worth [Fri, 16 Apr 2010 17:37:32 +0000 (10:37 -0700)]
Makefile: Add an explicit version file to the repository.

We do this so that "git archive" produces a usable tar file without us
having to post-modify it, (since tools like git-buildpackage might not
give us an easy way to hook into the tar-file-creation step).

To support this we also have to change our preference to prefer the
git-described-based version (if available) and only if not available
do we fallback to using what's in the "version" file. Finally, we also
ovverride this preference when releasing, (where what's in the
"version" file wins).

Note that using our Makefile's rule to create a tar file still will
insert the git-based version into the tar file. This is useful for
creating snapshots which will correctly report the git version from
which they were created.

14 years agodebian/changelog: Create an entry for the 0.2 release.
Carl Worth [Fri, 16 Apr 2010 17:24:38 +0000 (10:24 -0700)]
debian/changelog: Create an entry for the 0.2 release.

A (very slightly filtered) version of what already appears in NEWS.

14 years agoRELEASING: Add a (manual!) step to create a debian/changelog entry
Carl Worth [Fri, 16 Apr 2010 17:23:50 +0000 (10:23 -0700)]
RELEASING: Add a (manual!) step to create a debian/changelog entry

I'd like to have this be fully automated in the future, but for now,
it's an extra step.

14 years agodebian: Don't auto-generate debian/changelog.
Carl Worth [Fri, 16 Apr 2010 17:00:11 +0000 (10:00 -0700)]
debian: Don't auto-generate debian/changelog.

David Bremner informs me that shoving everything from the notmuch "git
log" into the debian/changelog is a bit excessive. Instead, we'll
start manually updating this file, (which feels a bit redundant with
NEWS, but perhaps makes us a better Debian-comunity member).

14 years agodebian: Add a gbp.conf to start using git-buildpackage
Carl Worth [Fri, 16 Apr 2010 15:49:09 +0000 (08:49 -0700)]
debian: Add a gbp.conf to start using git-buildpackage

On Bdale Garbee's recommendation I'm switching from gitpkg, (which
constructed a source tree but still required me to go run debuild), to
git-buildpackage. I hadn't originally used git-buildpackage because it
didn't seem to work without a configuration file, (where gitpkg was
fine).

Bdale was kind enough to point me to his fw/altos source at
git.gag.com where I found an example gpb.conf file as well as a target
in debian/rules to automatically update debian/changelog with the new
version number.

14 years agomake release: Don't print the release message on stdout.
Carl Worth [Fri, 16 Apr 2010 15:33:31 +0000 (08:33 -0700)]
make release: Don't print the release message on stdout.

It's just too long for copy/paste, so just let the user know the name
of the file containing the message instead.

14 years agoMakefile: Fix "make release" to print the current release announcement.
Carl Worth [Fri, 16 Apr 2010 15:31:46 +0000 (08:31 -0700)]
Makefile: Fix "make release" to print the current release announcement.

This was accidentally hard-coded to always print the 0.1 NEWS blurb.

14 years agoNEWS: Add release notes for the 0.2 release.
Carl Worth [Fri, 16 Apr 2010 15:28:05 +0000 (08:28 -0700)]
NEWS: Add release notes for the 0.2 release.

14 years agoRevert "notmuch.el: 'F' in search mode takes us to a list of folders."
Carl Worth [Fri, 16 Apr 2010 14:53:10 +0000 (07:53 -0700)]
Revert "notmuch.el: 'F' in search mode takes us to a list of folders."

This reverts commit fbec989fe3272d6eff038369587be076347b96f0.

I only pushed this accidentally. See message
id:871ver6u9r.fsf@yoom.home.cworth.org for the various reasons I
didn't like this patch, (mostly I think the association of 'F' is
wrong).

14 years agonotmuch.c: Shorten version string
Sebastian Spaeth [Fri, 16 Apr 2010 07:06:02 +0000 (09:06 +0200)]
notmuch.c: Shorten version string

We previously output "notmuch version 0.1" as response to notmuch --version.
Shorten this to "notmuch 0.1" as we know that we will receive a version
number when we explicitely ask for it.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
14 years agoemacs: Fix search filtering of a global search ("*")
Carl Worth [Fri, 16 Apr 2010 04:22:57 +0000 (21:22 -0700)]
emacs: Fix search filtering of a global search ("*")

With the recent addition of "*" being a special case for a search
matching all messages, we have to take care when doing a filter
operation. In this case it's not legal to simply append and get:

* and <some-new-search-terms>

Instead we carefully construct a new search string of only:

<some-new-search-terms>

This could all be avoided if we had a parser that could understand
"*" with the meaning we want.

14 years agoTODO: Add two tasks that both have to do with auditing the library API
Carl Worth [Fri, 16 Apr 2010 03:52:27 +0000 (20:52 -0700)]
TODO: Add two tasks that both have to do with auditing the library API

It was noted today in IRC that libnotmuch is not yet careful about
wrapping all Xapian calls with try/catch blocks to print nicer error
messages. It seems it would be natural to audit that at the same time
as doing the symbol-hiding work.

14 years agoRELEASING: Change wording of libnotmuch version instruction
Carl Worth [Fri, 16 Apr 2010 03:50:46 +0000 (20:50 -0700)]
RELEASING: Change wording of libnotmuch version instruction

We actually want this version to be incremented by the commits that
extend the interface. So the release process really is not to just
verify two things (NEWS and libnotmuch version), then run "make
VERSION=x.y release", and send the mail. Quite nice.

14 years agomake release: Enforce a clean source tree before release.
Carl Worth [Fri, 16 Apr 2010 03:03:30 +0000 (20:03 -0700)]
make release: Enforce a clean source tree before release.

Where by clean, we check that no files are known to git to be
modified.

14 years agoRELEASING: Remove a meaningless step from the release process.
Carl Worth [Fri, 16 Apr 2010 02:55:11 +0000 (19:55 -0700)]
RELEASING: Remove a meaningless step from the release process.

The entire "make sure the code you want is in place" thing is part of
a larger release process that we don't document here at all. Instead,
we just focus here on the mechanics of pushing things out once the
larger process has determined the code is ready.

And the fewer steps there are, the better, (for making the
release-process as painless as possible and for avoiding any
mistakes).

14 years agoconfigure: Fix syntax error (spaces in assignment).
Gregor Hoffleit [Thu, 15 Apr 2010 09:51:47 +0000 (11:51 +0200)]
configure: Fix syntax error (spaces in assignment).

Before and after the assignment operator, no spaces are allowed.
I don't know if there are any /bin/sh which allow spaces, but at least
in bash, csh and zsh, the former code was no valid assigment.

14 years agoFix typo in message
Ben Gamari [Sun, 24 Jan 2010 21:23:34 +0000 (16:23 -0500)]
Fix typo in message

14 years agomake release: Provide a kinder message when VERSION is forgotten.
Carl Worth [Fri, 16 Apr 2010 01:40:08 +0000 (18:40 -0700)]
make release: Provide a kinder message when VERSION is forgotten.

I'm unlikely to always remember to pass VERSION=X.Y so it's nice for
make release to remind me.

14 years agoMakefile: Re-order the commands in "make release" slightly.
Carl Worth [Thu, 15 Apr 2010 23:28:13 +0000 (16:28 -0700)]
Makefile: Re-order the commands in "make release" slightly.

We put verify-version as a dependency, not a recursive action to keep
its output clean, (I know that I will always type "make release"
instead of "make VERSION=X.Y release" so I want a nice, neat
reminder).

Also, put the various ssh-based commands together, and after the
build, (so that it doesn't ask for a password/passphrase both before
and after building).

14 years agoMakefile: Simplify the release targets.
Carl Worth [Thu, 15 Apr 2010 23:23:57 +0000 (16:23 -0700)]
Makefile: Simplify the release targets.

Previously, we had a separate release-upload target that a user might
mistake as something useful to call directly, (which would have the
undesired effect or uploading a new package, but without first making
all the checks that we want).

So we eliminate that target, (folding its actions into "make
release"), and we also rename the several release-verify-foo targets
to simply verify-foo. This leaves as the only targets with "release"
in the name as "release" and "release-message". Both of these are
intended for the user to call directly.

14 years agoMakefile.local: Fix typo in comment.
Carl Worth [Thu, 15 Apr 2010 23:17:32 +0000 (16:17 -0700)]
Makefile.local: Fix typo in comment.

Just an extra word that clearly didn't belong.

14 years agoRELEASING: Remove obsolete step about updating micro version number.
Carl Worth [Thu, 15 Apr 2010 23:09:43 +0000 (16:09 -0700)]
RELEASING: Remove obsolete step about updating micro version number.

We've now changed to using "git describe" to automatically report a
version number that changes with every git commit. So we no longer
need to manually update anything in the Makefile during the release
process.

14 years agoMakefile: Make "make release" run the test suite.
Carl Worth [Thu, 15 Apr 2010 23:08:37 +0000 (16:08 -0700)]
Makefile: Make "make release" run the test suite.

This drops one manual step from our release process, (helping
to ensure we don't forget anything during the release).

14 years agomake test: Actually count and report on failures.
Carl Worth [Thu, 15 Apr 2010 22:18:30 +0000 (15:18 -0700)]
make test: Actually count and report on failures.

Hurrah---no more manual verification of that PASS column.

This means that "make test" can actually be a useful part of the
release process now, (since it will exit with non-zero status if there
are any failures).

14 years agotest: Unify all tests to use the pass_if_equal function.
Carl Worth [Thu, 15 Apr 2010 22:09:21 +0000 (15:09 -0700)]
test: Unify all tests to use the pass_if_equal function.

Previously some tests (dump/restore) were doing ad-hoc verification of
values and their own printing of PASS/FAIL, etc. This made it
impossible to count test pass/fail rates in a single place.

The only reason these tests were written that way was because the old
execute_expecting function only worked if one could directly test the
stdout output of a notmuch command. The recent switch to pass_if_equal
means that all tests can use it.

14 years agotest: Align the PASS/FAIL column.
Carl Worth [Thu, 15 Apr 2010 22:06:00 +0000 (15:06 -0700)]
test: Align the PASS/FAIL column.

Just to make things a little more pleasant to look at.

14 years agoMakefile: Add a "make test" target.
Carl Worth [Thu, 15 Apr 2010 21:56:21 +0000 (14:56 -0700)]
Makefile: Add a "make test" target.

I just wasted far too much time looking for a bug that wasn't actually
there only because I hadn't recompiled before running the test
suite. Now we can take advantage of actual dependency information to
force a rebuild for "make test".

14 years agolib: search_threads: Fix nested search to handle original search of "*"
Carl Worth [Thu, 15 Apr 2010 16:15:10 +0000 (09:15 -0700)]
lib: search_threads: Fix nested search to handle original search of "*"

When constructing a thread, we usually run a nested query to find all
messages in the thread that match the original search string. However,
we need to have special-case handling of an original search string of
"*" now that that is a supported means of specifying all messages.

The special-case ends up bein quite simple---we do less work, (just
skipping the nested search since we know that all messages must
match). I had been wanting to write this identical code to more
efficiently handle "notmuch search thread:<foo>" which was previously
running two identical searches. So that case is now more efficient as
well.

14 years agotest: Add a test for "notmuch search '*'"
Carl Worth [Thu, 15 Apr 2010 21:06:10 +0000 (14:06 -0700)]
test: Add a test for "notmuch search '*'"

This feature was added recently and should have gotten a new test at
the time.

As this test demonstrates, the code is broken, ("notmuch search '*'
returns bogus dates of the Unix epoch for any threads where the
term "and" does not appear in any messages).

14 years agotest: Use an older date for the generated messages.
Carl Worth [Thu, 15 Apr 2010 21:09:07 +0000 (14:09 -0700)]
test: Use an older date for the generated messages.

Using a date in the current year makes the test suite fragile since
the search output will include a date of "January 05" for now, but
will start doing "2010-01-05" in the future.

14 years agotest: Remove test-message filenames from generated messages
Carl Worth [Thu, 15 Apr 2010 21:01:54 +0000 (14:01 -0700)]
test: Remove test-message filenames from generated messages

The filenames aren't predictable (including the current directory) nor
stable from one run to the next (including the PID). This makes it
hard to predict the output from a search command that returns such a
message (such as "*").

The original goal was simply to ensure that each generated message was
distinguishable somehow. So just use the message counter instead.

14 years agotest: Disentangle execution of notmuch from the examination of the results.
Carl Worth [Thu, 15 Apr 2010 20:44:00 +0000 (13:44 -0700)]
test: Disentangle execution of notmuch from the examination of the results.

The old execute_expecting function was doing far too much for its own
good.  One of the worst aspects of this was that it introduced
shell-quoting challengers where the caller could not easily control
the precise invocation of the command to be executed.

I personally couldn't find a way to test "notmuch search '*'" without
the shell expanding * against files in the current directory, or
having bogus quotation marks appearing in the search string,
(defeating the recognition of "*" as a special search term).

Hopefully this aspect of the test suite will be much easier to maintain now.

14 years agoTODO: Add some ideas for improving the emacs interface.
Carl Worth [Thu, 15 Apr 2010 20:19:19 +0000 (13:19 -0700)]
TODO: Add some ideas for improving the emacs interface.

One of these is a bad bug I noticed this morning, (archiving messages I had
never read when going through a search of "tag:inbox and tag:to-me" and
hitting space bar).

The other ideas came from recent conversations with Dirk and Eric.

14 years agoTODO: Add some ideas about better search syntax
Carl Worth [Thu, 15 Apr 2010 20:15:27 +0000 (13:15 -0700)]
TODO: Add some ideas about better search syntax

Recent coding around the "*" feature suggests some improvements that
we could make, (some of which might push us into writing a custom
query parser rather than using the one that exists in Xapian).

14 years agoMerge bugfix for test-suite correctness.
Carl Worth [Thu, 15 Apr 2010 00:19:42 +0000 (17:19 -0700)]
Merge bugfix for test-suite correctness.

The test suite was recently broken, and subsequently fixed (at the
commit that introduced the breakage). This merges that fixup commit:

f1776f8b51013bb66eb21e64c8084ddfe73c3a5c

14 years agotest: Fix reply tests to track insignificant change in output.
Carl Worth [Thu, 15 Apr 2010 00:17:50 +0000 (17:17 -0700)]
test: Fix reply tests to track insignificant change in output.

The recent fix to properly decode encoded headers made the expected
output of "notmuch reply" differ by a single space, (previously, there
were two spaces before the References: value and now there is just
one).

Fix the test suite so that these are all noted as correct results
again.

14 years agoMakefile: Fix final linking of notmuch binary for OS X.
Carl Worth [Wed, 14 Apr 2010 23:29:50 +0000 (16:29 -0700)]
Makefile: Fix final linking of notmuch binary for OS X.

Apparently the OS X linker can't resolve symbols when linking a
program (notmuch) against a library (libnotmuch) when the library
depends on another library (libgmime) that the program doesn't depend
on directly.

For this case, we need to link the program directly against both
libraries, but we don't want to do this on Linux, where the linker can
do this on its own and the explicit, unneeded link would cause
problems.

14 years agoMakefile: Add library version information on OS X.
Carl Worth [Wed, 14 Apr 2010 23:18:19 +0000 (16:18 -0700)]
Makefile: Add library version information on OS X.

This encodes the library version into the library, where the linking
binary can pick it up, and the linker can even enforce mismatches in
the minor release, (such as linking a binary against version 1.2 and
then attempting to run it against version 1.1).

14 years agoMakefile: Fix library linking command for OS X
Carl Worth [Wed, 14 Apr 2010 23:16:05 +0000 (16:16 -0700)]
Makefile: Fix library linking command for OS X

I'm not sure which system Aaron used, but on the machine I have access
to, (Darwin 8.11.0), the -shared and -dylib_install_name options are
not recognized. Instead I use -dynamic_lib and -install_name as
documented here:

http://www.finkproject.org/doc/porting/shared.php

14 years agoAdd infrastructure for building shared library on OS X.
Aaron Ecay [Sun, 11 Apr 2010 23:44:53 +0000 (19:44 -0400)]
Add infrastructure for building shared library on OS X.

This patch adds a configure check for OS X (actually Darwin),
and sets up the Makefiles to build a proper shared library on
that platform.

Signed-off-by: Aaron Ecay <aaronecay@gmail.com>
14 years agoMakefile: Move compat sources from the client code to the library.
Carl Worth [Wed, 14 Apr 2010 23:03:18 +0000 (16:03 -0700)]
Makefile: Move compat sources from the client code to the library.

Since the library code needs these as well.

14 years agoAdd simplistic reimplementation of strcasestr to compat library
Dirk Hohndel [Tue, 13 Apr 2010 16:47:48 +0000 (09:47 -0700)]
Add simplistic reimplementation of strcasestr to compat library

While all systems that I have access to support strcasestr, it is
in fact not part of POSIX. So here's a fallback reimplementation
based on POSIX functions.

Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
Tested-by: Tomas Carnecky <tom@dbservice.com> (on OpenSolaris snv_134)
14 years agoMakefile: Move include of Makefile.config up from Makefile.local
Carl Worth [Wed, 14 Apr 2010 18:32:26 +0000 (11:32 -0700)]
Makefile: Move include of Makefile.config up from Makefile.local

The recent change to include sub-directory Makefile.local files
before the top-level Makefile.local means that we need to include
the Makefile.config before those. So move it up from Makefile.local
to Makefile.

14 years agoFix up Makefile for build.
Aaron Ecay [Sun, 11 Apr 2010 23:44:52 +0000 (19:44 -0400)]
Fix up Makefile for build.

Must set extra_c(xx)flags before including subdir Makefile.local's,
so that there is a blank slate that the subdirs can add on to.

Must include subdir Makefile.local's before global one, otherwise
the compat sources are not added to the list of those to be
compiled.

Signed-off-by: Aaron Ecay <aaronecay@gmail.com>
14 years agoUse C++ compiler to link notmuch binaries
Aaron Ecay [Sun, 11 Apr 2010 23:44:51 +0000 (19:44 -0400)]
Use C++ compiler to link notmuch binaries

Since the binaries contain C++ code, it is necessary to use the C++
linker, or errors result on some platforms (OS X).

Signed-off-by: Aaron Ecay <aaronecay@gmail.com>
14 years agoClean up code duplication in adding or removing tag by region.
Jesse Rosenthal [Tue, 13 Apr 2010 18:47:19 +0000 (14:47 -0400)]
Clean up code duplication in adding or removing tag by region.

Clean up code duplication, as per Carl's suggestion, by making
notmuch-search-{add/remove}-tag-thread a special case of the -region
commands, where the region in question is between (point) and (point).

14 years agoFix bug in adding or removing tag by region.
Jesse Rosenthal [Tue, 13 Apr 2010 18:47:19 +0000 (14:47 -0400)]
Fix bug in adding or removing tag by region.

There was a bug in notmuch-search-{add,remove}-tag-region, which would
not behave correctly if the region went beyond the last message. Now,
instead of simply iterating to the last line of the region, these
functions will iterate to the minimum of the last line of the region
and the last possible line, i.e.

(- (line-number-at-pos (point-max)) 2)

Tested-by: Carl Worth <cworth@cworth.org> Note that the old, buggy
behavior included infinite loops of emacs lisp code, so the new
behavior is significantly better than that.

14 years agoTODO: Capture some recent ideas expressed on the mailing list.
Carl Worth [Tue, 13 Apr 2010 17:10:37 +0000 (10:10 -0700)]
TODO: Capture some recent ideas expressed on the mailing list.

There's a potential simplification of notmuch-reply.c and some emacs
improvements that might require extending message-mode to a
notmuch-message-mode.

14 years agoDecode headers in reply
Michal Sojka [Wed, 3 Mar 2010 07:50:56 +0000 (08:50 +0100)]
Decode headers in reply

When headers contain non-ASCII characters, they are encoded according
to rfc2047. Nomtuch reply command emits the headers in the encoded
form, which makes them hard to read by humans who compose the reply.

For example instead of "Subject: Re: Rozlučka" one currently sees
"Subject: Re: =?iso-8859-2?q?Rozlu=E8ka?=".

This patch adds a new GMime filter which is used to decode headers to
UTF-8 and uses this filter when notmuch reply outputs headers.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
14 years agonotmuch.el: quote args in notmuch-show to facilitate remote use
Jesse Rosenthal [Sun, 24 Jan 2010 20:22:33 +0000 (15:22 -0500)]
notmuch.el: quote args in notmuch-show to facilitate remote use

Put single-quotes around the argument of the `show --entire-thread' command
in notmuch-show. This change should have no effect on normal usage.
However, it allows us to use the notmuch.el client with a remote notmuch
binary and database over ssh (by, e.g., setting `notmuch-command' to a
simple shell script). Without the quotes, ssh will not send the command
properly.

One very simple example script is as follows. (Note that it requires
keypair login to the ssh server.)

        #!/bin/sh

        SSH_BIN="/path/to/local/ssh"
        NOTMUCH_HOST="my.remote.server"
        NOTMUCH_REMOTE_PATH="/path/to/remote/notmuch"

        $SSH_BIN $NOTMUCH_HOST $NOTMUCH_REMOTE_PATH $@

14 years agoTODO: Note GMime bug that needs to be tested and upstreamed.
Carl Worth [Tue, 13 Apr 2010 15:50:44 +0000 (08:50 -0700)]
TODO: Note GMime bug that needs to be tested and upstreamed.

This bug was recently noted in a commit message, so we should hold
onto it until we've passed it along to the GMime project.

14 years agoDo not segfault on empty mime parts
martin f. krafft [Tue, 2 Mar 2010 15:31:28 +0000 (16:31 +0100)]
Do not segfault on empty mime parts

notmuch previously unconditionally checked mime parts for various
properties, but not for NULL, which is the case if libgmime encounters
an empty mime part.

Upon encounter of an empty mime part, the following is printed to
stderr (the second line due to my patch):

  (process:17197): gmime-CRITICAL **: g_mime_message_get_mime_part: assertion `GMIME_IS_MESSAGE (message)' failed
  Warning: Not indexing empty mime part.

This is probably a bug that should get addressed in libgmime, but for
not, my patch is an acceptable workaround.

Signed-off-by: martin f. krafft <madduck@madduck.net>
14 years agoPrevent data loss caused by SIGINT during notmuch new
Michal Sojka [Tue, 30 Mar 2010 08:23:23 +0000 (10:23 +0200)]
Prevent data loss caused by SIGINT during notmuch new

When Ctrl-C is pressed in a wrong time during notmuch new, it can lead
to removal of messages from the database even if the files were not
removed.

It happened at least once to me.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
14 years agoFix typo in notmuch.h documentation regarding database open modes
Michael Forney [Fri, 26 Mar 2010 18:39:17 +0000 (18:39 +0000)]
Fix typo in notmuch.h documentation regarding database open modes

Reviewed-by: Carl Worth <cworth@cworth.org>:
The original proposal for having different open modes used the name
WRITABLE. I didn't like that name, (easy to misspell as WRITEABLE even
for native English speakers). So we renamed it to READ_WRITE
immediately, but apparently some of the documentation held the old
name for a while.

14 years agoTODO: Make an explicit note that we need to start testing --format=json
Carl Worth [Tue, 13 Apr 2010 15:33:58 +0000 (08:33 -0700)]
TODO: Make an explicit note that we need to start testing --format=json

The recent fix to handle utf8 in the JSON output is the kind of bug
I'd never like to see again, (so that I'd like the test suite to be
helping us track that).

14 years agoFix json_quote_str to handle non-ASCII characters
Gregor Hoffleit [Thu, 4 Mar 2010 10:40:03 +0000 (11:40 +0100)]
Fix json_quote_str to handle non-ASCII characters

The current code in json_quote_str() only accepts strict printable ASCII
code points (i.e. 32-127), all other code points are dropped from the
JSON output. The code is attempting to drop only non-printable ASCII
characters, but doing a signed comparison of the byte value is also
dropping characters with values >= 128.

This patch uses an unsigned comparison to accept code points 32-255.

Reviewed-by: Carl Worth <cworth@cworth.org> (with some additional
details for commit message).

14 years agoTODO: Note several changes we want to make to the database schema.
Carl Worth [Tue, 13 Apr 2010 15:09:12 +0000 (08:09 -0700)]
TODO: Note several changes we want to make to the database schema.

Since database upgrades can be fairly painful, we'll want to do all of
these within a single release.

14 years agolib: Remove condition regarding a NULL parent_thread_id.
Carl Worth [Mon, 12 Apr 2010 22:54:03 +0000 (15:54 -0700)]
lib: Remove condition regarding a NULL parent_thread_id.

A recent change guaranteed that a message ID can never be resolved
to a NULL thread ID, so we don't need this extra case.

14 years agolib: Always add reference terms to the database.
Carl Worth [Mon, 12 Apr 2010 22:45:40 +0000 (15:45 -0700)]
lib: Always add reference terms to the database.

Previously, we were only adding the reference terms for cases where
the referenced message did not yet exist in the database. For thread
presentation, it's useful to have the connection information provided
by the references, even when the messages are present. So add this
term unconditionally.

14 years agolib: Document the metadata stored within the Xapian database.
Carl Worth [Mon, 12 Apr 2010 22:15:14 +0000 (15:15 -0700)]
lib: Document the metadata stored within the Xapian database.

We are currently storing "version", "last_thread_id", and
"thread_id_*" values so document how each of these are used.

14 years agolib: Fix line-wrapping in _notmuch_database_link_message.
Carl Worth [Mon, 12 Apr 2010 21:41:34 +0000 (14:41 -0700)]
lib: Fix line-wrapping in _notmuch_database_link_message.

This function had some excessively long lines due to nested
expressions. It's simple enough to un-nest these and have readable
line lengths.

14 years agolib: Fix internal documentation of _notmuch_database_link_message
Carl Worth [Mon, 12 Apr 2010 21:35:25 +0000 (14:35 -0700)]
lib: Fix internal documentation of _notmuch_database_link_message

This function was recently modified, (to include a metadata lookup for
a message's thread ID before looking for parent/child thread IDs), but
the documentation wasn't updated. Fix that.

14 years agolib: Simplify code flow in _resolve_message_id_to_thread_id
Carl Worth [Mon, 12 Apr 2010 21:29:36 +0000 (14:29 -0700)]
lib: Simplify code flow in _resolve_message_id_to_thread_id

There are two primary cases in this function, (the message exists in
the database or it does not). Previously the code for these two cases
was split and intermingled with goto-spaghetti connections.

14 years agolib: Fix internal documentation of _resolve_message_id_to_thread_id
Carl Worth [Mon, 12 Apr 2010 21:19:15 +0000 (14:19 -0700)]
lib: Fix internal documentation of _resolve_message_id_to_thread_id

We no longer return NULL, but instead generate a new thread ID for
messages that we haven't seen yet.

14 years agoStore thread ids for messages that we haven't seen yet
James Westby [Sat, 13 Mar 2010 21:27:57 +0000 (16:27 -0500)]
Store thread ids for messages that we haven't seen yet

This allows us to thread messages even when we receive them out of
order, or never receive the root.

The thread ids for messages that aren't present but are referred to are
stored as metadata in the database and then retrieved if we ever get
that message.

When determining the thread id for a message we also check for this
metadata so that we can thread descendants of a message together before
we receive it.

Edited by Carl Worth <cworth@cworth.org>: Split this portion of the
commit from the earlier-applied portion adding test cases.

14 years agotest: Add new tests for out-of-order messages.
James Westby [Sat, 13 Mar 2010 21:27:57 +0000 (16:27 -0500)]
test: Add new tests for out-of-order messages.

These new tests demonstrate a bug as follows:

  Multiple messages are added to the database

  All of these message references a common parent

  The parent message does not exist in the databas

In this scenario, the messages will not be recognized as belonging to
the same thread. We consider this a bug, and the new tests treat this
as a failure.

Edited by Carl Worth <cworth@cworth.org>: Split these tests into their
own commit (before the fix of the bug). This lets me see the actual
failure in the test suite, before the fix is applied. Also fix the
alignment of new messages from test suite, (so that the PASS portions
all line up---which is important while we're still manually verifying
test-suite results).

14 years agoRELEASING: Update instructions for new version technique.
Carl Worth [Sat, 10 Apr 2010 02:12:36 +0000 (19:12 -0700)]
RELEASING: Update instructions for new version technique.

We pass this in on the "make release" command-line rather than editing
the Makefile.

14 years agoDerive version numbers from git
Michal Sojka [Thu, 8 Apr 2010 11:49:22 +0000 (13:49 +0200)]
Derive version numbers from git

I often have several versions of notmuch compiled and it would be very
helpful to be able to distinguish between them. Git has a very nice
feature to make intermediate numbering automatic and unambiguous so
let's use it here.

For tagged versions, the version is the name of the tag, for
intermediate versions, the unique ID of the commit is appended to the
tag name.

When notmuch is compiled from a release tarball, there is no git
repository and therefore the tarball contains a special file 'version',
which contains the version of release tarball.

To create a new release one has to run 'make release VERSION=X.Y'.

14 years agonomtuch.1: Add documentation for "notmuch count"
Carl Worth [Fri, 9 Apr 2010 23:57:07 +0000 (16:57 -0700)]
nomtuch.1: Add documentation for "notmuch count"

Somehow this has been missing from our manual. Add it now.

14 years agonotmuch count: Remove unneeded paragraph from documentation.
Carl Worth [Fri, 9 Apr 2010 23:56:34 +0000 (16:56 -0700)]
notmuch count: Remove unneeded paragraph from documentation.

This paragraph acts like it's introducing an example, but then no
example is given. Just drop this.

14 years agonotmuch count: Remove special handling of "*".
Carl Worth [Fri, 9 Apr 2010 23:49:58 +0000 (16:49 -0700)]
notmuch count: Remove special handling of "*".

From both the implementation and from the documentation. This is
handled generically in the library for all search-based commands,
so count doesn't need special treatment.

14 years agonotmuch: Document the new special-case syntax of "*".
Carl Worth [Fri, 9 Apr 2010 23:49:20 +0000 (16:49 -0700)]
notmuch: Document the new special-case syntax of "*".

This functionality came through a recent addition to the library.

14 years agolib: Handle "*" as a query string to match all messages.
Carl Worth [Fri, 9 Apr 2010 23:40:31 +0000 (16:40 -0700)]
lib: Handle "*" as a query string to match all messages.

This seems like a generally useful thing to support, (but the previous
support through an empty string was not convenient for some users,
(such as the command-line client).

14 years agoHave notmuch count default to showing the total.
Mike Kelly [Thu, 8 Apr 2010 19:39:38 +0000 (15:39 -0400)]
Have notmuch count default to showing the total.

If no parameters are given to notmuch-count, or just '' or '*' are
given, return the total number of messages in the database.

update notmuch count help

14 years agoFix the default value for --includedir.
Mike Kelly [Wed, 7 Apr 2010 15:48:31 +0000 (11:48 -0400)]
Fix the default value for --includedir.

14 years agodebian: Unbreak the build.
Carl Worth [Wed, 7 Apr 2010 23:00:20 +0000 (16:00 -0700)]
debian: Unbreak the build.

I had the wrong syntax for the dh_auto_configure override.

14 years agoFix code extracting the MTA from Received: headers
Dirk Hohndel [Wed, 7 Apr 2010 20:38:29 +0000 (13:38 -0700)]
Fix code extracting the MTA from Received: headers

The previous code made too many assumptions about the (sadly not
standardized) format of the Received headers. This version should
be more robust to deal with different variations.

Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
14 years agoemacs: Correct the documentation for notmuch-search-add-tag (and -remove-tag)
Carl Worth [Wed, 7 Apr 2010 20:15:27 +0000 (13:15 -0700)]
emacs: Correct the documentation for notmuch-search-add-tag (and -remove-tag)

These commands act on all messages in the thread, not simply those
that match the search. (There are use case for both behaviors, but the
documentation must match the behavior that's actually implemented).

14 years agonotmuch.el: add functionality in notmuch search mode to add or remove tags by region
Jesse Rosenthal [Wed, 17 Feb 2010 00:07:40 +0000 (19:07 -0500)]
notmuch.el: add functionality in notmuch search mode to add or remove tags by region

This patch adds `-region' versions of the `notmuch-search-' commands to find
properties. It also splits up  `notmuch-add/remove-tags' into both a
`-thread' and a `-region' version. (This makes us modify
`notmuch-search-archive-thread' to use the
`notmuch-search-remove-tag-thread' function, instead of
`notmuch-search-remove-tag', for consistency.) The add/remove-tag command
called by pressing `+' or `-' will then choose accordingly, based on whether
region is active.

This version fixes a couple of errors in the first version, which led to
incorrect marking of some tags in the search view (though the actual
tagging was still correct). It's also based on current master.

I'm not sure any more if region selection is actually the correct way to
do this, or if a mutt-style message-marking method would be better. But
I didn't want a buggy incorrect version out there.

14 years agoDisplay the last few lines of a citation by default.
Carl Worth [Wed, 7 Apr 2010 19:15:08 +0000 (12:15 -0700)]
Display the last few lines of a citation by default.

As put forth in the commit that enabled this functionality, the last
few lines of a citation are often much more important. In that case,
let's actually do the useful thing by default.

14 years agonotmuch.el: Allow citation suffixes to be shown as well as prefixes.
David Edmondson [Wed, 17 Feb 2010 10:51:51 +0000 (10:51 +0000)]
notmuch.el: Allow citation suffixes to be shown as well as prefixes.

In many conversations the last few lines of a citation are more
interesting than the first few lines, hence allow those to be shown if
desired.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
14 years agonotmuch.el: Colour cited regions and signatures with message-cited-text-face
David Edmondson [Mon, 15 Feb 2010 15:56:15 +0000 (16:56 +0100)]
notmuch.el: Colour cited regions and signatures with message-cited-text-face

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> (with fixup to
               avoid over-eager coloring of signatures).

14 years agonotmuch.el: colorize lines in notmuch-search based on thread tags.
Jameson Rollins [Thu, 4 Feb 2010 12:07:26 +0000 (07:07 -0500)]
notmuch.el: colorize lines in notmuch-search based on thread tags.

Arbitrary font faces can be specified for given thread tags.  By
default, no coloring is applied.  To specify coloring, place something
like this in your .emacs:

(setq notmuch-search-line-faces '(("delete" . '(:foreground "red"))
                                  ("unread" . '(:foreground "green"))))

Order matters: line faces listed first will take precedence (in the
example above, a thread tagged both "delete" and "unread" will be
colored red, since the "delete" face is listed before the "unread").
 notmuch.el |   33 ++++++++++++++++++++++++++++++++-
 1 files changed, 32 insertions(+), 1 deletions(-)

14 years agoemacs: Fix typo in line-wrapping in documentation of notmuch-show.
Carl Worth [Wed, 7 Apr 2010 17:40:29 +0000 (10:40 -0700)]
emacs: Fix typo in line-wrapping in documentation of notmuch-show.

Just trying to keep things neat.

14 years agonotmuch.el: Make notmuch-show buffer name first subject, instead of thread-id (supers...
Jesse Rosenthal [Sat, 6 Mar 2010 14:20:21 +0000 (09:20 -0500)]
notmuch.el: Make notmuch-show buffer name first subject, instead of thread-id (supersedes V1--3)

Change the buffer name to a uniquified subject of the thread (i.e. the
subject of the first message in the thread) instead of the thread-id. This
is more meaningful to the user, and will make it easier to scroll through
numerous open buffers.

Note that this patch adds an optional `buffer-name' argument to notmuch
show.

Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
14 years agonotmuch.el: 'F' in search mode takes us to a list of folders.
David Edmondson [Thu, 11 Feb 2010 11:59:43 +0000 (11:59 +0000)]
notmuch.el: 'F' in search mode takes us to a list of folders.

14 years agonotmuch.el: fontify date in header
Jameson Rollins [Fri, 22 Jan 2010 15:45:53 +0000 (10:45 -0500)]
notmuch.el: fontify date in header

The date was unfairly left out of getting pretty colors in the
notmuch-show header display.  This fixes that grave injustice.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
14 years agoMakefile: Install emacs code to site-lisp, not site-lisp/notmuch
Carl Worth [Wed, 7 Apr 2010 17:07:23 +0000 (10:07 -0700)]
Makefile: Install emacs code to site-lisp, not site-lisp/notmuch

And just make the Debian packaging request site-lisp/notmuch like it
wants. Otherwise, the installed files won't appear on the load-path
so won't be found by emacs.

14 years agonotmuch-reply: Remove stray brace.
Carl Worth [Wed, 7 Apr 2010 14:17:12 +0000 (07:17 -0700)]
notmuch-reply: Remove stray brace.

That was breaking the build.

14 years agofix obvious cut and paste error
Dirk Hohndel [Tue, 6 Apr 2010 22:36:25 +0000 (15:36 -0700)]
fix obvious cut and paste error

the wrong variable is checked for success of an allocation

Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
14 years agoTODO: Note that "notmuch reply" needs to be tested.
Carl Worth [Wed, 7 Apr 2010 01:54:48 +0000 (18:54 -0700)]
TODO: Note that "notmuch reply" needs to be tested.

This is a feature that we just added without a test case.

14 years agonotmuch-reply: Remove a useless level of nesting.
Carl Worth [Wed, 7 Apr 2010 01:50:22 +0000 (18:50 -0700)]
notmuch-reply: Remove a useless level of nesting.

Making the code a tiny bit easier to read (in my opinion at least).

14 years agonotmuch-reply: Fix some whitespace issues.
Carl Worth [Wed, 7 Apr 2010 01:49:25 +0000 (18:49 -0700)]
notmuch-reply: Fix some whitespace issues.

No actual code change here. Just whitespace style, (mostly just my
preferred space before a left parenthesis, and a space after a comma).

14 years agoguess From address from Received headers
Dirk Hohndel [Tue, 6 Apr 2010 19:45:57 +0000 (12:45 -0700)]
guess From address from Received headers

When replying to a message notmuch tries to pick the correct From
 address by looking which one of a user's configured email addresses
 were included in To or Cc headers of the email that is being replied to.
 If none of the users email addresses are in the To or Cc headers we now
 try to guess from the first (chronologically, last) Received header
 which domain this email was received in and therefore which of the
 email addresses to use in a reply
 If that fails we still use the primary email as From email

Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
14 years agofix notmuch_message_file_get_header
Dirk Hohndel [Tue, 6 Apr 2010 19:45:30 +0000 (12:45 -0700)]
fix notmuch_message_file_get_header

fix notmuch_message_file_get_header to always return the first instance
 of the header you are looking for

Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
14 years agoMerge branch 'debian'
Carl Worth [Wed, 7 Apr 2010 01:44:12 +0000 (18:44 -0700)]
Merge branch 'debian'

These are the changes made between the notmuch 0.1 release and the
release of Debian version 0.1-1. It's mostly changes to the debian
directory, of course, but does also include some generally useful
Makefile improvements.

14 years agodebian: Add a watch file. debian-0.1-1
Carl Worth [Wed, 7 Apr 2010 01:27:22 +0000 (18:27 -0700)]
debian: Add a watch file.

To help people pester me in the case of uploading a new upstream
release without a corresponding Debian package.

14 years agoAvoid needlessly linking final notmuch binary against libXapian.
Carl Worth [Wed, 7 Apr 2010 01:20:20 +0000 (18:20 -0700)]
Avoid needlessly linking final notmuch binary against libXapian.

The libnotmuch.so library already does, so we don't need to do
it again. (Thanks to a Debian debhelper warning for pointing this
out.)

14 years agodebian: Modify each package description slightly.
Carl Worth [Wed, 7 Apr 2010 01:16:04 +0000 (18:16 -0700)]
debian: Modify each package description slightly.

This avoids a lintian complaint about several packages with identical
package descriptions.