From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id B2B636DE0ABA for ; Wed, 13 Nov 2019 01:35:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.282 X-Spam-Level: X-Spam-Status: No, score=0.282 tagged_above=-999 required=5 tests=[AWL=-0.370, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=0.001] autolearn=disabled 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 zNRo6O3BwqR8 for ; Wed, 13 Nov 2019 01:35:45 -0800 (PST) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by arlo.cworth.org (Postfix) with ESMTPS id 086436DE0265 for ; Wed, 13 Nov 2019 01:35:45 -0800 (PST) Received: by mail-wr1-f67.google.com with SMTP id s5so1523603wrw.2 for ; Wed, 13 Nov 2019 01:35:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=to:cc:subject:in-reply-to:references:from:date:message-id :mime-version; bh=g5Ql/bZF/+hTtY25SJaDVc2J0wW4KElyr9kRFoKbsQk=; b=DvXjIeErA9AMvU+CBIIYAwDlCXH3O65ShPO3eXn9jxWc37PqUij9mAq/g4/Xxdkd7y dxvntfmQ+Tc/wTfa9rjpdc8r6LOW0B6cPGZlKMKDl8C3jpmfFKmNLvFDagDoWGzzgrRu ZuBuRbU3SwIYlPQ8MJzOdLOaBkmb5Yf4m1ivGnsSDbdADkNOAkx5VdmBBGWnJ2xeHDTj F3v+sqhbU7jUPscviyYGJwpCy/i6OvzmXNxDNjFqYx8PbLkKGRFocePP3wQhWTV6StPn jAapvgz7acxWJyBWAKKsGvvuwiyku9Tqinxh9OZz2SYZqtTA1yq5L9+pH0KiaCdnN43K vLdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:subject:in-reply-to:references:from:date :message-id:mime-version; bh=g5Ql/bZF/+hTtY25SJaDVc2J0wW4KElyr9kRFoKbsQk=; b=tdkO+JpcOoaLbz0ADFOXAspLF5nEVlOyqrqLp1XX2hUl5znQbsNjPDBKByxqVsQsi+ 9n3HCx1RVIKLL1ilrzh2pswzHovETpziq+MQB7a1aMcQA9pYPd7RIv9eNAPmtUzimteO 5nbQxrcbk4xz4GFXWUoo31WuIe5AK8W0yTKTNjUBfbSfTelJROmRaHPAMo7VguQZel97 pzU5BVC10DcMWywIQBl4VVZxJtiPWKijScw8HaBP07PPLHZKtCtNwErijTPaDEGP+fMZ WjQhSuOt8kRnv7J1B1uLLs0wn54Fy7TDkD7YTY5i14WPGJ1S8rvnRkPlnYP4sbRTBGRi dZZw== X-Gm-Message-State: APjAAAWhYWvCzn0snWQiPSJu3MwoPAm+7OMbLrkbGt3KUQnm1gfRCFOt 03CfRKGZU60vvw2197cgQ4e85AaEp0g= X-Google-Smtp-Source: APXvYqzdTTkneP49+luZbvxFx6or1toKGZdDx+ed7V5euatmRsKFXHnaAZCuvWQQZYbhgVSqvxsEIw== X-Received: by 2002:adf:fc0a:: with SMTP id i10mr1924179wrr.105.1573637742818; Wed, 13 Nov 2019 01:35:42 -0800 (PST) Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net. [81.149.164.25]) by smtp.gmail.com with ESMTPSA id 200sm1951624wme.32.2019.11.13.01.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2019 01:35:41 -0800 (PST) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 7143209c; Wed, 13 Nov 2019 09:35:40 +0000 (UTC) To: William Casarin , notmuch@notmuchmail.org Cc: Teemu Likonen , Johan Parin , William Casarin Subject: Re: [PATCH] emacs: bind C-u Z to notmuch-tree-from-search-thread In-Reply-To: <20191113080004.32214-1-jb55@jb55.com> References: <20191113080004.32214-1-jb55@jb55.com> X-HGTTG: heart-of-gold From: David Edmondson Date: Wed, 13 Nov 2019 09:35:39 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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: , X-List-Received-Date: Wed, 13 Nov 2019 09:35:47 -0000 On Wednesday, 2019-11-13 at 00:00:04 -08, William Casarin wrote: > This is an unbound function that is quite useful. It opens a selected > thread in notmuch-tree from the current search query. Seems fine to me. Not crazy about the binding, but it will suffice. > Signed-off-by: William Casarin > --- > emacs/notmuch.el | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/emacs/notmuch.el b/emacs/notmuch.el > index 773d1206..b5c361ca 100644 > --- a/emacs/notmuch.el > +++ b/emacs/notmuch.el > @@ -517,10 +517,13 @@ thread." > (concat "*" (truncate-string-to-width subject 30 nil nil t) "*")) > (message "End of search results.")))) > > -(defun notmuch-tree-from-search-current-query () > +(put 'notmuch-tree-from-search-current-query 'notmuch-prefix-doc > + "Show the selected thread with notmuch-tree") > +(defun notmuch-tree-from-search-current-query (&optional search-thread) > "Call notmuch tree with the current query" > - (interactive) > - (notmuch-tree notmuch-search-query-string)) > + (interactive "P") > + (if search-thread (notmuch-tree-from-search-thread) > + (notmuch-tree notmuch-search-query-string))) > > (defun notmuch-tree-from-search-thread () > "Show the selected thread with notmuch-tree" > > base-commit: 7ad7cfbff232431377562271901ee00202bf0bd0 > -- > 2.23.0 dme. -- But he said, leave me alone, I'm a family man.