[PATCH 0/4] contrib: pick: allow more general format lines

Mark Walters markwalters1009 at gmail.com
Sun Sep 1 20:36:49 PDT 2013


On Mon, 02 Sep 2013, Mark Walters <markwalters1009 at gmail.com> 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


More information about the notmuch mailing list