vim: primitive reply to message
authorBart Trojanowski <bart@jukie.net>
Fri, 27 Nov 2009 21:52:00 +0000 (16:52 -0500)
committerBart Trojanowski <bart@jukie.net>
Fri, 27 Nov 2009 21:52:00 +0000 (16:52 -0500)
vim/README
vim/plugin/notmuch.vim

index 3965eeb..a139dfc 100644 (file)
@@ -69,6 +69,7 @@ Buffer types:
             c       - toggle folding of citations
             h       - toggle folding of extra header lines
             m       - compose a new message
+            r       - reply to the message
             s       - toggle folding of signatures
             q       - return to search display
             ?       - reveal the message and thread IDs of what's under cursor
index 23feb7d..9932e3f 100644 (file)
@@ -506,7 +506,14 @@ function! s:NM_show_previous_message()
 endfunction
 
 function! s:NM_show_reply()
-        echo 'not implemented'
+        let cmd = ['reply']
+        call add(cmd, <SID>NM_show_message_id())
+        call add(cmd, 'AND')
+        call extend(cmd, <SID>NM_get_search_words())
+
+        let data = <SID>NM_run(cmd)
+        let lines = split(data, "\n")
+        call <SID>NM_newComposeBuffer(lines, 0)
 endfunction
 
 function! s:NM_show_view_all_mime_parts()