From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0Bi4Dh8XfWOwgAAAbAwnHQ (envelope-from ) for ; Tue, 22 Nov 2022 19:38:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id UCfADh8XfWO52AAAauVa8A (envelope-from ) for ; Tue, 22 Nov 2022 19:38:23 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D7485B799 for ; Tue, 22 Nov 2022 19:38:22 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id EB0115FA1C; Tue, 22 Nov 2022 18:38:19 +0000 (UTC) X-Greylist: delayed 511 seconds by postgrey-1.36 at yantan; Tue, 22 Nov 2022 18:38:17 UTC Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by mail.notmuchmail.org (Postfix) with ESMTPS id 5FCCE5E027 for ; Tue, 22 Nov 2022 18:38:17 +0000 (UTC) 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=1669141786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YBa2HX+qGGOa7gaIkVp0nDWtCllotxvc41drhpqGQ+o=; b=XQHD0dZeEp95kOkVlWBlItlfbSzEHACpc1D9MQQpe97qgZfMu27lpbIfzFtdw8YtUXq5zf jTX/fVgqBv4xanm545PiFBj1J2fNfN/IpF19uUSPBxrpWneXjkVIK191/U92UFo24SUlQw wfgRxR2sPuCt4g1FC3hYRF88okw5WydTY4k+p41YTlx2FXda6osAtez8OW7sbU1YsB6klO VXyD8v39gB21N/KBIXlcTTq+N470lGqHzJVcWbEg4Lh+SnwUZoe/0UvDBp6JEgD2Xt8Yhv wHW1+we3p9YGMDJtfAYkOYw2G/sbgrYhGCNQH7RPI7qaTsQLoxP4xatp4TbSXg== From: Kyle Meyer To: Matt Armstrong Subject: Re: notmuch.el question: reading all messages in thread In-Reply-To: <87bkoyc32t.fsf@rfc20.org> References: <87bkoyc32t.fsf@rfc20.org> Date: Tue, 22 Nov 2022 13:29:42 -0500 Message-ID: <87edtu971l.fsf@kyleam.com> MIME-Version: 1.0 Message-ID-Hash: 3INIWUMVQ6FUR4D7PGC5QRNZ53A2YHS3 X-Message-ID-Hash: 3INIWUMVQ6FUR4D7PGC5QRNZ53A2YHS3 X-MailFrom: kyle@kyleam.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0 CC: notmuch@notmuchmail.org X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669142303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=w/YlvBoq75kW4QxIKSv5dwO8aZumsNt+p8OkL9FQ15Y=; b=B4vt2gSrWba5zxCjj0dmTD94JVgVgul4VG95F2DdQszH4FyS2/gIHLfiG95XCGkiHkjjLx cC+o+eFPx5cf0/VDPSWt9/xDl8wIUIJkR/uMc8fQKJPA3AtqMERLt2PKpAeaFnvYTJaIwo zNRINsebAMBlmvThewKLfFHy3br95Vg0zVIEWtPub7zqhv/gaV5zDW1Igvp0g0zZvoOp97 +V/VNx4r31qptOaALg9cItHGy3A01EJ88yZEJsll+XEw9ulqyQpZKYoLVk+TP47L82r5wn CSaYzJbkx/peWxjqhSRv42GLghMabKO+gYv5qPabCtbICeAdmy4JNabvHGjVLA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669142303; a=rsa-sha256; cv=none; b=pA0+Ruule4DvgeFt+fQXspEzvOxL4LxQk1ht7LMdn24lxmrVXt5CO3wVHwlTv0tJV/gfIH uS2rv5KWeyitJEQpYs4HSmOGQIHTfxZlV2JEIr9MJPClg1XZIT5UBCPEAXoVxuUFjtkfDW XMMQpwCrLyIVNdX14oqgKH3nsi9OzBbWDQkzVQ9k6sLrFm6vvb9xJ14P3pCi6KPFIkEfy/ XhgpV1ZL+nANi6hSPVUu+uC+cIFv7d+vEgYxflQZBaeNj+7oVO9Dd7HfXjC0ql+vjfxgY3 uboQLayZ92pwz+x4ZYVpTjhV87JHs4RfZkPEEeSE5DAEeIWmEVmqoGhXAu6fBw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=kyleam.com header.s=key1 header.b=XQHD0dZe; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 2.46 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=kyleam.com header.s=key1 header.b=XQHD0dZe; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: D7485B799 X-Spam-Score: 2.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: dzeZi6If0QD/ Matt Armstrong writes: [...] > I looked for a way to easily re-query a tree view buffer such that all > messages in all threads shown are "open" but did not find it. Does this > exist? I've wanted something like this too and will be happy if someone points out an existing way to do it. I'm not aware of one. > I suppose I'm looking for the opposite of `notmuch-tree-filter'. Maybe > `notmuch-tree-widen-to-thread' that produces a new notmuch tree widened > to the entire thread of the current message. In show buffers, I remap notmuch-tree-from-show-current-query to a custom function. Like the original variant, it displays the tree for a message's thread, but giving a prefix argument says to display all the messages as "open". I don't think that's exactly what you're asking for, but it still might be useful (at least for adapting to something that behaves as you want). --8<---------------cut here---------------start------------->8--- (defun km/notmuch-thread-id-from-message-id (message-id) (let ((threads (with-temp-buffer (call-process "notmuch" nil t nil "search" "--format=sexp" "--output=threads" message-id) (goto-char (point-min)) (read (current-buffer))))) (cl-case (length threads) (0 (user-error "No thread found for %S" message-id)) (1 (concat "thread:" (car threads))) (t (error "Got multiple threads for %S" message-id))))) ;;;###autoload (defun km/notmuch-tree-from-show-current-query (&optional ignore-context) (interactive "P") (let* ((mid (or (notmuch-show-get-message-id) (error "No message ID found"))) (tid (if (and notmuch-show-thread-id ;; notmuch's variant works with ;; notmuch-show-thread-id ... (string-prefix-p "thread:" notmuch-show-thread-id)) notmuch-show-thread-id ;; ... but there are cases where this is set to the ;; message ID, leading to the tree result that is ;; always narrowed to the message. Try harder to get ;; the actual thread ID. (km/notmuch-thread-id-from-message-id mid))) (notmuch-show-query-context (and (not ignore-context) notmuch-show-query-context))) (notmuch-tree tid notmuch-show-query-context mid))) --8<---------------cut here---------------end--------------->8---