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 EPUZBKqMAmPytgAAbAwnHQ (envelope-from ) for ; Sun, 21 Aug 2022 21:51:06 +0200 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 2Ez/A6qMAmNegwAAauVa8A (envelope-from ) for ; Sun, 21 Aug 2022 21:51:06 +0200 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 6CBC83EDD9 for ; Sun, 21 Aug 2022 21:51:05 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id C9BCF5E022; Sun, 21 Aug 2022 19:51:02 +0000 (UTC) Received: from meesny.iki.fi (meesny.iki.fi [IPv6:2001:67c:2b0:1c1::201]) by mail.notmuchmail.org (Postfix) with ESMTPS id B64E15E00E for ; Sun, 21 Aug 2022 19:50:59 +0000 (UTC) Received: from c53 (gw1.nor.fi [185.218.193.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: too) by meesny.iki.fi (Postfix) with ESMTPSA id 302BA2005B; Sun, 21 Aug 2022 22:50:57 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1661111457; 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=wvH867boZJtAZPvpsA7cGHOYfHRySHmXHClEYbcwESs=; b=ikPYYFbsRTCtnp+qOC4ALGgKhW/+oroeWlfX6dLelyI/yLQZiDwtRai97TwbZDen6K7NWZ wAgmqu5hseMCkzZszi4N91auyeL2LItNnw4oJdYjBdhRClVI7aOmVcNjKo62fus/0//h8u DPMyuwm0rOvACXfHBPQwmQApp8htJ08= From: Tomi Ollila To: jao , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: new notmuch-tree-process-exit-functions In-Reply-To: <20220821030618.2935554-1-jao@gnu.org> References: <20220821030618.2935554-1-jao@gnu.org> User-Agent: Notmuch/0.36+55~gfb9633d (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1661111457; 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=wvH867boZJtAZPvpsA7cGHOYfHRySHmXHClEYbcwESs=; b=bBwq5B6l5zJPD4UkiX1bNyGAU+r9aKBj57RblSQO5NpuNzOxBUhuvNaqujSWFKZPRa03rr nJ0O4HoRbuVZynDyxdaMdJJA8UCj+fE+Iba2qx2U87jOGF+St3btSVVdGl/5stKy9m3NPl hgUYdzcdQ5zirbkECer45nRzeQEtHHE= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1661111457; a=rsa-sha256; cv=none; b=CuxuFjP1Ri8pXsqoBKk5rkAr2OLZDkFBPYMUFtuiMM70jjNdZKc1CRl0QM2V/T534q6Ze0 5lXv049Qv/EcQf5Co+cZ5NwsWE+8bTda/KuzNKCkzsj9m7x/SJSvNds2JmiCPdt3rXqdEt 5lrIm7IFkPw0yBDOvK+4I6Qv/Cva90c= Message-ID-Hash: Q2IDUPEDO45PRRBASWTQBDXGGRJDNE3I X-Message-ID-Hash: Q2IDUPEDO45PRRBASWTQBDXGGRJDNE3I X-MailFrom: tomi.ollila@iki.fi X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: jao 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-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1661111465; 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=npRP2fyVw66DMwT8zvsehIzRDwHMtzOXENPldtJZ+nE=; b=lsj6LwDb/Jcd2qUQbLFyvoFBshQ9JNnSCp3S2JBsoHc7EYjvuF1LWm1nUEmz5N5QD+7VLG /7NbtPclnfzs82qSSHMfhHety5IWwOnqgc3DCijhVvVHQ0vKYBQ2zXCHrT8vqsawhAHD53 15l7LcGiOuv/ph0weFlH94toR9+amj3HTZvMRS1ar5afoCo2LHr8dZa/O2YZzbz5E2QzlT vAdwO+wm0Ucio1D9vblu9NHTH0QtlLfXmtGHGddM5adyJNmIobME4Df9htI545yG6anhkM fpx3sCpQPVzYQ47azRHfBWWXsnkvkbV0BbxJVTVftr9l7PoZ0mK3IyAx/HJ02A== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1661111465; a=rsa-sha256; cv=fail; b=F0qebHEzhnlbbSKRkBXweTV1/qkRLFRJ3kPb3M2IjAVvzGXNtFT0WUNAEBU1zG/FQw72R4 FrJYScxqu8vp/mCjUSyVImzcbuvaB8Alal1hr9r7N4rkwgrmhy2ZhRfRrlI+MXvU9Wyb7F LNedMyMP6T3NzzKFJsVkCbDLPNQ42ntvAX/abF/3Va9kBdUQfS8k5qRJ6h6oYM2BMGiB6t PfYXHFqdmngXujxUFVYOougekPCnsxKB0MZutdaE7+X8Qui3jiFyGTsN2QSiNOt6a9zeCX ulvlyEJU9jyTiIV33E6T58BbP39oGlLZSWtaIHMT9FPLijBMew7hU/uTIsxwwg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=meesny header.b=ikPYYFbs; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); 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.61 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=meesny header.b=ikPYYFbs; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); 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: 6CBC83EDD9 X-Spam-Score: 2.61 X-Migadu-Scanner: scn1.migadu.com X-TUID: Cp1jN2n+clPV On Sun, Aug 21 2022, jao@gnu.org wrote: > Hook run when the tree insertion process finishes its job. > > -- LGTM. I (also would have chosen this name instead of the *sentinel* one) Tomi > This patch supersedes , but > changing the new variable name. > > Right now, it can be used for silly things like removing or changing > the the "End of search." hardcoded message in the tree buffer. But > also for more sophisticated things like folding all threads in add-ons > like my outline mode for tree buffers (to be submitted). > > Signed-off-by: jao > --- > emacs/notmuch-tree.el | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el > index f63ac9a5..7ceddee2 100644 > --- a/emacs/notmuch-tree.el > +++ b/emacs/notmuch-tree.el > @@ -1084,6 +1084,12 @@ Complete list of currently available key bindings: > (setq buffer-read-only t) > (setq truncate-lines t)) > > +(defvar notmuch-tree-process-exit-functions nil > + "Functions called when the process inserting a tree of results finishes. > + > +Functions in this list are called with one argument, the process > +object, and with the tree results buffer as the current buffer.") > + > (defun notmuch-tree-process-sentinel (proc _msg) > "Add a message to let user know when \"notmuch tree\" exits." > (let ((buffer (process-buffer proc)) > @@ -1102,7 +1108,8 @@ Complete list of currently available key bindings: > (insert "End of search results.") > (unless (= exit-status 0) > (insert (format " (process returned %d)" exit-status))) > - (insert "\n"))))))))) > + (insert "\n")))) > + (run-hook-with-args 'notmuch-tree-process-exit-functions proc)))))) > > (defun notmuch-tree-process-filter (proc string) > "Process and filter the output of \"notmuch show\" for tree view." > -- > 2.37.2 > > _______________________________________________ > notmuch mailing list -- notmuch@notmuchmail.org > To unsubscribe send an email to notmuch-leave@notmuchmail.org