From: Mark Walters Date: Mon, 2 Sep 2013 03:28:04 +0000 (+0100) Subject: [PATCH 0/4] contrib: pick: allow more general format lines X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a0718b086b04428a4791891e09df920d1a782714;p=notmuch-archives.git [PATCH 0/4] contrib: pick: allow more general format lines --- diff --git a/98/7080d9f461a33228a3d55729ce7ee1442ec1f9 b/98/7080d9f461a33228a3d55729ce7ee1442ec1f9 new file mode 100644 index 000000000..4d59ce0c1 --- /dev/null +++ b/98/7080d9f461a33228a3d55729ce7ee1442ec1f9 @@ -0,0 +1,118 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id AD3C6431FD0 + for ; Sun, 1 Sep 2013 20:28:21 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id DAvu4prf-Klv for ; + Sun, 1 Sep 2013 20:28:16 -0700 (PDT) +Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com + [209.85.212.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 06FBE431FC3 + for ; Sun, 1 Sep 2013 20:28:15 -0700 (PDT) +Received: by mail-wi0-f182.google.com with SMTP id ez12so762982wid.3 + for ; Sun, 01 Sep 2013 20:28:14 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id; + bh=MHwJHLYw35A1bkWFmtZxpmIfDff90pd46wYd+sEtyXc=; + b=Im1bi+GPiehBEo2nhIkI9CYbLPLQpjFX6BhBW+XwBYRwNEWXH4Ce890CpOZguxfs7k + iy/HNsu05oEqanP6Cn2GFyQsOhVjV6V1ERL0yWD3oRzxU0aXB56lrfeIEzbJnn8aV2aS + CAaza8MCGXNKVyxPDmlxFtjOfhpMixh2W5PgLNAsj9g0iu6Nfxd2egDFBz4a3IKGss6H + /ufuwN6zhweEceooGWBPuWZbzP/Qt20noTfUpzwhosMLJon5bk7TRGWs1WRMRw5UbUQY + uoY1Rg5ptR6WBK1pyg+zhYWEhSxjXgqJojYBLrHgihi6cTMgzT2RV87yUYJRs8MKBojg + eiIg== +X-Received: by 10.180.9.140 with SMTP id z12mr3172668wia.37.1378092493424; + Sun, 01 Sep 2013 20:28:13 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id z2sm14396586wiv.11.1969.12.31.16.00.00 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sun, 01 Sep 2013 20:28:12 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 0/4] contrib: pick: allow more general format lines +Date: Mon, 2 Sep 2013 04:28:04 +0100 +Message-Id: <1378092488-32050-1-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 02 Sep 2013 03:28:21 -0000 + +Currently pick makes the tree box graphics part of the "subject". This +is rather unsatisfactory: the tree graphics should be a field in their +own right. + +However, there is no mechanism in the current setup for allowing 2 +fields to have fixed combined width but variable individual +width. Thus making the tree graphics a seperate field means that we +cannot keep the current display which is + +date (12 characters) authors (20 characters) tree+subject (54 characters) tags + +We solve this by extending the format specifier. Previously this was a +list of cons cells (field-name . format-string) We now allow the +left-side (the field-name) itself to be a list of cons cells in which case we +apply the formatting recursively. + +This means we can separate the tree box graphics into their own field +while maintaining the current format. + +Note that this will mean that people who have customised the +result-format will need to update their customisation. + +The patch is larger but relatively simple. + +Patch 1/4 is unrelated except I found it while doing this update: we +consistency we should print () for messages with no tags. + +Patch 2/4 is large but trivial: it moves the insertion up a level in +preparation for the recursive formatting. + +Patch 3/4 is also simple: it just allows the recursive formatting. + +Patch 4/4 separates out the tree field. This patch is large as +it allows separate tree faces (matching and non-matching). The +"genuine code" part of the patch is relatively small. + +Finally, this is the last series (apart from some extra tests and +keeping up with mainline progress) that I think pick needs before it's +ready for consideration in non-contrib mainline. + +Best wishes + +Mark + + + +Mark Walters (4): + contrib: pick: print () for a message with no tags + contrib: pick: move the insertion of fields up a level + contrib: pick: allow recursive message field formats + contrib: pick: make the tree graphics a proper part of the format + + contrib/notmuch-pick/notmuch-pick.el | 93 ++++++++++++++++++++++++--------- + 1 files changed, 67 insertions(+), 26 deletions(-) + +-- +1.7.9.1 +