From a13631229636e2396b5c2ed89f75cfc78b31629a Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 6 Sep 2015 23:35:56 +2100 Subject: [PATCH] Re: [PATCH v2] emacs: wrap current search in parens when filtering --- b5/6ebfa93ef3356610750e34128051942abb46b7 | 72 +++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 b5/6ebfa93ef3356610750e34128051942abb46b7 diff --git a/b5/6ebfa93ef3356610750e34128051942abb46b7 b/b5/6ebfa93ef3356610750e34128051942abb46b7 new file mode 100644 index 000000000..412b51604 --- /dev/null +++ b/b5/6ebfa93ef3356610750e34128051942abb46b7 @@ -0,0 +1,72 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 8CA816DE0C51 + for ; Sat, 5 Sep 2015 19:37:09 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.115 +X-Spam-Level: +X-Spam-Status: No, score=0.115 tagged_above=-999 required=5 tests=[AWL=0.115] + 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 vBvKlrqxGOSe for ; + Sat, 5 Sep 2015 19:37:06 -0700 (PDT) +Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224]) + by arlo.cworth.org (Postfix) with ESMTPS id 7365E6DE0AC2 + for ; Sat, 5 Sep 2015 19:37:05 -0700 (PDT) +Received: from remotemail by gitolite.debian.net with local (Exim 4.80) + (envelope-from ) + id 1ZYPoX-00060k-AY; Sun, 06 Sep 2015 02:36:17 +0000 +Received: (nullmailer pid 12152 invoked by uid 1000); Sun, 06 Sep 2015 + 02:35:56 -0000 +From: David Bremner +To: Uli Scholler , notmuch@notmuchmail.org +Subject: Re: [PATCH v2] emacs: wrap current search in parens when filtering +In-Reply-To: <87io7rxj6k.fsf@tardis.scholler.priv> +References: <1441231034-9413-1-git-send-email-uli@scholler.net> + <87io7rxj6k.fsf@tardis.scholler.priv> +User-Agent: Notmuch/0.20.2+60~gcb08a2e (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Sat, 05 Sep 2015 23:35:56 -0300 +Message-ID: <87oahgi8ab.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +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: Sun, 06 Sep 2015 02:37:09 -0000 + + +Some pretty fussy comments follow. Probably I could have fixed these in +the time it took to write this message ;). + +Uli Scholler writes: +> + (let ((grouped-query (notmuch-maybe-group-query-string query)) +> + (grouped-search-query (notmuch-maybe-group-query-string notmuch-search-query-string))) + +- I didn't find it very obvious which of these introduced variables was + which. I thought maybe "grouped-original-query" for the second + one. It's pretty subjective though, so your call. + +- The lines get pretty long here. We try to keep code to 80 columns. + +- Your revised patch isn't in quite the right format for git am; + the actual commit message get's lost. The unintuitive trick is to add + commentary in the patch after the --- + +> + (notmuch-search (if (string= grouped-search-query "*") +> grouped-query +> - (concat notmuch-search-query-string " and " grouped-query)) notmuch-search-oldest-first))) +> + (concat grouped-search-query " and " grouped-query)) notmuch-search-oldest-first))) -- 2.26.2