Re: notmuch and "mute" -- useful to anyone?
[notmuch-archives.git] / 62 / dbeae18e6f2f3886c8481700fa7b7fb1ec448e
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 65CDF41ED8F\r
6         for <notmuch@notmuchmail.org>; Thu, 30 Jun 2011 01:20:57 -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.7\r
10 X-Spam-Level: \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 CL7eDGPOVK+Q for <notmuch@notmuchmail.org>;\r
16         Thu, 30 Jun 2011 01:20:56 -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 96A8641ED8E\r
21         for <notmuch@notmuchmail.org>; Thu, 30 Jun 2011 01:20:56 -0700 (PDT)\r
22 Received: by wyh22 with SMTP id 22so1529362wyh.26\r
23         for <notmuch@notmuchmail.org>; Thu, 30 Jun 2011 01:20:55 -0700 (PDT)\r
24 Received: by 10.216.10.132 with SMTP id 4mr1536367wev.38.1309422055377;\r
25         Thu, 30 Jun 2011 01:20:55 -0700 (PDT)\r
26 Received: from localhost ([109.131.21.173])\r
27         by mx.google.com with ESMTPS id u38sm189024weq.13.2011.06.30.01.20.53\r
28         (version=TLSv1/SSLv3 cipher=OTHER);\r
29         Thu, 30 Jun 2011 01:20:54 -0700 (PDT)\r
30 From: Pieter Praet <pieter@praet.org>\r
31 To: notmuch@notmuchmail.org\r
32 Subject: [PATCH] emacs: add keybind and function to stash Message-ID without\r
33         prefix\r
34 Date: Thu, 30 Jun 2011 10:20:50 +0200\r
35 Message-Id: <1309422050-23241-1-git-send-email-pieter@praet.org>\r
36 X-Mailer: git-send-email 1.7.4.1\r
37 In-Reply-To: <877hbiep5g.fsf@SSpaeth.de>\r
38 References: <877hbiep5g.fsf@SSpaeth.de>\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Thu, 30 Jun 2011 08:20:57 -0000\r
52 \r
53 Add function `notmuch-show-stash-message-id-stripped'\r
54 which stashes a Message-ID after ripping off the prefix and quotes,\r
55 add bind it to "I" key in `notmuch-show-stash-map'.\r
56 \r
57 Simplifying `notmuch-show-get-message-id' instead might seem better,\r
58 but that would require concat'ing in 9 places instead of 1.\r
59 \r
60 Signed-off-by: Pieter Praet <pieter@praet.org>\r
61 ---\r
62  emacs/notmuch-show.el |    6 ++++++\r
63  1 files changed, 6 insertions(+), 0 deletions(-)\r
64 \r
65 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
66 index 6685717..a703732 100644\r
67 --- a/emacs/notmuch-show.el\r
68 +++ b/emacs/notmuch-show.el\r
69 @@ -858,6 +858,7 @@ function is used. "\r
70      (define-key map "F" 'notmuch-show-stash-filename)\r
71      (define-key map "f" 'notmuch-show-stash-from)\r
72      (define-key map "i" 'notmuch-show-stash-message-id)\r
73 +    (define-key map "I" 'notmuch-show-stash-message-id-stripped)\r
74      (define-key map "s" 'notmuch-show-stash-subject)\r
75      (define-key map "T" 'notmuch-show-stash-tags)\r
76      (define-key map "t" 'notmuch-show-stash-to)\r
77 @@ -1408,6 +1409,11 @@ buffer."\r
78    (interactive)\r
79    (notmuch-common-do-stash (notmuch-show-get-message-id)))\r
80  \r
81 +(defun notmuch-show-stash-message-id-stripped ()\r
82 +  "Copy message ID of current message (sans `id:' prefix) to kill-ring."\r
83 +  (interactive)\r
84 +  (notmuch-common-do-stash (substring (notmuch-show-get-message-id) 4 -1)))\r
85 +\r
86  (defun notmuch-show-stash-subject ()\r
87    "Copy Subject field of current message to kill-ring."\r
88    (interactive)\r
89 -- \r
90 1.7.4.1\r
91 \r