From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MLrTD6od1F5+JAAA0tVLHw (envelope-from ) for ; Sun, 31 May 2020 21:12:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GPGkC6od1F62UQAAbx9fmQ (envelope-from ) for ; Sun, 31 May 2020 21:12:10 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D321C940415 for ; Sun, 31 May 2020 21:12:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 2FD646DE0F22; Sun, 31 May 2020 14:12:03 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AbdB1YlAu9wT; Sun, 31 May 2020 14:12:02 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id CF6A36DE0F34; Sun, 31 May 2020 14:12:01 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id A5F926DE0F34 for ; Sun, 31 May 2020 14:12:00 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OLH7eWu8motz for ; Sun, 31 May 2020 14:11:59 -0700 (PDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) by arlo.cworth.org (Postfix) with ESMTPS id 96F236DE0F22 for ; Sun, 31 May 2020 14:11:59 -0700 (PDT) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id C0F281B00121 for ; Mon, 1 Jun 2020 00:11:57 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1590959517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OICfXep7sD5sYRAzSj+yTpDcGbk1xrIrlv4AltCxAFE=; b=tVTbZB7wWhBCOhHXVEXkljZKBhAAiGnVVx8tGoN7W8X2864VW3jz7wVVxqNwHWraMfymjM 9Ga9QQ/qVA9xdfLFTvvgh44vd+BS+OzHDbJGWw3AhtXpt5RpyeN1Yo7wNq9w7oaA5DgmC5 1kbXf+/BoJKybaM9NA8RSB/K9XG7k8K/yQ861nMZ+P9+Yawg/qLzjcsnVSlEHR4q1smRjs N9I2V54q4q8GqXuKujNIqcZOLJ3zLP08ccr4IuXu3nuXoVyrYUgMUa6Zigsc6XK/mi4I0L fq7hGyuclS86BdlAo1DzufR3JxrPmAUTPFcJYStZkVnsqcblk+Zc5zBjrwoHFA== From: Tomi Ollila To: notmuch@notmuchmail.org Subject: Re: [PATCH] emacs/tree: add notmuch-tree-filter In-Reply-To: <20200425194234.17971-1-jb55@jb55.com> References: <20200425194234.17971-1-jb55@jb55.com> User-Agent: Notmuch/0.28.3+84~g41389bb (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1590959517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OICfXep7sD5sYRAzSj+yTpDcGbk1xrIrlv4AltCxAFE=; b=njojjga/7rDxatL8acx8tt3W/et3rC6NeRnzPmP9g+48ZcGrQuaMtmetHLXe5UJQMDbdcl THiEsCYXEj7jcmYsasK0c0v6PCHWXz8TSwq8csAp/3sGDCpzaLYaybYf5eSujl9cGvn09q tE/HvjKDujTRD8xofsY+UKNHndgWlU0tPqjfNhqn/+9X9pHZ3d+A6sXxboHxVTnY7zyLKm nbdqxyxTrW0wWgoh3zFhupUb8dGFhXcyPM1l4fhQNBC6Ex/nJHlN5SCQwJusnyXtKTTam8 DUPkdHahO92dC65qm6GKpZ7Od86Gae+31HP2i0qtvy+br6jRzkZ6fnx2w1LJlA== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1590959517; a=rsa-sha256; cv=none; b=ixnhWbx75qJyzfZ581JYRV9LaAi7v+YG/4C8iXTLBQmR376Ksaz2dE77SO2dhAhNncbQBD yfCMOaohHu0xa+tZvzy2zTh39sCeGFXmxQPU5wsITjqUiMbfniKIz6bsVJ2PSYrSpSjYes FVoA6xYAs1qMqndtzFxDP8XNlubPjled/iPQRodQ124t9/5lsYQGbaZdXOyPUbsunp/UK/ CfZ1em4cYIQLjY9cmHgOKcx85/BbUCw9xCdxCh3sL4WNAkoV4FhEaEighPMZ4NK+Xxa0Vr TeCUrSkSSvME59vvwvSPEwtjQCKs/qDDr6tzsD+FYo3wJfo5JlORAJqJjzpY3g== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=iki.fi header.s=lahtoruutu header.b=tVTbZB7w; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 1.99 X-TUID: VskDQAXrimMt On Sat, Apr 25 2020, William Casarin wrote: > This implements the notmuch-tree version of notmuch-show-filter-thread > and binds it to the L key. No reasoning in commit message why 'L' is chosen... Tomi > > Signed-off-by: William Casarin > --- > emacs/notmuch-tree.el | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el > index e5c23de2..8f7738d7 100644 > --- a/emacs/notmuch-tree.el > +++ b/emacs/notmuch-tree.el > @@ -328,6 +328,7 @@ FUNC." > (define-key map "p" 'notmuch-tree-prev-matching-message) > (define-key map "N" 'notmuch-tree-next-message) > (define-key map "P" 'notmuch-tree-prev-message) > + (define-key map "L" 'notmuch-tree-filter) > (define-key map (kbd "M-p") 'notmuch-tree-prev-thread) > (define-key map (kbd "M-n") 'notmuch-tree-next-thread) > (define-key map "k" 'notmuch-tag-jump) > @@ -965,6 +966,14 @@ Complete list of currently available key bindings: > (insert (format " (process returned %d)" exit-status))) > (insert "\n"))))))))) > > +(defun notmuch-tree-filter (query) > + "Filter or LIMIT the current tree based on a new query string. > + > +Reshows the current tree with matches defined by the new query-string." > + (interactive (list (notmuch-read-query "Filter tree: "))) > + (setq notmuch-tree-query-context (if (string= query "") nil query)) > + (notmuch-tree-refresh-view t)) > + > (defun notmuch-tree-process-filter (proc string) > "Process and filter the output of \"notmuch show\" for tree view" > (let ((results-buf (process-buffer proc)) > -- > 2.25.1