Currently the elide messages option in notmuch-show.el fetches all messages in the thread (via notmuch-show.c) parses the JSON and throws away all the non-matching messages. This patch removes the entire-thread assumption for format=json from notmuch-show.c. This allows the emacs code to call notmuch-show with out the --entire-thread flag and just receive the matching messages (but with the full thread structure) in return. This makes notmuch-show.c much faster (but in practice this is small anyway) but more importantly substantially improves the speed of the JSON parsing. Rough wall clock timing on my system shows (best case) a 4 second time for showing a large thread (170 messages) reduced to an almost instant time for a single matching message from that thread. For the existing show view the gain is nice but not critical. However, notmuch-pick shows a single message at a time and the speed increase will be needed there. Best wishes Mark Mark Walters (2): emacs/cli: remove entire-thread default from show: JSON emacs: make elide messages use notmuch-show for omitting messages. emacs/notmuch-show.el | 15 +++++++++------ notmuch-show.c | 1 - 2 files changed, 9 insertions(+), 7 deletions(-) -- 1.7.2.3