[PATCH v3 0/2] Allow JSON to use non-entire thread, and use for elide

Mark Walters markwalters1009 at gmail.com
Sat Apr 21 02:15:48 PDT 2012


This is a rebased version of [1] with the bugfix [2] rolled in and the
style change suggested by Adam in [3].

I haven't added any tests yet: there do not seem to be any tests of
threading in JSON currently. I intend to rebase my show-tests [4] (and
can include/add tests for this). Alternatively there are Pieter's
tests [5] of the elide functionality which would test both patches.
Any suggestions on the preferred approach are gratefuly received!


Description of these patches from the previous version:

The first patch allows --entire-thread=false for notmuch-show.c when
the output format is JSON. In the previous version [2] Austin
suggested that we should output an empty message (i.e., {}) for
non-matching messages rather than just omitting them. This version
does that.

Note the first patch is entirely functional without the second.

The second patch uses the first to implement the "elide" functionality
in the emacs interface on the cli-side rather than on the emacs
side. This is substantially faster in some cases. In current emacs
show view it is a relatively small speed-up which is only noticable
with large threads. However, it will be used by notmuch-pick [3] and
there the speed up will be important. (I have a current version of
notmuch-pick which I will submit in the near future.)

[1] id:"1334077496-9172-1-git-send-email-markwalters1009 at gmail.com"
[2] id:"1334090884-13001-1-git-send-email-markwalters1009 at gmail.com"
[3] id:"CAMoJFUuXmLQR+awJnPKg8ZJAKbHbPAmSrEUVoFj_=dZ76WiKzw at mail.gmail.com"
[4] id:"1332171061-27983-1-git-send-email-markwalters1009 at gmail.com"
[5] id:"1329684990-12504-3-git-send-email-pieter at praet.org"

Mark Walters (2):
  cli: make --entire-thread=false work for format=json.
  emacs: make elide messages use notmuch-show for omitting messages.

 emacs/notmuch-show.el |   18 ++++++++++--------
 notmuch-show.c        |   34 +++++++++++++++++++++++++++++-----
 2 files changed, 39 insertions(+), 13 deletions(-)

-- 
1.7.9.1



More information about the notmuch mailing list