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 9F616431FAF
\r
6 for <notmuch@notmuchmail.org>; Mon, 6 Oct 2014 10:25:24 -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 gLtGFxy8qEGk for <notmuch@notmuchmail.org>;
\r
16 Mon, 6 Oct 2014 10:25:19 -0700 (PDT)
\r
17 Received: from cmta8.telus.net (cmta8.telus.net [209.171.16.81])
\r
18 by olra.theworths.org (Postfix) with ESMTP id F2482431FAE
\r
19 for <notmuch@notmuchmail.org>; Mon, 6 Oct 2014 10:25:18 -0700 (PDT)
\r
20 Received: from ovo.mains.priv ([207.102.88.62]) by cmta8.telus.net with TELUS
\r
21 id ztRG1o00U1LiWEf01tRHWi; Mon, 06 Oct 2014 11:25:18 -0600
\r
22 X-Authority-Analysis: v=2.0 cv=ffdzPTsF c=1 sm=2
\r
23 a=EcQDfIwDZEqJA1f7rVUV8Q==:17 a=S-IsBHyFrF4A:10 a=IkcTkHD0fZMA:10
\r
24 a=tsa3CZZnAAAA:8 a=iT6l_161Bv_4KwFna24A:9 a=QEXdDO2ut3YA:10
\r
25 a=EcQDfIwDZEqJA1f7rVUV8Q==:117
\r
26 X-Telus-Outbound-IP: 207.102.88.62
\r
27 Received: from ovo.mains.priv (localhost.localdomain [127.0.0.1])
\r
28 by ovo.mains.priv (8.14.8/8.14.8) with ESMTP id s96HPE2k025572
\r
29 for <notmuch@notmuchmail.org>; Mon, 6 Oct 2014 10:25:14 -0700
\r
30 Received: (from imain@localhost)
\r
31 by ovo.mains.priv (8.14.8/8.14.8/Submit) id s96HP7bg025555;
\r
32 Mon, 6 Oct 2014 10:25:07 -0700
\r
33 X-Authentication-Warning: ovo.mains.priv: imain set sender to imain@redhat.com
\r
35 Date: Mon, 06 Oct 2014 10:25:07 -0700
\r
36 From: Ian Main <imain@stemwinder.org>
\r
37 To: notmuch@notmuchmail.org
\r
38 Message-ID: <5432d073a9fc2_20301203e8c95@ovo.mains.priv.notmuch>
\r
39 In-Reply-To: <1412579537-7921-1-git-send-email-imain@stemwinder.org>
\r
40 References: <1412579537-7921-1-git-send-email-imain@stemwinder.org>
\r
41 Subject: RE: [PATCH] Improve moving between messages in a thread
\r
43 Content-Type: text/plain;
\r
45 Content-Transfer-Encoding: 7bit
\r
46 X-BeenThere: notmuch@notmuchmail.org
\r
47 X-Mailman-Version: 2.1.13
\r
49 List-Id: "Use and development of the notmuch mail system."
\r
50 <notmuch.notmuchmail.org>
\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
54 List-Post: <mailto:notmuch@notmuchmail.org>
\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
58 X-List-Received-Date: Mon, 06 Oct 2014 17:25:24 -0000
\r
61 > This patch adds a few changes to moving between threads:
\r
63 > - It supports 'scrolloff' so that if you have this set it will move the
\r
64 > buffer and cursor so the next/prev email starts at the top of the
\r
66 > - It adds the ability to use shift-tab to go to the previous msg in
\r
71 > vim/notmuch.vim | 24 ++++++++++++++++++++++--
\r
72 > 1 file changed, 22 insertions(+), 2 deletions(-)
\r
74 > diff --git a/vim/notmuch.vim b/vim/notmuch.vim
\r
75 > index 331e930..95e5c4b 100644
\r
76 > --- a/vim/notmuch.vim
\r
77 > +++ b/vim/notmuch.vim
\r
78 > @@ -39,6 +39,7 @@ let g:notmuch_show_maps = {
\r
79 > \ 'p': 'show_save_patches()',
\r
80 > \ 'r': 'show_reply()',
\r
81 > \ '?': 'show_info()',
\r
82 > + \ '<S-Tab>': 'show_prev_msg()',
\r
83 > \ '<Tab>': 'show_next_msg()',
\r
84 > \ 'c': 'compose()',
\r
86 > @@ -113,6 +114,23 @@ EOF
\r
87 > call s:kill_this_buffer()
\r
90 > +function! s:show_prev_msg()
\r
92 > + r, c = $curwin.cursor
\r
93 > + n = $curbuf.line_number
\r
94 > + i = $messages.index { |m| n >= m.start && n <= m.end }
\r
95 > + m = $messages[i - 1] if i > 0
\r
96 > + vim_puts ("messages index is #{i} and m is #{m}")
\r
98 > + r = m.body_start + 1
\r
99 > + scrolloff = VIM::evaluate("&scrolloff")
\r
100 > + VIM::command("normal #{m.start + scrolloff}zt")
\r
101 > + $curwin.cursor = r + scrolloff, c
\r
102 > + vim_puts("moving to #{m.start + scrolloff}")
\r
104 Woops, forgot to remove the vim_puts debugging.
\r