[PATCH] emacs: functions to import sender or recipient into BBDB

2012-07-26 Thread Daniel Bergey
>From a show buffer, bbdb/notmuch-snarf-from imports the sender into bbdb. bbdb/notmuch-snarf-to attempts to import all recipients. BBDB displays a buffer with each contact; C-g displays the next contact, or returns to the notmuch-show buffer. Both functions assume that email contacts are

[PATCH] emacs: Add customization group for replying

2012-07-26 Thread Michal Sojka
When one wants to customize the format of reply message, there nothing to tell the user how to do it. Without knowing that construction of reply buffer is actually implemented in the message package, it seems that replying cannot be customized. Because I was getting annoyed by the empty line the

[PATCH 01/18] cli: add stub for insert command

2012-07-26 Thread Peter Wang
On Wed, 25 Jul 2012 10:11:14 -0700, Jameson Graef Rollins wrote: > > This is an interesting series, but let me play devil's advocate for a > moment: Why is this functionality needed? What can this functionality > do that notmuch new can't? My mail is stored on a remote server running notmuch.

[PATCH 01/13] test: Uniformly canonicalize actual and expected JSON

2012-07-26 Thread Tomi Ollila
On Wed, Jul 25 2012, Austin Clements wrote: > Previously, we used a variety of ad-hoc canonicalizations for JSON > output in the test suite, but were ultimately very sensitive to JSON > irrelevancies such as whitespace. This introduces a new test > comparison function, test_expect_equal_json,

[PATCH 1/5] emacs: compile and load notmuch-pick.el if present.

2012-07-26 Thread Tomi Ollila
On Thu, Jul 26 2012, Mark Walters wrote: > On Wed, 25 Jul 2012, Tomi Ollila wrote: >> On Wed, Jul 25 2012, Mark Walters wrote: >> >>> Compile and load notmuch-pick.el if present. >>> >>> All the actual setup of pick is done in the function notmuch-pick-init >>> so we call that in the notmuch

[PATCH 18/18] test: test insert --create-folder

2012-07-26 Thread Peter Wang
Add tests for the new option. --- test/insert | 24 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/test/insert b/test/insert index 3514920..548da58 100755 --- a/test/insert +++ b/test/insert @@ -50,4 +50,28 @@ generate_message \ notmuch insert

[PATCH 17/18] man: document insert --create-folder option

2012-07-26 Thread Peter Wang
Document the new option. --- man/man1/notmuch-insert.1 |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/man/man1/notmuch-insert.1 b/man/man1/notmuch-insert.1 index 7d281b5..4bd8a35 100644 --- a/man/man1/notmuch-insert.1 +++ b/man/man1/notmuch-insert.1 @@ -36,10

[PATCH 16/18] insert: add --create-folder option

2012-07-26 Thread Peter Wang
Support an option to create a new folder in the maildir. --- notmuch-insert.c | 71 ++ 1 files changed, 71 insertions(+), 0 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index a69dfe6..380c520 100644 --- a/notmuch-insert.c +++

[PATCH 15/18] man: reference notmuch-insert.1

2012-07-26 Thread Peter Wang
Add references to notmuch-insert.1 from other man pages. --- man/man1/notmuch-config.1 |4 ++-- man/man1/notmuch-count.1|4 ++-- man/man1/notmuch-dump.1 |4 ++-- man/man1/notmuch-new.1 |4 ++-- man/man1/notmuch-reply.1|3 ++-

[PATCH 14/18] man: document 'insert' command

2012-07-26 Thread Peter Wang
Add initial documentation for notmuch insert command. --- man/Makefile.local|1 + man/man1/notmuch-insert.1 | 50 + 2 files changed, 51 insertions(+), 0 deletions(-) create mode 100644 man/man1/notmuch-insert.1 diff --git

[PATCH 13/18] test: add tests for insert

2012-07-26 Thread Peter Wang
Add tests for new 'insert' command. --- test/insert | 53 + test/notmuch-test |1 + 2 files changed, 54 insertions(+), 0 deletions(-) create mode 100755 test/insert diff --git a/test/insert b/test/insert new file mode 100755 index

[PATCH 12/18] insert: add copyright line from notmuch-deliver

2012-07-26 Thread Peter Wang
The 'insert' implementation was based partly on notmuch-deliver. --- notmuch-insert.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index 5fd79be..a69dfe6 100644 --- a/notmuch-insert.c +++ b/notmuch-insert.c @@ -2,6 +2,9 @@ * *

[PATCH 11/18] insert: apply command-line tag operations

2012-07-26 Thread Peter Wang
Apply the +tag and -tag operations which were specified on the command-line. --- notmuch-insert.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index 6db03e3..5fd79be 100644 --- a/notmuch-insert.c +++

[PATCH 10/18] insert: parse command-line tag operations

2012-07-26 Thread Peter Wang
Parse +tag and -tag on the 'insert' command-line. Issue a warning about ambiguous -tag arguments which don't follow +tag nor an explicit option list terminator. --- notmuch-insert.c | 50 ++ 1 files changed, 50 insertions(+), 0 deletions(-) diff

[PATCH 09/18] insert: apply default tags to new message

2012-07-26 Thread Peter Wang
Apply the new.tags to messages added by 'insert'. This mirrors the behaviour if the message were delivered by a separate tool followed by 'notmuch new'. --- notmuch-insert.c | 21 + 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/notmuch-insert.c

[PATCH 08/18] insert: check folder name

2012-07-26 Thread Peter Wang
Don't accept folder names containing a ".." component, to prevent writing outside of the maildir. --- notmuch-insert.c | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index 6398618..ee51a87 100644 ---

[PATCH 07/18] insert: add --folder option

2012-07-26 Thread Peter Wang
Allow the new message to be inserted into a folder within the Maildir hierarchy instead of the top-level folder. --- notmuch-insert.c | 21 - 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index dd449bc..6398618 100644 ---

[PATCH 06/18] insert: add new message to database

2012-07-26 Thread Peter Wang
Add the new message to the notmuch database, renaming the file to encode notmuch tags as maildir flags. --- notmuch-insert.c | 44 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index

[PATCH 05/18] insert: move file from Maildir tmp to new

2012-07-26 Thread Peter Wang
Atomically move the new message file from the Maildir 'tmp' directory to 'new'. --- notmuch-insert.c | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index 340f7e4..bab1fed 100644 --- a/notmuch-insert.c +++

[PATCH 04/18] insert: copy stdin to Maildir tmp file

2012-07-26 Thread Peter Wang
Read the new message from standard input into the Maildir tmp file. --- notmuch-insert.c | 51 +-- 1 files changed, 49 insertions(+), 2 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index f01a6f2..340f7e4 100644 ---

[PATCH 03/18] insert: open Maildir tmp file

2012-07-26 Thread Peter Wang
Open a unique file in the Maildir tmp directory. The new message is not yet copied into the file. --- notmuch-insert.c | 80 +- 1 files changed, 79 insertions(+), 1 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index

[PATCH 02/18] insert: open database

2012-07-26 Thread Peter Wang
Open the notmuch configuration file and database. --- notmuch-insert.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index 0e061a0..21424cf 100644 --- a/notmuch-insert.c +++ b/notmuch-insert.c @@ -23,5 +23,21 @@ int

[PATCH 01/18] cli: add stub for insert command

2012-07-26 Thread Peter Wang
This does nothing yet. --- Makefile.local |1 + notmuch-client.h |3 +++ notmuch-insert.c | 27 +++ notmuch.c|3 +++ 4 files changed, 34 insertions(+), 0 deletions(-) create mode 100644 notmuch-insert.c diff --git a/Makefile.local b/Makefile.local

[PATCH] emacs: Add customization group for replying

2012-07-26 Thread Michal Sojka
When one wants to customize the format of reply message, there nothing to tell the user how to do it. Without knowing that construction of reply buffer is actually implemented in the message package, it seems that replying cannot be customized. Because I was getting annoyed by the empty line the

[PATCH] emacs: functions to import sender or recipient into BBDB

2012-07-26 Thread Daniel Bergey
From a show buffer, bbdb/notmuch-snarf-from imports the sender into bbdb. bbdb/notmuch-snarf-to attempts to import all recipients. BBDB displays a buffer with each contact; C-g displays the next contact, or returns to the notmuch-show buffer. Both functions assume that email contacts are