community/pipermail-archives/sup-devel/2009-12.txt (125088B) - raw
1 From sup-bugs@masanjin.net Tue Dec 1 19:21:45 2009
2 From: sup-bugs@masanjin.net (Mark Anderson)
3 Date: Wed, 02 Dec 2009 00:21:45 +0000
4 Subject: [sup-devel] [issue28] Join thread fails silently
5 In-Reply-To: <1259713305.52.0.316532974013.issue28@masanjin.net>
6 Message-ID: <1259713305.52.0.316532974013.issue28@masanjin.net>
7
8
9 New submission from Mark Anderson <MarkR.Anderson at amd.com>:
10
11 I have issues with the sup thread membership detecting matches in the bug
12 tracking system I'm using, but when I have a search for an issue number and tag
13 all the threads I want to join, I often see absolutely no effect.
14
15 Since join-threads is so silent, I don't have any helpful information to give on
16 this topic.
17
18 Sometimes I've seen when a search for a tag will include messages which are not
19 tagged.
20
21 ----------
22 messages: 65
23 nosy: mranders
24 priority: bug
25 ruby_version: 1.8.7-p72
26 status: unread
27 sup_version: 0.9.1
28 title: Join thread fails silently
29
30 _________________________________________
31 Sup issue tracker <sup-bugs at masanjin.net>
32 <http://masanjin.net/sup-bugs/issue28>
33 _________________________________________
34
35 From sup-bugs@masanjin.net Thu Dec 3 11:23:50 2009
36 From: sup-bugs@masanjin.net (anonymous)
37 Date: Thu, 03 Dec 2009 16:23:50 +0000
38 Subject: [sup-devel] [issue29] Exception thrown on exit
39 In-Reply-To: <1259857429.88.0.189335247872.issue29@masanjin.net>
40 Message-ID: <1259857429.88.0.189335247872.issue29@masanjin.net>
41
42
43 New submission from anonymous:
44
45 I got the following stack trace on exiting sup:
46
47 undefined method `resize' for nil:NilClass
48 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/buffer.rb:326:in `draw_screen'
49 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `send'
50 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `method_missing'
51 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:189:in
52 `handle_added_update'
53 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/update.rb:26:in `send'
54 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/update.rb:26:in `relay'
55 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/update.rb:26:in `each'
56 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/update.rb:26:in `relay'
57 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `send'
58 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `method_missing'
59 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:169:in `add_new_message'
60 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:110:in `do_poll'
61 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:154:in `each_message_from'
62 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/maildir.rb:160:in `each'
63 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/maildir.rb:157:in `upto'
64 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/maildir.rb:157:in `each'
65 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:560:in `send'
66 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:560:in `__pass'
67 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:547:in `method_missing'
68 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:142:in `each_message_from'
69 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:94:in `do_poll'
70 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:82:in `each'
71 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:82:in `do_poll'
72 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:81:in `synchronize'
73 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:81:in `do_poll'
74 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `send'
75 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `method_missing'
76 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/poll-mode.rb:15:in `poll'
77 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:48:in `poll'
78 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `send'
79 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `method_missing'
80 /usr/lib/ruby/gems/1.8/gems/sup-999/bin/sup:199
81 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:77:in `reporting_thread'
82 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:75:in `initialize'
83 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:75:in `new'
84 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:75:in `reporting_thread'
85 /usr/lib/ruby/gems/1.8/gems/sup-999/bin/sup:199
86 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:669:in `call'
87 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:669:in
88 `__unprotected_load_threads'
89 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:610:in `call'
90 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:610:in
91 `load_n_threads_background'
92 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:77:in `reporting_thread'
93 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:75:in `initialize'
94 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:75:in `new'
95 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:75:in `reporting_thread'
96 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:608:in
97 `load_n_threads_background'
98 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:679:in
99 `__unprotected_load_threads'
100 (eval):12:in `load_threads'
101 /usr/lib/ruby/gems/1.8/gems/sup-999/bin/sup:199
102 /usr/bin/sup:19:in `load'
103 /usr/bin/sup:19
104
105 I'm running the git version of sup at revision
106 c394806b26a45a71e9f43eb40cea9ba84cfed1a0 (I had to run the git version to work
107 around a bug in the latest release)
108
109 ----------
110 messages: 67
111 nosy: anonymous
112 priority: bug
113 ruby_version: 1.8.6
114 status: unread
115 sup_version: vgit
116 title: Exception thrown on exit
117
118 _________________________________________
119 Sup issue tracker <sup-bugs at masanjin.net>
120 <http://masanjin.net/sup-bugs/issue29>
121 _________________________________________
122
123 From sup-bugs@masanjin.net Thu Dec 3 13:25:33 2009
124 From: sup-bugs@masanjin.net (David R. MacIver)
125 Date: Thu, 03 Dec 2009 18:25:33 +0000
126 Subject: [sup-devel] [issue30] Crash during general use
127 In-Reply-To: <1259864732.83.0.806740992923.issue30@masanjin.net>
128 Message-ID: <1259864732.83.0.806740992923.issue30@masanjin.net>
129
130
131 New submission from David R. MacIver <david at drmaciver.com>:
132
133 I'm afraid I'm not sure what I was doing when I got this (I think just browsing
134 email) but I see the following exception in 0.9:
135
136 --- NoMethodError from thread: periodic poll
137 undefined method `content_width' for nil:NilClass
138 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/modes/thread-index-mode.rb:876:in
139 `from_width'
140 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/modes/thread-index-mode.rb:801:in
141 `text_for_thread_at'
142 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/hook.rb:121:in `each_with_index'
143 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/modes/thread-index-mode.rb:800:in `each'
144 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/modes/thread-index-mode.rb:800:in
145 `each_with_index'
146 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/modes/thread-index-mode.rb:800:in
147 `text_for_thread_at'
148 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/modes/thread-index-mode.rb:758:in
149 `regen_text'
150 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/util.rb:364:in `map_with_index'
151 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/hook.rb:121:in `each_with_index'
152 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/util.rb:364:in `each'
153 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/util.rb:364:in `each_with_index'
154 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/util.rb:364:in `map_with_index'
155 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/modes/thread-index-mode.rb:758:in
156 `regen_text'
157 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/modes/thread-index-mode.rb:230:in
158 `update'
159 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/modes/thread-index-mode.rb:702:in
160 `add_or_unhide'
161 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/modes/thread-index-mode.rb:188:in
162 `handle_added_update'
163 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/update.rb:26:in `send'
164 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/update.rb:26:in `relay'
165 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/update.rb:26:in `each'
166 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/update.rb:26:in `relay'
167 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/util.rb:520:in `send'
168 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/util.rb:520:in `method_missing'
169 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/poll.rb:166:in `add_new_message'
170 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/poll.rb:109:in `do_poll'
171 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/poll.rb:151:in `each_message_from'
172 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/maildir.rb:160:in `each'
173 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/maildir.rb:157:in `upto'
174 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/maildir.rb:157:in `each'
175 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/util.rb:560:in `send'
176 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/util.rb:560:in `__pass'
177 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/util.rb:547:in `method_missing'
178 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/poll.rb:139:in `each_message_from'
179 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/poll.rb:93:in `do_poll'
180 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/poll.rb:81:in `each'
181 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/poll.rb:81:in `do_poll'
182 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/poll.rb:80:in `synchronize'
183 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/poll.rb:80:in `do_poll'
184 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/util.rb:520:in `send'
185 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/util.rb:520:in `method_missing'
186 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/modes/poll-mode.rb:15:in `poll'
187 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/poll.rb:48:in `poll'
188 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/poll.rb:65:in `start'
189 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup.rb:77:in `reporting_thread'
190 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup.rb:75:in `initialize'
191 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup.rb:75:in `new'
192 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup.rb:75:in `reporting_thread'
193 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/poll.rb:62:in `start'
194 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/util.rb:520:in `send'
195 /usr/lib/ruby/gems/1.8/gems/sup-0.9/lib/sup/util.rb:520:in `method_missing'
196 /usr/lib/ruby/gems/1.8/gems/sup-0.9/bin/sup:203
197 /usr/bin/sup:19:in `load'
198 /usr/bin/sup:19
199
200 this seems to result from the buffer being nil when accessed from within the
201 poll, which results in the content_width method call to it crashing.
202
203 ----------
204 messages: 68
205 nosy: DRMacIver
206 priority: bug
207 ruby_version: 1.8.6
208 status: unread
209 sup_version: 0.9
210 title: Crash during general use
211
212 _________________________________________
213 Sup issue tracker <sup-bugs at masanjin.net>
214 <http://masanjin.net/sup-bugs/issue30>
215 _________________________________________
216
217 From sup-bugs@masanjin.net Thu Dec 3 13:42:38 2009
218 From: sup-bugs@masanjin.net (David R. MacIver)
219 Date: Thu, 03 Dec 2009 18:42:38 +0000
220 Subject: [sup-devel] [issue31] Another unexpected nil
221 In-Reply-To: <1259865758.13.0.469501860618.issue31@masanjin.net>
222 Message-ID: <1259865758.13.0.469501860618.issue31@masanjin.net>
223
224
225 New submission from David R. MacIver <david at drmaciver.com>:
226
227 I get the following stack trace when scrolling far down my inbox while it's
228 still loading (I don't know if that's what's causing the problem or if this is
229 just a function of specific emails).
230
231 --- NoMethodError from thread: poll after loading inbox
232 undefined method `date' for nil:NilClass
233 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:792:in
234 `text_for_thread_at'
235 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:758:in
236 `regen_text'
237 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:364:in `map_with_index'
238 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/hook.rb:122:in `each_with_index'
239 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:364:in `each'
240 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:364:in `each_with_index'
241 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:364:in `map_with_index'
242 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:758:in
243 `regen_text'
244 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:230:in
245 `update'
246 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:702:in
247 `add_or_unhide'
248 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:188:in
249 `handle_added_update'
250 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/update.rb:26:in `send'
251 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/update.rb:26:in `relay'
252 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/update.rb:26:in `each'
253 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/update.rb:26:in `relay'
254 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `send'
255 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `method_missing'
256 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:169:in `add_new_message'
257 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:110:in `do_poll'
258 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:154:in `each_message_from'
259 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/maildir.rb:160:in `each'
260 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/maildir.rb:157:in `upto'
261 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/maildir.rb:157:in `each'
262 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:560:in `send'
263 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:560:in `__pass'
264 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:547:in `method_missing'
265 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:142:in `each_message_from'
266 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:94:in `do_poll'
267 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:82:in `each'
268 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:82:in `do_poll'
269 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:81:in `synchronize'
270 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:81:in `do_poll'
271 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `send'
272 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `method_missing'
273 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/poll-mode.rb:15:in `poll'
274 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/poll.rb:48:in `poll'
275 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `send'
276 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `method_missing'
277 /usr/lib/ruby/gems/1.8/gems/sup-999/bin/sup:199
278 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:77:in `reporting_thread'
279 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:75:in `initialize'
280 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:75:in `new'
281 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:75:in `reporting_thread'
282 /usr/lib/ruby/gems/1.8/gems/sup-999/bin/sup:199
283 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:669:in `call'
284 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:669:in
285 `__unprotected_load_threads'
286 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:610:in `call'
287 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:610:in
288 `load_n_threads_background'
289 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:77:in `reporting_thread'
290 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:75:in `initialize'
291 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:75:in `new'
292 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup.rb:75:in `reporting_thread'
293 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:608:in
294 `load_n_threads_background'
295 /usr/lib/ruby/gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:679:in
296 `__unprotected_load_threads'
297 (eval):12:in `load_threads'
298 /usr/lib/ruby/gems/1.8/gems/sup-999/bin/sup:199
299 /usr/bin/sup:19:in `load'
300 /usr/bin/sup:19
301
302
303 Offending lines:
304
305 789 def text_for_thread_at line
306 790 t, size_widget = @mutex.synchronize { [@threads[line],
307 @size_widgets[line]] }
308 791
309 792 date = t.date.to_nice_s
310
311 ----------
312 messages: 69
313 nosy: DRMacIver
314 priority: bug
315 ruby_version: 1.8.6
316 status: unread
317 sup_version: git
318 title: Another unexpected nil
319
320 _________________________________________
321 Sup issue tracker <sup-bugs at masanjin.net>
322 <http://masanjin.net/sup-bugs/issue31>
323 _________________________________________
324
325 From sup-bugs@masanjin.net Sat Dec 5 10:50:50 2009
326 From: sup-bugs@masanjin.net (anonymous)
327 Date: Sat, 05 Dec 2009 15:50:50 +0000
328 Subject: [sup-devel] [issue32] sup's poll mode fails to find new messages
329 (possibly because ~/Maildir/new is a symlink)
330 In-Reply-To: <1260028250.12.0.475302611124.issue32@masanjin.net>
331 Message-ID: <1260028250.12.0.475302611124.issue32@masanjin.net>
332
333
334 New submission from anonymous:
335
336 I have a slightly weird setup, using symlinks in ~/Maildir:
337
338 $ ls -l /home/edward/Maildir | grep INBOX | sort
339 drwx------ 5 edward edward 4096 2009-12-05 15:32 INBOX
340 drwxr-xr-x 5 edward edward 4096 2009-12-05 15:29 INBOX.old
341 lrwxrwxrwx 1 edward edward 9 2009-12-05 15:45 cur -> INBOX/cur
342 lrwxrwxrwx 1 edward edward 9 2009-12-05 15:45 new -> INBOX/new
343 lrwxrwxrwx 1 edward edward 9 2009-12-05 15:45 tmp -> INBOX/tmp
344
345 I configured sup to source mail from the directory "/home/edward/Maildir".
346
347 "sup-sync --changed" found new emails, but sup's polling mode didn't.
348
349 I've now started afresh, pointing sup at "/home/edward/Maildir/INBOX", and
350 everything's working fine -- both sup-sync and sup itself are seeing new mails
351 added to that Maildir.
352
353 Ed
354
355 ----------
356 messages: 70
357 nosy: anonymous
358 priority: bug
359 ruby_version: 1.8.7
360 status: unread
361 sup_version: 0.9
362 title: sup's poll mode fails to find new messages (possibly because ~/Maildir/new is a symlink)
363
364 _________________________________________
365 Sup issue tracker <sup-bugs at masanjin.net>
366 <http://masanjin.net/sup-bugs/issue32>
367 _________________________________________
368
369 From sup-bugs@masanjin.net Thu Dec 10 18:15:45 2009
370 From: sup-bugs@masanjin.net (micah)
371 Date: Thu, 10 Dec 2009 23:15:45 +0000
372 Subject: [sup-devel] [issue33] sup hardcodes the micalg in signatures
373 In-Reply-To: <1260486945.71.0.956778612306.issue33@masanjin.net>
374 Message-ID: <1260486945.71.0.956778612306.issue33@masanjin.net>
375
376
377 New submission from micah <micah at riseup.net>:
378
379 crypto.rb, line 41 has this:
380
381 envelope.header["Content-Type"] = 'multipart/signed;
382 protocol=application/pgp-signature; micalg=pgp-sha1'
383
384 that is no good if my hash algorithm is *not* sha1, which it is not. in fact,
385 what that creates are broken signatures, which some clients will complain about.
386 in fact, enigmail for one complains about them because gpg complains:
387
388 /usr/bin/gpg --charset utf8 --batch --no-tty --status-fd 2 --verify
389 gpg: Signature made Wed 09 Dec 2009 01:03:13 PM EST using RSA key ID 2861A790
390 gpg: WARNING: signature digest conflict in message
391 gpg: Can't check signature: general error
392
393 Sup should detect the hashing algorithm and set it properly, rather than
394 hardcoding it.
395
396 RFC 3156 reads:
397
398 The "micalg" parameter for the "application/pgp-signature" protocol
399 MUST contain exactly one hash-symbol of the format "pgp-<hash-
400 identifier>", where <hash-identifier> identifies the Message
401 Integrity Check (MIC) algorithm used to generate the signature.
402 Hash-symbols are constructed from the text names registered in [1] or
403 according to the mechanism defined in that document by converting the
404 text name to lower case and prefixing it with the four characters
405 "pgp-".
406
407 Currently defined values are "pgp-md5", "pgp-sha1", "pgp-ripemd160",
408 "pgp-md2", "pgp-tiger192", and "pgp-haval-5-160".
409
410 ----------
411 messages: 80
412 nosy: micah
413 priority: bug
414 ruby_version: 1.8
415 status: unread
416 sup_version: 0.9
417 title: sup hardcodes the micalg in signatures
418
419 _________________________________________
420 Sup issue tracker <sup-bugs at masanjin.net>
421 <http://masanjin.net/sup-bugs/issue33>
422 _________________________________________
423
424 From sup-bugs@masanjin.net Sun Dec 13 15:48:43 2009
425 From: sup-bugs@masanjin.net (anonymous)
426 Date: Sun, 13 Dec 2009 20:48:43 +0000
427 Subject: [sup-devel] [issue34] Problems with spaces in source paths
428 In-Reply-To: <1260737323.12.0.202473079881.issue34@masanjin.net>
429 Message-ID: <1260737323.12.0.202473079881.issue34@masanjin.net>
430
431
432 New submission from anonymous:
433
434 I've been having problems adding a maildir source with a space in its absolute path.
435
436 sup-add "maildir:/path/to/maildir with spaces"
437
438 It works if you enscape spaces with %20 or + as done normally in URIs:
439
440 sup-add "maildir:/path/to/maildir%20with%20spaces"
441
442 But the maildir source doesn't unescape the uri path. Attached patch fixes that.
443
444 However, I'm still not convinced one should be expected to escape URIs for
445 sup-add. I'd be interested in your opinion on that matter, and willing to go and
446 write a patch for that part as well.
447
448 ----------
449 files: 0001-unescaping-maildir-uri-to-allow-spaces-etc.patch
450 messages: 86
451 nosy: anonymous
452 priority: bug
453 ruby_version: 1.8.7
454 status: unread
455 sup_version: 0.9.1
456 title: Problems with spaces in source paths
457
458 _________________________________________
459 Sup issue tracker <sup-bugs at masanjin.net>
460 <http://masanjin.net/sup-bugs/issue34>
461 _________________________________________
462 -------------- next part --------------
463 A non-text attachment was scrubbed...
464 Name: 0001-unescaping-maildir-uri-to-allow-spaces-etc.patch
465 Type: application/octet-stream
466 Size: 871 bytes
467 Desc: not available
468 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20091213/a0458e8a/attachment-0001.obj>
469
470 From davrieb@liegesta.at Sun Dec 20 12:06:11 2009
471 From: davrieb@liegesta.at (David Riebenbauer)
472 Date: Sun, 20 Dec 2009 18:06:11 +0100
473 Subject: [sup-devel] [PATCH] change default default_attachment_save_dir
474 Message-ID: <1261327726-sup-11@androgyn-mid.liegesta.at>
475
476 Hi!
477
478 Prefered patch submission place is sup-devel@ right?
479
480 Just a trivial change I had sitting around here for way to long.
481
482 Thanks,
483 David
484
485 >8--------------------------------------
486 change default default_attachment_save_dir to "~/"
487
488 With the current old default "" sup would try to save to / which was kind of
489 annoying. So I changed it, so new users wouldn't have that problem.
490
491 ---
492 lib/sup.rb | 2 +-
493 1 files changed, 1 insertions(+), 1 deletions(-)
494
495 diff --git a/lib/sup.rb b/lib/sup.rb
496 index 144f5e3..e685584 100644
497 --- a/lib/sup.rb
498 +++ b/lib/sup.rb
499 @@ -228,7 +228,7 @@ else
500 :confirm_no_attachments => true,
501 :confirm_top_posting => true,
502 :discard_snippets_from_encrypted_messages => false,
503 - :default_attachment_save_dir => "",
504 + :default_attachment_save_dir => "~/",
505 :sent_source => "sup://sent"
506 }
507 begin
508 --
509 1.6.5.7
510 >8--------------------------------------
511
512 --
513 David Riebenbauer
514 Jabber: davrieb at jabber.ccc.de - ICQ: 322056002
515 http://liegesta.at
516 -------------- next part --------------
517 A non-text attachment was scrubbed...
518 Name: signature.asc
519 Type: application/pgp-signature
520 Size: 198 bytes
521 Desc: not available
522 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20091220/c7fd870e/attachment.bin>
523
524 From ezyang@MIT.EDU Sun Dec 20 17:19:57 2009
525 From: ezyang@MIT.EDU (Edward Z. Yang)
526 Date: Sun, 20 Dec 2009 17:19:57 -0500
527 Subject: [sup-devel] [PATCH] change default default_attachment_save_dir
528 In-Reply-To: <1261327726-sup-11@androgyn-mid.liegesta.at>
529 References: <1261327726-sup-11@androgyn-mid.liegesta.at>
530 Message-ID: <1261347576-sup-7268@ezyang>
531
532 Excerpts from David Riebenbauer's message of Sun Dec 20 12:06:11 -0500 2009:
533 > Just a trivial change I had sitting around here for way to long.
534
535 +1
536
537 This should have been fixed a long time ago.
538
539 Edward
540
541 From wmorgan-sup@masanjin.net Mon Dec 21 07:48:58 2009
542 From: wmorgan-sup@masanjin.net (William Morgan)
543 Date: Mon, 21 Dec 2009 04:48:58 -0800
544 Subject: [sup-devel] [PATCH] change default default_attachment_save_dir
545 In-Reply-To: <1261327726-sup-11@androgyn-mid.liegesta.at>
546 References: <1261327726-sup-11@androgyn-mid.liegesta.at>
547 Message-ID: <1261399667-sup-7112@masanjin.net>
548
549 Hi David,
550
551 Reformatted excerpts from David Riebenbauer's message of 2009-12-20:
552 > With the current old default "" sup would try to save to / which was
553 > kind of annoying. So I changed it, so new users wouldn't have that
554 > problem.
555
556 Thanks! I fixed this in a different way, though, that allows the "" to
557 act as "~/". That way old users are helped as well. Either "" or "~/"
558 should now work.
559 --
560 William <wmorgan-sup at masanjin.net>
561
562 From wmorgan-sup@masanjin.net Mon Dec 21 07:50:49 2009
563 From: wmorgan-sup@masanjin.net (William Morgan)
564 Date: Mon, 21 Dec 2009 04:50:49 -0800
565 Subject: [sup-devel] encoding branch
566 In-Reply-To: <1259209351-sup-4273@zyrg.net>
567 References: <1259209351-sup-4273@zyrg.net>
568 Message-ID: <1261399788-sup-5091@masanjin.net>
569
570 Reformatted excerpts from Rich Lane's message of 2009-11-25:
571 > I've pushed a branch "encoding" to my repo (git://github.com/rlane/sup)
572 > which has many fixes for the encoding issues ruby 1.9 creates.
573 [snip]
574 > Caveats:
575 > Xapian-only
576 > still contains debugging code, so it will be slower
577
578 How Xapian-only is this? Will it break Ferret compatibility?
579
580 My plan for 0.10 is to release with Xapian being the default index. It
581 would be great to be 1.9-compatible too.
582 --
583 William <wmorgan-sup at masanjin.net>
584
585 From sup-bugs@masanjin.net Mon Dec 21 12:01:27 2009
586 From: sup-bugs@masanjin.net (anonymous)
587 Date: Mon, 21 Dec 2009 17:01:27 +0000
588 Subject: [sup-devel] [issue35] inbox-mode thread state appears incorrectly
589 saved via $
590 In-Reply-To: <1261414887.04.0.679790695865.issue35@masanjin.net>
591 Message-ID: <1261414887.04.0.679790695865.issue35@masanjin.net>
592
593
594 New submission from anonymous:
595
596 Sup's inbox-mode appears to fail to save thread state accurately for me, such
597 that a quit and re-open of sup or even a @ on the inbox will nearly always show
598 some threads that should have been archived.
599
600 I haven't found why this only affects some threads.
601
602 My normal workflow:
603 . open a thread (now it loses it's :unread tag)
604 . stuff
605 . x out back to the index
606 . a to archive (now it loses its :inbox tag)
607 . repeat
608 . $ to save the inbox state
609
610 At this point if I close and re-open sup, or if I @ to refresh the inbox view,
611 there is a chance that the message(s) I just operated on will re-appear in the
612 inbox as unread.
613
614 It also seems to happen if I N and a messages from within the inbox-mode.
615
616 ----------
617 messages: 95
618 nosy: anonymous
619 priority: bug
620 ruby_version: ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]
621 status: unread
622 sup_version: 0.9.1 ferret
623 title: inbox-mode thread state appears incorrectly saved via $
624
625 _________________________________________
626 Sup issue tracker <sup-bugs at masanjin.net>
627 <http://masanjin.net/sup-bugs/issue35>
628 _________________________________________
629
630 From tero@tilus.net Tue Dec 22 07:42:52 2009
631 From: tero@tilus.net (Tero Tilus)
632 Date: Tue, 22 Dec 2009 14:42:52 +0200
633 Subject: [sup-devel] [PATCH] XapianIndex.each_message_in_thread_for yields
634 messages in cronological order
635 Message-ID: <1261485246-sup-4236@tilus.net>
636
637 This way I got rid of a couple of counterintuitive threading results.
638 Namely real root of a thread would occasionally not be displayed as a
639 root if a message containing the real root in the middle of its
640 refs-list (dunno why) would get yielded (to threading algorithm)
641 before the real root. Threading algorithm looks like it silently
642 expects threaded messages to appear in cronological order.
643
644 Signed-off-by: Tero Tilus <tero at tilus.net>
645 ---
646 lib/sup/xapian_index.rb | 7 ++++++-
647 1 files changed, 6 insertions(+), 1 deletions(-)
648
649 diff --git a/lib/sup/xapian_index.rb b/lib/sup/xapian_index.rb
650 index 0fdd55f..b31fd10 100644
651 --- a/lib/sup/xapian_index.rb
652 +++ b/lib/sup/xapian_index.rb
653 @@ -122,6 +122,7 @@ EOS
654 return unless doc = find_doc(m.id)
655 queue = doc.value(THREAD_VALUENO).split(',')
656 msgids = [m.id]
657 + msgdates = { m.id => m.date.to_i }
658 seen_threads = Set.new
659 seen_messages = Set.new [m.id]
660 while not queue.empty?
661 @@ -134,11 +135,15 @@ EOS
662 msgid = doc.value MSGID_VALUENO
663 next if seen_messages.member? msgid
664 msgids << msgid
665 + msgdates[msgid] = Xapian.sortable_unserialise(doc.value(DATE_VALUENO)).to_i
666 seen_messages << msgid
667 queue.concat doc.value(THREAD_VALUENO).split(',')
668 end
669 end
670 - msgids.each { |id| yield id, lambda { build_message id } }
671 + # We play nice and sort message ids by message date before
672 + # yielding them. Threading for example gets messed up if messages
673 + # are iterated in (more or less) random order.
674 + msgids.sort { |a,b| msgdates[a] <=> msgdates[b] }.each { |id| yield id, lambda { build_message id } }
675 true
676 end
677
678 --
679 Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
680
681 From sup-bugs@masanjin.net Fri Dec 25 09:02:35 2009
682 From: sup-bugs@masanjin.net (Gaute Hope)
683 Date: Fri, 25 Dec 2009 14:02:35 +0000
684 Subject: [sup-devel] [issue36] label tab completion with utf-8 chars fail
685 In-Reply-To: <1261749755.37.0.845609324711.issue36@masanjin.net>
686 Message-ID: <1261749755.37.0.845609324711.issue36@masanjin.net>
687
688
689 New submission from Gaute Hope <eg at gaute.vetsj.com>:
690
691 When trying to label a thread with a label containing unicode chars and pressing
692 TAB I get this. When typing in the whole label manually it ads it with some
693 minor glitches in the rendering of the message-line. When restarting sup I get a
694 one space between the subject and the label that doesn't change background color
695 when selected.
696
697 [2009-12-25 14:51:11 +0100] ERROR: oh crap, an exception
698 ----------------------------------------------------------------
699 I'm very sorry. It seems that an error occurred in Sup. Please
700 accept my sincere apologies. If you don't mind, please send the
701 contents of /home/gaute/.sup/exception-log.txt and a brief report of the
702 circumstances to sup-talk at rubyforge dot orgs so that I might
703 address this problem. Thank you!
704
705 Sincerely,
706 William
707 ----------------------------------------------------------------
708 --- Encoding::CompatibilityError from thread: main
709 incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
710 /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:461:in `block (2 levels) in
711 ask_many_with_completions'
712 /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:461:in `select'
713 /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:461:in `block in
714 ask_many_with_completions'
715 /home/gaute/dev/ruby/sup.git/lib/sup/textfield.rb:75:in `call'
716 /home/gaute/dev/ruby/sup.git/lib/sup/textfield.rb:75:in `handle_input'
717 /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:572:in `ask'
718 /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:450:in
719 `ask_many_with_completions'
720 /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:519:in `ask_for_labels'
721 /home/gaute/dev/ruby/sup.git/lib/sup/util.rb:546:in `method_missing'
722 /home/gaute/dev/ruby/sup.git/lib/sup/modes/thread-index-mode.rb:536:in
723 `edit_labels'
724 /home/gaute/dev/ruby/sup.git/lib/sup/mode.rb:52:in `handle_input'
725 /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:266:in `handle_input'
726 bin/sup:244:in `<module:Redwood>'
727 bin/sup:67:in `<main>'
728
729 ----------
730 messages: 97
731 nosy: gauteh
732 priority: bug
733 ruby_version: 1.9.1
734 status: unread
735 sup_version: git
736 title: label tab completion with utf-8 chars fail
737
738 _________________________________________
739 Sup issue tracker <sup-bugs at masanjin.net>
740 <http://masanjin.net/sup-bugs/issue36>
741 _________________________________________
742
743 From rlane@club.cc.cmu.edu Sun Dec 27 16:37:37 2009
744 From: rlane@club.cc.cmu.edu (Rich Lane)
745 Date: Sun, 27 Dec 2009 16:37:37 -0500
746 Subject: [sup-devel] [PATCH] XapianIndex.each_message_in_thread_for
747 yields messages in cronological order
748 In-Reply-To: <1261485246-sup-4236@tilus.net>
749 References: <1261485246-sup-4236@tilus.net>
750 Message-ID: <1261938751-sup-9421@zyrg.net>
751
752 Excerpts from Tero Tilus's message of Tue Dec 22 07:42:52 -0500 2009:
753 > This way I got rid of a couple of counterintuitive threading results.
754 > Namely real root of a thread would occasionally not be displayed as a
755 > root if a message containing the real root in the middle of its
756 > refs-list (dunno why) would get yielded (to threading algorithm)
757 > before the real root. Threading algorithm looks like it silently
758 > expects threaded messages to appear in cronological order.
759
760 Hmm. Threading should only depend on refs and reply-tos, not the date.
761 Could you give a short example (just the relevant headers) of a
762 situation where this patch helps?
763
764 What you describe sounds like a malformed message. What client is
765 generating them / how common are they?
766
767 From sup-bugs@masanjin.net Tue Dec 29 08:30:40 2009
768 From: sup-bugs@masanjin.net (anonymous)
769 Date: Tue, 29 Dec 2009 13:30:40 +0000
770 Subject: [sup-devel] [issue37] special characters still not working
771 In-Reply-To: <1262093440.47.0.488412386269.issue37@masanjin.net>
772 Message-ID: <1262093440.47.0.488412386269.issue37@masanjin.net>
773
774
775 New submission from anonymous:
776
777 I still have problems with special characters. (Namely German "Umlaute"). They
778 get displayed as M-CM-6 or M-CM-<.
779
780 I've tried the (old) patches from the wiki but that didnt help. (I tried the
781 ncurses patch - the libc one seemed already applied.
782
783 I'm running gentoo and installed sup using gem.
784
785 ----------
786 messages: 99
787 nosy: anonymous
788 priority: bug
789 ruby_version: ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
790 status: unread
791 sup_version: 0.9
792 title: special characters still not working
793
794 _________________________________________
795 Sup issue tracker <sup-bugs at masanjin.net>
796 <http://masanjin.net/sup-bugs/issue37>
797 _________________________________________
798
799 From tero@tilus.net Tue Dec 29 14:34:33 2009
800 From: tero@tilus.net (Tero Tilus)
801 Date: Tue, 29 Dec 2009 21:34:33 +0200
802 Subject: [sup-devel] What's your workflow?
803 Message-ID: <1262114695-sup-9446@tilus.net>
804
805 I'm still a bit newbie with git. I'd like to hear how do you folks
806 develop/use sup. What's your workflow? Do you run master, next or
807 some own branch? If own, where do you fork and how do you track
808 upstream and your own patches? Detailed git commands appreciated.
809
810 --
811 Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
812
813 From ezyang@MIT.EDU Tue Dec 29 14:41:34 2009
814 From: ezyang@MIT.EDU (Edward Z. Yang)
815 Date: Tue, 29 Dec 2009 14:41:34 -0500
816 Subject: [sup-devel] What's your workflow?
817 In-Reply-To: <1262114695-sup-9446@tilus.net>
818 References: <1262114695-sup-9446@tilus.net>
819 Message-ID: <1262115613-sup-1540@ezyang>
820
821 Excerpts from Tero Tilus's message of Tue Dec 29 14:34:33 -0500 2009:
822 > I'm still a bit newbie with git. I'd like to hear how do you folks
823 > develop/use sup. What's your workflow? Do you run master, next or
824 > some own branch? If own, where do you fork and how do you track
825 > upstream and your own patches? Detailed git commands appreciated.
826
827 When I used to maintain a few patches on top of Git (I don't think I
828 have any right now, since they became unnecessary when I switched
829 to Xapian and OfflineImap), I'd have them on top of my local next
830 branch; when pulling changes I'd:
831
832 git fetch
833 git rebase origin/next
834
835 I used to run master, but switched to next on advice that it was fairly
836 stable.
837
838 Cheers,
839 Edward
840
841 From wmorgan-sup@masanjin.net Tue Dec 29 14:58:30 2009
842 From: wmorgan-sup@masanjin.net (William Morgan)
843 Date: Tue, 29 Dec 2009 11:58:30 -0800
844 Subject: [sup-devel] What's your workflow?
845 In-Reply-To: <1262114695-sup-9446@tilus.net>
846 References: <1262114695-sup-9446@tilus.net>
847 Message-ID: <1262116690-sup-8655@masanjin.net>
848
849 Reformatted excerpts from Tero Tilus's message of 2009-12-29:
850 > I'm still a bit newbie with git. I'd like to hear how do you folks
851 > develop/use sup. What's your workflow? Do you run master, next or
852 > some own branch? If own, where do you fork and how do you track
853 > upstream and your own patches? Detailed git commands appreciated.
854
855 See http://sup.rubyforge.org/wiki/wiki.pl?Contributing, and feel free to
856 tweak that as appropriate!
857 --
858 William <wmorgan-sup at masanjin.net>
859
860 From tero@tilus.net Tue Dec 29 15:14:45 2009
861 From: tero@tilus.net (Tero Tilus)
862 Date: Tue, 29 Dec 2009 22:14:45 +0200
863 Subject: [sup-devel] What's your workflow?
864 In-Reply-To: <1262116690-sup-8655@masanjin.net>
865 References: <1262114695-sup-9446@tilus.net> <1262116690-sup-8655@masanjin.net>
866 Message-ID: <1262117270-sup-1009@tilus.net>
867
868 William Morgan, 2009-12-29 21:58:
869 > See http://sup.rubyforge.org/wiki/wiki.pl?Contributing
870
871 Believe me, I have. That's pretty much why I got this far in the
872 first place. ;)
873
874 Wiki page just doesn't say anything on how to have your own daily-sup
875 branch (master or next + a set of own and others' patches) and how to
876 keep that up-to-date with upstream while your develop your own patches
877 (which are supposed to live in topic branches).
878
879 --
880 Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
881
882 From wmorgan-sup@masanjin.net Tue Dec 29 15:43:15 2009
883 From: wmorgan-sup@masanjin.net (William Morgan)
884 Date: Tue, 29 Dec 2009 12:43:15 -0800
885 Subject: [sup-devel] What's your workflow?
886 In-Reply-To: <1262117270-sup-1009@tilus.net>
887 References: <1262114695-sup-9446@tilus.net> <1262116690-sup-8655@masanjin.net>
888 <1262117270-sup-1009@tilus.net>
889 Message-ID: <1262118710-sup-1729@masanjin.net>
890
891 Reformatted excerpts from Tero Tilus's message of 2009-12-29:
892 > Wiki page just doesn't say anything on how to have your own daily-sup
893 > branch (master or next + a set of own and others' patches) and how to
894 > keep that up-to-date with upstream while your develop your own patches
895 > (which are supposed to live in topic branches).
896
897 You should be able to make a daily-sup branch off of (say) next, apply
898 all your patches, and whenever next changes and you want to update,
899 rebase like so:
900
901 $ git checkout next
902 $ git pull
903 $ git checkout daily-sup
904 $ git rebase next
905
906 If you have feature branches merged into daily-sup, I think you need to
907 use `git rebase -p next` to get it to recreate those merges. But I've
908 never gotten that complex.
909
910 (You could also just merge in next each time, which might be easier.
911 Rebase has the advantage of keeping your patch set up to date with the
912 remote branch, though, which might be nice if you decide to publish
913 them.)
914 --
915 William <wmorgan-sup at masanjin.net>
916
917 From bwalton@artsci.utoronto.ca Tue Dec 29 15:40:25 2009
918 From: bwalton@artsci.utoronto.ca (Ben Walton)
919 Date: Tue, 29 Dec 2009 15:40:25 -0500
920 Subject: [sup-devel] What's your workflow?
921 In-Reply-To: <1262117270-sup-1009@tilus.net>
922 References: <1262114695-sup-9446@tilus.net> <1262116690-sup-8655@masanjin.net>
923 <1262117270-sup-1009@tilus.net>
924 Message-ID: <1262118240-sup-4202@ntdws12.chass.utoronto.ca>
925
926 Excerpts from Tero Tilus's message of Tue Dec 29 15:14:45 -0500 2009:
927
928 > Wiki page just doesn't say anything on how to have your own daily-sup
929 > branch (master or next + a set of own and others' patches) and how to
930 > keep that up-to-date with upstream while your develop your own patches
931 > (which are supposed to live in topic branches).
932
933 Maybe something like Stacked Git would work for you?
934
935 http://www.procode.org/stgit/
936
937 Alternately, if you want to stick to plain git, I'd recommend
938 something like:
939
940 origin/master -> master
941 origin/next -> next
942 |
943 \ mybranch
944
945 Where 'mybranch' collects your locally desired deviations. If you're
946 not familiar with git, you'll want to do, assuming you've already got
947 a good repo that is tracking both origin/* branches.
948
949 Now, you can do:
950
951 git checkout -b mybranch next
952
953 As you update next with changes from origin/next, you can 'move' your
954 local changeset forward with:
955
956 git rebase next
957
958 If you don't explicitly track the next branch locally, you can do:
959
960 git checkout -b mybranch origin/next
961
962 and then
963
964 git rebase origin/next
965
966 as you do `git fetch` to get changes from upstream.
967
968 Be sure to do any devel work you expect to send back to the project as
969 a branch from master though, as that makes integration easier
970 upstream.
971
972 HTH.
973 -Ben
974 --
975 Ben Walton
976 Systems Programmer - CHASS
977 University of Toronto
978 C:416.407.5610 | W:416.978.4302
979
980 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu
981 Contact me to arrange for a CAcert assurance meeting.
982 -------------- next part --------------
983 A non-text attachment was scrubbed...
984 Name: signature.asc
985 Type: application/pgp-signature
986 Size: 189 bytes
987 Desc: not available
988 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20091229/9c82da6a/attachment.bin>
989
990 From tero@tilus.net Tue Dec 29 16:58:47 2009
991 From: tero@tilus.net (Tero Tilus)
992 Date: Tue, 29 Dec 2009 23:58:47 +0200
993 Subject: [sup-devel] What's your workflow?
994 In-Reply-To: <1262118240-sup-4202@ntdws12.chass.utoronto.ca>
995 References: <1262114695-sup-9446@tilus.net> <1262116690-sup-8655@masanjin.net>
996 <1262117270-sup-1009@tilus.net>
997 <1262118240-sup-4202@ntdws12.chass.utoronto.ca>
998 Message-ID: <1262123514-sup-7661@tilus.net>
999
1000 Ben Walton, 2009-12-29 22:40:
1001 > Maybe something like Stacked Git would work for you?
1002 > http://www.procode.org/stgit/
1003
1004 Now _that_ is something i've been dreaming of! Thanks a lot. Even if
1005 I don't end up using stgit on sup development, I know I'll use it in
1006 quite a few other places.
1007
1008 > Alternately, if you want to stick to plain git, I'd recommend
1009 > something like:
1010 >
1011 > origin/master -> master
1012 > origin/next -> next
1013 > |
1014 > \ mybranch
1015 >
1016 > Where 'mybranch' collects your locally desired deviations.
1017
1018 Does it "just work" if I have feature branches off of master which are
1019 merged to mybranch and the feature patches get accepted and appear to
1020 next?
1021
1022 --
1023 Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
1024
1025 From tero@tilus.net Tue Dec 29 17:03:26 2009
1026 From: tero@tilus.net (Tero Tilus)
1027 Date: Wed, 30 Dec 2009 00:03:26 +0200
1028 Subject: [sup-devel] What's your workflow?
1029 In-Reply-To: <1262118710-sup-1729@masanjin.net>
1030 References: <1262114695-sup-9446@tilus.net> <1262116690-sup-8655@masanjin.net>
1031 <1262117270-sup-1009@tilus.net> <1262118710-sup-1729@masanjin.net>
1032 Message-ID: <1262123932-sup-7232@tilus.net>
1033
1034 William Morgan, 2009-12-29 22:43:
1035 > If you have feature branches merged into daily-sup, I think you need
1036 > to use `git rebase -p next` to get it to recreate those merges. But
1037 > I've never gotten that complex.
1038
1039 If _you_ haven't done that it makes me think I'm seriously
1040 overengineering something here (or is it just because you are the
1041 maintainer and aren't pulling your next from anybody?)
1042
1043 What is your daily-sup?
1044
1045 --
1046 Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
1047
1048 From wmorgan-sup@masanjin.net Tue Dec 29 17:33:05 2009
1049 From: wmorgan-sup@masanjin.net (William Morgan)
1050 Date: Tue, 29 Dec 2009 14:33:05 -0800
1051 Subject: [sup-devel] What's your workflow?
1052 In-Reply-To: <1262123932-sup-7232@tilus.net>
1053 References: <1262114695-sup-9446@tilus.net> <1262116690-sup-8655@masanjin.net>
1054 <1262117270-sup-1009@tilus.net> <1262118710-sup-1729@masanjin.net>
1055 <1262123932-sup-7232@tilus.net>
1056 Message-ID: <1262125869-sup-8873@masanjin.net>
1057
1058 Reformatted excerpts from Tero Tilus's message of 2009-12-29:
1059 > What is your daily-sup?
1060
1061 I use next and don't have personal patches because I publish all the
1062 code I write. (I do have code branches that I don't publish, but those
1063 aren't things that I run as daily-sup).
1064
1065 I don't think you're overengineering. Git is good at maintaining local
1066 changesets like this.
1067 --
1068 William <wmorgan-sup at masanjin.net>
1069
1070 From wmorgan-sup@masanjin.net Tue Dec 29 17:51:12 2009
1071 From: wmorgan-sup@masanjin.net (William Morgan)
1072 Date: Tue, 29 Dec 2009 14:51:12 -0800
1073 Subject: [sup-devel] What's your workflow?
1074 In-Reply-To: <1262123514-sup-7661@tilus.net>
1075 References: <1262114695-sup-9446@tilus.net> <1262116690-sup-8655@masanjin.net>
1076 <1262117270-sup-1009@tilus.net>
1077 <1262118240-sup-4202@ntdws12.chass.utoronto.ca>
1078 <1262123514-sup-7661@tilus.net>
1079 Message-ID: <1262126992-sup-7312@masanjin.net>
1080
1081 Reformatted excerpts from Tero Tilus's message of 2009-12-29:
1082 > Does it "just work" if I have feature branches off of master which are
1083 > merged to mybranch and the feature patches get accepted and appear to
1084 > next?
1085
1086 It certainly works for the case where you're merging from next into your
1087 daily_sup branch, and rebase will happily drop changes that are
1088 duplicated by the target, so I would guess that rebase would do the
1089 right thing with redundant merges. Maybe a test is in order!
1090 --
1091 William <wmorgan-sup at masanjin.net>
1092
1093 From tero@tilus.net Tue Dec 29 18:03:29 2009
1094 From: tero@tilus.net (Tero Tilus)
1095 Date: Wed, 30 Dec 2009 01:03:29 +0200
1096 Subject: [sup-devel] What's your workflow?
1097 In-Reply-To: <1262126992-sup-7312@masanjin.net>
1098 References: <1262114695-sup-9446@tilus.net> <1262116690-sup-8655@masanjin.net>
1099 <1262117270-sup-1009@tilus.net>
1100 <1262118240-sup-4202@ntdws12.chass.utoronto.ca>
1101 <1262123514-sup-7661@tilus.net> <1262126992-sup-7312@masanjin.net>
1102 Message-ID: <1262127314-sup-3385@tilus.net>
1103
1104 I think I gradually start to figure out how to get rid of habits I
1105 find messy. Thanks a ton already guys!
1106
1107 Still one thing.
1108
1109 Assume I have a feature-branch which is merged to my-daily-sup and I
1110 go --amend a commit in that feature-branch. How would I now get
1111 my-daily-sup up to date? (also assume that merge from feature-branch
1112 is not the tip of my-daily-sup so that git reset HEAD^ && git merge
1113 feature-branch is not a solution)
1114
1115 --
1116 Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
1117
1118 From wmorgan-sup@masanjin.net Tue Dec 29 19:01:53 2009
1119 From: wmorgan-sup@masanjin.net (William Morgan)
1120 Date: Tue, 29 Dec 2009 16:01:53 -0800
1121 Subject: [sup-devel] What's your workflow?
1122 In-Reply-To: <1262127314-sup-3385@tilus.net>
1123 References: <1262114695-sup-9446@tilus.net> <1262116690-sup-8655@masanjin.net>
1124 <1262117270-sup-1009@tilus.net>
1125 <1262118240-sup-4202@ntdws12.chass.utoronto.ca>
1126 <1262123514-sup-7661@tilus.net> <1262126992-sup-7312@masanjin.net>
1127 <1262127314-sup-3385@tilus.net>
1128 Message-ID: <1262130924-sup-285@masanjin.net>
1129
1130 Reformatted excerpts from Tero Tilus's message of 2009-12-29:
1131 > Assume I have a feature-branch which is merged to my-daily-sup and I
1132 > go --amend a commit in that feature-branch. How would I now get
1133 > my-daily-sup up to date? (also assume that merge from feature-branch
1134 > is not the tip of my-daily-sup so that git reset HEAD^ && git merge
1135 > feature-branch is not a solution)
1136
1137 If you --amend, then remerging will likely create a conflict. There
1138 might be a way of rebase -i on my-daily-sup to leave off the original
1139 merge commit, or you could "unmerge it" with the horribleness that is
1140 `git revert -m 1` on the original merge commit, leaving daily-sup with
1141 some reverse commits.
1142
1143 The short answer is: don't do that. Avoid things that change the head on
1144 a branch that's been published or merged or otherwise used. Make an
1145 additional commit instead of --amend, or be prepared to do some work.
1146
1147 (I realize this isn't ideal because presumably you're trying to keep
1148 both a clean topic branch and a clean daily-sup branch, but rebasing and
1149 amending necessarily drops the history that git needs to merge changes
1150 properly.)
1151 --
1152 William <wmorgan-sup at masanjin.net>
1153
1154 From rlane@club.cc.cmu.edu Tue Dec 29 18:58:56 2009
1155 From: rlane@club.cc.cmu.edu (Rich Lane)
1156 Date: Tue, 29 Dec 2009 15:58:56 -0800
1157 Subject: [sup-devel] [PATCH] try loading ncursesw
1158 Message-ID: <1262131136-14766-1-git-send-email-rlane@club.cc.cmu.edu>
1159
1160 ---
1161 bin/sup | 14 +++++++++++++-
1162 lib/sup/buffer.rb | 7 ++++++-
1163 2 files changed, 19 insertions(+), 2 deletions(-)
1164
1165 diff --git a/bin/sup b/bin/sup
1166 index 471e833..fcc254f 100755
1167 --- a/bin/sup
1168 +++ b/bin/sup
1169 @@ -1,7 +1,15 @@
1170 #!/usr/bin/env ruby
1171
1172 require 'rubygems'
1173 -require 'ncurses'
1174 +
1175 +no_ncursesw = false
1176 +begin
1177 + require 'ncursesw'
1178 +rescue LoadError
1179 + require 'ncurses'
1180 + no_ncursesw = true
1181 +end
1182 +
1183 require 'curses'
1184 require 'fileutils'
1185 require 'trollop'
1186 @@ -21,6 +29,10 @@ EOS
1187 exit(-1)
1188 end
1189
1190 +if no_ncursesw
1191 + warn "Install the ncursesw gem for wide character support."
1192 +end
1193 +
1194 $opts = Trollop::options do
1195 version "sup v#{Redwood::VERSION}"
1196 banner <<EOS
1197 diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
1198 index df5d23c..e5175bb 100644
1199 --- a/lib/sup/buffer.rb
1200 +++ b/lib/sup/buffer.rb
1201 @@ -1,6 +1,11 @@
1202 require 'etc'
1203 require 'thread'
1204 -require 'ncurses'
1205 +
1206 +begin
1207 + require 'ncursesw'
1208 +rescue LoadError
1209 + require 'ncurses'
1210 +end
1211
1212 if defined? Ncurses
1213 module Ncurses
1214 --
1215 1.6.0.4
1216
1217
1218 From rlane@club.cc.cmu.edu Tue Dec 29 20:38:02 2009
1219 From: rlane@club.cc.cmu.edu (Rich Lane)
1220 Date: Tue, 29 Dec 2009 17:38:02 -0800
1221 Subject: [sup-devel] [PATCH 1/4] factor saving out of thread/message classes
1222 Message-ID: <1262137085-25928-1-git-send-email-rlane@club.cc.cmu.edu>
1223
1224 ---
1225 lib/sup/index.rb | 7 +++++++
1226 lib/sup/message.rb | 5 +----
1227 lib/sup/modes/thread-index-mode.rb | 2 +-
1228 lib/sup/thread.rb | 2 +-
1229 4 files changed, 10 insertions(+), 6 deletions(-)
1230
1231 diff --git a/lib/sup/index.rb b/lib/sup/index.rb
1232 index ff03f19..5d8d714 100644
1233 --- a/lib/sup/index.rb
1234 +++ b/lib/sup/index.rb
1235 @@ -172,6 +172,13 @@ class BaseIndex
1236 def parse_query s
1237 unimplemented
1238 end
1239 +
1240 + def save_thread t
1241 + t.each_dirty_message do |m|
1242 + update_message_state m
1243 + m.clear_dirty
1244 + end
1245 + end
1246 end
1247
1248 index_name = ENV['SUP_INDEX'] || $config[:index] || DEFAULT_INDEX
1249 diff --git a/lib/sup/message.rb b/lib/sup/message.rb
1250 index f3ac874..76ce330 100644
1251 --- a/lib/sup/message.rb
1252 +++ b/lib/sup/message.rb
1253 @@ -182,11 +182,8 @@ class Message
1254 ## don't tempt me.
1255 def sanitize_message_id mid; mid.gsub(/(\s|[^\000-\177])+/, "")[0..254] end
1256
1257 - def save_state index
1258 - return unless @dirty
1259 - index.update_message_state self
1260 + def clear_dirty
1261 @dirty = false
1262 - true
1263 end
1264
1265 def has_label? t; @labels.member? t; end
1266 diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
1267 index 82f258b..c4a7d38 100644
1268 --- a/lib/sup/modes/thread-index-mode.rb
1269 +++ b/lib/sup/modes/thread-index-mode.rb
1270 @@ -477,7 +477,7 @@ EOS
1271 BufferManager.say("Saving threads...") do |say_id|
1272 dirty_threads.each_with_index do |t, i|
1273 BufferManager.say "Saving modified thread #{i + 1} of #{dirty_threads.length}...", say_id
1274 - t.save_state Index
1275 + Index.save_thread t
1276 end
1277 end
1278 end
1279 diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb
1280 index 2300305..3fdf1f6 100644
1281 --- a/lib/sup/thread.rb
1282 +++ b/lib/sup/thread.rb
1283 @@ -112,7 +112,7 @@ class Thread
1284
1285 def set_labels l; each { |m, *o| m && m.labels = l }; end
1286 def has_label? t; any? { |m, *o| m && m.has_label?(t) }; end
1287 - def save_state index; each { |m, *o| m && m.save_state(index) }; end
1288 + def each_dirty_message; each { |m, *o| m && m.dirty? && yield(m) }; end
1289
1290 def direct_participants
1291 map { |m, *o| [m.from] + m.to if m }.flatten.compact.uniq
1292 --
1293 1.6.3.3
1294
1295
1296 From rlane@club.cc.cmu.edu Tue Dec 29 20:38:03 2009
1297 From: rlane@club.cc.cmu.edu (Rich Lane)
1298 Date: Tue, 29 Dec 2009 17:38:03 -0800
1299 Subject: [sup-devel] [PATCH 2/4] async thread indexing
1300 In-Reply-To: <1262137085-25928-1-git-send-email-rlane@club.cc.cmu.edu>
1301 References: <1262137085-25928-1-git-send-email-rlane@club.cc.cmu.edu>
1302 Message-ID: <1262137085-25928-2-git-send-email-rlane@club.cc.cmu.edu>
1303
1304 ---
1305 bin/sup | 2 ++
1306 lib/sup/index.rb | 26 +++++++++++++++++++++++++-
1307 lib/sup/modes/thread-index-mode.rb | 2 +-
1308 3 files changed, 28 insertions(+), 2 deletions(-)
1309
1310 diff --git a/bin/sup b/bin/sup
1311 index 471e833..f9ed7d5 100755
1312 --- a/bin/sup
1313 +++ b/bin/sup
1314 @@ -141,6 +141,7 @@ Index.lock_interactively or exit
1315 begin
1316 Redwood::start
1317 Index.load
1318 + Index.start_sync_worker unless $opts[:no_threads]
1319
1320 $die = false
1321 trap("TERM") { |x| $die = true }
1322 @@ -329,6 +330,7 @@ ensure
1323
1324 HookManager.run "shutdown"
1325
1326 + Index.stop_sync_worker
1327 Redwood::finish
1328 stop_cursing
1329 Redwood::Logger.remove_all_sinks!
1330 diff --git a/lib/sup/index.rb b/lib/sup/index.rb
1331 index 5d8d714..1131ec7 100644
1332 --- a/lib/sup/index.rb
1333 +++ b/lib/sup/index.rb
1334 @@ -28,6 +28,8 @@ class BaseIndex
1335 def initialize dir=BASE_DIR
1336 @dir = dir
1337 @lock = Lockfile.new lockfile, :retries => 0, :max_age => nil
1338 + @sync_worker = nil
1339 + @sync_queue = Queue.new
1340 end
1341
1342 def lockfile; File.join @dir, "lock" end
1343 @@ -175,10 +177,32 @@ class BaseIndex
1344
1345 def save_thread t
1346 t.each_dirty_message do |m|
1347 - update_message_state m
1348 + if @sync_worker
1349 + @sync_queue << m
1350 + else
1351 + update_message_state m
1352 + end
1353 m.clear_dirty
1354 end
1355 end
1356 +
1357 + def start_sync_worker
1358 + @sync_worker = Redwood::reporting_thread('index sync') { run_sync_worker }
1359 + end
1360 +
1361 + def stop_sync_worker
1362 + return unless worker = @sync_worker
1363 + @sync_worker = nil
1364 + @sync_queue << :die
1365 + worker.join
1366 + end
1367 +
1368 + def run_sync_worker
1369 + while m = @sync_queue.deq
1370 + return if m == :die
1371 + update_message_state m
1372 + end
1373 + end
1374 end
1375
1376 index_name = ENV['SUP_INDEX'] || $config[:index] || DEFAULT_INDEX
1377 diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
1378 index c4a7d38..f6ea27c 100644
1379 --- a/lib/sup/modes/thread-index-mode.rb
1380 +++ b/lib/sup/modes/thread-index-mode.rb
1381 @@ -477,7 +477,7 @@ EOS
1382 BufferManager.say("Saving threads...") do |say_id|
1383 dirty_threads.each_with_index do |t, i|
1384 BufferManager.say "Saving modified thread #{i + 1} of #{dirty_threads.length}...", say_id
1385 - Index.save_thread t
1386 + Index.save_thread_async t
1387 end
1388 end
1389 end
1390 --
1391 1.6.3.3
1392
1393
1394 From rlane@club.cc.cmu.edu Tue Dec 29 20:38:04 2009
1395 From: rlane@club.cc.cmu.edu (Rich Lane)
1396 Date: Tue, 29 Dec 2009 17:38:04 -0800
1397 Subject: [sup-devel] [PATCH 3/4] immediate thread indexing
1398 In-Reply-To: <1262137085-25928-2-git-send-email-rlane@club.cc.cmu.edu>
1399 References: <1262137085-25928-1-git-send-email-rlane@club.cc.cmu.edu>
1400 <1262137085-25928-2-git-send-email-rlane@club.cc.cmu.edu>
1401 Message-ID: <1262137085-25928-3-git-send-email-rlane@club.cc.cmu.edu>
1402
1403 ---
1404 lib/sup/modes/inbox-mode.rb | 4 +++
1405 lib/sup/modes/thread-index-mode.rb | 40 +++++++++++++----------------------
1406 lib/sup/modes/thread-view-mode.rb | 7 ++++++
1407 3 files changed, 26 insertions(+), 25 deletions(-)
1408
1409 diff --git a/lib/sup/modes/inbox-mode.rb b/lib/sup/modes/inbox-mode.rb
1410 index ba095da..9220925 100644
1411 --- a/lib/sup/modes/inbox-mode.rb
1412 +++ b/lib/sup/modes/inbox-mode.rb
1413 @@ -34,6 +34,7 @@ class InboxMode < ThreadIndexMode
1414 cursor_thread.remove_label :inbox
1415 hide_thread cursor_thread
1416 regen_text
1417 + Index.save_thread thread
1418 end
1419
1420 def multi_archive threads
1421 @@ -50,6 +51,7 @@ class InboxMode < ThreadIndexMode
1422 hide_thread t
1423 end
1424 regen_text
1425 + threads.each { |t| Index.save_thread t }
1426 end
1427
1428 def read_and_archive
1429 @@ -66,6 +68,7 @@ class InboxMode < ThreadIndexMode
1430 cursor_thread.remove_label :inbox
1431 hide_thread cursor_thread
1432 regen_text
1433 + Index.save_thread thread
1434 end
1435
1436 def multi_read_and_archive threads
1437 @@ -86,6 +89,7 @@ class InboxMode < ThreadIndexMode
1438 regen_text
1439 end
1440
1441 + threads.each { |t| Index.save_thread t }
1442 end
1443
1444 def handle_unarchived_update sender, m
1445 diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
1446 index f6ea27c..5393189 100644
1447 --- a/lib/sup/modes/thread-index-mode.rb
1448 +++ b/lib/sup/modes/thread-index-mode.rb
1449 @@ -37,7 +37,6 @@ EOS
1450 k.add :toggle_spam, "Mark/unmark thread as spam", 'S'
1451 k.add :toggle_deleted, "Delete/undelete thread", 'd'
1452 k.add :kill, "Kill thread (never to be seen in inbox again)", '&'
1453 - k.add :save, "Save changes now", '$'
1454 k.add :jump_to_next_new, "Jump to next new thread", :tab
1455 k.add :reply, "Reply to latest message in a thread", 'r'
1456 k.add :reply_all, "Reply to all participants of the latest message in a thread", 'G'
1457 @@ -269,12 +268,14 @@ EOS
1458 UndoManager.register "toggling thread starred status", undo
1459 update_text_for_line curpos
1460 cursor_down
1461 + Index.save_thread t
1462 end
1463
1464 def multi_toggle_starred threads
1465 UndoManager.register "toggling #{threads.size.pluralize 'thread'} starred status",
1466 threads.map { |t| actually_toggle_starred t }
1467 regen_text
1468 + threads.each { |t| Index.save_thread t }
1469 end
1470
1471 ## returns an undo lambda
1472 @@ -352,12 +353,14 @@ EOS
1473 undo = actually_toggle_archived t
1474 UndoManager.register "deleting/undeleting thread #{t.first.id}", undo, lambda { update_text_for_line curpos }
1475 update_text_for_line curpos
1476 + Index.save_thread t
1477 end
1478
1479 def multi_toggle_archived threads
1480 undos = threads.map { |t| actually_toggle_archived t }
1481 UndoManager.register "deleting/undeleting #{threads.size.pluralize 'thread'}", undos, lambda { regen_text }
1482 regen_text
1483 + threads.each { |t| Index.save_thread t }
1484 end
1485
1486 def toggle_new
1487 @@ -365,11 +368,13 @@ EOS
1488 t.toggle_label :unread
1489 update_text_for_line curpos
1490 cursor_down
1491 + Index.save_thread t
1492 end
1493
1494 def multi_toggle_new threads
1495 threads.each { |t| t.toggle_label :unread }
1496 regen_text
1497 + threads.each { |t| Index.save_thread t }
1498 end
1499
1500 def multi_toggle_tagged threads
1501 @@ -385,6 +390,7 @@ EOS
1502
1503 def multi_join_threads threads
1504 @ts.join_threads threads or return
1505 + threads.each { |t| Index.save_thread t }
1506 @tags.drop_all_tags # otherwise we have tag pointers to invalid threads!
1507 update
1508 end
1509 @@ -421,6 +427,7 @@ EOS
1510 UndoManager.register "marking/unmarking #{threads.size.pluralize 'thread'} as spam",
1511 undos, lambda { regen_text }
1512 regen_text
1513 + threads.each { |t| Index.save_thread t }
1514 end
1515
1516 def toggle_deleted
1517 @@ -434,6 +441,7 @@ EOS
1518 UndoManager.register "deleting/undeleting #{threads.size.pluralize 'thread'}",
1519 undos, lambda { regen_text }
1520 regen_text
1521 + threads.each { |t| Index.save_thread t }
1522 end
1523
1524 def kill
1525 @@ -458,29 +466,7 @@ EOS
1526
1527 regen_text
1528 BufferManager.flash "#{threads.size.pluralize 'thread'} killed."
1529 - end
1530 -
1531 - def save background=true
1532 - if background
1533 - Redwood::reporting_thread("saving thread") { actually_save }
1534 - else
1535 - actually_save
1536 - end
1537 - end
1538 -
1539 - def actually_save
1540 - @save_thread_mutex.synchronize do
1541 - BufferManager.say("Saving contacts...") { ContactManager.instance.save }
1542 - dirty_threads = @mutex.synchronize { (@threads + @hidden_threads.keys).select { |t| t.dirty? } }
1543 - next if dirty_threads.empty?
1544 -
1545 - BufferManager.say("Saving threads...") do |say_id|
1546 - dirty_threads.each_with_index do |t, i|
1547 - BufferManager.say "Saving modified thread #{i + 1} of #{dirty_threads.length}...", say_id
1548 - Index.save_thread_async t
1549 - end
1550 - end
1551 - end
1552 + threads.each { |t| Index.save_thread t }
1553 end
1554
1555 def cleanup
1556 @@ -492,7 +478,8 @@ EOS
1557 sleep 0.1 # TODO: necessary?
1558 BufferManager.erase_flash
1559 end
1560 - save false
1561 + dirty_threads = @mutex.synchronize { (@threads + @hidden_threads.keys).select { |t| t.dirty? } }
1562 + fail "dirty threads remain" unless dirty_threads.empty?
1563 super
1564 end
1565
1566 @@ -546,6 +533,7 @@ EOS
1567 end
1568
1569 UpdateManager.relay self, :labeled, thread.first
1570 + Index.save_thread thread
1571 end
1572
1573 def multi_edit_labels threads
1574 @@ -582,6 +570,8 @@ EOS
1575 end
1576 regen_text
1577 end
1578 +
1579 + threads.each { |t| Index.save_thread t }
1580 end
1581
1582 def reply type_arg=nil
1583 diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
1584 index 55d81b9..99abb04 100644
1585 --- a/lib/sup/modes/thread-view-mode.rb
1586 +++ b/lib/sup/modes/thread-view-mode.rb
1587 @@ -131,6 +131,7 @@ EOS
1588 @layout[earliest].state = :detailed if earliest.has_label?(:unread) || @thread.size == 1
1589
1590 @thread.remove_label :unread
1591 + Index.save_thread @thread
1592 regen_text
1593 end
1594
1595 @@ -258,6 +259,7 @@ EOS
1596 new_labels.each { |l| LabelManager << l }
1597 update
1598 UpdateManager.relay self, :labeled, @thread.first
1599 + Index.save_thread @thread
1600 UndoManager.register "labeling thread" do
1601 @thread.labels = old_labels
1602 UpdateManager.relay self, :labeled, @thread.first
1603 @@ -284,6 +286,7 @@ EOS
1604 ## star to the display
1605 update
1606 UpdateManager.relay self, :single_message_labeled, m
1607 + Index.save_thread @thread
1608 end
1609
1610 ## called when someone presses enter when the cursor is highlighting
1611 @@ -478,6 +481,7 @@ EOS
1612 dispatch op do
1613 @thread.remove_label :inbox
1614 UpdateManager.relay self, :archived, @thread.first
1615 + Index.save_thread @thread
1616 UndoManager.register "archiving 1 thread" do
1617 @thread.apply_label :inbox
1618 UpdateManager.relay self, :unarchived, @thread.first
1619 @@ -489,6 +493,7 @@ EOS
1620 dispatch op do
1621 @thread.apply_label :spam
1622 UpdateManager.relay self, :spammed, @thread.first
1623 + Index.save_thread @thread
1624 UndoManager.register "marking 1 thread as spam" do
1625 @thread.remove_label :spam
1626 UpdateManager.relay self, :unspammed, @thread.first
1627 @@ -500,6 +505,7 @@ EOS
1628 dispatch op do
1629 @thread.apply_label :deleted
1630 UpdateManager.relay self, :deleted, @thread.first
1631 + Index.save_thread @thread
1632 UndoManager.register "deleting 1 thread" do
1633 @thread.remove_label :deleted
1634 UpdateManager.relay self, :undeleted, @thread.first
1635 @@ -511,6 +517,7 @@ EOS
1636 dispatch op do
1637 @thread.apply_label :unread
1638 UpdateManager.relay self, :unread, @thread.first
1639 + Index.save_thread @thread
1640 end
1641 end
1642
1643 --
1644 1.6.3.3
1645
1646
1647 From rlane@club.cc.cmu.edu Tue Dec 29 20:38:05 2009
1648 From: rlane@club.cc.cmu.edu (Rich Lane)
1649 Date: Tue, 29 Dec 2009 17:38:05 -0800
1650 Subject: [sup-devel] [PATCH 4/4] force the index sync thread to give up the
1651 cpu
1652 In-Reply-To: <1262137085-25928-3-git-send-email-rlane@club.cc.cmu.edu>
1653 References: <1262137085-25928-1-git-send-email-rlane@club.cc.cmu.edu>
1654 <1262137085-25928-2-git-send-email-rlane@club.cc.cmu.edu>
1655 <1262137085-25928-3-git-send-email-rlane@club.cc.cmu.edu>
1656 Message-ID: <1262137085-25928-4-git-send-email-rlane@club.cc.cmu.edu>
1657
1658 ---
1659 lib/sup/index.rb | 2 ++
1660 1 files changed, 2 insertions(+), 0 deletions(-)
1661
1662 diff --git a/lib/sup/index.rb b/lib/sup/index.rb
1663 index 1131ec7..4f491d6 100644
1664 --- a/lib/sup/index.rb
1665 +++ b/lib/sup/index.rb
1666 @@ -201,6 +201,8 @@ class BaseIndex
1667 while m = @sync_queue.deq
1668 return if m == :die
1669 update_message_state m
1670 + # Necessary to keep Xapian calls from lagging the UI too much.
1671 + sleep 0.03
1672 end
1673 end
1674 end
1675 --
1676 1.6.3.3
1677
1678
1679 From tero@tilus.net Tue Dec 29 21:41:02 2009
1680 From: tero@tilus.net (Tero Tilus)
1681 Date: Wed, 30 Dec 2009 04:41:02 +0200
1682 Subject: [sup-devel] [PATCH] XapianIndex.each_message_in_thread_for
1683 yields messages in cronological order
1684 In-Reply-To: <1261938751-sup-9421@zyrg.net>
1685 References: <1261485246-sup-4236@tilus.net> <1261938751-sup-9421@zyrg.net>
1686 Message-ID: <1262136474-sup-312@tilus.net>
1687
1688 Rich Lane, 2009-12-27 23:37:
1689 > Hmm. Threading should only depend on refs and reply-tos, not the date.
1690
1691 I think threading _should_ depend on date too. Not of course the
1692 parent-connections, but the ordering of siblings. So even this bug(?)
1693 aside the messages should afaik be processed in chronological order
1694 when threading to get siblings ordered by date.
1695
1696 > Could you give a short example (just the relevant headers) of a
1697 > situation where this patch helps?
1698 >
1699 > What you describe sounds like a malformed message. What client is
1700 > generating them / how common are they?
1701
1702 For what I know you might trigger this by replying to many messages at
1703 once and thus having a list of ids in-reply-to header (in whatever
1704 order of course, rfc doesn't require any particular order) instead of
1705 one. Then when you reply to this message using MUA that is bold
1706 enough to try to form References: with the standard in-reply-to +
1707 my-id method even if RFC 2822 says "trying to form a References: field
1708 for a reply that has multiple parents is discouraged and how to do so
1709 is not defined in this document". You end up having References: which
1710 has bunch of (thread-wise) random ids in random order instead of the
1711 rfc-specified original, reply, replytoreply, etc. chain of ids.
1712
1713 Workaround is easy. Just process messages sorted by date so the
1714 in-reply-to fields of original messages override the fscked up
1715 references of some latter mangled replies, which of course appear
1716 _after_ any of the messages which threading they could possibly fsck
1717 ... they wouldn't be replies if they didn't. ;)
1718
1719 This thread was the itch that made me scratch. I haven't really
1720 looked for other twisted threads, but I've got several thousands of
1721 mails from these same authors so I assume this is not singular case.
1722 User agent headers also included.
1723
1724 Fscked up threading looks like this (produced by current git next)
1725
1726 + Person Three, joulu 18 (2 weeks ago)
1727 + Person Four, joulu 18 (2 weeks ago)
1728 + Person Four, joulu 17 (2 weeks ago)
1729 + Person One, joulu 17 (2 weeks ago)
1730 + Person Five, joulu 17 (2 weeks ago)
1731 + Person Four, joulu 17 (2 weeks ago)
1732 + Person Three, joulu 15 (2 weeks ago)
1733 + Person Two, joulu 15 (2 weeks ago)
1734 + Person One, joulu 15 (2 weeks ago)
1735 + Person Four, joulu 18 (2 weeks ago)
1736 + Person Three, joulu 18 (2 weeks ago)
1737 + Person Two, joulu 18 (2 weeks ago)
1738 + Person One, joulu 18 (2 weeks ago)
1739 + Person One, joulu 19 (2 weeks ago)
1740
1741 Correct like this (produced by current git next + threading and date
1742 format patches, and that's why date formats differ too)
1743
1744 + Person One, 15. 12:38 (2 weeks ago)
1745 + Person Two, 15. 14:17 (2 weeks ago)
1746 + Person Three, 15. 14:35 (2 weeks ago)
1747 + Person Four, 17. 01:47 (2 weeks ago)
1748 + Person Five, 17. 02:28 (2 weeks ago)
1749 + Person One, 17. 09:08 (2 weeks ago)
1750 + Person Four, 17. 11:26 (2 weeks ago)
1751 + Person Four, 18. 01:15 (2 weeks ago)
1752 + Person Three, 18. 10:15 (2 weeks ago)
1753 + Person Two, 18. 12:16 (2 weeks ago)
1754 + Person One, 18. 13:30 (2 weeks ago)
1755 + Person One, 19. 13:43 (2 weeks ago)
1756 + Person Four, 18. 14:16 (2 weeks ago)
1757 + Person Three, 18. 14:53 (2 weeks ago)
1758
1759 The headers in the order the messages appear in correct threading.
1760
1761 Date: Tue, 15 Dec 2009 12:38:28 +0200
1762 From: Person One
1763 Message-ID: <20091215103828.GA8328 at domain-one>
1764 User-Agent: Mutt/1.5.20 (2009-06-14)
1765
1766 Date: Tue, 15 Dec 2009 14:17:38 +0200
1767 From: Person Two
1768 Message-ID: <1260879458.2530.42.camel at havelock>
1769 In-Reply-To: <20091215103828.GA8328 at domain-one>
1770 References: <20091215103828.GA8328 at domain-one>
1771 X-Mailer: Evolution 2.28.1
1772
1773 Date: Tue, 15 Dec 2009 14:35:01 +0200 (EET)
1774 From: Person Three
1775 Message-ID: <alpine.LRH.1.10.0912151434380.12088 at domain-two>
1776 In-Reply-To: <20091215103828.GA8328 at domain-one>
1777 References: <20091215103828.GA8328 at domain-one>
1778 User-Agent: Alpine 1.10 (LRH 962 2008-03-14)
1779
1780 Date: Thu, 17 Dec 2009 01:47:59 +0200
1781 From: Person Four
1782 Message-ID: <4B2971AF.7060808 at domain-three>
1783 In-Reply-To: <20091215103828.GA8328 at domain-one>
1784 References: <20091215103828.GA8328 at domain-one>
1785 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
1786 rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0
1787
1788 Date: Thu, 17 Dec 2009 02:28:55 +0200 (EET)
1789 From: Person Five
1790 Message-ID: <alpine.DEB.2.00.0912170214460.25488 at domain-five>
1791 In-Reply-To: <4B2971AF.7060808 at domain-three>
1792 References: <20091215103828.GA8328 at domain-one>
1793 <4B2971AF.7060808 at domain-three>
1794 User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
1795
1796 Date: Thu, 17 Dec 2009 09:08:31 +0200
1797 From: Person One
1798 Message-ID: <20091217070831.GD27029 at domain-one>
1799 In-Reply-To: <4B2971AF.7060808 at domain-three>
1800 References: <20091215103828.GA8328 at domain-one>
1801 <4B2971AF.7060808 at domain-three>
1802 User-Agent: Mutt/1.5.20 (2009-06-14)
1803
1804 Date: Thu, 17 Dec 2009 11:26:15 +0200
1805 From: Person Four
1806 Message-ID: <4B29F937.7080909 at domain-four>
1807 In-Reply-To: <20091217070831.GD27029 at domain-one>
1808 References: <20091215103828.GA8328 at domain-one> <4B2971AF.7060808 at domain-three>
1809 <20091217070831.GD27029 at domain-one>
1810 User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
1811
1812 Date: Fri, 18 Dec 2009 01:15:33 +0200
1813 From: Person Four
1814 Message-ID: <4B2ABB95.6010301 at domain-three>
1815 In-Reply-To: <20091215103828.GA8328 at domain-one>
1816 References: <20091215103828.GA8328 at domain-one>
1817 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
1818 rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0
1819
1820 Date: Fri, 18 Dec 2009 10:15:45 +0200 (EET)
1821 From: Person Three
1822 Message-ID: <alpine.LRH.1.10.0912181012570.30704 at domain-two>
1823 In-Reply-To: <4B2ABB95.6010301 at domain-three>
1824 References: <20091215103828.GA8328 at domain-one>
1825 <4B2ABB95.6010301 at domain-three>
1826 User-Agent: Alpine 1.10 (LRH 962 2008-03-14)
1827
1828 Date: Fri, 18 Dec 2009 12:16:57 +0200
1829 From: Person Two
1830 Message-ID: <1261131417.2530.179.camel at havelock>
1831 In-Reply-To: <alpine.LRH.1.10.0912181012570.30704 at domain-two>
1832 References: <20091215103828.GA8328 at domain-one>
1833 <4B2ABB95.6010301 at domain-three>
1834 <alpine.LRH.1.10.0912181012570.30704 at domain-two>
1835 X-Mailer: Evolution 2.28.1
1836
1837 Date: Fri, 18 Dec 2009 13:30:10 +0200
1838 From: Person One
1839 Message-ID: <20091218113010.GI3160 at domain-one>
1840 In-Reply-To: <1261131417.2530.179.camel at havelock>
1841 <alpine.LRH.1.10.0912181012570.30704 at domain-two>
1842 <4B2ABB95.6010301 at domain-three> <4B29F937.7080909 at domain-four>
1843 <20091217070831.GD27029 at domain-one>
1844 <alpine.DEB.2.00.0912170214460.25488 at domain-five>
1845 <4B2971AF.7060808 at domain-three>
1846 <alpine.LRH.1.10.0912151434380.12088 at domain-two>
1847 <1260879458.2530.42.camel at havelock>
1848 <20091215103828.GA8328 at domain-one>
1849 User-Agent: Mutt/1.5.20 (2009-06-14)
1850
1851 Date: Sat, 19 Dec 2009 13:43:14 +0200
1852 From: Person One
1853 Message-ID: <20091219114314.GA15682 at domain-six>
1854 In-Reply-To: <20091218113010.GI3160 at domain-one>
1855 References: <alpine.LRH.1.10.0912181012570.30704 at domain-two>
1856 <4B2ABB95.6010301 at domain-three> <4B29F937.7080909 at domain-four>
1857 <20091217070831.GD27029 at domain-one>
1858 <alpine.DEB.2.00.0912170214460.25488 at domain-five>
1859 <4B2971AF.7060808 at domain-three>
1860 <alpine.LRH.1.10.0912151434380.12088 at domain-two>
1861 <1260879458.2530.42.camel at havelock>
1862 <20091215103828.GA8328 at domain-one>
1863 <20091218113010.GI3160 at domain-one>
1864 User-Agent: Mutt/1.5.18 (2008-05-17)
1865
1866 --
1867 Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
1868
1869 From tero@tilus.net Tue Dec 29 22:09:19 2009
1870 From: tero@tilus.net (Tero Tilus)
1871 Date: Wed, 30 Dec 2009 05:09:19 +0200
1872 Subject: [sup-devel] [PATCH] Make sup-tweak-labels work as advertised with
1873 no sources listed
1874 Message-ID: <1262142124-sup-1397@tilus.net>
1875
1876 Signed-off-by: Tero Tilus <tero at tilus.net>
1877 ---
1878
1879 It is checked later (line 68) on if there were any sources to work
1880 with. This 'if ARGV.empty?' just prevents using sup-tweak-labels for
1881 all sources.
1882
1883 bin/sup-tweak-labels | 1 -
1884 1 files changed, 0 insertions(+), 1 deletions(-)
1885
1886 diff --git a/bin/sup-tweak-labels b/bin/sup-tweak-labels
1887 index 90f6a57..9bb97b2 100755
1888 --- a/bin/sup-tweak-labels
1889 +++ b/bin/sup-tweak-labels
1890 @@ -58,7 +58,6 @@ add_labels = opts[:add].to_set_of_symbols ","
1891 remove_labels = opts[:remove].to_set_of_symbols ","
1892
1893 Trollop::die "nothing to do: no labels to add or remove" if add_labels.empty? && remove_labels.empty?
1894 -Trollop::die "no sources specified" if ARGV.empty?
1895
1896 Redwood::start
1897 index = Redwood::Index.init
1898 --
1899 Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
1900
1901 From sup-bugs@masanjin.net Tue Dec 29 22:09:20 2009
1902 From: sup-bugs@masanjin.net (anonymous)
1903 Date: Wed, 30 Dec 2009 03:09:20 +0000
1904 Subject: [sup-devel] [issue38] "undefined method `downcase' for
1905 nil:NilClass" while polling or sup-sync
1906 In-Reply-To: <1262142560.38.0.813970281535.issue38@masanjin.net>
1907 Message-ID: <1262142560.38.0.813970281535.issue38@masanjin.net>
1908
1909
1910 New submission from anonymous:
1911
1912 I tried to add one of my email accounts ans sup-sync crashed on me with this error:
1913
1914 /usr/lib/ruby/vendor_gems/1.8/gems/rmail-1.0.0/lib/rmail/header.rb:537:in
1915 `content_type': undefined method `downcase' for nil:NilClass (NoMethodError)
1916 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/message.rb:438:in
1917 `message_to_chunks'
1918 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/message.rb:438:in `map'
1919 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/message.rb:438:in
1920 `message_to_chunks'
1921 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/message.rb:243:in
1922 `load_from_source!'
1923 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/message.rb:339:in
1924 `build_from_source'
1925 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/poll.rb:163:in
1926 `each_message_from'
1927 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/imap.rb:197:in `each'
1928 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/imap.rb:185:in `upto'
1929 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/imap.rb:185:in `each'
1930 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/util.rb:560:in `send'
1931 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/util.rb:560:in `__pass'
1932 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/util.rb:547:in
1933 `method_missing'
1934 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/poll.rb:157:in
1935 `each_message_from'
1936 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `send'
1937 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/util.rb:520:in
1938 `method_missing'
1939 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/bin/sup-sync:146
1940 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/bin/sup-sync:141:in `each'
1941 from /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/bin/sup-sync:141
1942 from /usr/bin/sup-sync:19:in `load'
1943 from /usr/bin/sup-sync:19
1944
1945 So I just started sup and got this after some time:
1946
1947 --- NoMethodError from thread: poll after loading inbox
1948 undefined method `downcase' for nil:NilClass
1949 /usr/lib/ruby/vendor_gems/1.8/gems/rmail-1.0.0/lib/rmail/header.rb:537:in
1950 `content_type'
1951 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/message.rb:438:in
1952 `message_to_chunks'
1953 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/message.rb:438:in `map'
1954 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/message.rb:438:in
1955 `message_to_chunks'
1956 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/message.rb:243:in
1957 `load_from_source!'
1958 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/message.rb:339:in
1959 `build_from_source'
1960 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/poll.rb:163:in
1961 `each_message_from'
1962 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/imap.rb:197:in `each'
1963 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/imap.rb:185:in `upto'
1964 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/imap.rb:185:in `each'
1965 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/util.rb:560:in `send'
1966 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/util.rb:560:in `__pass'
1967 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/util.rb:547:in `method_missing'
1968 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/poll.rb:157:in
1969 `each_message_from'
1970 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/poll.rb:109:in `do_poll'
1971 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/poll.rb:97:in `each'
1972 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/poll.rb:97:in `do_poll'
1973 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/poll.rb:96:in `synchronize'
1974 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/poll.rb:96:in `do_poll'
1975 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `send'
1976 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `method_missing'
1977 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/modes/poll-mode.rb:15:in `poll'
1978 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/poll.rb:47:in `poll_with_sources'
1979 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/poll.rb:62:in `poll'
1980 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `send'
1981 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/util.rb:520:in `method_missing'
1982 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/bin/sup:200
1983 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup.rb:77:in `reporting_thread'
1984 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup.rb:75:in `initialize'
1985 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup.rb:75:in `new'
1986 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup.rb:75:in `reporting_thread'
1987 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/bin/sup:200
1988 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:669:in
1989 `call'
1990 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:669:in
1991 `__unprotected_load_threads'
1992 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:610:in
1993 `call'
1994 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:610:in
1995 `load_n_threads_background'
1996 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup.rb:77:in `reporting_thread'
1997 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup.rb:75:in `initialize'
1998 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup.rb:75:in `new'
1999 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup.rb:75:in `reporting_thread'
2000 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:608:in
2001 `load_n_threads_background'
2002 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/lib/sup/modes/thread-index-mode.rb:679:in
2003 `__unprotected_load_threads'
2004 (eval):12:in `load_threads'
2005 /usr/lib/ruby/vendor_gems/1.8/gems/sup-999/bin/sup:200
2006 /usr/bin/sup:19:in `load'
2007 /usr/bin/sup:19
2008
2009
2010
2011 It seems there is some malconstructed message somewhere that produces a nil
2012 pointer while being parsed...I will see if I can find out which one this might be...
2013
2014 ----------
2015 messages: 100
2016 nosy: anonymous
2017 priority: bug
2018 ruby_version: ruby 1.8.7 (2009-04-08 patchlevel 160) [i686-linux]
2019 status: unread
2020 sup_version: git
2021 title: "undefined method `downcase' for nil:NilClass" while polling or sup-sync
2022
2023 _________________________________________
2024 Sup issue tracker <sup-bugs at masanjin.net>
2025 <http://masanjin.net/sup-bugs/issue38>
2026 _________________________________________
2027
2028 From tero@tilus.net Tue Dec 29 23:06:07 2009
2029 From: tero@tilus.net (Tero Tilus)
2030 Date: Wed, 30 Dec 2009 06:06:07 +0200
2031 Subject: [sup-devel] [PATCH] reuse old account info with --foce-account
2032 user@hostname option
2033 Message-ID: <1262145664-sup-4855@tilus.net>
2034
2035 Signed-off-by: Tero Tilus <tero at tilus.net>
2036 ---
2037 bin/sup-add | 20 ++++++++++++++------
2038 1 files changed, 14 insertions(+), 6 deletions(-)
2039
2040 diff --git a/bin/sup-add b/bin/sup-add
2041 index e27a0eb..c53378d 100755
2042 --- a/bin/sup-add
2043 +++ b/bin/sup-add
2044 @@ -39,6 +39,7 @@ EOS
2045 opt :unusual, "Do not automatically poll these sources for new messages."
2046 opt :labels, "A comma-separated set of labels to apply to all messages from this source", :type => String
2047 opt :force_new, "Create a new account for this source, even if one already exists."
2048 + opt :force_account, "Reuse previously defined account user at hostname.", :type => String
2049 end
2050
2051 Trollop::die "require one or more sources" if ARGV.empty?
2052 @@ -56,13 +57,20 @@ def get_login_info uri, sources
2053
2054 username, password = nil, nil
2055 unless accounts.empty? || $opts[:force_new]
2056 - say "Would you like to use the same account as for a previous source for #{uri}?"
2057 - choose do |menu|
2058 - accounts.each do |host, olduser, oldpw|
2059 - menu.choice("Use the account info for #{olduser}@#{host}") { username, password = olduser, oldpw }
2060 + if $opts[:force_account]
2061 + host, username, password = accounts.find { |h, u, p| $opts[:force_account] == "#{u}@#{h}" }
2062 + unless username && password
2063 + say "No previous account #{$opts[:force_account].inspect} found."
2064 + end
2065 + else
2066 + say "Would you like to use the same account as for a previous source for #{uri}?"
2067 + choose do |menu|
2068 + accounts.each do |host, olduser, oldpw|
2069 + menu.choice("Use the account info for #{olduser}@#{host}") { username, password = olduser, oldpw }
2070 + end
2071 + menu.choice("Use a new account") { }
2072 + menu.prompt = "Account selection? "
2073 end
2074 - menu.choice("Use a new account") { }
2075 - menu.prompt = "Account selection? "
2076 end
2077 end
2078
2079 --
2080 Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
2081
2082 From wmorgan-sup@masanjin.net Wed Dec 30 09:10:54 2009
2083 From: wmorgan-sup@masanjin.net (William Morgan)
2084 Date: Wed, 30 Dec 2009 06:10:54 -0800
2085 Subject: [sup-devel] [PATCH] XapianIndex.each_message_in_thread_for
2086 yields messages in cronological order
2087 In-Reply-To: <1262136474-sup-312@tilus.net>
2088 References: <1261485246-sup-4236@tilus.net> <1261938751-sup-9421@zyrg.net>
2089 <1262136474-sup-312@tilus.net>
2090 Message-ID: <1262182085-sup-1405@masanjin.net>
2091
2092 Reformatted excerpts from Tero Tilus's message of 2009-12-29:
2093 > For what I know you might trigger this by replying to many messages at
2094 > once and thus having a list of ids in-reply-to header (in whatever
2095 > order of course, rfc doesn't require any particular order) instead of
2096 > one. Then when you reply to this message using MUA that is bold
2097 > enough to try to form References: with the standard in-reply-to +
2098 > my-id method even if RFC 2822 says "trying to form a References: field
2099 > for a reply that has multiple parents is discouraged and how to do so
2100 > is not defined in this document". You end up having References: which
2101 > has bunch of (thread-wise) random ids in random order instead of the
2102 > rfc-specified original, reply, replytoreply, etc. chain of ids.
2103
2104 It's worth reading the top bit of http://www.jwz.org/doc/threading.html
2105 for what In-reply-to: and References: look like in practice. (Basically:
2106 a mess, and the references: header in particular can be truncated in any
2107 way that any MUA feels is reasonable.)
2108
2109 The threading used by the Ferret indexer is a pretty faithful
2110 reproduction of the algorithm described on that page. I'm not that
2111 familiar with the one used by the Xapian index, but a cursory
2112 examination suggests it's a little more fragile.
2113 --
2114 William <wmorgan-sup at masanjin.net>
2115
2116 From rlane@club.cc.cmu.edu Wed Dec 30 12:01:37 2009
2117 From: rlane@club.cc.cmu.edu (Rich Lane)
2118 Date: Wed, 30 Dec 2009 12:01:37 -0500
2119 Subject: [sup-devel] [PATCH] XapianIndex.each_message_in_thread_for
2120 yields messages in cronological order
2121 In-Reply-To: <1262182085-sup-1405@masanjin.net>
2122 References: <1261485246-sup-4236@tilus.net> <1261938751-sup-9421@zyrg.net>
2123 <1262136474-sup-312@tilus.net> <1262182085-sup-1405@masanjin.net>
2124 Message-ID: <1262190807-sup-434@zyrg.net>
2125
2126 Excerpts from William Morgan's message of Wed Dec 30 09:10:54 -0500 2009:
2127 > Reformatted excerpts from Tero Tilus's message of 2009-12-29:
2128 > > For what I know you might trigger this by replying to many messages at
2129 > > once and thus having a list of ids in-reply-to header (in whatever
2130 > > order of course, rfc doesn't require any particular order) instead of
2131 > > one. Then when you reply to this message using MUA that is bold
2132 > > enough to try to form References: with the standard in-reply-to +
2133 > > my-id method even if RFC 2822 says "trying to form a References: field
2134 > > for a reply that has multiple parents is discouraged and how to do so
2135 > > is not defined in this document". You end up having References: which
2136 > > has bunch of (thread-wise) random ids in random order instead of the
2137 > > rfc-specified original, reply, replytoreply, etc. chain of ids.
2138 >
2139 > It's worth reading the top bit of http://www.jwz.org/doc/threading.html
2140 > for what In-reply-to: and References: look like in practice. (Basically:
2141 > a mess, and the references: header in particular can be truncated in any
2142 > way that any MUA feels is reasonable.)
2143 >
2144 > The threading used by the Ferret indexer is a pretty faithful
2145 > reproduction of the algorithm described on that page. I'm not that
2146 > familiar with the one used by the Xapian index, but a cursory
2147 > examination suggests it's a little more fragile.
2148
2149 I'm assuming you're talking about each_message_in_thread_for, since
2150 that's the only Index method that deals with threading.
2151
2152 In what order does ThreadSet#add_message expect to get messages in?
2153 This determines the order from Index#each_message_in_thread_for. I'd
2154 assumed an arbitrary ordering would work because add_message needs to
2155 handle this case anyway to work with messages arriving out of order from
2156 the source (which happens all the time) and then added to the Inbox
2157 threadset. AFAICT JWZ's algorithm should work regardless of the order
2158 messages handed to it.
2159
2160 From hyperbolist@gmail.com Thu Dec 31 01:43:43 2009
2161 From: hyperbolist@gmail.com (Eric Sherman)
2162 Date: Thu, 31 Dec 2009 01:43:43 -0500
2163 Subject: [sup-devel] [PATCH] fixed a typo in parse_header
2164 Message-ID: <1262241818-sup-6917@changeling.local>
2165
2166 On the initial sup-sync when trying to use xapian for the first time, one
2167 of my headers apparently triggered this edge case.
2168
2169 ---
2170 lib/sup/message.rb | 2 +-
2171 1 files changed, 1 insertions(+), 1 deletions(-)
2172
2173 diff --git a/lib/sup/message.rb b/lib/sup/message.rb
2174 index 9d22508..bb7d4cd 100644
2175 --- a/lib/sup/message.rb
2176 +++ b/lib/sup/message.rb
2177 @@ -117,7 +117,7 @@ class Message
2178 @list_address = if header["list-post"]
2179 address = if header["list-post"] =~ /mailto:(.*?)[>\s$]/
2180 $1
2181 - elsif list-post =~ /@/
2182 + elsif header["list-post"] =~ /@/
2183 header["list-post"] # just try the whole fucking thing
2184 end
2185 address && Person.from_address(address)
2186 --
2187 1.6.5.7
2188
2189 From hyperbolist@gmail.com Thu Dec 31 09:48:25 2009
2190 From: hyperbolist@gmail.com (Eric Sherman)
2191 Date: Thu, 31 Dec 2009 09:48:25 -0500
2192 Subject: [sup-devel] [PATCH] fixed am/pm in thread-list-mode for ruby1.8
2193 Message-ID: <1262270484-sup-8396@changeling.local>
2194
2195 Here's a patch that gives the proper am/pm display for ruby1.8 if that's
2196 what's running.
2197
2198 ---
2199 lib/sup/util.rb | 4 ++--
2200 1 files changed, 2 insertions(+), 2 deletions(-)
2201
2202 diff --git a/lib/sup/util.rb b/lib/sup/util.rb
2203 index f99e1c1..1a2a447 100644
2204 --- a/lib/sup/util.rb
2205 +++ b/lib/sup/util.rb
2206 @@ -486,9 +486,9 @@ class Time
2207 strftime "%b %e"
2208 else
2209 if is_the_same_day? from
2210 - strftime("%l:%M%P")
2211 + (RUBY_VERSION =~ /^1.8/) ? strftime("%l:%M%p").downcase : strftime("%l:%M%P")
2212 elsif is_the_day_before? from
2213 - "Yest." + nearest_hour.strftime("%l%P")
2214 + "Yest." + ((RUBY_VERSION =~ /^1.8/) ? nearest_hour.strftime("%l%p").downcase : nearest_hour.strftime("%l%P"))
2215 else
2216 strftime "%b %e"
2217 end
2218 --
2219 1.6.5.7
2220
2221 From hyperbolist@gmail.com Thu Dec 31 11:44:17 2009
2222 From: hyperbolist@gmail.com (Eric Sherman)
2223 Date: Thu, 31 Dec 2009 11:44:17 -0500
2224 Subject: [sup-devel] [PATCH] added colorized dates in thread-index-mode
2225 Message-ID: <1262277743-sup-775@changeling.local>
2226
2227 ---
2228 lib/sup/colormap.rb | 1 +
2229 lib/sup/modes/thread-index-mode.rb | 2 +-
2230 2 files changed, 2 insertions(+), 1 deletions(-)
2231
2232 diff --git a/lib/sup/colormap.rb b/lib/sup/colormap.rb
2233 index fbbbfc9..c4a4024 100644
2234 --- a/lib/sup/colormap.rb
2235 +++ b/lib/sup/colormap.rb
2236 @@ -50,6 +50,7 @@ class Colormap
2237 :system_buf => { :fg => "blue", :bg => "default" },
2238 :regular_buf => { :fg => "white", :bg => "default" },
2239 :modified_buffer => { :fg => "yellow", :bg => "default", :attrs => ["bold"] },
2240 + :date => { :fg => "white", :bg => "default"},
2241 }
2242
2243 def initialize
2244 diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
2245 index 12a76f9..b3172e4 100644
2246 --- a/lib/sup/modes/thread-index-mode.rb
2247 +++ b/lib/sup/modes/thread-index-mode.rb
2248 @@ -849,7 +849,7 @@ protected
2249
2250 [
2251 [:tagged_color, @tags.tagged?(t) ? ">" : " "],
2252 - [:none, sprintf("%#{@date_width}s", date)],
2253 + [:date_color, sprintf("%#{@date_width}s", date)],
2254 (starred ? [:starred_color, "*"] : [:none, " "]),
2255 ] +
2256 from +
2257 --
2258 1.6.5.7
2259
2260 From wmorgan-sup@masanjin.net Thu Dec 31 13:56:19 2009
2261 From: wmorgan-sup@masanjin.net (William Morgan)
2262 Date: Thu, 31 Dec 2009 10:56:19 -0800
2263 Subject: [sup-devel] [PATCH] try loading ncursesw
2264 In-Reply-To: <1262131136-14766-1-git-send-email-rlane@club.cc.cmu.edu>
2265 References: <1262131136-14766-1-git-send-email-rlane@club.cc.cmu.edu>
2266 Message-ID: <1262285772-sup-9424@masanjin.net>
2267
2268 Applied directly to master, thanks.
2269 --
2270 William <wmorgan-sup at masanjin.net>
2271
2272 From wmorgan-sup@masanjin.net Thu Dec 31 14:08:27 2009
2273 From: wmorgan-sup@masanjin.net (William Morgan)
2274 Date: Thu, 31 Dec 2009 11:08:27 -0800
2275 Subject: [sup-devel] [PATCH] Make sup-tweak-labels work as advertised
2276 with no sources listed
2277 In-Reply-To: <1262142124-sup-1397@tilus.net>
2278 References: <1262142124-sup-1397@tilus.net>
2279 Message-ID: <1262286240-sup-8417@masanjin.net>
2280
2281 Applied to master, thanks!
2282 --
2283 William <wmorgan-sup at masanjin.net>
2284
2285 From wmorgan-sup@masanjin.net Thu Dec 31 14:09:39 2009
2286 From: wmorgan-sup@masanjin.net (William Morgan)
2287 Date: Thu, 31 Dec 2009 11:09:39 -0800
2288 Subject: [sup-devel] [PATCH] try loading ncursesw
2289 In-Reply-To: <1262285772-sup-9424@masanjin.net>
2290 References: <1262131136-14766-1-git-send-email-rlane@club.cc.cmu.edu>
2291 <1262285772-sup-9424@masanjin.net>
2292 Message-ID: <1262286529-sup-1891@masanjin.net>
2293
2294 Reformatted excerpts from William Morgan's message of 2009-12-31:
2295 > Applied directly to master, thanks.
2296
2297 I changed it from warn to debug though, in line with the chronic
2298 message.
2299 --
2300 William <wmorgan-sup at masanjin.net>
2301
2302 From wmorgan-sup@masanjin.net Thu Dec 31 14:16:51 2009
2303 From: wmorgan-sup@masanjin.net (William Morgan)
2304 Date: Thu, 31 Dec 2009 11:16:51 -0800
2305 Subject: [sup-devel] [PATCH] reuse old account info with --foce-account
2306 user@hostname option
2307 In-Reply-To: <1262145664-sup-4855@tilus.net>
2308 References: <1262145664-sup-4855@tilus.net>
2309 Message-ID: <1262286810-sup-7004@masanjin.net>
2310
2311 Applied to master, thanks.
2312
2313 (PS. There's no reason to use the signoff message. Of course you can
2314 continue to use it if want. But the Sup bureaucracy hasn't become large
2315 enough to warrant it.)
2316 --
2317 William <wmorgan-sup at masanjin.net>
2318
2319 From wmorgan-sup@masanjin.net Thu Dec 31 14:41:16 2009
2320 From: wmorgan-sup@masanjin.net (William Morgan)
2321 Date: Thu, 31 Dec 2009 11:41:16 -0800
2322 Subject: [sup-devel] [PATCH] XapianIndex.each_message_in_thread_for
2323 yields messages in cronological order
2324 In-Reply-To: <1262190807-sup-434@zyrg.net>
2325 References: <1261485246-sup-4236@tilus.net> <1261938751-sup-9421@zyrg.net>
2326 <1262136474-sup-312@tilus.net> <1262182085-sup-1405@masanjin.net>
2327 <1262190807-sup-434@zyrg.net>
2328 Message-ID: <1262287125-sup-5933@masanjin.net>
2329
2330 Reformatted excerpts from Rich Lane's message of 2009-12-30:
2331 > I'm assuming you're talking about each_message_in_thread_for, since
2332 > that's the only Index method that deals with threading.
2333
2334 Yes, I suppose. In my mind the Xapian index had replaced the ThreadSet
2335 threading entirely, but perhaps that's not the case.
2336
2337 > In what order does ThreadSet#add_message expect to get messages in?
2338
2339 Arbitrary.
2340
2341 > AFAICT JWZ's algorithm should work regardless of the order messages
2342 > handed to it.
2343
2344 That's my understanding too.
2345
2346 I don't like adding date as a component for threading (because it's just
2347 asking for a screwey date to wreak havok, just as a screwey References:
2348 header wreaks havok now). I don't like playing around with the threading
2349 algorithm, not in the least because we don't have a good test harness
2350 that lets us know if we screw something up. So I'm inclined to sit on
2351 this patch.
2352
2353 Out of curiousity, Tero, could the problem also be solved by giving the
2354 in-reply-to header precedence over the references header?
2355 --
2356 William <wmorgan-sup at masanjin.net>
2357
2358 From wmorgan-sup@masanjin.net Thu Dec 31 14:45:48 2009
2359 From: wmorgan-sup@masanjin.net (William Morgan)
2360 Date: Thu, 31 Dec 2009 11:45:48 -0800
2361 Subject: [sup-devel] [PATCH] fixed a typo in parse_header
2362 In-Reply-To: <1262241818-sup-6917@changeling.local>
2363 References: <1262241818-sup-6917@changeling.local>
2364 Message-ID: <1262288702-sup-9835@masanjin.net>
2365
2366 Reformatted excerpts from Eric Sherman's message of 2009-12-30:
2367 > On the initial sup-sync when trying to use xapian for the first time,
2368 > one of my headers apparently triggered this edge case.
2369
2370 Wow, how did I let THAT get through. Applied to list-post-improvements,
2371 remerged into next. Thanks!
2372 --
2373 William <wmorgan-sup at masanjin.net>
2374
2375 From wmorgan-sup@masanjin.net Thu Dec 31 14:49:03 2009
2376 From: wmorgan-sup@masanjin.net (William Morgan)
2377 Date: Thu, 31 Dec 2009 11:49:03 -0800
2378 Subject: [sup-devel] [PATCH] added colorized dates in thread-index-mode
2379 In-Reply-To: <1262277743-sup-775@changeling.local>
2380 References: <1262277743-sup-775@changeling.local>
2381 Message-ID: <1262288934-sup-95@masanjin.net>
2382
2383 Applied directly to master, thanks!
2384 --
2385 William <wmorgan-sup at masanjin.net>
2386
2387 From wmorgan-sup@masanjin.net Thu Dec 31 14:53:53 2009
2388 From: wmorgan-sup@masanjin.net (William Morgan)
2389 Date: Thu, 31 Dec 2009 11:53:53 -0800
2390 Subject: [sup-devel] [PATCH] fixed am/pm in thread-list-mode for ruby1.8
2391 In-Reply-To: <1262270484-sup-8396@changeling.local>
2392 References: <1262270484-sup-8396@changeling.local>
2393 Message-ID: <1262289195-sup-4420@masanjin.net>
2394
2395 Reformatted excerpts from Eric Sherman's message of 2009-12-31:
2396 > Here's a patch that gives the proper am/pm display for ruby1.8 if
2397 > that's what's running.
2398
2399 Can you give a little more info? My ruby 1.8.7 is fine with %P. Was this
2400 broken in earlier 1.8's?
2401 --
2402 William <wmorgan-sup at masanjin.net>
2403
2404 From hyperbolist@gmail.com Thu Dec 31 15:03:18 2009
2405 From: hyperbolist@gmail.com (Eric Sherman)
2406 Date: Thu, 31 Dec 2009 15:03:18 -0500
2407 Subject: [sup-devel] [PATCH] fixed am/pm in thread-list-mode for ruby1.8
2408 In-Reply-To: <1262289195-sup-4420@masanjin.net>
2409 References: <1262270484-sup-8396@changeling.local>
2410 <1262289195-sup-4420@masanjin.net>
2411 Message-ID: <1262289317-sup-7991@changeling.local>
2412
2413 Excerpts from William Morgan's message of Thu Dec 31 14:53:53 -0500 2009:
2414 > Reformatted excerpts from Eric Sherman's message of 2009-12-31:
2415 > > Here's a patch that gives the proper am/pm display for ruby1.8 if
2416 > > that's what's running.
2417 >
2418 > Can you give a little more info? My ruby 1.8.7 is fine with %P. Was this
2419 > broken in earlier 1.8's?
2420
2421 %P in 1.8.7 displays a literal "P" always, whereas %P in 1.9 display am/pm.
2422
2423 %p in both 1.8.7 and 1.9 displays AM/PM.
2424
2425 ruby1.8.7 strftime: http://ruby-doc.org/core-1.8.7/classes/Time.html#M000139
2426 ruby1.9 strftime: http://ruby-doc.org/core-1.9/classes/Time.html#M000314
2427
2428 I didn't notice it until someone else mentioned it.
2429
2430 From wmorgan-sup@masanjin.net Thu Dec 31 15:09:32 2009
2431 From: wmorgan-sup@masanjin.net (William Morgan)
2432 Date: Thu, 31 Dec 2009 12:09:32 -0800
2433 Subject: [sup-devel] [PATCH 1/4] factor saving out of thread/message
2434 classes
2435 In-Reply-To: <1262137085-25928-1-git-send-email-rlane@club.cc.cmu.edu>
2436 References: <1262137085-25928-1-git-send-email-rlane@club.cc.cmu.edu>
2437 Message-ID: <1262290157-sup-2908@masanjin.net>
2438
2439 Branch insta-save, merged into next.
2440
2441 I can't believe it works! So cool.
2442 --
2443 William <wmorgan-sup at masanjin.net>
2444
2445 From wmorgan-sup@masanjin.net Thu Dec 31 15:14:50 2009
2446 From: wmorgan-sup@masanjin.net (William Morgan)
2447 Date: Thu, 31 Dec 2009 12:14:50 -0800
2448 Subject: [sup-devel] [PATCH] fixed am/pm in thread-list-mode for ruby1.8
2449 In-Reply-To: <1262289317-sup-7991@changeling.local>
2450 References: <1262270484-sup-8396@changeling.local>
2451 <1262289195-sup-4420@masanjin.net>
2452 <1262289317-sup-7991@changeling.local>
2453 Message-ID: <1262290432-sup-9868@masanjin.net>
2454
2455 Reformatted excerpts from Eric Sherman's message of 2009-12-31:
2456 > %P in 1.8.7 displays a literal "P" always, whereas %P in 1.9 display am/pm.
2457
2458 That's not the case for me. I get an am/pm for 1.8.7 patch levels 174
2459 and 72 (the two I have on hand). Unless there's some weird Debian
2460 patching going on.
2461
2462 Can anyone else confirm?
2463 --
2464 William <wmorgan-sup at masanjin.net>
2465
2466 From sup-bugs@masanjin.net Thu Dec 31 15:23:15 2009
2467 From: sup-bugs@masanjin.net (anonymous)
2468 Date: Thu, 31 Dec 2009 20:23:15 +0000
2469 Subject: [sup-devel] [issue39] Exception running Sup while following the
2470 Instructions to fix UTF-8
2471 In-Reply-To: <1262290995.91.0.416495320944.issue39@masanjin.net>
2472 Message-ID: <1262290995.91.0.416495320944.issue39@masanjin.net>
2473
2474
2475 New submission from anonymous:
2476
2477 Sup!
2478
2479 I was following [these][http://sup.rubyforge.org/wiki/wiki.pl?UTF8] instructions
2480 to fix the UTF-8 encoding problem, and when I ran `ruby -Ilib bin/sup`, I got
2481 the following exception:
2482
2483 --- RuntimeError from thread: main
2484 no Redwood::SentManager instance defined in method call to i_am_the_instance!
2485 ./lib/sup/util.rb:512:in `method_missing'
2486 /usr/lib/ruby/1.8/sup/sent.rb:10:in `initialize'
2487 ./lib/sup/util.rb:524:in `new'
2488 ./lib/sup/util.rb:524:in `init'
2489 ./lib/sup.rb:124:in `start'
2490 bin/sup:143
2491
2492 ----------
2493 messages: 101
2494 nosy: anonymous
2495 priority: bug
2496 ruby_version: 1.8
2497 status: unread
2498 sup_version: git
2499 title: Exception running Sup while following the Instructions to fix UTF-8
2500
2501 _________________________________________
2502 Sup issue tracker <sup-bugs at masanjin.net>
2503 <http://masanjin.net/sup-bugs/issue39>
2504 _________________________________________
2505
2506 From wmorgan-sup@masanjin.net Thu Dec 31 15:31:50 2009
2507 From: wmorgan-sup@masanjin.net (William Morgan)
2508 Date: Thu, 31 Dec 2009 12:31:50 -0800
2509 Subject: [sup-devel] topic branch merge report
2510 Message-ID: <1262291246-sup-2713@masanjin.net>
2511
2512 Hi all,
2513
2514 I've merged the following branches down to master:
2515
2516 'thread-joining-fix', 'no-mailcap-on-darwin',
2517 'label-list-mode-auto-update', 'interactive-crypto',
2518 'label-list-mode-hooks', 'refine-inbox-mode', 'poll-unusual',
2519 'attach-wildcards', 'order-names-by-date' and 'save-all-attachments'.
2520
2521 Rich, I think I need your help with the two branches 'xapian-bugfix' and
2522 'xapian-message-state', which are generating a conflict for some reason,
2523 and I don't understand the code well enough to resolve. Would you be
2524 able to publish a branch ahead of master that has these two merged?
2525 Thanks!
2526 --
2527 William <wmorgan-sup at masanjin.net>
2528
2529 From pi+sup@pihost.us Thu Dec 31 15:45:30 2009
2530 From: pi+sup@pihost.us (Anthony Martinez)
2531 Date: Thu, 31 Dec 2009 13:45:30 -0700
2532 Subject: [sup-devel] [PATCH] Move the mark-as-spam hook so it runs on all
2533 tagged threads.
2534 Message-ID: <1262292330-28131-1-git-send-email-pi+sup@pihost.us>
2535
2536 This way, tagging a whole bunch of spam and then hitting =S will get
2537 them all run through bogofilter (or whatever is done in the mark-as-spam
2538 hook) instead of only the currently selected one.
2539 ---
2540 lib/sup/modes/thread-index-mode.rb | 2 +-
2541 1 files changed, 1 insertions(+), 1 deletions(-)
2542
2543 diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
2544 index 12a76f9..9e49415 100644
2545 --- a/lib/sup/modes/thread-index-mode.rb
2546 +++ b/lib/sup/modes/thread-index-mode.rb
2547 @@ -406,7 +406,6 @@ EOS
2548 def toggle_spam
2549 t = cursor_thread or return
2550 multi_toggle_spam [t]
2551 - HookManager.run("mark-as-spam", :thread => t)
2552 end
2553
2554 ## both spam and deleted have the curious characteristic that you
2555 @@ -418,6 +417,7 @@ EOS
2556 ## you also want them to disappear immediately.
2557 def multi_toggle_spam threads
2558 undos = threads.map { |t| actually_toggle_spammed t }
2559 + threads.each { |t| HookManager.run("mark-as-spam", :thread => t) }
2560 UndoManager.register "marking/unmarking #{threads.size.pluralize 'thread'} as spam",
2561 undos, lambda { regen_text }
2562 regen_text
2563 --
2564 1.6.5
2565
2566
2567 From hyperbolist@gmail.com Thu Dec 31 16:03:40 2009
2568 From: hyperbolist@gmail.com (Eric Sherman)
2569 Date: Thu, 31 Dec 2009 16:03:40 -0500
2570 Subject: [sup-devel] [PATCH] fixed am/pm in thread-list-mode for ruby1.8
2571 In-Reply-To: <1262290432-sup-9868@masanjin.net>
2572 References: <1262270484-sup-8396@changeling.local>
2573 <1262289195-sup-4420@masanjin.net>
2574 <1262289317-sup-7991@changeling.local>
2575 <1262290432-sup-9868@masanjin.net>
2576 Message-ID: <1262293338-sup-9364@changeling.local>
2577
2578 Excerpts from William Morgan's message of Thu Dec 31 15:14:50 -0500 2009:
2579 > Reformatted excerpts from Eric Sherman's message of 2009-12-31:
2580 > > %P in 1.8.7 displays a literal "P" always, whereas %P in 1.9 display am/pm.
2581 >
2582 > That's not the case for me. I get an am/pm for 1.8.7 patch levels 174
2583 > and 72 (the two I have on hand). Unless there's some weird Debian
2584 > patching going on.
2585 >
2586 > Can anyone else confirm?
2587
2588 Here's a simple test for others to try:
2589
2590 $ ruby --version
2591 ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10]
2592 $ irb
2593 irb(main):001:0> RUBY_VERSION
2594 => "1.8.7"
2595 irb(main):002:0> Time.now().strftime("%l:%M%P")
2596 => " 3:58P"
2597 irb(main):003:0> quit
2598 $ ruby1.9 --version
2599 ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10]
2600 $ irb1.9 irb(main):001:0> RUBY_VERSION
2601 => "1.9.1"
2602 irb(main):002:0> Time.now().strftime("%l:%M%P")
2603 => " 3:58pm"
2604
2605 From benoit.pierre@gmail.com Thu Dec 31 16:27:41 2009
2606 From: benoit.pierre@gmail.com (=?utf-8?q?Beno=C3=AEt_PIERRE?=)
2607 Date: Thu, 31 Dec 2009 22:27:41 +0100
2608 Subject: [sup-devel] [PATCH] fixed am/pm in thread-list-mode for ruby1.8
2609 In-Reply-To: <1262293338-sup-9364@changeling.local>
2610 References: <1262270484-sup-8396@changeling.local>
2611 <1262289195-sup-4420@masanjin.net>
2612 <1262289317-sup-7991@changeling.local>
2613 <1262290432-sup-9868@masanjin.net>
2614 <1262293338-sup-9364@changeling.local>
2615 Message-ID: <1262294449-sup-8418@localdomain>
2616
2617 Excerpts from Eric Sherman's message of Thu Dec 31 22:03:40 +0100 2009:
2618 > Excerpts from William Morgan's message of Thu Dec 31 15:14:50 -0500 2009:
2619 > > Reformatted excerpts from Eric Sherman's message of 2009-12-31:
2620 > > > %P in 1.8.7 displays a literal "P" always, whereas %P in 1.9 display am/pm.
2621 > >
2622 > > That's not the case for me. I get an am/pm for 1.8.7 patch levels 174
2623 > > and 72 (the two I have on hand). Unless there's some weird Debian
2624 > > patching going on.
2625 > >
2626 > > Can anyone else confirm?
2627 >
2628 > Here's a simple test for others to try:
2629 >
2630 > $ ruby --version
2631 > ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10]
2632 > $ irb
2633 > irb(main):001:0> RUBY_VERSION
2634 > => "1.8.7"
2635 > irb(main):002:0> Time.now().strftime("%l:%M%P")
2636 > => " 3:58P"
2637 > irb(main):003:0> quit
2638 > $ ruby1.9 --version
2639 > ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10]
2640 > $ irb1.9 irb(main):001:0> RUBY_VERSION
2641 > => "1.9.1"
2642 > irb(main):002:0> Time.now().strftime("%l:%M%P")
2643 > => " 3:58pm"
2644
2645 # ruby --version
2646 ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
2647 # ruby -e 'puts Time.now().strftime("%l:%M%P")'
2648 10:21pm
2649
2650 # ruby1.9 --version
2651 ruby 1.9.0 (2008-10-04 revision 19669) [x86_64-linux]
2652 # ruby1.9 -e 'puts Time.now().strftime("%l:%M%P")'
2653 10:22pm
2654
2655 That's on Ubuntu Karmic.
2656 --
2657 A: Because it destroys the flow of conversation.
2658 Q: Why is top posting dumb?
2659 -------------- next part --------------
2660 A non-text attachment was scrubbed...
2661 Name: signature.asc
2662 Type: application/pgp-signature
2663 Size: 197 bytes
2664 Desc: not available
2665 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20091231/82055799/attachment.bin>
2666
2667 From rlane@club.cc.cmu.edu Thu Dec 31 16:31:18 2009
2668 From: rlane@club.cc.cmu.edu (Rich Lane)
2669 Date: Thu, 31 Dec 2009 16:31:18 -0500
2670 Subject: [sup-devel] topic branch merge report
2671 In-Reply-To: <1262291246-sup-2713@masanjin.net>
2672 References: <1262291246-sup-2713@masanjin.net>
2673 Message-ID: <1262294884-sup-3554@zyrg.net>
2674
2675 Excerpts from William Morgan's message of Thu Dec 31 15:31:50 -0500 2009:
2676 > Rich, I think I need your help with the two branches 'xapian-bugfix' and
2677 > 'xapian-message-state', which are generating a conflict for some reason,
2678 > and I don't understand the code well enough to resolve. Would you be
2679 > able to publish a branch ahead of master that has these two merged?
2680 > Thanks!
2681
2682 Done. Branch xapian-merged at git://github.com/rlane/sup
2683
2684 From hyperbolist@gmail.com Thu Dec 31 17:10:45 2009
2685 From: hyperbolist@gmail.com (Eric Sherman)
2686 Date: Thu, 31 Dec 2009 17:10:45 -0500
2687 Subject: [sup-devel] [PATCH] fixed am/pm in thread-list-mode for ruby1.8
2688 In-Reply-To: <1262294449-sup-8418@localdomain>
2689 References: <1262270484-sup-8396@changeling.local>
2690 <1262289195-sup-4420@masanjin.net>
2691 <1262289317-sup-7991@changeling.local>
2692 <1262290432-sup-9868@masanjin.net>
2693 <1262293338-sup-9364@changeling.local>
2694 <1262294449-sup-8418@localdomain>
2695 Message-ID: <1262297415-sup-6997@changeling.local>
2696
2697 Excerpts from Beno?t PIERRE's message of Thu Dec 31 16:27:41 -0500 2009:
2698 > Excerpts from Eric Sherman's message of Thu Dec 31 22:03:40 +0100 2009:
2699 > > Excerpts from William Morgan's message of Thu Dec 31 15:14:50 -0500 2009:
2700 > > > Reformatted excerpts from Eric Sherman's message of 2009-12-31:
2701 > > > > %P in 1.8.7 displays a literal "P" always, whereas %P in 1.9 display am/pm.
2702 > > >
2703 > > > That's not the case for me. I get an am/pm for 1.8.7 patch levels 174
2704 > > > and 72 (the two I have on hand). Unless there's some weird Debian
2705 > > > patching going on.
2706 > > >
2707 > > > Can anyone else confirm?
2708 > >
2709 > > Here's a simple test for others to try:
2710 > >
2711 > > $ ruby --version
2712 > > ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10]
2713 > > $ irb
2714 > > irb(main):001:0> RUBY_VERSION
2715 > > => "1.8.7"
2716 > > irb(main):002:0> Time.now().strftime("%l:%M%P")
2717 > > => " 3:58P"
2718 > > irb(main):003:0> quit
2719 > > $ ruby1.9 --version
2720 > > ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10]
2721 > > $ irb1.9 irb(main):001:0> RUBY_VERSION
2722 > > => "1.9.1"
2723 > > irb(main):002:0> Time.now().strftime("%l:%M%P")
2724 > > => " 3:58pm"
2725 >
2726 > # ruby --version
2727 > ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
2728 > # ruby -e 'puts Time.now().strftime("%l:%M%P")'
2729 > 10:21pm
2730 >
2731 > # ruby1.9 --version
2732 > ruby 1.9.0 (2008-10-04 revision 19669) [x86_64-linux]
2733 > # ruby1.9 -e 'puts Time.now().strftime("%l:%M%P")'
2734 > 10:22pm
2735 >
2736 > That's on Ubuntu Karmic.
2737
2738 Hmm. Maybe this issue only exists on OSX. I'm kind of jealous that linux
2739 rubies get features from the future! I first heard about this AM/PM
2740 behavior from [this][1] sup-talk thread and hadn't noticed it myself until
2741 then.
2742
2743 [1]: http://rubyforge.org/pipermail/sup-talk/2009-December/003599.html
2744
2745 From wmorgan-sup@masanjin.net Thu Dec 31 17:41:30 2009
2746 From: wmorgan-sup@masanjin.net (William Morgan)
2747 Date: Thu, 31 Dec 2009 14:41:30 -0800
2748 Subject: [sup-devel] topic branch merge report
2749 In-Reply-To: <1262294884-sup-3554@zyrg.net>
2750 References: <1262291246-sup-2713@masanjin.net> <1262294884-sup-3554@zyrg.net>
2751 Message-ID: <1262299210-sup-4509@masanjin.net>
2752
2753 Reformatted excerpts from Rich Lane's message of 2009-12-31:
2754 > Done. Branch xapian-merged at git://github.com/rlane/sup
2755
2756 Thank you. Also merged into master.
2757 --
2758 William <wmorgan-sup at masanjin.net>
2759
2760 From rlane@club.cc.cmu.edu Thu Dec 31 18:36:48 2009
2761 From: rlane@club.cc.cmu.edu (Rich Lane)
2762 Date: Thu, 31 Dec 2009 15:36:48 -0800
2763 Subject: [sup-devel] Ruby 1.9 encoding fixes
2764 Message-ID: <1262302618-20503-1-git-send-email-rlane@club.cc.cmu.edu>
2765
2766 This patchset fixes the string encoding issues on Ruby 1.9.1. The general
2767 strategy is to treat raw messsages as binary and ensure that everything is
2768 passed through Iconv or String#ascii before being displayed or stored. I tested
2769 an earlier version of this patchset (with more debug checks) on around 700
2770 thousand mails including plenty of spam. It'd be nice if someone tested
2771 signed/encrypted mails to make sure I didn't break anything there.
2772
2773 The only effect on Ruby 1.8 should be asciifying the raw header/message view,
2774 and maybe a little speedup due to reusing the RMail message header instead of
2775 parsing it ourselves.
2776
2777
2778 From rlane@club.cc.cmu.edu Thu Dec 31 18:36:49 2009
2779 From: rlane@club.cc.cmu.edu (Rich Lane)
2780 Date: Thu, 31 Dec 2009 15:36:49 -0800
2781 Subject: [sup-devel] [PATCH 01/10] open mail source files as binary
2782 In-Reply-To: <1262302618-20503-1-git-send-email-rlane@club.cc.cmu.edu>
2783 References: <1262302618-20503-1-git-send-email-rlane@club.cc.cmu.edu>
2784 Message-ID: <1262302618-20503-2-git-send-email-rlane@club.cc.cmu.edu>
2785
2786 ---
2787 lib/sup/maildir.rb | 4 ++--
2788 lib/sup/mbox/loader.rb | 4 ++--
2789 2 files changed, 4 insertions(+), 4 deletions(-)
2790
2791 diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb
2792 index c2bd27a..0852576 100644
2793 --- a/lib/sup/maildir.rb
2794 +++ b/lib/sup/maildir.rb
2795 @@ -59,7 +59,7 @@ class Maildir < Source
2796 File.stat(tmp_path)
2797 rescue Errno::ENOENT #this is what we want.
2798 begin
2799 - File.open(tmp_path, 'w') do |f|
2800 + File.open(tmp_path, 'wb:BINARY') do |f|
2801 yield f #provide a writable interface for the caller
2802 f.fsync
2803 end
2804 @@ -207,7 +207,7 @@ private
2805 def with_file_for id
2806 fn = @ids_to_fns[id] or raise OutOfSyncSourceError, "No such id: #{id.inspect}."
2807 begin
2808 - File.open(fn) { |f| yield f }
2809 + File.open(fn, 'rb:BINARY') { |f| yield f }
2810 rescue SystemCallError, IOError => e
2811 raise FatalSourceError, "Problem reading file for id #{id.inspect}: #{fn.inspect}: #{e.message}."
2812 end
2813 diff --git a/lib/sup/mbox/loader.rb b/lib/sup/mbox/loader.rb
2814 index 520e2ec..ec28d3b 100644
2815 --- a/lib/sup/mbox/loader.rb
2816 +++ b/lib/sup/mbox/loader.rb
2817 @@ -22,7 +22,7 @@ class Loader < Source
2818 raise ArgumentError, "not an mbox uri" unless uri.scheme == "mbox"
2819 raise ArgumentError, "mbox URI ('#{uri}') cannot have a host: #{uri.host}" if uri.host
2820 raise ArgumentError, "mbox URI must have a path component" unless uri.path
2821 - @f = File.open uri.path
2822 + @f = File.open uri.path, 'rb:BINARY'
2823 @path = uri.path
2824 else
2825 @f = uri_or_fp
2826 @@ -114,7 +114,7 @@ class Loader < Source
2827
2828 def store_message date, from_email, &block
2829 need_blank = File.exists?(@filename) && !File.zero?(@filename)
2830 - File.open(@filename, "a") do |f|
2831 + File.open(@filename, "ab:BINARY") do |f|
2832 f.puts if need_blank
2833 f.puts "From #{from_email} #{date.rfc2822}"
2834 yield f
2835 --
2836 1.6.3.3
2837
2838
2839 From rlane@club.cc.cmu.edu Thu Dec 31 18:36:50 2009
2840 From: rlane@club.cc.cmu.edu (Rich Lane)
2841 Date: Thu, 31 Dec 2009 15:36:50 -0800
2842 Subject: [sup-devel] [PATCH 02/10] display_size is just size on Ruby 1.9
2843 In-Reply-To: <1262302618-20503-2-git-send-email-rlane@club.cc.cmu.edu>
2844 References: <1262302618-20503-1-git-send-email-rlane@club.cc.cmu.edu>
2845 <1262302618-20503-2-git-send-email-rlane@club.cc.cmu.edu>
2846 Message-ID: <1262302618-20503-3-git-send-email-rlane@club.cc.cmu.edu>
2847
2848 ---
2849 lib/sup/util.rb | 2 +-
2850 1 files changed, 1 insertions(+), 1 deletions(-)
2851
2852 diff --git a/lib/sup/util.rb b/lib/sup/util.rb
2853 index f99e1c1..5f68d0d 100644
2854 --- a/lib/sup/util.rb
2855 +++ b/lib/sup/util.rb
2856 @@ -177,7 +177,7 @@ class String
2857 ## nasty multibyte hack for ruby 1.8. if it's utf-8, split into chars using
2858 ## the utf8 regex and count those. otherwise, use the byte length.
2859 def display_length
2860 - if $encoding == "UTF-8" || $encoding == "utf8"
2861 + if RUBY_VERSION < '1.9.1' && ($encoding == "UTF-8" || $encoding == "utf8")
2862 scan(/./u).size
2863 else
2864 size
2865 --
2866 1.6.3.3
2867
2868
2869 From rlane@club.cc.cmu.edu Thu Dec 31 18:36:51 2009
2870 From: rlane@club.cc.cmu.edu (Rich Lane)
2871 Date: Thu, 31 Dec 2009 15:36:51 -0800
2872 Subject: [sup-devel] [PATCH 03/10] add String#check
2873 In-Reply-To: <1262302618-20503-3-git-send-email-rlane@club.cc.cmu.edu>
2874 References: <1262302618-20503-1-git-send-email-rlane@club.cc.cmu.edu>
2875 <1262302618-20503-2-git-send-email-rlane@club.cc.cmu.edu>
2876 <1262302618-20503-3-git-send-email-rlane@club.cc.cmu.edu>
2877 Message-ID: <1262302618-20503-4-git-send-email-rlane@club.cc.cmu.edu>
2878
2879 ---
2880 lib/sup/util.rb | 10 ++++++++++
2881 1 files changed, 10 insertions(+), 0 deletions(-)
2882
2883 diff --git a/lib/sup/util.rb b/lib/sup/util.rb
2884 index 5f68d0d..fc90350 100644
2885 --- a/lib/sup/util.rb
2886 +++ b/lib/sup/util.rb
2887 @@ -296,6 +296,16 @@ class String
2888 ##
2889 ## split_on will be passed to String#split, so you can leave this nil for space.
2890 def to_set_of_symbols split_on=nil; Set.new split(split_on).map { |x| x.strip.intern } end
2891 +
2892 + class CheckError < ArgumentError; end
2893 + def check
2894 + begin
2895 + fail "unexpected encoding #{encoding}" if respond_to?(:encoding) && !(encoding == Encoding::UTF_8 || encoding == Encoding::ASCII)
2896 + fail "invalid encoding" if respond_to?(:valid_encoding?) && !valid_encoding?
2897 + rescue
2898 + raise CheckError.new($!.message)
2899 + end
2900 + end
2901 end
2902
2903 class Numeric
2904 --
2905 1.6.3.3
2906
2907
2908 From rlane@club.cc.cmu.edu Thu Dec 31 18:36:52 2009
2909 From: rlane@club.cc.cmu.edu (Rich Lane)
2910 Date: Thu, 31 Dec 2009 15:36:52 -0800
2911 Subject: [sup-devel] [PATCH 04/10] add String#ascii
2912 In-Reply-To: <1262302618-20503-4-git-send-email-rlane@club.cc.cmu.edu>
2913 References: <1262302618-20503-1-git-send-email-rlane@club.cc.cmu.edu>
2914 <1262302618-20503-2-git-send-email-rlane@club.cc.cmu.edu>
2915 <1262302618-20503-3-git-send-email-rlane@club.cc.cmu.edu>
2916 <1262302618-20503-4-git-send-email-rlane@club.cc.cmu.edu>
2917 Message-ID: <1262302618-20503-5-git-send-email-rlane@club.cc.cmu.edu>
2918
2919 ---
2920 lib/sup/util.rb | 13 +++++++++++++
2921 1 files changed, 13 insertions(+), 0 deletions(-)
2922
2923 diff --git a/lib/sup/util.rb b/lib/sup/util.rb
2924 index fc90350..508bcee 100644
2925 --- a/lib/sup/util.rb
2926 +++ b/lib/sup/util.rb
2927 @@ -306,6 +306,19 @@ class String
2928 raise CheckError.new($!.message)
2929 end
2930 end
2931 +
2932 + def ascii
2933 + out = ""
2934 + each_byte do |b|
2935 + if (b & 128) != 0
2936 + out << "\\x#{b.to_s 16}"
2937 + else
2938 + out << b.chr
2939 + end
2940 + end
2941 + out.force_encoding Encoding::UTF_8 if out.respond_to? :force_encoding
2942 + out
2943 + end
2944 end
2945
2946 class Numeric
2947 --
2948 1.6.3.3
2949
2950
2951 From rlane@club.cc.cmu.edu Thu Dec 31 18:36:53 2009
2952 From: rlane@club.cc.cmu.edu (Rich Lane)
2953 Date: Thu, 31 Dec 2009 15:36:53 -0800
2954 Subject: [sup-devel] [PATCH 05/10] fixup Iconv#easy_decode for Ruby 1.9
2955 In-Reply-To: <1262302618-20503-5-git-send-email-rlane@club.cc.cmu.edu>
2956 References: <1262302618-20503-1-git-send-email-rlane@club.cc.cmu.edu>
2957 <1262302618-20503-2-git-send-email-rlane@club.cc.cmu.edu>
2958 <1262302618-20503-3-git-send-email-rlane@club.cc.cmu.edu>
2959 <1262302618-20503-4-git-send-email-rlane@club.cc.cmu.edu>
2960 <1262302618-20503-5-git-send-email-rlane@club.cc.cmu.edu>
2961 Message-ID: <1262302618-20503-6-git-send-email-rlane@club.cc.cmu.edu>
2962
2963 ---
2964 lib/sup/util.rb | 21 +++++++++++++--------
2965 1 files changed, 13 insertions(+), 8 deletions(-)
2966
2967 diff --git a/lib/sup/util.rb b/lib/sup/util.rb
2968 index 508bcee..560ac73 100644
2969 --- a/lib/sup/util.rb
2970 +++ b/lib/sup/util.rb
2971 @@ -664,21 +664,26 @@ class FinishLine
2972 end
2973
2974 class Iconv
2975 - def self.easy_decode target, charset, text
2976 - return text if charset =~ /^(x-unknown|unknown[-_ ]?8bit|ascii[-_ ]?7[-_ ]?bit)$/i
2977 - charset = case charset
2978 + def self.easy_decode target, orig_charset, text
2979 + if text.respond_to? :force_encoding
2980 + text = text.dup
2981 + text.force_encoding Encoding::BINARY
2982 + end
2983 + charset = case orig_charset
2984 when /UTF[-_ ]?8/i then "utf-8"
2985 when /(iso[-_ ])?latin[-_ ]?1$/i then "ISO-8859-1"
2986 when /iso[-_ ]?8859[-_ ]?15/i then 'ISO-8859-15'
2987 when /unicode[-_ ]1[-_ ]1[-_ ]utf[-_]7/i then "utf-7"
2988 - else charset
2989 + when /^euc$/i then 'EUC-JP' # XXX try them all?
2990 + when /^(x-unknown|unknown[-_ ]?8bit|ascii[-_ ]?7[-_ ]?bit)$/i then 'ASCII'
2991 + else orig_charset
2992 end
2993
2994 begin
2995 - Iconv.iconv(target + "//IGNORE", charset, text + " ").join[0 .. -2]
2996 - rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::InvalidCharacter, Iconv::IllegalSequence => e
2997 - warn "couldn't transcode text from #{charset} to #{target} (\"#{text[0 ... 20]}\"...) (got #{e.message}); using original as is"
2998 - text
2999 + returning(Iconv.iconv(target, charset, text + " ").join[0 .. -2]) { |str| str.check }
3000 + rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::InvalidCharacter, Iconv::IllegalSequence, String::CheckError
3001 + warn "couldn't transcode text from #{orig_charset} (#{charset}) to #{target}) (#{text[0 ... 20].inspect}...) (got #{$!.message} (#{$!.class}))"
3002 + text.ascii
3003 end
3004 end
3005 end
3006 --
3007 1.6.3.3
3008
3009
3010 From rlane@club.cc.cmu.edu Thu Dec 31 18:36:56 2009
3011 From: rlane@club.cc.cmu.edu (Rich Lane)
3012 Date: Thu, 31 Dec 2009 15:36:56 -0800
3013 Subject: [sup-devel] [PATCH 08/10] decode raw header/message to ascii before
3014 viewing
3015 In-Reply-To: <1262302618-20503-8-git-send-email-rlane@club.cc.cmu.edu>
3016 References: <1262302618-20503-1-git-send-email-rlane@club.cc.cmu.edu>
3017 <1262302618-20503-2-git-send-email-rlane@club.cc.cmu.edu>
3018 <1262302618-20503-3-git-send-email-rlane@club.cc.cmu.edu>
3019 <1262302618-20503-4-git-send-email-rlane@club.cc.cmu.edu>
3020 <1262302618-20503-5-git-send-email-rlane@club.cc.cmu.edu>
3021 <1262302618-20503-6-git-send-email-rlane@club.cc.cmu.edu>
3022 <1262302618-20503-7-git-send-email-rlane@club.cc.cmu.edu>
3023 <1262302618-20503-8-git-send-email-rlane@club.cc.cmu.edu>
3024 Message-ID: <1262302618-20503-9-git-send-email-rlane@club.cc.cmu.edu>
3025
3026 ---
3027 lib/sup/modes/thread-view-mode.rb | 4 ++--
3028 1 files changed, 2 insertions(+), 2 deletions(-)
3029
3030 diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
3031 index 8b5642e..52b54dd 100644
3032 --- a/lib/sup/modes/thread-view-mode.rb
3033 +++ b/lib/sup/modes/thread-view-mode.rb
3034 @@ -148,14 +148,14 @@ EOS
3035 def show_header
3036 m = @message_lines[curpos] or return
3037 BufferManager.spawn_unless_exists("Full header for #{m.id}") do
3038 - TextMode.new m.raw_header
3039 + TextMode.new m.raw_header.ascii
3040 end
3041 end
3042
3043 def show_message
3044 m = @message_lines[curpos] or return
3045 BufferManager.spawn_unless_exists("Raw message for #{m.id}") do
3046 - TextMode.new m.raw_message
3047 + TextMode.new m.raw_message.ascii
3048 end
3049 end
3050
3051 --
3052 1.6.3.3
3053
3054
3055 From rlane@club.cc.cmu.edu Thu Dec 31 18:36:54 2009
3056 From: rlane@club.cc.cmu.edu (Rich Lane)
3057 Date: Thu, 31 Dec 2009 15:36:54 -0800
3058 Subject: [sup-devel] [PATCH 06/10] add String#transcode
3059 In-Reply-To: <1262302618-20503-6-git-send-email-rlane@club.cc.cmu.edu>
3060 References: <1262302618-20503-1-git-send-email-rlane@club.cc.cmu.edu>
3061 <1262302618-20503-2-git-send-email-rlane@club.cc.cmu.edu>
3062 <1262302618-20503-3-git-send-email-rlane@club.cc.cmu.edu>
3063 <1262302618-20503-4-git-send-email-rlane@club.cc.cmu.edu>
3064 <1262302618-20503-5-git-send-email-rlane@club.cc.cmu.edu>
3065 <1262302618-20503-6-git-send-email-rlane@club.cc.cmu.edu>
3066 Message-ID: <1262302618-20503-7-git-send-email-rlane@club.cc.cmu.edu>
3067
3068 ---
3069 lib/sup/util.rb | 4 ++++
3070 1 files changed, 4 insertions(+), 0 deletions(-)
3071
3072 diff --git a/lib/sup/util.rb b/lib/sup/util.rb
3073 index 560ac73..c27e527 100644
3074 --- a/lib/sup/util.rb
3075 +++ b/lib/sup/util.rb
3076 @@ -319,6 +319,10 @@ class String
3077 out.force_encoding Encoding::UTF_8 if out.respond_to? :force_encoding
3078 out
3079 end
3080 +
3081 + def transcode src_encoding=$encoding
3082 + Iconv.easy_decode $encoding, src_encoding, self
3083 + end
3084 end
3085
3086 class Numeric
3087 --
3088 1.6.3.3
3089
3090
3091 From rlane@club.cc.cmu.edu Thu Dec 31 18:36:57 2009
3092 From: rlane@club.cc.cmu.edu (Rich Lane)
3093 Date: Thu, 31 Dec 2009 15:36:57 -0800
3094 Subject: [sup-devel] [PATCH 09/10] use header from the RMail::Message in
3095 Message#parse_header
3096 In-Reply-To: <1262302618-20503-9-git-send-email-rlane@club.cc.cmu.edu>
3097 References: <1262302618-20503-1-git-send-email-rlane@club.cc.cmu.edu>
3098 <1262302618-20503-2-git-send-email-rlane@club.cc.cmu.edu>
3099 <1262302618-20503-3-git-send-email-rlane@club.cc.cmu.edu>
3100 <1262302618-20503-4-git-send-email-rlane@club.cc.cmu.edu>
3101 <1262302618-20503-5-git-send-email-rlane@club.cc.cmu.edu>
3102 <1262302618-20503-6-git-send-email-rlane@club.cc.cmu.edu>
3103 <1262302618-20503-7-git-send-email-rlane@club.cc.cmu.edu>
3104 <1262302618-20503-8-git-send-email-rlane@club.cc.cmu.edu>
3105 <1262302618-20503-9-git-send-email-rlane@club.cc.cmu.edu>
3106 Message-ID: <1262302618-20503-10-git-send-email-rlane@club.cc.cmu.edu>
3107
3108 ---
3109 lib/sup/message.rb | 24 ++++++++++++++----------
3110 1 files changed, 14 insertions(+), 10 deletions(-)
3111
3112 diff --git a/lib/sup/message.rb b/lib/sup/message.rb
3113 index f3ac874..519243a 100644
3114 --- a/lib/sup/message.rb
3115 +++ b/lib/sup/message.rb
3116 @@ -31,6 +31,7 @@ class Message
3117 MAX_SIG_DISTANCE = 15 # lines from the end
3118 DEFAULT_SUBJECT = ""
3119 DEFAULT_SENDER = "(missing sender)"
3120 + MAX_HEADER_VALUE_SIZE = 4096
3121
3122 attr_reader :id, :date, :from, :subj, :refs, :replytos, :to, :source,
3123 :cc, :bcc, :labels, :attachments, :list_address, :recipient_email, :replyto,
3124 @@ -59,13 +60,15 @@ class Message
3125 #parse_header(opts[:header] || @source.load_header(@source_info))
3126 end
3127
3128 - def parse_header header
3129 - ## forcibly decode these headers from and to the current encoding,
3130 - ## which serves to strip out characters that aren't displayable
3131 - ## (and which would otherwise be screwing up the display)
3132 - %w(from to subject cc bcc).each do |f|
3133 - header[f] = Iconv.easy_decode($encoding, $encoding, header[f]) if header[f]
3134 - end
3135 + def decode_header_field v
3136 + return unless v
3137 + return v unless v.is_a? String
3138 + return unless v.size < MAX_HEADER_VALUE_SIZE # avoid regex blowup on spam
3139 + Rfc2047.decode_to $encoding, Iconv.easy_decode($encoding, 'ASCII', v)
3140 + end
3141 +
3142 + def parse_header encoded_header
3143 + header = SavingHash.new { |k| decode_header_field encoded_header[k] }
3144
3145 @id = if header["message-id"]
3146 mid = header["message-id"] =~ /<(.+?)>/ ? $1 : header["message-id"]
3147 @@ -100,7 +103,7 @@ class Message
3148 Time.now
3149 end
3150
3151 - @subj = header.member?("subject") ? header["subject"].gsub(/\s+/, " ").gsub(/\s+$/, "") : DEFAULT_SUBJECT
3152 + @subj = header["subject"] ? header["subject"].gsub(/\s+/, " ").gsub(/\s+$/, "") : DEFAULT_SUBJECT
3153 @to = Person.from_address_list header["to"]
3154 @cc = Person.from_address_list header["cc"]
3155 @bcc = Person.from_address_list header["bcc"]
3156 @@ -235,8 +238,9 @@ class Message
3157 ## bloat the index.
3158 ## actually, it's also the differentiation between to/cc/bcc,
3159 ## so i will keep this.
3160 - parse_header @source.load_header(@source_info)
3161 - message_to_chunks @source.load_message(@source_info)
3162 + rmsg = @source.load_message(@source_info)
3163 + parse_header rmsg.header
3164 + message_to_chunks rmsg
3165 rescue SourceError, SocketError => e
3166 warn "problem getting messages from #{@source}: #{e.message}"
3167 ## we need force_to_top here otherwise this window will cover
3168 --
3169 1.6.3.3
3170
3171
3172 From rlane@club.cc.cmu.edu Thu Dec 31 18:36:55 2009
3173 From: rlane@club.cc.cmu.edu (Rich Lane)
3174 Date: Thu, 31 Dec 2009 15:36:55 -0800
3175 Subject: [sup-devel] [PATCH 07/10] transcode output from mime-decode hook too
3176 In-Reply-To: <1262302618-20503-7-git-send-email-rlane@club.cc.cmu.edu>
3177 References: <1262302618-20503-1-git-send-email-rlane@club.cc.cmu.edu>
3178 <1262302618-20503-2-git-send-email-rlane@club.cc.cmu.edu>
3179 <1262302618-20503-3-git-send-email-rlane@club.cc.cmu.edu>
3180 <1262302618-20503-4-git-send-email-rlane@club.cc.cmu.edu>
3181 <1262302618-20503-5-git-send-email-rlane@club.cc.cmu.edu>
3182 <1262302618-20503-6-git-send-email-rlane@club.cc.cmu.edu>
3183 <1262302618-20503-7-git-send-email-rlane@club.cc.cmu.edu>
3184 Message-ID: <1262302618-20503-8-git-send-email-rlane@club.cc.cmu.edu>
3185
3186 ---
3187 lib/sup/message-chunks.rb | 3 ++-
3188 1 files changed, 2 insertions(+), 1 deletions(-)
3189
3190 diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb
3191 index 581b707..6328f1f 100644
3192 --- a/lib/sup/message-chunks.rb
3193 +++ b/lib/sup/message-chunks.rb
3194 @@ -99,7 +99,7 @@ EOS
3195
3196 text = case @content_type
3197 when /^text\/plain\b/
3198 - Iconv.easy_decode $encoding, encoded_content.charset || $encoding, @raw_content
3199 + @raw_content
3200 else
3201 HookManager.run "mime-decode", :content_type => content_type,
3202 :filename => lambda { write_to_disk },
3203 @@ -109,6 +109,7 @@ EOS
3204
3205 @lines = nil
3206 if text
3207 + text = text.transcode(encoded_content.charset || $encoding)
3208 @lines = text.gsub("\r\n", "\n").gsub(/\t/, " ").gsub(/\r/, "").split("\n")
3209 @lines = lines.map {|l| l.chomp.wrap WRAP_LEN}.flatten
3210 @quotable = true
3211 --
3212 1.6.3.3
3213
3214
3215 From rlane@club.cc.cmu.edu Thu Dec 31 18:36:58 2009
3216 From: rlane@club.cc.cmu.edu (Rich Lane)
3217 Date: Thu, 31 Dec 2009 15:36:58 -0800
3218 Subject: [sup-devel] [PATCH 10/10] decode header fields of enclosed messages
3219 In-Reply-To: <1262302618-20503-10-git-send-email-rlane@club.cc.cmu.edu>
3220 References: <1262302618-20503-1-git-send-email-rlane@club.cc.cmu.edu>
3221 <1262302618-20503-2-git-send-email-rlane@club.cc.cmu.edu>
3222 <1262302618-20503-3-git-send-email-rlane@club.cc.cmu.edu>
3223 <1262302618-20503-4-git-send-email-rlane@club.cc.cmu.edu>
3224 <1262302618-20503-5-git-send-email-rlane@club.cc.cmu.edu>
3225 <1262302618-20503-6-git-send-email-rlane@club.cc.cmu.edu>
3226 <1262302618-20503-7-git-send-email-rlane@club.cc.cmu.edu>
3227 <1262302618-20503-8-git-send-email-rlane@club.cc.cmu.edu>
3228 <1262302618-20503-9-git-send-email-rlane@club.cc.cmu.edu>
3229 <1262302618-20503-10-git-send-email-rlane@club.cc.cmu.edu>
3230 Message-ID: <1262302618-20503-11-git-send-email-rlane@club.cc.cmu.edu>
3231
3232 ---
3233 lib/sup/message.rb | 13 +++++--------
3234 1 files changed, 5 insertions(+), 8 deletions(-)
3235
3236 diff --git a/lib/sup/message.rb b/lib/sup/message.rb
3237 index 519243a..ff05df6 100644
3238 --- a/lib/sup/message.rb
3239 +++ b/lib/sup/message.rb
3240 @@ -446,15 +446,12 @@ private
3241 from = payload.header.from.first ? payload.header.from.first.format : ""
3242 to = payload.header.to.map { |p| p.format }.join(", ")
3243 cc = payload.header.cc.map { |p| p.format }.join(", ")
3244 - subj = payload.header.subject
3245 - subj = subj ? Message.normalize_subj(payload.header.subject.gsub(/\s+/, " ").gsub(/\s+$/, "")) : subj
3246 - if Rfc2047.is_encoded? subj
3247 - subj = Rfc2047.decode_to $encoding, subj
3248 - end
3249 + subj = decode_header_field(payload.header.subject) || DEFAULT_SUBJECT
3250 + subj = Message.normalize_subj(subj.gsub(/\s+/, " ").gsub(/\s+$/, ""))
3251 msgdate = payload.header.date
3252 - from_person = from ? Person.from_address(from) : nil
3253 - to_people = to ? Person.from_address_list(to) : nil
3254 - cc_people = cc ? Person.from_address_list(cc) : nil
3255 + from_person = from ? Person.from_address(decode_header_field from) : nil
3256 + to_people = to ? Person.from_address_list(decode_header_field to) : nil
3257 + cc_people = cc ? Person.from_address_list(decode_header_field cc) : nil
3258 [Chunk::EnclosedMessage.new(from_person, to_people, cc_people, msgdate, subj)] + message_to_chunks(payload, encrypted)
3259 else
3260 debug "no body for message/rfc822 enclosure; skipping"
3261 --
3262 1.6.3.3
3263
3264