aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2021-12-27 21:20:36 -0500
committerKyle Meyer <kyle@kyleam.com>2021-12-28 12:08:35 -0500
commit69201fc7787ea92dbd8afc8b4ce9a40c71981a30 (patch)
tree94be9ea9a42b9727692b14fd19a81989567e9755
parentf56c5e01de855187c7a348ba186b045a6970575c (diff)
downloadpiem-69201fc7787ea92dbd8afc8b4ce9a40c71981a30.tar.gz
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>
-rw-r--r--piem-lei.el5
1 files changed, 5 insertions, 0 deletions
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)