notmuch
10 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

10 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

10 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

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

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

10 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

10 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

10 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

10 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

10 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

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

10 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

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

10 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

10 years agovim: cleanup error messages
Bart Trojanowski [Fri, 27 Nov 2009 06:34:08 +0000 (01:34 -0500)]
vim: cleanup error messages

10 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

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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

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

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

10 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

10 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

10 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

10 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

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

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

10 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

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

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

10 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

10 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

10 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

10 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

10 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

10 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

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

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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

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

10 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

10 years agovim: fix an error in the logic for finding message under cursor in show screen
Bart Trojanowski [Sun, 22 Nov 2009 05:42:42 +0000 (00:42 -0500)]
vim: fix an error in the logic for finding message under cursor in show screen

10 years agovim: use ,s for editing search query
Bart Trojanowski [Sun, 22 Nov 2009 05:35:38 +0000 (00:35 -0500)]
vim: use ,s for editing search query

(save 'S' for marking things as spam)

10 years agovim: have ? show details of what's under cursor in search/show views
Bart Trojanowski [Sun, 22 Nov 2009 05:29:57 +0000 (00:29 -0500)]
vim: have ? show details of what's under cursor in search/show views

10 years agovim: ingore would-be-folds with line count of 1 or fewer
Bart Trojanowski [Sun, 22 Nov 2009 05:16:25 +0000 (00:16 -0500)]
vim: ingore would-be-folds with line count of 1 or fewer

10 years agovim: added searching for word under cursor with ^]
Bart Trojanowski [Sun, 22 Nov 2009 05:10:27 +0000 (00:10 -0500)]
vim: added searching for word under cursor with ^]

10 years agovim: highlight []-blocks in search view
Bart Trojanowski [Sun, 22 Nov 2009 04:59:01 +0000 (23:59 -0500)]
vim: highlight []-blocks in search view

10 years agovim plugin: removed some dead code
Bart Trojanowski [Sun, 22 Nov 2009 04:52:24 +0000 (23:52 -0500)]
vim plugin: removed some dead code

10 years agovim: place ... more inteligently when shortening 'from' list in search
Bart Trojanowski [Sun, 22 Nov 2009 04:48:39 +0000 (23:48 -0500)]
vim: place ... more inteligently when shortening 'from' list in search

10 years agofix returning to folders after searching a few times
Bart Trojanowski [Sun, 22 Nov 2009 04:17:41 +0000 (23:17 -0500)]
fix returning to folders after searching a few times

10 years agomake searching, updates and returning to folder view work
Bart Trojanowski [Sun, 22 Nov 2009 04:14:53 +0000 (23:14 -0500)]
make searching, updates and returning to folder view work

10 years agoadd notmuch-folders support mode
Bart Trojanowski [Sun, 22 Nov 2009 03:24:54 +0000 (22:24 -0500)]
add notmuch-folders support mode

10 years agoremove some debug code from NM_cmd_search()
Bart Trojanowski [Sun, 22 Nov 2009 02:33:41 +0000 (21:33 -0500)]
remove some debug code from NM_cmd_search()

10 years agoNM_show_prev() -> NM_show_previous()
Bart Trojanowski [Sat, 21 Nov 2009 23:34:51 +0000 (18:34 -0500)]
NM_show_prev() -> NM_show_previous()

10 years agocorrect fold line counts
Bart Trojanowski [Sat, 21 Nov 2009 05:04:52 +0000 (00:04 -0500)]
correct fold line counts

10 years agokeep the ,nmr hack around
Bart Trojanowski [Fri, 20 Nov 2009 20:53:46 +0000 (15:53 -0500)]
keep the ,nmr hack around

10 years agoclear the nmap before creating our bindings
Bart Trojanowski [Fri, 20 Nov 2009 20:47:25 +0000 (15:47 -0500)]
clear the nmap before creating our bindings

10 years agodon't fold single lines
Bart Trojanowski [Fri, 20 Nov 2009 20:47:01 +0000 (15:47 -0500)]
don't fold single lines

10 years agoavoid reloading search screen when we add/remove tags
Bart Trojanowski [Fri, 20 Nov 2009 20:42:42 +0000 (15:42 -0500)]
avoid reloading search screen when we add/remove tags

10 years agodebug code to measure how long calls to system() take
Bart Trojanowski [Fri, 20 Nov 2009 20:42:18 +0000 (15:42 -0500)]
debug code to measure how long calls to system() take

10 years agomake control-p go to previous message
Bart Trojanowski [Fri, 20 Nov 2009 20:23:02 +0000 (15:23 -0500)]
make control-p go to previous message

10 years agolot more stubs for future keybindings
Bart Trojanowski [Fri, 20 Nov 2009 19:53:46 +0000 (14:53 -0500)]
lot more stubs for future keybindings

10 years agoimplemented folding bodies and headers
Bart Trojanowski [Fri, 20 Nov 2009 19:18:42 +0000 (14:18 -0500)]
implemented folding bodies and headers

10 years agomore endless toil with syntax
Bart Trojanowski [Fri, 20 Nov 2009 18:50:29 +0000 (13:50 -0500)]
more endless toil with syntax

10 years agofix after merge, --reverse replaced with --sort=
Bart Trojanowski [Fri, 20 Nov 2009 17:37:52 +0000 (12:37 -0500)]
fix after merge, --reverse replaced with --sort=

10 years agocrude order toggle
Bart Trojanowski [Fri, 20 Nov 2009 17:16:32 +0000 (12:16 -0500)]
crude order toggle

10 years agoadded search filtering
Bart Trojanowski [Fri, 20 Nov 2009 17:05:43 +0000 (12:05 -0500)]
added search filtering

10 years agoadded support for archive command
Bart Trojanowski [Fri, 20 Nov 2009 16:13:49 +0000 (11:13 -0500)]
added support for archive command

10 years agocleanup calls to script functions, use <SID>
Bart Trojanowski [Fri, 20 Nov 2009 15:59:31 +0000 (10:59 -0500)]
cleanup calls to script functions, use <SID>

10 years agofix showing thread
Bart Trojanowski [Fri, 20 Nov 2009 15:58:34 +0000 (10:58 -0500)]
fix showing thread

10 years agoadded tagging and refresh to search screen
Bart Trojanowski [Fri, 20 Nov 2009 15:57:25 +0000 (10:57 -0500)]
added tagging and refresh to search screen

10 years agoadd dummy entries to search screen keymap
Bart Trojanowski [Fri, 20 Nov 2009 15:19:31 +0000 (10:19 -0500)]
add dummy entries to search screen keymap

10 years agodefine keymap for show screen as a dictionary
Bart Trojanowski [Fri, 20 Nov 2009 14:56:10 +0000 (09:56 -0500)]
define keymap for show screen as a dictionary

10 years agocleanup default handling code
Bart Trojanowski [Fri, 20 Nov 2009 14:49:11 +0000 (09:49 -0500)]
cleanup default handling code

10 years agomake search screen mappings configurable via dictionary
Bart Trojanowski [Fri, 20 Nov 2009 14:42:29 +0000 (09:42 -0500)]
make search screen mappings configurable via dictionary