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

12 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
documentation.

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

12 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>
12 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 23.1.50.1 but not in 23.1.1.

Signed-off-by: Jed Brown <jed@59A2.org>
Tested-by: Keith Packard <keithp@keithp.com>
12 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:

make CXXFLAGS="-DDEBUG"

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:

http://ozlabs.org/~rusty/index.cgi/tech/2008-04-01.html

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

12 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>
12 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

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

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

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

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

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

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

12 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

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

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

12 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>
12 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
problem.

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

12 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>
12 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>
12 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
appropriately.

Signed-off-by: Bart Trojanowski <bart@jukie.net>
12 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>
12 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.

12 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>
12 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=
options.

Signed-off-by: Jed Brown <jed@59A2.org>
12 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.

12 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

12 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

12 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

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

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

12 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

12 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

12 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

12 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

12 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

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

12 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

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

12 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

12 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
notmuch-search-operate-all.

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>
12 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>
12 years agovim: cleanup error messages
Bart Trojanowski [Fri, 27 Nov 2009 06:34:08 +0000 (01:34 -0500)]
vim: cleanup error messages

12 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

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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 years agovim: syntax highlighting for notmuch-compose mode
Bart Trojanowski [Fri, 27 Nov 2009 03:32:17 +0000 (22:32 -0500)]
vim: syntax highlighting for notmuch-compose mode

12 years agovim: add support for <Tab> in compose mode
Bart Trojanowski [Fri, 27 Nov 2009 03:32:02 +0000 (22:32 -0500)]
vim: add support for <Tab> in compose mode

this will skip to the next header in insert and normal modes, and
behave like <Tab> otherwise.

12 years agovim: add support for :NotMuch compose
Bart Trojanowski [Fri, 27 Nov 2009 03:30:13 +0000 (22:30 -0500)]
vim: add support for :NotMuch compose

... but it doesn't send yet.

12 years agovim: cleanup settings in newBuffer() and make them local
Bart Trojanowski [Fri, 27 Nov 2009 03:25:43 +0000 (22:25 -0500)]
vim: cleanup settings in newBuffer() and make them local

12 years agovim: add a line splitter that understands quotes
Bart Trojanowski [Fri, 27 Nov 2009 03:24:33 +0000 (22:24 -0500)]
vim: add a line splitter that understands quotes

this makes it possible to tokenise expressions like
   :NotMuch compose 'subject: one two three' to:bart@jukie.net

12 years agovim: allow for different types of mappings not just normal mode ones
Bart Trojanowski [Fri, 27 Nov 2009 03:22:30 +0000 (22:22 -0500)]
vim: allow for different types of mappings not just normal mode ones

12 years agoReturn unpropertized strings for filename and message-id
Tassilo Horn [Mon, 23 Nov 2009 16:57:31 +0000 (17:57 +0100)]
Return unpropertized strings for filename and message-id

12 years agonotmuch.el: Use variable notmuch-search-oldest-first to decide the search order
Aneesh Kumar K.V [Mon, 23 Nov 2009 14:50:59 +0000 (20:20 +0530)]
notmuch.el: Use variable notmuch-search-oldest-first to decide the search order

Make sure we use notmuch-search-oldest-first to decide the how
the search result should be displayed. This helps to set the
value to nil and have latest mail shown first

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agoTODO: A read-only file in the mail store should be a warning, not an error.
Carl Worth [Thu, 26 Nov 2009 21:07:20 +0000 (13:07 -0800)]
TODO: A read-only file in the mail store should be a warning, not an error.

It's a bug that processing currently stops when it hits a read-only
file. This is yet another case we'll want our test suite to cover.

12 years agonotmuch.el: When removing tags, offer only those a msg/thread has set.
Jan Janak [Wed, 25 Nov 2009 04:05:39 +0000 (05:05 +0100)]
notmuch.el: When removing tags, offer only those a msg/thread has set.

When removing a tag from a message or thread, build a completion buffer
which contains only tags that the message or thread has really set.

Signed-off-by: Jan Janak <jan@ryngle.com>
12 years agosearch-tags: Add support for search-terms.
Jan Janak [Wed, 25 Nov 2009 03:30:22 +0000 (04:30 +0100)]
search-tags: Add support for search-terms.

This patch adds support for search-terms to 'notmuch search-tags'. If
no search-term is provided then the command returns a list of all tags
from the database.

If the user provides one or more search-terms as arguments then the
command collects tags from matching messages only.

This could be used by functions in the Emacs mode to further limit the
list of tags offered for completion. For example, functions that remove
tags from message(s) could offer only tags present in the message(s).

Signed-off-by: Jan Janak <jan@ryngle.com>
12 years agolib: New function to collect tags from a list of messages.
Jan Janak [Wed, 25 Nov 2009 03:30:21 +0000 (04:30 +0100)]
lib: New function to collect tags from a list of messages.

This patch adds a new function that can be used to collect a list of
unique tags from a list of messages. 'notmuch search-tags' uses the
function to get a list of tags from messages matching a search-term,
but it has the potential to be used elsewhere so we put it in the lib.

Signed-off-by: Jan Janak <jan@ryngle.com>
12 years agonotmuch.el: Select tag names with completion.
Jan Janak [Mon, 23 Nov 2009 00:10:56 +0000 (01:10 +0100)]
notmuch.el: Select tag names with completion.

Several commands ask the user for a tag name. With this feature the
user can just press tab and Emacs automatically retrieves the list of
all existing tags from notmuch database with 'notmuch search-tags' and
presents a completion buffer to the user.

This feature is very useful for users who have a large number of tags
because it saves typing and minimizes the risk of typos.

Signed-off-by: Jan Janak <jan@ryngle.com>
12 years agonotmuch: New command 'search-tags'.
Jan Janak [Mon, 23 Nov 2009 00:10:55 +0000 (01:10 +0100)]
notmuch: New command 'search-tags'.

This is a new notmuch command that can be used to search for all tags
found in the database. The resulting list is alphabetically sorted.

The primary use-case for this new command is to provide the tag
completion feature in Emacs (and other interfaces).

Signed-off-by: Jan Janak <jan@ryngle.com>
12 years agonotmuch: New function to retrieve all tags from the database.
Jan Janak [Mon, 23 Nov 2009 00:10:54 +0000 (01:10 +0100)]
notmuch: New function to retrieve all tags from the database.

This patch adds a new function called notmuch_database_get_all_tags
which can be used to obtain a list of all tags from the database
(in other words, the list contains all tags from all messages). The
function produces an alphabetically sorted list.

To add support for the new function, we rip the guts off of
notmuch_message_get_tags and put them in a new generic function
called _notmuch_convert_tags. The generic function takes a
Xapian::TermIterator as argument and uses the iterator to find tags.
This makes the function usable with different Xapian objects.

Function notmuch_message_get_tags is then reimplemented to call the
generic function with message->doc.termlist_begin() as argument.

Similarly, we implement notmuch_message_database_get_all_tags, the
function calls the generic function with db->xapian_db->allterms_begin()
as argument.

Finally, notmuch_database_get_all_tags is exported through
lib/notmuch.h

Signed-off-by: Jan Janak <jan@ryngle.com>
12 years agomodify notmuch_setup_command to return 1 if config file write fails.
Jameson Graef Rollins [Sun, 22 Nov 2009 21:58:35 +0000 (16:58 -0500)]
modify notmuch_setup_command to return 1 if config file write fails.

This fixes a small bug in notmuch_setup_command such that it returned
OK and output the setup message footer even if the config file write
step failed.

12 years agovim: fix a case where we started with :NotMuch search
Bart Trojanowski [Thu, 26 Nov 2009 01:01:13 +0000 (20:01 -0500)]
vim: fix a case where we started with :NotMuch search

12 years agovim: fix some error checking in NM_search_thread_id()
Bart Trojanowski [Thu, 26 Nov 2009 00:26:36 +0000 (19:26 -0500)]
vim: fix some error checking in NM_search_thread_id()

12 years agovim: removing debug statements
Bart Trojanowski [Wed, 25 Nov 2009 19:31:36 +0000 (14:31 -0500)]
vim: removing debug statements

12 years agovim: Space archives/reads and advances to next message
Bart Trojanowski [Wed, 25 Nov 2009 19:20:44 +0000 (14:20 -0500)]
vim: Space archives/reads and advances to next message

12 years agovim: don't use scrolloff/sidesscrolloff in notmuch buffers
Bart Trojanowski [Wed, 25 Nov 2009 19:19:35 +0000 (14:19 -0500)]
vim: don't use scrolloff/sidesscrolloff in notmuch buffers

12 years agovim: refactor get_message_for_line out of show_message_id
Bart Trojanowski [Wed, 25 Nov 2009 19:19:02 +0000 (14:19 -0500)]
vim: refactor get_message_for_line out of show_message_id

12 years agovim: more cleanup and fixes for show_next/previous handlers
Bart Trojanowski [Wed, 25 Nov 2009 19:18:29 +0000 (14:18 -0500)]
vim: more cleanup and fixes for show_next/previous handlers

12 years agovim: allow show_next/previous to skip non-matching messages
Bart Trojanowski [Wed, 25 Nov 2009 19:17:34 +0000 (14:17 -0500)]
vim: allow show_next/previous to skip non-matching messages

12 years agovim: pass filter expression to add/remove tag functions
Bart Trojanowski [Wed, 25 Nov 2009 19:12:29 +0000 (14:12 -0500)]
vim: pass filter expression to add/remove tag functions

12 years agoTesting.
Carl Worth [Wed, 25 Nov 2009 17:39:10 +0000 (09:39 -0800)]
Testing.

12 years agonotmuch.el: Remove some dead code.
Carl Worth [Wed, 25 Nov 2009 17:18:39 +0000 (09:18 -0800)]
notmuch.el: Remove some dead code.

This was left over from before the switch to using a filter for
processing the results of "notmuch search".

12 years agovim: fold messages that don't match a query
Bart Trojanowski [Wed, 25 Nov 2009 05:37:10 +0000 (00:37 -0500)]
vim: fold messages that don't match a query

12 years agoMerge branch 'show-matching-flag' into HEAD
Bart Trojanowski [Wed, 25 Nov 2009 05:50:43 +0000 (00:50 -0500)]
Merge branch 'show-matching-flag' into HEAD

12 years agovim: return nothing instead of failting if there is no message id
Bart Trojanowski [Wed, 25 Nov 2009 05:36:11 +0000 (00:36 -0500)]
vim: return nothing instead of failting if there is no message id

12 years agovim: minor improvements to search screen syntax matching
Bart Trojanowski [Wed, 25 Nov 2009 05:13:32 +0000 (00:13 -0500)]
vim: minor improvements to search screen syntax matching

12 years agovim: make timing info a debug option
Bart Trojanowski [Wed, 25 Nov 2009 05:06:11 +0000 (00:06 -0500)]
vim: make timing info a debug option

12 years agovim: include stubs for Tab-ing thorugh folds in show view
Bart Trojanowski [Tue, 24 Nov 2009 01:26:28 +0000 (20:26 -0500)]
vim: include stubs for Tab-ing thorugh folds in show view

12 years agovim: include search terms when showing message
Bart Trojanowski [Tue, 24 Nov 2009 01:25:47 +0000 (20:25 -0500)]
vim: include search terms when showing message

12 years agovim: fix '?' command in message display
Bart Trojanowski [Tue, 24 Nov 2009 01:24:22 +0000 (20:24 -0500)]
vim: fix '?' command in message display

12 years agovim: fix shell escaping for () in search terms
Bart Trojanowski [Tue, 24 Nov 2009 01:23:41 +0000 (20:23 -0500)]
vim: fix shell escaping for () in search terms

12 years agovim: fix column formatting for >9 messages in search view
Bart Trojanowski [Tue, 24 Nov 2009 01:20:34 +0000 (20:20 -0500)]
vim: fix column formatting for >9 messages in search view

12 years agovim: preserve previous buffer number when refreshing search
Bart Trojanowski [Tue, 24 Nov 2009 01:05:51 +0000 (20:05 -0500)]
vim: preserve previous buffer number when refreshing search

12 years agovim: add git-diff.vim in README, make syntax work w/o the script
Bart Trojanowski [Mon, 23 Nov 2009 14:28:40 +0000 (09:28 -0500)]
vim: add git-diff.vim in README, make syntax work w/o the script

12 years agovim: cleanup tag filtering
Bart Trojanowski [Sun, 22 Nov 2009 22:17:20 +0000 (17:17 -0500)]
vim: cleanup tag filtering

Given an existing search expression and a regular filter, the resulting
search will be:

        EXISTING AND ( NEW )

With a tag filter each of the tags given will be prefixed with tag: and
separated by AND.

12 years agovim: cleanup a few minor glitches
Bart Trojanowski [Sun, 22 Nov 2009 20:59:27 +0000 (15:59 -0500)]
vim: cleanup a few minor glitches