Re: [PATCH v3] nmbug: Translate to Python
[notmuch-archives.git] / 4e / 7ae35aab6c2243cd81326182cf96b0a3f59d81
1 Return-Path: <dmitry.kurochkin@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 9CE60429E26\r
6         for <notmuch@notmuchmail.org>; Fri, 16 Dec 2011 10:37:42 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, 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 9Rvmqo9M5qsf for <notmuch@notmuchmail.org>;\r
17         Fri, 16 Dec 2011 10:37:42 -0800 (PST)\r
18 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
19  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
20  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
21  D5205431FD0    for <notmuch@notmuchmail.org>; Fri, 16 Dec 2011 10:37:41 -0800\r
22  (PST)\r
23 Received: by wgbds13 with SMTP id ds13so5329995wgb.2\r
24         for <notmuch@notmuchmail.org>; Fri, 16 Dec 2011 10:37:40 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
27         :mime-version:content-type;\r
28         bh=zH+9eRsMpS7OzKOiMKtPziNnI4jJc1nPgS1/Oz60RkY=;\r
29         b=IGiLfwnu9D8f7+pwgP3cUnFIwL74LvnM4lflEWw1M+jfGh7Djmmts/qkCkhooGjtE+\r
30         D3osx6b7yZEQ0Aj2t+P57eGX/RryCke5iryIn+kSyNtESHfSAPW29CGfMbMgRrbMbuZ0\r
31         ZiDEXdIxvt7fIfKm0pWQCKRpwXMQv4BJI7WLY=\r
32 Received: by 10.227.197.70 with SMTP id ej6mr6469270wbb.13.1324060660489;\r
33         Fri, 16 Dec 2011 10:37:40 -0800 (PST)\r
34 Received: from localhost ([91.144.186.21])\r
35         by mx.google.com with ESMTPS id di5sm14182720wib.3.2011.12.16.10.37.38\r
36         (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Fri, 16 Dec 2011 10:37:39 -0800 (PST)\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
39 To: Thomas Jost <schnouki@schnouki.net>, notmuch@notmuchmail.org\r
40 Subject: Re: [PATCH v3 4/4] emacs: add notmuch-hello-hook\r
41 In-Reply-To: <87zkewuzub.fsf@gmail.com>\r
42 References: <87d3cx2t38.fsf@rocinante.cs.unb.ca>\r
43         <1323797532-597-1-git-send-email-schnouki@schnouki.net>\r
44         <1323797532-597-5-git-send-email-schnouki@schnouki.net>\r
45         <87zkewuzub.fsf@gmail.com>\r
46 User-Agent: Notmuch/0.10.2+96~g74e5ae5 (http://notmuchmail.org) Emacs/23.3.1\r
47         (x86_64-pc-linux-gnu)\r
48 Date: Fri, 16 Dec 2011 22:36:59 +0400\r
49 Message-ID: <877h1ws6r7.fsf@gmail.com>\r
50 MIME-Version: 1.0\r
51 Content-Type: text/plain; charset=us-ascii\r
52 X-BeenThere: notmuch@notmuchmail.org\r
53 X-Mailman-Version: 2.1.13\r
54 Precedence: list\r
55 List-Id: "Use and development of the notmuch mail system."\r
56         <notmuch.notmuchmail.org>\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
60 List-Post: <mailto:notmuch@notmuchmail.org>\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
64 X-List-Received-Date: Fri, 16 Dec 2011 18:37:42 -0000\r
65 \r
66 On Tue, 13 Dec 2011 21:49:00 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:\r
67 > On Tue, 13 Dec 2011 18:32:12 +0100, Thomas Jost <schnouki@schnouki.net> wrote:\r
68 > > This hook is called every time the notmuch-hello buffer is updated.\r
69 > > ---\r
70 > >  emacs/notmuch-hello.el |    9 ++++++++-\r
71 > >  1 files changed, 8 insertions(+), 1 deletions(-)\r
72 > > \r
73 > > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
74 > > index 0fe9c1d..112b40b 100644\r
75 > > --- a/emacs/notmuch-hello.el\r
76 > > +++ b/emacs/notmuch-hello.el\r
77 > > @@ -131,6 +131,11 @@ So:\r
78 > >       (integer :tag "Number of characters")\r
79 > >       (float :tag "Fraction of window")))\r
80 > >  \r
81 > > +(defcustom notmuch-hello-hook nil\r
82 > > +  "Functions called after populating a `notmuch-hello' buffer."\r
83 > > +  :type 'hook\r
84 > > +  :group 'notmuch)\r
85 > > +\r
86 > >  (defcustom notmuch-thousands-separator ","\r
87 > >    "The string used as a thousands separator.\r
88 > >  \r
89 > > @@ -579,7 +584,9 @@ Complete list of currently available key bindings:\r
90 > >       (widget-forward 1)))\r
91 > >  \r
92 > >        (unless (widget-at)\r
93 > > -   (notmuch-hello-goto-search)))))\r
94 > > +   (notmuch-hello-goto-search))\r
95 > > +\r
96 > > +      (run-hooks 'notmuch-hello-hook))))\r
97 > >  \r
98\r
99 > I spent some time finding out why run-hooks are not on the top level.\r
100 > Turns out it is inside two let statements.  Can we move to the top level\r
101 > of `notmuch-hello' to make it clear that it is always run (i.e. there\r
102 > are no ifs or whens)?\r
103\r
104 \r
105 In addition to the above comment: I think we should rename\r
106 notmuch-hello-hook to notmuch-hello-refresh-hook.  That would make it\r
107 clear that the hook runs on each notmuch-hello buffer update.  And would\r
108 avoid confusion with notmuch-hello-mode-hook if we add it later.\r
109 \r
110 Regards,\r
111   Dmitry\r
112 \r
113 > BTW this would replace one of the oldest custom patches which I have in\r
114 > my master branch :)\r
115\r
116 > Regards,\r
117 >   Dmitry\r
118\r
119 > >  (defun notmuch-folder ()\r
120 > >    "Deprecated function for invoking notmuch---calling `notmuch' is preferred now."\r
121 > > -- \r
122 > > 1.7.8\r
123 > > \r
124 > > _______________________________________________\r
125 > > notmuch mailing list\r
126 > > notmuch@notmuchmail.org\r
127 > > http://notmuchmail.org/mailman/listinfo/notmuch\r