database error
[notmuch-archives.git] / 5f / 99fcf8df0f410f03c0db9baaccf8e5e3d7e23c
1 Return-Path: <self@antono.info>\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 4BA34431FD0\r
6         for <notmuch@notmuchmail.org>; Sun,  4 Sep 2011 19:22:25 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.363\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.363 tagged_above=-999 required=5\r
12         tests=[RDNS_DYNAMIC=0.363] 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 1i5lCbqsgW8U for <notmuch@notmuchmail.org>;\r
16         Sun,  4 Sep 2011 19:22:24 -0700 (PDT)\r
17 Received: from mail.antono.info (ec2-50-19-243-116.compute-1.amazonaws.com\r
18         [50.19.243.116])\r
19         (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id B5687431FB6\r
22         for <notmuch@notmuchmail.org>; Sun,  4 Sep 2011 19:22:24 -0700 (PDT)\r
23 Received: by mail.antono.info (Postfix, from userid 1003)\r
24         id E2D18615B7; Mon,  5 Sep 2011 02:22:53 +0000 (UTC)\r
25 Received: from libero (unknown [178.121.201.33])\r
26         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
27         (No client certificate requested)\r
28         by mail.antono.info (Postfix) with ESMTPSA id ECB7160381;\r
29         Mon,  5 Sep 2011 02:22:50 +0000 (UTC)\r
30 From: Antono Vasiljev <self@antono.info>\r
31 To: Jani Nikula <jani@nikula.org>,\r
32         Jameson Graef Rollins <jrollins@finestructure.net>,\r
33         Tomi Ollila <tomi.ollila@nixu.com>\r
34 Subject: Re: [PATCH] emacs: Sort saved searches\r
35 In-Reply-To: <8739gcw4lj.fsf@nikula.org>\r
36 References: <1314966486-20708-1-git-send-email-jani@nikula.org>\r
37         <yf61uvx261y.fsf@taco2.nixu.fi> <8739gdb7z8.fsf@nikula.org>\r
38         <878vq4agex.fsf@servo.factory.finestructure.net>\r
39         <8739gcw4lj.fsf@nikula.org>\r
40 User-Agent: Notmuch/0.6.1-1 (http://notmuchmail.org) Emacs/24.0.50.1\r
41         (i686-pc-linux-gnu)\r
42 Date: Mon, 05 Sep 2011 05:22:17 +0300\r
43 Message-ID: <87fwkbd8yu.fsf@antono.info>\r
44 MIME-Version: 1.0\r
45 Content-Type: text/plain\r
46 Cc: notmuch@notmuchmail.org\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Mon, 05 Sep 2011 02:22:25 -0000\r
60 \r
61 On Sun, 04 Sep 2011 21:21:44 +0300, Jani Nikula <jani@nikula.org> wrote:\r
62 \r
63 > Hmm. Let's look at this from another perspective: do you know if there's\r
64 > a reasonable way to make ordering of the customized saved searches\r
65 > easier? It's not exactly user friendly to move items up and down in the\r
66 > list. Or to sort them.\r
67\r
68 > On the other hand, the tags are sorted. Saved searches are not. Should\r
69 > it be possible to display tags in user defined order...?\r
70\r
71 > I know I can twist this the way I want and carry my own modifications,\r
72 > but I'd like to make notmuch user friendly for people who don't know\r
73 > elisp.\r
74 \r
75 \r
76 Note exactrly on Your topic, but my solution for the problem is\r
77 \r
78 anything-notmuch:\r
79 \r
80 ;; Notmuch Anything Source\r
81 ;; anything-sources\r
82 (defvar notmuch-anything-source-saved-searches\r
83   '((name . "Notmuch Mail - Saved Searches")\r
84     (candidates . notmuch-saved-searches)\r
85     (action  ("Search with notmuch" . notmuch-search))\r
86     (candidate-number-limit . 100)\r
87     ;; (requires-pattern . 2)\r
88     "Source for completing anything saved searches."))\r
89 \r
90 (defun notmuch-anything (&optional rehash)\r
91   (interactive (list current-prefix-arg))\r
92   (anything\r
93    :sources 'notmuch-anything-source-saved-searches\r
94    :preselect "inbox"\r
95    :buffer "*notmuch-saved-searches*"))\r
96 \r
97 (define-key notmuch-hello-mode-map "S" 'notmuch-anything)\r
98 \r
99 \r
100 It is possible to include this directly to notmuch, wrapped to\r
101 \r
102 (eval-after-load 'notmuch\r
103    '(progn\r
104    code\r
105      ...))\r
106      \r
107 ?\r
108 \r
109 \r
110 -- \r
111 http://antono.info/\r
112 http://twitter.com/antono\r
113 http://github.com/antono\r