Re: [PATCH 2/3] emacs: use a single history for all searches
authorDavid Edmondson <dme@dme.org>
Wed, 18 Jan 2012 08:25:22 +0000 (08:25 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:42:33 +0000 (09:42 -0800)
b1/9f41fe330c50ba2a7281ec2d3eb2dc1f8c7b6a [new file with mode: 0644]

diff --git a/b1/9f41fe330c50ba2a7281ec2d3eb2dc1f8c7b6a b/b1/9f41fe330c50ba2a7281ec2d3eb2dc1f8c7b6a
new file mode 100644 (file)
index 0000000..1b42366
--- /dev/null
@@ -0,0 +1,112 @@
+Return-Path: <dme@dme.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1E06A429E5F\r
+       for <notmuch@notmuchmail.org>; Wed, 18 Jan 2012 00:25:28 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id EZC7rfe+OqxC for <notmuch@notmuchmail.org>;\r
+       Wed, 18 Jan 2012 00:25:27 -0800 (PST)\r
+Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
+       [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 81C65429E27\r
+       for <notmuch@notmuchmail.org>; Wed, 18 Jan 2012 00:25:27 -0800 (PST)\r
+Received: by wibhr12 with SMTP id hr12so4203767wib.26\r
+       for <notmuch@notmuchmail.org>; Wed, 18 Jan 2012 00:25:26 -0800 (PST)\r
+Received: by 10.180.99.225 with SMTP id et1mr34882909wib.2.1326875126262;\r
+       Wed, 18 Jan 2012 00:25:26 -0800 (PST)\r
+Received: from hotblack-desiato.hh.sledj.net\r
+       (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])\r
+       by mx.google.com with ESMTPS id em13sm21142959wid.7.2012.01.18.00.25.24\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Wed, 18 Jan 2012 00:25:25 -0800 (PST)\r
+Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
+       id 177ADA0397; Wed, 18 Jan 2012 08:25:23 +0000 (GMT)\r
+To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 2/3] emacs: use a single history for all searches\r
+In-Reply-To: <1326828850-8519-2-git-send-email-dmitry.kurochkin@gmail.com>\r
+References: <1326828850-8519-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+       <1326828850-8519-2-git-send-email-dmitry.kurochkin@gmail.com>\r
+User-Agent: Notmuch/0.11+64~g42e8f66 (http://notmuchmail.org) Emacs/24.0.92.1\r
+       (x86_64-pc-linux-gnu)\r
+From: David Edmondson <dme@dme.org>\r
+Date: Wed, 18 Jan 2012 08:25:22 +0000\r
+Message-ID: <cuny5t5mn7x.fsf@hotblack-desiato.hh.sledj.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 18 Jan 2012 08:25:28 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Tue, 17 Jan 2012 23:34:09 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmai=\r
+l.com> wrote:\r
+> There are two ways to do search in Emacs UI: search widget in\r
+> notmuch-hello buffer and `notmuch-search' function bound to "s".\r
+> Before the change, these search mechanisms used different history\r
+> lists.  The patch makes notmuch-hello search use the same history list\r
+> as `notmuch-search' function.\r
+\r
+The test output updates included here should be with the previous patch,\r
+shouldn't they?\r
+\r
+> -(defun notmuch-search (query &optional oldest-first target-thread target=\r
+-line continuation)\r
+> -  "Run \"notmuch search\" with the given query string and display result=\r
+s.\r
+> +(defun notmuch-search (&optional query oldest-first target-thread target=\r
+-line continuation)\r
+> +  "Run \"notmuch search\" with the given `query' and display results.\r
+>=20=20\r
+> -The optional parameters are used as follows:\r
+> +If `query' is nil, it is read interactively from the minibuffer.\r
+> +Other optional parameters are used as follows:\r
+>=20=20\r
+>    oldest-first: A Boolean controlling the sort order of returned threads\r
+>    target-thread: A thread ID (with the thread: prefix) that will be made\r
+>                   current if it appears in the search results.\r
+>    target-line: The line number to move to if the target thread does not\r
+>                 appear in the search results."\r
+> -  (interactive (list (notmuch-read-query "Notmuch search: ")))\r
+> +  (interactive)\r
+> +  (if (null query)\r
+> +      (setq query (notmuch-read-query "Notmuch search: "))\r
+> +    (setq query (notmuch-trim query))\r
+> +    (let ((history-delete-duplicates t))\r
+> +      (add-to-history 'notmuch-search-history query)))\r
+\r
+Should user-typed queries be trimmed?\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iEYEARECAAYFAk8WgfIACgkQaezQq/BJZRbYLwCfffPUJlC6tUhKu76bVhHLnU/r\r
+bSQAn2gPV4si8AKGm+P842o+SkfahG1F\r
+=c6L2\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r