--- /dev/null
+Return-Path: <markwalters1009@gmail.com>\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 93C85431E84\r
+ for <notmuch@notmuchmail.org>; Sun, 1 Sep 2013 20:28:30 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+ RCVD_IN_DNSWL_LOW=-0.7] 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 aSvlumhdL0GP for <notmuch@notmuchmail.org>;\r
+ Sun, 1 Sep 2013 20:28:26 -0700 (PDT)\r
+Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com\r
+ [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ EF5C6431FCF for <notmuch@notmuchmail.org>; Sun, 1 Sep 2013 20:28:20 -0700\r
+ (PDT)\r
+Received: by mail-wg0-f45.google.com with SMTP id y10so2970398wgg.12\r
+ for <notmuch@notmuchmail.org>; Sun, 01 Sep 2013 20:28:19 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
+ bh=ATGrk/z0l0o5lEIv4agnE5v+/VCo6jghaU2R5MhZhjI=;\r
+ b=vu1UFR1WqDqOCE1x76eJMN/rYDehLr5kLcsw98DD/nkoQBci587434pN0VVyj3VWaB\r
+ qHbE9R/ayq5tlJm5SjpZtRjOSIAQYorpjLIa1DlIW9By8VNKMmtXLwGs3yGfZuzoK+63\r
+ nmmt97u7Q94204LTM2L90EK6Om6CFMCD4pds9TNCSS/q6pc+1ZW4Zlt0RgNtdWlMDBC/\r
+ 11XKSmEWgrXPTSpFonrFEbrXdrtxWs4Fc3iO0FWhlzdT4nmXtdUNeMpsU1Fq9/Uu/5B2\r
+ VIIJgUUttFa+SvxnFzd4vFWspMHhARlq75b918WTii7URaHp2pcckoXlRp13pAj7BSeF\r
+ 5cgw==\r
+X-Received: by 10.180.182.15 with SMTP id ea15mr11833510wic.16.1378092499917; \r
+ Sun, 01 Sep 2013 20:28:19 -0700 (PDT)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+ by mx.google.com with ESMTPSA id i3sm14853715wiw.7.1969.12.31.16.00.00\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Sun, 01 Sep 2013 20:28:19 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 4/4] contrib: pick: make the tree graphics a proper part of\r
+ the format\r
+Date: Mon, 2 Sep 2013 04:28:08 +0100\r
+Message-Id: <1378092488-32050-5-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1378092488-32050-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1378092488-32050-1-git-send-email-markwalters1009@gmail.com>\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, 02 Sep 2013 03:28:30 -0000\r
+\r
+Previously the box graphics in the pick view were always attached to\r
+the subject. Make them a field in their own right. We use the\r
+recursive insert to change the default notmuch-pick-result-format so\r
+that the user view does not change. (The subject touches the tree box\r
+graphics but the next column (tags) is still vertically aligned.)\r
+---\r
+ contrib/notmuch-pick/notmuch-pick.el | 49 +++++++++++++++++++++++++--------\r
+ 1 files changed, 37 insertions(+), 12 deletions(-)\r
+\r
+diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
+index 5dfcef3..b6f7362 100644\r
+--- a/contrib/notmuch-pick/notmuch-pick.el\r
++++ b/contrib/notmuch-pick/notmuch-pick.el\r
+@@ -65,13 +65,18 @@\r
+ (defcustom notmuch-pick-result-format\r
+ `(("date" . "%12s ")\r
+ ("authors" . "%-20s")\r
+- ("subject" . " %-54s ")\r
++ ((("tree" . "%s")("subject" . "%s")) ." %-54s ")\r
+ ("tags" . "(%s)"))\r
+ "Result formatting for Pick. Supported fields are: date,\r
+- authors, subject, tags Note: subject includes the tree\r
+- structure graphics, and the author string should not\r
+- contain whitespace (put it in the neighbouring fields\r
+- instead). For example:\r
++ authors, subject, tree, tags. Tree means the thread tree\r
++ box graphics. The field may also be a list in which case\r
++ the formatting rules are applied recursively and then the\r
++ output of all the fields in the list is inserted\r
++ according to format-string.\r
++\r
++Note the author string should not contain\r
++ whitespace (put it in the neighbouring fields instead).\r
++ For example:\r
+ (setq notmuch-pick-result-format \(\(\"authors\" . \"%-40s\"\)\r
+ \(\"subject\" . \"%s\"\)\)\)"\r
+ :type '(alist :key-type (string) :value-type (string))\r
+@@ -108,6 +113,12 @@\r
+ :group 'notmuch-pick\r
+ :group 'notmuch-faces)\r
+ \r
++(defface notmuch-pick-match-tree-face\r
++ '((t :inherit default))\r
++ "Face used in pick mode for the thread tree block graphics in messages matching the query."\r
++ :group 'notmuch-pick\r
++ :group 'notmuch-faces)\r
++\r
+ (defface notmuch-pick-match-tag-face\r
+ '((((class color)\r
+ (background dark))\r
+@@ -134,6 +145,12 @@\r
+ :group 'notmuch-pick\r
+ :group 'notmuch-faces)\r
+ \r
++(defface notmuch-pick-no-match-tree-face\r
++ '((t (:foreground "gray")))\r
++ "Face used in pick mode for the thread tree block graphics in messages matching the query."\r
++ :group 'notmuch-pick\r
++ :group 'notmuch-faces)\r
++\r
+ (defface notmuch-pick-no-match-author-face\r
+ '((t (:foreground "gray")))\r
+ "Face used in pick mode for the date in messages matching the query."\r
+@@ -628,19 +645,27 @@ unchanged ADDRESS if parsing fails."\r
+ (propertize (format format-string (plist-get msg :date_relative))\r
+ 'face face))))\r
+ \r
+- ((string-equal field "subject")\r
++ ((string-equal field "tree")\r
+ (let ((tree-status (plist-get msg :tree-status))\r
+- (bare-subject (notmuch-show-strip-re (plist-get headers :Subject)))\r
++ (face (if match\r
++ 'notmuch-pick-match-tree-face\r
++ 'notmuch-pick-no-match-tree-face)))\r
++\r
++ (setq formatted-field\r
++ (propertize (format format-string\r
++ (mapconcat #'identity (reverse tree-status) ""))\r
++ 'face face))))\r
++\r
++ ((string-equal field "subject")\r
++ (let ((bare-subject (notmuch-show-strip-re (plist-get headers :Subject)))\r
+ (face (if match\r
+ 'notmuch-pick-match-subject-face\r
+ 'notmuch-pick-no-match-subject-face)))\r
+ (setq formatted-field\r
+ (propertize (format format-string\r
+- (concat\r
+- (mapconcat #'identity (reverse tree-status) "")\r
+- (if (string= notmuch-pick-previous-subject bare-subject)\r
+- " ..."\r
+- bare-subject)))\r
++ (if (string= notmuch-pick-previous-subject bare-subject)\r
++ " ..."\r
++ bare-subject))\r
+ 'face face))\r
+ (setq notmuch-pick-previous-subject bare-subject)))\r
+ \r
+-- \r
+1.7.9.1\r
+\r