Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 47 / 91687c473841d9575e95a1465f51ee119d6097
1 Return-Path: <tomi.ollila@iki.fi>\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 22012431FBD\r
6         for <notmuch@notmuchmail.org>; Wed, 25 Jul 2012 02:17:40 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 T1W6oG05hfJE for <notmuch@notmuchmail.org>;\r
16         Wed, 25 Jul 2012 02:17:39 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 1B9F5431FAF\r
19         for <notmuch@notmuchmail.org>; Wed, 25 Jul 2012 02:17:39 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 7B0DE1000E5; Wed, 25 Jul 2012 12:17:48 +0300 (EEST)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org\r
24 Subject: Re: [PATCH 1/5] emacs: compile and load notmuch-pick.el if present.\r
25 In-Reply-To: <1343164911-31589-2-git-send-email-markwalters1009@gmail.com>\r
26 References: <1343164911-31589-1-git-send-email-markwalters1009@gmail.com>\r
27         <1343164911-31589-2-git-send-email-markwalters1009@gmail.com>\r
28 User-Agent: Notmuch/0.13.2+97~g7dcb4ce (http://notmuchmail.org) Emacs/23.1.1\r
29         (x86_64-redhat-linux-gnu)\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
31         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
32         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
33 Date: Wed, 25 Jul 2012 12:17:48 +0300\r
34 Message-ID: <m2ipdcqjwj.fsf@guru.guru-group.fi>\r
35 MIME-Version: 1.0\r
36 Content-Type: text/plain; charset=us-ascii\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Wed, 25 Jul 2012 09:17:40 -0000\r
50 \r
51 On Wed, Jul 25 2012, Mark Walters <markwalters1009@gmail.com> wrote:\r
52 \r
53 > Compile and load notmuch-pick.el if present.\r
54 >\r
55 > All the actual setup of pick is done in the function notmuch-pick-init\r
56 > so we call that in the notmuch init function if it is bound. This\r
57 > function will setup all extra keybinding etc.\r
58 \r
59 Great stuff! See a few thoughts below...\r
60 \r
61 > ---\r
62 >  emacs/Makefile.local |    3 ++-\r
63 >  emacs/notmuch.el     |    5 +++++\r
64 >  2 files changed, 7 insertions(+), 1 deletions(-)\r
65 >\r
66 > diff --git a/emacs/Makefile.local b/emacs/Makefile.local\r
67 > index fb82247..9f4dba6 100644\r
68 > --- a/emacs/Makefile.local\r
69 > +++ b/emacs/Makefile.local\r
70 > @@ -15,7 +15,8 @@ emacs_sources := \\r
71 >       $(dir)/notmuch-crypto.el \\r
72 >       $(dir)/notmuch-tag.el \\r
73 >       $(dir)/coolj.el \\r
74 > -     $(dir)/notmuch-print.el\r
75 > +     $(dir)/notmuch-print.el \\r
76 > +     $(wildcard $(dir)/notmuch-pick.el)\r
77 \r
78 I wonder whether having this conditional is good idea. What if\r
79 someone copies (or (sym)links) notmuch-pick.el there and then\r
80 compiles and takes to use. Next time he takes clean tree and\r
81 forgets to do this copying and installs to the same destination.\r
82 Now there is old notmuch-pick.elc which might be out of sync.\r
83 \r
84 I think it would be better to provide a shell script in \r
85 notmuch-pick directory which byte-compiles and installs notmuch-pick\r
86 in case user wants to install/update notmuch-pick. Whenever notmuch-pick\r
87 is good enough to be shipped inside $(dir) above then the aboce conditional\r
88 is not needed (at all).\r
89 \r
90 \r
91 >  emacs_images := \\r
92 >       $(srcdir)/$(dir)/notmuch-logo.png\r
93 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
94 > index fd1836f..4f3da4f 100644\r
95 > --- a/emacs/notmuch.el\r
96 > +++ b/emacs/notmuch.el\r
97 > @@ -59,6 +59,9 @@\r
98 >  (require 'notmuch-maildir-fcc)\r
99 >  (require 'notmuch-message)\r
100 >  \r
101 > +;; Load notmuch-pick if available (but do not error if not present).\r
102 > +(load "notmuch-pick" t)\r
103 > +\r
104 >  (defcustom notmuch-search-result-format\r
105 >    `(("date" . "%12s ")\r
106 >      ("count" . "%-7s ")\r
107 > @@ -1088,6 +1091,8 @@ current search results AND that are tagged with the given tag."\r
108 >  (defun notmuch ()\r
109 >    "Run notmuch and display saved searches, known tags, etc."\r
110 >    (interactive)\r
111 > +  (when (fboundp 'notmuch-pick-init)\r
112 > +    (notmuch-pick-init))\r
113 >    (notmuch-hello))\r
114 \r
115 Instead of this could notmuch-pick.el contain:\r
116 \r
117 In the beginning:\r
118 \r
119 (require 'notmuch-hello)\r
120 (require 'notmuch-show)\r
121 (require 'notmuch) ;; XXX ATM, as notmuch-search-mode-map is defined here\r
122 \r
123 And, at the end, before (provide 'notmuch-pick), execute the lines\r
124 what currenty are contained in (notmuch-pick-init).\r
125 \r
126 Then, those who want to start using notmuch-pick at this time\r
127 can (just) write the following in their .emacs:\r
128 \r
129 (require 'notmuch)\r
130 (require 'notmuch-pick)\r
131 \r
132 >  \r
133 >  (defun notmuch-interesting-buffer (b)\r
134 > -- \r
135 > 1.7.9.1\r
136 \r
137 Tomi\r