Re: [PATCH] emacs: make citation function customizable.

2015-01-14 Thread Todd
Looks good to me. I applied the patch and it works fine as well. - Todd DB == David Bremner da...@tethera.net writes: DB Make a new customizable variable instead of relying on DB message-cite-function because the default for the latter changed DB between emacs releases. DB

[PATCH v3 4/5] Update completions for Emacs and bash

2015-01-15 Thread Todd
This adds completions for Emacs and bash, ZSH does not appear to have completions for search terms. --- completion/notmuch-completion.bash | 2 +- emacs/notmuch.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/completion/notmuch-completion.bash

[PATCH v3 5/5] Update documentation

2015-01-15 Thread Todd
--- NEWS | 11 +++ doc/man7/notmuch-search-terms.rst | 6 ++ 2 files changed, 17 insertions(+) diff --git a/NEWS b/NEWS index abb5ad7..baa4519 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ Notmuch 0.20 (UNRELEASED) += Contrib

[PATCH v3 3/5] Add indexing for the mimetype term

2015-01-15 Thread Todd
test_expect_equal_json $(cat OUTPUT) $(cat EXPECTED.withhtml) test_begin_subtest indexes mime-type #1 -test_subtest_known_broken output=$(notmuch search mimetype:application/unique_identifier | notmuch_search_sanitize) test_expect_equal $output thread:XXX 2014-01-12 [1/1] Todd; odd content types

[PATCH v3 2/5] Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES database feature

2015-01-15 Thread Todd
--- lib/database-private.h | 15 --- lib/database.cc| 10 -- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/lib/database-private.h b/lib/database-private.h index 15e03cc..6d6fa2c 100644 --- a/lib/database-private.h +++ b/lib/database-private.h @@ -92,6

[PATCH v3 1/5] Add failing unit tests for indexed mime types

2015-01-15 Thread Todd
-Transfer-Encoding: base64 7w0K --==-=-=-- EOF + +cat EOF content_types +From: Todd t...@example.com +To: t...@example.com +Subject: odd content types +Date: Mon, 12 Jan 2014 18:12:32 + +User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) +Message-ID: kfjfo2wjbw2hrv2p0

[PATCH v1 0/2] Fixes for issues discovered with -fsanitize=address

2015-01-17 Thread Todd
I built a copy of notmuch with gcc 4.8's new -fsanitize=address feature and ran the test bench. It pointed out these two issues. Todd (2): lib: Fix potential invalid read past an empty string lib: Fix use after free lib/thread.cc | 7 +++ 1 file changed, 3 insertions(+), 4 deletions

[PATCH v1 1/2] lib: Fix potential invalid read past an empty string

2015-01-17 Thread Todd
==22884== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60168291 at pc 0x7ff6295680e5 bp 0x7fff4ab9aa40 sp 0x7fff4ab9aa08 READ of size 1 at 0x60168291 thread T0 #0 0x7ff6295680e4 in __interceptor_strcmp ??:? #1 0x44763b in _thread_add_message /home/todd/.apps/notmuch

[PATCH v1 2/2] lib: Fix use after free

2015-01-17 Thread Todd
0x4464a3 in _thread_add_matched_message /home/todd/.apps/notmuch/lib/thread.cc:369 #1 0x443c2c in notmuch_threads_get /home/todd/.apps/notmuch/lib/query.cc:496 #2 0x41d947 in do_search_threads /home/todd/.apps/notmuch/notmuch-search.c:131 #3 0x40a3fe in main /home/todd/.apps/notmuch

Re: [PATCH v3 3/5] Add indexing for the mimetype term

2015-01-17 Thread Todd
DB == David Bremner da...@tethera.net writes: DB Todd t...@electricoding.com writes: Adds the indexing and removes the broken test flag --- lib/database.cc| 1 + lib/index.cc | 10 ++ test/T190-multipart.sh | 4 3 files changed, 11

[PATCH v4 5/5] Update documentation

2015-01-22 Thread Todd
Adds new entry to the NEWS file, and updates the search terms section of the man page. The search terms section needs to be updated again once the new section in the documentation covering probablistic terms has been committed. --- NEWS | 11 +++

[PATCH v4 4/5] Update completions for Emacs and bash

2015-01-22 Thread Todd
This adds completions for both Emacs and bash. ZSH does not appear to have completions for search terms. --- completion/notmuch-completion.bash | 2 +- emacs/notmuch.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/completion/notmuch-completion.bash

[PATCH v4 3/5] Add indexing for the mimetype term

2015-01-22 Thread Todd
mime-type #1 -test_subtest_known_broken output=$(notmuch search mimetype:application/unique_identifier | notmuch_search_sanitize) test_expect_equal $output thread:XXX 2014-01-12 [1/1] Todd; odd content types (inbox unread) test_begin_subtest indexes mime-type #2 -test_subtest_known_broken

[PATCH v4 0/5] Index the content-type of MIME parts

2015-01-22 Thread Todd
I think I've finished incorporating the feedback. The final notmuch-search-terms.rst could use more details, but it should probably occur after the recent patch that was posted documenting the probablistic indexing/searching has been committed. Todd (5): test: Add failing unit tests

[PATCH v4 1/5] test: Add failing unit tests for indexed mime types

2015-01-22 Thread Todd
content_types +From: Todd t...@example.com +To: t...@example.com +Subject: odd content types +Date: Mon, 12 Jan 2014 18:12:32 + +User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) +Message-ID: kfjfo2wjbw2hrv2p0...@example.com +MIME-Version: 1.0 +Content-Type: multipart

Re: Unable to search for emails with content with a given MIME type

2015-01-27 Thread Todd
Petter, The feature you wanted was committed a few days ago (searching with a mimetype: prefix). Searching for mimetype:calendar would get any text/calendar or ics/calendar attachments. (Replying to the list so it will appear in the list archive as well.) Thanks, Todd Petter Reinholdtsen p

[PATCH] Index Content-Type of attachments with a contenttype prefix

2015-01-09 Thread Todd
- contenttype:text/x-patch - Todd --- NEWS | 6 ++ completion/notmuch-completion.bash | 2 +- doc/man7/notmuch-search-terms.rst | 6 ++ emacs/notmuch.el | 2 +- lib/database.cc| 1 + lib/index.cc | 5

Re: [PATCH] Index Content-Type of attachments with a contenttype prefix

2015-01-10 Thread Todd
Jani == Jani Nikula j...@nikula.org writes: Jani On Sat, 10 Jan 2015, Todd t...@electricoding.com wrote: I wanted to tag messages with calendar invitations, but couldn't as the information wasn't indexed. This patch allows for queries for like: Find calendar

[PATCH v3] emacs: Use the message cite variable instead of a calling cite-message-original directly

2015-01-10 Thread Todd
case. - Todd --- emacs/notmuch-mua.el | 6 +++--- test/T310-emacs.sh | 7 --- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 2c58886..66a6b65 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -220,8 +220,8

Re: [PATCH] Index Content-Type of attachments with a contenttype prefix

2015-01-10 Thread Todd
DB == David Bremner da...@tethera.net writes: DB Todd t...@electricoding.com writes: I wanted to tag messages with calendar invitations, but couldn't as the information wasn't indexed. This patch allows for queries for like: Find calendar invites

[PATCH v2] emacs: Use the message cite variable

2015-01-09 Thread Todd
I checked in the Emacs 22.1 source code, and there it was a defaulted to message-cite-original as well. This patch falls back to message-cite-original in the unlikely case that someone has customized message-cite-function to nil. - Todd --- emacs/notmuch-mua.el | 6 +++--- 1 file changed, 3

[PATCH] Use the message cite variable instead of a hard coded function

2015-01-08 Thread Todd
--- emacs/notmuch-mua.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 2c58886..e90ca55 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -220,8 +220,8 @@ list. (date (plist-get

[PATCH v2 1/5] Add a failing unit test for indexed mime types

2015-01-13 Thread Todd
: base64 7w0K --==-=-=-- EOF + +cat EOF content_types +From: Todd t...@example.com +To: t...@example.com +Subject: odd content types +Date: Mon, 12 Jan 2014 18:12:32 + +User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) +Message-ID: kfjfo2wjbw2hrv2p0

[PATCH v2 0/5] Index the content-type of MIME parts

2015-01-13 Thread Todd
, only available in newly created databases, which indicates that all of the mime parts are indexed. Indexing of new messages on an existing database should work fine as well, but the feature won't be enabled via upgrade. Code reviews welcome, I'm not familiar with this code base. Todd (5): Add

[PATCH v2 3/5] Add indexing for the mimetype term

2015-01-13 Thread Todd
--- lib/database.cc | 1 + lib/index.cc| 6 ++ 2 files changed, 7 insertions(+) diff --git a/lib/database.cc b/lib/database.cc index 2de60f8..7c7a267 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -254,6 +254,7 @@ static prefix_t PROBABILISTIC_PREFIX[]= { { from,

[PATCH v2 5/5] Update documentation

2015-01-13 Thread Todd
--- NEWS | 16 doc/man7/notmuch-search-terms.rst | 6 ++ 2 files changed, 22 insertions(+) diff --git a/NEWS b/NEWS index 44e8d05..0df7977 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,19 @@ +Notmuch 0.20 (TBD) += + +Overview

[PATCH v2 2/5] Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES database feature

2015-01-13 Thread Todd
--- lib/database-private.h | 15 --- lib/database.cc| 10 -- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/lib/database-private.h b/lib/database-private.h index 15e03cc..6d6fa2c 100644 --- a/lib/database-private.h +++ b/lib/database-private.h @@ -92,6

[PATCH v2 4/5] Update completions for Emacs and bash

2015-01-13 Thread Todd
This adds completions for Emacs and bash, ZSH does not appear to have completions for search terms. --- completion/notmuch-completion.bash | 2 +- emacs/notmuch.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/completion/notmuch-completion.bash

[PATCH] Use the message cite variable instead of a hard coded function

2015-01-08 Thread Todd
--- emacs/notmuch-mua.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 2c58886..e90ca55 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -220,8 +220,8 @@ list." (date (plist-get

[PATCH] Use the message cite variable instead of a hard coded function

2015-01-09 Thread Todd
preferred. - Todd >>>>> "DB" == David Bremner writes: DB> Hi Todd; DB> Thanks for the patch. What happens to the behaviour of notmuch-reply for DB> people that have not customized this variable? DB> d

[PATCH v2] emacs: Use the message cite variable

2015-01-09 Thread Todd
I checked in the Emacs 22.1 source code, and there it was a defaulted to message-cite-original as well. This patch falls back to message-cite-original in the unlikely case that someone has customized message-cite-function to nil. - Todd --- emacs/notmuch-mua.el | 6 +++--- 1 file changed, 3

[PATCH] Index Content-Type of attachments with a contenttype prefix

2015-01-09 Thread Todd
- contenttype:text/x-patch - Todd --- NEWS | 6 ++ completion/notmuch-completion.bash | 2 +- doc/man7/notmuch-search-terms.rst | 6 ++ emacs/notmuch.el | 2 +- lib/database.cc| 1 + lib/index.cc | 5

[PATCH] Index Content-Type of attachments with a contenttype prefix

2015-01-10 Thread Todd
>>>>> "DB" == David Bremner writes: DB> Todd writes: >> I wanted to tag messages with calendar invitations, but couldn't as >> the information wasn't indexed. >> >> This patch allows for queries for like: >&g

[PATCH v3] emacs: Use the message cite variable instead of a calling cite-message-original directly

2015-01-10 Thread Todd
case. - Todd --- emacs/notmuch-mua.el | 6 +++--- test/T310-emacs.sh | 7 --- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 2c58886..66a6b65 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -220,8 +220,8

[PATCH] Index Content-Type of attachments with a contenttype prefix

2015-01-10 Thread Todd
>>>>> "Jani" == Jani Nikula writes: Jani> On Sat, 10 Jan 2015, Todd wrote: >> I wanted to tag messages with calendar invitations, but couldn't as >> the information wasn't indexed. >> >> This patch allows for qu

[PATCH v2 0/5] Index the content-type of MIME parts

2015-01-13 Thread Todd
, only available in newly created databases, which indicates that all of the mime parts are indexed. Indexing of new messages on an existing database should work fine as well, but the feature won't be enabled via upgrade. Code reviews welcome, I'm not familiar with this code base. Todd (5): Add

[PATCH v2 1/5] Add a failing unit test for indexed mime types

2015-01-13 Thread Todd
: base64 7w0K --==-=-=-- EOF + +cat < content_types +From: Todd +To: todd at example.com +Subject: odd content types +Date: Mon, 12 Jan 2014 18:12:32 + +User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) +Message-ID: +MIME-Version: 1.0 +Content-Type: multip

[PATCH v2 2/5] Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES database feature

2015-01-13 Thread Todd
--- lib/database-private.h | 15 --- lib/database.cc| 10 -- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/lib/database-private.h b/lib/database-private.h index 15e03cc..6d6fa2c 100644 --- a/lib/database-private.h +++ b/lib/database-private.h @@ -92,6

[PATCH v2 4/5] Update completions for Emacs and bash

2015-01-13 Thread Todd
This adds completions for Emacs and bash, ZSH does not appear to have completions for search terms. --- completion/notmuch-completion.bash | 2 +- emacs/notmuch.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/completion/notmuch-completion.bash

[PATCH v2 3/5] Add indexing for the mimetype term

2015-01-13 Thread Todd
--- lib/database.cc | 1 + lib/index.cc| 6 ++ 2 files changed, 7 insertions(+) diff --git a/lib/database.cc b/lib/database.cc index 2de60f8..7c7a267 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -254,6 +254,7 @@ static prefix_t PROBABILISTIC_PREFIX[]= { { "from",

[PATCH v2 5/5] Update documentation

2015-01-13 Thread Todd
--- NEWS | 16 doc/man7/notmuch-search-terms.rst | 6 ++ 2 files changed, 22 insertions(+) diff --git a/NEWS b/NEWS index 44e8d05..0df7977 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,19 @@ +Notmuch 0.20 (TBD) += + +Overview

[PATCH] emacs: make citation function customizable.

2015-01-14 Thread Todd
Looks good to me. I applied the patch and it works fine as well. - Todd >>>>> "DB" == David Bremner writes: DB> Make a new customizable variable instead of relying on DB> message-cite-function because the default for the latter changed DB&g

[PATCH v3 1/5] Add failing unit tests for indexed mime types

2015-01-15 Thread Todd
-Transfer-Encoding: base64 7w0K --==-=-=-- EOF + +cat < content_types +From: Todd +To: todd at example.com +Subject: odd content types +Date: Mon, 12 Jan 2014 18:12:32 + +User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) +Message-ID: +MIME-Version: 1.0 +Content-T

[PATCH v3 2/5] Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES database feature

2015-01-15 Thread Todd
--- lib/database-private.h | 15 --- lib/database.cc| 10 -- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/lib/database-private.h b/lib/database-private.h index 15e03cc..6d6fa2c 100644 --- a/lib/database-private.h +++ b/lib/database-private.h @@ -92,6

[PATCH v3 4/5] Update completions for Emacs and bash

2015-01-15 Thread Todd
This adds completions for Emacs and bash, ZSH does not appear to have completions for search terms. --- completion/notmuch-completion.bash | 2 +- emacs/notmuch.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/completion/notmuch-completion.bash

[PATCH v3 3/5] Add indexing for the mimetype term

2015-01-15 Thread Todd
ut=$(notmuch search mimetype:application/unique_identifier | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2014-01-12 [1/1] Todd; odd content types (inbox unread)" test_begin_subtest "indexes mime-type #2" -test_subtest_known_broken output

[PATCH v3 5/5] Update documentation

2015-01-15 Thread Todd
--- NEWS | 11 +++ doc/man7/notmuch-search-terms.rst | 6 ++ 2 files changed, 17 insertions(+) diff --git a/NEWS b/NEWS index abb5ad7..baa4519 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ Notmuch 0.20 (UNRELEASED) += Contrib

[PATCH v1 0/2] Fixes for issues discovered with -fsanitize=address

2015-01-17 Thread Todd
I built a copy of notmuch with gcc 4.8's new -fsanitize=address feature and ran the test bench. It pointed out these two issues. Todd (2): lib: Fix potential invalid read past an empty string lib: Fix use after free lib/thread.cc | 7 +++ 1 file changed, 3 insertions(+), 4 deletions

[PATCH v1 1/2] lib: Fix potential invalid read past an empty string

2015-01-17 Thread Todd
==22884== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60168291 at pc 0x7ff6295680e5 bp 0x7fff4ab9aa40 sp 0x7fff4ab9aa08 READ of size 1 at 0x60168291 thread T0 #0 0x7ff6295680e4 in __interceptor_strcmp ??:? #1 0x44763b in _thread_add_message /home/todd/.apps/notmuch

[PATCH v3 3/5] Add indexing for the mimetype term

2015-01-17 Thread Todd
>>>>> "DB" == David Bremner writes: DB> Todd writes: >> Adds the indexing and removes the broken test flag >> --- >> lib/database.cc| 1 + >> lib/index.cc | 10 ++ >> test/T190-multipar

[PATCH v4 0/5] Index the content-type of MIME parts

2015-01-22 Thread Todd
I think I've finished incorporating the feedback. The final notmuch-search-terms.rst could use more details, but it should probably occur after the recent patch that was posted documenting the probablistic indexing/searching has been committed. Todd (5): test: Add failing unit tests

[PATCH v4 3/5] Add indexing for the mimetype term

2015-01-22 Thread Todd
otmuch show --format=json --include-html id:htmlmessage > OUTPUT test_expect_equal_json "$(cat OUTPUT)" "$(cat EXPECTED.withhtml)" test_begin_subtest "indexes mime-type #1" -test_subtest_known_broken output=$(notmuch search mimetype:application/unique_identifier

[PATCH v4 1/5] test: Add failing unit tests for indexed mime types

2015-01-22 Thread Todd
< content_types +From: Todd +To: todd at example.com +Subject: odd content types +Date: Mon, 12 Jan 2014 18:12:32 + +User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) +Message-ID: +MIME-Version: 1.0 +Content-Type: multipart/alternative; bound

[PATCH v4 4/5] Update completions for Emacs and bash

2015-01-22 Thread Todd
This adds completions for both Emacs and bash. ZSH does not appear to have completions for search terms. --- completion/notmuch-completion.bash | 2 +- emacs/notmuch.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/completion/notmuch-completion.bash

[PATCH v4 5/5] Update documentation

2015-01-22 Thread Todd
Adds new entry to the NEWS file, and updates the search terms section of the man page. The search terms section needs to be updated again once the new section in the documentation covering probablistic terms has been committed. --- NEWS | 11 +++

[PATCH v4 2/5] Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES database feature

2015-01-22 Thread Todd
This feature will exist in all newly created databases, but there is no upgrade provided for it. If this flag exists, it indicates that the database was created after the indexed MIME-types feature was added. --- lib/database-private.h | 15 --- lib/database.cc| 10 --

Unable to search for emails with content with a given MIME type

2015-01-27 Thread Todd
Petter, The feature you wanted was committed a few days ago (searching with a "mimetype:" prefix). Searching for "mimetype:calendar" would get any "text/calendar" or "ics/calendar" attachments. (Replying to the list so it will appear in