]> git.notmuchmail.org Git - notmuch/log
14 years agovim: use notmuch show --entire-thread
Bart Trojanowski [Sat, 28 Nov 2009 02:49:40 +0000 (21:49 -0500)]
vim: use notmuch show --entire-thread

14 years agonotmuch show: limit display to only matching messages
Bart Trojanowski [Sat, 28 Nov 2009 02:49:39 +0000 (21:49 -0500)]
notmuch show: limit display to only matching messages

This patch changes the default behaviour of notmuch show to display only
messages that match the search expression.  However, --entire-thread
option is provided to display all messages in threads that matched the
search expression.

It is deemed that will be more useful for human users on the command line.
Scripts can be modified to include the --entire-thread option so that they
can display all messages once more.


$ notmuch search subject:git AND thread:23d99d0f364f93e90e15df8b42eddb5b
thread:23d99d0f364f93e90e15df8b42eddb5b      July 31 [4/12] Johan Herland; [RFCv2 00/12] Foreign VCS helper program for CVS repositories (inbox unread)

Note that in this thread 4 out of 12 messages matched.  The default show
behaviour is to show only those messages that match:

$ notmuch show subject:git AND thread:23d99d0f364f93e90e15df8b42eddb5b | grep 'message{' | wc -l

With the --entire-thread option the output will contain all dozen

$ notmuch show --entire-thread subject:git AND thread:23d99d0f364f93e90e15df8b42eddb5b | grep 'message{' | wc -l

Signed-off-by: Bart Trojanowski <bart@jukie.net>
14 years agoconfigure: Allow user to specify compiler to be used.
Carl Worth [Wed, 2 Dec 2009 02:33:23 +0000 (18:33 -0800)]
configure: Allow user to specify compiler to be used.

The environment variables CC and CXX can be set at configure time to
specify what compiler to use. This compiler will be used for any
configure-time compilation, and will also be recorded in
Makefile.config to be used during the actual build.

The compiler to be used can still be overridden at build time by using
a make variable such as:

make CC=gcc

14 years agoconfigure: Generate more friendly Makefile.config with separated CFLAGS
Carl Worth [Wed, 2 Dec 2009 02:25:17 +0000 (18:25 -0800)]
configure: Generate more friendly Makefile.config with separated CFLAGS

Each dependency now gets its own variable in the resulting
Makefile.config to make it much easier to debug where the various
flags came from in the case of any problems.

14 years agoconfigure: Clarify pkg-config warning now that Makefile does not invoke pkg-config.
Carl Worth [Wed, 2 Dec 2009 02:13:43 +0000 (18:13 -0800)]
configure: Clarify pkg-config warning now that Makefile does not invoke pkg-config.

It's probably a bit more work to use this configure script without
pkg-config, but it's at least possible, (and we could make it even
easier if this becomes an important use case).

14 years agoconfigure: Generate some documentation into Makefile.config.
Carl Worth [Wed, 2 Dec 2009 02:09:47 +0000 (18:09 -0800)]
configure: Generate some documentation into Makefile.config.

It's just not nice to auto-generate a file without helping out the
poor user who gets stuck trying to figure out what went wrong.

14 years agoconfigure: Resolve all pkg-config flags at configure time.
Carl Worth [Wed, 2 Dec 2009 01:56:39 +0000 (17:56 -0800)]
configure: Resolve all pkg-config flags at configure time.

Previously, we were resolving these within the Makefile. This had
the problem that if pkg-config was not present, the Makefile would
still invoke it resulting in ugly errors before the configure script
was even run, (which would finally present a kind error message about
pkg-config not being present).

14 years agoconfigure: Move getlinetest.c down into config/have_getline.c.
Carl Worth [Wed, 2 Dec 2009 00:56:39 +0000 (16:56 -0800)]
configure: Move getlinetest.c down into config/have_getline.c.

This keeps configure-related clutter out of the main directory, and
also gives a more direct correlation between the name of the test and
the feature being tested for.

14 years agogetdelim: Silence a (bogus) compiler warning.
Carl Worth [Wed, 2 Dec 2009 00:46:21 +0000 (16:46 -0800)]
getdelim: Silence a (bogus) compiler warning.

Some compilers complain that result might be used uninitialized in
this function. I believe such compilers simply aren't looking hard
enough, but it's easy enough to silence them.

14 years agoMakefile: Split warnings into two sets (WARN_CFLAGS and WARN_CXXFLAGS)
Carl Worth [Wed, 2 Dec 2009 00:42:50 +0000 (16:42 -0800)]
Makefile: Split warnings into two sets (WARN_CFLAGS and WARN_CXXFLAGS)

Some C++ compilers complain about -Wmissing-declarations not being
valid, so avoid passing it except when compiling a C file.

14 years agoMakefile: Switch from echo to printf for better portability.
Carl Worth [Wed, 2 Dec 2009 00:38:47 +0000 (16:38 -0800)]
Makefile: Switch from echo to printf for better portability.

Some systems have an echo implementation which doesn't know how to
interpret a sequence of "\n". The word is that printf should be much
more portable, so let's try that instead.

14 years agoconfigure: Assimilate new getlinetest into recent configure conventions.
Carl Worth [Wed, 2 Dec 2009 00:00:31 +0000 (16:00 -0800)]
configure: Assimilate new getlinetest into recent configure conventions.

We're now using printf to print what we're checking before we check. We're
also making variables such as HAVE_GETLINE available to both make and to
the C pre-processor.

With this, the local getline implementation is now only compiled if not
available on the system.

14 years agoAdd test to configure script to detect getline
Jeffrey C. Ollie [Mon, 23 Nov 2009 18:14:15 +0000 (12:14 -0600)]
Add test to configure script to detect getline

Add a simple test to the configure script to detect getline.  It's not
important that the test run, just that it compiles and links without
any errors.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
14 years agoconfigure: Fix valgrind check to take effect, and to work.
Carl Worth [Tue, 1 Dec 2009 23:52:44 +0000 (15:52 -0800)]
configure: Fix valgrind check to take effect, and to work.

We were missing an "override" directive in the assignment of CFLAGS
within Makefile.config so it was actually having no effect. Then, we
were also failing to get the proper include path for valgrind.h so
it wouldn't have worked even it were having effect. Fix both problems.

14 years agoMakefile: Incorporate getline implementation into the build.
Carl Worth [Tue, 1 Dec 2009 23:23:25 +0000 (15:23 -0800)]
Makefile: Incorporate getline implementation into the build.

It's unconditional for a very short time. We expect to soon be
building it only if necessary.

14 years agocompat/getdelim: Silence a warning about mixing of signed/unsigned.
Carl Worth [Tue, 1 Dec 2009 22:12:01 +0000 (14:12 -0800)]
compat/getdelim: Silence a warning about mixing of signed/unsigned.

If the length is ever so large as to overflow, then we'll end up
returning a negative value (which indicates an error anyway).

14 years agocompat: Change includes from config.h to compat.h.
Carl Worth [Tue, 1 Dec 2009 22:09:12 +0000 (14:09 -0800)]
compat: Change includes from config.h to compat.h.

We may switch to using an autoconf-like config.h, but we're not doing
that just yet.

14 years agocompat: Add implementation of getline from gnulib.
Carl Worth [Tue, 1 Dec 2009 22:06:41 +0000 (14:06 -0800)]
compat: Add implementation of getline from gnulib.

These were copied from the gnulib git repository as of:

commit 563c779682040ed4b89c9b4bbe428dcd8157c90a

They come under the GNU GPL v3 (or later) exactly as notmuch is

14 years agoxutil: Implement xstrndup without relying on strndup.
Carl Worth [Tue, 1 Dec 2009 20:51:39 +0000 (12:51 -0800)]
xutil: Implement xstrndup without relying on strndup.

Since we need to do this for portability, (some systems don't have a
strndup function), we might as well do it unconditionally. There's
almost no disadvantage to doing so, and this has the advantages of not
requiring a configure-time check nor having two different
implementations, one of which would often be less tested.

14 years agolib/index: Fix memory leak for email addresses without names.
Carl Worth [Tue, 1 Dec 2009 20:40:13 +0000 (12:40 -0800)]
lib/index: Fix memory leak for email addresses without names.

We carefully noted the fact that we had locally allocated the string
here, but then we neglected to free it. Switch to talloc instead
which makes it easier to get the behavior we want. It's simpler since
we can just call talloc_free unconditionally, without having to track
the state of whether we allocated the storage for name or not.

14 years agoconfigure: Use printf to achieve result of "echo -n".
Carl Worth [Tue, 1 Dec 2009 19:39:30 +0000 (11:39 -0800)]
configure: Use printf to achieve result of "echo -n".

We had avoided using "echo -n" originally for portability concerns,
and instead just printed the same string in both conditions, (and
also printed the string late if any check took long). The word is
that printf is quite portable, so we use that instead.

14 years agoMakefile: Add new "install-bash" target for bash completion support
Carl Worth [Tue, 1 Dec 2009 18:14:00 +0000 (10:14 -0800)]
Makefile: Add new "install-bash" target for bash completion support

It was problematic to have this in "make install" since it would
unconditionally try to install to /etc, (even if a non-privileged user
was attempting an install to a prefix in the user's home directory,
for example).

14 years agoconfigure: Fix pkg-config warning to not refer to non-existent variables.
Carl Worth [Tue, 1 Dec 2009 18:07:14 +0000 (10:07 -0800)]
configure: Fix pkg-config warning to not refer to non-existent variables.

We used to have NOTMUCH_CFLAGS and NOTMUCH_LDFLAGS in the Makefile, but
we don't anymore, so don't refer to them.

14 years agoconfigure: Clean up the introductory message a bit.
Carl Worth [Tue, 1 Dec 2009 16:40:45 +0000 (08:40 -0800)]
configure: Clean up the introductory message a bit.

Eliminate a typo or two, and mention that the user can edit
Makefile.config if necessary.

14 years agoRemove Makefile.config from the repository.
Carl Worth [Tue, 1 Dec 2009 16:34:09 +0000 (08:34 -0800)]
Remove Makefile.config from the repository.

Instead of shipping a default version, we now add a rule to automatically
run configure if necessary to create Makefile.config.

14 years agonotmuch setup: Exit if EOF is encountered at any prompt.
Carl Worth [Tue, 1 Dec 2009 16:06:09 +0000 (08:06 -0800)]
notmuch setup: Exit if EOF is encountered at any prompt.

If the user is explicitly providing EOF, then terminating the program
is the most likely desired thing to do. This also avoids undefined
behavior from continuing with an uninitialized response after ignoring
the return value of getline().

14 years agoAvoid compiler warnings due to ignored write return values
Dirk-Jan C. Binnema [Mon, 23 Nov 2009 06:03:35 +0000 (08:03 +0200)]
Avoid compiler warnings due to ignored write return values

Glibc (at least) provides the warn_unused_result attribute on write,
(if optimizing and _FORTIFY_SOURCE is defined). So we explicitly
ignore the return value in our signal handler, where we couldn't do
anything anyway.

Compile with:


before this commit to see the warning.

14 years agonotmuch.el: Make 'x' and 'X' in show-mode archive the current thread.
Carl Worth [Tue, 1 Dec 2009 07:21:04 +0000 (23:21 -0800)]
notmuch.el: Make 'x' and 'X' in show-mode archive the current thread.

This makes these keys different than 'q' in this mode, (where 'x'
and 'q' are identical in all of the other modes currently).

The idea here is to make it easier to do non-linear reading of messages,
(such as when poking in to read just one or two threads from a search
result that returned many threads).

14 years agonotmuch.el: Use let to avoid assigning to a free variable.
Carl Worth [Tue, 1 Dec 2009 07:14:11 +0000 (23:14 -0800)]
notmuch.el: Use let to avoid assigning to a free variable.

The dynamic scoping of emacs lisp is such that we never want to assign
to any variable unless it's something we've defined with `defvar' or
else something we're using locally via `let'.

14 years agonotmuch.el: Avoid warning about referencing free variable `button'.
Carl Worth [Tue, 1 Dec 2009 07:09:08 +0000 (23:09 -0800)]
notmuch.el: Avoid warning about referencing free variable `button'.

I'm not even sure how the previous code worked at all---it seems
clear it was supposed to be using `cite-button' rather than `button'.

14 years agonotmuch.el: Avoid calling next/previous-line non-interactively.
Carl Worth [Tue, 1 Dec 2009 07:05:32 +0000 (23:05 -0800)]
notmuch.el: Avoid calling next/previous-line non-interactively.

Emacs always complains if we use these from lisp code.

14 years agonotmuch.el: Make notmuch-help use a full-screen window.
Carl Worth [Tue, 1 Dec 2009 07:02:10 +0000 (23:02 -0800)]
notmuch.el: Make notmuch-help use a full-screen window.

Our documentation is long enough that I think it will be more useful
to use an entire window for it (which is easily dismissed with 'q').
This is also kinder for a user not well-initiated with emacs, for
whom the multi-window help can be confusing.

14 years agonotmuch.el: Make documentation of notmuch-search-mode dynamic.
Carl Worth [Tue, 1 Dec 2009 06:47:10 +0000 (22:47 -0800)]
notmuch.el: Make documentation of notmuch-search-mode dynamic.

Previously, we had some hard-coded keybindings mentioned in the
introductory paragraphs of the documentation for notmuch-search-mode.
Now, we take advantage of the substitute-command-keys functionality to
produce the same text by default, but to dynamically generate the
correct text in the face of the user customizing the keybindings.

14 years agonotmuch.el: Clean up documentation of notmuch-folder-mode-map commands.
Carl Worth [Tue, 1 Dec 2009 06:43:14 +0000 (22:43 -0800)]
notmuch.el: Clean up documentation of notmuch-folder-mode-map commands.

Again, ensuring we have standalone first-line documentation strings,
and overriding builtin commands to add our own documentation strings
to them.

14 years agonotmuch.el: Clean up documentation of notmuch-show-mode-map commands.
Carl Worth [Tue, 1 Dec 2009 06:24:05 +0000 (22:24 -0800)]
notmuch.el: Clean up documentation of notmuch-show-mode-map commands.

As we did recently for notmuch-search-mode-map, ensure that the first
line of docuemntation for each command stands alone.

We also take advantage of the substitute-command-keys functionality
within notmuch-help so that the introductory paragraphs can talk
about key bindings by key (rather than function name) in a way that
will always be current even in the face of the user rebinding keys.

14 years agonotmuch.el: Fix notmuch-help to properly display prefixed bindings.
Carl Worth [Tue, 1 Dec 2009 05:46:55 +0000 (21:46 -0800)]
notmuch.el: Fix notmuch-help to properly display prefixed bindings.

Previously, we would do only a single-level traverse of the keymap.
That meant that for a keybinding such as "M-TAB" we would just see
the prefix key ("ESC") and print that it was a keymap---never printing
the TAB nor the documentation for the command it is bound to.

Now, we do the full walk, constructing a proper description of the
full keybdinding with prefix characters, (and converting "ESC" to
"M-" for legibility).

14 years agonotmuch.el: Clean up documentation of notmuch-search-mode-map commands.
Carl Worth [Tue, 1 Dec 2009 00:52:31 +0000 (16:52 -0800)]
notmuch.el: Clean up documentation of notmuch-search-mode-map commands.

Since notmuch-help now displays a single line of documentation from
each of these commands we ensure that the first line stands alone for
each command.

We also override some builtin commands with new commands that don't
behave any differently, but have our own notmuch-specific
documentation, (such as "select next thread" rather than "move point
to next line").

14 years agonotmuch.el: Fix notmuch-search-goto-last-thread.
Carl Worth [Tue, 1 Dec 2009 00:50:52 +0000 (16:50 -0800)]
notmuch.el: Fix notmuch-search-goto-last-thread.

This broke when we switched to filter-based processing of search
results and added the "End of search results" line onto the end. Fix
to skip ignore that line when moving to the last thread.

14 years agonotmuch.el: Fix notmuch-search-scroll-down to go to first thread.
Carl Worth [Tue, 1 Dec 2009 00:48:19 +0000 (16:48 -0800)]
notmuch.el: Fix notmuch-search-scroll-down to go to first thread.

When there's no more to scroll, we want to select the first thread.

This used to work, and I'm not sure when it broke, (perhaps when we
switched from post-process decorating of the search results to
filtering). Fix the calculation to work again.

14 years agonotmuch.el: Don't document mouse actions in notmuch-help.
Carl Worth [Tue, 1 Dec 2009 00:44:05 +0000 (16:44 -0800)]
notmuch.el: Don't document mouse actions in notmuch-help.

The concept behind direct manipulation with mouse clicks is that
documentation shouldn't be necessary, (though my original motivation
here was simply that "<mouse-1>" was exceeding my TAB width.

This does cause a blank line to be added for the mouse binding. This
isn't directly desired, but as long as it's there we put it at a
natural place for a separator.

14 years agonotmuch.el: Reorder notmuch-search-mode keybindings map.
Carl Worth [Tue, 1 Dec 2009 00:02:27 +0000 (16:02 -0800)]
notmuch.el: Reorder notmuch-search-mode keybindings map.

I had originally created this keymap in order from most important to
least important commands. But our new notmuch-help command is
presented with the list in the reverse order. So we reverse the input
so that the user sees the most important commands first.

14 years agonotmuch.el: Implement our own notmuch-help instead of describe-mode.
Carl Worth [Mon, 30 Nov 2009 17:53:38 +0000 (09:53 -0800)]
notmuch.el: Implement our own notmuch-help instead of describe-mode.

This gives somewhat friendlier output for the '?' binding than we had
previously with `describe-mode'. First, we no longer have the various
minor modes cluttering up the output. Second the display of the
binding table uses the first line of documentation for the bound
function rather than the function name.

14 years agonotmuch.el: Add documentation for notmuch-search-show-thread.
Carl Worth [Mon, 30 Nov 2009 17:49:53 +0000 (09:49 -0800)]
notmuch.el: Add documentation for notmuch-search-show-thread.

It's especially unkind to leave interactive functions without

14 years agonotmuch.el: Don't use beginning-of-buffer from elisp program.
Carl Worth [Mon, 30 Nov 2009 17:48:15 +0000 (09:48 -0800)]
notmuch.el: Don't use beginning-of-buffer from elisp program.

This silences a warning when compiling notmuch.el. The documentation
of beginning-of-buffer does say (rather emphatically) that it's not
to be used from lisp programs.

14 years agoDocumentation for notmuch reply --format=(default|headers-only)
Jed Brown [Sat, 28 Nov 2009 17:56:15 +0000 (18:56 +0100)]
Documentation for notmuch reply --format=(default|headers-only)

Signed-off-by: Jed Brown <jed@59A2.org>
14 years agoMore portable and easier to read regex in notmuch-search-operate-all
Jed Brown [Sat, 28 Nov 2009 19:51:13 +0000 (20:51 +0100)]
More portable and easier to read regex in notmuch-search-operate-all

The former one worked in but not in 23.1.1.

Signed-off-by: Jed Brown <jed@59A2.org>
Tested-by: Keith Packard <keithp@keithp.com>
14 years agoAvoid bogus internal error reporting duplicate In-Reply-To IDs.
Carl Worth [Sat, 28 Nov 2009 18:01:22 +0000 (10:01 -0800)]
Avoid bogus internal error reporting duplicate In-Reply-To IDs.

This error was tirggered with a debugging build via:


and reported by David Bremner. The actual error is that I'm an
idiot that doesn't know how to use strcmp's return value. Of
course, the strcmp interface scores a negative 7 on Rusty Russell
ranking of bad interfaces:


14 years agoAdjust autoload comments
Keith Amidon [Fri, 27 Nov 2009 13:30:08 +0000 (05:30 -0800)]
Adjust autoload comments

The previous location of autoload comments didn't seem to correspond
with the functions most likely to be the entry points for using
notmuch.  This change adjusts them to match those likely entry points.

14 years agonotmuch.el: Add face support to search mode
Aneesh Kumar K.V [Sat, 28 Nov 2009 06:07:05 +0000 (11:37 +0530)]
notmuch.el: Add face support to search mode

This patch use notmuch-tag-face showing tags in the notmuch-search-mode.

We can selectively highlight each tag by setting notmuch-tag-face-alist as below

(defface notmuch-tag-unread-face
 '((((class color)) (:foreground "goldenrod")))
  "Notmuch search mode face used to highligh tags.")

(defface notmuch-tag-inbox-face
 '((((class color)) (:foreground "red")))
  "Notmuch search mode face used to highligh tags.")

(setq notmuch-tag-face-alist '(("unread" . 'notmuch-tag-unread-face)
       ("inbox" . 'notmuch-tag-inbox-face)))
(require 'notmuch)

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
14 years agoSend mail to notmuch list, not Carl
Alec Berryman [Sat, 28 Nov 2009 06:07:54 +0000 (00:07 -0600)]
Send mail to notmuch list, not Carl

14 years agonotmuch-new: Check for non-fatal errors from stat()
Chris Wilson [Fri, 27 Nov 2009 13:50:11 +0000 (13:50 +0000)]
notmuch-new: Check for non-fatal errors from stat()

Currently we assume that all errors on stat() a dname is fatal (but
continue anyway and report the error at the end). However, some errors
reported by stat() such as a missing file or insufficient privilege,
we can simply ignore and skip the file. For the others, such as a fault
(unlikely!) or out-of-memory, we handle like the other fatal errors by
jumping to the end.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
14 years agoKey binding rearrangement for save attachments in show mode
Keith Amidon [Fri, 27 Nov 2009 13:30:15 +0000 (05:30 -0800)]
Key binding rearrangement for save attachments in show mode

The most obvious bindings for save attachments are already taken.  The
existing 'w' binding was bound to view the raw message.  This commit
moves it to 'V' which still seems somewhat mnemonic and uses 'w' for
save (write) attachments.

14 years agoProvide ability to save attachments
Keith Amidon [Fri, 27 Nov 2009 13:30:14 +0000 (05:30 -0800)]
Provide ability to save attachments

Previously the only way to save an attachment was to attempt to view
it and then save it from within the viewer program.

14 years agoForward individual messages using message-forward
Keith Amidon [Fri, 27 Nov 2009 13:30:11 +0000 (05:30 -0800)]
Forward individual messages using message-forward

Sometimes forwarding a message is preferable to replying and modifying
the set of recipients.  This commit provides that ability using the
message-forward function.

14 years agoFactor out message buffer mgmt from notmuch-show-view-all-mime-parts
Keith Amidon [Fri, 27 Nov 2009 13:30:10 +0000 (05:30 -0800)]
Factor out message buffer mgmt from notmuch-show-view-all-mime-parts

The ability to temporarily create a buffer containing only the
contents of the currently selected message in notmuch show mode is
generally useful.  This commit factors the majority of the code
required to do so out of notmuch-show-view-all-mime-parts into a macro
called with-current-notmuch-show-message and rewrites the original
function in terms of the macro.

A future set of commits will provide additional functionality using
the macro as well.

14 years agoAdd key binding for notmuch-search in show-mode
Keith Amidon [Fri, 27 Nov 2009 13:30:09 +0000 (05:30 -0800)]
Add key binding for notmuch-search in show-mode

It's not uncommon to want to start a search as a result of something
read in a message so this is convenient.

14 years agonotmuch.el: Use message-mode font-face to highlight mail headers
Aneesh Kumar K.V [Fri, 27 Nov 2009 10:14:13 +0000 (15:44 +0530)]
notmuch.el: Use message-mode font-face to highlight mail headers

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
14 years agocorrect message flag enum value so that it matches the type
Bart Trojanowski [Sat, 28 Nov 2009 02:20:09 +0000 (21:20 -0500)]
correct message flag enum value so that it matches the type

As per Carl's request, this patch corrects the only value defined under
the notmuch_message_flag_t enum typedef to match the name of the type.

Signed-off-by: Bart Trojanowski <bart@jukie.net>
14 years agoAdd some very rudimentary support for handling html parts
Alexander Botero-Lowry [Wed, 25 Nov 2009 09:13:33 +0000 (01:13 -0800)]
Add some very rudimentary support for handling html parts

If there is an html mime-part in the message and it's the first part,
it gets inlined using `mm-display-part' to convert it to plain text.

The HTML content is still available as a non-text part as well.

14 years agoadd missing comma in debugging code
David Bremner [Thu, 26 Nov 2009 15:32:35 +0000 (11:32 -0400)]
add missing comma in debugging code

14 years agonotmuch.el: Require message mode to avoid undefined function in replies.
Eric Anholt [Wed, 25 Nov 2009 22:14:20 +0000 (14:14 -0800)]
notmuch.el: Require message mode to avoid undefined function in replies.

Otherwise, those without keithp's .emacs would end up with reply mode
not being entered.  Suggested by keithp.

14 years agoFix up whitespace styling from previous commit.
Carl Worth [Sat, 28 Nov 2009 03:38:46 +0000 (19:38 -0800)]
Fix up whitespace styling from previous commit.

Function name in definition belong left-aligned. Body of if statement
cannot be on the same line as the "if".

14 years agonotmuch-new: Test if directory looks like Maildir before skipping tmp.
Jan Janak [Wed, 25 Nov 2009 21:11:45 +0000 (22:11 +0100)]
notmuch-new: Test if directory looks like Maildir before skipping tmp.

'notmuch new' skips directory entries with the name 'tmp'. This is to
prevent notmuch from processing possibly incomplete Maildir messages
stored in that directory.

This patch attempts to refine the feature. If "tmp" entry is found,
it first checks if the containing directory looks like a Maildir
directory. This is done by searching for other common Maildir
subdirectories. If they exist and if the entry "tmp" is a directory
then it is skipped.

Files and subdirectories with the name "tmp" that do not look like
Maildir will still be processed by 'notmuch new'.

Signed-off-by: Jan Janak <jan@ryngle.com>
14 years agoSilence compiler warning by initializing a variable.
Jeffrey C. Ollie [Wed, 25 Nov 2009 13:01:36 +0000 (07:01 -0600)]
Silence compiler warning by initializing a variable.

If Xapian threw an exception on notmuch_query_count_messages the count
variable could be used uninitialized.  Initialize count to solve the

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
14 years agoMerge remote branch 'jukie/vim'
Carl Worth [Sat, 28 Nov 2009 01:32:50 +0000 (17:32 -0800)]
Merge remote branch 'jukie/vim'

14 years agonotmuch-new: Fix notmuch new to look at files within symbolic links
Aneesh Kumar K.V [Wed, 25 Nov 2009 04:58:24 +0000 (10:28 +0530)]
notmuch-new: Fix notmuch new to look at files within symbolic links

We look at the modified time of the database and the directory
to decide whether we need to look at only the subdirectories.
ie, if directory modified time is < database modified time
then we have already looking at all the files withing the
directory. So we just need to iterate through the subdirectories

But with symlinks we need to make sure we follow them even if
the directory modified time is less than database modified time

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
14 years agonotmuch-show: identify which messages printed matched the query string
Bart Trojanowski [Wed, 25 Nov 2009 04:54:35 +0000 (23:54 -0500)]
notmuch-show: identify which messages printed matched the query string

The show command outputs all messages in the threads that match the
search-terms.  This patch introduces a 'match:[01]' entry to the 'message{'
line output by the show command.  Value of 1 indicates that the message is
matching the search expression.

Signed-off-by: Bart Trojanowski <bart@jukie.net>
14 years agohave _notmuch_thread_create mark which messages matched the query
Bart Trojanowski [Wed, 25 Nov 2009 04:54:34 +0000 (23:54 -0500)]
have _notmuch_thread_create mark which messages matched the query

When _notmuch_thread_create() is given a query string, it can return more
messages than just those matching the query.  To distinguish those that
matched the query expression, the MATCHING_SEARCH flag is set

Signed-off-by: Bart Trojanowski <bart@jukie.net>
14 years agomessage: add flags to notmuch_message_t
Bart Trojanowski [Wed, 25 Nov 2009 04:54:33 +0000 (23:54 -0500)]
message: add flags to notmuch_message_t

This patch allows for different flags, internal to notmuch, to be set on a
message object.  The patch does not define any such flags, just the
facilities to manage these flags.

Signed-off-by: Bart Trojanowski <bart@jukie.net>
14 years agoreply --format=headers-only: set In-Reply-To header, with ID *last* in References
Jed Brown [Wed, 25 Nov 2009 18:02:18 +0000 (19:02 +0100)]
reply --format=headers-only: set In-Reply-To header, with ID *last* in References

Apparently this is actually the correct way to do it, it's silly to do
it wrong just to conform to one of git's internal data structures.

14 years agonotmuch-reply.c: implement notmuch_reply_format_headers_only
Jed Brown [Wed, 25 Nov 2009 01:35:14 +0000 (02:35 +0100)]
notmuch-reply.c: implement notmuch_reply_format_headers_only

This command only generates References, To, and Cc headers.
The purpose is primarily for use in

  git send-email --notmuch id:<MESSAGE-ID>

to get proper threading and address the relevant parties.  Hooks for
other SCMs may come later.

Signed-off-by: Jed Brown <jed@59A2.org>
14 years agonotmuch-reply.c: accept the --format=default default option.
Jed Brown [Wed, 25 Nov 2009 01:35:13 +0000 (02:35 +0100)]
notmuch-reply.c: accept the --format=default default option.

This factors actual generation of the reply out of notmuch_reply_command
into notmuch_reply_format_default(), in preparation for other --format=

Signed-off-by: Jed Brown <jed@59A2.org>
14 years agovim: use <Space> more consistently in search view
Bart Trojanowski [Fri, 27 Nov 2009 23:02:05 +0000 (18:02 -0500)]
vim: use <Space> more consistently in search view

In search view <Space> will show the thead, but folding messages that
don't match the current search expression.  Conversly, <Enter> always
shows all messages in the thread.

14 years agoMerge remote branch 'origin/master' into vim
Bart Trojanowski [Fri, 27 Nov 2009 22:49:54 +0000 (17:49 -0500)]
Merge remote branch 'origin/master' into vim

14 years agovim: make it possible to start a search in show mode
Bart Trojanowski [Fri, 27 Nov 2009 22:43:01 +0000 (17:43 -0500)]
vim: make it possible to start a search in show mode

14 years agovim: don't toggle folds that are inside closed folds in show mode
Bart Trojanowski [Fri, 27 Nov 2009 22:18:41 +0000 (17:18 -0500)]
vim: don't toggle folds that are inside closed folds in show mode

14 years agovim: primitive reply to message
Bart Trojanowski [Fri, 27 Nov 2009 21:52:00 +0000 (16:52 -0500)]
vim: primitive reply to message

14 years agovim: primitive reply to thread
Bart Trojanowski [Fri, 27 Nov 2009 21:48:18 +0000 (16:48 -0500)]
vim: primitive reply to thread

14 years agovim: few compose mode updates, including README
Bart Trojanowski [Fri, 27 Nov 2009 21:47:39 +0000 (16:47 -0500)]
vim: few compose mode updates, including README

14 years agovim: don't remove headers until after parsing them
Bart Trojanowski [Fri, 27 Nov 2009 19:05:13 +0000 (14:05 -0500)]
vim: don't remove headers until after parsing them

14 years agovim: fix off-by-one error when removing header from message to send out
Bart Trojanowski [Fri, 27 Nov 2009 19:02:25 +0000 (14:02 -0500)]
vim: fix off-by-one error when removing header from message to send out

14 years agovim: generalize compose buffer function further
Bart Trojanowski [Fri, 27 Nov 2009 18:32:57 +0000 (13:32 -0500)]
vim: generalize compose buffer function further

14 years agovim: have ,nmr just reload the plugin w/o restarting state
Bart Trojanowski [Fri, 27 Nov 2009 18:08:30 +0000 (13:08 -0500)]
vim: have ,nmr just reload the plugin w/o restarting state

14 years agovim: make it possible to replace NM_cobine_tags()
Bart Trojanowski [Fri, 27 Nov 2009 18:06:46 +0000 (13:06 -0500)]
vim: make it possible to replace NM_cobine_tags()

14 years agovim: add a helper to combine tag search expressions
Bart Trojanowski [Fri, 27 Nov 2009 16:04:54 +0000 (11:04 -0500)]
vim: add a helper to combine tag search expressions

14 years agovim: README updates and corrections
Bart Trojanowski [Fri, 27 Nov 2009 14:43:06 +0000 (09:43 -0500)]
vim: README updates and corrections

14 years agovim: have '?' show search words in search mode
Bart Trojanowski [Fri, 27 Nov 2009 14:35:49 +0000 (09:35 -0500)]
vim: have '?' show search words in search mode

14 years agonotmuch-search-add/remove-tag: restrict to messages in current query
Jed Brown [Thu, 26 Nov 2009 21:36:50 +0000 (22:36 +0100)]
notmuch-search-add/remove-tag: restrict to messages in current query

Rather than tagging the everything in the thread.  This is arguably more
desirable behavior and is consistent with clearly desirably behavior of

Note that this change applies indirectly to
notmuch-search-archive-thread (which is actually equivalent behavior
since this function is primarily used when browsing an inbox).

Signed-off-by: Jed Brown <jed@59A2.org>
14 years agoNew function notmuch-search-operate-all: operate on all messages in the current query.
Jed Brown [Thu, 26 Nov 2009 21:36:49 +0000 (22:36 +0100)]
New function notmuch-search-operate-all: operate on all messages in the current query.

It is often convenient to change tags on several messages at once.  This
function applies any number of tag whitespace-delimited tag
modifications to all messages matching the current query.

I have bound this to `*'.

Signed-off-by: Jed Brown <jed@59A2.org>
14 years agovim: cleanup error messages
Bart Trojanowski [Fri, 27 Nov 2009 06:34:08 +0000 (01:34 -0500)]
vim: cleanup error messages

14 years agovim: fix regexp for cleaning search list
Bart Trojanowski [Fri, 27 Nov 2009 06:31:16 +0000 (01:31 -0500)]
vim: fix regexp for cleaning search list

14 years agovim: force deleting buffers
Bart Trojanowski [Fri, 27 Nov 2009 06:18:00 +0000 (01:18 -0500)]
vim: force deleting buffers

14 years agovim: fix message parsing patterns
Bart Trojanowski [Fri, 27 Nov 2009 06:17:36 +0000 (01:17 -0500)]
vim: fix message parsing patterns

if a message did not contain a trailing CR, we may not be able to match ^\f

14 years agovim: implement sending with ,s from compose buffer
Bart Trojanowski [Fri, 27 Nov 2009 06:03:35 +0000 (01:03 -0500)]
vim: implement sending with ,s from compose buffer

14 years agovim: store previous buffer number when starting to compose
Bart Trojanowski [Fri, 27 Nov 2009 06:02:50 +0000 (01:02 -0500)]
vim: store previous buffer number when starting to compose

14 years agovim: make sure headers begin with \w
Bart Trojanowski [Fri, 27 Nov 2009 06:02:37 +0000 (01:02 -0500)]
vim: make sure headers begin with \w

14 years agovim: allow overriding how newBuffer is created
Bart Trojanowski [Fri, 27 Nov 2009 06:01:37 +0000 (01:01 -0500)]
vim: allow overriding how newBuffer is created

14 years agovim: replace echo\nreturn with trhow in a few places
Bart Trojanowski [Fri, 27 Nov 2009 04:11:38 +0000 (23:11 -0500)]
vim: replace echo\nreturn with trhow in a few places

14 years agovim: make insert in compose mode configurable
Bart Trojanowski [Fri, 27 Nov 2009 04:09:57 +0000 (23:09 -0500)]
vim: make insert in compose mode configurable

14 years agovim: add a helpful header to notmuch-compose mode
Bart Trojanowski [Fri, 27 Nov 2009 04:04:53 +0000 (23:04 -0500)]
vim: add a helpful header to notmuch-compose mode