X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=vim%2Fplugin%2Fnotmuch.vim;h=bdf03ba6c8edf14a99f9a5081b99ce9e654c87ce;hp=8d5d1c34e377aca92680483ac55f091eb63a93b0;hb=4aeb291c783c18d0c63277275f67798f227e3017;hpb=db70f3f0c4132b6113a68604dc8439360dc9b9b8
diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim
index 8d5d1c34..bdf03ba6 100644
--- a/vim/plugin/notmuch.vim
+++ b/vim/plugin/notmuch.vim
@@ -18,7 +18,8 @@
" along with Notmuch. If not, see .
"
" Authors: Bart Trojanowski
-
+" Contributors: Peter Hartman
+"
" --- configuration defaults {{{1
let s:notmuch_defaults = {
@@ -1024,11 +1025,9 @@ endfunction
" --- --- compose screen helper functions {{{2
function! s:NM_compose_get_user_email()
- let name = substitute(system('id -u -n'), '\v(^\s*|\s*$|\n)', '', 'g')
- let fqdn = substitute(system('hostname -f'), '\v(^\s*|\s*$|\n)', '', 'g')
-
- " TODO: do this properly
- return name . '@' . fqdn
+ " TODO: do this properly (still), i.e., allow for multiple email accounts
+ let email = substitute(system('notmuch config get user.primary_email'), '\v(^\s*|\s*$|\n)', '', 'g')
+ return email
endfunction
function! s:NM_compose_find_line_match(start, pattern, failure)