1 Return-Path: <felipe.contreras@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 9A6D8431FB6
\r
6 for <notmuch@notmuchmail.org>; Thu, 19 Apr 2012 09:37:03 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id LC6qcmeXed2e for <notmuch@notmuchmail.org>;
\r
17 Thu, 19 Apr 2012 09:36:59 -0700 (PDT)
\r
18 Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com
\r
19 [209.85.215.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 3F934431FAE
\r
22 for <notmuch@notmuchmail.org>; Thu, 19 Apr 2012 09:36:59 -0700 (PDT)
\r
23 Received: by eaa1 with SMTP id 1so3563026eaa.26
\r
24 for <notmuch@notmuchmail.org>; Thu, 19 Apr 2012 09:36:56 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
\r
27 :cc:content-type:content-transfer-encoding;
\r
28 bh=jwHWiV/VglhOYg2VLs5sRW7dpP7wG09mvohWlIQK2pY=;
\r
29 b=rxwIJFHfJGTzjQ3j8N3K9mJWMuf8jWY3g3ErfUhZapJGCdA8dWX6dfzLMLo9+QsYkW
\r
30 JjqIOnoiPf113o7oMxETZ2b6SLKtbXgmddWAM8vDgsScbxsYaAdENEYzeY4SQvQODQMp
\r
31 o7Zhs5qUm8tolzJ1Hi46C1RjSf7lFNWSyMF8r20ISTFQXjUZqXWTzQG6MKpFyX/pZNsP
\r
32 ++mNW74WjouHmiXLRCVgj7dhAFehe8Jftbfi1h4xRyWRXI7b46f/FU7YxmhwY3PDJEYp
\r
33 nTK9ulQt1op1tDAqaQ02dDcYkzTCxFzWGTuSSuktL/5id5WvKLPTXMinMxSNq6S6RyKq
\r
36 Received: by 10.213.32.2 with SMTP id a2mr243849ebd.39.1334853416365; Thu, 19
\r
37 Apr 2012 09:36:56 -0700 (PDT)
\r
38 Received: by 10.213.19.67 with HTTP; Thu, 19 Apr 2012 09:36:56 -0700 (PDT)
\r
40 <CAMP44s26n0GgCf3nKawj52+aTFPFmPaA1K3sWLKSXv8KUcabOg@mail.gmail.com>
\r
41 References: <20120114075443.27927.39754@daenerys.khirnov.net>
\r
42 <CAMP44s0h=RLNfcs-rLZofMVE88jgQ5KAnfsHNiK9snJi4ctmyw@mail.gmail.com>
\r
43 <CAMP44s26n0GgCf3nKawj52+aTFPFmPaA1K3sWLKSXv8KUcabOg@mail.gmail.com>
\r
44 Date: Thu, 19 Apr 2012 19:36:56 +0300
\r
46 <CAMP44s0dKJduJs=N-1OqMRZRGyB+GPQXWnbNwBnK0BH7RKxX_g@mail.gmail.com>
\r
47 Subject: Re: [RFC] vim plugin rewrite II
\r
48 From: Felipe Contreras <felipe.contreras@gmail.com>
\r
49 To: anton@khirnov.net
\r
50 Content-Type: text/plain; charset=UTF-8
\r
51 Content-Transfer-Encoding: quoted-printable
\r
52 Cc: notmuch@notmuchmail.org
\r
53 X-BeenThere: notmuch@notmuchmail.org
\r
54 X-Mailman-Version: 2.1.13
\r
56 List-Id: "Use and development of the notmuch mail system."
\r
57 <notmuch.notmuchmail.org>
\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
61 List-Post: <mailto:notmuch@notmuchmail.org>
\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
65 X-List-Received-Date: Thu, 19 Apr 2012 16:37:03 -0000
\r
67 On Wed, Apr 18, 2012 at 5:42 PM, Felipe Contreras
\r
68 <felipe.contreras@gmail.com> wrote:
\r
69 > On Wed, Apr 18, 2012 at 5:21 PM, Felipe Contreras
\r
70 > <felipe.contreras@gmail.com> wrote:
\r
71 >> On Sat, Jan 14, 2012 at 9:54 AM, =C2=A0<anton@khirnov.net> wrote:
\r
72 >>> branch vim. Simply copy vim/plugin/{nm_vim.py,notmuch-vimpy.vim} to the
\r
73 >>> vim plugins dir and vim/syntax/{nm_vimpy*} to the vim syntax dir and ru=
\r
75 >>> :NMVimpy() in vim. You'll need vim with python support and
\r
76 >>> python-notmuch bindings.
\r
78 >> I gave this a try, copying those files makes vim crash for me.
\r
80 >> I probably need to install notmuch's python bindings, but either way
\r
81 >> it shouldn't crash.
\r
83 > All right, with the bindings it works, but if it cannot find the
\r
84 > database, it crashes too.
\r
86 > And this slows by 5 times the startup time of vim for me:
\r
88 > vim -c 'quit' =C2=A00.47s user 0.02s system 99% cpu 0.501 total
\r
89 > vim -c 'quit' =C2=A00.08s user 0.01s system 96% cpu 0.092 total
\r
91 > It is interesting, but I personally I would not use if it's going to
\r
92 > slow vim for everything else, there must be a way to solve that. Also,
\r
93 > would be nice if you rebased your branch on top of the latest release.
\r
95 I fixed the issue this way:
\r
97 --- notmuch-vimpy.vim 2012-04-18 22:38:16.193358898 +0300
\r
98 +++ notmuch-vimpy-mod.vim 2012-04-19 17:07:19.390693437 +0300
\r
103 -" init the python layer
\r
104 -let s:python_path =3D expand('<sfile>:p:h')
\r
106 -exec "python sys.path +=3D [r'" . s:python_path . "']"
\r
107 -python import vim, nm_vim
\r
108 +let s:notmuch_loaded =3D 1
\r
110 command! NMVimpy call NMVimpy()
\r
112 @@ -815,7 +811,11 @@
\r
113 " --- command handler {{{1
\r
115 function! NMVimpy()
\r
116 - call <SID>NM_cmd_folders(g:nm_vimpy_folders)
\r
117 + let s:python_path =3D expand('<sfile>:p:h')
\r
118 + python import sys
\r
119 + exec "python sys.path +=3D [r'" . s:python_path . "']"
\r
120 + python import vim, nm_vim
\r
121 + call <SID>NM_cmd_folders(g:nm_vimpy_folders)
\r
124 "Custom foldtext() for show buffers, which indents folds to
\r
125 @@ -859,5 +859,3 @@
\r
126 python nm_vim.vim_get_tags()
\r
127 return prefix . substitute(taglist, "\n", "\n" . prefix, "g")
\r
130 -let s:notmuch_loaded =3D 1
\r
132 I was seriously considering to concentrate on this plugin instead of
\r
133 the current one, but I'm afraid every little error causes a crash,
\r
134 even when a subprocess fails (e.g. msmtp), so it's not really usable
\r
135 for me. Not to mention that it's really hard to debug, because every
\r
136 bug causes a crash, and sometimes I get random crashes with no
\r
137 information about what caused it at all.
\r
139 I am starting to work on a version that uses ruby, and it doesn't seem
\r
140 to have these issues, but lets see. I'm still not sure if we should
\r
141 depend on ruby/python bindings, maybe there's a way to make them
\r
144 Anyway, if you find a way to improve the crash issues, let me know, so
\r
145 far it's the only real issue I see with this plug-in.
\r