aboutsummaryrefslogtreecommitdiff
path: root/post-applypatch
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2021-12-27 21:20:34 -0500
committerKyle Meyer <kyle@kyleam.com>2021-12-28 12:08:35 -0500
commit601d79ec752dba957f4a27b993280bc1499676ef (patch)
treeacf3b3a0f56d3c320cb9d72ea922c98788379a92 /post-applypatch
parent8cb30023c1fbf7049cedb8df29dec8c42a332697 (diff)
downloadpiem-601d79ec752dba957f4a27b993280bc1499676ef.tar.gz
lei q: Support displaying multiple threads
piem-lei-query shows unthreaded results. From there, piem-lei-query-thread can be used to show the entire thread for that result. This design is driven largely by my use of Notmuch, where I call notmuch-search and then follow up with a custom variant of notmuch-tree to show _one_ thread. However, users familiar with notmuch-tree probably expect to be able to display _multiple_ threads. piem-lei-query--thread already returns a list of threads, so it really just needs to be exposed at the command level. Update piem-lei-query-thread to make it handle a general query, renaming it slightly to make it clearer that the command now supports displaying multiple threads. Then, add a wrapper piem-lei-mid-thread that handles the old "single thread for a given MID" behavior. Rather than adding another suffix command to the lei-q transient (piem-lei-query-threads in addition to the existing piem-lei-query), I considered adding --threads to the transient and then having piem-lei-query check whether it's in the arguments. Conceptually, I dislike that because it conflates threaded _display_ with lei's --threads behavior that's instead about whether to include other messages from a match's thread in the results. Also, it'd mean some downstream handling of piem-lei-buffer-args (e.g., by piem-lei-query-show) would be complicated by the need to filter out --threads. Note that piem-lei-query-thread no longer sets piem-lei-buffer-mid because the buffer is no longer tied to a single message ID, which is okay because, unlike in show buffers, the value isn't actually used. Suggested-by: Xinglu Chen <public@yoctocell.xyz> Link: https://inbox.kyleam.com/piem/871r96am1q.fsf@yoctocell.xyz Message-Id: <20211228022037.206597-4-kyle@kyleam.com>
Diffstat (limited to 'post-applypatch')
0 files changed, 0 insertions, 0 deletions