Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.
[notmuch-archives.git] / e3 / be52415d7fe65a7b86a97a45cd92b9dafe0863
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 54BDF431FAF\r
6         for <notmuch@notmuchmail.org>; Mon, 13 Oct 2014 01:43:23 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \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 vsTxygJx40nf for <notmuch@notmuchmail.org>;\r
17         Mon, 13 Oct 2014 01:43:17 -0700 (PDT)\r
18 Received: from mail-la0-f46.google.com (mail-la0-f46.google.com\r
19         [209.85.215.46]) (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 8CC7B431FAE\r
22         for <notmuch@notmuchmail.org>; Mon, 13 Oct 2014 01:43:17 -0700 (PDT)\r
23 Received: by mail-la0-f46.google.com with SMTP id gi9so6322351lab.33\r
24         for <notmuch@notmuchmail.org>; Mon, 13 Oct 2014 01:43:15 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=date:message-id:from:to:subject:in-reply-to:references:mime-version\r
27         :content-type:content-disposition:content-transfer-encoding;\r
28         bh=c4JI7xXwWJf+uiplxropyl/6+O+d3eBXrsP2GbhhIJ8=;\r
29         b=lWESPXxiz0zMOcYDVlzSY2KnIbhm8+ufs7UClTmlH1hwGObG7SmY+FmVPB9jdpZklW\r
30         29nIXHPnmEn1cGd2z7ViuKMeTC7v4PBp/g9SjB8wmOB2hGTzeAvMdso2/hda5V0uBB67\r
31         H6/QUzYH6V1PT1VEbOLQQFBJjrkPwyr5nhX9cnG5/O+EyQhrUYwajATmthkjtQI3C906\r
32         a+//umJv9mogQ94lPD/txdMjVXHoykKzpJFn311Hf4NZMkVOELZTau3mwvg3PkgnBoeS\r
33         77vCj+kfYBXVxcicLKrCp/g9HOrh8mH76oyVgxkYA8sjfobDLdorJfbxbIphyMJlKLfM\r
34         Bbrg==\r
35 X-Received: by 10.112.150.106 with SMTP id uh10mr22347534lbb.11.1413189795615;\r
36         Mon, 13 Oct 2014 01:43:15 -0700 (PDT)\r
37 Received: from localhost (p5B00D37C.dip0.t-ipconnect.de. [91.0.211.124])\r
38         by mx.google.com with ESMTPSA id al5sm4377604lbc.6.2014.10.13.01.43.13\r
39         for <notmuch@notmuchmail.org>\r
40         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
41         Mon, 13 Oct 2014 01:43:14 -0700 (PDT)\r
42 Date: Mon, 13 Oct 2014 10:43:24 +0200\r
43 Message-ID: <20141013104324.GF23373@TP_L520.localdomain>\r
44 From: Franz Fellner <alpine.art.de@gmail.com>\r
45 To: notmuch@notmuchmail.org\r
46 Subject: Re: VIM: search_refresh limits message count to 2 * window.height\r
47 In-Reply-To: <20141010175623.GB7504@TP_L520.localdomain>\r
48 References: <20141010175623.GB7504@TP_L520.localdomain>\r
49 MIME-Version: 1.0\r
50 Content-Type: text/plain; charset=utf-8\r
51 Content-Disposition: inline\r
52 Content-Transfer-Encoding: 8bit\r
53 X-BeenThere: notmuch@notmuchmail.org\r
54 X-Mailman-Version: 2.1.13\r
55 Precedence: list\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: Mon, 13 Oct 2014 08:43:23 -0000\r
66 \r
67 The issue is that VIM::Buffer.render yield's itself BEFORE it clears\r
68 itself.\r
69 Two quick solutions:\r
70 \r
71 1) Simply manually fixup the mess in StagedRender::initialize after\r
72 @b.render {do_next } by adding\r
73 @last_render = @b.count\r
74 \r
75 2) First clear the VIM:Buffer before yielding. This exposes one issue in\r
76 Vims buffer handling: A newly created buffer has count==0, But after\r
77 the first line got added you cannot get count==0 again, so a refresh\r
78 currently ends up with an empty line at the beginning.\r
79 It is possible to get the empty line at the end by implementing\r
80 VIM::Buffer.<<() as append(count()-1, arg)\r
81 Of course one has to add one line now directly after creating a new\r
82 buffer.\r
83 \r
84 Solution 1) would be a simple oneliner but IMHO looks a little bit hacky\r
85 ;)\r
86 Solution 2) at first looks ugly because of the empty line at the\r
87 end/beginning. But it also adds the opportunity to print additional\r
88 information, like description of the columns (date, thread participants,\r
89 subject, ...) at the beginning, or something like "end of search list",\r
90 "end of thread" at the end of the buffers.\r
91 \r
92 Please tell me which one you like most and I can send a patch.\r
93 \r
94 \r
95 Regards\r
96 Franz\r
97 \r
98 On Fri, 10 Oct 2014 17:56:23 +0200, Franz Fellner <alpine.art.de@gmail.com> wrote:\r
99 > The reason is that StagedRender.is_ready depends on last_render, which\r
100 > get's set to VIM::Buffer.count() in StagedRender::do_next.\r
101 > I do not (yet) know what exactly happens, but after the first call to\r
102 > search refresh last_render never get's less than 2*2*window.height.\r
103 > That means once you do search_refresh StagedRender never will be ready -\r
104 > is_ready returns false, so s:show_cursor_moved never will advance the\r
105 > StagedRender.\r
106\r
107 > I am trying to understand the code, but it's a hard time for me ;)\r