From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 4A73B6DE20DF for ; Sun, 26 Feb 2017 11:52:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.168 X-Spam-Level: X-Spam-Status: No, score=-0.168 tagged_above=-999 required=5 tests=[AWL=-0.148, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3jnBlgcT-WN0 for ; Sun, 26 Feb 2017 11:52:32 -0800 (PST) Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) by arlo.cworth.org (Postfix) with ESMTPS id 9E54E6DE20CF for ; Sun, 26 Feb 2017 11:52:31 -0800 (PST) Received: by mail-lf0-f68.google.com with SMTP id a198so2172814lfb.1 for ; Sun, 26 Feb 2017 11:52:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=RyIJz2qrjhDeFmiV4SmnhG1MxsEXAgbULtkmS39S9CM=; b=YgzRrpgsGpIaz+2nRweD6M54If+MfuKoox9f2U+A3kwJfzpIQkV5CUnxJmHaMFalnH X+9wEjZqjt+6HQNe7ciVcYrKLgiZX6T9KM1RyLiDO/k/0xGtGaf4FeJYiiCaZ3XSJ7ZI UdXAXkDh+rTjHnKAR+6JG3ohelO/uUDW0SAIcRH/bezRMvFrB4FdTq66VdlPiK6XVgS3 4f3IRW2i1fOteI8eZPt/lyI/KAwrKOiykpclS9ZxzIxbe6iRY8begMsE9U2qckehOJYC 2mfG9n4WQHSed+OGQ90WASU9lX6kstjaw7yYU/3v9+0N1cfSMW3UL5uLZK0fLp+NsI6s CG8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=RyIJz2qrjhDeFmiV4SmnhG1MxsEXAgbULtkmS39S9CM=; b=jBQYqYpwCqwE5ctfm3TSIXr5Gn8KIA8EKBrHuY1tncPyihEvfn8X07NNyOwVI6BHD5 UkiyILSOIcwI1JTWlLSYKcHR9vaHLqtFjDH1SqK2RUGhE07ZYgIJR0T729oJycGB0A5+ 9hWBppL4DWRpj/dApBKNTLUPWnrRBfAyDzkBCra9xxXH4n1eeu39vEVWdwWd2MRNP3VR 8j6+iCsBtIX6h++//0INjf1TrLYQsbkB3clgKN3SVs70octt0zYpz49HEpx+s9/mx3ch z7sPsHL+vJqGoYn3s26aS5QhqicsX/F8d1Xf0pGRGljkcTPhRH4KtqVdzb6KhqMJxUMJ Iirg== X-Gm-Message-State: AMke39mH+55HBf/x4tEoPaq7uu0CxGG95423nmXRBDi+aAH3rFiElik4RTJKsJb3MpbKvQ== X-Received: by 10.46.88.79 with SMTP id x15mr3226296ljd.39.1488138750077; Sun, 26 Feb 2017 11:52:30 -0800 (PST) Received: from localhost (mobile-access-bcee80-14.dhcp.inet.fi. [188.238.128.14]) by smtp.gmail.com with ESMTPSA id h23sm10323800lji.34.2017.02.26.11.52.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Feb 2017 11:52:29 -0800 (PST) From: Jani Nikula To: David Bremner , notmuch@notmuchmail.org Subject: Re: [patch v5 5/6] lib: add mid: as a synonym for id: In-Reply-To: <20170217030754.32069-6-david@tethera.net> References: <20170217030754.32069-1-david@tethera.net> <20170217030754.32069-6-david@tethera.net> Date: Sun, 26 Feb 2017 21:52:28 +0200 Message-ID: <87d1e4hgqr.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Feb 2017 19:52:33 -0000 On Thu, 16 Feb 2017, David Bremner wrote: > mid: is the url scheme suggested by URL 2392. We also plan to > introduce more flexible searches for mid: than are possible with > id: (in order not to break assumptions about the special behaviour of > id:, e.g. identifying at most one message). LGTM. > --- > lib/database.cc | 1 + > test/T080-search.sh | 6 ++++++ > 2 files changed, 7 insertions(+) > > diff --git a/lib/database.cc b/lib/database.cc > index ee971f32..21c8c5f2 100644 > --- a/lib/database.cc > +++ b/lib/database.cc > @@ -262,6 +262,7 @@ prefix_t prefix_table[] =3D { > { "tag", "K", NOTMUCH_FIELD_EXTERNAL }, > { "is", "K", NOTMUCH_FIELD_EXTERNAL }, > { "id", "Q", NOTMUCH_FIELD_EXTERNAL }, > + { "mid", "Q", NOTMUCH_FIELD_EXTERNAL }, > { "path", "P", NOTMUCH_FIELD_EXTERNAL }, > { "property", "XPROPERTY", NOTMUCH_FIELD_EXTERNAL }, > /* > diff --git a/test/T080-search.sh b/test/T080-search.sh > index 5e8b20ce..6149da93 100755 > --- a/test/T080-search.sh > +++ b/test/T080-search.sh > @@ -34,6 +34,11 @@ add_message '[subject]=3D"search by id"' '[date]=3D"Sa= t, 01 Jan 2000 12:00:00 -0000" > output=3D$(notmuch search id:${gen_msg_id} | notmuch_search_sanitize) > test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test = Suite; search by id (inbox unread)" >=20=20 > +test_begin_subtest "Search by mid:" > +add_message '[subject]=3D"search by mid"' '[date]=3D"Sat, 01 Jan 2000 12= :00:00 -0000"' > +output=3D$(notmuch search mid:${gen_msg_id} | notmuch_search_sanitize) > +test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test = Suite; search by mid (inbox unread)" > + > test_begin_subtest "Search by tag:" > add_message '[subject]=3D"search by tag"' '[date]=3D"Sat, 01 Jan 2000 12= :00:00 -0000"' > notmuch tag +searchbytag id:${gen_msg_id} > @@ -127,6 +132,7 @@ thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; sea= rch by to (inbox unread) > thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; subjectsearchtest (inb= ox unread) > thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; utf8-s=C3=BCbj=C3=A9ct= (inbox unread) > thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; search by id (inbox un= read) > +thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; search by mid (inbox u= nread) > thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; search by tag (inbox s= earchbytag unread) > thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; search by thread (inbo= x unread) > thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; body search (phrase) (= inbox unread) > --=20 > 2.11.0 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch