[Patch v7 0/6] Allow JSON to use non-entire thread, and use for elide

2012-06-03 Thread Mark Walters
This is version 7 of this patch set: the previous version is at id:"1338106946-7611-1-git-send-email-markwalters1...@gmail.com". I have fixed the whitespace errors, and simplified the logic in notmuch-show.c as suggested by Peter. I did not update the error output string as what is there is consi

[Patch v7 1/6] cli: command line parsing: allow default for keyword options

2012-06-03 Thread Mark Walters
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 boolean arguments (the existing --option can default to TRUE). --- command-line-arguments.c

[Patch v7 2/6] cli: Let json output "null" messages for non --entire-thread

2012-06-03 Thread Mark Walters
All formats except Json can output empty messages for non entire-thread, but in Json format we output "null" to keep the other elements (e.g. the replies to the omitted message) in the correct place. --- notmuch-client.h |1 + notmuch-show.c | 20 2 files changed, 17 i

[Patch v7 3/6] cli: make --entire-thread=false work for format=json.

2012-06-03 Thread Mark Walters
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. To do this the patch moves the --entire-thread option to be a keyword option using the new command line parsing to allow

[Patch v7 4/6] Update devel/schemata for --entire-thread=false

2012-06-03 Thread Mark Walters
Also remove the Json --entire-thread item from devel/TODO. --- devel/TODO |2 -- devel/schemata |2 +- 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/devel/TODO b/devel/TODO index 7b750af..eb757af 100644 --- a/devel/TODO +++ b/devel/TODO @@ -92,8 +92,6 @@ and email addr

[Patch v7 5/6] emacs: make elide messages use notmuch-show for omitting messages.

2012-06-03 Thread Mark Walters
Previously the elide messages code got the entire-thread from notmuch-show.c and then threw away all non-matching messages. This version calls notmuch-show.c without the --entire-thread flag so it never receives the non-matching messages in the first place. This makes it substantially faster. ---

[Patch v7 6/6] cli: notmuch-show.c fix whitespace error

2012-06-03 Thread Mark Walters
Fix an existing whitespace error since it is right next to the changes of this series. --- notmuch-show.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 61e19b0..b789853 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -1015

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

2012-06-03 Thread Mark Walters
Previously, the cli parser was a little erratic in what errors it reported and would fail silently in many cases (for example, when no argument was passed to an integer option). This was particularly annoying as the user could not (easily) tell whether the command failed or just there were no searc

notmuch release 0.13.2 now available

2012-06-03 Thread David Bremner
Where to obtain notmuch 0.13.2 === http://notmuchmail.org/releases/notmuch-0.13.2.tar.gz Which can be verified with: http://notmuchmail.org/releases/notmuch-0.13.2.tar.gz.sha1 368b2451a64b1e3c574e688100700fc941ff2ea1 notmuch-0.13.2.tar.gz http://notmuchmail.org/

Re: [PATCH] config: add quoting to fix IFS bug

2012-06-03 Thread Tomi Ollila
On Sat, Jun 02 2012, Jameson Graef Rollins wrote: > Without proper quoting the DEFAULT_IFS was getting set incorrectly, > which was causing problems with the storage of some variables later in > the script. Quoting fixes the problem. LGTM Tomi > --- > Thanks to Tomi for the inspiration for t

Re: [PATCH] emacs: Suppress warnings about using cl at runtime

2012-06-03 Thread David Bremner
Austin Clements writes: > It was decided in the thread starting at [0] that it is okay for > notmuch to use 'cl runtime functions. However, by default, these > produce byte compiler warnings. This suppresses those using > file-local variables. Pushed, no idea why it took so long. d __

Re: [PATCH] config: add quoting to fix IFS bug

2012-06-03 Thread David Bremner
Jameson Graef Rollins writes: > Without proper quoting the DEFAULT_IFS was getting set incorrectly, > which was causing problems with the storage of some variables later in > the script. Quoting fixes the problem. Pushed, d ___ notmuch mailing list n

Re: [PATCH] uncrustify.cfg: comments and more types

2012-06-03 Thread David Bremner
Tomi Ollila writes: > Changes to devel/uncrustify.cfg: > > * Updated header comment to state this is config file for *notmuch*. > * Added comment about the reason of 'type' keyword used. > * Added some more custom types woth 'type' keyword. > * Have (every) multiline comment lines start with '*'.

Re: [PATCH] nmbug: check whether every forked process exit with (non)zero value

2012-06-03 Thread David Bremner
Tomi Ollila writes: > If any of the forked process exits with nonzero value, terminate > current operation -- nonzero exit value indicates failure and > then there is no point continuing. Pushed. Ironically I'm still not too sure about the merge strategy thing, I hope I have some time to test i

[PATCH 0/4] Synchronize maildir flags in new/

2012-06-03 Thread Austin Clements
This problem came up again on IRC a few days ago, so I'm finally posting this series (which I've been running locally for months). The idea---which is explained in detail in the first patch---is that messages in new/ are maildir messages with an empty set of maildir flags. Currently we treat such

[PATCH 1/4] test: Add broken test for tag synchronization on files delivered to new/

2012-06-03 Thread Austin Clements
Currently, notmuch new only synchronizs maildir flags to tags for files that have an "info" part. However, in maildir, new mail doesn't gain the info part until it moves from new/ to cur/. Hence, even though mail in new/ doesn't have an info part, it is still a maildir message and thus has maildi

[PATCH 3/4] lib: Only synchronize maildir flags for messages in maildirs

2012-06-03 Thread Austin Clements
--- lib/message.cc |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/message.cc b/lib/message.cc index ed96477..bbac2ff 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -1074,7 +1074,7 @@ notmuch_message_maildir_flags_to_tags (notmuch_message_t *message) cons

[PATCH 2/4] lib: Move _filename_is_in_maildir

2012-06-03 Thread Austin Clements
This way notmuch_message_maildir_flags_to_tags can call it. It makes more sense for this to be just above all of the maildir synchronization code rather than mixed in the middle. --- lib/message.cc | 82 1 file changed, 41 insertions(+),

[PATCH 4/4] lib: Treat messages in new/ as maildir messages with no flags set

2012-06-03 Thread Austin Clements
This fixes the broken test added a few patches ago by synchronizing the tags of messages in new/, even if they have no "info" part. See the test patch for rationale. --- lib/message.cc| 20 +--- test/maildir-sync |1 - 2 files changed, 13 insertions(+), 8 deletions(-) d

Re: notmuch release 0.13.2 now available

2012-06-03 Thread Jostein Berntsen
On 03.06.12,11:36, David Bremner wrote: > > Where to obtain notmuch 0.13.2 > === > http://notmuchmail.org/releases/notmuch-0.13.2.tar.gz > > Which can be verified with: > > http://notmuchmail.org/releases/notmuch-0.13.2.tar.gz.sha1 > 368b2451a64b1e3c574e688100700fc9

[PATCH] emacs: Fix notmuch-message-mark-replied.

2012-06-03 Thread Ingo Lohmar
notmuch-message-mark-replied used "apply" to change message tags according to notmuch-message-replied-tags after sending a reply. This works if the latter is a single-element list. But with the recently changed format of tag changes, it breaks for multiple-element lists. Use "funcall" to properly

[Patch v7 0/6] Allow JSON to use non-entire thread, and use for elide

2012-06-03 Thread Mark Walters
This is version 7 of this patch set: the previous version is at id:"1338106946-7611-1-git-send-email-markwalters1009 at gmail.com". I have fixed the whitespace errors, and simplified the logic in notmuch-show.c as suggested by Peter. I did not update the error output string as what is there is co

[Patch v7 1/6] cli: command line parsing: allow default for keyword options

2012-06-03 Thread Mark Walters
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 boolean arguments (the existing --option can default to TRUE). --- command-line-arguments.c

[Patch v7 2/6] cli: Let json output "null" messages for non --entire-thread

2012-06-03 Thread Mark Walters
All formats except Json can output empty messages for non entire-thread, but in Json format we output "null" to keep the other elements (e.g. the replies to the omitted message) in the correct place. --- notmuch-client.h |1 + notmuch-show.c | 20 2 files changed, 17 i

[Patch v7 3/6] cli: make --entire-thread=false work for format=json.

2012-06-03 Thread Mark Walters
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. To do this the patch moves the --entire-thread option to be a keyword option using the new command line parsing to allow

[Patch v7 4/6] Update devel/schemata for --entire-thread=false

2012-06-03 Thread Mark Walters
Also remove the Json --entire-thread item from devel/TODO. --- devel/TODO |2 -- devel/schemata |2 +- 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/devel/TODO b/devel/TODO index 7b750af..eb757af 100644 --- a/devel/TODO +++ b/devel/TODO @@ -92,8 +92,6 @@ and email addr

[Patch v7 5/6] emacs: make elide messages use notmuch-show for omitting messages.

2012-06-03 Thread Mark Walters
Previously the elide messages code got the entire-thread from notmuch-show.c and then threw away all non-matching messages. This version calls notmuch-show.c without the --entire-thread flag so it never receives the non-matching messages in the first place. This makes it substantially faster. ---

[Patch v7 6/6] cli: notmuch-show.c fix whitespace error

2012-06-03 Thread Mark Walters
Fix an existing whitespace error since it is right next to the changes of this series. --- notmuch-show.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 61e19b0..b789853 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -1015

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

2012-06-03 Thread Mark Walters
Previously, the cli parser was a little erratic in what errors it reported and would fail silently in many cases (for example, when no argument was passed to an integer option). This was particularly annoying as the user could not (easily) tell whether the command failed or just there were no searc

notmuch release 0.13.2 now available

2012-06-03 Thread David Bremner
next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 315 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120603/e838149c/attachment.pgp>

[PATCH] config: add quoting to fix IFS bug

2012-06-03 Thread Tomi Ollila
On Sat, Jun 02 2012, Jameson Graef Rollins wrote: > Without proper quoting the DEFAULT_IFS was getting set incorrectly, > which was causing problems with the storage of some variables later in > the script. Quoting fixes the problem. LGTM Tomi > --- > Thanks to Tomi for the inspiration for

[PATCH] emacs: Suppress warnings about using cl at runtime

2012-06-03 Thread David Bremner
Austin Clements writes: > It was decided in the thread starting at [0] that it is okay for > notmuch to use 'cl runtime functions. However, by default, these > produce byte compiler warnings. This suppresses those using > file-local variables. Pushed, no idea why it took so long. d

[PATCH] config: add quoting to fix IFS bug

2012-06-03 Thread David Bremner
Jameson Graef Rollins writes: > Without proper quoting the DEFAULT_IFS was getting set incorrectly, > which was causing problems with the storage of some variables later in > the script. Quoting fixes the problem. Pushed, d

[PATCH] uncrustify.cfg: comments and more types

2012-06-03 Thread David Bremner
Tomi Ollila writes: > Changes to devel/uncrustify.cfg: > > * Updated header comment to state this is config file for *notmuch*. > * Added comment about the reason of 'type' keyword used. > * Added some more custom types woth 'type' keyword. > * Have (every) multiline comment lines start with '*'.

[PATCH] nmbug: check whether every forked process exit with (non)zero value

2012-06-03 Thread David Bremner
Tomi Ollila writes: > If any of the forked process exits with nonzero value, terminate > current operation -- nonzero exit value indicates failure and > then there is no point continuing. Pushed. Ironically I'm still not too sure about the merge strategy thing, I hope I have some time to test i

[PATCH 0/4] Synchronize maildir flags in new/

2012-06-03 Thread Austin Clements
This problem came up again on IRC a few days ago, so I'm finally posting this series (which I've been running locally for months). The idea---which is explained in detail in the first patch---is that messages in new/ are maildir messages with an empty set of maildir flags. Currently we treat such

[PATCH 1/4] test: Add broken test for tag synchronization on files delivered to new/

2012-06-03 Thread Austin Clements
Currently, notmuch new only synchronizs maildir flags to tags for files that have an "info" part. However, in maildir, new mail doesn't gain the info part until it moves from new/ to cur/. Hence, even though mail in new/ doesn't have an info part, it is still a maildir message and thus has maildi

[PATCH 3/4] lib: Only synchronize maildir flags for messages in maildirs

2012-06-03 Thread Austin Clements
--- lib/message.cc |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/message.cc b/lib/message.cc index ed96477..bbac2ff 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -1074,7 +1074,7 @@ notmuch_message_maildir_flags_to_tags (notmuch_message_t *message) cons

[PATCH 2/4] lib: Move _filename_is_in_maildir

2012-06-03 Thread Austin Clements
This way notmuch_message_maildir_flags_to_tags can call it. It makes more sense for this to be just above all of the maildir synchronization code rather than mixed in the middle. --- lib/message.cc | 82 1 file changed, 41 insertions(+),

[PATCH 4/4] lib: Treat messages in new/ as maildir messages with no flags set

2012-06-03 Thread Austin Clements
This fixes the broken test added a few patches ago by synchronizing the tags of messages in new/, even if they have no "info" part. See the test patch for rationale. --- lib/message.cc| 20 +--- test/maildir-sync |1 - 2 files changed, 13 insertions(+), 8 deletions(-) d

notmuch release 0.13.2 now available

2012-06-03 Thread Jostein Berntsen
On 03.06.12,11:36, David Bremner wrote: > > Where to obtain notmuch 0.13.2 > === > http://notmuchmail.org/releases/notmuch-0.13.2.tar.gz > > Which can be verified with: > > http://notmuchmail.org/releases/notmuch-0.13.2.tar.gz.sha1 > 368b2451a64b1e3c574e688100700fc9

[PATCH] emacs: Fix notmuch-message-mark-replied.

2012-06-03 Thread Ingo Lohmar
notmuch-message-mark-replied used "apply" to change message tags according to notmuch-message-replied-tags after sending a reply. This works if the latter is a single-element list. But with the recently changed format of tag changes, it breaks for multiple-element lists. Use "funcall" to properly