Commit graph

6789 commits

Author SHA1 Message Date
Bart Trojanowski
a04334e959 vim: fix regexp for cleaning search list 2009-11-27 01:31:16 -05:00
Bart Trojanowski
5b8f74b512 vim: force deleting buffers 2009-11-27 01:18:00 -05:00
Bart Trojanowski
becc49eee7 vim: fix message parsing patterns
if a message did not contain a trailing CR, we may not be able to match ^\f
2009-11-27 01:17:36 -05:00
Bart Trojanowski
b5e28d8615 vim: implement sending with ,s from compose buffer 2009-11-27 01:03:35 -05:00
Bart Trojanowski
05d76deb2e vim: store previous buffer number when starting to compose 2009-11-27 01:02:50 -05:00
Bart Trojanowski
651b215f0f vim: make sure headers begin with \w 2009-11-27 01:02:37 -05:00
Bart Trojanowski
350e013696 vim: allow overriding how newBuffer is created 2009-11-27 01:01:37 -05:00
Bart Trojanowski
9012c65282 vim: replace echo\nreturn with trhow in a few places 2009-11-26 23:11:38 -05:00
Bart Trojanowski
aa312db8cd vim: make insert in compose mode configurable 2009-11-26 23:09:57 -05:00
Bart Trojanowski
8bafbac75c vim: add a helpful header to notmuch-compose mode 2009-11-26 23:07:07 -05:00
Bart Trojanowski
805633becc vim: syntax highlighting for notmuch-compose mode 2009-11-26 22:32:17 -05:00
Bart Trojanowski
b078a0c8c2 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.
2009-11-26 22:32:02 -05:00
Bart Trojanowski
0aa5f7d250 vim: add support for :NotMuch compose
... but it doesn't send yet.
2009-11-26 22:30:13 -05:00
Bart Trojanowski
5bb149aab2 vim: cleanup settings in newBuffer() and make them local 2009-11-26 22:25:43 -05:00
Bart Trojanowski
bbca6e03c6 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
2009-11-26 22:24:33 -05:00
Bart Trojanowski
480903adac vim: allow for different types of mappings not just normal mode ones 2009-11-26 22:22:30 -05:00
Tassilo Horn
b7898b0c2a Return unpropertized strings for filename and message-id 2009-11-26 13:18:20 -08:00
Aneesh Kumar K.V
dc4d0a53a2 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>
2009-11-26 13:09:12 -08:00
Carl Worth
5b7b5ce1ef 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.
2009-11-26 13:07:20 -08:00
Jan Janak
5ab69232bc 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>
2009-11-26 07:07:12 -08:00
Jan Janak
5a447b00ac 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>
2009-11-26 07:06:41 -08:00
Jan Janak
523a6f67ec 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>
2009-11-26 07:06:04 -08:00
Jan Janak
16eab4c87d 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>
2009-11-26 07:03:32 -08:00
Jan Janak
f8baa02335 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>
2009-11-26 07:02:48 -08:00
Jan Janak
c3c52e464b 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>
2009-11-26 07:01:52 -08:00
Jameson Graef Rollins
34c840a23e 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.
2009-11-25 19:24:27 -08:00
Bart Trojanowski
7a7be482f7 vim: fix a case where we started with :NotMuch search 2009-11-25 20:01:13 -05:00
Bart Trojanowski
e2fd1d9970 vim: fix some error checking in NM_search_thread_id() 2009-11-25 19:27:38 -05:00
Bart Trojanowski
29b420700e vim: removing debug statements 2009-11-25 14:31:36 -05:00
Bart Trojanowski
8c8dacb26a vim: Space archives/reads and advances to next message 2009-11-25 14:20:44 -05:00
Bart Trojanowski
4c9ddb9ac1 vim: don't use scrolloff/sidesscrolloff in notmuch buffers 2009-11-25 14:19:35 -05:00
Bart Trojanowski
329f95eb77 vim: refactor get_message_for_line out of show_message_id 2009-11-25 14:19:02 -05:00
Bart Trojanowski
898b173a18 vim: more cleanup and fixes for show_next/previous handlers 2009-11-25 14:18:29 -05:00
Bart Trojanowski
0f39d2c4de vim: allow show_next/previous to skip non-matching messages 2009-11-25 14:17:34 -05:00
Bart Trojanowski
b440aeb23e vim: pass filter expression to add/remove tag functions 2009-11-25 14:12:29 -05:00
Carl Worth
5c5727ab52 Testing. 2009-11-25 09:39:10 -08:00
Carl Worth
03ea266bc2 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".
2009-11-25 09:18:39 -08:00
Bart Trojanowski
5a32a1d48f vim: fold messages that don't match a query 2009-11-25 00:50:50 -05:00
Bart Trojanowski
682aa2e076 Merge branch 'show-matching-flag' into HEAD 2009-11-25 00:50:43 -05:00
Bart Trojanowski
9d9b03c837 vim: return nothing instead of failting if there is no message id 2009-11-25 00:48:55 -05:00
Bart Trojanowski
a01e1335be vim: minor improvements to search screen syntax matching 2009-11-25 00:48:55 -05:00
Bart Trojanowski
553637313b vim: make timing info a debug option 2009-11-25 00:48:55 -05:00
Bart Trojanowski
76dc061de3 vim: include stubs for Tab-ing thorugh folds in show view 2009-11-25 00:48:55 -05:00
Bart Trojanowski
b740392b3d vim: include search terms when showing message 2009-11-25 00:48:55 -05:00
Bart Trojanowski
be19c210ca vim: fix '?' command in message display 2009-11-25 00:48:55 -05:00
Bart Trojanowski
845732464c vim: fix shell escaping for () in search terms 2009-11-25 00:48:55 -05:00
Bart Trojanowski
f275f5f7f0 vim: fix column formatting for >9 messages in search view 2009-11-25 00:48:55 -05:00
Bart Trojanowski
6bc0ec618d vim: preserve previous buffer number when refreshing search 2009-11-25 00:48:55 -05:00
Bart Trojanowski
418a7f3108 vim: add git-diff.vim in README, make syntax work w/o the script 2009-11-25 00:48:54 -05:00
Bart Trojanowski
e9ca8e5037 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.
2009-11-25 00:48:54 -05:00