Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / c6 / f6e01b43dc224f0f2413b49040adb23424734a
1 Return-Path: <wking@tremily.us>\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 2640E431FD7\r
6         for <notmuch@notmuchmail.org>; Thu, 13 Feb 2014 08:51:00 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
9 X-Spam-Flag: NO\r
10 X-Spam-Score: 0\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
13         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001]\r
14         autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id MhsLx47Yh4ro for <notmuch@notmuchmail.org>;\r
18         Thu, 13 Feb 2014 08:50:53 -0800 (PST)\r
19 Received: from qmta12.westchester.pa.mail.comcast.net\r
20         (qmta12.westchester.pa.mail.comcast.net [76.96.59.227])\r
21         by olra.theworths.org (Postfix) with ESMTP id 20F35431FC0\r
22         for <notmuch@notmuchmail.org>; Thu, 13 Feb 2014 08:50:47 -0800 (PST)\r
23 Received: from omta14.westchester.pa.mail.comcast.net ([76.96.62.60])\r
24         by qmta12.westchester.pa.mail.comcast.net with comcast\r
25         id Rp6A1n0051HzFnQ5Csqnbk; Thu, 13 Feb 2014 16:50:47 +0000\r
26 Received: from odin.tremily.us ([24.18.63.50])\r
27         by omta14.westchester.pa.mail.comcast.net with comcast\r
28         id Rsom1n00a152l3L3asonyu; Thu, 13 Feb 2014 16:48:47 +0000\r
29 Received: from mjolnir.tremily.us (unknown [192.168.0.140])\r
30         by odin.tremily.us (Postfix) with ESMTPS id 42E1C102DA0A;\r
31         Thu, 13 Feb 2014 08:48:46 -0800 (PST)\r
32 Received: (nullmailer pid 17993 invoked by uid 1000);\r
33         Thu, 13 Feb 2014 16:47:29 -0000\r
34 From: "W. Trevor King" <wking@tremily.us>\r
35 To: notmuch@notmuchmail.org\r
36 Subject: [PATCH v3 6/8] nmbug-status: Add inter-message padding\r
37 Date: Thu, 13 Feb 2014 08:47:21 -0800\r
38 Message-Id:\r
39  <a733eed4838b9be125944dd0915770a0c48e08ab.1392309570.git.wking@tremily.us>\r
40 X-Mailer: git-send-email 1.8.5.2.8.g0f6c0d1\r
41 In-Reply-To: <cover.1392309570.git.wking@tremily.us>\r
42 References: <cover.1392309570.git.wking@tremily.us>\r
43 In-Reply-To: <cover.1392309570.git.wking@tremily.us>\r
44 References: <cover.1392309570.git.wking@tremily.us>\r
45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
46         s=q20121106; t=1392310247;\r
47         bh=tHi6d9am6wBt9inMfqksOF/IWXgW/CZ97UH6rA0QrzU=;\r
48         h=Received:Received:Received:Received:From:To:Subject:Date:\r
49         Message-Id;\r
50         b=PjsXaiAQ+lSIseI1A80S/6vhoZfHjFsi5FhfePseUJpNaRijgggjmfnppVrWNQiuG\r
51         lFEfMKd/0AOtpb0wKVBrQM9ZQKYi/py3qAwnSRMuOiYeNvmWM2CCcqeRb+l9o/tZJ/\r
52         Vp6V1shlOXYstI/TZdqZr3rMgHQ1uz5qncTumw5odB6QJalukzzWbHiJXDMT4eZw15\r
53         c9oZ6kDCYb0d5ft9XNQjPet2Ab/1f4d6mtnlbEy0u8njsV6T2Y7OL5c1SNv77BsP/z\r
54         oLNJ3rey4xhMu6UnMbBoO6Mt0k7TD8tsb3fzaRuKROzE2quOctnyIVsRHDg1aMOacT\r
55         5+r1Djnf364TQ==\r
56 Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Thu, 13 Feb 2014 16:51:00 -0000\r
70 \r
71 We already had the tbody with a blank row separating threads (which is\r
72 not colored); this commit adds a bit of spacing to separate messages\r
73 within a thread.  It will also add a bit of colored padding above the\r
74 first message and below the final message, but the main goal is to add\r
75 padding *between* two-row message blocks.\r
76 \r
77                                                <--- new padding\r
78   thread-1, message-1, row-1  (class="message-first")\r
79   thread-1, message-1, row-2  (class="message-last")\r
80                                                <--- new padding\r
81     spacer tbody with a blank row\r
82                                                <--- new padding\r
83   thread-2, message-1, row-1  (class="message-first")\r
84   thread-2, message-1, row-2  (class="message-last")\r
85                                                <--- new padding\r
86                                                <--- new padding\r
87   thread-2, message-2, row-1  (class="message-first")\r
88   thread-2, message-2, row-2  (class="message-last")\r
89                                                <--- new padding\r
90 ---\r
91  devel/nmbug/nmbug-status | 11 +++++++++--\r
92  1 file changed, 9 insertions(+), 2 deletions(-)\r
93 \r
94 diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
95 index 57eec6c..9ad7d35 100755\r
96 --- a/devel/nmbug/nmbug-status\r
97 +++ b/devel/nmbug/nmbug-status\r
98 @@ -208,11 +208,11 @@ class HtmlPage (Page):\r
99              stream.write('  <tbody>\n')\r
100              for message_display_data in thread:\r
101                  stream.write((\r
102 -                    '    <tr>\n'\r
103 +                    '    <tr class="message-first">\n'\r
104                      '      <td>{date}</td>\n'\r
105                      '      <td><code>{message-id-term}</code></td>\n'\r
106                      '    </tr>\n'\r
107 -                    '    <tr>\n'\r
108 +                    '    <tr class="message-last">\n'\r
109                      '      <td>{from}</td>\n'\r
110                      '      <td>{subject}</td>\n'\r
111                      '    </tr>\n'\r
112 @@ -256,6 +256,12 @@ _PAGES['html'] = HtmlPage(\r
113      table {{\r
114        border-spacing: 0;\r
115      }}\r
116 +    tr.message-first td {{\r
117 +      padding-top: {inter_message_padding};\r
118 +    }}\r
119 +    tr.message-last td {{\r
120 +      padding-bottom: {inter_message_padding};\r
121 +    }}\r
122      td {{\r
123        padding-left: {border_radius};\r
124        padding-right: {border_radius};\r
125 @@ -288,6 +294,7 @@ For more infomation see <a href="http://notmuchmail.org/nmbug">nmbug</a>\r
126  </p>\r
127  <h3>Views</h3>\r
128  '''.format(date=datetime.datetime.utcnow().date(),\r
129 +           inter_message_padding='0.25em',\r
130             border_radius='0.5em'),\r
131      footer='</body>\n</html>\n',\r
132      )\r
133 -- \r
134 1.8.5.2.8.g0f6c0d1\r
135 \r