unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] notmuch.vim can tag messages deleted
@ 2011-04-04  1:38 Jeff Richards
  2011-04-04 15:56 ` Felipe Contreras
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Richards @ 2011-04-04  1:38 UTC (permalink / raw)
  To: notmuch

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 = {
         \ '<C-]>':      ':call <SID>NM_search_expand(''<cword>'')<CR>',
         \ 'a':          ':call <SID>NM_search_archive_thread()<CR>',
         \ 'A':          ':call <SID>NM_search_mark_read_then_archive_thread()<CR>',
+        \ 'd':          ':call <SID>NM_search_delete_thread()<CR>',
         \ 'f':          ':call <SID>NM_search_filter()<CR>',
         \ 'm':          ':call <SID>NM_new_mail()<CR>',
         \ 'o':          ':call <SID>NM_search_toggle_order()<CR>',
@@ -150,6 +151,7 @@ let g:notmuch_show_maps = {
         \ 'a':          ':call <SID>NM_show_archive_thread()<CR>',
         \ 'A':          ':call <SID>NM_show_mark_read_then_archive_thread()<CR>',
         \ 'N':          ':call <SID>NM_show_mark_read_then_next_open_message()<CR>',
+        \ 'd':          ':call <SID>NM_show_delete_thread()<CR>',
         \ 'v':          ':call <SID>NM_show_view_all_mime_parts()<CR>',
         \ '+':          ':call <SID>NM_show_add_tag()<CR>',
         \ '-':          ':call <SID>NM_show_remove_tag()<CR>',
@@ -317,6 +319,12 @@ function! s:NM_search_mark_read_then_archive_thread()
         norm j
 endfunction
 
+function! s:NM_search_delete_thread()
+        call <SID>NM_add_remove_tags([], '-', ['inbox', 'unread'])
+        call <SID>NM_add_remove_tags([], '+', ['deleted'])
+        norm j
+endfunction
+
 function! s:NM_search_filter()
         call <SID>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 <SID>NM_add_remove_tags(b:nm_search_words, '-', ['unread', 'inbox'])
+        call <SID>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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-04 20:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04  1:38 [PATCH] notmuch.vim can tag messages deleted Jeff Richards
2011-04-04 15:56 ` Felipe Contreras
2011-04-05  5:46   ` Jeff Richards
2011-05-04 20:04     ` Felipe Contreras

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).