[PATCH v2] emacs: show: lazy part bugfix
[notmuch-archives.git] / ad / 252fc36e62004463405ec3d3cb490c02e4a816
1 Return-Path: <jeff@jrichards.ca>\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 69630431FB6\r
6         for <notmuch@notmuchmail.org>; Sun,  3 Apr 2011 18:49:10 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 IMYR0AfYFvGu for <notmuch@notmuchmail.org>;\r
16         Sun,  3 Apr 2011 18:49:08 -0700 (PDT)\r
17 Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9])\r
18         by olra.theworths.org (Postfix) with ESMTP id 763EE431FB5\r
19         for <notmuch@notmuchmail.org>; Sun,  3 Apr 2011 18:49:08 -0700 (PDT)\r
20 Received: from pd6ml1no-ssvc.prod.shaw.ca ([10.0.153.160])\r
21         by pd5mo1no-svcs.prod.shaw.ca with ESMTP; 03 Apr 2011 19:49:06 -0600\r
22 X-Cloudmark-SP-Filtered: true\r
23 X-Cloudmark-SP-Result: v=1.1 cv=sma64emKALigICJU+V2L7RL3kPAolu7RCFSKDgo279k=\r
24         c=1 sm=1\r
25         a=syTm-qO7wyQA:10 a=BLceEmwcHowA:10 a=GmI124iNGYoA:10\r
26         a=fZIboY/cEU6l/H7GC6ozQQ==:17 a=g3JaN9dwkTfhW9vAbuwA:9\r
27         a=LrxXL4b9Hrh-DAG0jlUA:7 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117\r
28 Received: from unknown (HELO fanny.gardenlogbook.com) ([96.50.110.35])\r
29         by pd6ml1no-dmz.prod.shaw.ca with ESMTP; 03 Apr 2011 19:49:06 -0600\r
30 Received: from jeff by fanny.gardenlogbook.com with local (Exim 4.72)\r
31         (envelope-from <jeff@jrichards.ca>) id 1Q6YkF-0003mx-FS\r
32         for notmuch@notmuchmail.org; Sun, 03 Apr 2011 18:38:19 -0700\r
33 Date: Sun, 03 Apr 2011 18:38:19 -0700\r
34 Message-Id: <E1Q6YkF-0003mx-FS@fanny.gardenlogbook.com>\r
35 From: Jeff Richards <jeff@jrichards.ca>\r
36 To: notmuch@notmuchmail.org\r
37 Subject: [PATCH] notmuch.vim can tag messages deleted\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Mon, 04 Apr 2011 01:49:10 -0000\r
51 \r
52 notmuch.vim plugin can use the d keybinding to remove 'inbox' and 'unread' tags and add 'deleted' from the search and show screens, the deleted tag can then be used to remove items from the maildir that are well and truly worth of deleting\r
53 \r
54 ---\r
55  vim/plugin/notmuch.vim |   14 ++++++++++++++\r
56  1 files changed, 14 insertions(+), 0 deletions(-)\r
57 \r
58 diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim\r
59 index bdf03ba..5bd5e1f 100644\r
60 --- a/vim/plugin/notmuch.vim\r
61 +++ b/vim/plugin/notmuch.vim\r
62 @@ -120,6 +120,7 @@ let g:notmuch_search_maps = {\r
63          \ '<C-]>':      ':call <SID>NM_search_expand(''<cword>'')<CR>',\r
64          \ 'a':          ':call <SID>NM_search_archive_thread()<CR>',\r
65          \ 'A':          ':call <SID>NM_search_mark_read_then_archive_thread()<CR>',\r
66 +        \ 'd':          ':call <SID>NM_search_delete_thread()<CR>',\r
67          \ 'f':          ':call <SID>NM_search_filter()<CR>',\r
68          \ 'm':          ':call <SID>NM_new_mail()<CR>',\r
69          \ 'o':          ':call <SID>NM_search_toggle_order()<CR>',\r
70 @@ -150,6 +151,7 @@ let g:notmuch_show_maps = {\r
71          \ 'a':          ':call <SID>NM_show_archive_thread()<CR>',\r
72          \ 'A':          ':call <SID>NM_show_mark_read_then_archive_thread()<CR>',\r
73          \ 'N':          ':call <SID>NM_show_mark_read_then_next_open_message()<CR>',\r
74 +        \ 'd':          ':call <SID>NM_show_delete_thread()<CR>',\r
75          \ 'v':          ':call <SID>NM_show_view_all_mime_parts()<CR>',\r
76          \ '+':          ':call <SID>NM_show_add_tag()<CR>',\r
77          \ '-':          ':call <SID>NM_show_remove_tag()<CR>',\r
78 @@ -317,6 +319,12 @@ function! s:NM_search_mark_read_then_archive_thread()\r
79          norm j\r
80  endfunction\r
81  \r
82 +function! s:NM_search_delete_thread()\r
83 +        call <SID>NM_add_remove_tags([], '-', ['inbox', 'unread'])\r
84 +        call <SID>NM_add_remove_tags([], '+', ['deleted'])\r
85 +        norm j\r
86 +endfunction\r
87 +\r
88  function! s:NM_search_filter()\r
89          call <SID>NM_search_filter_helper('Filter: ', '', '')\r
90  endfunction\r
91 @@ -506,6 +514,12 @@ function! s:NM_show_mark_read_then_next_open_message()\r
92          echo 'not implemented'\r
93  endfunction\r
94  \r
95 +\r
96 +function! s:NM_show_delete_thread()\r
97 +        call <SID>NM_add_remove_tags(b:nm_search_words, '-', ['unread', 'inbox'])\r
98 +        call <SID>NM_add_remove_tags(b:nm_search_words, '+', ['deleted'])\r
99 +endfunction\r
100 +\r
101  function! s:NM_show_previous_message()\r
102          echo 'not implemented'\r
103  endfunction\r
104 -- \r
105 1.7.2.3\r
106 \r
107 \r
108 \r
109 \r
110 -- \r
111 email sent from notmuch.vim plugin\r