[PATCH v2] emacs: Fix display of highlighted line in notmuch-search

2012-02-15 Thread Dmitry Kurochkin
Hi Michal. On Tue, 14 Feb 2012 18:09:47 +0100, Michal Sojka wrote: > When notmuch-search-line-faces is used to set background color in search > results, the highlight of the current line is not always displayed > correctly. This patch fixes that by increasing the priority property of > the

[PATCH] emacs: Add the option of counting threads in notmuch-hello

2012-02-15 Thread Jani Nikula
On Wed, 15 Feb 2012 19:14:19 +0200, Tomi Ollila wrote: > On Wed, 15 Feb 2012 09:23:31 -0700, Adam Wolfe Gordon > wrote: > > On Wed, Feb 15, 2012 at 08:52, Dmitry Kurochkin > > wrote: > > > Can we delay this patch until user-defined sections are pushed? ?I know > > > I

[PATCH 1/2] test: remove "Generate some messages" test from raw

2012-02-15 Thread Dmitry Kurochkin
Hi all. Are there any objections to these changes? Otherwise, I would ask David to push it as "minor, boring and trivial" changes. Regards, Dmitry

[RFC PATCH v5 00/11] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-02-15 Thread Mark Walters
On Wed, 15 Feb 2012 09:46:56 -0800, Jameson Graef Rollins wrote: > On Wed, 15 Feb 2012 09:03:28 +, Mark Walters gmail.com> wrote: > > The current implementation of exclude-tags does not use excludes in > > notmuch-show.c (and thus not in notmuch-show.el). Thus when selecting > > a thread in

[PATCH] emacs: Add the option of counting threads in notmuch-hello

2012-02-15 Thread Mark Walters
On Wed, 15 Feb 2012 19:14:19 +0200, Tomi Ollila wrote: > On Wed, 15 Feb 2012 09:23:31 -0700, Adam Wolfe Gordon > wrote: > > On Wed, Feb 15, 2012 at 08:52, Dmitry Kurochkin > > wrote: > > > Can we delay this patch until user-defined sections are pushed? ?I know > > > I

[PATCH v5.2 7/7] emacs: Use the new JSON reply format and message-cite-original

2012-02-15 Thread Adam Wolfe Gordon
Use the new JSON reply format to create replies in emacs. Quote HTML parts nicely by using mm-display-part to turn them into displayable text, then quoting them with message-cite-original. This is very useful for users who regularly receive HTML-only email. Use message-mode's

[PATCH v5.2 6/7] test: Add broken tests for new emacs reply functionality

2012-02-15 Thread Adam Wolfe Gordon
Add tests for creating nice replies to multipart messages, including those with HTML parts. These tests are expected to fail for now. --- test/emacs | 97 1 files changed, 97 insertions(+), 0 deletions(-) diff --git a/test/emacs

[PATCH v5.2 5/7] emacs: Factor out useful functions into notmuch-lib

2012-02-15 Thread Adam Wolfe Gordon
Move a few functions related to handling multipart/alternative parts into notmuch-lib.el, so they can be used by future reply code. --- emacs/notmuch-lib.el | 33 + emacs/notmuch-show.el | 24 ++-- 2 files changed, 35 insertions(+), 22

[PATCH v5.2 4/7] man: Update notmuch-reply man page for JSON format.

2012-02-15 Thread Adam Wolfe Gordon
--- man/man1/notmuch-reply.1 |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/man/man1/notmuch-reply.1 b/man/man1/notmuch-reply.1 index 5160ece..307abee 100644 --- a/man/man1/notmuch-reply.1 +++ b/man/man1/notmuch-reply.1 @@ -43,6 +43,11 @@ include .BR default

[PATCH v5.2 3/7] reply: Add a JSON reply format.

2012-02-15 Thread Adam Wolfe Gordon
This new JSON format for replies includes headers generated for a reply message as well as the headers of the original message. Using this data, a client can intelligently create a reply. For example, the emacs client will be able to create replies with quoted HTML parts by parsing the HTML

[PATCH v5.2 2/7] reply: Factor out reply creation

2012-02-15 Thread Adam Wolfe Gordon
Factor out the creation of a reply message based on an original message so it can be shared by different reply formats. --- notmuch-reply.c | 101 +++--- 1 files changed, 58 insertions(+), 43 deletions(-) diff --git a/notmuch-reply.c

[PATCH v5.2 1/7] test: Add broken test for the new JSON reply format.

2012-02-15 Thread Adam Wolfe Gordon
--- test/multipart | 51 +++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/test/multipart b/test/multipart index a3036b4..e7abcc2 100755 --- a/test/multipart +++ b/test/multipart @@ -589,6 +589,57 @@ Non-text part: text/html EOF

[PATCH v5.2 0/7] Reply enhancements, tidied up

2012-02-15 Thread Adam Wolfe Gordon
Hi all, As indicated by the odd version number, this is a very minor change to the patchset I sent last night [1]: * Split the refactoring into separate patches, both for the reply patch and the emacs patch. The first reply patch should now be applicable by itself, as requested by Austin to

[PATCH] emacs: Add the option of counting threads in notmuch-hello

2012-02-15 Thread Dmitry Kurochkin
Hello. Can we delay this patch until user-defined sections are pushed? I know I promised to review it long ago. But I still did not manage to finish it yet. I hope I can do it in the beginning of the next week. Regards, Dmitry

[PATCH] emacs: Add the option of counting threads in notmuch-hello

2012-02-15 Thread Tomi Ollila
On Wed, 15 Feb 2012 09:23:31 -0700, Adam Wolfe Gordon wrote: > On Wed, Feb 15, 2012 at 08:52, Dmitry Kurochkin > wrote: > > Can we delay this patch until user-defined sections are pushed? ?I know > > I promised to review it long ago. ?But I still did not manage to finish

[RFC PATCH v5 00/11] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-02-15 Thread Austin Clements
Quoth Jameson Graef Rollins on Feb 15 at 2:16 pm: > On Wed, 15 Feb 2012 21:11:15 +, Mark Walters gmail.com> wrote: > > I think the difficulty is that there are lots of annoying corner cases, > > but if there is a simpler solution that would be great! > > I think there is! There's been a

[RFC PATCH 13/13] First crack at a CouchDB mailstore

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp This introduces new parameters to notmuch-config to store the CouchDB URL and the "name" of the database. Signed-off-by: Ethan Glasser-Camp --- Makefile.local |3 + lib/mailstore.c | 109

[RFC PATCH 12/13] Close files using notmuch_mailstore_close instead of fclose

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp This requires a little bit of juggling in lib/sha1.c. Wrapper functions provide the FILE*. Instead of closing the file immediately ourselves, we let the wrapper functions close it. Signed-off-by: Ethan Glasser-Camp --- lib/message-file.c |6

[RFC PATCH 11/13] Add a close function to mailstore

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp This is a useful way to signal to mailstores that the resources associated with an existing FILE* are no longer being used and they can be cleaned up. For maildir, of course, this is just a call to fclose(), but for other mailstores this might

[RFC PATCH 10/13] Introduce concept of mailstore "constructor"

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp Right now this is a fancy no-op because maildir doesn't need any special data, but getting the API right is good. A constructor can fail, so return a notmuch_status_t. Signed-off-by: Ethan Glasser-Camp --- lib/mailstore.c | 36

[RFC PATCH 09/13] Mailstore also provides a "rename" function

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp This is used only in notmuch_message_tags_to_maildir_flags, to update a message's filename when its tags change. For mailstores where this doesn't make sense, they can of course define rename to be a NOOP. Signed-off-by: Ethan Glasser-Camp ---

[RFC PATCH 08/13] count_files and add_files shall be generic

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp Rename current count_files and add_files to maildir_count_files and maildir_add_files. This allows the possibility, at least, of having other backends. Signed-off-by: Ethan Glasser-Camp --- notmuch-new.c | 62

[RFC PATCH 07/13] notmuch-new: pull out useful bits of add_files_recursive

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp This is part of notmuch-new refactor phase 1: make add_files stuff safe for other backends. add_files_recursive is essentially a maildir-crawling function that periodically adds files to the database or adds filenames to remove_files or

[RFC PATCH 06/13] Pass mailstore to _notmuch_message_index_file

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp This is the last place where fopen(2) was used and had to be replaced. Signed-off-by: Ethan Glasser-Camp --- lib/database.cc |2 +- lib/index.cc |5 +++-- lib/notmuch-private.h |3 ++- 3 files changed, 6

[RFC PATCH 04/13] Replace remaining places where fopen occurs

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp Because mail might no longer be on disk, other uses of fopen(2) need to be replaced with calls to notmuch_mailstore_open. This isn't all of them, but these are the ones that involve touching the API in a lot of different places. This commit

[RFC PATCH 03/13] Introduce mailstore in the python bindings

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp Signed-off-by: Ethan Glasser-Camp --- bindings/python/notmuch/database.py | 31 +- bindings/python/notmuch/globals.py |3 ++ bindings/python/notmuch/mailstore.py | 38 ++ 3

[RFC PATCH 02/13] Add the concept of a mailstore in its absolute minimal sense

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp This introduces (and uses) the mailstore parameter to the notmuch_message_file_open API, and passes this through wherever it will be needed. This requires touching a lot of places just to change one API. We end up adding it to the

[RFC PATCH 01/13] Create configuration paramater database.type

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp This will be used to allow different backends to be developed to allow access to mail that isn't stored in Maildirs. Signed-off-by: Ethan Glasser-Camp --- notmuch-client.h |7 ++ notmuch-config.c | 57

[RFC PATCH 00/13] Modular message store code

2012-02-15 Thread Ethan Glasser-Camp
Hi guys, I'm submitting as RFC this patch series, which introduces the idea of a "mailstore", a "class" that defines how to access mail, instead of currently assuming it's always some Maildir-ish hierarchy that contains a bunch of mail. This was listed as a wishlist item on

[PATCH 0/8] Rewrite JSON show format

2012-02-15 Thread Tomi Ollila
On Tue, 14 Feb 2012 12:33:35 -0500, Austin Clements wrote: > The saga continues. As for the text format, this first shifts lots of > code around without changing its semantics, then it dives in and > simplifies a lot of things. Don't be put off by the number of > patches; most of them are

[RFC PATCH v5 00/11] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-02-15 Thread Jameson Graef Rollins
rubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120215/8e3bcb27/attachment.pgp>

[PATCH 0/8] Rewrite JSON show format

2012-02-15 Thread Austin Clements
Quoth Tomi Ollila on Feb 15 at 5:00 pm: > On Tue, 14 Feb 2012 12:33:35 -0500, Austin Clements > wrote: > > The saga continues. As for the text format, this first shifts lots of > > code around without changing its semantics, then it dives in and > > simplifies a lot of things. Don't be put

[PATCH v2] emacs: Fix display of highlighted line in notmuch-search

2012-02-15 Thread Tomi Ollila
On Tue, 14 Feb 2012 18:09:47 +0100, Michal Sojka wrote: > When notmuch-search-line-faces is used to set background color in search > results, the highlight of the current line is not always displayed > correctly. This patch fixes that by increasing the priority property of > the highlight

[PATCH v7 3/3] NEWS: add news section for new.ignore

2012-02-15 Thread Tomi Ollila
Added NEWS section 'Mail store folder/file ignore'. --- NEWS |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index f449fba..e9abb86 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,12 @@ Tag exclusion notmuch config set search.exclude_tags deleted spam

[PATCH v7 2/3] add support for user-specified files & directories to ignore

2012-02-15 Thread Tomi Ollila
A new configuration key 'new.ignore' is used to determine which files and directories user wants not to be scanned as new mails. Mark the corresponding test as no longer broken. This work merges my previous attempts and Andreas Amann's work in id:"ylp7hi23mw8.fsf at tyndall.ie" ---

[PATCH v7 1/3] test: add tests wrt ignoring user-specified files and directories

2012-02-15 Thread Tomi Ollila
Files and directories which are specified in 'new.ignore' in the config file shouldn't be indexed nor reported by `notmuch new'. This is basically Pieter's work with Austin's comments addressed. --- test/new | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff

[PATCH v7 0/3] NEWS and test comment adjustments

2012-02-15 Thread Tomi Ollila
This version of 'new.ignore' patch series addresses Austin's last comments in NEWS and test/new documentation parts. No functional changes.

notmuch-emacs bug report -- infinite looping trying to select next message

2012-02-15 Thread Michael Hudson-Doyle
Thanks for the reply! On Tue, 14 Feb 2012 10:41:20 +0100, Rodney Lorrimar wrote: > Hi Michael, > > On Tue, 14 Feb 2012 11:01:56 +1300, Michael Hudson-Doyle canonical.com> wrote: > > The attached gzipped mbox appears to trip up the emacs interface. The > > problem seems to come from the

[RFC PATCH v5 00/11] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-02-15 Thread Jameson Graef Rollins
-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120215/a6a01a8b/attachment.pgp>

[RFC PATCH v5 00/11] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-02-15 Thread Jameson Graef Rollins
lable Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120215/5773a537/attachment-0001.pgp>

[RFC PATCH v3 00/11] notmuch-pick: an emacs threaded message view with split-pane

2012-02-15 Thread Mark Walters
was scrubbed... Name: 0001-cli-notmuch-show-with-framing-newlines-between-threa.patch Type: text/x-diff Size: 1402 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120215/143edbdf/attachment-0002.patch> -- next part -- A non-text attachment

[PATCH] emacs: Add the option of counting threads in notmuch-hello

2012-02-15 Thread Adam Wolfe Gordon
On Wed, Feb 15, 2012 at 08:52, Dmitry Kurochkin wrote: > Can we delay this patch until user-defined sections are pushed? ?I know > I promised to review it long ago. ?But I still did not manage to finish > it yet. ?I hope I can do it in the beginning of the next week. Absolutely. I was just

[RFC PATCH v5 11/11] emacs: show: recognize the exclude flag.

2012-02-15 Thread Mark Walters
Show mode will recognize the exclude flag by not opening excluding messages by default, and will start at the first matching non-excluded message. If there are no matching non-excluded messages it will go to the first matching (necessarily excluded) message. --- emacs/notmuch-show.el | 19

[RFC PATCH v5 10/11] cli: omit excluded messages in results where appropriate.

2012-02-15 Thread Mark Walters
In all cases of notmuch count/search/show where the results returned cannot reflect the exclude flag return just the matched not-excluded results. If the caller wishes to have all the matched results (i.e., including the excluded ones) they should call with the --no-exclude option. The relevant

[RFC PATCH v5 09/11] test: update tests to reflect the exclude flag

2012-02-15 Thread Mark Walters
notmuch show outputs the exclude flag so many tests using notmuch show failed. This commit adds "excluded:0" or "excluded: false" to the expected outputs. After this commit there should be no failing tests. --- test/crypto|9 - test/encoding |2 +- test/json

[RFC PATCH v5 08/11] man: update manpage for notmuch-show --no-exclude option

2012-02-15 Thread Mark Walters
--- man/man1/notmuch-show.1 |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/man/man1/notmuch-show.1 b/man/man1/notmuch-show.1 index b2301d8..f743a53 100644 --- a/man/man1/notmuch-show.1 +++ b/man/man1/notmuch-show.1 @@ -128,6 +128,13 @@ multipart/encrypted part will

[RFC PATCH v5 07/11] cli: Make notmuch-show respect excludes.

2012-02-15 Thread Mark Walters
This adds the excludes to notmuch-show.c. We do not exclude when only a single message (or part) is requested. notmuch-show will output the exclude information when either text or json format is requested. As this changes the output from notmuch-show it breaks many tests (in a trivial and expected

[RFC PATCH v5 06/11] lib: Add the exclude flag to notmuch_query_search_threads

2012-02-15 Thread Mark Walters
Add the NOTMUCH_MESSAGE_FLAG_EXCLUDED flag to notmuch_query_search_threads. Implemented by inspecting the tags directly in _notmuch_thread_create/_thread_add_message rather than as a Xapian query for speed reasons. Note notmuch_thread_get_matched_messages now returns the number of non-excluded

[RFC PATCH v5 05/11] lib: Make notmuch_query_search_messages set the exclude flag

2012-02-15 Thread Mark Walters
Add a flag NOTMUCH_MESSAGE_FLAG_EXCLUDED which is set by notmuch_query_search_messages for excluded messages. Also add an option omit_excluded_messages to the search that we do not want the excludes at all. This exclude flag will be added to notmuch_query_search threads in the next patch. ---

[RFC PATCH v5 04/11] lib: Rearrange the exclude code in query.cc

2012-02-15 Thread Mark Walters
Slightly refactor the exclude code to give the callers access to the exclude query itself. There should be no functional change. --- lib/query.cc | 29 +++-- 1 files changed, 19 insertions(+), 10 deletions(-) diff --git a/lib/query.cc b/lib/query.cc index

[RFC PATCH v5 03/11] test: add tests for new cli --no-exclude option

2012-02-15 Thread Mark Walters
The tests test the new --no-exclude option to search and count. There were no existing tests for the exclude behaviour for count so added these too. --- test/count | 21 + test/search |5 + 2 files changed, 26 insertions(+), 0 deletions(-) diff --git a/test/count

[RFC PATCH v5 02/11] cli: Add --no-exclude to the man pages for search and count

2012-02-15 Thread Mark Walters
--- man/man1/notmuch-count.1 |7 +++ man/man1/notmuch-search.1 |7 +++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/man/man1/notmuch-count.1 b/man/man1/notmuch-count.1 index 25fe329..413b405 100644 --- a/man/man1/notmuch-count.1 +++ b/man/man1/notmuch-count.1

[RFC PATCH v5 01/11] cli: add --no-exclude option to count and search.

2012-02-15 Thread Mark Walters
This option turns off the exclusion so all matching messages are returned. We do not need to add this to notmuch-show as that does not (yet) exclude. --- notmuch-count.c | 17 +++-- notmuch-search.c | 17 +++-- 2 files changed, 22 insertions(+), 12 deletions(-) diff

[RFC PATCH v5 00/11] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-02-15 Thread Mark Walters
This is v5 of the exclude flag series. (v4 was at id:"874nv9rv79.fsf at qmul.ac.uk") This email has 4 sections, an overview of what the patch set is trying to achieve, a summary of the changes from v4, some comments on the status of the patches in the series and some remaining queries.

[PATCH v2 2/2] emacs: support text/calendar mime type

2012-02-15 Thread Adam Wolfe Gordon
+1 from me. Very handy.

[PATCH] emacs: Add the option of counting threads in notmuch-hello

2012-02-15 Thread Adam Wolfe Gordon
Add a customizable variable, notmuch-hello-count-threads, which when set causes notmuch-hello to display thread counts instead of message counts. The default remains message counts. --- emacs/notmuch-hello.el | 17 ++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git

[PATCH 0/8] Rewrite JSON show format

2012-02-15 Thread Adam Wolfe Gordon
On Wed, Feb 15, 2012 at 08:00, Tomi Ollila wrote: > Most json-related tests pass (for me), but I get this: > > ?FAIL ? notmuch-show for message with invalid From > ? ? ? ?--- emacs.10.expected ? 2012-02-15 14:28:48.0 + > ? ? ? ?+++ emacs.10.output ? ? 2012-02-15 14:28:48.0

[RFC PATCH v5 01/11] cli: add --no-exclude option to count and search.

2012-02-15 Thread Mark Walters
This option turns off the exclusion so all matching messages are returned. We do not need to add this to notmuch-show as that does not (yet) exclude. --- notmuch-count.c | 17 +++-- notmuch-search.c | 17 +++-- 2 files changed, 22 insertions(+), 12 deletions(-) diff

[RFC PATCH v5 02/11] cli: Add --no-exclude to the man pages for search and count

2012-02-15 Thread Mark Walters
--- man/man1/notmuch-count.1 |7 +++ man/man1/notmuch-search.1 |7 +++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/man/man1/notmuch-count.1 b/man/man1/notmuch-count.1 index 25fe329..413b405 100644 --- a/man/man1/notmuch-count.1 +++ b/man/man1/notmuch-count.1

[RFC PATCH v5 03/11] test: add tests for new cli --no-exclude option

2012-02-15 Thread Mark Walters
The tests test the new --no-exclude option to search and count. There were no existing tests for the exclude behaviour for count so added these too. --- test/count | 21 + test/search |5 + 2 files changed, 26 insertions(+), 0 deletions(-) diff --git a/test/count

[RFC PATCH v5 05/11] lib: Make notmuch_query_search_messages set the exclude flag

2012-02-15 Thread Mark Walters
Add a flag NOTMUCH_MESSAGE_FLAG_EXCLUDED which is set by notmuch_query_search_messages for excluded messages. Also add an option omit_excluded_messages to the search that we do not want the excludes at all. This exclude flag will be added to notmuch_query_search threads in the next patch. ---

[RFC PATCH v5 04/11] lib: Rearrange the exclude code in query.cc

2012-02-15 Thread Mark Walters
Slightly refactor the exclude code to give the callers access to the exclude query itself. There should be no functional change. --- lib/query.cc | 29 +++-- 1 files changed, 19 insertions(+), 10 deletions(-) diff --git a/lib/query.cc b/lib/query.cc index

[RFC PATCH v5 07/11] cli: Make notmuch-show respect excludes.

2012-02-15 Thread Mark Walters
This adds the excludes to notmuch-show.c. We do not exclude when only a single message (or part) is requested. notmuch-show will output the exclude information when either text or json format is requested. As this changes the output from notmuch-show it breaks many tests (in a trivial and expected

[RFC PATCH v5 08/11] man: update manpage for notmuch-show --no-exclude option

2012-02-15 Thread Mark Walters
--- man/man1/notmuch-show.1 |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/man/man1/notmuch-show.1 b/man/man1/notmuch-show.1 index b2301d8..f743a53 100644 --- a/man/man1/notmuch-show.1 +++ b/man/man1/notmuch-show.1 @@ -128,6 +128,13 @@ multipart/encrypted part will

[RFC PATCH v5 06/11] lib: Add the exclude flag to notmuch_query_search_threads

2012-02-15 Thread Mark Walters
Add the NOTMUCH_MESSAGE_FLAG_EXCLUDED flag to notmuch_query_search_threads. Implemented by inspecting the tags directly in _notmuch_thread_create/_thread_add_message rather than as a Xapian query for speed reasons. Note notmuch_thread_get_matched_messages now returns the number of non-excluded

[RFC PATCH v5 10/11] cli: omit excluded messages in results where appropriate.

2012-02-15 Thread Mark Walters
In all cases of notmuch count/search/show where the results returned cannot reflect the exclude flag return just the matched not-excluded results. If the caller wishes to have all the matched results (i.e., including the excluded ones) they should call with the --no-exclude option. The relevant

[RFC PATCH v5 09/11] test: update tests to reflect the exclude flag

2012-02-15 Thread Mark Walters
notmuch show outputs the exclude flag so many tests using notmuch show failed. This commit adds excluded:0 or excluded: false to the expected outputs. After this commit there should be no failing tests. --- test/crypto|9 - test/encoding |2 +- test/json |

[RFC PATCH v5 11/11] emacs: show: recognize the exclude flag.

2012-02-15 Thread Mark Walters
Show mode will recognize the exclude flag by not opening excluding messages by default, and will start at the first matching non-excluded message. If there are no matching non-excluded messages it will go to the first matching (necessarily excluded) message. --- emacs/notmuch-show.el | 19

[PATCH v7 0/3] NEWS and test comment adjustments

2012-02-15 Thread Tomi Ollila
This version of 'new.ignore' patch series addresses Austin's last comments in NEWS and test/new documentation parts. No functional changes. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v7 1/3] test: add tests wrt ignoring user-specified files and directories

2012-02-15 Thread Tomi Ollila
Files and directories which are specified in 'new.ignore' in the config file shouldn't be indexed nor reported by `notmuch new'. This is basically Pieter's work with Austin's comments addressed. --- test/new | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff

[PATCH v7 3/3] NEWS: add news section for new.ignore

2012-02-15 Thread Tomi Ollila
Added NEWS section 'Mail store folder/file ignore'. --- NEWS |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index f449fba..e9abb86 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,12 @@ Tag exclusion notmuch config set search.exclude_tags deleted spam

[PATCH v7 2/3] add support for user-specified files directories to ignore

2012-02-15 Thread Tomi Ollila
A new configuration key 'new.ignore' is used to determine which files and directories user wants not to be scanned as new mails. Mark the corresponding test as no longer broken. This work merges my previous attempts and Andreas Amann's work in id:ylp7hi23mw8@tyndall.ie --- notmuch-client.h |

Re: [RFC PATCH v3 00/11] notmuch-pick: an emacs threaded message view with split-pane

2012-02-15 Thread Mark Walters
On Tue, 14 Feb 2012 10:21:14 -0500, Austin Clements amdra...@mit.edu wrote: Quoth Mark Walters on Feb 14 at 12:28 pm: Finally, if notmuch-pick were able to do work asynchronously (as notmuch-search does now) then I think all the speed concerns would go away. However, I am not sure how to do

Re: [PATCH v2] emacs: Fix display of highlighted line in notmuch-search

2012-02-15 Thread Tomi Ollila
On Tue, 14 Feb 2012 18:09:47 +0100, Michal Sojka so...@os.inf.tu-dresden.de wrote: When notmuch-search-line-faces is used to set background color in search results, the highlight of the current line is not always displayed correctly. This patch fixes that by increasing the priority property of

Re: [PATCH 0/8] Rewrite JSON show format

2012-02-15 Thread Tomi Ollila
On Tue, 14 Feb 2012 12:33:35 -0500, Austin Clements amdra...@mit.edu wrote: The saga continues. As for the text format, this first shifts lots of code around without changing its semantics, then it dives in and simplifies a lot of things. Don't be put off by the number of patches; most of

Re: [PATCH 0/8] Rewrite JSON show format

2012-02-15 Thread Adam Wolfe Gordon
On Wed, Feb 15, 2012 at 08:00, Tomi Ollila tomi.oll...@iki.fi wrote: Most json-related tests pass (for me), but I get this:  FAIL   notmuch-show for message with invalid From        --- emacs.10.expected   2012-02-15 14:28:48.0 +        +++ emacs.10.output     2012-02-15

[PATCH] emacs: Add the option of counting threads in notmuch-hello

2012-02-15 Thread Adam Wolfe Gordon
Add a customizable variable, notmuch-hello-count-threads, which when set causes notmuch-hello to display thread counts instead of message counts. The default remains message counts. --- emacs/notmuch-hello.el | 17 ++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v2 2/2] emacs: support text/calendar mime type

2012-02-15 Thread Adam Wolfe Gordon
+1 from me. Very handy. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH] emacs: Add the option of counting threads in notmuch-hello

2012-02-15 Thread Dmitry Kurochkin
Hello. Can we delay this patch until user-defined sections are pushed? I know I promised to review it long ago. But I still did not manage to finish it yet. I hope I can do it in the beginning of the next week. Regards, Dmitry ___ notmuch mailing

Re: [PATCH] emacs: Add the option of counting threads in notmuch-hello

2012-02-15 Thread Adam Wolfe Gordon
On Wed, Feb 15, 2012 at 08:52, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Can we delay this patch until user-defined sections are pushed?  I know I promised to review it long ago.  But I still did not manage to finish it yet.  I hope I can do it in the beginning of the next week.

Re: [PATCH] emacs: Add the option of counting threads in notmuch-hello

2012-02-15 Thread Tomi Ollila
On Wed, 15 Feb 2012 09:23:31 -0700, Adam Wolfe Gordon awg+notm...@xvx.ca wrote: On Wed, Feb 15, 2012 at 08:52, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Can we delay this patch until user-defined sections are pushed?  I know I promised to review it long ago.  But I still did not

Re: [RFC PATCH v5 00/11] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-02-15 Thread Jameson Graef Rollins
On Wed, 15 Feb 2012 09:03:28 +, Mark Walters markwalters1...@gmail.com wrote: The current implementation of exclude-tags does not use excludes in notmuch-show.c (and thus not in notmuch-show.el). Thus when selecting a thread in the search view claiming one matched message you may get

Re: [RFC PATCH v5 00/11] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-02-15 Thread Jameson Graef Rollins
On Wed, 15 Feb 2012 09:46:56 -0800, Jameson Graef Rollins jroll...@finestructure.net wrote: I missed some of the previous discussion on this, but rather than add a new flag, why not just use the existing match flag? If the message is excluded, just mark match as false. I think this is

Re: [PATCH 0/8] Rewrite JSON show format

2012-02-15 Thread Austin Clements
Quoth Tomi Ollila on Feb 15 at 5:00 pm: On Tue, 14 Feb 2012 12:33:35 -0500, Austin Clements amdra...@mit.edu wrote: The saga continues. As for the text format, this first shifts lots of code around without changing its semantics, then it dives in and simplifies a lot of things. Don't be

Re: [PATCH 1/2] test: remove Generate some messages test from raw

2012-02-15 Thread Dmitry Kurochkin
Hi all. Are there any objections to these changes? Otherwise, I would ask David to push it as minor, boring and trivial changes. Regards, Dmitry ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH v2] emacs: Fix display of highlighted line in notmuch-search

2012-02-15 Thread Dmitry Kurochkin
Hi Michal. On Tue, 14 Feb 2012 18:09:47 +0100, Michal Sojka so...@os.inf.tu-dresden.de wrote: When notmuch-search-line-faces is used to set background color in search results, the highlight of the current line is not always displayed correctly. This patch fixes that by increasing the priority

Re: [PATCH] emacs: Add the option of counting threads in notmuch-hello

2012-02-15 Thread Mark Walters
On Wed, 15 Feb 2012 19:14:19 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: On Wed, 15 Feb 2012 09:23:31 -0700, Adam Wolfe Gordon awg+notm...@xvx.ca wrote: On Wed, Feb 15, 2012 at 08:52, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Can we delay this patch until user-defined sections

Re: [PATCH] emacs: Add the option of counting threads in notmuch-hello

2012-02-15 Thread Jani Nikula
On Wed, 15 Feb 2012 19:14:19 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: On Wed, 15 Feb 2012 09:23:31 -0700, Adam Wolfe Gordon awg+notm...@xvx.ca wrote: On Wed, Feb 15, 2012 at 08:52, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Can we delay this patch until user-defined sections

Re: [RFC PATCH v5 00/11] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-02-15 Thread Mark Walters
On Wed, 15 Feb 2012 09:46:56 -0800, Jameson Graef Rollins jroll...@finestructure.net wrote: On Wed, 15 Feb 2012 09:03:28 +, Mark Walters markwalters1...@gmail.com wrote: The current implementation of exclude-tags does not use excludes in notmuch-show.c (and thus not in

[RFC PATCH 00/13] Modular message store code

2012-02-15 Thread Ethan Glasser-Camp
Hi guys, I'm submitting as RFC this patch series, which introduces the idea of a mailstore, a class that defines how to access mail, instead of currently assuming it's always some Maildir-ish hierarchy that contains a bunch of mail. This was listed as a wishlist item on

[RFC PATCH 01/13] Create configuration paramater database.type

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp et...@betacantrips.com This will be used to allow different backends to be developed to allow access to mail that isn't stored in Maildirs. Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com --- notmuch-client.h |7 ++ notmuch-config.c | 57

[RFC PATCH 02/13] Add the concept of a mailstore in its absolute minimal sense

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp et...@betacantrips.com This introduces (and uses) the mailstore parameter to the notmuch_message_file_open API, and passes this through wherever it will be needed. This requires touching a lot of places just to change one API. We end up adding it to the notmuch_database_t

[RFC PATCH 03/13] Introduce mailstore in the python bindings

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp et...@betacantrips.com Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com --- bindings/python/notmuch/database.py | 31 +- bindings/python/notmuch/globals.py |3 ++ bindings/python/notmuch/mailstore.py | 38

[RFC PATCH 04/13] Replace remaining places where fopen occurs

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp et...@betacantrips.com Because mail might no longer be on disk, other uses of fopen(2) need to be replaced with calls to notmuch_mailstore_open. This isn't all of them, but these are the ones that involve touching the API in a lot of different places. This commit updates

[RFC PATCH 05/13] notmuch_database_add_message calculates sha1 of messages using mailstore

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp et...@betacantrips.com Previously, notmuch_database_add_message used the notmuch_sha1_of_file function, which accesses a mail file directly. Create a new function called notmuch_sha1_of_message which uses a mailstore to access the file, and use that instead. Also, as a

[RFC PATCH 06/13] Pass mailstore to _notmuch_message_index_file

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp et...@betacantrips.com This is the last place where fopen(2) was used and had to be replaced. Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com --- lib/database.cc |2 +- lib/index.cc |5 +++-- lib/notmuch-private.h |3 ++- 3 files

[RFC PATCH 07/13] notmuch-new: pull out useful bits of add_files_recursive

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp et...@betacantrips.com This is part of notmuch-new refactor phase 1: make add_files stuff safe for other backends. add_files_recursive is essentially a maildir-crawling function that periodically adds files to the database or adds filenames to remove_files or

[RFC PATCH 08/13] count_files and add_files shall be generic

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp et...@betacantrips.com Rename current count_files and add_files to maildir_count_files and maildir_add_files. This allows the possibility, at least, of having other backends. Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com --- notmuch-new.c | 62

[RFC PATCH 09/13] Mailstore also provides a rename function

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp et...@betacantrips.com This is used only in notmuch_message_tags_to_maildir_flags, to update a message's filename when its tags change. For mailstores where this doesn't make sense, they can of course define rename to be a NOOP. Signed-off-by: Ethan Glasser-Camp

[RFC PATCH 10/13] Introduce concept of mailstore constructor

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp et...@betacantrips.com Right now this is a fancy no-op because maildir doesn't need any special data, but getting the API right is good. A constructor can fail, so return a notmuch_status_t. Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com --- lib/mailstore.c |

  1   2   >