unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jameson Rollins <jrollins@finestructure.net>
To: Mark Anderson <MarkR.Anderson@amd.com>, notmuch@notmuchmail.org
Subject: Re: Strange match to my query
Date: Fri, 25 Feb 2011 10:19:21 -0800	[thread overview]
Message-ID: <878vx4vuxi.fsf@servo.finestructure.net> (raw)
In-Reply-To: <3wd4o8wa7fx.fsf@testarossa.amd.com>

[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]

On Tue, 25 Jan 2011 16:29:22 -0700, Mark Anderson <MarkR.Anderson@amd.com> wrote:
> Apparently matching on email addresses doesn't work the way I hoped.
> 
> While debugging why my to:x@y.com search was matching far too many
> entries, I whittled it down to this:
> 
> WORD1=hello
> WORD2=goodbye
> MSGID=junk$(date +%s)
> TESTDIR=$(notmuch config get database.path)/.tmp/new
> TESTMAIL=$TESTDIR/$MSGID:2,
> 
> mkdir -p $TESTDIR
> 
> echo Testcase for $WORD1@$WORD2, msgid: $MSGID@junk.com
> 
> echo "From: nobody@nobody.com
> To: c@${WORD1}.com, K-R@${WORD2}.com
> Date: Mon, 24 Jan 2011 23:41:34 -0600
> Subject: Error
> Message-ID: <$MSGID@junk.com>
> 
> Not empty body.=
> 
> " > $TESTMAIL
> 
> notmuch new
> notmuch search --output=files to:$WORD1@$WORD2
> notmuch search --output=files to:\"$WORD1@$WORD2\"
> 
> Why does that match, but this doesn't?
> 
> notmuch search --output=files to:\'$WORD1@$WORD2\'

Hey, guys.  Reopening an old thread here, found while trying to track
down a similar problem.

I'm confused why any of these searches should return anything at all.
"$WORD1@$WORD2" doesn't actually match either of the addresses in the
test message, especially when quoted.  The expanded addresses should be:

  c@hello.com
  K-R@goodbye.com

Why should

  hello@goodbye

match anything?  And in fact it doesn't for me if I recreate the same
setup.  Am I missing something?

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

  parent reply	other threads:[~2011-02-25 20:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25 23:29 Strange match to my query Mark Anderson
2011-01-26  0:51 ` Austin Clements
2011-01-26  2:19   ` Carl Worth
2011-01-26  5:59     ` Carl Worth
2011-01-26 17:02       ` Mark Anderson
2011-02-25 18:19 ` Jameson Rollins [this message]
2011-02-25 20:57   ` Mark Anderson
2011-02-25 21:29     ` Jameson Rollins
2011-03-01 23:00       ` Mark Anderson
2011-03-01 23:15         ` Jameson Rollins
2011-03-01 23:40           ` Mark Anderson
2011-04-14  7:32           ` Florian Friesdorf
2011-04-19  6:21             ` Jameson Graef Rollins

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=878vx4vuxi.fsf@servo.finestructure.net \
    --to=jrollins@finestructure.net \
    --cc=MarkR.Anderson@amd.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).