[RFC] vim plugin rewrite II

2012-01-14 Thread anton
Hi, this is a followup to my mail from spring where i presented a partial rewrite of the vim plugin using python. There weren't many comments back then, so I hope there will be more now. I've changed the filenames so my version now coexists with the current vim plugin. You can find it in

Re: revised patch for gmime init, with test.

2012-01-14 Thread Pieter Praet
On Thu, 12 Jan 2012 23:46:46 -0400, David Bremner da...@tethera.net wrote: On Thu, 12 Jan 2012 18:25:38 +0100, Pieter Praet pie...@praet.org wrote: On Sat, 31 Dec 2011 23:22:46 -0400, David Bremner da...@tethera.net wrote: with differing hashes), this has the potential of causing confusion

Re: revised patch for gmime init, with test.

2012-01-14 Thread Pieter Praet
On Fri, 13 Jan 2012 05:05:35 -0400, David Bremner da...@tethera.net wrote: On Thu, 12 Jan 2012 23:46:46 -0400, David Bremner da...@tethera.net wrote: On Thu, 12 Jan 2012 18:25:38 +0100, Pieter Praet pie...@praet.org wrote: On Sat, 31 Dec 2011 23:22:46 -0400, David Bremner da...@tethera.net

Re: [PATCH] test: cli: getting/setting/removing config values

2012-01-14 Thread Pieter Praet
On Thu, 12 Jan 2012 23:42:04 -0400, David Bremner da...@tethera.net wrote: On Thu, 12 Jan 2012 18:30:01 +0100, Pieter Praet pie...@praet.org wrote: Should have come before commit 1df71b55 This doesn't seem like an especially helpful commit message. Editorializing is ok, I guess, but maybe

Re: [PATCH 2/2] NEWS: fix some old typos and trailing whitespace

2012-01-14 Thread Pieter Praet
On Thu, 12 Jan 2012 23:11:35 -0400, David Bremner da...@tethera.net wrote: On Thu, 12 Jan 2012 18:06:14 +0100, Pieter Praet pie...@praet.org wrote: That would indeed have been the most sensible thing to do. Could someone (who -unlike me- has already submitted his/her public SSH key for

[PATCH] emacs: logically group def{custom,face}s

2012-01-14 Thread Pieter Praet
To allow for expansion whilst keeping everything tidy and organized, move all defcustom/defface variables to the following subgroups, defined in notmuch-lib.el: - Hello - Search - Show - Send - Crypto - Hooks - External Commands - Appearance As an added benefit, defcustom keyword args are now

Re: [PATCH v2] emacs: logically group def{custom,face}s

2012-01-14 Thread Pieter Praet
On Fri, 13 Jan 2012 16:15:59 +, David Edmondson d...@dme.org wrote: On Thu, 12 Jan 2012 23:31:34 -0400, David Bremner da...@tethera.net wrote: On Thu, 12 Jan 2012 18:12:16 +0100, Pieter Praet pie...@praet.org wrote: To allow for expansion whilst keeping everything tidy and organized,

[PATCH] test: don't bail out of `run_emacs' too early when missing prereqs

2012-01-14 Thread Pieter Praet
When running the Emacs tests in verbose mode, only the first missing prereq is reported because the `run_emacs' function is short-circuited early: #+begin_example emacs: Testing emacs interface missing prerequisites: [0] emacs(1) skipping test: [0] Basic notmuch-hello view in

Re: [PATCH] emacs: globally replace non-branching (if (not ... with (unless ...

2012-01-14 Thread Pieter Praet
On Fri, 13 Jan 2012 08:23:55 +, David Edmondson d...@dme.org wrote: On Thu, 12 Jan 2012 18:33:06 +0100, Pieter Praet pie...@praet.org wrote: Less code, same results, without sacrificing readability. +1, but why not replace non-branching `if' with `when' as well? I was planning to do

[PATCH] emacs: globally replace non-branching (if COND (progn ... with (when ...

2012-01-14 Thread Pieter Praet
Less code, same results, without sacrificing readability. --- emacs/notmuch-show.el | 20 +--- emacs/notmuch-wash.el | 47 +++ emacs/notmuch.el | 28 +--- 3 files changed, 45 insertions(+), 50

Re: [PATCH] emacs: globally replace non-branching (if (not ... with (unless ...

2012-01-14 Thread Pieter Praet
On Fri, 13 Jan 2012 16:06:17 +, David Edmondson d...@dme.org wrote: On Thu, 12 Jan 2012 18:33:06 +0100, Pieter Praet pie...@praet.org wrote: Less code, same results, without sacrificing readability. Does this change correctly re-indent the line following the if/unless? It does... Or so

Re: [PATCH] Output unmodified Content-Type header value for JSON format.

2012-01-14 Thread Pieter Praet
On Thu, 12 Jan 2012 12:28:40 -0500, Austin Clements amdra...@mit.edu wrote: Quoth Pieter Praet on Jan 12 at 6:07 pm: On Tue, 22 Nov 2011 22:40:21 -0500, Austin Clements amdra...@mit.edu wrote: Quoth Jameson Graef Rollins on Nov 20 at 12:10 pm: The open question seems to be how we

Re: [PATCH v2] emacs: Cycle through notmuch buffers rather than jumping to the last.

2012-01-14 Thread Pieter Praet
On Wed, 28 Dec 2011 08:29:58 +, David Edmondson d...@dme.org wrote: As suggested by j4ni in #notmuch, rename `notmuch-jump-to-recent-buffer' as `notmuch-cycle-notmuch-buffers' and have it behave accordingly. Consider `message-mode' buffers to be of interest. --- emacs/notmuch.el |

Re: [PATCH v2] emacs: Cycle through notmuch buffers rather than jumping to the last.

2012-01-14 Thread Pieter Praet
On Tue, 10 Jan 2012 22:15:02 +0200, Jani Nikula j...@nikula.org wrote: I don't feel qualified to review, Allow me to disagree: your feeling and reality appear to be disjoint ATM :) Peace -- Pieter ___ notmuch mailing list notmuch@notmuchmail.org

Re: [PATCH] emacs: globally replace non-branching (if (not ... with (unless ...

2012-01-14 Thread Pieter Praet
On Sat, 14 Jan 2012 10:14:57 +0100, Pieter Praet pie...@praet.org wrote: On Fri, 13 Jan 2012 08:23:55 +, David Edmondson d...@dme.org wrote: On Thu, 12 Jan 2012 18:33:06 +0100, Pieter Praet pie...@praet.org wrote: Less code, same results, without sacrificing readability. +1, but why

Re: [PATCH] test: cli: getting/setting/removing config values

2012-01-14 Thread David Bremner
On Sat, 14 Jan 2012 09:57:56 +0100, Pieter Praet pie...@praet.org wrote: Full test coverage for getting, setting and removing options in notmuch(1)'s config file ($NOTMUCH_CONFIG or $HOME/.notmuch-config). --- + +# FIXME: Not the most robust nor portable solution here... +# Especially

[PATCH v5 0/5] reply to sender

2012-01-14 Thread Jani Nikula
Hi all, hopefully the final round with only the comment and commit message fixes to issues in patches 1 and 2 spotted by Austin and Mark. Thanks again for a thorough review! BR, Jani. Jani Nikula (4): cli: slightly refactor notmuch reply address scanning functions cli: add support for

[PATCH v5 1/5] cli: slightly refactor notmuch reply address scanning functions

2012-01-14 Thread Jani Nikula
Slightly refactor notmuch reply recipient and user from address scanning functions in preparation for reply-to-sender feature. Add support for not adding recipients at all (just scan for user from address), and returning the number of recipients added. No externally visible functional changes.

[PATCH v5 2/5] cli: add support for replying just to the sender in notmuch reply

2012-01-14 Thread Jani Nikula
Add new option --reply-to=(all|sender) to notmuch reply to select whether to reply to all (sender and all recipients), or just sender. Reply to all remains the default. Credits to Mark Walters markwalters1...@gmail.com for his similar earlier work where I picked up the basic idea of handling

[PATCH v5 3/5] emacs: add support for replying just to the sender

2012-01-14 Thread Jani Nikula
Provide reply to sender counterparts to the search and show reply functions. Add key binding 'R' to reply to sender, while keeping 'r' as reply to all, both in search and show views. Signed-off-by: Jani Nikula j...@nikula.org --- emacs/notmuch-mua.el |9 ++--- emacs/notmuch-show.el |

[PATCH v5 4/5] emacs: bind 'r' to reply-to-sender and 'R' to reply-to-all

2012-01-14 Thread Jani Nikula
Change the default reply key bindings, making 'r' reply-to-sender and 'R' reply-to-all. Signed-off-by: Jani Nikula j...@nikula.org --- There were mixed feelings about this. This as a separate patch so it's easy to drop if needed. --- emacs/notmuch-show.el |4 ++-- emacs/notmuch.el |

[PATCH v5 5/5] test: add tests for notmuch reply --reply-to=sender

2012-01-14 Thread Jani Nikula
From: Mark Walters markwalters1...@gmail.com --- test/notmuch-test|1 + test/reply-to-sender | 209 ++ 2 files changed, 210 insertions(+), 0 deletions(-) create mode 100755 test/reply-to-sender diff --git a/test/notmuch-test

Re: [PATCH v5 1/5] cli: slightly refactor notmuch reply address scanning functions

2012-01-14 Thread David Bremner
On Sat, 14 Jan 2012 16:46:15 +0200, Jani Nikula j...@nikula.org wrote: Slightly refactor notmuch reply recipient and user from address scanning functions in preparation for reply-to-sender feature. Pushed, bindings change and all. This series definitely needs a NEWS item. Perhaps some kind

[PATCH] NEWS: add news items for reply to sender

2012-01-14 Thread Jani Nikula
--- NEWS | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index bf21e64..1161c22 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,26 @@ +Notmuch 0.12 (2012-xx-xx) += + +Command-Line Interface +-- +

Re: [PATCH v5 1/5] cli: slightly refactor notmuch reply address scanning functions

2012-01-14 Thread Jani Nikula
For those not on IRC: On Sat, 14 Jan 2012 11:31:16 -0400, David Bremner da...@tethera.net wrote: This series definitely needs a NEWS item. id:1326559168-29178-1-git-send-email-j...@nikula.org Perhaps some kind soul could add a wiki entry explaining to people how to swap the bindings, just

Re: [PATCH] emacs: logically group def{custom,face}s

2012-01-14 Thread Austin Clements
Quoth Pieter Praet on Jan 14 at 10:04 am: To allow for expansion whilst keeping everything tidy and organized, move all defcustom/defface variables to the following subgroups, defined in notmuch-lib.el: - Hello - Search - Show - Send - Crypto - Hooks - External Commands - Appearance

Re: [PATCH] emacs: logically group def{custom,face}s

2012-01-14 Thread Jameson Graef Rollins
I like all of Austin's description suggestions. jamie. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH 2/4] reply: Add a JSON reply format.

2012-01-14 Thread Jani Nikula
On Sun, 8 Jan 2012 00:52:40 -0700, Adam Wolfe Gordon awg+notm...@xvx.ca wrote: From: Adam Wolfe Gordon a...@xvx.ca This new JSON format for replies includes headers generated for a reply message as well as the headers and all text parts of the original message. Using this data, a client

[PATCH 1/2] test: add known broken test for reply from address in named group list

2012-01-14 Thread Jani Nikula
If a message was received to the user's address that was in a named group list, notmuch reply does not use that address for picking the from address. Groups lists are of the form: foo:b...@example.com,b...@example.com; Signed-off-by: Jani Nikula j...@nikula.org --- test/reply | 19

[PATCH 2/2] cli: pick the user's address in a group list as from address

2012-01-14 Thread Jani Nikula
Messages received to a group list were not replied to using the from address in the list. Fix it. Signed-off-by: Jani Nikula j...@nikula.org --- notmuch-reply.c |2 +- test/reply |1 - 2 files changed, 1 insertions(+), 2 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c

Re: [PATCH 2/2] cli: pick the user's address in a group list as from address

2012-01-14 Thread Austin Clements
Quoth Jani Nikula on Jan 14 at 11:49 pm: Messages received to a group list were not replied to using the from address in the list. Fix it. Signed-off-by: Jani Nikula j...@nikula.org Both LGTM. ___ notmuch mailing list notmuch@notmuchmail.org

Re: [PATCH v2 2/3] lib: Add support for automatically excluding tags from queries

2012-01-14 Thread Jameson Graef Rollins
It looks like something in this patch is causing the following build warning: CXX -O2 lib/query.o lib/query.cc:26:8: warning: ‘_notmuch_query’ declared with greater visibility than the type of its field ‘_notmuch_query::exclude_terms’ [-Wattributes] However, I can't quite figure out what's

Re: [PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-14 Thread Jameson Graef Rollins
This patch looks fine. Philosophical UI discussion to follow: On Fri, 13 Jan 2012 18:07:04 -0500, Austin Clements amdra...@mit.edu wrote: +if (notmuch_config_get_auto_exclude_tags (config, tmp) == NULL) { + const char *tags[] = { deleted, spam }; +

Re: [PATCH v2 2/3] lib: Add support for automatically excluding tags from queries

2012-01-14 Thread Austin Clements
Quoth Jameson Graef Rollins on Jan 14 at 3:38 pm: It looks like something in this patch is causing the following build warning: CXX -O2 lib/query.o lib/query.cc:26:8: warning: ‘_notmuch_query’ declared with greater visibility than the type of its field ‘_notmuch_query::exclude_terms’

Re: [PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-14 Thread Austin Clements
Quoth Jameson Graef Rollins on Jan 14 at 3:40 pm: This patch looks fine. Philosophical UI discussion to follow: On Fri, 13 Jan 2012 18:07:04 -0500, Austin Clements amdra...@mit.edu wrote: +if (notmuch_config_get_auto_exclude_tags (config, tmp) == NULL) { + const char *tags[] = {

[PATCH v3 0/2] Automatic tag-based exclusion

2012-01-14 Thread Austin Clements
This fixes the symbol visibility warning Jamie pointed out. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v3 1/2] lib: Add support for automatically excluding tags from queries

2012-01-14 Thread Austin Clements
This is useful for tags like deleted and spam that people generally want to exclude from query results. These exclusions will be overridden if a tag is explicitly mentioned in a query. --- lib/notmuch-private.h |2 +- lib/notmuch.h |6 ++ lib/query.cc | 35

[PATCH v3 2/2] search: Support automatic tag exclusions

2012-01-14 Thread Austin Clements
This adds a search section to the config file and an auto_tag_exclusions setting in that section. The search and count commands pass tag tags from the configuration to the library. --- notmuch-client.h |8 notmuch-config.c | 42 ++

The overloading of show (was Re: [PATCH] Output unmodified Content-Type header value for JSON format.)

2012-01-14 Thread Austin Clements
(was in reply to id:87ehv2proa@praet.org, but I wanted to start a new top-level thread) Quoth Pieter Praet on Jan 14 at 10:19 am: On Thu, 12 Jan 2012 12:28:40 -0500, Austin Clements amdra...@mit.edu wrote: Quoth Pieter Praet on Jan 12 at 6:07 pm: On Tue, 22 Nov 2011 22:40:21 -0500,

New dump/restore format.

2012-01-14 Thread David Bremner
This version of this series add fairly extensive testing with strange message ids full of spaces and punctuation, and some documentation. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v3 05/10] test: add test for dump --format=notmuch

2012-01-14 Thread David Bremner
From: David Bremner brem...@debian.org The first test is really to test our assumptions about the corpus, namely that a certain set of message-id's is safe (i.e. doesn't change under hex-escaping). We then check dump output as best we can without functionality-to-come in notmuch-restore. ---

[PATCH v3 07/10] test: second set of dump/restore --format=notmuch tests

2012-01-14 Thread David Bremner
From: David Bremner brem...@debian.org These one need the completed functionality in notmuch-restore. Fairly exotic tags are tested, but no weird message id's. We test each possible input to autodetection, both explicit (with --format=auto) and implicit (without --format). --- test/dump-restore

[PATCH v3 06/10] notmuch-restore: add 'notmuch format' support, auto detect

2012-01-14 Thread David Bremner
From: David Bremner brem...@debian.org This is format is whitespace separated tokens, encoded by util/hex-escape.c The format detection heuristic relies on the fact that '(' is not part of the character set used by hex-escape. Since hex-escape is designed to be OK for pathnames (and shells),

[PATCH v3 08/10] notmuch-{dump, restore}.1: document new format options

2012-01-14 Thread David Bremner
From: David Bremner brem...@debian.org More or less arbitrarily, notmuch-dump.1 gets the more detailed description of the format. --- man/man1/notmuch-dump.1| 59 ++- man/man1/notmuch-restore.1 | 60 ++- 2

[PATCH v3 09/10] random-dump.c: new test-binary to generate dump files

2012-01-14 Thread David Bremner
From: David Bremner brem...@debian.org This binary creates a torture test dump file for the new dump format. --- test/Makefile.local |4 ++ test/basic |2 +- test/random-dump.c | 144 +++ 3 files changed, 149 insertions(+), 1

[PATCH v3 04/10] notmuch-dump: add --format=(notmuch|sup)

2012-01-14 Thread David Bremner
From: David Bremner brem...@debian.org sup is the old format, and remains the default. Each line of the notmuch format is msg_id tag tag...tag where each space seperated token is 'hex-encoded' to remove troubling characters. In particular this format won't have the same problem with e.g. spaces

[PATCH v3 10/10] test: new random message-id and tags dump/restore test.

2012-01-14 Thread David Bremner
From: David Bremner brem...@debian.org The idea is to generate a random dump file, and then generate minimal mail messages from that. Currently this relies on the behaviour of the gmime message-id parser that if it cannot find a leading '' in the Message-Id field, it just copies the string

[PATCH v3 02/10] test/hex-xcode: new test binary

2012-01-14 Thread David Bremner
From: David Bremner brem...@debian.org This program is used both as a test-bed/unit-tester for ../util/hex-escape.c, and also as a utility in future tests of dump and restore. --- test/.gitignore |1 + test/Makefile.local |6 ++- test/basic |2 +- test/hex-xcode.c|

[PATCH v3 03/10] test/hex-escaping: new test for hex escaping routines

2012-01-14 Thread David Bremner
From: David Bremner brem...@debian.org These are more like unit tests, to (try to) make sure the library functionality is working before building more complicated things on top of it. --- test/hex-escaping | 26 ++ test/notmuch-test |1 + 2 files changed, 27

Re: [RFC] vim plugin rewrite II

2012-01-14 Thread David Bremner
On Sat, 14 Jan 2012 08:54:43 +0100, an...@khirnov.net wrote: The advantages over current vim client are still the following: * sending and displaying/saving attachments * much better unicode support * tag name and search commands completion * proper representation of the thread structure *

[RFC] vim plugin rewrite II

2012-01-14 Thread an...@khirnov.net
Hi, this is a followup to my mail from spring where i presented a partial rewrite of the vim plugin using python. There weren't many comments back then, so I hope there will be more now. I've changed the filenames so my version now coexists with the current vim plugin. You can find it in

revised patch for gmime init, with test.

2012-01-14 Thread Pieter Praet
On Thu, 12 Jan 2012 23:46:46 -0400, David Bremner wrote: > On Thu, 12 Jan 2012 18:25:38 +0100, Pieter Praet wrote: > > On Sat, 31 Dec 2011 23:22:46 -0400, David Bremner > > wrote: > > > with differing hashes), this has the potential of causing confusion > > and/or quite some extra work when

revised patch for gmime init, with test.

2012-01-14 Thread Pieter Praet
On Fri, 13 Jan 2012 05:05:35 -0400, David Bremner wrote: > On Thu, 12 Jan 2012 23:46:46 -0400, David Bremner > wrote: > > On Thu, 12 Jan 2012 18:25:38 +0100, Pieter Praet > > wrote: > > > On Sat, 31 Dec 2011 23:22:46 -0400, David Bremner > > > wrote: > > > > > with differing hashes), this

[PATCH] test: cli: getting/setting/removing config values

2012-01-14 Thread Pieter Praet
On Thu, 12 Jan 2012 23:42:04 -0400, David Bremner wrote: > On Thu, 12 Jan 2012 18:30:01 +0100, Pieter Praet wrote: > > Should have come before commit 1df71b55 > > This doesn't seem like an especially helpful commit > message. Editorializing is ok, I guess, but maybe keep it below the > '---' ?

[PATCH] test: cli: getting/setting/removing config values

2012-01-14 Thread Pieter Praet
Full test coverage for getting, setting and removing options in notmuch(1)'s config file ($NOTMUCH_CONFIG or $HOME/.notmuch-config). --- Please *do* take note of the FIXME in the last test! test/config | 88 + test/notmuch-test |1

[PATCH v2] Output unmodified Content-Type header value for JSON format.

2012-01-14 Thread Pieter Praet
On Thu, 12 Jan 2012 23:16:29 -0400, David Bremner wrote: > On Thu, 12 Jan 2012 18:08:08 +0100, Pieter Praet wrote: > > > > - The previous point is a bit of a counterargument to this, but in > > > > I couls separate it. I made is a single patch to avoid having a > > > revision with broken emacs

[PATCH 2/2] NEWS: fix some old typos and trailing whitespace

2012-01-14 Thread Pieter Praet
On Thu, 12 Jan 2012 23:11:35 -0400, David Bremner wrote: > On Thu, 12 Jan 2012 18:06:14 +0100, Pieter Praet wrote: > > That would indeed have been the most sensible thing to do. > > > > Could someone (who -unlike me- has already submitted his/her public SSH > > key for commit access) add

[PATCH v2] emacs: logically group def{custom,face}s

2012-01-14 Thread Pieter Praet
On Thu, 12 Jan 2012 23:31:34 -0400, David Bremner wrote: > On Thu, 12 Jan 2012 18:12:16 +0100, Pieter Praet wrote: > > To allow for expansion whilst keeping everything tidy and organized, > > move all defcustom/defface variables to the following subgroups, > > defined in notmuch-lib.el: > > > >

[PATCH] emacs: logically group def{custom,face}s

2012-01-14 Thread Pieter Praet
To allow for expansion whilst keeping everything tidy and organized, move all defcustom/defface variables to the following subgroups, defined in notmuch-lib.el: - Hello - Search - Show - Send - Crypto - Hooks - External Commands - Appearance As an added benefit, defcustom keyword args are now

[PATCH v2] emacs: logically group def{custom,face}s

2012-01-14 Thread Pieter Praet
On Fri, 13 Jan 2012 16:15:59 +, David Edmondson wrote: > On Thu, 12 Jan 2012 23:31:34 -0400, David Bremner > wrote: > > On Thu, 12 Jan 2012 18:12:16 +0100, Pieter Praet > > wrote: > > > To allow for expansion whilst keeping everything tidy and organized, > > > move all defcustom/defface

[PATCH] test: don't bail out of `run_emacs' too early when missing prereqs

2012-01-14 Thread Pieter Praet
On Thu, 12 Jan 2012 21:34:29 +0400, Dmitry Kurochkin wrote: > On Thu, 12 Jan 2012 18:16:59 +0100, Pieter Praet wrote: > > When running the Emacs tests in verbose mode, only the first missing > > prereq is reported because the `run_emacs' function is short-circuited > > early: > > > >

[PATCH] test: don't bail out of `run_emacs' too early when missing prereqs

2012-01-14 Thread Pieter Praet
When running the Emacs tests in verbose mode, only the first missing prereq is reported because the `run_emacs' function is short-circuited early: #+begin_example emacs: Testing emacs interface missing prerequisites: [0] emacs(1) skipping test: [0] Basic notmuch-hello view in

[PATCH] emacs: globally replace non-branching "(if (not ..." with "(unless ..."

2012-01-14 Thread Pieter Praet
On Fri, 13 Jan 2012 08:23:55 +, David Edmondson wrote: > On Thu, 12 Jan 2012 18:33:06 +0100, Pieter Praet wrote: > > Less code, same results, without sacrificing readability. > > +1, but why not replace non-branching `if' with `when' as well? I was planning to do that when the `unless'

[PATCH] emacs: globally replace non-branching "(if COND (progn ..." with "(when ..."

2012-01-14 Thread Pieter Praet
Less code, same results, without sacrificing readability. --- emacs/notmuch-show.el | 20 +--- emacs/notmuch-wash.el | 47 +++ emacs/notmuch.el | 28 +--- 3 files changed, 45 insertions(+), 50

[PATCH] emacs: globally replace non-branching "(if (not ..." with "(unless ..."

2012-01-14 Thread Pieter Praet
On Fri, 13 Jan 2012 16:06:17 +, David Edmondson wrote: > On Thu, 12 Jan 2012 18:33:06 +0100, Pieter Praet wrote: > > Less code, same results, without sacrificing readability. > > Does this change correctly re-indent the line following the if/unless? It does... Or so I thought... I appear

[PATCH] Output unmodified Content-Type header value for JSON format.

2012-01-14 Thread Pieter Praet
On Thu, 12 Jan 2012 12:28:40 -0500, Austin Clements wrote: > Quoth Pieter Praet on Jan 12 at 6:07 pm: > > On Tue, 22 Nov 2011 22:40:21 -0500, Austin Clements > > wrote: > > > Quoth Jameson Graef Rollins on Nov 20 at 12:10 pm: > > > > The open question seems to be how we handle the content

[PATCH v2] emacs: Cycle through notmuch buffers rather than jumping to the last.

2012-01-14 Thread Pieter Praet
On Wed, 28 Dec 2011 08:29:58 +, David Edmondson wrote: > As suggested by j4ni in #notmuch, rename > `notmuch-jump-to-recent-buffer' as `notmuch-cycle-notmuch-buffers' and > have it behave accordingly. > > Consider `message-mode' buffers to be of interest. > --- > emacs/notmuch.el | 42

[PATCH v2] emacs: Cycle through notmuch buffers rather than jumping to the last.

2012-01-14 Thread Pieter Praet
On Tue, 10 Jan 2012 22:15:02 +0200, Jani Nikula wrote: > I don't feel qualified to review, Allow me to disagree: your feeling and reality appear to be disjoint ATM :) Peace -- Pieter

[PATCH] emacs: globally replace non-branching "(if (not ..." with "(unless ..."

2012-01-14 Thread Pieter Praet
On Sat, 14 Jan 2012 10:14:57 +0100, Pieter Praet wrote: > On Fri, 13 Jan 2012 08:23:55 +, David Edmondson wrote: > > On Thu, 12 Jan 2012 18:33:06 +0100, Pieter Praet > > wrote: > > > Less code, same results, without sacrificing readability. > > > > +1, but why not replace non-branching

[PATCH] test: cli: getting/setting/removing config values

2012-01-14 Thread David Bremner
On Sat, 14 Jan 2012 09:57:56 +0100, Pieter Praet wrote: > Full test coverage for getting, setting and removing options in > notmuch(1)'s config file ($NOTMUCH_CONFIG or $HOME/.notmuch-config). > > --- > + > +# FIXME: Not the most robust nor portable solution here... > +# Especially `hostname

notmuch release 0.11 now available

2012-01-14 Thread Xavier Maillard
Hi, congratulations to all of the notmuch contributors. Keep up the effort /Xavier

[PATCH v4 1/5] cli: slightly refactor "notmuch reply" address scanning functions

2012-01-14 Thread Jani Nikula
On Thu, 12 Jan 2012 16:59:05 -0500, Austin Clements wrote: > LGTM. One thing you could fix below (and a few comments), but not > enough alone to warrant a new version. > > Quoth Jani Nikula on Jan 12 at 11:40 pm: > > Slightly refactor "notmuch reply" recipient and user from address scanning > >

[PATCH v5 0/5] reply to sender

2012-01-14 Thread Jani Nikula
Hi all, hopefully the final round with only the comment and commit message fixes to issues in patches 1 and 2 spotted by Austin and Mark. Thanks again for a thorough review! BR, Jani. Jani Nikula (4): cli: slightly refactor "notmuch reply" address scanning functions cli: add support for

[PATCH v5 1/5] cli: slightly refactor "notmuch reply" address scanning functions

2012-01-14 Thread Jani Nikula
Slightly refactor "notmuch reply" recipient and user from address scanning functions in preparation for reply-to-sender feature. Add support for not adding recipients at all (just scan for user from address), and returning the number of recipients added. No externally visible functional changes.

[PATCH v5 2/5] cli: add support for replying just to the sender in "notmuch reply"

2012-01-14 Thread Jani Nikula
Add new option --reply-to=(all|sender) to "notmuch reply" to select whether to reply to all (sender and all recipients), or just sender. Reply to all remains the default. Credits to Mark Walters for his similar earlier work where I picked up the basic idea of handling reply-to-sender in

[PATCH v5 3/5] emacs: add support for replying just to the sender

2012-01-14 Thread Jani Nikula
Provide reply to sender counterparts to the search and show reply functions. Add key binding 'R' to reply to sender, while keeping 'r' as reply to all, both in search and show views. Signed-off-by: Jani Nikula --- emacs/notmuch-mua.el |9 ++--- emacs/notmuch-show.el | 10 --

[PATCH v5 4/5] emacs: bind 'r' to reply-to-sender and 'R' to reply-to-all

2012-01-14 Thread Jani Nikula
Change the default reply key bindings, making 'r' reply-to-sender and 'R' reply-to-all. Signed-off-by: Jani Nikula --- There were mixed feelings about this. This as a separate patch so it's easy to drop if needed. --- emacs/notmuch-show.el |4 ++-- emacs/notmuch.el |4 ++-- 2

[PATCH v5 5/5] test: add tests for "notmuch reply" --reply-to=sender

2012-01-14 Thread Jani Nikula
From: Mark Walters --- test/notmuch-test|1 + test/reply-to-sender | 209 ++ 2 files changed, 210 insertions(+), 0 deletions(-) create mode 100755 test/reply-to-sender diff --git a/test/notmuch-test

[PATCH] Fix build warning: "/*" within comment

2012-01-14 Thread David Bremner
On Fri, 13 Jan 2012 22:08:23 -0500, Austin Clements wrote: > --- > notmuch-show.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) Pushed.

[PATCH v5 1/5] cli: slightly refactor "notmuch reply" address scanning functions

2012-01-14 Thread David Bremner
On Sat, 14 Jan 2012 16:46:15 +0200, Jani Nikula wrote: > Slightly refactor "notmuch reply" recipient and user from address scanning > functions in preparation for reply-to-sender feature. > Pushed, bindings change and all. This series definitely needs a NEWS item. Perhaps some kind soul

[PATCH] NEWS: add news items for reply to sender

2012-01-14 Thread Jani Nikula
--- NEWS | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index bf21e64..1161c22 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,26 @@ +Notmuch 0.12 (2012-xx-xx) += + +Command-Line Interface +-- +

[PATCH v5 1/5] cli: slightly refactor "notmuch reply" address scanning functions

2012-01-14 Thread Jani Nikula
For those not on IRC: On Sat, 14 Jan 2012 11:31:16 -0400, David Bremner wrote: > This series definitely needs a NEWS item. id:"1326559168-29178-1-git-send-email-jani at nikula.org" > Perhaps some kind soul could add a wiki entry explaining to people how > to swap the bindings, just in case

[PATCH] Set fill column to 70 in .dir-locals.el and refactor other settings.

2012-01-14 Thread Xavier Maillard
On Fri, 13 Jan 2012 17:54:51 -0500, Austin Clements wrote: > Quoth Xavier Maillard on Jan 13 at 11:42 pm: > > > > This controls where comments and other text wraps. 70 is the default > > value, so this simply returns it to the default for people who have > > overridden it. Most notmuch code

[PATCH] emacs: logically group def{custom,face}s

2012-01-14 Thread Austin Clements
Quoth Pieter Praet on Jan 14 at 10:04 am: > To allow for expansion whilst keeping everything tidy and organized, > move all defcustom/defface variables to the following subgroups, > defined in notmuch-lib.el: > > - Hello > - Search > - Show > - Send > - Crypto > - Hooks > - External Commands > -

[PATCH] emacs: logically group def{custom,face}s

2012-01-14 Thread Jameson Graef Rollins
I like all of Austin's description suggestions. jamie.

[PATCH 2/4] reply: Add a JSON reply format.

2012-01-14 Thread Jani Nikula
On Sun, 8 Jan 2012 00:52:40 -0700, Adam Wolfe Gordon wrote: > From: Adam Wolfe Gordon > > This new JSON format for replies includes headers generated for a reply > message as well as the headers and all text parts of the original message. > Using this data, a client can

[PATCH 1/2] test: add known broken test for reply from address in named group list

2012-01-14 Thread Jani Nikula
If a message was received to the user's address that was in a named group list, notmuch reply does not use that address for picking the from address. Groups lists are of the form: foo:bar at example.com,baz at example.com; Signed-off-by: Jani Nikula --- test/reply | 19 +++ 1

[PATCH 2/2] cli: pick the user's address in a group list as from address

2012-01-14 Thread Jani Nikula
Messages received to a group list were not replied to using the from address in the list. Fix it. Signed-off-by: Jani Nikula --- notmuch-reply.c |2 +- test/reply |1 - 2 files changed, 1 insertions(+), 2 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index

[PATCH 2/2] cli: pick the user's address in a group list as from address

2012-01-14 Thread Austin Clements
Quoth Jani Nikula on Jan 14 at 11:49 pm: > Messages received to a group list were not replied to using the from > address in the list. Fix it. > > Signed-off-by: Jani Nikula Both LGTM.

[PATCH v2 0/3]

2012-01-14 Thread Jameson Graef Rollins
t part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120114/b5536f12/attachment.pgp>

[PATCH v2 2/3] lib: Add support for automatically excluding tags from queries

2012-01-14 Thread Jameson Graef Rollins
not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120114/acc758bf/attachment.pgp>

[PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-14 Thread Jameson Graef Rollins
s. jamie. -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120114/e0873110/attachment.pgp>

[PATCH v2 2/3] lib: Add support for automatically excluding tags from queries

2012-01-14 Thread Austin Clements
Quoth Jameson Graef Rollins on Jan 14 at 3:38 pm: > It looks like something in this patch is causing the following build > warning: > > CXX -O2 lib/query.o > lib/query.cc:26:8: warning: ?_notmuch_query? declared with greater visibility > than the type of its field >

[PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-14 Thread Austin Clements
Quoth Jameson Graef Rollins on Jan 14 at 3:40 pm: > This patch looks fine. Philosophical UI discussion to follow: > > On Fri, 13 Jan 2012 18:07:04 -0500, Austin Clements > wrote: > > +if (notmuch_config_get_auto_exclude_tags (config, ) == NULL) { > > + const char *tags[] = { "deleted",

[PATCH v3 0/2] Automatic tag-based exclusion

2012-01-14 Thread Austin Clements
This fixes the symbol visibility warning Jamie pointed out.

[PATCH v3 1/2] lib: Add support for automatically excluding tags from queries

2012-01-14 Thread Austin Clements
This is useful for tags like "deleted" and "spam" that people generally want to exclude from query results. These exclusions will be overridden if a tag is explicitly mentioned in a query. --- lib/notmuch-private.h |2 +- lib/notmuch.h |6 ++ lib/query.cc | 35

[PATCH v3 2/2] search: Support automatic tag exclusions

2012-01-14 Thread Austin Clements
This adds a "search" section to the config file and an "auto_tag_exclusions" setting in that section. The search and count commands pass tag tags from the configuration to the library. --- notmuch-client.h |8 notmuch-config.c | 42 ++

The overloading of show (was Re: [PATCH] Output unmodified Content-Type header value for JSON format.)

2012-01-14 Thread Austin Clements
(was in reply to id:87ehv2proa.fsf at praet.org, but I wanted to start a new top-level thread) Quoth Pieter Praet on Jan 14 at 10:19 am: > On Thu, 12 Jan 2012 12:28:40 -0500, Austin Clements > wrote: > > Quoth Pieter Praet on Jan 12 at 6:07 pm: > > > On Tue, 22 Nov 2011 22:40:21 -0500, Austin

New dump/restore format.

2012-01-14 Thread David Bremner
This version of this series add fairly extensive testing with strange message ids full of spaces and punctuation, and some documentation.

[PATCH v3 05/10] test: add test for dump --format=notmuch

2012-01-14 Thread David Bremner
From: David Bremner The first test is really to test our assumptions about the corpus, namely that a certain set of message-id's is safe (i.e. doesn't change under hex-escaping). We then check dump output as best we can without functionality-to-come in notmuch-restore. ---

  1   2   >