From bd6b5d6ec3cf53bad1488353da5236d47fecc10a Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Mon, 2 Sep 2013 04:36:49 +0100 Subject: [PATCH] Re: [PATCH 0/4] contrib: pick: allow more general format lines --- 5d/a6ceb026c732f57f75f1d78dfe14d097252077 | 136 ++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 5d/a6ceb026c732f57f75f1d78dfe14d097252077 diff --git a/5d/a6ceb026c732f57f75f1d78dfe14d097252077 b/5d/a6ceb026c732f57f75f1d78dfe14d097252077 new file mode 100644 index 000000000..e8cf4e9cd --- /dev/null +++ b/5d/a6ceb026c732f57f75f1d78dfe14d097252077 @@ -0,0 +1,136 @@ +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 AC371431FC7 + for ; Sun, 1 Sep 2013 20:37:00 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.098 +X-Spam-Level: +X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 hOZv1xM6SvsY for ; + Sun, 1 Sep 2013 20:36:54 -0700 (PDT) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 63152431FC3 + for ; Sun, 1 Sep 2013 20:36:54 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1VGKwc-00044R-OP; Mon, 02 Sep 2013 04:36:51 +0100 +Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1VGKwc-0004UQ-Hk; Mon, 02 Sep 2013 04:36:50 +0100 +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: Re: [PATCH 0/4] contrib: pick: allow more general format lines +In-Reply-To: <1378092488-32050-1-git-send-email-markwalters1009@gmail.com> +References: <1378092488-32050-1-git-send-email-markwalters1009@gmail.com> +User-Agent: Notmuch/0.15.2+269~g01f5508 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Mon, 02 Sep 2013 04:36:49 +0100 +Message-ID: <87ob8bgai6.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 93.97.24.31 +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: 67ba04f8689df6164b4426ec2eeb35f6 (of first 20000 bytes) +X-SpamAssassin-Score: 0.0 +X-SpamAssassin-SpamBar: / +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored 0.0 points. Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * 0.0 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +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:37:01 -0000 + + +On Mon, 02 Sep 2013, Mark Walters wrote: +> 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. + +I should have added that everything works at each intermediate stage +(and I think each patch makes sense incrementally): so +the patches do not need to be reviewed as a batch. + +Best wishes + +Mark + +> +> 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 -- 2.26.2