Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / db / eff9d999f725eedc8fb92f811405bb961c50b6
1 Return-Path: <aclements@csail.mit.edu>\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 11125431E64\r
6         for <notmuch@notmuchmail.org>; Mon, 22 Sep 2014 11:57:12 -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: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id yJvS-w2GD3jM for <notmuch@notmuchmail.org>;\r
16         Mon, 22 Sep 2014 11:57:08 -0700 (PDT)\r
17 Received: from outgoing.csail.mit.edu (outgoing.csail.mit.edu [128.30.2.149])\r
18         by olra.theworths.org (Postfix) with ESMTP id 8A75C431FB6\r
19         for <notmuch@notmuchmail.org>; Mon, 22 Sep 2014 11:57:08 -0700 (PDT)\r
20 Received: from [104.131.20.129] (helo=awakeningjr)\r
21         by outgoing.csail.mit.edu with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)\r
22         (Exim 4.72) (envelope-from <aclements@csail.mit.edu>)\r
23         id 1XW8nM-0007El-2D; Mon, 22 Sep 2014 14:57:08 -0400\r
24 Received: from amthrax by awakeningjr with local (Exim 4.84)\r
25         (envelope-from <aclements@csail.mit.edu>)\r
26         id 1XW8nL-00079Z-EA; Mon, 22 Sep 2014 18:57:07 +0000\r
27 From: Austin Clements <aclements@csail.mit.edu>\r
28 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org\r
29 Subject: Re: [PATCH] emacs: jump: fix compile warning on emacs 23\r
30 In-Reply-To: <1409824014-14622-1-git-send-email-markwalters1009@gmail.com>\r
31 References: <1409824014-14622-1-git-send-email-markwalters1009@gmail.com>\r
32 User-Agent: Notmuch/0.18.1+86~gef5e66a (http://notmuchmail.org) Emacs/24.3.1\r
33         (x86_64-pc-linux-gnu)\r
34 Date: Mon, 22 Sep 2014 18:57:07 +0000\r
35 Message-ID: <87fvfj1o1o.fsf@csail.mit.edu>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Mon, 22 Sep 2014 18:57:12 -0000\r
51 \r
52 LGTM.  I'm a little surprised this is necessary, but whatever.\r
53 \r
54 I think the eval-and-compile has to be top-level; it's certainly not\r
55 wrong for it to be top-level.  (I like the comment in the\r
56 eval-and-compile implementation: ";; Remember, it's magic.")\r
57 \r
58 On Thu, 04 Sep 2014, Mark Walters <markwalters1009@gmail.com> wrote:\r
59 > notmuch-jump uses window-body-width which is not defined in emacs\r
60 > 23. To get around this it does\r
61 >\r
62 > (unless (fboundp 'window-body-width)\r
63 >   ;; Compatibility for Emacs pre-24\r
64 >   (defalias 'window-body-width 'window-width))\r
65 >\r
66 > This makes sure window-body-width is defined and all should be\r
67 > well. But it seems that the byte compiler does not realise that this\r
68 > guarantees that window-body-width will be defined and so, when\r
69 > compiling with emacs 23, it gives an error\r
70 >\r
71 > In end of data:\r
72 > notmuch-jump.el:172:1:Warning: the function `window-body-width' is not known to be defined.\r
73 >\r
74 > Domo and I came to following on irc: wrap the (unless (fboundp ...))\r
75 > inside eval-and-compile which ensures that both the test and the\r
76 > defalias (if needed) happen at both compile and load time.  This fixes\r
77 > the warning.\r
78 > ---\r
79 > I think Domo and I were both not completely sure whether the\r
80 > eval-and-compile should be inside or outside the (unless fboundp ..)\r
81 > or not (ie should it wrap the unless fboundp or just the defalias) nor\r
82 > whether it should be eval-and-compile or eval-when-compile.\r
83 >\r
84 > We think this is the right version but it would be good to have confirmation.\r
85 >\r
86 > I tested notmuch jump inside emacs 23 and 24 with notmuch-emacs\r
87 > compiled with emacs 23 or 24 (ie all four combinations) and it seemed to work.\r
88 >\r
89 > Best wishes\r
90 >\r
91 > Mark\r
92 >\r
93 >\r
94 >\r
95 >  emacs/notmuch-jump.el |    7 ++++---\r
96 >  1 file changed, 4 insertions(+), 3 deletions(-)\r
97 >\r
98 > diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el\r
99 > index 5eb0949..2706b6c 100644\r
100 > --- a/emacs/notmuch-jump.el\r
101 > +++ b/emacs/notmuch-jump.el\r
102 > @@ -25,9 +25,10 @@\r
103 >  (require 'notmuch-lib)\r
104 >  (require 'notmuch-hello)\r
105 >  \r
106 > -(unless (fboundp 'window-body-width)\r
107 > -  ;; Compatibility for Emacs pre-24\r
108 > -  (defalias 'window-body-width 'window-width))\r
109 > +(eval-and-compile\r
110 > +  (unless (fboundp 'window-body-width)\r
111 > +    ;; Compatibility for Emacs pre-24\r
112 > +    (defalias 'window-body-width 'window-width)))\r
113 >  \r
114 >  ;;;###autoload\r
115 >  (defun notmuch-jump-search ()\r
116 > -- \r
117 > 1.7.10.4\r
118 >\r
119 > _______________________________________________\r
120 > notmuch mailing list\r
121 > notmuch@notmuchmail.org\r
122 > http://notmuchmail.org/mailman/listinfo/notmuch\r