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 2DB05431FD0 for ; Tue, 25 Jan 2011 21:00:58 -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 e20UA6hqrNUj for ; Tue, 25 Jan 2011 21:00:53 -0800 (PST) Received: from mail-vw0-f53.google.com (mail-vw0-f53.google.com [209.85.212.53]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 77F30431FB6 for ; Tue, 25 Jan 2011 21:00:53 -0800 (PST) Received: by vws8 with SMTP id 8so291331vws.26 for ; Tue, 25 Jan 2011 21:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=rhzlzWYaQ53sHc+tHWKGIyQhVMfQH+GFOC+WeFs2IsE=; b=s5q/u8dHBDY+9p7h3T9eIed41pBxNMdxY2n3IkRiPjYU9J+7ttNqDFG56iHV1VaEfo J1z4LzR+em32ps98BCSSSwWHY0eCo1sFT7xtUv+DSOPvf0CSRrDwrk47IzXnpThin2VR UbK3+HZZ/NehmfaT0uAeQXdWpsm9r/WTMMPE4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=ddCno3Z4nnlOuCy9x0N0ZDEmgfVQ5HyYCpJHxTXRmVaYQzJnegnXYwjpbWXsG3ZNQx 20cvkkocCdhi4Dbat/8R0hdiUMJHMH0fB1aW/eOT8iOJrqulxmI8WglObTcoKRiyooMt hH1IGwsFvifhT0vubdXCVHF4GT7oneEJ1vMtQ= Received: by 10.220.200.135 with SMTP id ew7mr1921737vcb.37.1296018051003; Tue, 25 Jan 2011 21:00:51 -0800 (PST) Received: from localhost (dyn-160-39-49-31.dyn.columbia.edu [160.39.49.31]) by mx.google.com with ESMTPS id e18sm9210232vbm.15.2011.01.25.21.00.49 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 21:00:49 -0800 (PST) Date: Wed, 26 Jan 2011 00:01:19 -0500 From: Peter John Hartman To: notmuch@notmuchmail.org Subject: fix notmuch.vim NM_compuse_get_user_email() (Patch) Message-ID: <20110126050119.GA11761@triltoucheee> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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: Wed, 26 Jan 2011 05:00:58 -0000 Here's a bitty patch to the vim plugin; it now calculates the primary email of the user based on a call to notmuch config. There's still a lot of work that needs to get done on notmuch.vim, e.g., the ability to have multiple emails/accounts. Best, Peter --- notmuch.vim 2010-11-18 17:26:14.000000000 -0500 +++ notmuch.vim.mine 2011-01-25 23:57:50.000000000 -0500 @@ -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 @@ " --- --- 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) -- sic dicit magister P PhD Candidate Collaborative Programme in Ancient and Medieval Philosophy University of Toronto http://individual.utoronto.ca/peterjh