Re: Hi all
[notmuch-archives.git] / fb / 52765ffa5ef0d04a93f77fb0ecb30a82c7625d
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 798EC431FAE\r
6         for <notmuch@notmuchmail.org>; Wed, 25 Jul 2012 19:54:03 -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 DMwRbje0+5qm for <notmuch@notmuchmail.org>;\r
16         Wed, 25 Jul 2012 19:54:02 -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 38393431FB6\r
19         for <notmuch@notmuchmail.org>; Wed, 25 Jul 2012 19:54:02 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 70EFA10014E; Thu, 26 Jul 2012 05:54:11 +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: <87fw8fsfyc.fsf@qmul.ac.uk>\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         <m2ipdcqjwj.fsf@guru.guru-group.fi> <87fw8fsfyc.fsf@qmul.ac.uk>\r
29 User-Agent: Notmuch/0.13.2+103~g9610d35 (http://notmuchmail.org) Emacs/23.1.1\r
30         (x86_64-redhat-linux-gnu)\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
32         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
33         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
34 Date: Thu, 26 Jul 2012 05:54:11 +0300\r
35 Message-ID: <m27gtrkzak.fsf@guru.guru-group.fi>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain; charset=us-ascii\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: Thu, 26 Jul 2012 02:54:03 -0000\r
51 \r
52 On Thu, Jul 26 2012, Mark Walters <markwalters1009@gmail.com> wrote:\r
53 \r
54 > On Wed, 25 Jul 2012, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
55 >> On Wed, Jul 25 2012, Mark Walters <markwalters1009@gmail.com> wrote:\r
56 >>\r
57 >>> Compile and load notmuch-pick.el if present.\r
58 >>>\r
59 >>> All the actual setup of pick is done in the function notmuch-pick-init\r
60 >>> so we call that in the notmuch init function if it is bound. This\r
61 >>> function will setup all extra keybinding etc.\r
62 >>\r
63 >> Great stuff! See a few thoughts below...\r
64 >\r
65 > Thanks for these: I think they are all clear improvements.\r
66 >\r
67 >>\r
68 >>> ---\r
69 >>>  emacs/Makefile.local |    3 ++-\r
70 >>>  emacs/notmuch.el     |    5 +++++\r
71 >>>  2 files changed, 7 insertions(+), 1 deletions(-)\r
72 >>>\r
73 >>> diff --git a/emacs/Makefile.local b/emacs/Makefile.local\r
74 >>> index fb82247..9f4dba6 100644\r
75 >>> --- a/emacs/Makefile.local\r
76 >>> +++ b/emacs/Makefile.local\r
77 >>> @@ -15,7 +15,8 @@ emacs_sources := \\r
78 >>>     $(dir)/notmuch-crypto.el \\r
79 >>>     $(dir)/notmuch-tag.el \\r
80 >>>     $(dir)/coolj.el \\r
81 >>> -   $(dir)/notmuch-print.el\r
82 >>> +   $(dir)/notmuch-print.el \\r
83 >>> +   $(wildcard $(dir)/notmuch-pick.el)\r
84 >>\r
85 >> I wonder whether having this conditional is good idea. What if\r
86 >> someone copies (or (sym)links) notmuch-pick.el there and then\r
87 >> compiles and takes to use. Next time he takes clean tree and\r
88 >> forgets to do this copying and installs to the same destination.\r
89 >> Now there is old notmuch-pick.elc which might be out of sync.\r
90 >>\r
91 >> I think it would be better to provide a shell script in \r
92 >> notmuch-pick directory which byte-compiles and installs notmuch-pick\r
93 >> in case user wants to install/update notmuch-pick. Whenever notmuch-pick\r
94 >> is good enough to be shipped inside $(dir) above then the aboce conditional\r
95 >> is not needed (at all).\r
96 >>\r
97 >\r
98 > I have now done this: I actually use a Makefile so that I can pick up\r
99 > the config from notmuch: in particular the install directory\r
100 > for the notmuch-pick.elc file. Does that seem reasonable?\r
101 \r
102 I believe so.. I can say for sure when I see the code -- but anything\r
103 that makes the brave user's live in the bleeding edge easier is good.\r
104 \r
105 >\r
106 >>>  emacs_images := \\r
107 >>>     $(srcdir)/$(dir)/notmuch-logo.png\r
108 >>> diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
109 >>> index fd1836f..4f3da4f 100644\r
110 >>> --- a/emacs/notmuch.el\r
111 >>> +++ b/emacs/notmuch.el\r
112 >>> @@ -59,6 +59,9 @@\r
113 >>>  (require 'notmuch-maildir-fcc)\r
114 >>>  (require 'notmuch-message)\r
115 >>>  \r
116 >>> +;; Load notmuch-pick if available (but do not error if not present).\r
117 >>> +(load "notmuch-pick" t)\r
118 >>> +\r
119 >>>  (defcustom notmuch-search-result-format\r
120 >>>    `(("date" . "%12s ")\r
121 >>>      ("count" . "%-7s ")\r
122 >>> @@ -1088,6 +1091,8 @@ current search results AND that are tagged with the given tag."\r
123 >>>  (defun notmuch ()\r
124 >>>    "Run notmuch and display saved searches, known tags, etc."\r
125 >>>    (interactive)\r
126 >>> +  (when (fboundp 'notmuch-pick-init)\r
127 >>> +    (notmuch-pick-init))\r
128 >>>    (notmuch-hello))\r
129 >>\r
130 >> Instead of this could notmuch-pick.el contain:\r
131 >>\r
132 >> In the beginning:\r
133 >>\r
134 >> (require 'notmuch-hello)\r
135 >> (require 'notmuch-show)\r
136 >> (require 'notmuch) ;; XXX ATM, as notmuch-search-mode-map is defined here\r
137 >>\r
138 >> And, at the end, before (provide 'notmuch-pick), execute the lines\r
139 >> what currenty are contained in (notmuch-pick-init).\r
140 >>\r
141 >> Then, those who want to start using notmuch-pick at this time\r
142 >> can (just) write the following in their .emacs:\r
143 >>\r
144 >> (require 'notmuch)\r
145 >> (require 'notmuch-pick)\r
146 >\r
147 > This works very nicely. And if we want a transitional period the\r
148 > notmuch-pick could be in (dir) but not loaded automatically.\r
149 \r
150 Yes.\r
151 \r
152 >\r
153 > Many thanks for the excellent suggestions.\r
154 \r
155 Np. Thank you.\r
156 \r
157 > Mark\r
158 \r
159 Tomi\r