discussion and development of piem
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: piem@inbox.kyleam.com
Subject: [PATCH 5/6] lei q: Separate different threads with newline
Date: Mon, 27 Dec 2021 21:20:36 -0500	[thread overview]
Message-ID: <20211228022037.206597-6-kyle@kyleam.com> (raw)
In-Reply-To: <20211228022037.206597-1-kyle@kyleam.com>

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.
---
 piem-lei.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/piem-lei.el b/piem-lei.el
index dedaee20..1c232da2 100644
--- a/piem-lei.el
+++ b/piem-lei.el
@@ -699,6 +699,11 @@ (defun piem-lei-query-threads (query &optional args pt-mid)
                  (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)
-- 
2.34.0


  parent reply	other threads:[~2021-12-28  2:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-28  2:20 [PATCH 0/6] lei q: Support displaying multiple threads Kyle Meyer
2021-12-28  2:20 ` [PATCH 1/6] lei q: Allow initial input for query to be customized Kyle Meyer
2021-12-28  2:20 ` [PATCH 2/6] lei q: Extract buffer names to variables Kyle Meyer
2021-12-28  2:20 ` [PATCH 3/6] lei q: Support displaying multiple threads Kyle Meyer
2021-12-28 16:03   ` Xinglu Chen
2021-12-28 17:26     ` Kyle Meyer
2021-12-28  2:20 ` [PATCH 4/6] lei q: Add date placeholder for ghost messages Kyle Meyer
2021-12-28  2:20 ` Kyle Meyer [this message]
2021-12-28  2:20 ` [PATCH 6/6] lei q: Sort threads by date of initial message Kyle Meyer
2021-12-28 17:24   ` Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://git.kyleam.com/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211228022037.206597-6-kyle@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=piem@inbox.kyleam.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.kyleam.com/piem/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).