Re: [PATCH v4 13/16] add indexopts to notmuch python bindings.
[notmuch-archives.git] / 93 / 2d55a172791636e430d29a3fc667ae035e5962
1 Return-Path: <dmitry.kurochkin@gmail.com>\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 D9090429E25\r
6         for <notmuch@notmuchmail.org>; Wed, 21 Dec 2011 16:24:36 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id cduYMH84CGha for <notmuch@notmuchmail.org>;\r
17         Wed, 21 Dec 2011 16:24:36 -0800 (PST)\r
18 Received: from mail-ww0-f41.google.com (mail-ww0-f41.google.com\r
19  [74.125.82.41])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
20  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
21  1F6D0431FD0    for <notmuch@notmuchmail.org>; Wed, 21 Dec 2011 16:24:35 -0800\r
22  (PST)\r
23 Received: by wgbdt12 with SMTP id dt12so10472009wgb.2\r
24         for <notmuch@notmuchmail.org>; Wed, 21 Dec 2011 16:24:35 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:subject:date:message-id:x-mailer;\r
27         bh=6rQtYGIAPY9uv3ExTZL0WMesC63XEPNcuPiXkNYog2w=;\r
28         b=hXQi0OvrjYJNFc6kBr8LwZQ4gwaWwKMbFqZpScXX2LA9Tq3P6oLfSUMEmaH2IrXfg9\r
29         mu/G1iL8OG+lm0SL/o8NUhZt5mE+/kJ8Zq7WxkgHDH7C0dvEQst1lwlBzg/WBdRRLEqX\r
30         L+oH4nx3noMAdONbOk/0lHJBxA8CHAD4Hp1xY=\r
31 Received: by 10.180.94.97 with SMTP id db1mr18233138wib.16.1324513474935;\r
32         Wed, 21 Dec 2011 16:24:34 -0800 (PST)\r
33 Received: from localhost ([91.144.186.21])\r
34         by mx.google.com with ESMTPS id eg7sm17696723wib.8.2011.12.21.16.24.33\r
35         (version=TLSv1/SSLv3 cipher=OTHER);\r
36         Wed, 21 Dec 2011 16:24:34 -0800 (PST)\r
37 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
38 To: notmuch@notmuchmail.org\r
39 Subject: [PATCH] emacs: put the last search on top of recent searches in\r
40         notmuch-hello\r
41 Date: Thu, 22 Dec 2011 04:23:50 +0400\r
42 Message-Id: <1324513430-15650-1-git-send-email-dmitry.kurochkin@gmail.com>\r
43 X-Mailer: git-send-email 1.7.7.3\r
44 X-BeenThere: notmuch@notmuchmail.org\r
45 X-Mailman-Version: 2.1.13\r
46 Precedence: list\r
47 List-Id: "Use and development of the notmuch mail system."\r
48         <notmuch.notmuchmail.org>\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
52 List-Post: <mailto:notmuch@notmuchmail.org>\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
56 X-List-Received-Date: Thu, 22 Dec 2011 00:24:37 -0000\r
57 \r
58 Notmuch-hello stores a list of recent searches.  Before the change, if\r
59 a search from this list is repeated, the recent search list is not\r
60 changed.  The patch makes repeated recent searches move to the head of\r
61 the list.  I.e. the last search is always on top of the recent search\r
62 list, which is what one would expect from a history list.\r
63 ---\r
64  emacs/notmuch-hello.el |    5 +++--\r
65  1 files changed, 3 insertions(+), 2 deletions(-)\r
66 \r
67 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
68 index f892ff7..2fb0cfc 100644\r
69 --- a/emacs/notmuch-hello.el\r
70 +++ b/emacs/notmuch-hello.el\r
71 @@ -154,8 +154,9 @@ Typically \",\" in the US and UK and \".\" in Europe."\r
72  (defvar notmuch-hello-recent-searches nil)\r
73  \r
74  (defun notmuch-hello-remember-search (search)\r
75 -  (if (not (member search notmuch-hello-recent-searches))\r
76 -      (push search notmuch-hello-recent-searches))\r
77 +  (setq notmuch-hello-recent-searches\r
78 +       (delete search notmuch-hello-recent-searches))\r
79 +  (push search notmuch-hello-recent-searches)\r
80    (if (> (length notmuch-hello-recent-searches)\r
81          notmuch-recent-searches-max)\r
82        (setq notmuch-hello-recent-searches (butlast notmuch-hello-recent-searches))))\r
83 -- \r
84 1.7.7.3\r
85 \r