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