X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=vim%2Fplugin%2Fnotmuch.vim;h=37781c0c8bcc9988125e749fb350f9b5310207ef;hb=0ef04e14ffac768b211510fab5b351cfab38b6ee;hp=a4d04e26104ee4da4358cc06bea8e35689c52752;hpb=fd805c16c3fdcc4170a42d3cacb9b16cdfa11ff7;p=notmuch diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index a4d04e26..37781c0c 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -105,6 +105,7 @@ let s:notmuch_compose_headers_defaults = [ " --- --- bindings for folders mode {{{2 let g:notmuch_folders_maps = { + \ 'm': ':call NM_new_mail()', \ 's': ':call NM_search_prompt()', \ 'q': ':call NM_kill_this_buffer()', \ '=': ':call NM_folders_refresh_view()', @@ -939,8 +940,6 @@ function! s:NM_compose_send() let line = getline(lnum) endwhile let body_starts = lnum - exec printf('0,%dd', body_starts) - write "[-a header] [-b bcc-addr] [-c cc-addr] [-s subject] to-addr let cmd = ['mail'] @@ -972,6 +971,12 @@ function! s:NM_compose_send() endfor call extend(cmd, tos) + " TODO: make sure we have at least one target + " TODO: ask about empty jubject, etc + + exec printf('0,%dd', body_starts) + write + call map(cmd, 's:NM_shell_escape(v:val)') let cmdtxt = join(cmd) . '< ' . fname let out = system(cmdtxt) @@ -1130,7 +1135,7 @@ function! s:NM_newComposeBuffer(lines, start_on_line) if start_on_line > 0 && start_on_line <= len(lines) call cursor(start_on_line, strlen(getline(start_on_line)) + 1) else - call cursor(real_hdr_start, strlen(getline(real_hdr_start) + 1) + call cursor(real_hdr_start, strlen(getline(real_hdr_start)) + 1) call NM_compose_next_entry_area() endif @@ -1227,7 +1232,7 @@ endfunction " --- external mail handling helpers {{{1 function! s:NM_new_mail() - echo 'not implemented' + call NM_cmd_compose([], []) endfunction " --- tag manipulation helpers {{{1