1 Return-Path: <jani@nikula.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 13F24429E4D
\r
6 for <notmuch@notmuchmail.org>; Wed, 23 Nov 2011 13:08:51 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
13 tests=[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 Teh-ziWhupWE for <notmuch@notmuchmail.org>;
\r
17 Wed, 23 Nov 2011 13:08:50 -0800 (PST)
\r
18 Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com
\r
19 [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 8086A429E4B
\r
22 for <notmuch@notmuchmail.org>; Wed, 23 Nov 2011 13:08:50 -0800 (PST)
\r
23 Received: by faan15 with SMTP id n15so3100209faa.26
\r
24 for <notmuch@notmuchmail.org>; Wed, 23 Nov 2011 13:08:49 -0800 (PST)
\r
25 Received: by 10.204.147.215 with SMTP id m23mr26455923bkv.84.1322082529247;
\r
26 Wed, 23 Nov 2011 13:08:49 -0800 (PST)
\r
27 Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi.
\r
29 by mx.google.com with ESMTPS id i3sm23177109faf.0.2011.11.23.13.08.47
\r
30 (version=SSLv3 cipher=OTHER); Wed, 23 Nov 2011 13:08:48 -0800 (PST)
\r
31 From: Jani Nikula <jani@nikula.org>
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [RFC PATCH 2/2] emacs: a couple of example functions that might be
\r
34 useful with saved searches
\r
35 Date: Wed, 23 Nov 2011 23:08:37 +0200
\r
37 <07d589cdf6c229a2f53b584eef273781b5f129bb.1322080622.git.jani@nikula.org>
\r
38 X-Mailer: git-send-email 1.7.5.4
\r
39 In-Reply-To: <cover.1322080622.git.jani@nikula.org>
\r
40 References: <cover.1322080622.git.jani@nikula.org>
\r
41 In-Reply-To: <cover.1322080622.git.jani@nikula.org>
\r
42 References: <cover.1322080622.git.jani@nikula.org>
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.13
\r
46 List-Id: "Use and development of the notmuch mail system."
\r
47 <notmuch.notmuchmail.org>
\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
51 List-Post: <mailto:notmuch@notmuchmail.org>
\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
55 X-List-Received-Date: Wed, 23 Nov 2011 21:08:51 -0000
\r
57 Signed-off-by: Jani Nikula <jani@nikula.org>
\r
59 emacs/notmuch-hello.el | 18 ++++++++++++++++++
\r
60 1 files changed, 18 insertions(+), 0 deletions(-)
\r
62 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
63 index ad3ae74..f03e4b9 100644
\r
64 --- a/emacs/notmuch-hello.el
\r
65 +++ b/emacs/notmuch-hello.el
\r
67 (require 'notmuch-lib)
\r
68 (require 'notmuch-mua)
\r
70 +(defun notmuch-no-saved-search-match (this)
\r
71 + (mapconcat (lambda (arg) (concat "(not ("
\r
72 + (if (functionp (cdr arg))
\r
73 + (funcall (cdr arg) arg)
\r
75 + (loop for elem in notmuch-saved-searches
\r
76 + if (not (equal (car this) (car elem)))
\r
80 +(defun notmuch-get-saved-search (name)
\r
81 + (let ((elem (assoc name notmuch-saved-searches)))
\r
83 + (if (functionp (cdr elem))
\r
84 + (funcall (cdr elem) elem)
\r
88 (declare-function notmuch-search "notmuch" (query &optional oldest-first target-thread target-line continuation))
\r
89 (declare-function notmuch-poll "notmuch" ())
\r