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

11 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.

11 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.

11 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.

11 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).

11 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.

11 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'.

11 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.

11 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.

11 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.

11 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.

11 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).

11 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

11 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.

11 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.

11 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>
11 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).

11 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.

11 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.

11 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>
11 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).

11 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(-)

11 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.

11 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>
11 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.

11 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>
11 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.

11 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.

11 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>
11 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.

11 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).

11 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).

11 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>
11 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>
11 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.

11 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.

11 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.)

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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).

11 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.

11 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

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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).

11 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).

11 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.

11 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).

11 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.

11 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.

11 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).

11 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.

11 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.

11 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".

11 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.

11 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)

11 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.

11 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.

11 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.

11 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.

11 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 .

11 years agoMakefile: Add a dist target.
Carl Worth [Mon, 5 Apr 2010 21:22:00 +0000 (14:22 -0700)]
Makefile: Add a dist target.

To create a versioned tar file for release.

11 years agoMakfiles: Make the top-level targets PHONY
Carl Worth [Mon, 5 Apr 2010 19:59:06 +0000 (12:59 -0700)]
Makfiles: Make the top-level targets PHONY

Just to avoid any clash with files of the same names.

11 years agonotmuch-query.el: new file to support access to the notmuch database.
David Bremner [Mon, 5 Apr 2010 16:46:16 +0000 (13:46 -0300)]
notmuch-query.el: new file to support access to the notmuch database.

Initially this file provides one main function
notmuch-query-get-threads, which takes a set of search terms, and
returns a parsed set of matching threads as a lisp data structure.

A set of notmuch-query-map-* functions are provided to help map
functions over the data structure.

The function notmuch-query-get-message-ids uses this machinery to get
the set of message-ids matching a query.

Edited-by: Carl Worth <cworth@cworth.org>: Change comment syntax,
(";;" rather than ";" to make emacs-lisp mode happy), and eliminate
some excess whitespace, as suggested by David Edmonson.

11 years agonotmuch: Correctly terminate text/* parts in JSON output
David Edmondson [Mon, 5 Apr 2010 09:33:19 +0000 (10:33 +0100)]
notmuch: Correctly terminate text/* parts in JSON output

Text parts returned by `g_mime_stream_mem_get_byte_array()' are not
NULL terminated strings - add `json_quote_chararray()' to handle them
correctly.

11 years agogit: Ignore `notmuch-shared'
David Edmondson [Thu, 1 Apr 2010 17:36:21 +0000 (18:36 +0100)]
git: Ignore `notmuch-shared'

11 years agoemacs: Move notmuch-show functionality to notmuch-show.el
David Edmondson [Thu, 1 Apr 2010 17:36:21 +0000 (18:36 +0100)]
emacs: Move notmuch-show functionality to notmuch-show.el

To ease the transition to a JSON based implementation of
`notmuch-show', move the current implementation into a separate file.

Create `notmuch-lib.el' to hold common variables.

11 years agoTODO: Add notes on removing "notmuch part" and "notmuch search-tags".
Carl Worth [Sat, 3 Apr 2010 19:42:03 +0000 (12:42 -0700)]
TODO: Add notes on removing "notmuch part" and "notmuch search-tags".

Both of these ideas were recently discussed on the mailing list.

11 years agoemacs: Fix "free variable" warning for notmuch-folder-show-empty.
Carl Worth [Sat, 3 Apr 2010 19:22:14 +0000 (12:22 -0700)]
emacs: Fix "free variable" warning for notmuch-folder-show-empty.

Emacs really wants us to defvar each variable before assigning to it,
(which gives us a place to document the variable as well).

11 years agoemacs/notmuch.el: Improve tag highlighting in search mode
David Edmondson [Tue, 23 Mar 2010 07:04:34 +0000 (07:04 +0000)]
emacs/notmuch.el: Improve tag highlighting in search mode

Assume that tags never include an opening bracket, and hence improve
the regular expression used to highlight them. This avoids false
matches where the 'from' address of a thread participant includes an
opening bracket.

11 years agoMakefile.local: Automatically use makefile mode
David Edmondson [Sun, 21 Mar 2010 09:54:08 +0000 (09:54 +0000)]
Makefile.local: Automatically use makefile mode

We add a magic line to the beginning of each Makefile.local file to
help the editor know that it should use makefile mode for editing the
file, (even though the filename isn't exactly "Makefile").

Edited-by: Carl Worth <cworth@cworth.org>: Expand treatment from
emacs/Makefile.local to each instance of Makefile.local.

11 years agoMakefile: Add the emacs directory to load-path when compiling
David Edmondson [Thu, 1 Apr 2010 10:38:30 +0000 (11:38 +0100)]
Makefile: Add the emacs directory to load-path when compiling

Reviewed-by: Carl Worth <cworth@cworth.org>: Presumably, this is to
enable proper building in the very near-term future where the emacs
implementation consists of multiple files where some will `require'
functions from others.

11 years agoMerge remote branch 'dme/dme-for-cworth'
Carl Worth [Fri, 2 Apr 2010 22:40:13 +0000 (15:40 -0700)]
Merge remote branch 'dme/dme-for-cworth'

Conflicts:
notmuch.c (Simply the change in documentation indentation level).

11 years agoMakefile: Only print the "make install" hint after the first build.
Carl Worth [Fri, 2 Apr 2010 21:06:32 +0000 (14:06 -0700)]
Makefile: Only print the "make install" hint after the first build.

It was getting quite annoying to see this big block of text on every
little build, (but I didn't want to get rid of it for any new users).
This seems to strike the right balance.

11 years agonotmuch help: Eliminate a gratuitous level of indentation.
Carl Worth [Fri, 2 Apr 2010 19:26:31 +0000 (12:26 -0700)]
notmuch help: Eliminate a gratuitous level of indentation.

I don't really know why we ended up having everything indented by two
tabs, (perhaps trying to make it match the man page)? But wihout any
containing context to justify that it just looks odd.

11 years agonotmuch help: Simplify output by omitting arguments for each command.
Carl Worth [Fri, 2 Apr 2010 19:12:18 +0000 (12:12 -0700)]
notmuch help: Simplify output by omitting arguments for each command.

The output was far too busy otherwise. It's more useful to just
show the argument list in the case of "notmuch help <command>"
for a specific command.

(Credit due to running "git help" and seeing a much more readable
list than what was coming out of "notmuch help".)

11 years agonotmuch: Add a version (0.1 initially) with a new --version option.
Carl Worth [Fri, 2 Apr 2010 18:55:09 +0000 (11:55 -0700)]
notmuch: Add a version (0.1 initially) with a new --version option.

We're planning to do actual releases soon, so we need a version
number to put into the tar file.

11 years agonotmuch: Add support for a --help option.
Carl Worth [Fri, 2 Apr 2010 18:53:22 +0000 (11:53 -0700)]
notmuch: Add support for a --help option.

Previously, only "notmuch help" worked while a call to "notmuch --help"
would just print a message telling the user to call "notmuch help".
Instead of the redirection, just support --help directly now.

11 years agonotmuch: Add a 'part' subcommand
David Edmondson [Wed, 24 Mar 2010 07:21:20 +0000 (07:21 +0000)]
notmuch: Add a 'part' subcommand

A new 'part' subcommand allows the user to extract a single part from
a MIME message. Usage:
  notmuch part --part=<n> <search terms>
The search terms must match only a single message
(e.g. id:foo@bar.com). The part number specified refers to the part
identifiers output by `notmuch show'. The content of the part is
written the stdout with no formatting or identification marks. It is
not JSON formatted.

11 years agonotmuch-show: Add unix and relative dates to the JSON output
David Edmondson [Tue, 23 Mar 2010 09:40:48 +0000 (09:40 +0000)]
notmuch-show: Add unix and relative dates to the JSON output

Include a 'date_unix' and 'date_relative' field in the JSON output for
each message. 'date_relative' can be used by a UI implementation,
whereas 'date_unix' is useful when scripting.

11 years agoCompile a static notmuch binary (but only install the shared version)
Carl Worth [Thu, 1 Apr 2010 22:03:40 +0000 (15:03 -0700)]
Compile a static notmuch binary (but only install the shared version)

The idea here is to allow a new user of notmuch to be able to run
notmuch immediately after compiling, (without having to install
the shared library first). This also ensures that the test suite
tests the locally compiled library, and not whatever installled
version of the library the dynamic linker happens to find.

11 years agoSetup the GMimeStream only when needed
nstraz@redhat.com [Thu, 1 Apr 2010 13:47:21 +0000 (09:47 -0400)]
Setup the GMimeStream only when needed

I ran into this while looking at the vim plugin.  Vim's system() call
redirects output to a file and it was missing many of the part{ lines.

If stream_stdout is setup too early, it will overwrite the part start
when notmuch is redirected to a file.

Reviewed-by Carl Worth <cworth@cworth.org>: GMime is calling fseek
before every write to reset the FILE* to the position it believes is
correct based on the writes it has seen. Our code was getting
incorrect results because our GMime writes were interleaved with
non-GMime writes via printf.

The bug appears when writing to a file because it's seekable, but not
when writing to a pipe which is not.

11 years agoMakefile: Create include directory when installing headers
Michal Sojka [Thu, 1 Apr 2010 11:47:45 +0000 (13:47 +0200)]
Makefile: Create include directory when installing headers

When I wanted to create a debian package from the current master, make
install failed because of non-existent include directory. This patch
fixes this minor issue.

11 years agolib: Switch to a 3-part version number for the library interface.
Carl Worth [Thu, 1 Apr 2010 07:41:25 +0000 (00:41 -0700)]
lib: Switch to a 3-part version number for the library interface.

With a carefully documented description of how to increment the
various version components.

11 years agoMakefiles: Align the columns of output.
Carl Worth [Thu, 1 Apr 2010 07:07:08 +0000 (00:07 -0700)]
Makefiles: Align the columns of output.

Much better.

11 years agoMakefiles: Make the install rules quiet like the compilation rules.
Carl Worth [Thu, 1 Apr 2010 06:54:21 +0000 (23:54 -0700)]
Makefiles: Make the install rules quiet like the compilation rules.

The output from make is looking better all the time, (though the
columns still aren't lined up).

11 years agoMakefile: Fix to print CFLAGS with "make V=0"
Carl Worth [Thu, 1 Apr 2010 06:32:35 +0000 (23:32 -0700)]
Makefile: Fix to print CFLAGS with "make V=0"

The default "make" would be quite quiet, but still conveniently print
the CFLAGS. The explicit "make V=0" was intended to be identical, (only
not printing the message about V=1 but was broken in that it left the
CFLAGS off). Fix this.

11 years agoMakefiles: Eliminate shell for loops in rule definitions.
Carl Worth [Thu, 1 Apr 2010 05:59:30 +0000 (22:59 -0700)]
Makefiles: Eliminate shell for loops in rule definitions.

These just made the output look so ugly, and weren't actually making
the rule definitions any simpler. Good riddance.

11 years agoMove installation of library from top-level to lib/Makefile.local
Carl Worth [Thu, 1 Apr 2010 05:47:12 +0000 (22:47 -0700)]
Move installation of library from top-level to lib/Makefile.local

We had a fairly ugly violation of modularity with the top-level
Makefile.local isntalling everything, (even when the build commands
for the library were down in lib/Makefile.local).

11 years agoMakefile.config: Avoid pre-expanding the ${prefix} variable.
Carl Worth [Thu, 1 Apr 2010 05:41:02 +0000 (22:41 -0700)]
Makefile.config: Avoid pre-expanding the ${prefix} variable.

One of the supproted mechanisms we offer for configuration is
manually editing the Makefile.config file after it is generated
by the configure script. In this case it would be nice to be able
to change prefix only once, so allow that.