unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jed Brown <jed@59A2.org>
To: Keith Packard <keithp@keithp.com>,
	notmuch@notmuchmail.org, cworth@cworth.org
Subject: Re: [PATCH] Make search filters handle disjunctive queries.
Date: Mon, 23 Nov 2009 19:48:46 +0100	[thread overview]
Message-ID: <87d439jcvl.fsf@59A2.org> (raw)
In-Reply-To: <yuny6lxnllk.fsf@aiko.keithp.com>

On Mon, 23 Nov 2009 10:26:47 -0800, Keith Packard <keithp@keithp.com> wrote:

> Remember to split patches which do more than one thing into separate
> commits.

These are variants of the same operation, but I'll split in the future.

> > +  (let ((grouped-query (if (string-match-p notmuch-search-disjunctive-regexp query) (concat "( " query " )") query)))
> > +    (notmuch-search (concat notmuch-search-query-string " and " grouped-query) notmuch-search-oldest-first)))
> 
> Is there some reason not to just always add the parens?

That's what I did initially, but it's messy to look at in the mode line
after applying successive filters.

> This seems useful; how does it deal with the tag completion stuff?

It doesn't do anything special, but I haven't been following that
carefully.  My thought was that eventually the regular interactive
search and filters, would have semantic completion, e.g. the user enters

  tag:ab<TAB>

and tags would be completed, but they could also do

  from:long.unwieldy.addr<TAB>

In filter-by-tag, the natural thing would be to only complete tags, the
user would be on their own to spell out AND, OR, and NOT.  Unfortunately
I'm not familiar enough with elisp to implement this quickly.

A closely related issue is managing the address book.  I guess the usual
advice is to use BBDB.  I don't know if it's better to hook into that or
for Notmuch to have it's own lightweight approach.  I could imagine
harvesting addresses of everyone I've sent mail to and giving me a
semi-automated way to merge addresses that are likely to point to the
same person.


Jed

  reply	other threads:[~2009-11-23 18:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-22 21:26 [RFC] Precedence of OR and AND Jed Brown
2009-11-22 21:36 ` Bart Trojanowski
2009-11-22 21:43   ` Jed Brown
2009-11-22 21:47     ` Bart Trojanowski
2009-11-23  4:39     ` Carl Worth
2009-11-23 11:49       ` [PATCH] Make search filters handle disjunctive queries Jed Brown
2009-11-23 18:07         ` Jed Brown
2009-11-23 18:26           ` Keith Packard
2009-11-23 18:48             ` Jed Brown [this message]
2009-12-02  2:56           ` Carl Worth
2009-12-02 10:59             ` Jed Brown
2009-12-02 11:00               ` Jed Brown
2009-12-04 19:13                 ` Carl Worth
2009-12-02 13:18               ` Jan Janak
2009-12-02 13:46                 ` Jed Brown
2009-12-02 14:38                   ` Jan Janak
2009-12-02 14:52                     ` Jed Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d439jcvl.fsf@59A2.org \
    --to=jed@59a2.org \
    --cc=cworth@cworth.org \
    --cc=keithp@keithp.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).