[no subject]

2021-09-25 Thread Jon Fineman
I was curious if anybody had any ideas of how to add unread messages along with total messages to the hello view for each saved search? I am aware of the count-query parameter to the notmuch-saved-searches call that shows a count based on a search term. However when all messages are read the

[PATCH 11/36] lib/parse-sexp: support subject field

2021-08-24 Thread David Bremner
called *prefixes* in notmuch documentation) +correspond to attributes of mail messages. Some are inherent (and +immutable) like ``subject``, while others ``tag`` and ``property`` are +settable by the user. Each concrete field in +:any:`the table below ` +is discussed further under "Search pre

[PATCH 10/31] lib/parse-sexp: support subject field

2021-08-12 Thread David Bremner
called *prefixes* in notmuch documentation) +correspond to attributes of mail messages. Some are inherent (and +immutable) like ``subject``, while others ``tag`` and ``property`` are +settable by the user. Each concrete field in +:any:`the table below ` +is discussed further under "Search pre

[PATCH 10/27] lib/parse-sexp: support subject field

2021-07-30 Thread David Bremner
* in notmuch documentation) +correspond to attributes of mail messages. Some are inherent (and +immutable) like ``subject``, while others ``tag`` and ``property`` are +settable by the user. Each concrete field in +:any:`the table below ` +is discussed further under "Search prefixes" in +:an

[PATCH 07/25] lib/parse-sexp: parse 'subject'

2021-07-17 Thread David Bremner
_sexp_field_t fields[] = +{ +{ "subject",Xapian::Query::OP_PHRASE }, +{ } +}; + static notmuch_status_t _sexp_to_xapian_query (notmuch_database_t *notmuch, const sexp_t *sx, Xapian::Query ); @@ -6

[PATCH 06/11] lib/parse-sexp: parse 'subject'

2021-07-13 Thread David Bremner
_sexp_field_t fields[] = +{ +{ "subject",Xapian::Query::OP_PHRASE }, +{ } +}; + static Xapian::Query _sexp_to_xapian_query (sexp_t *sx); static Xapian::Query @@ -46,6 +57,26 @@ _notmuch_sexp_string_to_xapian_query (notmuch_database_t *notmuch, const char *q

[PATCH 5/8] test: add regression tests for n_t_get_{authors, subject}

2020-07-24 Thread David Bremner
+authors = notmuch_thread_get_authors (thread); +printf("%d\n%s\n", thread != NULL, authors); +} +EOF +cat < EXPECTED +== stdout == +1 +Lars Kellogg-Stedman, Mikhail Gusarov, Keith Packard, Carl Worth +== stderr == +EOF +test_expect_equal_file EXPECTED OUTPUT + +test_be

[no subject]

2020-04-12 Thread David Bremner
Here's a not too ambitious attempt to clean up the error handling on zlib output. It's bit gross to treat any error reported by zlib as fatal, but it's a step up from ignoring them, and it's in the client code, not in the library. The first patch splits out the first fix of

Re: [PATCH 1/3] test: add known broken tests for from: and subject:

2019-08-25 Thread Tomi Ollila
:b@c >> OUTPUT > +notmuch count $1:a@b $1:b@c >> OUTPUT > +cat < EXPECTED > +1 > +1 > +2 > +0 > +EOF the above could be done printf %s\\n 1 1 2 0 > EXPECTED (whichever way is "clearer" -- using '%s\n' or even "%

[PATCH 1/3] test: add known broken tests for from: and subject:

2019-08-21 Thread David Bremner
nt $1:a@b > OUTPUT +notmuch count $1:a $1:b >> OUTPUT +notmuch count $1:a@b OR $1:b@c >> OUTPUT +notmuch count $1:a@b $1:b@c >> OUTPUT +cat < EXPECTED +1 +1 +2 +0 +EOF +test_expect_equal_file EXPECTED OUTPUT +} + +test_AND from test_subtest_known_broken +test

[PATCH v4 10/17] indexing: record protected subject when indexing cleartext

2019-05-27 Thread Daniel Kahn Gillmor
When indexing the cleartext of an encrypted message, record any protected subject in the database, which should make it findable and visible in search. Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 42 ++ lib/message.cc

Re: [PATCH v3 10/17] indexing: record protected subject when indexing cleartext

2019-05-27 Thread Daniel Kahn Gillmor
On Mon 2019-05-27 17:17:20 -0400, Daniel Kahn Gillmor wrote: > When indexing the cleartext of an encrypted message, record any > protected subject in the database, which should make it findable and > visible in search. ugh, please ignore v3 of this patch (10/17) as well. v4 should

_notmuch_database_log vs _notmuch_database_log_append [was: Re: [PATCH v2 10/17] indexing: record protected subject when indexing cleartext]

2019-05-27 Thread Daniel Kahn Gillmor
On Mon 2019-05-27 07:24:41 -0300, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> +status = _notmuch_message_crypto_potential_payload (msg_crypto, clear, >> GMIME_OBJECT (encrypted_data), GMIME_MULTIPART_ENCRYPTED_CONTENT); >> +_index_mime_part (message, indexopts, clear,

[PATCH v3 10/17] indexing: record protected subject when indexing cleartext

2019-05-27 Thread Daniel Kahn Gillmor
When indexing the cleartext of an encrypted message, record any protected subject in the database, which should make it findable and visible in search. Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 46 +++--- lib/message.cc

Re: [PATCH v2 10/17] indexing: record protected subject when indexing cleartext

2019-05-27 Thread David Bremner
Daniel Kahn Gillmor writes: > +status = _notmuch_message_crypto_potential_payload (msg_crypto, clear, > GMIME_OBJECT (encrypted_data), GMIME_MULTIPART_ENCRYPTED_CONTENT); > +_index_mime_part (message, indexopts, clear, msg_crypto); > g_object_unref (clear); If you're going to

[PATCH v2 17/17] cli/reply: pull proposed subject line from the message, not the index

2019-05-26 Thread Daniel Kahn Gillmor
Protected subject lines were being emitted in reply when the cleartext of documents was indexed. create_reply_message() was pulling the subject line from the index, rather than pulling it from the GMimeMessage object that it already has on hand. This one-line fix to notmuch-reply.c solves

[PATCH v2 07/17] test: add test for missing external subject

2019-05-26 Thread Daniel Kahn Gillmor
Adding another test to ensure that we handle protected headers gracefully when no external subject is present. Signed-off-by: Daniel Kahn Gillmor --- test/T356-protected-headers.sh| 6 .../subjectless-protected-header.eml | 29 +++ 2 files changed

[PATCH v2 10/17] indexing: record protected subject when indexing cleartext

2019-05-26 Thread Daniel Kahn Gillmor
When indexing the cleartext of an encrypted message, record any protected subject in the database, which should make it findable and visible in search. Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 42 ++ lib/message.cc

[PATCH v2 05/17] cli/show: emit payload subject instead of outside subject

2019-05-26 Thread Daniel Kahn Gillmor
Correctly fix the two outstanding tests so that the protected (hidden) subject is properly reported. Signed-off-by: Daniel Kahn Gillmor --- notmuch-client.h | 2 +- notmuch-reply.c| 4 +++- notmuch-show.c | 14 +- test/T356-protected

Re: [PATCH 11/20] cli/show: emit payload subject instead of outside subject

2018-07-13 Thread Daniel Kahn Gillmor
On Thu 2018-06-28 21:40:04 -0300, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> >> sp->map_key (sp, "Subject"); >> -sp->string (sp, g_mime_message_get_subject (message)); >> +if (msg_crypto && msg_crypto-

[no subject]

2018-07-08 Thread David Bremner
Thanks to Gregor for the test data. I can now duplicate the problem with a regression test using (small) synthetic data. ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH 17/20] cli/reply: add --protected-subject boolean flag

2018-06-29 Thread David Bremner
Daniel Kahn Gillmor writes: > This flag indicates the intent of the client to protect the subject > line, which allows "notmuch reply" to safely emit the earlier > message's encrypted subject without risking leaking it in the clear in > the reply. > > Obvio

Re: [PATCH 11/20] cli/show: emit payload subject instead of outside subject

2018-06-28 Thread David Bremner
Daniel Kahn Gillmor writes: > > sp->map_key (sp, "Subject"); > -sp->string (sp, g_mime_message_get_subject (message)); > +if (msg_crypto && msg_crypto->payload_subject) { > + sp->string (sp, msg_crypto->payloa

Re: [PATCH 18/20] indexing: record protected subject when indexing cleartext

2018-06-02 Thread Jameson Graef Rollins
On Fri, May 11 2018, Daniel Kahn Gillmor wrote: > When indexing the cleartext of an encrypted message, record any > protected subject in the database, which should make it findable and > visible in search. > --- > lib/index.cc | 42 ++

[PATCH 15/20] cli/reply: ensure encrypted Subject: line does not leak in the clear

2018-05-10 Thread Daniel Kahn Gillmor
Now that we can decrypt headers, we want to make sure that clients using "notmuch reply" to prepare a reply don't leak cleartext in their subject lines. In particular, the ["reply-headers"]["Subject"] should by default show the external Subject. --- test/T356-prote

[PATCH 17/20] cli/reply: add --protected-subject boolean flag

2018-05-10 Thread Daniel Kahn Gillmor
This flag indicates the intent of the client to protect the subject line, which allows "notmuch reply" to safely emit the earlier message's encrypted subject without risking leaking it in the clear in the reply. Obviously, it should only be used by a client that *will* protect the su

[PATCH 18/20] indexing: record protected subject when indexing cleartext

2018-05-10 Thread Daniel Kahn Gillmor
When indexing the cleartext of an encrypted message, record any protected subject in the database, which should make it findable and visible in search. --- lib/index.cc | 42 ++ lib/message.cc | 8 +++ lib/notmuch-private.h

[PATCH 13/20] test: add test for missing external subject

2018-05-10 Thread Daniel Kahn Gillmor
Adding another test to ensure that we handle it gracefully when no external subject is present. --- test/T356-protected-headers.sh| 6 .../subjectless-protected-header.eml | 29 +++ 2 files changed, 35 insertions(+) create mode 100644 test/corpora

[PATCH 11/20] cli/show: emit payload subject instead of outside subject

2018-05-10 Thread Daniel Kahn Gillmor
Correctly fix the two outstanding tests so that the protected (hidden) subject is properly reported. --- notmuch-client.h | 2 +- notmuch-reply.c| 4 +++- notmuch-show.c | 11 +++ test/T356-protected-headers.sh | 3 --- 4 files changed, 11

Re: [PATCH] test: add known broken test for regexp search of second subject

2018-05-03 Thread David Bremner
David Bremner <da...@tethera.net> writes: > We expect this to give the same answer as the non-regexp subject > search. It does not because the regexp search relies on the value > slot, which currently contains only one subject. Pushed to master. I still need to revi

wish: notmuch-emacs: wash From: / To: and Subject: in notmuch search / show

2018-03-02 Thread Gregor Zattler
Dear notmuch-emacs developers, it would be nice if there was a facility to wash (= shorten) the displayed To:, From: and Subject headers at least for the display of notmuch search results. >From the users perspective this could be done via a list of regular expressions with corresponding sh

[no subject]

2018-02-01 Thread Matthew Lear
From: Matthew Lear <m...@bubblegen.co.uk> To: notmuch@notmuchmail.org Cc: Matthew Lear <m...@bubblegen.co.uk> Subject: [PATCH] Update date search syntax. Date: Thu, 1 Feb 2018 20:52:18 + Message-Id: <20180201205218.4368-1-m...@bubblegen.co.uk> X-Mailer: git-send-email 2.

[PATCH] test: add known broken test for regexp search of second subject

2017-12-14 Thread David Bremner
We expect this to give the same answer as the non-regexp subject search. It does not because the regexp search relies on the value slot, which currently contains only one subject. --- test/T670-duplicate-mid.sh | 10 ++ 1 file changed, 10 insertions(+) diff --git a/test/T670-duplicate

Re: [PATCH 0/6] Sort by from and subject

2017-09-30 Thread Mark Walters
is this something we want to have? Is this generally useful? >> >> Sorting by from and subject are in most mail clients (mutt, gnus, outlook...) > > Which of those display results as threads, and of those that do, how do > they sort the threads? In the notmuch case, the

Re: [PATCH 0/6] Sort by from and subject

2017-09-30 Thread Jani Nikula
On Sat, 30 Sep 2017, William Casarin <j...@jb55.com> wrote: > Jani Nikula <j...@nikula.org> writes: > >> I think there are two considerations here: >> >> First, is this something we want to have? Is this generally useful? > > Sorting by from and su

Re: [PATCH 0/6] Sort by from and subject

2017-09-30 Thread William Casarin
Hey Jani, Jani Nikula <j...@nikula.org> writes: > I think there are two considerations here: > > First, is this something we want to have? Is this generally useful? Sorting by from and subject are in most mail clients (mutt, gnus, outlook...) > There's still the issue of

Re: [PATCH 0/6] Sort by from and subject

2017-09-30 Thread Jani Nikula
binding. I think there are two considerations here: First, is this something we want to have? Is this generally useful? There's still the issue of From: and Subject: needing more heuristic for useful sorting that I mentioned in id:87efrm70ai@nikula.org. Second, if we decide we want this, IMHO the inte

Re: emacs: reply subject sanitization

2017-09-27 Thread David Bremner
Jani Nikula writes: > v2 of id:20170915155716.19597-1-j...@nikula.org, now with test. > > BR, > Jani. pushed. d ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch

Re: emacs: reply subject sanitization

2017-09-26 Thread David Edmondson
On Tuesday, 2017-09-26 at 21:26:06 +0300, Jani Nikula wrote: > v2 of id:20170915155716.19597-1-j...@nikula.org, now with test. Looks good. dme. -- I can't explain, you would not understand. This is not how I am. ___ notmuch mailing list

[PATCH 2/2] emacs: sanitize subject in replies

2017-09-26 Thread Jani Nikula
8,7 +218,7 @@ mutiple parts get a header." else collect pair))) (notmuch-mua-mail (plist-get reply-headers :To) - (plist-get reply-headers :Subject) + (notmuch-sanitize (plist-get reply-he

emacs: reply subject sanitization

2017-09-26 Thread Jani Nikula
v2 of id:20170915155716.19597-1-j...@nikula.org, now with test. BR, Jani. ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch

[PATCH 0/6] Sort by from and subject

2017-09-25 Thread William Casarin
This patch series replaces my original set[1]. I've been using this extensivly for about 3 weeks now and I'm pretty happy with it. I've added the ability to change sort-order on the fly with the O key binding. Main use cases -- * subject sorting: github subscriptions Sorting through

[PATCH 1/6] sorting: add the ability to sort by from and subject

2017-09-25 Thread William Casarin
* add {from,subject}-{ascending,descending} sort options --- lib/notmuch.h| 16 lib/query.cc | 12 notmuch-search.c | 4 3 files changed, 32 insertions(+) diff --git a/lib/notmuch.h b/lib/notmuch.h index f26565f3..071bfe4d 100644 --- a/lib/notmuch.h

[PATCH 2/6] sorting: update ruby bindings for from and subject

2017-09-25 Thread William Casarin
OTMUCH_SORT_FROM_ASC)); +/* + * Document-const: Notmuch::SORT_FROM_DESC + * + * Sort query results by from in descending order + */ +rb_define_const (mod, "SORT_FROM_DESC", INT2FIX (NOTMUCH_SORT_FROM_DESC)); +/* + * Document-const: Notmuch::SORT_SUBJECT_ASC + * + *

[PATCH] emacs: sanitize subject in replies

2017-09-15 Thread Jani Nikula
t a header." else collect pair))) (notmuch-mua-mail (plist-get reply-headers :To) - (plist-get reply-headers :Subject) + (notmuch-sanitize (plist-get reply-headers :Subject))

Re: [PATCH 1/3] sorting: add the ability to sort by from and subject

2017-09-07 Thread William Casarin
David Bremner writes: > It seems worth mentioning that it's possible to preprocess values into > keys (see Xapian::Enquire::set_sort_by_key). So things like Re: > etc... could be stripped. Hmm looks like I need to create a KeyMaker class which appears to be a glorified

Re: [PATCH 1/3] sorting: add the ability to sort by from and subject

2017-09-04 Thread David Bremner
sent to my inbox, I wanted to be able to group >> similar feeds (mainly by from, sometimes subject). Alternatively if >> there was a way to group by tags I could do it that way, but I don't tag >> all of my individual feeds. >> >> If this is too obscure of a use case

Re: [PATCH 1/3] sorting: add the ability to sort by from and subject

2017-09-04 Thread William Casarin
William Casarin <j...@jb55.com> writes: > Jani Nikula <j...@nikula.org> writes: > >> The implementation seems simple enough, but what's the use case, really? > > I get all of my rss feeds sent to my inbox, I wanted to be able to group > similar feeds (

Re: [PATCH 1/3] sorting: add the ability to sort by from and subject

2017-09-04 Thread Jani Nikula
On Mon, 04 Sep 2017, William Casarin <j...@jb55.com> wrote: > * add {from,subject}-{ascending,descending} sort options The implementation seems simple enough, but what's the use case, really? When thinking about the usefulness of the feature, you have to think about what gets indexed

[PATCH 2/3] sorting: update ruby bindings for from and subject

2017-09-04 Thread William Casarin
OTMUCH_SORT_FROM_ASC)); +/* + * Document-const: Notmuch::SORT_FROM_DESC + * + * Sort query results by from in descending order + */ +rb_define_const (mod, "SORT_FROM_DESC", INT2FIX (NOTMUCH_SORT_FROM_DESC)); +/* + * Document-const: Notmuch::SORT_SUBJECT_ASC + * + *

[PATCH 1/3] sorting: add the ability to sort by from and subject

2017-09-04 Thread William Casarin
* add {from,subject}-{ascending,descending} sort options --- I'm not sure if we want to eventually refactor ascending and descending into a separate option, but I decided to keep it this way for now. lib/notmuch.h| 16 lib/query.cc | 12 notmuch-search.c

Re: notmuch-search: sort by subject or author?

2017-09-04 Thread William Casarin
David Bremner <da...@tethera.net> writes: > I think it's not really possible at the moment. If you want this to work > with large searches then it probably needs to be done at the CLI level > (see [1] for work in progress adding sorting by file size). > > Luckily 'From' and

Re: notmuch-search: sort by subject or author?

2017-09-04 Thread David Bremner
William Casarin <j...@jb55.com> writes: > Hey there, > > Is there a way to sort by subject or author in emacs/notmuch-search? I > find myself wanting to do this a lot. My particular use case is rss > feeds, where I have many different feeds in my rss tag that I would lik

notmuch-search: sort by subject or author?

2017-09-04 Thread William Casarin
Hey there, Is there a way to sort by subject or author in emacs/notmuch-search? I find myself wanting to do this a lot. My particular use case is rss feeds, where I have many different feeds in my rss tag that I would like to group together. If not, I am interested in adding this feature

[PATCH 3/5] test: known broken test for subject after reindexing

2017-08-27 Thread David Bremner
/test/T670-duplicate-mid.sh @@ -40,6 +40,14 @@ notmuch reindex '*' notmuch search --output=files "sekrit" | notmuch_dir_sanitize > OUTPUT test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest 'reindex choses subject from first filename' +test_subtest_known_broken +cat < EXPE

[PATCH 5/5] test/duplicate-mid: check for subject with notmuch-show

2017-08-27 Thread David Bremner
ile EXPECTED OUTPUT +test_begin_subtest 'First subject preserved in notmuch-show (json)' +test_subtest_known_broken +output=$(notmuch show --body=false --format=json id:duplicate | notmuch_json_show_sanitize) +expected='[[[{ +"id": "X", +"match": true, +

[PATCH] test: check for subject consistency between search and show

2017-08-27 Thread David Bremner
> OUTPUT test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest 'First subject preserved in notmuch-show (json)' +output=$(notmuch show --body=false --format=json id:duplicate | notmuch_json_show_sanitize) +expected='[[[{ +"id": "X", +"match&qu

[no subject]

2017-06-12 Thread Damien Cassou
> OK, I see with counsel-imenu the current indexing by header lines is > reasonable. It might be improvable by adding the subject, but I'm > not sure about line lengths. > - maybe the docstrings should recomment counsel-imenu? I'm not sure as the function `notmuch-show-imenu-extrac

[no subject]

2017-06-03 Thread David Bremner
This is the first allegedly complete version of support for gmime 3 It obsoletes several partial series [1][2] - id:20170602022232.17264-1-da...@tethera.net - patches 9-11, starting at id:20170527165121.9654-10-da...@tethera.net There still remains the question of whether we should

[no subject]

2017-05-23 Thread Tomi Ollila
for future reference if need for atexit functionality arises. From Tomi Ollila <tomi.oll...@iki.fi> # This line is ignored. From: Tomi Ollila <tomi.oll...@iki.fi> Subject: stop gpg-agent (among other) processes at test module exit In-Reply-To: ___

Re: [PATCH 3/4] test: add known broken tests wildcard search in from and subject

2017-03-25 Thread David Bremner
David Bremner writes: > This was broken by the addition of regexp searching. The detection of > wildcards is not currently done in the recursive call to parse_query, > because of quoting issues. Patches 3 and 4 pushed to release and master. d

[PATCH 1/2] test: add known broken test for null from: and subject: query

2017-03-24 Thread David Bremner
--- a/test/T650-regexp-query.sh +++ b/test/T650-regexp-query.sh @@ -11,6 +11,26 @@ fi notmuch search --output=messages from:cworth > cworth.msg-ids +# these headers will generate no document terms +add_message '[from]="-" [subject]="empty from"' +add_message '[subject]=&qu

[PATCH 1/4] test: add known broken test for empty from: and subject: query

2017-03-17 Thread David Bremner
UT +test_expect_equal_file cworth.msg-ids OUTPUT + +test_begin_subtest "empty subject: search" +test_subtest_known_broken +notmuch search --output=messages 'subject:""' and from:cworth > OUTPUT +test_expect_equal_file cworth.msg-ids OUTPUT test_begin_subtest "regexp

[PATCH 3/4] test: add known broken tests wildcard search in from and subject

2017-03-17 Thread David Bremner
/T650-regexp-query.sh index 049477b4..ba4a64e0 100755 --- a/test/T650-regexp-query.sh +++ b/test/T650-regexp-query.sh @@ -18,6 +18,16 @@ test_expect_equal_file cworth.msg-ids OUTPUT test_begin_subtest "empty subject: search" notmuch search --output=messages 'subject:""' and

[PATCH] fixup! lib: regexp matching in 'subject' and 'from'

2017-03-03 Thread David Bremner
--- lib/regexp-fields.cc | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/regexp-fields.cc b/lib/regexp-fields.cc index b2b39504..65108e38 100644 --- a/lib/regexp-fields.cc +++ b/lib/regexp-fields.cc @@ -62,6 +62,11 @@ RegexpPostingSource::init (const Xapian::Database ) it_ =

[PATCH 2/4] lib: regexp matching in 'subject' and 'from'

2017-02-26 Thread David Bremner
the idea is that you can run % notmuch search subject:// % notmuch search from:// or % notmuch search subject:"your usual phrase search" % notmuch search from:"usual phrase search" This feature is only available with recent Xapian, specifically support for field

Re: [patch v5 4/6] lib: regexp matching in 'subject' and 'from'

2017-02-26 Thread Jani Nikula
On Thu, 16 Feb 2017, David Bremner <da...@tethera.net> wrote: > the idea is that you can run > > % notmuch search subject:// > % notmuch search from:// > > or > > % notmuch search subject:"your usual phrase search" > % notmuch search from:"usual p

[patch v5 4/6] lib: regexp matching in 'subject' and 'from'

2017-02-16 Thread David Bremner
the idea is that you can run % notmuch search subject:// % notmuch search from:// or % notmuch search subject:"your usual phrase search" % notmuch search from:"usual phrase search" This feature is only available with recent Xapian, specifically support for field

Re: [Patch v4] lib: regexp matching in 'subject' and 'from'

2017-02-11 Thread David Bremner
Mark Walters <markwalters1...@gmail.com> writes: > > Hi > > Broadly I like the backslash escaping option. Two thoughts: can any > fields (from/subject/message-id) start with a "\" anyway? I think not > but thought it worth checking. From and subject are probabli

Re: [Patch v4] lib: regexp matching in 'subject' and 'from'

2017-02-10 Thread Mark Walters
done, > although I'm a bit uneasy about how this makes the syntax for id: > different, so id:/foo would be legit, but from:/foo would be an error. > Maybe the dwim-factor is worth it. Hi Broadly I like the backslash escaping option. Two thoughts: can any fields (from/subject/message-id) sta

Re: [Patch v4] lib: regexp matching in 'subject' and 'from'

2017-02-09 Thread Tomi Ollila
On Thu, Feb 09 2017, David Bremner wrote: > Jani Nikula writes: > >> >> Theoretically "/" is an acceptable character in message-ids [1]. Rare, >> unlikely, but acceptable. Searching for message-id's beginning with "/" >> would have to use regexps, which would

Re: [Patch v4] lib: regexp matching in 'subject' and 'from'

2017-02-08 Thread David Bremner
Jani Nikula writes: > > Theoretically "/" is an acceptable character in message-ids [1]. Rare, > unlikely, but acceptable. Searching for message-id's beginning with "/" > would have to use regexps, which would break in all sorts of ways > throughout the stack. I don't think

Re: [Patch v4] lib: regexp matching in 'subject' and 'from'

2017-02-05 Thread David Bremner
; users get used to it, and try to tighten the rules if we realize we'd >> need that for some reason. > > I agree -- should we allow trailing slash ('/') without first char also > being '/' (e.g. subject:blah/) > I'd say that should also be an error. it doesn't add anything useful to

Re: [Patch v4] lib: regexp matching in 'subject' and 'from'

2017-02-05 Thread Tomi Ollila
required for this feature -- and emphasize it a bit better in >>> manual page ? >>> >>> Probably '//' is used to escape '/' -- should such a character ever needed >>> in regex search. >>> >> >> Currently no escaping is needed because it only

Re: [Patch v4] lib: regexp matching in 'subject' and 'from'

2017-01-29 Thread Jani Nikula
t; in regex search. >> > > Currently no escaping is needed because it only looks at the first and > last characters of the string (the usual xapian/shell rules mean that "" might > be needed). > > The following seem to work as hoped > > # match a / with a spa

Re: [Patch v4] lib: regexp matching in 'subject' and 'from'

2017-01-29 Thread Jani Nikula
On Wed, 25 Jan 2017, Tomi Ollila <tomi.oll...@iki.fi> wrote: > On Sat, Jan 21 2017, David Bremner <da...@tethera.net> wrote: > >> the idea is that you can run >> >> % notmuch search subject:// >> % notmuch search from:// > > I like this interfac

Re: [Patch v4] lib: regexp matching in 'subject' and 'from'

2017-01-25 Thread David Bremner
em to work as hoped # match a / with a space before it % notmuch search 'subject:"/ //"' # just a slash % notmuch search subject:/// # anchored slash % notmuch search subject:/^// The trailing slash is actually decorative, we could drop it. Actually *blush* I just noticed the current

Re: [Patch v4] lib: regexp matching in 'subject' and 'from'

2017-01-25 Thread Tomi Ollila
On Sat, Jan 21 2017, David Bremner <da...@tethera.net> wrote: > the idea is that you can run > > % notmuch search subject:// > % notmuch search from:// I like this interface. > > or > > % notmuch search subject:"your usual phrase search" >

[Patch v4] lib: regexp matching in 'subject' and 'from'

2017-01-21 Thread David Bremner
the idea is that you can run % notmuch search subject:// % notmuch search from:// or % notmuch search subject:"your usual phrase search" % notmuch search from:"usual phrase search" This should also work with bindings, since it extends the query parser. This is trivial

[WIP] lib: regexp matching in 'subject' and 'from'

2017-01-20 Thread David Bremner
the idea is that you can run % notmuch search subject: % notmuch search from:' or % notmuch search subject:"your usual phrase search" % notmuch search from:"usual phrase search" The heuristic to decide how to interepret the query is based on a regex, roughly [a-z -]+ T

Re: [Patch v2] lib: regexp matching in 'subject' and 'from'

2017-01-19 Thread David Bremner
David Bremner <da...@tethera.net> writes: > the idea is that you can run > > % notmuch search re:subject: > % notmuch search re:from:' > > or > > % notmuch search subject:"your usual phrase search" > % notmuch search from:"usual phrase se

[Patch v3] lib: regexp matching in 'subject' and 'from'

2017-01-19 Thread David Bremner
the idea is that you can run % notmuch search re_subject: % notmuch search re_from:' or % notmuch search subject:"your usual phrase search" % notmuch search from:"usual phrase search" This should also work with bindings, since it extends the query parser. This is trivial

Re: [Patch v2] lib: regexp matching in 'subject' and 'from'

2017-01-18 Thread David Bremner
Jani Nikula <j...@nikula.org> writes: > I played around with this a bit, and it seemed to work. Unsurprisingly, > getting the quoting right was the hardest part. Even though I know how > the stuff works under the hood, it took me a while to realize that you > have to use 're:&

Re: [Patch v2] lib: regexp matching in 'subject' and 'from'

2017-01-18 Thread Jani Nikula
On Mon, 14 Nov 2016, David Bremner <da...@tethera.net> wrote: > the idea is that you can run > > % notmuch search re:subject: > % notmuch search re:from:' > > or > > % notmuch search subject:"your usual phrase search" > % notmuch search from:&quo

[Patch v2] lib: regexp matching in 'subject' and 'from'

2016-11-14 Thread David Bremner
the idea is that you can run % notmuch search re:subject: % notmuch search re:from:' or % notmuch search subject:"your usual phrase search" % notmuch search from:"usual phrase search" This should also work with bindings, since it extends the query parser. This is trivial

Re: perfect match of subject search

2016-11-01 Thread David Bremner
David Belohrad <da...@belohrad.ch> writes: > Dear all, > > some advice would be appreciated. I use spamassassin to tag all spam by > !SPAM! such, that during notmuch tagging process i could filter them > away from my inbox. Problem is, that no matter what, I cannot

perfect match of subject search

2016-11-01 Thread David Belohrad
Dear all, some advice would be appreciated. I use spamassassin to tag all spam by !SPAM! such, that during notmuch tagging process i could filter them away from my inbox. Problem is, that no matter what, I cannot search on subject exactly. Hence if I write down: notmuch search subject

[no subject]

2016-10-13 Thread Matt Armstrong
This supercedes id:1476207707-21827-1-git-send-email-marmstr...@google.com with changes steming from Mark's helpful feedback. ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch

[no subject]

2016-09-12 Thread David Bremner
I added a new test to to be "fixed" by Mark's patch. I wasn't 100% sure about whether to add the test to the emacs set or the crypto set, but this way doesn't introduce new dependencies to the test set (T350 is already using emacs). If people feel strongly we could move the test to T310; this will

[PATCH] lib: regexp matching in 'subject' and 'from'

2016-06-27 Thread David Bremner
the idea is that you can run % notmuch search re:subject: % notmuch search re:from:' or % notmuch search subject:"your usual phrase search" % notmuch search from:"usual phrase search" This should also work with bindings, since it extends the query parser. This is trivial

Re: [PATCH] WIP: regexp matching in 'subject' and 'from'

2016-06-11 Thread Gaute Hope
es own wrapper around notmuch. I have one that was written long before notmuch got date: searches (it mangles e.g 5h.. to 1234567890.. (**) and logs search and show queries (**) should change that to use date:... instead (i.e. date: queries w/o date: prefix). I "suggested" subject:/one's own sub

Re: [PATCH] WIP: regexp matching in 'subject' and 'from'

2016-06-11 Thread Tomi Ollila
original prefix? >> >> It would change the matching behaviour. I guess there are people that >> like the current "sloppy" matching of from: and subject:. In my >> not-very-scientific tests, it is a factor of 5 to 10 times slower to do >> regexp search,

Re: [PATCH] WIP: regexp matching in 'subject' and 'from'

2016-06-11 Thread David Bremner
Gaute Hope writes: > > Maybe we could check if the search string contains a regexp and decide > whether to pre-process it on the background of that? I think that would > make the interface more user-friendly. You'd just always use search > whether you decide that you need

Re: [PATCH] WIP: regexp matching in 'subject' and 'from'

2016-06-11 Thread Gaute Hope
David Bremner writes on juni 10, 2016 13:09: Gaute Hope <e...@gaute.vetsj.com> writes: Cool! Would it break a lot of things if you just replace the original prefix? It would change the matching behaviour. I guess there are people that like the current "sloppy" matching of f

[PATCH] WIP: regexp matching in 'subject' and 'from'

2016-06-10 Thread David Bremner
the idea is that you can run % notmuch search re:subject: % notmuch search re:from:' or % notmuch search subject:"your usual phrase search" % notmuch search from:"usual phrase search" This should also work with bindings, since it extends the query parser. This is trivial

Re: [PATCH] WIP: regexp matching in 'subject' and 'from'

2016-06-10 Thread David Bremner
Tomi Ollila writes: > On Fri, Jun 10 2016, David Bremner wrote: > >> David Bremner writes: >> and of course everywhere it says #ifdef HAVE_XAPIAN_FIELD_PROCESSOR, is >> should say #if. > > ... is there a static code analyzer which

Re: [PATCH] WIP: regexp matching in 'subject' and 'from'

2016-06-10 Thread Gaute Hope
David Bremner writes on juni 10, 2016 4:28: the idea is that you can run % notmuch search subject_re: % notmuch search from_re:' or % notmuch search subject:"your usual phrase search" % notmuch search from:"usual phrase search" This should also work with bindings, since

Re: [PATCH] WIP: regexp matching in 'subject' and 'from'

2016-06-09 Thread David Bremner
David Bremner writes: > +#ifdef HAVE_XAPIAN_FIELD_PROCESSOR > +delete notmuch->from_re_field_processor; > +notmuch->from_re_field_processor = NULL; > +delete notmuch->subject_re_field_processor; > +notmuch->subject_re_field_processor = NULL; > +#endif and of

[PATCH] WIP: regexp matching in 'subject' and 'from'

2016-06-09 Thread David Bremner
the idea is that you can run % notmuch search subject_re: % notmuch search from_re:' or % notmuch search subject:"your usual phrase search" % notmuch search from:"usual phrase search" This should also work with bindings, since it extends the query parser. This is trivial

[no subject]

2015-12-14 Thread David Bremner
This obsoletes id:1449842087-10972-1-git-send-email-da...@tethera.net I reworked the tests to use gpgsm to generate the certificate. This leaves less room for me to screw things up. Since this requires gpgsm 2.1, I'm including the certs in the patches, rather then having the test suite

  1   2   3   4   5   >