[PATCH v3 3/8] nmbug-status: Use <code> and <p> markup where appropriate
authorW. Trevor King <wking@tremily.us>
Thu, 13 Feb 2014 16:47:18 +0000 (08:47 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:59:58 +0000 (09:59 -0800)
1e/b95e1d08f329085ef4209982cf6b539d9d6849 [new file with mode: 0644]

diff --git a/1e/b95e1d08f329085ef4209982cf6b539d9d6849 b/1e/b95e1d08f329085ef4209982cf6b539d9d6849
new file mode 100644 (file)
index 0000000..4612356
--- /dev/null
@@ -0,0 +1,136 @@
+Return-Path: <wking@tremily.us>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id B9E5C431FB6\r
+       for <notmuch@notmuchmail.org>; Thu, 13 Feb 2014 08:50:53 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 3Z19ZiIMPOKs for <notmuch@notmuchmail.org>;\r
+       Thu, 13 Feb 2014 08:50:47 -0800 (PST)\r
+Received: from qmta10.westchester.pa.mail.comcast.net\r
+       (qmta10.westchester.pa.mail.comcast.net [76.96.62.17])\r
+       by olra.theworths.org (Postfix) with ESMTP id 538A9431FAE\r
+       for <notmuch@notmuchmail.org>; Thu, 13 Feb 2014 08:50:46 -0800 (PST)\r
+Received: from omta15.westchester.pa.mail.comcast.net ([76.96.62.87])\r
+       by qmta10.westchester.pa.mail.comcast.net with comcast\r
+       id Rpa71n0041swQuc5Asqm56; Thu, 13 Feb 2014 16:50:46 +0000\r
+Received: from odin.tremily.us ([24.18.63.50])\r
+       by omta15.westchester.pa.mail.comcast.net with comcast\r
+       id Rsok1n013152l3L3bsolaG; Thu, 13 Feb 2014 16:48:46 +0000\r
+Received: from mjolnir.tremily.us (unknown [192.168.0.140])\r
+       by odin.tremily.us (Postfix) with ESMTPS id 9B20F102DA04;\r
+       Thu, 13 Feb 2014 08:48:44 -0800 (PST)\r
+Received: (nullmailer pid 17987 invoked by uid 1000);\r
+       Thu, 13 Feb 2014 16:47:29 -0000\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v3 3/8] nmbug-status: Use <code> and <p> markup where\r
+       appropriate\r
+Date: Thu, 13 Feb 2014 08:47:18 -0800\r
+Message-Id:\r
+ <c4a6ceb90b2a8070c7c0f04f7edda3b9b8f3ae77.1392309570.git.wking@tremily.us>\r
+X-Mailer: git-send-email 1.8.5.2.8.g0f6c0d1\r
+In-Reply-To: <cover.1392309570.git.wking@tremily.us>\r
+References: <cover.1392309570.git.wking@tremily.us>\r
+In-Reply-To: <cover.1392309570.git.wking@tremily.us>\r
+References: <cover.1392309570.git.wking@tremily.us>\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+       s=q20121106; t=1392310246;\r
+       bh=AXXdg7zzBjvpMMQMtoBcDba1cKOxOS9oaqrNqAsvQxo=;\r
+       h=Received:Received:Received:Received:From:To:Subject:Date:\r
+       Message-Id;\r
+       b=bfaajG/d9EhayhlAtOq/mp1xe2ftgHWQzPrYRkbCIewiIsW7jSqMyQBwffUstiv5W\r
+       W90WdAmi0fL0ZlkVFZC77A4uBDREqB/bQjtX2Z14b7kjfppcrde2jGh191ybzMUKNT\r
+       cL7T3e1e/xQZs8Bs/8nWsL5zsJVjtA7y1ZcMJQBq1M3w2zohwyLqMHqbaLRfvVoiQK\r
+       o+5sXY4yJyJpgf10LAN4v0DZGL8zENfLw9XDSH0NSDViiBr061itgnczCfhtY+A/TR\r
+       z0VCs3ZGXAzcEnxrkoNldNng4rtBq6CS59l8kCOT+xFIoZ1b+9ngsLRUsQT4CYRxyH\r
+       D/yv+oO/rBkGQ==\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 13 Feb 2014 16:50:53 -0000\r
+\r
+* Wrap free text in <p> tags.\r
+* Convert <blockquote> to <p><code> for query strings.\r
+* Wrap message-id-term (id:"...") in <code>.\r
+\r
+The <code> tags get nicer default markup (smaller monospace font) for\r
+notmuch query terms [1].  The <p> tags don't have much effect without\r
+attached CSS, but bare text (phrasing content [2]) in <body> (which\r
+expects flow content [3,4]) feels wrong.\r
+\r
+[1]: http://www.w3.org/TR/html5/text-level-semantics.html#the-code-element\r
+[2]: http://www.w3.org/TR/html5/dom.html#phrasing-content-1\r
+[3]: http://www.w3.org/TR/html5/dom.html#flow-content-1\r
+[4]: http://www.w3.org/TR/html5/sections.html#the-body-element\r
+---\r
+ devel/nmbug/nmbug-status | 12 +++++++++---\r
+ 1 file changed, 9 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
+index 9fde20e..6a156af 100755\r
+--- a/devel/nmbug/nmbug-status\r
++++ b/devel/nmbug/nmbug-status\r
+@@ -183,14 +183,18 @@ class HtmlPage (Page):\r
\r
+     def _write_view_header(self, view, stream):\r
+         stream.write('<h3 id="{id}">{title}</h3>\n'.format(**view))\r
++        stream.write('<p>\n')\r
+         if 'comment' in view:\r
+             stream.write(view['comment'])\r
+             stream.write('\n')\r
+         for line in [\r
+                 'The view is generated from the following query:',\r
+-                '<blockquote>',\r
++                '</p>',\r
++                '<p>',\r
++                '  <code>',\r
+                 view['query-string'],\r
+-                '</blockquote>',\r
++                '  </code>',\r
++                '</p>',\r
+                 ]:\r
+             stream.write(line)\r
+             stream.write('\n')\r
+@@ -204,7 +208,7 @@ class HtmlPage (Page):\r
+                 stream.write((\r
+                     '<tr>\n'\r
+                     '  <td>{date}</td>\n'\r
+-                    '  <td>{message-id-term}</td>\n'\r
++                    '  <td><code>{message-id-term}</code></td>\n'\r
+                     '</tr>\n'\r
+                     '<tr>\n'\r
+                     '  <td>{from}</td>\n'\r
+@@ -243,8 +247,10 @@ _PAGES['html'] = HtmlPage(\r
+ </head>\r
+ <body>\r
+ <h2>Notmuch Patches</h2>\r
++<p>\r
+ Generated: {date}<br />\r
+ For more infomation see <a href="http://notmuchmail.org/nmbug">nmbug</a>\r
++</p>\r
+ <h3>Views</h3>\r
+ '''.format(date=datetime.datetime.utcnow().date()),\r
+     footer='</body>\n</html>\n',\r
+-- \r
+1.8.5.2.8.g0f6c0d1\r
+\r