From 69201fc7787ea92dbd8afc8b4ce9a40c71981a30 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 27 Dec 2021 21:20:36 -0500 Subject: lei q: Separate different threads with newline For piem-lei-query-threads output with multiple threads, add a newline to make it easier to spot the start of a new thread. In terms of presentation, I think it would also be nice to distinguish search hits in the thread from other messages. For local messages, pct could be used to do this, but punt on that for now. Message-Id: <20211228022037.206597-6-kyle@kyleam.com> --- piem-lei.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/piem-lei.el b/piem-lei.el index dedaee2..1c232da 100644 --- a/piem-lei.el +++ b/piem-lei.el @@ -699,6 +699,11 @@ that line." (children (piem-lei-msg-children msg)) (depth (1+ (or (cdr (assoc (piem-lei-msg-parent msg) depths)) -1)))) + (when (and (equal depth 0) + (not (bobp))) + ;; Add newline between threads to make different threads + ;; easier to distinguish. + (insert ?\n)) (when children (setq msgs (append children msgs))) (push (cons msg depth) depths) -- cgit v1.2.3