From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:f42::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id mIcBFpR0ymH+PgAAsNZ9tg (envelope-from ); Tue, 28 Dec 2021 02:21:08 +0000 Received: from out1.migadu.com ([2001:41d0:2:863f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KJXmFZR0ymEpKQEAauVa8A (envelope-from ); Tue, 28 Dec 2021 03:21:08 +0100 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1640658067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZZiY31A35E/2lQWZ4AZ1szMS2gR+HtNI4tddgH5ee78=; b=Kp7QzQYv26COGtoHJymvnH53xJUYIMtQQQmywej8X94mv7JOIV0wJ5D1orvRKOAC5bkgyA NSrn6AwpOdqc0d8N87UW0/2Gh468pkjACiYHe+kPaq10S1B5kRGgPSfnBcfhwNemMlO6Ts FCpgjvNEPBYvtRw/byk/2YB+zcYHlnu+2/sS16bSLYIcEElBWQDDru6Vk7xHqaNrA3sM7x uz722xy1sm1VAFmLpOMcdvhq5meqp6KpmwdVqMYddotjsT+63RBVSwGaSUPQ7LS1zkYM01 EB+i3DJ42K1KjT6nRB9h5lQIXPbgAatwOrRN+lU3ns+8PInZARsXRNIrzL//wA== From: Kyle Meyer 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 Message-Id: <20211228022037.206597-6-kyle@kyleam.com> In-Reply-To: <20211228022037.206597-1-kyle@kyleam.com> References: <20211228022037.206597-1-kyle@kyleam.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: kyleam.com X-TUID: 7+BfHCSmRBhA 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