notmuch.git
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.

14 years agoman: Fix several occurences of hyphen intended to be minus.
Carl Worth [Wed, 7 Apr 2010 01:13:33 +0000 (18:13 -0700)]
man: Fix several occurences of hyphen intended to be minus.

With man pages we have to be careful or commands may not function
after copy-and-paste.

14 years agodebian: Update standards version to 3.8.4.
Carl Worth [Wed, 7 Apr 2010 01:07:58 +0000 (18:07 -0700)]
debian: Update standards version to 3.8.4.

No changes needed.

14 years agodebian: Split into multiple packages.
Carl Worth [Wed, 7 Apr 2010 00:53:48 +0000 (17:53 -0700)]
debian: Split into multiple packages.

The library goes into libnotmuch1 and the headers into libnotmuch-dev.

14 years agodebian: Fix Vcs-Browser link
Carl Worth [Wed, 7 Apr 2010 00:53:04 +0000 (17:53 -0700)]
debian: Fix Vcs-Browser link

We're doing debian packaging in the primary repository now.

14 years agodebian: Don't try compiling emacs bytecode for emacs < 21
Carl Worth [Tue, 6 Apr 2010 23:44:33 +0000 (16:44 -0700)]
debian: Don't try compiling emacs bytecode for emacs < 21

It just doesn't work.

14 years agodebian: Fix broken symlinking of emacs lisp files.
Carl Worth [Tue, 6 Apr 2010 23:28:01 +0000 (16:28 -0700)]
debian: Fix broken symlinking of emacs lisp files.

This broke when we changed from a single notmuch.el file
to multiple notmuch-foo.el files.

14 years agoInstall emacs lisp files into a notmuch sub-directory of site-lisp.
Carl Worth [Tue, 6 Apr 2010 22:05:13 +0000 (15:05 -0700)]
Install emacs lisp files into a notmuch sub-directory of site-lisp.

Now that we have multiple emacs-lisp source files, it's just more
polite this way.

14 years agoMakefile: Add a disctclean target (simply calling clean)
Carl Worth [Tue, 6 Apr 2010 21:18:05 +0000 (14:18 -0700)]
Makefile: Add a disctclean target (simply calling clean)

We currently don't distribute anything that's not already in git, so
there's no difference between these two targets, (but debhelper wants
to be able to call distclean).

14 years agoUpdate Debian package version to 0.1-1.
Carl Worth [Tue, 6 Apr 2010 21:09:31 +0000 (14:09 -0700)]
Update Debian package version to 0.1-1.

To make a Debian package for the recent 0.1 release of notmuch.

14 years agoconfigure: Ignore more options that debhelper expects.
Carl Worth [Tue, 6 Apr 2010 20:04:08 +0000 (13:04 -0700)]
configure: Ignore more options that debhelper expects.

These include:

--infodir=DIR
--localstatedir=DIR
--libexecdir=DIR
--disable-maintainer-mode
--disable-dependency-tracking

14 years agoconfigure: Add a --sysconfdir option.
Carl Worth [Tue, 6 Apr 2010 19:53:02 +0000 (12:53 -0700)]
configure: Add a --sysconfdir option.

Which means that the bash completion script will now install
to ${prefix}/etc by default (unless configured with --syconfdir=/etc)
which is probably the right thing to do.

14 years agoconfigure: Add support for a --mandir option
Carl Worth [Tue, 6 Apr 2010 19:47:16 +0000 (12:47 -0700)]
configure: Add support for a --mandir option

Again, nothing tricky here.

14 years agoconfigure: Add support for a --includedir option
Carl Worth [Tue, 6 Apr 2010 19:41:54 +0000 (12:41 -0700)]
configure: Add support for a --includedir option

Very similar to the existing --libdir option.

14 years agoconfigure: Avoid printing '.' at the end of error message.
Carl Worth [Tue, 6 Apr 2010 19:40:38 +0000 (12:40 -0700)]
configure: Avoid printing '.' at the end of error message.

Since we're emitting the user's input back, let's leave it pristine
and not confuse the issue by adding a final period.

14 years agoconfigure: Add stub support for --build=<cpu>-<vendor>-<host> option.
Carl Worth [Tue, 6 Apr 2010 19:39:29 +0000 (12:39 -0700)]
configure: Add stub support for --build=<cpu>-<vendor>-<host> option.

I'm not sure that this option would actually be useful for anything,
but debhelper at least expects our configure script to support it. So
we'll accept it and ignore it.

14 years agopackaging: Add a pointer to where the debian packaging really is.
Carl Worth [Tue, 6 Apr 2010 18:28:24 +0000 (11:28 -0700)]
packaging: Add a pointer to where the debian packaging really is.

Most anyone familiar with debian should know to look for the top-level
debian directory, but since we do have a "packaging" directory, I
thought it should at least mention the debian stuff rather than just
containing the fedora spec file.

14 years agoMerge branch 'debian' into rebuild
Carl Worth [Tue, 6 Apr 2010 21:38:04 +0000 (14:38 -0700)]
Merge branch 'debian' into rebuild

Conflicts:

  Makefile.local: The Makefiles were all recently re-written on
  master, but I did ensure that the changes from the
  debian branch were all implemented here, (in
  particular, installing the emacs files from "make
  install").

  configure: I've reverted one change as part of this merge:

commit 9f99a301b158dc1ed1c8c6754db1d57e3b0becf4

Remove ./configure failure for unrecognized options

     I'd much rather find what options the Debian scripts pass
     and either implement them or at least make the explicitly
     do nothing. One of the things that often annoyed me about
     gnu autoconf-generated configure scripts was the silent
     ignoring of unknown options, (which was very unhelpful in
     the case of mistyped options on the command line).

14 years agoMove "config" test programs to "compat".
Carl Worth [Tue, 6 Apr 2010 18:12:10 +0000 (11:12 -0700)]
Move "config" test programs to "compat".

It makes sense to me to have the little tests for functionality right
next to the comptability implementations of that same functionality.

But also, this means I can now tab-complete ./configure from the three
initial characters (rather than the seven required previously).

14 years agoMakefile: Move the completion-specific commands to completion/Makefile.local
Carl Worth [Tue, 6 Apr 2010 18:02:09 +0000 (11:02 -0700)]
Makefile: Move the completion-specific commands to completion/Makefile.local

For much better modularity.

14 years agoRename the "contrib" directory to "completion".
Carl Worth [Tue, 6 Apr 2010 17:48:21 +0000 (10:48 -0700)]
Rename the "contrib" directory to "completion".

The original "contrib" name is lousy. Everything in notmuch has been
contributed, and we are integrating as much of it as possible, (rather
than making users grub through contrib looking for useful pieces to
install).

Meanwhile, the only things we have in contrib are command-line
completion scripts, so "completion" makes more sense as a name, (and
helps make "./configure" slightly less ambiguous).

14 years ago.gitignore: Ignore the releases directory.
Carl Worth [Tue, 6 Apr 2010 17:43:36 +0000 (10:43 -0700)]
.gitignore: Ignore the releases directory.

The "make release" target creates this directory, but it's nothing
I'll ever want to add to the git repository.

14 years agoMakefile: Eliminate the separate install-bash and install-zsh targets.
Carl Worth [Tue, 6 Apr 2010 17:40:45 +0000 (10:40 -0700)]
Makefile: Eliminate the separate install-bash and install-zsh targets.

Again, simplifying the interface to the Makefile. Installing these
files doesn't require bash nor zsh to actually be installed, so there's
little harm in just installing them unconditionally.

14 years agoMakefile: Eliminate the "make install-emacs" target.
Carl Worth [Tue, 6 Apr 2010 17:35:20 +0000 (10:35 -0700)]
Makefile: Eliminate the "make install-emacs" target.

Instead, simply byte-compile the emacs source files as part of "make"
and install them as part of "make install". The byte compilation is
made conditional on the configure script finding the emacs binary.
That way, "make; make install" will still work for someone that doesn't
have emacs installed, (which was the only reason we had made a separate
"make install-emacs" target in the first place).

14 years agoMakefiles: Eliminate the useless quiet_* functions.
Carl Worth [Tue, 6 Apr 2010 17:00:30 +0000 (10:00 -0700)]
Makefiles: Eliminate the useless quiet_* functions.

With the original quiet function, there's an actual purpose (hiding
excessively long compiler command lines so that warnings and errors
from the compiler can be seen).

But with things like quiet_symlink there's nothing quieter. In fact
"SYMLINK" is longer than "ln -sf". So all this is doing is hiding the
actual command from the user for no real benefit.

The only actual reason we implemented the quiet_* functions was to be
able to neatly right-align the command name and left-align the arguments.

Let's give up on that, and just left-align everything, simplifying the
Makefiles considerably. Now, the only instances of a captialized command
name in the output is if there's some actually shortening of the command
itself.

14 years agomake release: Add "what's new" and "what is notmuch" sections to announcement
Carl Worth [Tue, 6 Apr 2010 00:24:20 +0000 (17:24 -0700)]
make release: Add "what's new" and "what is notmuch" sections to announcement

For other projects I release, there's a bunch of manual effort in
cosntructing the final release-announcement email. That's silly.
So automate this by extracting the appropirate text from NEWS and
by including a canned piece of the content from README.

14 years agoMakefile: Print template for release announcement.
Carl Worth [Mon, 5 Apr 2010 23:37:44 +0000 (16:37 -0700)]
Makefile: Print template for release announcement.

At the end of "make release" or at any point later with
"make release-message".

14 years agoMakefile: Make the "make release" target push the new tag.
Carl Worth [Mon, 5 Apr 2010 22:56:23 +0000 (15:56 -0700)]
Makefile: Make the "make release" target push the new tag.

Otherwise I'm sure I'll always forget to push it.

14 years agoMerge commit '0.1'
Carl Worth [Mon, 5 Apr 2010 22:54:17 +0000 (15:54 -0700)]
Merge commit '0.1'

This is a merge of the few changes I made to release 0.1
retroactively, (after having incremented the version to 0.1.1).

Conflicts:
Makefile.local (renamed NOTMUCH_VERSION to VERSION)

14 years agoMakefile: Finish implementing the "make release" target. 0.1
Carl Worth [Mon, 5 Apr 2010 22:43:51 +0000 (15:43 -0700)]
Makefile: Finish implementing the "make release" target.

And hopefully it actually works.

14 years agoMakefile: Start implementing a "make release" target.
Carl Worth [Mon, 5 Apr 2010 22:26:08 +0000 (15:26 -0700)]
Makefile: Start implementing a "make release" target.

So far just doing checks that the version is sane and that no release
of the same version already exists.

14 years agoNEWS: Add some (brief) news items for the initial 0.1 release.
Carl Worth [Mon, 5 Apr 2010 22:01:27 +0000 (15:01 -0700)]
NEWS: Add some (brief) news items for the initial 0.1 release.

Generally, the NEWS items will describe changes since the previous
release. But there's not much we can do for that since we've never had
a release before.

14 years agoRELEASING: Add this file describing the steps to make a release.
Carl Worth [Mon, 5 Apr 2010 22:00:37 +0000 (15:00 -0700)]
RELEASING: Add this file describing the steps to make a release.

These steps might be changing a bit as we work on making the initial
0.1 release.

14 years agoIncrement version to 0.1.1
Carl Worth [Mon, 5 Apr 2010 21:25:06 +0000 (14:25 -0700)]
Increment version to 0.1.1

After publishing the first notmuch release (0.1) to
http://notmuchmail.org/releases .