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

2017-02-11 Thread David Bremner
Mark Walters 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 probablistic xapian fields, so punctuation

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

2017-02-10 Thread Mark Walters
On Thu, 09 Feb 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-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
Tomi Ollila writes: > TOn Sun, Jan 29 2017, Jani Nikula wrote: > >> >> I'd go with an error. It's easy to loosen the rules later on if we >> decide that's a good idea. Much harder to accept loose rules now, let >> users get used to it, and try to tighten the

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

2017-02-05 Thread Tomi Ollila
TOn Sun, Jan 29 2017, Jani Nikula wrote: > On Wed, 25 Jan 2017, David Bremner wrote: >> Tomi Ollila writes: >> >>> >>> Why would not mesasge_id not be useful to regex match. I can come up quite >>> a few use cases... but if there are

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

2017-01-29 Thread Jani Nikula
On Wed, 25 Jan 2017, David Bremner wrote: > Tomi Ollila writes: > >> >> Why would not mesasge_id not be useful to regex match. I can come up quite >> a few use cases... but if there are techinal difficulties... then that >> should be mentioned instead. > >

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

2017-01-29 Thread Jani Nikula
On Wed, 25 Jan 2017, Tomi Ollila wrote: > On Sat, Jan 21 2017, David Bremner wrote: > >> the idea is that you can run >> >> % notmuch search subject:// >> % notmuch search from:// > > I like this interface. FWIW I think this is superior to the earlier

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

2017-01-25 Thread David Bremner
Tomi Ollila writes: > > Why would not mesasge_id not be useful to regex match. I can come up quite > a few use cases... but if there are techinal difficulties... then that > should be mentioned instead. I'll have a look. Since the first version of this patch (when that

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

2017-01-25 Thread Tomi Ollila
On Sat, Jan 21 2017, David Bremner 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" > % notmuch search from:"usual phrase search" > > This

[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 to extend for other