Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.
[notmuch-archives.git] / b3 / 54f940e7a850d0413b6bd47683c947881702fb
1 Return-Path: <amdragon@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 9FB6D429E28\r
6         for <notmuch@notmuchmail.org>; Sat,  4 Jun 2011 08:32:17 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.699\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001,\r
13         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id C8p4RXf6YVXI for <notmuch@notmuchmail.org>;\r
17         Sat,  4 Jun 2011 08:32:17 -0700 (PDT)\r
18 Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com\r
19         [209.85.216.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 04FE0431FB6\r
22         for <notmuch@notmuchmail.org>; Sat,  4 Jun 2011 08:32:16 -0700 (PDT)\r
23 Received: by qwb7 with SMTP id 7so1440803qwb.26\r
24         for <notmuch@notmuchmail.org>; Sat, 04 Jun 2011 08:32:15 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=domainkey-signature:mime-version:sender:in-reply-to:references:date\r
27         :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
28         :content-transfer-encoding;\r
29         bh=IdK578clprBDvNtuvdFEwD1xVe6bbfo2+u78ZGoYy/M=;\r
30         b=l1dA3e6ZOn6ITOxsNUQ0SHRWxDbDe8IYDSG8fNqF/0gUpYBpyw4KZo93p1RDtsM5+c\r
31         k9FAHf3R4V6YWlB7w72SvH51+4enUjKSKSOo4Uk2dUiaR2TdD7J3gzp2rBM2kvFxVuyo\r
32         SDmgB3k62EemAHmN7sSEh3k/epZeTMrcsc3lA=\r
33 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
34         h=mime-version:sender:in-reply-to:references:date\r
35         :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
36         :content-transfer-encoding;\r
37         b=a2bor8p/H/FqTFJwVXnJ3NJNcu5ZDTnbDL6edriWrHnflC1b+bVAWOXWsVSpV7Is91\r
38         zng2FmH+icHONXOSK2dCYD71q/WxQ8MHV0EfF1DiWr+HPtsZC1aBMg+9RmMMYZRFwk0f\r
39         Ad2x712+myCsmHA8CUlegjBOW73GpOwh1yct0=\r
40 MIME-Version: 1.0\r
41 Received: by 10.229.176.170 with SMTP id be42mr2135393qcb.258.1307201535634;\r
42         Sat, 04 Jun 2011 08:32:15 -0700 (PDT)\r
43 Sender: amdragon@gmail.com\r
44 Received: by 10.229.211.148 with HTTP; Sat, 4 Jun 2011 08:32:15 -0700 (PDT)\r
45 In-Reply-To: <1307189970-728-1-git-send-email-daniel.schoepe@googlemail.com>\r
46 References: <1307189970-728-1-git-send-email-daniel.schoepe@googlemail.com>\r
47 Date: Sat, 4 Jun 2011 11:32:15 -0400\r
48 X-Google-Sender-Auth: FG1OlSjAblvhj5WKrwcH9WfBJjA\r
49 Message-ID: <BANLkTimudbqYy8JhGHu67WsOS04mCm0hfA@mail.gmail.com>\r
50 Subject: Re: [PATCH] emacs: Tab completion for notmuch-search and\r
51         notmuch-search-filter\r
52 From: Austin Clements <amdragon@mit.edu>\r
53 To: Daniel Schoepe <daniel.schoepe@googlemail.com>\r
54 Content-Type: text/plain; charset=ISO-8859-1\r
55 Content-Transfer-Encoding: quoted-printable\r
56 Cc: notmuch@notmuchmail.org\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Sat, 04 Jun 2011 15:32:17 -0000\r
70 \r
71 Nifty!\r
72 \r
73 On Sat, Jun 4, 2011 at 8:19 AM, Daniel Schoepe\r
74 <daniel.schoepe@googlemail.com> wrote:\r
75 > + =A0 =A0 =A0 =A0(minibuffer-completion-table (completion-table-dynamic\r
76 > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=\r
77  =A0`(lambda (s) (notmuch-query-completions\r
78 > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=\r
79  =A0 =A0 =A0 =A0 =A0 (quote ,all-compls) s)))))\r
80 > + =A0 =A0;; ^ emulate a closure to avoid recomputing the completion list =\r
81 each time\r
82 \r
83 Dynamic scoping is obnoxious, but I think programmed completion is\r
84 steeped in the assumption that you'll use it.  This code would be much\r
85 simpler if notmuch-query-completions took only `string' and used the\r
86 dynamically-bound all-compls (which should probably be renamed\r
87 notmuch-completions or something if you do this).  Then this could be\r
88 just\r
89   (minibuffer-completion-table (completion-table-dynamic\r
90 #'notmuch-query-completions)))\r
91 and there'd be no need for quasiquoting, comments, and fake lexical scoping=\r
92 .\r
93 \r
94 > +    (define-key keymap (kbd "<tab>") 'minibuffer-complete)\r
95 \r
96 This probably deserves a comment about why you're doing so much work\r
97 to avoid completing-read (which I assume is because it also binds SPC,\r
98 even if require-match is nil, which is unfortunate).\r