[PATCH] notmuch.vim can tag messages deleted
authorJeff Richards <jeff@jrichards.ca>
Mon, 4 Apr 2011 01:38:19 +0000 (18:38 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:03 +0000 (09:38 -0800)
ad/252fc36e62004463405ec3d3cb490c02e4a816 [new file with mode: 0644]

diff --git a/ad/252fc36e62004463405ec3d3cb490c02e4a816 b/ad/252fc36e62004463405ec3d3cb490c02e4a816
new file mode 100644 (file)
index 0000000..f2eef03
--- /dev/null
@@ -0,0 +1,111 @@
+Return-Path: <jeff@jrichards.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 69630431FB6\r
+       for <notmuch@notmuchmail.org>; Sun,  3 Apr 2011 18:49:10 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id IMYR0AfYFvGu for <notmuch@notmuchmail.org>;\r
+       Sun,  3 Apr 2011 18:49:08 -0700 (PDT)\r
+Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9])\r
+       by olra.theworths.org (Postfix) with ESMTP id 763EE431FB5\r
+       for <notmuch@notmuchmail.org>; Sun,  3 Apr 2011 18:49:08 -0700 (PDT)\r
+Received: from pd6ml1no-ssvc.prod.shaw.ca ([10.0.153.160])\r
+       by pd5mo1no-svcs.prod.shaw.ca with ESMTP; 03 Apr 2011 19:49:06 -0600\r
+X-Cloudmark-SP-Filtered: true\r
+X-Cloudmark-SP-Result: v=1.1 cv=sma64emKALigICJU+V2L7RL3kPAolu7RCFSKDgo279k=\r
+       c=1 sm=1\r
+       a=syTm-qO7wyQA:10 a=BLceEmwcHowA:10 a=GmI124iNGYoA:10\r
+       a=fZIboY/cEU6l/H7GC6ozQQ==:17 a=g3JaN9dwkTfhW9vAbuwA:9\r
+       a=LrxXL4b9Hrh-DAG0jlUA:7 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117\r
+Received: from unknown (HELO fanny.gardenlogbook.com) ([96.50.110.35])\r
+       by pd6ml1no-dmz.prod.shaw.ca with ESMTP; 03 Apr 2011 19:49:06 -0600\r
+Received: from jeff by fanny.gardenlogbook.com with local (Exim 4.72)\r
+       (envelope-from <jeff@jrichards.ca>) id 1Q6YkF-0003mx-FS\r
+       for notmuch@notmuchmail.org; Sun, 03 Apr 2011 18:38:19 -0700\r
+Date: Sun, 03 Apr 2011 18:38:19 -0700\r
+Message-Id: <E1Q6YkF-0003mx-FS@fanny.gardenlogbook.com>\r
+From: Jeff Richards <jeff@jrichards.ca>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] notmuch.vim can tag messages deleted\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 04 Apr 2011 01:49:10 -0000\r
+\r
+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
+\r
+---\r
+ vim/plugin/notmuch.vim |   14 ++++++++++++++\r
+ 1 files changed, 14 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim\r
+index bdf03ba..5bd5e1f 100644\r
+--- a/vim/plugin/notmuch.vim\r
++++ b/vim/plugin/notmuch.vim\r
+@@ -120,6 +120,7 @@ let g:notmuch_search_maps = {\r
+         \ '<C-]>':      ':call <SID>NM_search_expand(''<cword>'')<CR>',\r
+         \ 'a':          ':call <SID>NM_search_archive_thread()<CR>',\r
+         \ 'A':          ':call <SID>NM_search_mark_read_then_archive_thread()<CR>',\r
++        \ 'd':          ':call <SID>NM_search_delete_thread()<CR>',\r
+         \ 'f':          ':call <SID>NM_search_filter()<CR>',\r
+         \ 'm':          ':call <SID>NM_new_mail()<CR>',\r
+         \ 'o':          ':call <SID>NM_search_toggle_order()<CR>',\r
+@@ -150,6 +151,7 @@ let g:notmuch_show_maps = {\r
+         \ 'a':          ':call <SID>NM_show_archive_thread()<CR>',\r
+         \ 'A':          ':call <SID>NM_show_mark_read_then_archive_thread()<CR>',\r
+         \ 'N':          ':call <SID>NM_show_mark_read_then_next_open_message()<CR>',\r
++        \ 'd':          ':call <SID>NM_show_delete_thread()<CR>',\r
+         \ 'v':          ':call <SID>NM_show_view_all_mime_parts()<CR>',\r
+         \ '+':          ':call <SID>NM_show_add_tag()<CR>',\r
+         \ '-':          ':call <SID>NM_show_remove_tag()<CR>',\r
+@@ -317,6 +319,12 @@ function! s:NM_search_mark_read_then_archive_thread()\r
+         norm j\r
+ endfunction\r
\r
++function! s:NM_search_delete_thread()\r
++        call <SID>NM_add_remove_tags([], '-', ['inbox', 'unread'])\r
++        call <SID>NM_add_remove_tags([], '+', ['deleted'])\r
++        norm j\r
++endfunction\r
++\r
+ function! s:NM_search_filter()\r
+         call <SID>NM_search_filter_helper('Filter: ', '', '')\r
+ endfunction\r
+@@ -506,6 +514,12 @@ function! s:NM_show_mark_read_then_next_open_message()\r
+         echo 'not implemented'\r
+ endfunction\r
\r
++\r
++function! s:NM_show_delete_thread()\r
++        call <SID>NM_add_remove_tags(b:nm_search_words, '-', ['unread', 'inbox'])\r
++        call <SID>NM_add_remove_tags(b:nm_search_words, '+', ['deleted'])\r
++endfunction\r
++\r
+ function! s:NM_show_previous_message()\r
+         echo 'not implemented'\r
+ endfunction\r
+-- \r
+1.7.2.3\r
+\r
+\r
+\r
+\r
+-- \r
+email sent from notmuch.vim plugin\r