[PATCH v2 17/20] nmbug-status: Use <code> and <p> markup where appropriate
authorW. Trevor King <wking@tremily.us>
Mon, 10 Feb 2014 18:40:38 +0000 (10:40 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:59:53 +0000 (09:59 -0800)
9e/9c03bbb2f0af959159c7470ea0600ebca204ee [new file with mode: 0644]

diff --git a/9e/9c03bbb2f0af959159c7470ea0600ebca204ee b/9e/9c03bbb2f0af959159c7470ea0600ebca204ee
new file mode 100644 (file)
index 0000000..499d832
--- /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 19748431FBD\r
+       for <notmuch@notmuchmail.org>; Mon, 10 Feb 2014 10:44:57 -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 l5jQKBZxEQEn for <notmuch@notmuchmail.org>;\r
+       Mon, 10 Feb 2014 10:44:51 -0800 (PST)\r
+Received: from qmta13.westchester.pa.mail.comcast.net\r
+       (qmta13.westchester.pa.mail.comcast.net [76.96.59.243])\r
+       by olra.theworths.org (Postfix) with ESMTP id 257BD429E3A\r
+       for <notmuch@notmuchmail.org>; Mon, 10 Feb 2014 10:44:01 -0800 (PST)\r
+Received: from omta08.westchester.pa.mail.comcast.net ([76.96.62.12])\r
+       by qmta13.westchester.pa.mail.comcast.net with comcast\r
+       id Qck71n0030Fqzac5Dik1Ac; Mon, 10 Feb 2014 18:44:01 +0000\r
+Received: from odin.tremily.us ([24.18.63.50])\r
+       by omta08.westchester.pa.mail.comcast.net with comcast\r
+       id Qii01n004152l3L3Uii0pY; Mon, 10 Feb 2014 18:42:01 +0000\r
+Received: from mjolnir.tremily.us (unknown [192.168.0.140])\r
+       by odin.tremily.us (Postfix) with ESMTPS id 06C5810167C3;\r
+       Mon, 10 Feb 2014 10:42:00 -0800 (PST)\r
+Received: (nullmailer pid 1281 invoked by uid 1000);\r
+       Mon, 10 Feb 2014 18:40:46 -0000\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 17/20] nmbug-status: Use <code> and <p> markup where\r
+       appropriate\r
+Date: Mon, 10 Feb 2014 10:40:38 -0800\r
+Message-Id:\r
+ <9881bd7f6af6260d9a478feddd3c2d87c5b4049a.1392056624.git.wking@tremily.us>\r
+X-Mailer: git-send-email 1.8.5.2.8.g0f6c0d1\r
+In-Reply-To: <cover.1392056624.git.wking@tremily.us>\r
+References: <cover.1392056624.git.wking@tremily.us>\r
+In-Reply-To: <cover.1392056624.git.wking@tremily.us>\r
+References: <cover.1392056624.git.wking@tremily.us>\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+       s=q20121106; t=1392057841;\r
+       bh=r3GIskA8uH+3Z6WZWrusNEgSo9KO3Xyz95l3Y+Jag8k=;\r
+       h=Received:Received:Received:Received:From:To:Subject:Date:\r
+       Message-Id;\r
+       b=Ua50qL4YyhJmwmdQWDnnots+TYbmg73NN238FPEpKSAp4b05dc+l5zYr2z6W8gmas\r
+       PmJ8dqxMNDpmSXcBD2osFiy44KVS021ZgEwCulV2Yhh0vLuKx+LIx36wQm8PxL5ytF\r
+       tU0Sse7ASgT7rCzmZZUb0J8BHvcJQ+uVad5texFIPmVCSiLvcZb02nN5dCrRbTnOSI\r
+       fqi9mv1tO2fOy5X96HHZZvEvc+aaq9WCAkgkQqp0lrCoLPzf9MdoS7r0lXF5nETGe8\r
+       1HBSrlBhmgFJy3ajaOMwDjoj01KzUlrroxnHGtnblqdFb4xtulQtLw9UE69t/3kPRn\r
+       ZDRoXq0MPcjdA==\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: Mon, 10 Feb 2014 18:44:57 -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 989d065..c45b763 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
+            encoding=_ENCODING),\r
+-- \r
+1.8.5.2.8.g0f6c0d1\r
+\r