[announce] Bower 0.1

2011-12-17 Thread Peter Wang
Hi, Bower is yet another curses frontend for the Notmuch email system. I wrote it for me, but you might like it, too. Mutt users would probably find it most familiar. https://github.com/wangp/bower bower is written in Mercury. There are screenshots if you just want to see what it

Re: [announce] Bower 0.1

2011-12-18 Thread Peter Wang
On Sun, 18 Dec 2011 10:22:46 +, Patrick Totzke patricktot...@googlemail.com wrote: Hi Peter, Hi Patrick, Congrats on the release, your screenshots look very promising indeed. Unfortunately, I wasn't able to get it to run on my machine: I installed the mercury compiler as instructed,

[announce] Bower 0.2

2012-03-03 Thread Peter Wang
Hi, Bower is yet another curses frontend for the Notmuch email system. I wrote it for me, but you might like it, too. https://github.com/wangp/bower Bower 0.2 (2012-03-04) == * Renamed addressbook section to [bower:addressbook]. * Support for configurable search

Re: [alot] reply from search mode

2012-03-06 Thread Peter Wang
On Tue, 06 Mar 2012 21:17:47 +, Patrick Totzke patricktot...@googlemail.com wrote: Quoting Philippe LeCavalier (2012-03-06 16:00:16) How would I add a reply key binding to reply directly from the search mode. ie something like R. Forward and editnew would be nice as well. This could

[PATCH 1/2] config: Add 'config list' command

2012-03-20 Thread Peter Wang
Add a command to list all keys in a given configuration section. One use is as follows: a MUA may prefer to store data in a central notmuch configuration file so that the data is accessible across different machines, e.g. an addressbook. The list command helps to implement features such as tab

[PATCH 2/2] man: Document 'config list' command

2012-03-20 Thread Peter Wang
Document the 'config list' command and its output. --- man/man1/notmuch-config.1 | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/man/man1/notmuch-config.1 b/man/man1/notmuch-config.1 index 395cb9c..b9f81a5 100644 --- a/man/man1/notmuch-config.1 +++

Re: [PATCH 1/2] config: Add 'config list' command

2012-03-21 Thread Peter Wang
On Wed, 21 Mar 2012 20:30:43 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: On Wed, 21 Mar 2012 09:31:37 +1100, Peter Wang noval...@gmail.com wrote: Add a command to list all keys in a given configuration section. One use is as follows: a MUA may prefer to store data in a central notmuch

[PATCH v2] Add 'config list' command

2012-03-30 Thread Peter Wang
This version prints all config items and their values instead of just the keys of a single section. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v2 1/5] config: Fix free in 'config get' implementation.

2012-03-30 Thread Peter Wang
The array returned by g_key_file_get_string_list() should be freed with g_strfreev(), not free(). --- notmuch-config.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch-config.c b/notmuch-config.c index e9b2750..85fc774 100644 --- a/notmuch-config.c +++

[PATCH v2 3/5] test: Add broken test for 'config list'

2012-03-30 Thread Peter Wang
Proposed functionality. --- test/config | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/test/config b/test/config index d3e574c..73c58ff 100755 --- a/test/config +++ b/test/config @@ -17,4 +17,20 @@ test_expect_success Set string value \

[PATCH v2 5/5] man: Document 'config list' command

2012-03-30 Thread Peter Wang
Document the 'config list' command and its output. --- man/man1/notmuch-config.1 | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/man/man1/notmuch-config.1 b/man/man1/notmuch-config.1 index 395cb9c..a55dbef 100644 --- a/man/man1/notmuch-config.1 +++

[PATCH v3 0/5] Add 'config list' command

2012-04-05 Thread Peter Wang
This version tests 'config set' by reading back the set value, as suggested. Peter Wang (5): config: Fix free in 'config get' implementation. test: Add tests for 'config' command test: Add broken test for 'config list' config: Add 'config list' command man: Document 'config list

[PATCH v3 1/5] config: Fix free in 'config get' implementation.

2012-04-05 Thread Peter Wang
The array returned by g_key_file_get_string_list() should be freed with g_strfreev(), not free(). --- notmuch-config.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch-config.c b/notmuch-config.c index e9b2750..85fc774 100644 --- a/notmuch-config.c +++

[PATCH v3 2/5] test: Add tests for 'config' command

2012-04-05 Thread Peter Wang
Start a new test script. --- test/config | 25 + test/notmuch-test |1 + 2 files changed, 26 insertions(+), 0 deletions(-) create mode 100755 test/config diff --git a/test/config b/test/config new file mode 100755 index 000..75f662d --- /dev/null +++

[PATCH v3 5/5] man: Document 'config list' command

2012-04-05 Thread Peter Wang
Document the 'config list' command and its output. --- man/man1/notmuch-config.1 | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/man/man1/notmuch-config.1 b/man/man1/notmuch-config.1 index 395cb9c..a55dbef 100644 --- a/man/man1/notmuch-config.1 +++

Re: [PATCH v3 4/5] config: Add 'config list' command

2012-04-10 Thread Peter Wang
On Tue, 10 Apr 2012 00:22:01 -0700, Jameson Graef Rollins jroll...@finestructure.net wrote: On Thu, Apr 05 2012, Peter Wang noval...@gmail.com wrote: -if (strcmp (argv[0], get) == 0) +if (strcmp (argv[0], get) == 0) { + if (argc 2) { + fprintf (stderr, Error: notmuch

[PATCH v4 2/6] config: Check 'config get' arity exactly

2012-04-13 Thread Peter Wang
Require that 'config get' is passed exactly one additional argument, instead of silently ignoring extra arguments. As a side-effect, produce more specific error messages for the 'config' command as a whole. --- notmuch-config.c | 19 +++ 1 files changed, 15 insertions(+), 4

[PATCH v4 3/6] test: Add tests for 'config' command

2012-04-13 Thread Peter Wang
Start a new test script. --- test/config | 45 + test/notmuch-test |1 + 2 files changed, 46 insertions(+), 0 deletions(-) create mode 100755 test/config diff --git a/test/config b/test/config new file mode 100755 index 000..9030154

[PATCH v4 4/6] test: Add broken test for 'config list'

2012-04-13 Thread Peter Wang
Proposed functionality. --- test/config | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/test/config b/test/config index 9030154..3bf8098 100755 --- a/test/config +++ b/test/config @@ -42,4 +42,20 @@ test_begin_subtest Remove non-existent key notmuch

[PATCH v4 5/6] config: Add 'config list' command

2012-04-13 Thread Peter Wang
Add a command to list all configuration items with their associated values. One use is as follows: a MUA may prefer to store data in a central notmuch configuration file so that the data is accessible across different machines, e.g. an addressbook. The list command helps to implement features

[PATCH v4 6/6] man: Document 'config list' command

2012-04-13 Thread Peter Wang
Document the 'config list' command and its output. --- man/man1/notmuch-config.1 | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/man/man1/notmuch-config.1 b/man/man1/notmuch-config.1 index 395cb9c..a55dbef 100644 --- a/man/man1/notmuch-config.1 +++

[PATCH] NEWS: add news item for 'config list'

2012-04-28 Thread Peter Wang
--- NEWS |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index a2cd080..4f36dff 100644 --- a/NEWS +++ b/NEWS @@ -52,6 +52,11 @@ Raw show format changes encoded in the original message, including the part's headers. Leaf parts, as before, output the

[announce] Bower 0.3

2012-05-04 Thread Peter Wang
Hi, Bower is yet another curses frontend for the Notmuch email system. I wrote it for me, but you might like it, too. https://github.com/wangp/bower Bower 0.3 (2012-05-05) == * Add bulk tagging operations; see keys 't', 'T', ' and . * Reply-to-all is now bound to

Re: [PATCH v4 2/4] cli: make --entire-thread=false work for format=json.

2012-05-25 Thread Peter Wang
On Tue, 24 Apr 2012 10:11:13 +0100, Mark Walters markwalters1...@gmail.com wrote: The --entire-thread option in notmuch-show.c defaults to true when format=json. Previously there was no way to turn this off. This patch makes it respect --entire-thread=false. The one subtlety is that we

Re: [PATCH v5 1/5] cli: command line parsing: allow default for keyword options

2012-05-26 Thread Peter Wang
On Sat, 26 May 2012 16:54:50 +0100, Mark Walters markwalters1...@gmail.com wrote: This changes the parsing for keyword options so that if the option is specified with no argument the first possible argument is chosen. This make it easier to add options to existing boolean arguments (the

Re: [PATCH v6 1/6] cli: command line parsing: allow default for keyword options

2012-05-28 Thread Peter Wang
On Sun, 27 May 2012 09:22:21 +0100, Mark Walters markwalters1...@gmail.com wrote: This changes the parsing for keyword options so that if the option is specified with no argument the argument is parsed as if it were passed an empty string. This make it easier to add options to existing

Re: [PATCH v6 3/6] cli: make --entire-thread=false work for format=json.

2012-05-28 Thread Peter Wang
On Sun, 27 May 2012 09:22:23 +0100, Mark Walters markwalters1...@gmail.com wrote: @@ -1036,7 +1047,9 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) switch (format_sel) { case NOTMUCH_FORMAT_JSON: format = format_json; -

search summary and exclusions

2012-05-28 Thread Peter Wang
Hi, Exclusions don't work the way I expected with the search command and --output=summary. I would like messages with excluded tags to be treated as if they don't exist at all, but currently: * excluded messages are counted towards the total * excluded tags are included in the tags set Are

Re: search summary and exclusions

2012-05-28 Thread Peter Wang
On Mon, 28 May 2012 10:03:35 -0700, Jameson Graef Rollins jroll...@finestructure.net wrote: On Mon, May 28 2012, Peter Wang noval...@gmail.com wrote: Exclusions don't work the way I expected with the search command and --output=summary. I would like messages with excluded tags

Re: search summary and exclusions

2012-05-29 Thread Peter Wang
On Tue, 29 May 2012 08:00:00 -0700, Jameson Graef Rollins jroll...@finestructure.net wrote: On Mon, May 28 2012, Peter Wang noval...@gmail.com wrote: % ./notmuch search --format=json --exclude=true -- thread:9598 tag:unread [{thread: 9598, timestamp: 1338231998

Re: [PATCH] cli: make the command line parser's errors more informative.

2012-06-05 Thread Peter Wang
On Sun, 3 Jun 2012 12:48:48 +0100, Mark Walters markwalters1...@gmail.com wrote: +static notmuch_bool_t +_process_int_arg (const notmuch_opt_desc_t *arg_desc, char next, const char *arg_str) { + +char *endptr; +if (next == 0 || arg_str[0] == 0) { + fprintf (stderr, Option

Re: search summary and exclusions

2012-06-17 Thread Peter Wang
On Wed, 30 May 2012 08:49:31 +0100, Mark Walters markwalters1...@gmail.com wrote: On Wed, 30 May 2012, Peter Wang noval...@gmail.com wrote: Maybe there is room for another keyword under --exclude? Yes that might be the best way to go. Something like --exclude=all and then excluded

Re: Notmuch Pick

2012-06-19 Thread Peter Wang
On Tue, 19 Jun 2012 11:52:01 -0700, Jameson Graef Rollins jroll...@finestructure.net wrote: So I think it would be nice and clean if the default json output included all the message headers and the message structure, and then part contents could be retrieved individually. I imagine show

[PATCH 0/8] search --exclude=all

2012-06-20 Thread Peter Wang
Hi, This is Mark's change to add search --exclude=all. I mainly just updated a comment and added some documentation. Mark Walters (2): lib: add --exclude=all option cli: add --exclude=all option to notmuch-search.c Peter Wang (6): test: add tests for search --exclude=all man: clarify

[PATCH 1/8] lib: add --exclude=all option

2012-06-20 Thread Peter Wang
From: Mark Walters markwalters1...@gmail.com Adds a exclude all option to the lib which means that excluded messages are completely ignored (as if they had actually been deleted). --- lib/notmuch-private.h |1 + lib/notmuch.h | 22 +++--- lib/query.cc |

[PATCH 2/8] cli: add --exclude=all option to notmuch-search.c

2012-06-20 Thread Peter Wang
From: Mark Walters markwalters1...@gmail.com Add a --exclude=all option to notmuch search. --- notmuch-search.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index 3be296d..89b5bf9 100644 --- a/notmuch-search.c +++

[PATCH 5/8] man: clarify search --exclude=flag

2012-06-20 Thread Peter Wang
Improve the description of the search --exclude=flag option, using text taken from the commit that introduced the option. --- man/man1/notmuch-search.1 |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/man/man1/notmuch-search.1 b/man/man1/notmuch-search.1 index

[PATCH 6/8] man: document search --exclude=all

2012-06-20 Thread Peter Wang
Document the new search --exclude=all option. --- man/man1/notmuch-search.1 |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/man/man1/notmuch-search.1 b/man/man1/notmuch-search.1 index e23ca30..1d8d57a 100644 --- a/man/man1/notmuch-search.1 +++

[PATCH 7/8] lib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t

2012-06-20 Thread Peter Wang
Add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t so that it can cover all four values of search --exclude in the cli. --- lib/notmuch.h|1 + lib/query.cc |6 -- notmuch-search.c |2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/notmuch.h

[PATCH 8/8] cli: use notmuch_exclude_t in option parser

2012-06-20 Thread Peter Wang
Use notmuch_exclude_t constants directly instead of a redundant enumeration while parsing search --exclude keyword arguments. --- notmuch-search.c | 28 +--- 1 files changed, 9 insertions(+), 19 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index

Re: [PATCH 4/8] man: clarify search --exclude documentation

2012-06-22 Thread Peter Wang
On Wed, 20 Jun 2012 21:08:05 +0100, Mark Walters markwalters1...@gmail.com wrote: I have reviewed all the new parts of this series (judged as being patches 3-8) and the changes made to my two patches and they are all fine (with one small comment below). Patch 1/8 does need a proper review

[PATCH 1/3] test: add basic show, search --format=text tests

2012-06-23 Thread Peter Wang
There didn't seem to be these basic tests for --format=text, as there are for --format=json. These are just the tests from the `json' script, with adjusted expected outputs. --- test/notmuch-test |1 + test/text | 55 + 2 files

[PATCH 3/3] test: add test for showing Reply-To headers

2012-06-23 Thread Peter Wang
Test that show --format=text and --format=json now output Reply-To headers when present. --- test/json |4 ++-- test/text |3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/json b/test/json index 6439788..0a692ac 100755 --- a/test/json +++ b/test/json @@ -3,9 +3,9

Re: [PATCH 2/3] show: output Reply-To headers

2012-07-03 Thread Peter Wang
On Tue, 03 Jul 2012 18:27:23 -0700, Jameson Graef Rollins jroll...@finestructure.net wrote: On Sat, Jun 23 2012, Peter Wang noval...@gmail.com wrote: Output Reply-To headers when present in a message. These were missing in text and json output formats. I don't see why the Reply-To header

Re: [PATCH 2/3] show: output Reply-To headers

2012-07-04 Thread Peter Wang
On Tue, 03 Jul 2012 19:22:18 -0700, Jameson Graef Rollins jroll...@finestructure.net wrote: On Tue, Jul 03 2012, Peter Wang noval...@gmail.com wrote: I want to see what the sender intended, before hitting reply. Given that there have been requests to see a lot of other headers as well, we

Re: [PATCH 0/3] Control notmuch show output

2012-07-11 Thread Peter Wang
On Sat, 7 Jul 2012 16:12:55 +0100, Mark Walters markwalters1...@gmail.com wrote: Do people have any comments in the current form? Very nice! Peter ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v2 4/8] man: clarify search --exclude documentation

2012-07-21 Thread Peter Wang
Highlight excluded messages as a term with a meaning that may not be obvious. Be explicit about the effects of search --exclude=true and --exclude=false. --- man/man1/notmuch-search.1 | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git

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

2012-07-25 Thread Peter Wang
program, (just index and search) + * + * Copyright © 2012 Peter Wang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your

[PATCH 02/18] insert: open database

2012-07-25 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 03/18] insert: open Maildir tmp file

2012-07-25 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 04/18] insert: copy stdin to Maildir tmp file

2012-07-25 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 05/18] insert: move file from Maildir tmp to new

2012-07-25 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 07/18] insert: add --folder option

2012-07-25 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 08/18] insert: check folder name

2012-07-25 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 09/18] insert: apply default tags to new message

2012-07-25 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 10/18] insert: parse command-line tag operations

2012-07-25 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 11/18] insert: apply command-line tag operations

2012-07-25 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 12/18] insert: add copyright line from notmuch-deliver

2012-07-25 Thread Peter Wang
@@ * * Copyright © 2012 Peter Wang * + * Based in part on notmuch-deliver + * Copyright © 2010 Ali Polatel + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version

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

2012-07-25 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 15/18] man: reference notmuch-insert.1

2012-07-25 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 16/18] insert: add --create-folder option

2012-07-25 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 17/18] man: document insert --create-folder option

2012-07-25 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 18/18] test: test insert --create-folder

2012-07-25 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

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

2012-07-25 Thread Peter Wang
On Wed, 25 Jul 2012 10:11:14 -0700, Jameson Graef Rollins jroll...@finestructure.net 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

Re: [PATCH 1/4] show: indicate length of omitted body content (json)

2012-08-06 Thread Peter Wang
On Sun, 05 Aug 2012 14:37:02 -0700, Jameson Graef Rollins jroll...@finestructure.net wrote: On Sun, Aug 05 2012, Peter Wang noval...@gmail.com wrote: diff --git a/devel/schemata b/devel/schemata index 9cb25f5..3df2764 100644 --- a/devel/schemata +++ b/devel/schemata @@ -69,7 +69,10

Re: [PATCH 1/4] show: indicate length of omitted body content (json)

2012-08-07 Thread Peter Wang
On Mon, 6 Aug 2012 12:47:10 -0400, Austin Clements amdra...@mit.edu wrote: What's the overall goal of adding this? Are you planning to add size information to one of the frontends? Yes, to my frontend. diff --git a/devel/schemata b/devel/schemata index 9cb25f5..3df2764 100644 ---

[PATCH v2 0/3] indicate length of omitted body content

2012-08-08 Thread Peter Wang
, a content-transfer-encoding field was added and comments clarified. In the 3rd commit, the content-length of an encrypted attachment had to be normalised because it varies between runs. Peter Wang (3): test: normalize only message filenames in show json show: indicate length, encoding of omitted

[PATCH v2 1/3] test: normalize only message filenames in show json

2012-08-08 Thread Peter Wang
notmuch_json_show_sanitize replaced filename field values even in part structures, where the value is predictable. Make it only normalize the filename value if it is an absolute path (begins with slash), which is true of the Maildir filenames that were intended to be normalized away. ---

[PATCH v2 2/3] show: indicate length, encoding of omitted body content

2012-08-08 Thread Peter Wang
If a leaf part's body content is omitted, return the encoded length and transfer encoding in --format=json output. This information may be used by the consumer, e.g. to decide whether to download a large attachment over a slow link. Returning the _encoded_ content length is more efficient than

[PATCH v2 3/3] test: conform to content length, encoding fields

2012-08-08 Thread Peter Wang
Update tests to expect content-length and content-transfer-encoding fields in show --format=json output, for leaf parts with omitted body content. --- test/crypto| 30 +- test/json |2 +- test/multipart |9 + 3 files changed, 27

Re: [PATCH 1/4] show: indicate length of omitted body content (json)

2012-08-08 Thread Peter Wang
On Wed, 08 Aug 2012 00:01:06 +0100, Mark Walters markwalters1...@gmail.com wrote: I have two minor queries: do you think omitted text/html parts should also have the length given? Or even should it always be sent? But I am happy with it as is. It could be added. I wouldn't have much use

[announce] Bower 0.4

2012-08-11 Thread Peter Wang
Hi, Bower is yet another curses frontend for the Notmuch email system. I wrote it for me, but you might like it, too. https://github.com/wangp/bower Bower 0.4 (2012-08-12) == This release requires notmuch 0.13 for addressbook completion. * Asynchronous tagging and

Re: [announce] Bower 0.4

2012-08-13 Thread Peter Wang
On Sun, 12 Aug 2012 17:53:43 +0200, David Froger david.fro...@gmail.com wrote: 4. postponed message doesn't work for me. When I postpone a message, it says 'message postponed', but when pressing R from Index view, it says 'No postponed message'. Maybe I need to create a directory

Re: [PATCH 7/8] lib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t

2012-10-20 Thread Peter Wang
On Fri, 19 Oct 2012 01:15:31 -0400, Ethan Glasser-Camp ethan.glasser.c...@gmail.com wrote: Peter Wang noval...@gmail.com writes: Add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t so that it can cover all four values of search --exclude in the cli. This series looks good to me. It's a nice

Re: [PATCH v2 3/3] test: conform to content length, encoding fields

2012-10-20 Thread Peter Wang
On Fri, 19 Oct 2012 22:21:46 -0400, Ethan Glasser-Camp ethan.glasser.c...@gmail.com wrote: diff --git a/test/json b/test/json index ac8fa8e..8ce2e8a 100755 --- a/test/json +++ b/test/json @@ -45,7 +45,7 @@ emacs_deliver_message \ (insert \Message-ID: $id\n\) output=$(notmuch

[PATCH v3] test: conform to content length, encoding fields

2012-10-20 Thread Peter Wang
Update tests to expect content-length and content-transfer-encoding fields in show --format=json output, for leaf parts with omitted body content. --- test/crypto| 30 +- test/json | 4 +++- test/multipart | 9 + 3 files changed, 29 insertions(+), 14

Re: a DoS vulnerability associated with conflated Message-IDs?

2012-10-29 Thread Peter Wang
On Thu, 08 Mar 2012 11:37:09 -0500, Daniel Kahn Gillmor d...@fifthhorseman.net wrote: notmuch currently treats all messages with the same Message-ID as the same message. I think this could be a vulnerability :( If two messages have the same Message-ID, is there a guarantee of which of

[PATCH v2 0/2] include Reply-To headers in json output

2012-10-30 Thread Peter Wang
This obsoletes the series 1340508470-16606-1-git-send-email-noval...@gmail.com Only json output is affected now. Peter Wang (2): show: include Reply-To header in json output test: add test for showing Reply-To headers notmuch-show.c | 7 +++ test/json | 8 2 files changed

[PATCH v2 1/2] show: include Reply-To header in json output

2012-10-30 Thread Peter Wang
Output the Reply-To header field if present in a message. I want to be able to see what the sender intended in my mail client, before hitting the reply key. Only json output is changed, like the recently added Bcc field. --- notmuch-show.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH v2 2/2] test: add test for showing Reply-To headers

2012-10-30 Thread Peter Wang
Test that show --format=json now outputs Reply-To header fields when present. --- test/json | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/json b/test/json index 40d0ba3..bfafd55 100755 --- a/test/json +++ b/test/json @@ -3,18 +3,18 @@

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

2012-11-19 Thread Peter Wang
On Sun, 18 Nov 2012 17:33:46 +, Mark Walters markwalters1...@gmail.com wrote: On Wed, 25 Jul 2012, Peter Wang noval...@gmail.com wrote: Atomically move the new message file from the Maildir 'tmp' directory to 'new'. --- notmuch-insert.c | 18 ++ 1 files changed

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

2012-11-19 Thread Peter Wang
On Sun, 18 Nov 2012 17:35:23 +, Mark Walters markwalters1...@gmail.com wrote: Hi I have now been through essentially the whole series (except the tests) and broadly like it. Just to summarise my concerns from the individual replies here: Thanks for the review. What should insert

[PATCH v2 00/20] insert command

2012-11-24 Thread Peter Wang
- man page wording - comments Due to new restriction on tags beginning with '-', an argument beginning with -- is no longer ambiguous so I have removed the optional -- separator between options and tag operations. Peter Wang (20): tag: factor out tag operation parsing tag: make tag operation

[PATCH v2 01/20] tag: factor out tag operation parsing

2012-11-24 Thread Peter Wang
Factor out parsing of +tag, -tag operations from argv into a separate function. --- notmuch-tag.c | 66 +-- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/notmuch-tag.c b/notmuch-tag.c index 88d559b..35a76db 100644 ---

[PATCH v2 02/20] tag: make tag operation parser public

2012-11-24 Thread Peter Wang
Make the tag operation parser accessible outside notmuch-tag.c so it can be reused by the upcoming insert command. --- notmuch-client.h | 9 + notmuch-tag.c| 17 ++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h

[PATCH v2 03/20] cli: add stub for insert command

2012-11-24 Thread Peter Wang
[]); int diff --git a/notmuch-insert.c b/notmuch-insert.c new file mode 100644 index 000..21424cf --- /dev/null +++ b/notmuch-insert.c @@ -0,0 +1,43 @@ +/* notmuch - Not much of an email program, (just index and search) + * + * Copyright © 2012 Peter Wang + * + * This program is free software: you

[PATCH v2 04/20] insert: open Maildir tmp file

2012-11-24 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 | 105 ++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index

[PATCH v2 05/20] insert: copy stdin to Maildir tmp file

2012-11-24 Thread Peter Wang
Read the new message from standard input into the Maildir tmp file. --- notmuch-insert.c | 51 +++ 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index 371fb47..88e8533 100644 ---

[PATCH v2 06/20] insert: move file from Maildir tmp to new

2012-11-24 Thread Peter Wang
Atomically move the new message file from the Maildir 'tmp' directory to 'new'. --- notmuch-insert.c | 21 + 1 file changed, 21 insertions(+) diff --git a/notmuch-insert.c b/notmuch-insert.c index 88e8533..63a04dc 100644 --- a/notmuch-insert.c +++ b/notmuch-insert.c @@ -94,6

[PATCH v2 07/20] insert: add new message to database

2012-11-24 Thread Peter Wang
Add the new message to the notmuch database, renaming the file to encode notmuch tags as maildir flags. --- notmuch-insert.c | 49 - 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index

[PATCH v2 08/20] insert: support --folder option

2012-11-24 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 file changed, 20 insertions(+), 1 deletion(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index 020dc29..a50eacc 100644 ---

[PATCH v2 10/20] insert: apply default tags to new message

2012-11-24 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 | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/notmuch-insert.c

[PATCH v2 11/20] insert: parse command-line tag operations

2012-11-24 Thread Peter Wang
Reuse the parser in notmuch-tag.c to parse +tag and -tag operations on the 'insert' command-line. --- notmuch-insert.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/notmuch-insert.c b/notmuch-insert.c index 362da66..e4631a2 100644 --- a/notmuch-insert.c +++

[PATCH v2 12/20] insert: apply command-line tag operations

2012-11-24 Thread Peter Wang
Apply the +tag and -tag operations specified on the command-line. --- notmuch-insert.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index e4631a2..81a528c 100644 --- a/notmuch-insert.c +++ b/notmuch-insert.c @@ -174,7

[PATCH v2 13/20] insert: add --create-folder option

2012-11-24 Thread Peter Wang
Support an option to create a new folder in the maildir. --- notmuch-insert.c | 92 1 file changed, 92 insertions(+) diff --git a/notmuch-insert.c b/notmuch-insert.c index 81a528c..b7aef95 100644 --- a/notmuch-insert.c +++

[PATCH v2 14/20] insert: fsync after writing tmp file

2012-11-24 Thread Peter Wang
Flush the tmp file to disk after writing for durability. --- notmuch-insert.c | 4 1 file changed, 4 insertions(+) diff --git a/notmuch-insert.c b/notmuch-insert.c index b7aef95..f09c579 100644 --- a/notmuch-insert.c +++ b/notmuch-insert.c @@ -329,6 +329,10 @@ insert_message (void *ctx,

[PATCH v2 15/20] insert: fsync new directory after rename

2012-11-24 Thread Peter Wang
After moving the file from the 'tmp' to the 'new' directory, fsync on the 'new' directory for durability. --- notmuch-insert.c | 39 --- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index f09c579..831b322

[PATCH v2 16/20] insert: trap SIGINT and clean up

2012-11-24 Thread Peter Wang
The only potentially long-running part of the 'insert' command should be copying stdin to the 'tmp' file. If SIGINT is received during the copying process, abort and clean up the file in 'tmp'. At all other points, just ignore the signal and continue. --- notmuch-insert.c | 27

[PATCH v2 17/20] insert: add copyright line from notmuch-deliver

2012-11-24 Thread Peter Wang
Peter Wang * + * Based in part on notmuch-deliver + * Copyright © 2010 Ali Polatel + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License

[PATCH v2 18/20] test: add tests for insert

2012-11-24 Thread Peter Wang
Add tests for new 'insert' command. --- test/insert | 93 +++ test/notmuch-test | 1 + 2 files changed, 94 insertions(+) create mode 100755 test/insert diff --git a/test/insert b/test/insert new file mode 100755 index 000..d821a41

  1   2   3   4   5   >