Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 01 / 63f1b433b4a2ce88f617a6c1ef0c9a2a6f61a4
1 Return-Path: <clmason@fusionio.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 2F369431FB6\r
6         for <notmuch@notmuchmail.org>; Sat, 16 Mar 2013 11:51:48 -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.8\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.8 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         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 c6miQkZoUTYX for <notmuch@notmuchmail.org>;\r
17         Sat, 16 Mar 2013 11:51:47 -0700 (PDT)\r
18 X-Greylist: delayed 546 seconds by postgrey-1.32 at olra;\r
19         Sat, 16 Mar 2013 11:51:47 PDT\r
20 Received: from dkim2.fusionio.com (dkim2.fusionio.com [66.114.96.54])\r
21         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
22         (No client certificate requested)\r
23         by olra.theworths.org (Postfix) with ESMTPS id A5351431FAE\r
24         for <notmuch@notmuchmail.org>; Sat, 16 Mar 2013 11:51:47 -0700 (PDT)\r
25 Received: from mx2.fusionio.com (unknown [10.101.1.160])\r
26         by dkim2.fusionio.com (Postfix) with ESMTP id A00B59A0402\r
27         for <notmuch@notmuchmail.org>; Sat, 16 Mar 2013 12:42:40 -0600 (MDT)\r
28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fusionio.com;\r
29         s=default; t=1363459360;\r
30         bh=VvxVT71Srpf7Vicmvcee+EAFTKrZkNPGea6TJsHvUQU=;\r
31         h=To:From:Subject:Date;\r
32         b=A82sndzM/hqDMl+LPG3R10Qst/af15ISmtrg638ZcLwC9QBvk35jHB+X9K8KteISQ\r
33         g4DBBU65WiULs2aQaR60iXxxCivnY0GclKhATGJ98/jGxNaJ7HYQ/W1rzcHWNiBI00\r
34         uyPy4Ivokme9wAQnFm65pB1JzFOSLlilXs2LiL0E=\r
35 X-ASG-Debug-ID: 1363459359-0421b5172c02670001-ZmzXr9\r
36 Received: from mail1.int.fusionio.com (mail1.int.fusionio.com [10.101.1.21])\r
37         by mx2.fusionio.com with ESMTP id CwavD8drQIqkXMCf\r
38         (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO);\r
39         Sat, 16 Mar 2013 12:42:39 -0600 (MDT)\r
40 X-Barracuda-Envelope-From: clmason@fusionio.com\r
41 Received: from localhost (67.247.72.189) by mail.fusionio.com (10.101.1.19)\r
42         with Microsoft SMTP Server (TLS) id 8.3.83.0;\r
43         Sat, 16 Mar 2013 12:42:39 -0600\r
44 Content-Type: text/plain; charset="utf-8"\r
45 MIME-Version: 1.0\r
46 Content-Transfer-Encoding: quoted-printable\r
47 To: <notmuch@notmuchmail.org>, Patrick Totzke <patricktotzke@gmail.com>\r
48 Message-ID: <20130316184238.11801.82067@localhost.localdomain>\r
49 From: Chris Mason <chris.mason@fusionio.com>\r
50 User-Agent: alot/0.3.4\r
51 Subject: [PATCH] alot: send batch keypresses back to urwid\r
52 Date: Sat, 16 Mar 2013 14:42:38 -0400\r
53 X-ASG-Orig-Subj: [PATCH] alot: send batch keypresses back to urwid\r
54 X-Barracuda-Connect: mail1.int.fusionio.com[10.101.1.21]\r
55 X-Barracuda-Start-Time: 1363459359\r
56 X-Barracuda-Encrypted: AES128-SHA\r
57 X-Barracuda-URL: http://10.101.1.181:8000/cgi-mod/mark.cgi\r
58 X-Virus-Scanned: by bsmtpd at fusionio.com\r
59 X-Barracuda-Spam-Score: 0.00\r
60 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of\r
61  TAG_LEVEL=1000.0       QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=\r
62 X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.125378\r
63         Rule breakdown below\r
64         pts rule name              description\r
65         ---- ----------------------\r
66         --------------------------------------------------\r
67 X-Mailman-Approved-At: Sun, 17 Mar 2013 16:42:40 -0700\r
68 X-BeenThere: notmuch@notmuchmail.org\r
69 X-Mailman-Version: 2.1.13\r
70 Precedence: list\r
71 List-Id: "Use and development of the notmuch mail system."\r
72         <notmuch.notmuchmail.org>\r
73 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
74         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
75 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
76 List-Post: <mailto:notmuch@notmuchmail.org>\r
77 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
78 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
79         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
80 X-List-Received-Date: Sat, 16 Mar 2013 18:51:48 -0000\r
81 \r
82 Looks like the urwid code is sending us arrays of [ 'j', 'j', 'j' ... ]\r
83 when I hold down the key, but alot is only acting on one of them.\r
84 \r
85 This changes the fire routine to send back all the keys that were sent\r
86 to us.  It may be a horrible idea, and I'm not sure if urwid always sends us\r
87 arrays of the same thing.\r
88 \r
89 But it's dramatically faster, so how can it be bad?\r
90 \r
91 Signed-off-by: Chris Mason <chris.mason@fusionio.com>\r
92 \r
93 diff --git a/alot/ui.py b/alot/ui.py\r
94 index 5d4dd4a..b8ced29 100644\r
95 --- a/alot/ui.py\r
96 +++ b/alot/ui.py\r
97 @@ -119,12 +119,12 @@ class UI(object):\r
98                  self.input_queue =3D []\r
99                  self.update()\r
100  =\r
101 \r
102 -            def fire(ignored, cmdline):\r
103 +            def fire(ignored, cmdline, count):\r
104                  clear()\r
105                  logging.debug("cmdline: '%s'" % cmdline)\r
106                  # move keys are always passed\r
107                  if cmdline in ['move up', 'move down', 'move page up', 'mo=\r
108 ve page down']:\r
109 -                    return [cmdline[5:]]\r
110 +                    return [cmdline[5:]] * count\r
111                  elif not self._locked:\r
112                      try:\r
113                          self.apply_commandline(cmdline)\r
114 @@ -147,7 +147,7 @@ class UI(object):\r
115                              self.mainloop.remove_alarm(self._alarm)\r
116                          self._alarm =3D self.mainloop.set_alarm_in(timeout=\r
117 , fire, cmdline)\r
118                      else:\r
119 -                        return fire(self.mainloop, cmdline)\r
120 +                        return fire(self.mainloop, cmdline, len(keys))\r
121  =\r
122 \r
123              elif not candidates:\r
124                  # case: no sequence with prefix keyseq is mapped\r