From b5d64ea0475012d56c7c612a35c6c31bdc42d534 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sun, 6 Sep 2015 12:19:07 +0300 Subject: [PATCH] Re: [PATCH v2] emacs: wrap current search in parens when filtering --- ed/7040d313ea5d25230bcdac81dc0f1cc23668a9 | 96 +++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 ed/7040d313ea5d25230bcdac81dc0f1cc23668a9 diff --git a/ed/7040d313ea5d25230bcdac81dc0f1cc23668a9 b/ed/7040d313ea5d25230bcdac81dc0f1cc23668a9 new file mode 100644 index 000000000..e12bc25c0 --- /dev/null +++ b/ed/7040d313ea5d25230bcdac81dc0f1cc23668a9 @@ -0,0 +1,96 @@ +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 3BDC16DE1A9F + for ; Sun, 6 Sep 2015 02:20:41 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 1.179 +X-Spam-Level: * +X-Spam-Status: No, score=1.179 tagged_above=-999 required=5 tests=[AWL=-0.217, + SPF_NEUTRAL=0.652, URIBL_SBL=0.644, URIBL_SBL_A=0.1] 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 KKAizB-bMSeG for ; + Sun, 6 Sep 2015 02:20:38 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by arlo.cworth.org (Postfix) with ESMTP id 32C726DE1A9E + for ; Sun, 6 Sep 2015 02:20:37 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 35DD3100033; + Sun, 6 Sep 2015 12:19:08 +0300 (EEST) +From: Tomi Ollila +To: Uli Scholler , notmuch@notmuchmail.org +Subject: Re: [PATCH v2] emacs: wrap current search in parens when filtering +In-Reply-To: <87oahgi8ab.fsf@maritornes.cs.unb.ca> +References: <1441231034-9413-1-git-send-email-uli@scholler.net> + <87io7rxj6k.fsf@tardis.scholler.priv> + <87oahgi8ab.fsf@maritornes.cs.unb.ca> +User-Agent: Notmuch/0.20.2+68~g0c35549 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'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 09:20:41 -0000 + +On Sun, Sep 06 2015, David Bremner wrote: + +> 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. + +Yes, naming is hard. I have an additional suggestion: + +notmuch-maybe-group-query-string could be written as +notmuch-group-disjunctive-query-string + +> - The lines get pretty long here. We try to keep code to 80 columns. + +In this case the status quo did not change -- e.g. one line that was +replaced was even longer. Anyway, shorter lines would be welcome +improvements. + +> - 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 --- + +Yes. A good custom is to try to git-am the file before sending if it has +been edited after git format-patch is used to create it -- or even if it +not edited, to catch any indesired "whitespace" etc. additions.. + + +Tomi + +> +>> + (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))) +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2