1 Return-Path: <pieter@praet.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 93369429E36
\r
6 for <notmuch@notmuchmail.org>; Sun, 3 Jul 2011 23:52:53 -0700 (PDT)
\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 uwg12TV7brRi for <notmuch@notmuchmail.org>;
\r
16 Sun, 3 Jul 2011 23:52:52 -0700 (PDT)
\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com
\r
18 [74.125.82.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 8C131429E37
\r
21 for <notmuch@notmuchmail.org>; Sun, 3 Jul 2011 23:52:47 -0700 (PDT)
\r
22 Received: by mail-wy0-f181.google.com with SMTP id 22so3733696wyh.26
\r
23 for <notmuch@notmuchmail.org>; Sun, 03 Jul 2011 23:52:47 -0700 (PDT)
\r
24 Received: by 10.227.169.139 with SMTP id z11mr4901636wby.60.1309762367234;
\r
25 Sun, 03 Jul 2011 23:52:47 -0700 (PDT)
\r
26 Received: from localhost ([109.131.160.67])
\r
27 by mx.google.com with ESMTPS id n18sm4229582wbh.6.2011.07.03.23.52.45
\r
28 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Sun, 03 Jul 2011 23:52:46 -0700 (PDT)
\r
30 From: Pieter Praet <pieter@praet.org>
\r
31 To: Austin Clements <amdragon@mit.edu>
\r
32 Subject: [PATCH 3/5] emacs: stashing (a region of) matched-msgids
\r
33 Date: Mon, 4 Jul 2011 08:51:56 +0200
\r
34 Message-Id: <1309762318-4530-4-git-send-email-pieter@praet.org>
\r
35 X-Mailer: git-send-email 1.7.5.4
\r
36 In-Reply-To: <1309762318-4530-1-git-send-email-pieter@praet.org>
\r
37 References: <20110703171743.GL15901@mit.edu>
\r
38 <1309762318-4530-1-git-send-email-pieter@praet.org>
\r
39 Cc: Notmuch Mail <notmuch@notmuchmail.org>
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.13
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Mon, 04 Jul 2011 06:52:53 -0000
\r
54 Signed-off-by: Pieter Praet <pieter@praet.org>
\r
56 emacs/notmuch.el | 14 ++++++++++++++
\r
57 1 files changed, 14 insertions(+), 0 deletions(-)
\r
59 diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
60 index 2338044..46e276a 100644
\r
61 --- a/emacs/notmuch.el
\r
62 +++ b/emacs/notmuch.el
\r
63 @@ -226,6 +226,7 @@ For a mouse binding, return nil."
\r
64 (defvar notmuch-search-stash-map
\r
65 (let ((map (make-sparse-keymap)))
\r
66 (define-key map "i" 'notmuch-search-stash-thread-id)
\r
67 + (define-key map "m" 'notmuch-search-stash-matched-msgids)
\r
69 "Submap for stash commands")
\r
70 (fset 'notmuch-search-stash-map notmuch-search-stash-map)
\r
71 @@ -235,6 +236,19 @@ For a mouse binding, return nil."
\r
73 (notmuch-common-do-stash (notmuch-search-find-thread-id)))
\r
75 +(defun notmuch-search-stash-matched-msgids ()
\r
76 + "Copy matched Message-ID's of current thread (or threads in region) to kill-ring."
\r
79 + (if (region-active-p)
\r
80 + (let* ((beg (region-beginning))
\r
81 + (end (region-end)))
\r
82 + (notmuch-common-do-stash
\r
83 + (mapconcat 'identity
\r
84 + (notmuch-search-find-matched-msgids-region beg end)
\r
86 + (notmuch-common-do-stash (notmuch-search-find-matched-msgids)))))
\r
88 (defvar notmuch-search-query-string)
\r
89 (defvar notmuch-search-target-thread)
\r
90 (defvar notmuch-search-target-line)
\r