1 Return-Path: <alpine.art.de@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 1964D431FAF
\r
6 for <notmuch@notmuchmail.org>; Mon, 20 Oct 2014 12:38:50 -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 8bgh4p65-rnO for <notmuch@notmuchmail.org>;
\r
17 Mon, 20 Oct 2014 12:38:46 -0700 (PDT)
\r
18 Received: from mail-la0-f53.google.com (mail-la0-f53.google.com
\r
19 [209.85.215.53]) (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 E5B07431FAE
\r
22 for <notmuch@notmuchmail.org>; Mon, 20 Oct 2014 12:38:45 -0700 (PDT)
\r
23 Received: by mail-la0-f53.google.com with SMTP id gq15so4509572lab.40
\r
24 for <notmuch@notmuchmail.org>; Mon, 20 Oct 2014 12:38:44 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=date:from:to:cc:message-id:in-reply-to:references:subject
\r
27 :mime-version:content-type:content-transfer-encoding;
\r
28 bh=EAdjSH6sKg9Em1RgkXMkaeF4N9EK/M3HIywcQGODp3U=;
\r
29 b=hFw7rl2fWtnE2qar1xogBpJbBba/dHOYUWXOzmU31+hVN5ERH/CiRDoMgQz2aBi4UK
\r
30 OTbSDa+9J0DUTNsQLmj6IuKdhVMekJuPWvX/skOASdRIwHxRB4CbWcXJlflpZj+O7NEB
\r
31 N1bV5+GCNxshXwZ7RNOomxruJe+YoFUDf1QQZE71hwaBduzADRvBoPgXg7Hnoqpw6l7f
\r
32 w3RXXLW27iN/UdQnNG/OfPNGNIXG+2+4+lmFWwPnP8iPIFVMB3P7TfnToejZuSGYoLOR
\r
33 B8F/5vgQSsNFFkjtPGMQnqkJ/Xw85uO5zwm/TR8KKEYvN57pLUdBSFI4jt5BbzAQUzn9
\r
35 X-Received: by 10.152.88.70 with SMTP id be6mr29904181lab.72.1413833924423;
\r
36 Mon, 20 Oct 2014 12:38:44 -0700 (PDT)
\r
37 Received: from localhost (p5B00FFDE.dip0.t-ipconnect.de. [91.0.255.222])
\r
38 by mx.google.com with ESMTPSA id u2sm2193280lbw.35.2014.10.20.12.38.42
\r
39 for <multiple recipients>
\r
40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
41 Mon, 20 Oct 2014 12:38:43 -0700 (PDT)
\r
42 Date: Mon, 20 Oct 2014 21:38:54 +0200
\r
43 From: Franz Fellner <alpine.art.de@gmail.com>
\r
44 To: Tomi Ollila <tomi.ollila@iki.fi>,
\r
45 Tomi Ollila <tomi.ollila@iki.fi>
\r
46 Message-ID: <544564ceae3dc_25b371be984d@TP_L520.notmuch>
\r
47 In-Reply-To: <m2vbner283.fsf@guru.guru-group.fi>
\r
48 References: <1412281423-22441-1-git-send-email-imain@stemwinder.org>
\r
49 <20141010114457.GG28601@TP_L520.localdomain>
\r
50 <543822f73d3fd_46ad163fe88cd@ovo.mains.priv.notmuch>
\r
51 <20141011142943.GD23373@TP_L520.localdomain>
\r
52 <543ecc23bb98_2c291569e8c17@ovo.mains.priv.notmuch>
\r
53 <20141017181422.GG20696@TP_L520.localdomain>
\r
54 <m2vbner283.fsf@guru.guru-group.fi>
\r
55 Subject: Re: [PATCH] VIM: Add URI handling
\r
57 Content-Type: text/plain;
\r
59 Content-Transfer-Encoding: 7bit
\r
60 Cc: notmuch@notmuchmail.org
\r
61 X-BeenThere: notmuch@notmuchmail.org
\r
62 X-Mailman-Version: 2.1.13
\r
64 List-Id: "Use and development of the notmuch mail system."
\r
65 <notmuch.notmuchmail.org>
\r
66 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
68 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
69 List-Post: <mailto:notmuch@notmuchmail.org>
\r
70 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
71 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
72 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
73 X-List-Received-Date: Mon, 20 Oct 2014 19:38:50 -0000
\r
76 > On Fri, Oct 17 2014, Franz Fellner <alpine.art.de@gmail.com> wrote:
\r
78 > > On Wed, 15 Oct 2014 12:33:55 -0700, Ian Main <imain@stemwinder.org> wrote:
\r
79 > >> Franz Fellner wrote:
\r
80 > >> > Here is a working implementation.
\r
81 > >> > Please review carefully as I only can simulate ruby and vimscript
\r
82 > >> > knowledge from what I see in notmuch.vim sourcefile and quick
\r
85 > >> Yes, this works nicely. Thanks!
\r
87 > >> I do notice however that this is against the github plugin repo (I think)?
\r
88 > > Yes, that's right.
\r
89 > > I forked the notmuch repo on github and incorporated your patches.
\r
90 > > Already made a mistake while applying one of your patches...
\r
91 > > https://github.com/ff2000/notmuch
\r
92 > > (Hope everythin is fine now)
\r
94 > > commit cb757e9e438341a7bc6d2cfec4de7bdcc85946ea
\r
95 > > Author: Franz Fellner <alpine.art.de@gmail.com>
\r
96 > > Date: Fri Oct 17 11:19:41 2014 +0200
\r
98 > > VIM: Add MsgID to supported URIs
\r
100 > Code-wise this patch looks good -- although I am not entirely sure what id
\r
101 > does -- I expect it to handle id:... links...
\r
102 Yes, that's what it should do.
\r
104 > This email applies with git am (on top of Ian's) but the commit message has
\r
105 > quite a few lines of cruft -- I'd like to see a commit message what
\r
106 > explains what this change do ( the term 'MsgID' seems to be some vim client
\r
107 > internal (subclass in URI class ?) which IMO should be better commented in
\r
108 > this commit message.
\r
109 MsgID was just a short name for message-id, and I am used to CamelCase...
\r
111 VIM: Add support to open messages specified by their message-id in notmuch-show.
\r
113 Does that make more sense?
\r
118 > > diff --git a/vim/notmuch.vim b/vim/notmuch.vim
\r
119 > > index 6287cf6..30e1876 100644
\r
120 > > --- a/vim/notmuch.vim
\r
121 > > +++ b/vim/notmuch.vim
\r
122 > > @@ -268,6 +268,14 @@ ruby << EOF
\r
123 > > if uri.class == URI::MailTo
\r
124 > > vim_puts("Composing new email to #{uri.to}.")
\r
125 > > VIM::command("call s:compose('#{uri.to}')")
\r
126 > > + elsif uri.class == URI::MsgID
\r
127 > > + msg = $curbuf.message(uri.opaque)
\r
129 > > + vim_puts("Message not found in NotMuch database: #{uri.to_s}")
\r
131 > > + vim_puts("Opening message #{msg.message_id} in thread #{msg.thread_id}.")
\r
132 > > + VIM::command("call s:show('thread:#{msg.thread_id}', '#{msg.message_id}')")
\r
135 > > vim_puts("Opening #{uri.to_s}.")
\r
136 > > cmd = VIM::evaluate('g:notmuch_open_uri')
\r
137 > > @@ -428,11 +436,12 @@ endfunction
\r
141 > > -function! s:show(thread_id)
\r
142 > > +function! s:show(thread_id, msg_id)
\r
143 > > call s:new_buffer('show')
\r
144 > > setlocal modifiable
\r
146 > > thread_id = VIM::evaluate('a:thread_id')
\r
147 > > + msg_id = VIM::evaluate('a:msg_id')
\r
148 > > $cur_thread = thread_id
\r
149 > > $messages.clear
\r
150 > > $curbuf.render do |b|
\r
151 > > @@ -464,6 +473,9 @@ ruby << EOF
\r
154 > > nm_m.end = b.count
\r
155 > > + if !msg_id.empty? and nm_m.message_id == msg_id
\r
156 > > + VIM::command("normal #{nm_m.start}zt")
\r
159 > > b.delete(b.count)
\r
161 > > @@ -486,7 +498,7 @@ ruby << EOF
\r
162 > > when 1; $cur_filter = nil
\r
163 > > when 2; $cur_filter = $cur_search
\r
165 > > - VIM::command("call s:show('#{id}')")
\r
166 > > + VIM::command("call s:show('#{id}', '')")
\r
170 > > @@ -910,6 +922,10 @@ ruby << EOF
\r
174 > > + def message(id)
\r
175 > > + @db.find_message(id)
\r
179 > > @queries.delete_if { |q| ! q.destroy! }
\r
181 > > @@ -930,6 +946,13 @@ ruby << EOF
\r
186 > > + class MsgID < Generic
\r
189 > > + @@schemes['ID'] = MsgID
\r
193 > > attr_accessor :start, :body_start, :end
\r
194 > > attr_reader :message_id, :filename, :mail
\r
195 > > _______________________________________________
\r
196 > > notmuch mailing list
\r
197 > > notmuch@notmuchmail.org
\r
198 > > http://notmuchmail.org/mailman/listinfo/notmuch
\r