1 Return-Path: <dme@dme.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 1E06A429E5F
\r
6 for <notmuch@notmuchmail.org>; Wed, 18 Jan 2012 00:25:28 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id EZC7rfe+OqxC for <notmuch@notmuchmail.org>;
\r
16 Wed, 18 Jan 2012 00:25:27 -0800 (PST)
\r
17 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com
\r
18 [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 81C65429E27
\r
21 for <notmuch@notmuchmail.org>; Wed, 18 Jan 2012 00:25:27 -0800 (PST)
\r
22 Received: by wibhr12 with SMTP id hr12so4203767wib.26
\r
23 for <notmuch@notmuchmail.org>; Wed, 18 Jan 2012 00:25:26 -0800 (PST)
\r
24 Received: by 10.180.99.225 with SMTP id et1mr34882909wib.2.1326875126262;
\r
25 Wed, 18 Jan 2012 00:25:26 -0800 (PST)
\r
26 Received: from hotblack-desiato.hh.sledj.net
\r
27 (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])
\r
28 by mx.google.com with ESMTPS id em13sm21142959wid.7.2012.01.18.00.25.24
\r
29 (version=TLSv1/SSLv3 cipher=OTHER);
\r
30 Wed, 18 Jan 2012 00:25:25 -0800 (PST)
\r
31 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)
\r
32 id 177ADA0397; Wed, 18 Jan 2012 08:25:23 +0000 (GMT)
\r
33 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org
\r
34 Subject: Re: [PATCH 2/3] emacs: use a single history for all searches
\r
35 In-Reply-To: <1326828850-8519-2-git-send-email-dmitry.kurochkin@gmail.com>
\r
36 References: <1326828850-8519-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
37 <1326828850-8519-2-git-send-email-dmitry.kurochkin@gmail.com>
\r
38 User-Agent: Notmuch/0.11+64~g42e8f66 (http://notmuchmail.org) Emacs/24.0.92.1
\r
39 (x86_64-pc-linux-gnu)
\r
40 From: David Edmondson <dme@dme.org>
\r
41 Date: Wed, 18 Jan 2012 08:25:22 +0000
\r
42 Message-ID: <cuny5t5mn7x.fsf@hotblack-desiato.hh.sledj.net>
\r
44 Content-Type: multipart/signed; boundary="=-=-=";
\r
45 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
46 X-BeenThere: notmuch@notmuchmail.org
\r
47 X-Mailman-Version: 2.1.13
\r
49 List-Id: "Use and development of the notmuch mail system."
\r
50 <notmuch.notmuchmail.org>
\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
54 List-Post: <mailto:notmuch@notmuchmail.org>
\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
58 X-List-Received-Date: Wed, 18 Jan 2012 08:25:28 -0000
\r
61 Content-Type: text/plain
\r
62 Content-Transfer-Encoding: quoted-printable
\r
64 On Tue, 17 Jan 2012 23:34:09 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmai=
\r
66 > There are two ways to do search in Emacs UI: search widget in
\r
67 > notmuch-hello buffer and `notmuch-search' function bound to "s".
\r
68 > Before the change, these search mechanisms used different history
\r
69 > lists. The patch makes notmuch-hello search use the same history list
\r
70 > as `notmuch-search' function.
\r
72 The test output updates included here should be with the previous patch,
\r
75 > -(defun notmuch-search (query &optional oldest-first target-thread target=
\r
77 > - "Run \"notmuch search\" with the given query string and display result=
\r
79 > +(defun notmuch-search (&optional query oldest-first target-thread target=
\r
81 > + "Run \"notmuch search\" with the given `query' and display results.
\r
83 > -The optional parameters are used as follows:
\r
84 > +If `query' is nil, it is read interactively from the minibuffer.
\r
85 > +Other optional parameters are used as follows:
\r
87 > oldest-first: A Boolean controlling the sort order of returned threads
\r
88 > target-thread: A thread ID (with the thread: prefix) that will be made
\r
89 > current if it appears in the search results.
\r
90 > target-line: The line number to move to if the target thread does not
\r
91 > appear in the search results."
\r
92 > - (interactive (list (notmuch-read-query "Notmuch search: ")))
\r
94 > + (if (null query)
\r
95 > + (setq query (notmuch-read-query "Notmuch search: "))
\r
96 > + (setq query (notmuch-trim query))
\r
97 > + (let ((history-delete-duplicates t))
\r
98 > + (add-to-history 'notmuch-search-history query)))
\r
100 Should user-typed queries be trimmed?
\r
103 Content-Type: application/pgp-signature
\r
105 -----BEGIN PGP SIGNATURE-----
\r
106 Version: GnuPG v1.4.11 (GNU/Linux)
\r
108 iEYEARECAAYFAk8WgfIACgkQaezQq/BJZRbYLwCfffPUJlC6tUhKu76bVhHLnU/r
\r
109 bSQAn2gPV4si8AKGm+P842o+SkfahG1F
\r
111 -----END PGP SIGNATURE-----
\r