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 21A7E431FB6 for ; Thu, 9 Dec 2010 14:16:55 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 zzQ54PhhQI2p for ; Thu, 9 Dec 2010 14:16:54 -0800 (PST) Received: from mail-bw0-f52.google.com (mail-bw0-f52.google.com [209.85.214.52]) by olra.theworths.org (Postfix) with ESMTP id 40E9741A54B for ; Thu, 9 Dec 2010 14:16:54 -0800 (PST) Received: by mail-bw0-f52.google.com with SMTP id 4so3687965bwz.39 for ; Thu, 09 Dec 2010 14:16:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=ktcaU4dbTGhnIO/pVBJYSnRPgXpa6JvWKcKyBDFu2jQ=; b=fx6n2QD+/28Etfpa+t6p6Ptzb/cYINKSPpZO1+AoptlDyvEQE4kifxNDufrg4kNQzH yH/msYKFu5AetSwA/8+hAh7brjWW9qLFegUGwkJC2LSminGqjcRiuSb/8B7keWUQbuW6 WAPT7Bm+cTnryHC5rzU8kxQ3ZwHfaAeoPDAxo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=W4uV89dA60l9XdY1ePaqm6kFIXw5SFW34yvQJ7xkUg7G2SIP9HsYQ1REHbRv9NPfq4 l3RFNGBgzALrlR/grVXRRmTtnnmPQGm2jzlZdthOVxZfItk17Lh7YdL4ieOPG+zLcG/F nlX8oouM403szWgxSnTAoYrABKK3FMK1yxUXk= Received: by 10.204.54.65 with SMTP id p1mr6132bkg.10.1291933013947; Thu, 09 Dec 2010 14:16:53 -0800 (PST) Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80]) by mx.google.com with ESMTPS id d11sm1214933bkd.10.2010.12.09.14.16.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 09 Dec 2010 14:16:52 -0800 (PST) From: Felipe Contreras To: notmuch@notmuchmail.org Subject: [PATCH 2/3] vim: fix get_user_email() Date: Fri, 10 Dec 2010 00:16:24 +0200 Message-Id: <1291932985-5220-3-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1291932985-5220-1-git-send-email-felipe.contreras@gmail.com> References: <1291932985-5220-1-git-send-email-felipe.contreras@gmail.com> Cc: Felipe Contreras 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: Thu, 09 Dec 2010 22:16:55 -0000 From: Felipe Contreras Signed-off-by: Felipe Contreras --- vim/plugin/notmuch.vim | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index 6898d56..8815712 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -1027,11 +1027,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 + let rname = system("getent passwd $USER | cut -d ':' -f 5") + let rname = substitute(rname, '\n*$', '', '') + return printf("%s <%s>", rname, $EMAIL) endfunction function! s:NM_compose_find_line_match(start, pattern, failure) -- 1.7.3.2