1 Return-Path: <imain@redhat.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 13C5B431FAF
\r
6 for <notmuch@notmuchmail.org>; Mon, 20 Oct 2014 10:45:43 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id YdviNLbsQ6f4 for <notmuch@notmuchmail.org>;
\r
16 Mon, 20 Oct 2014 10:45:35 -0700 (PDT)
\r
17 Received: from cmta11.telus.net (cmta11.telus.net [209.171.16.84])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 67664431FAE
\r
19 for <notmuch@notmuchmail.org>; Mon, 20 Oct 2014 10:45:35 -0700 (PDT)
\r
20 Received: from ovo.mains.priv ([207.102.88.62]) by cmta11.telus.net with TELUS
\r
21 id 5VlZ1p00C1LiWEf01VlZkM; Mon, 20 Oct 2014 11:45:34 -0600
\r
22 X-Authority-Analysis: v=2.0 cv=daReKwre c=1 sm=2
\r
23 a=EcQDfIwDZEqJA1f7rVUV8Q==:17 a=S-IsBHyFrF4A:10 a=IkcTkHD0fZMA:10
\r
24 a=tsa3CZZnAAAA:8 a=NEAV23lmAAAA:8 a=pGLkceISAAAA:8
\r
25 a=sbtZFu4L9O4t544OEacA:9
\r
26 a=QEXdDO2ut3YA:10 a=P87eogJZi2UA:10 a=MSl-tDqOz04A:10
\r
27 a=EcQDfIwDZEqJA1f7rVUV8Q==:117
\r
28 X-Telus-Outbound-IP: 207.102.88.62
\r
29 Received: from ovo.mains.priv (localhost.localdomain [127.0.0.1])
\r
30 by ovo.mains.priv (8.14.8/8.14.8) with ESMTP id s9KHjT2q002072;
\r
31 Mon, 20 Oct 2014 10:45:32 -0700
\r
32 Received: (from imain@localhost)
\r
33 by ovo.mains.priv (8.14.8/8.14.8/Submit) id s9KHjTkv002071;
\r
34 Mon, 20 Oct 2014 10:45:29 -0700
\r
35 X-Authentication-Warning: ovo.mains.priv: imain set sender to imain@redhat.com
\r
37 Date: Mon, 20 Oct 2014 10:45:29 -0700
\r
38 From: Ian Main <imain@stemwinder.org>
\r
39 To: Franz Fellner <alpine.art.de@gmail.com>
\r
40 Message-ID: <54454a39e0a1_6dc1435e9496@ovo.mains.priv.notmuch>
\r
41 In-Reply-To: <20141017181422.GG20696@TP_L520.localdomain>
\r
42 References: <1412281423-22441-1-git-send-email-imain@stemwinder.org>
\r
43 <20141010114457.GG28601@TP_L520.localdomain>
\r
44 <543822f73d3fd_46ad163fe88cd@ovo.mains.priv.notmuch>
\r
45 <20141011142943.GD23373@TP_L520.localdomain>
\r
46 <543ecc23bb98_2c291569e8c17@ovo.mains.priv.notmuch>
\r
47 <20141017181422.GG20696@TP_L520.localdomain>
\r
48 Subject: Re: [PATCH] VIM: Add URI handling
\r
50 Content-Type: text/plain;
\r
52 Content-Transfer-Encoding: 7bit
\r
53 Cc: notmuch@notmuchmail.org
\r
54 X-BeenThere: notmuch@notmuchmail.org
\r
55 X-Mailman-Version: 2.1.13
\r
57 List-Id: "Use and development of the notmuch mail system."
\r
58 <notmuch.notmuchmail.org>
\r
59 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
61 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
62 List-Post: <mailto:notmuch@notmuchmail.org>
\r
63 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
64 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
66 X-List-Received-Date: Mon, 20 Oct 2014 17:45:43 -0000
\r
68 Franz Fellner wrote:
\r
69 > On Wed, 15 Oct 2014 12:33:55 -0700, Ian Main <imain@stemwinder.org> wrote:
\r
70 > > Franz Fellner wrote:
\r
71 > > > Here is a working implementation.
\r
72 > > > Please review carefully as I only can simulate ruby and vimscript
\r
73 > > > knowledge from what I see in notmuch.vim sourcefile and quick
\r
76 > > Yes, this works nicely. Thanks!
\r
78 > > I do notice however that this is against the github plugin repo (I think)?
\r
79 > Yes, that's right.
\r
80 > I forked the notmuch repo on github and incorporated your patches.
\r
81 > Already made a mistake while applying one of your patches...
\r
82 > https://github.com/ff2000/notmuch
\r
83 > (Hope everythin is fine now)
\r
85 > commit cb757e9e438341a7bc6d2cfec4de7bdcc85946ea
\r
86 > Author: Franz Fellner <alpine.art.de@gmail.com>
\r
87 > Date: Fri Oct 17 11:19:41 2014 +0200
\r
89 > VIM: Add MsgID to supported URIs
\r
91 > diff --git a/vim/notmuch.vim b/vim/notmuch.vim
\r
92 > index 6287cf6..30e1876 100644
\r
93 > --- a/vim/notmuch.vim
\r
94 > +++ b/vim/notmuch.vim
\r
95 > @@ -268,6 +268,14 @@ ruby << EOF
\r
96 > if uri.class == URI::MailTo
\r
97 > vim_puts("Composing new email to #{uri.to}.")
\r
98 > VIM::command("call s:compose('#{uri.to}')")
\r
99 > + elsif uri.class == URI::MsgID
\r
100 > + msg = $curbuf.message(uri.opaque)
\r
102 > + vim_puts("Message not found in NotMuch database: #{uri.to_s}")
\r
104 > + vim_puts("Opening message #{msg.message_id} in thread #{msg.thread_id}.")
\r
105 > + VIM::command("call s:show('thread:#{msg.thread_id}', '#{msg.message_id}')")
\r
108 > vim_puts("Opening #{uri.to_s}.")
\r
109 > cmd = VIM::evaluate('g:notmuch_open_uri')
\r
110 > @@ -428,11 +436,12 @@ endfunction
\r
114 > -function! s:show(thread_id)
\r
115 > +function! s:show(thread_id, msg_id)
\r
116 > call s:new_buffer('show')
\r
117 > setlocal modifiable
\r
119 > thread_id = VIM::evaluate('a:thread_id')
\r
120 > + msg_id = VIM::evaluate('a:msg_id')
\r
121 > $cur_thread = thread_id
\r
123 > $curbuf.render do |b|
\r
124 > @@ -464,6 +473,9 @@ ruby << EOF
\r
127 > nm_m.end = b.count
\r
128 > + if !msg_id.empty? and nm_m.message_id == msg_id
\r
129 > + VIM::command("normal #{nm_m.start}zt")
\r
132 > b.delete(b.count)
\r
134 > @@ -486,7 +498,7 @@ ruby << EOF
\r
135 > when 1; $cur_filter = nil
\r
136 > when 2; $cur_filter = $cur_search
\r
138 > - VIM::command("call s:show('#{id}')")
\r
139 > + VIM::command("call s:show('#{id}', '')")
\r
143 > @@ -910,6 +922,10 @@ ruby << EOF
\r
147 > + def message(id)
\r
148 > + @db.find_message(id)
\r
152 > @queries.delete_if { |q| ! q.destroy! }
\r
154 > @@ -930,6 +946,13 @@ ruby << EOF
\r
159 > + class MsgID < Generic
\r
162 > + @@schemes['ID'] = MsgID
\r
166 > attr_accessor :start, :body_start, :end
\r
167 > attr_reader :message_id, :filename, :mail
\r
169 LGTM! Nice addition.
\r