From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 02463431FBC for ; Fri, 10 Oct 2014 02:21:27 -0700 (PDT) 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 6H1U9xSXkkhu for ; Fri, 10 Oct 2014 02:21:20 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id BB182431FAF for ; Fri, 10 Oct 2014 02:21:19 -0700 (PDT) Received: by mail-lb0-f169.google.com with SMTP id 10so2717963lbg.14 for ; Fri, 10 Oct 2014 02:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:to:subject:in-reply-to:references:mime-version :content-type:content-disposition:content-transfer-encoding; bh=oOx98xBQsHr6pXKFo6nVUseezlmqsPNlCyz8l09w7bQ=; b=ltig0/EbsCpZOEBDRmEh+8Wfaw0ruvbcNnZoT8RF/SmlpmXZ4olJItWKhLMVjcEVU1 GQuAu1QrkDNhgM1qXeNJlhtwCHK6KyAfuIJ3vSJEVnb/co7m6uYx/xstwzxAtMnRrCxC 8qbD8MI5/NPeajdd/sxAzYA3NYHeffBmXgSKZ4ESvBDCSpkwD7+c6ChGmiLAVPeZ4e5g a433oejWUOtsZwgMV2PBD33p+AKJHU9IhbodHRHJZ3cjJi8UUclKmHUctvpJpOppXiiV 7xU885eLGeAWMiZi0li+SxJcFJu50v+QPtzK2JifmmU5G+iYtokzZDw8nVjfSCM6zxCJ uG0w== X-Received: by 10.152.23.99 with SMTP id l3mr3331395laf.39.1412932874579; Fri, 10 Oct 2014 02:21:14 -0700 (PDT) Received: from localhost (p5B00C9E6.dip0.t-ipconnect.de. [91.0.201.230]) by mx.google.com with ESMTPSA id ju7sm1669281lbc.0.2014.10.10.02.21.12 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 10 Oct 2014 02:21:13 -0700 (PDT) Date: Fri, 10 Oct 2014 11:21:22 +0200 Message-ID: <20141010112122.GB28601@TP_L520.localdomain> From: Franz Fellner To: notmuch@notmuchmail.org Subject: Re: [PATCH] VIM: Improve moving between messages in a thread In-Reply-To: <1412618116-27586-1-git-send-email-imain@stemwinder.org> References: <1412579537-7921-1-git-send-email-imain@stemwinder.org> <1412618116-27586-1-git-send-email-imain@stemwinder.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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: Fri, 10 Oct 2014 09:21:28 -0000 Patch works fine for me. It also would be nice to have a "move to next unread message" function. Most beautiful would be a treeview of the thread structure. Currently threads are rendered as plain list, so you can't immediately see and jump to the quoted mail. Bower IMHO uses the best approach here. I tried emacs treeview but did not really like it (partly because I failed badly to implement a solution that shows treeview by default). Indent the whole large Message view IMHO also is not a good (at least to me) solution. On Mon, 6 Oct 2014 10:55:16 -0700, Ian Main wrote: > @@ -113,6 +114,22 @@ EOF > call s:kill_this_buffer() > endfunction > > +function! s:show_prev_msg() > +ruby << EOF > + r, c = $curwin.cursor > + n = $curbuf.line_number > + i = $messages.index { |m| n >= m.start && n <= m.end } > + m = $messages[i - 1] if i > 0 This one > + vim_puts ("messages index is #{i} and m is #{m}") was missed ;) > + if m > + r = m.body_start + 1 > + scrolloff = VIM::evaluate("&scrolloff") > + VIM::command("normal #{m.start + scrolloff}zt") > + $curwin.cursor = r + scrolloff, c > + end > +EOF > +endfunction > + > function! s:show_next_msg() > ruby << EOF > r, c = $curwin.cursor > @@ -121,8 +138,9 @@ ruby << EOF > m = $messages[i + 1] > if m > r = m.body_start + 1 > - VIM::command("normal #{m.start}zt") > - $curwin.cursor = r, c > + scrolloff = VIM::evaluate("&scrolloff") > + VIM::command("normal #{m.start + scrolloff}zt") > + $curwin.cursor = r + scrolloff, c > end > EOF > endfunction > -- > 1.9.3 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch