sup

A curses threads-with-tags style email client

sup-website.git

git clone https://supmua.dev/git/sup-website/

community/pipermail-archives/sup-talk/2008-02.txt (251676B) - raw

      1 From manish@gslab.com  Fri Feb  1 03:49:52 2008
      2 From: manish@gslab.com (Manish Sapariya)
      3 Date: Fri, 01 Feb 2008 14:19:52 +0530
      4 Subject: [sup-talk] wup
      5 In-Reply-To: <1194487545-sup-8478@south>
      6 References: <1194487545-sup-8478@south>
      7 Message-ID: <47A2DD30.6040502@gslab.com>
      8 
      9 Hi,
     10 Did anyone tried this. When I run merb it says
     11 
     12 [manish at alioth app]$ merb
     13 You are not in the root of a merb application...
     14 
     15 I tried running it from various directories but did not help.
     16 
     17 Thanks and Regards,
     18 Manish
     19 
     20 William Morgan wrote:
     21 > Hi Suppers,
     22 >
     23 > My friend Leslie has hacked together "wup", a web interface on top of
     24 > Sup: http://jinsync.com/?q=node/16.
     25 >
     26 > 75 lines of code gets you quite a lot!
     27 >
     28 >   
     29 
     30 
     31 From manish@gslab.com  Fri Feb  1 04:08:37 2008
     32 From: manish@gslab.com (Manish Sapariya)
     33 Date: Fri, 01 Feb 2008 14:38:37 +0530
     34 Subject: [sup-talk] not all labels are shown in the list of labels first time
     35 Message-ID: <47A2E195.1060704@gslab.com>
     36 
     37 Hi All,
     38 I reindexed my mail box after writing all the filter rules that I had to.
     39 I was expecting label list to show all the labels that I had applied using
     40 filter hook. However I dont see all of them.
     41 
     42 They are shown in the list once I search for that lable and view the label
     43 list again it shows in the list.
     44 
     45 Regards,
     46 Manish
     47 
     48 From wmorgan-sup@masanjin.net  Sat Feb  2 19:58:26 2008
     49 From: wmorgan-sup@masanjin.net (William Morgan)
     50 Date: Sat, 02 Feb 2008 16:58:26 -0800
     51 Subject: [sup-talk] [PATCH] return sources in id-order,
     52 	with non-archived sources first
     53 In-Reply-To: <1201272768-sup-3795@spooky.local>
     54 References: <1200675726-sup-4860@spooky.local> <1201238649-sup-7598@south>
     55 	<1201272768-sup-3795@spooky.local>
     56 Message-ID: <1202000192-sup-2543@south>
     57 
     58 Reformatted excerpts from Grant Hollingworth's message of 2008-01-25:
     59 > How about changing @sources to an array?
     60 
     61 The id is important (it's stored directly in the index), so I don't want 
     62 removing a source to change the id of all following sources.
     63 
     64 I've merged this into next.
     65 
     66 -- 
     67 William <wmorgan-sup at masanjin.net>
     68 
     69 From wmorgan-sup@masanjin.net  Sat Feb  2 20:06:59 2008
     70 From: wmorgan-sup@masanjin.net (William Morgan)
     71 Date: Sat, 02 Feb 2008 17:06:59 -0800
     72 Subject: [sup-talk] [PATCH] Add ability to interrupt current thread
     73 	operation (search)
     74 In-Reply-To: <1201119167-sup-8440@tomsk>
     75 References: <1200768101-sup-3312@tomsk> <1200768474-sup-7396@tomsk>
     76 	<1200769080-sup-4420@tomsk> <1201114113-sup-1607@south>
     77 	<1201119167-sup-8440@tomsk>
     78 Message-ID: <1202000591-sup-8570@south>
     79 
     80 Reformatted excerpts from Marcus Williams's message of 2008-01-23:
     81 > My feeling was it wasnt obvious that you could cancel the operation
     82 > without it. If there was some way of making that more obvious
     83 > somewhere then the message could be removed. I didnt even realise I
     84 > could use ^G elsewhere until fairly recently!
     85 
     86 After trying it, I do like it better without the extra messages, so next
     87 currently has them removed. I could make ^G more promiment in the new
     88 user's guide...
     89 
     90 -- 
     91 William <wmorgan-sup at masanjin.net>
     92 
     93 From wmorgan-sup@masanjin.net  Sat Feb  2 20:28:41 2008
     94 From: wmorgan-sup@masanjin.net (William Morgan)
     95 Date: Sat, 02 Feb 2008 17:28:41 -0800
     96 Subject: [sup-talk] crash on attachments with ~
     97 In-Reply-To: <1201326444-sup-243@buckwheat>
     98 References: <1201326444-sup-243@buckwheat>
     99 Message-ID: <1202002106-sup-2745@south>
    100 
    101 Reformatted excerpts from Daniel Wagner's message of 2008-01-25:
    102 > If I type in a filename that starts with ~ at the attachment prompt,
    103 > sup crashes.
    104 
    105 Fixed in next. Thanks.
    106 
    107 -- 
    108 William <wmorgan-sup at masanjin.net>
    109 
    110 From wmorgan-sup@masanjin.net  Sat Feb  2 21:20:50 2008
    111 From: wmorgan-sup@masanjin.net (William Morgan)
    112 Date: Sat, 02 Feb 2008 18:20:50 -0800
    113 Subject: [sup-talk] [PATCH] expand file paths and rescue enoent
    114 	exceptions when adding attachments
    115 In-Reply-To: <21aa9f0801261935i12a36782o85030b24078e7dd7@mail.gmail.com>
    116 References: <21aa9f0801261918j2890aee2yeb52484a95b786c3@mail.gmail.com>
    117 	<21aa9f0801261935i12a36782o85030b24078e7dd7@mail.gmail.com>
    118 Message-ID: <1202005201-sup-3249@south>
    119 
    120 I had already come up with a patch for this. Sorry! git diff
    121 master..019854 if you're curious.
    122 
    123 -- 
    124 William <wmorgan-sup at masanjin.net>
    125 
    126 From wmorgan-sup@masanjin.net  Sat Feb  2 21:34:02 2008
    127 From: wmorgan-sup@masanjin.net (William Morgan)
    128 Date: Sat, 02 Feb 2008 18:34:02 -0800
    129 Subject: [sup-talk] [PATCH] fixed crasher when refining search and
    130 	updated keybinding
    131 In-Reply-To: <1201325529-812-1-git-send-email-chrisw@rice.edu>
    132 References: <1201325529-812-1-git-send-email-chrisw@rice.edu>
    133 Message-ID: <1202005927-sup-5664@south>
    134 
    135 Reformatted excerpts from Christopher Warrington's message of 2008-01-25:
    136 > Refine search no longer crashes.
    137 
    138 This seems fine. At first I thought it was a little weird that the
    139 extra_opts are being discarded on refinement, but now I think that's
    140 actually the right thing to do.
    141 
    142 One minor tweak request: can you split this into two patches, one for
    143 the keybinding change and one for the bugfix?
    144 
    145 Thanks!
    146 
    147 -- 
    148 William <wmorgan-sup at masanjin.net>
    149 
    150 From wmorgan-sup@masanjin.net  Sat Feb  2 21:35:28 2008
    151 From: wmorgan-sup@masanjin.net (William Morgan)
    152 Date: Sat, 02 Feb 2008 18:35:28 -0800
    153 Subject: [sup-talk] [PATCH] fixed crasher when refining search and
    154 	updated keybinding
    155 In-Reply-To: <1201453197-sup-1113@tangerine.lanl.gov>
    156 References: <1201325529-812-1-git-send-email-chrisw@rice.edu>
    157 	<1201453197-sup-1113@tangerine.lanl.gov>
    158 Message-ID: <1202006046-sup-3057@south>
    159 
    160 Reformatted excerpts from John Bent's message of 2008-01-27:
    161 > Refine search is very nice.  Something else which might be nice would
    162 > be a persistent search history which could be scrolled through with
    163 > the up and down arrow keys.  That feature would then include refine
    164 > search.
    165 
    166 There is a non-persistent (but contextually-aware!) search history
    167 accessible via up and down keys now. Persisting that to disk wouldn't be
    168 very hard at all.
    169 
    170 -- 
    171 William <wmorgan-sup at masanjin.net>
    172 
    173 From wmorgan-sup@masanjin.net  Sat Feb  2 21:56:40 2008
    174 From: wmorgan-sup@masanjin.net (William Morgan)
    175 Date: Sat, 02 Feb 2008 18:56:40 -0800
    176 Subject: [sup-talk] [PATCH] first pass at a simple interface to extract
    177 	URIs from a message
    178 In-Reply-To: <21aa9f0801291923w2df946dbga7832a7345c09a95@mail.gmail.com>
    179 References: <21aa9f0801291923w2df946dbga7832a7345c09a95@mail.gmail.com>
    180 Message-ID: <1202007092-sup-19@south>
    181 
    182 Reformatted excerpts from brabuhr's message of 2008-01-29:
    183 > This adds a new key binding to the thread-view mode (L) to assist with
    184 > loading URIs from the body of the message.  This first pass will pull
    185 > the URIs from the message text and loop through them while asking if
    186 > that URI should be loaded.  Currently, there is no code to actually
    187 > perform the load.
    188 
    189 Looks good. I have a slight preference for a "if uris.size == 0" block
    190 that flashes a message and returns, so that the meat of the method
    191 doesn't have to be too indented.
    192 
    193 My limited research indicates that there isn't a standard way (like
    194 mailcap) of viewing a URL. So probably a "view-url" hook is the best way
    195 to approach the actual viewing code.
    196 
    197 -- 
    198 William <wmorgan-sup at masanjin.net>
    199 
    200 From wmorgan-sup@masanjin.net  Sat Feb  2 22:01:25 2008
    201 From: wmorgan-sup@masanjin.net (William Morgan)
    202 Date: Sat, 02 Feb 2008 19:01:25 -0800
    203 Subject: [sup-talk] missing run-mailcap
    204 In-Reply-To: <1201718069-sup-9900@tangerine.lanl.gov>
    205 References: <1201019996-sup-8960@tangerine.lanl.gov>
    206 	<1201041081-sup-6034@tangerine.lanl.gov>
    207 	<1201210323-sup-6116@tangerine.lanl.gov>
    208 	<1201216741-sup-4105@south>
    209 	<1201218489-sup-3542@tangerine.lanl.gov>
    210 	<1201220092-sup-8263@south> <1201222453-sup-1190@spooky.local>
    211 	<1201235901-sup-7426@tangerine.lanl.gov>
    212 	<1201307667-sup-2659@tangerine.lanl.gov>
    213 	<1201714011-sup-6178@south>
    214 	<1201715536-sup-6254@tangerine.lanl.gov>
    215 	<1201717294-sup-1892@south>
    216 	<1201718069-sup-9900@tangerine.lanl.gov>
    217 Message-ID: <1202007682-sup-2115@south>
    218 
    219 Reformatted excerpts from John Bent's message of 2008-01-30:
    220 > Ah.  But
    221 > system "open '#{filename}'"
    222 > false
    223 > 
    224 > works perfectly!  (not sure that's expected but I'm happy!)
    225 
    226 The only explanation is that you are living in a bizarro world where
    227 true is false and false is true.
    228 
    229 Seriously. That makes no sense.
    230 
    231 -- 
    232 William <wmorgan-sup at masanjin.net>
    233 
    234 From chrisw@rice.edu  Sat Feb  2 22:49:04 2008
    235 From: chrisw@rice.edu (Christopher Warrington)
    236 Date: Sat,  2 Feb 2008 21:49:04 -0600
    237 Subject: [sup-talk] [PATCH] fixed crasher when refining search
    238 In-Reply-To: <1202005927-sup-5664@south>
    239 References: <1202005927-sup-5664@south>
    240 Message-ID: <1202010544-816-1-git-send-email-chrisw@rice.edu>
    241 
    242 Refine Search no longer crashes.
    243 ---
    244  lib/sup/modes/search-results-mode.rb |    2 +-
    245  1 files changed, 1 insertions(+), 1 deletions(-)
    246  mode change 100644 => 100755 lib/sup/modes/search-results-mode.rb
    247 
    248 diff --git a/lib/sup/modes/search-results-mode.rb b/lib/sup/modes/search-results-mode.rb
    249 old mode 100644
    250 new mode 100755
    251 index f64a227..a03f0a2
    252 --- a/lib/sup/modes/search-results-mode.rb
    253 +++ b/lib/sup/modes/search-results-mode.rb
    254 @@ -15,7 +15,7 @@ class SearchResultsMode < ThreadIndexMode
    255    def refine_search
    256      query = BufferManager.ask :search, "query: ", (@qobj.to_s + " ")
    257      return unless query && query !~ /^\s*$/
    258 -    SearchResultsMode.spawn_from_query query, @qopts
    259 +    SearchResultsMode.spawn_from_query query
    260    end
    261  
    262    ## a proper is_relevant? method requires some way of asking ferret
    263 -- 
    264 1.5.3.8
    265 
    266 
    267 From chrisw@rice.edu  Sat Feb  2 22:49:19 2008
    268 From: chrisw@rice.edu (Christopher Warrington)
    269 Date: Sat,  2 Feb 2008 21:49:19 -0600
    270 Subject: [sup-talk] [PATCH] tweaked Refine Search keybinding
    271 In-Reply-To: <1202005927-sup-5664@south>
    272 References: <1202005927-sup-5664@south>
    273 Message-ID: <1202010559-3708-1-git-send-email-chrisw@rice.edu>
    274 
    275 Refine Search is now bound to |. On most standard 104-key keyboards,
    276 this appears to be shifted \, which fits in nicely since \ is global
    277 search now.
    278 ---
    279  lib/sup/modes/search-results-mode.rb |    4 ++--
    280  1 files changed, 2 insertions(+), 2 deletions(-)
    281 
    282 diff --git a/lib/sup/modes/search-results-mode.rb b/lib/sup/modes/search-results-mode.rb
    283 index a03f0a2..6fdc58a 100755
    284 --- a/lib/sup/modes/search-results-mode.rb
    285 +++ b/lib/sup/modes/search-results-mode.rb
    286 @@ -9,11 +9,11 @@ class SearchResultsMode < ThreadIndexMode
    287    end
    288  
    289    register_keymap do |k|
    290 -    k.add :refine_search, "Refine search", '.'
    291 +    k.add :refine_search, "Refine search", '|'
    292    end
    293  
    294    def refine_search
    295 -    query = BufferManager.ask :search, "query: ", (@qobj.to_s + " ")
    296 +    query = BufferManager.ask :search, "refine query: ", (@qobj.to_s + " ")
    297      return unless query && query !~ /^\s*$/
    298      SearchResultsMode.spawn_from_query query
    299    end
    300 -- 
    301 1.5.3.8
    302 
    303 
    304 From wmorgan-sup@masanjin.net  Sat Feb  2 23:24:51 2008
    305 From: wmorgan-sup@masanjin.net (William Morgan)
    306 Date: Sat, 02 Feb 2008 20:24:51 -0800
    307 Subject: [sup-talk] Is sup slow on cygwin
    308 In-Reply-To: <479C0534.30602@gslab.com>
    309 References: <479AF45A.6060007@gslab.com> <1201376227-sup-7884@chris-tablet>
    310 	<479C0534.30602@gslab.com>
    311 Message-ID: <1202012673-sup-6840@south>
    312 
    313 Manish,
    314 
    315 Did you ever resolve this?
    316 
    317 -- 
    318 William <wmorgan-sup at masanjin.net>
    319 
    320 From wmorgan-sup@masanjin.net  Sat Feb  2 23:26:36 2008
    321 From: wmorgan-sup@masanjin.net (William Morgan)
    322 Date: Sat, 02 Feb 2008 20:26:36 -0800
    323 Subject: [sup-talk] [BUG] When marking a spam, the mail don't disappear
    324 In-Reply-To: <1201596013-sup-3324@port-ext5.ensta.fr>
    325 References: <1201596013-sup-3324@port-ext5.ensta.fr>
    326 Message-ID: <1202012696-sup-7790@south>
    327 
    328 Reformatted excerpts from nicolas.pouillard's message of 2008-01-29:
    329 > I've  hit  a bug when marking a spam in thread-view-mode (using ",s")
    330 > and then going  to  inbox  (using  "x"), the spam seems still there,
    331 > but in fact it was already  deleted,  just  not  remove from the list
    332 > (hitting "$@" is my current workaroud).
    333 
    334 I believe I've fixed this in next.
    335 
    336 I've also just made the dispatch-and-something changes (,whatever and
    337 .whatever) NOT automatically write to the index. So now they're
    338 consistent with the rest of Sup---changes are only saved once you close
    339 the corresponding thread-index-mode, or hit $.
    340 
    341 -- 
    342 William <wmorgan-sup at masanjin.net>
    343 
    344 From wmorgan-sup@masanjin.net  Sat Feb  2 23:31:00 2008
    345 From: wmorgan-sup@masanjin.net (William Morgan)
    346 Date: Sat, 02 Feb 2008 20:31:00 -0800
    347 Subject: [sup-talk] [PATCH] don't try to open the next thread if there
    348 	isn't one available
    349 In-Reply-To: <1201681010-sup-3463@archie>
    350 References: <1201681010-sup-3463@archie>
    351 Message-ID: <1202012826-sup-1965@south>
    352 
    353 Reformatted excerpts from its.jeff.balogh's message of 2008-01-30:
    354 > When you're on the last thread of a ThreadSet and press ',<key>',
    355 > nothing happens, but you can't '.<key>' since @dying == true.  This
    356 > patch changes :next to :kill if there is no next thread.
    357 
    358 I made a parallel change to do this:
    359 e47f9dabca0349a1fff046232961b38d900d4445. It's all withing
    360 ThreadIndexMode#launch_next_thread_after, which I think is a little
    361 cleaner.
    362 
    363 As I mentioned in the previous email, I also just changed these
    364 operations so that they don't automatically save state to disk, so as to
    365 be consistent with the rest of Sup.
    366 
    367 -- 
    368 William <wmorgan-sup at masanjin.net>
    369 
    370 From wmorgan-sup@masanjin.net  Sat Feb  2 23:35:33 2008
    371 From: wmorgan-sup@masanjin.net (William Morgan)
    372 Date: Sat, 02 Feb 2008 20:35:33 -0800
    373 Subject: [sup-talk] [PATCH] don't try to open the next thread if there
    374 	isn't one available
    375 In-Reply-To: <1201732604-sup-4815@archie>
    376 References: <1201681010-sup-3463@archie> <1201732604-sup-4815@archie>
    377 Message-ID: <1202013064-sup-8151@south>
    378 
    379 Reformatted excerpts from its.jeff.balogh's message of 2008-01-30:
    380 > The :next case guards against this exception with 'if block_given? &&
    381 > yield'.  If I put that in the :kill case, those two lines will be
    382 > exact duplicates of the lines above.
    383 > 
    384 > Is there a clean way to handle this?  I'm learning Ruby as I go along,
    385 > so please forgive me if the answer is obvious.
    386 
    387 To answer your question, depends what you mean by clean. We can capture
    388 the shared lines in a closure with lambda { ... }, or we can move them
    389 to a function and call the function, but that's basically the extent of
    390 the control flow power we have here. (Well, unless we want to start
    391 using continuations!)
    392 
    393 In the latest version of the code, the shared lines are now exactly the
    394 same, and are simply duplicated. Maybe once a :prev branch is added a
    395 refactor will be necessary.
    396 
    397 -- 
    398 William <wmorgan-sup at masanjin.net>
    399 
    400 From wmorgan-sup@masanjin.net  Sat Feb  2 23:44:41 2008
    401 From: wmorgan-sup@masanjin.net (William Morgan)
    402 Date: Sat, 02 Feb 2008 20:44:41 -0800
    403 Subject: [sup-talk] can't remove draft label
    404 In-Reply-To: <1201759596-sup-4274@tangerine.lanl.gov>
    405 References: <1201716067-sup-3586@tangerine.lanl.gov>
    406 	<1201754138-sup-7276@chris-tablet>
    407 	<1201759596-sup-4274@tangerine.lanl.gov>
    408 Message-ID: <1202013739-sup-550@south>
    409 
    410 Reformatted excerpts from John Bent's message of 2008-01-30:
    411 > But that was just the message I'd previously deleted from the drafts
    412 > dir.  The false draft is still there... 
    413 
    414 I'm not sure why that label would be there, but you can perform some
    415 index surgery to remove it.
    416 
    417 $ sh devel/console.sh 
    418 irb(main):001:0> r=Index.ferret.search("message_id:1201759596-sup-4274 at tangerine.lanl.gov")
    419 => #<struct Ferret::Search::TopDocs total_hits=1, hits=[#<struct Ferret::Search::Hit doc=92571, score=10.82630443573>], max_score=10.82630443573, searcher=#<Ferret::Search::Searcher:0xb740dff0>>
    420 irb(main):002:0> id=r.hits.first.doc
    421 => 92571
    422 irb(main):003:0> m = Index.build_message id
    423 [...]
    424 irb(main):004:0> m.remove_label :draft
    425 => true
    426 irb(main):005:0> m.save Index
    427 => false
    428 irb(main):006:0> exit
    429 
    430 Something like that. Plug in the correct message-id above.
    431 
    432 -- 
    433 William <wmorgan-sup at masanjin.net>
    434 
    435 From wmorgan-sup@masanjin.net  Sat Feb  2 23:54:04 2008
    436 From: wmorgan-sup@masanjin.net (William Morgan)
    437 Date: Sat, 02 Feb 2008 20:54:04 -0800
    438 Subject: [sup-talk] [PATCH] spelling error
    439 In-Reply-To: <1201803937-sup-5871@red>
    440 References: <1201803937-sup-5871@red>
    441 Message-ID: <1202014434-sup-5831@south>
    442 
    443 Applied, thanks!
    444 
    445 -- 
    446 William <wmorgan-sup at masanjin.net>
    447 
    448 From wmorgan-sup@masanjin.net  Sun Feb  3 00:09:17 2008
    449 From: wmorgan-sup@masanjin.net (William Morgan)
    450 Date: Sat, 02 Feb 2008 21:09:17 -0800
    451 Subject: [sup-talk] [PATCH] tweaked Refine Search keybinding
    452 In-Reply-To: <1202010559-3708-1-git-send-email-chrisw@rice.edu>
    453 References: <1202005927-sup-5664@south>
    454 	<1202010559-3708-1-git-send-email-chrisw@rice.edu>
    455 Message-ID: <1202015348-sup-9371@south>
    456 
    457 Both in next. Thanks!
    458 
    459 -- 
    460 William <wmorgan-sup at masanjin.net>
    461 
    462 From chrisw@rice.edu  Sun Feb  3 03:11:11 2008
    463 From: chrisw@rice.edu (Christopher Warrington)
    464 Date: Sun,  3 Feb 2008 02:11:11 -0600
    465 Subject: [sup-talk] Possible fix for ferret "Permission denied" errors
    466 Message-ID: <1202026272-3432-1-git-send-email-chrisw@rice.edu>
    467 
    468 
    469 In the forthcoming patch, I have proposed a possible fix for the ferret 
    470 "Permission denied" error some have been getting.
    471 
    472 I run sup under Cygwin. Before, when I was composing an e-mail and sup 
    473 did a background poll and found new messages, sup would crash with the 
    474 ferret error "Permission denied".
    475 
    476 I think that this has to do with Windows different file sharing 
    477 semantics. I've been running with this patch for a while now and not had 
    478 another "Permission denied" error.
    479 
    480 However, I have not been able to test it on a non-Cygwin setup. I also 
    481 don't know if this is the proper way to address this issue. To me, it 
    482 seems mery much like a hack. Is there a clean way to either close all 
    483 open files, get a list of FDs in use, or get the maximum FD allowed?
    484 
    485 Comments welcome and encouraged!
    486 
    487 From chrisw@rice.edu  Sun Feb  3 03:11:12 2008
    488 From: chrisw@rice.edu (Christopher Warrington)
    489 Date: Sun,  3 Feb 2008 02:11:12 -0600
    490 Subject: [sup-talk] [PATCH] shell commands are now run in a child process
    491 Message-ID: <1202026272-3432-2-git-send-email-chrisw@rice.edu>
    492 
    493 When shelling out, the external command is now run in a child process.
    494 Before the external command is run, all (I hope) of sup's open files are
    495 closed first.
    496 
    497 This should fix the ferret "Permission denied" errors on Windows.
    498 ---
    499  lib/sup/buffer.rb |   27 ++++++++++++++++++++++++++-
    500  1 files changed, 26 insertions(+), 1 deletions(-)
    501 
    502 diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
    503 index 4374fa8..7768011 100644
    504 --- a/lib/sup/buffer.rb
    505 +++ b/lib/sup/buffer.rb
    506 @@ -696,11 +696,36 @@ EOS
    507      draw_screen :refresh => true
    508    end
    509  
    510 +  ## There is no good way that I can find the get the maximum fd allowed.
    511 +  ## On the POSIX systems I have played with, 500 seems to be the maximum. On Windows,
    512 +  ## 2048 is the documented maximum (for the C Runtime Library).
    513 +  MAX_FD = 2048
    514 +
    515    def shell_out command
    516      @shelled = true
    517      Ncurses.sync do
    518        Ncurses.endwin
    519 -      system command
    520 +
    521 +      child_pid = fork
    522 +      if child_pid == nil
    523 +        ## child process
    524 +
    525 +        start_fd = 1 + [STDIN.fileno, STDOUT.fileno, STDERR.fileno].max # don't close these
    526 +	start_fd.upto(MAX_FD) do |fd|
    527 +          begin
    528 +            IO.for_fd(fd).close
    529 +          rescue Errno::EBADF
    530 +            ## fd is not open: ignore and move on
    531 +          end
    532 +        end
    533 +
    534 +        exec(command)
    535 +        ## never gets here
    536 +      else
    537 +        ## sup process
    538 +        Process.waitpid(child_pid, Process::WUNTRACED) # catch an already dead child
    539 +      end
    540 +
    541        Ncurses.refresh
    542        Ncurses.curs_set 0
    543      end
    544 -- 
    545 1.5.3.8
    546 
    547 
    548 From nicolas.pouillard@gmail.com  Sun Feb  3 06:15:53 2008
    549 From: nicolas.pouillard@gmail.com (Nicolas Pouillard)
    550 Date: Sun, 03 Feb 2008 12:15:53 +0100
    551 Subject: [sup-talk] [BUG] When marking a spam, the mail don't disappear
    552 In-Reply-To: <1202012696-sup-7790@south>
    553 References: <1201596013-sup-3324@port-ext5.ensta.fr>
    554 	<1202012696-sup-7790@south>
    555 Message-ID: <1202037178-sup-2704@ausone.local>
    556 
    557 Excerpts from William Morgan's message of Sun Feb 03 05:26:36 +0100 2008:
    558 > Reformatted excerpts from nicolas.pouillard's message of 2008-01-29:
    559 > > I've  hit  a bug when marking a spam in thread-view-mode (using ",s")
    560 > > and then going  to  inbox  (using  "x"), the spam seems still there,
    561 > > but in fact it was already  deleted,  just  not  remove from the list
    562 > > (hitting "$@" is my current workaroud).
    563 > 
    564 > I believe I've fixed this in next.
    565 
    566 Thanks!
    567 
    568 > I've also just made the dispatch-and-something changes (,whatever and
    569 > .whatever) NOT automatically write to the index. So now they're
    570 > consistent with the rest of Sup---changes are only saved once you close
    571 > the corresponding thread-index-mode, or hit $.
    572 
    573 That's   not   completely   convenient   since   '$'   is   not  available  in
    574 thread-view-mode.  Moreover  it's bound to "moving to the last line", which is
    575 not that useful since there is already two other bindings for that.
    576 
    577 -- 
    578 Nicolas Pouillard aka Ertai
    579 -------------- next part --------------
    580 A non-text attachment was scrubbed...
    581 Name: signature.asc
    582 Type: application/pgp-signature
    583 Size: 186 bytes
    584 Desc: not available
    585 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080203/99274f2d/attachment.bin 
    586 
    587 From manish@gslab.com  Mon Feb  4 00:12:34 2008
    588 From: manish@gslab.com (Manish Sapariya)
    589 Date: Mon, 04 Feb 2008 10:42:34 +0530
    590 Subject: [sup-talk] Is sup slow on cygwin
    591 In-Reply-To: <1202012673-sup-6840@south>
    592 References: <479AF45A.6060007@gslab.com>
    593 	<1201376227-sup-7884@chris-tablet>	<479C0534.30602@gslab.com>
    594 	<1202012673-sup-6840@south>
    595 Message-ID: <47A69EC2.8060707@gslab.com>
    596 
    597 Hi William,
    598 I could not resolve it when working with Thunderbird mbox files.
    599 However then I moved to fetchmail and procmail, with maildir mail
    600 box and things are working fine.
    601 
    602 Just to add more context, I had nightmare getting sup working with
    603 thunderbird mbox files (even on linux) and eventually I decided to
    604 go for fetchmail to fetch my mails and things are working perfectly
    605 fine.
    606 
    607 However if you are curious to know what goes wrong when working
    608 with Thunderbird mbox file, I may try out again and post the results.
    609 
    610 Thanks and Regards,
    611 Manish
    612 
    613 William Morgan wrote:
    614 > Manish,
    615 >
    616 > Did you ever resolve this?
    617 >
    618 >   
    619 
    620 
    621 From manish@gslab.com  Mon Feb  4 04:34:51 2008
    622 From: manish@gslab.com (Manish Sapariya)
    623 Date: Mon, 04 Feb 2008 15:04:51 +0530
    624 Subject: [sup-talk] Need help to use/customize sup
    625 Message-ID: <47A6DC3B.4090808@gslab.com>
    626 
    627 Hi all,
    628 Essentially I want to know:
    629 - How can I mark all marked/tagged mails/threads as read.
    630 - Can I tell sup, to not show any mail/thread in inbox, if mail has no inbox
    631 label.
    632 
    633 This is the way I operate Thunderbird and I wanted to keep my workflow
    634 same for both.
    635 
    636 Thanks and Regards,
    637 Manish
    638 
    639 
    640 From manish@gslab.com  Mon Feb  4 04:51:27 2008
    641 From: manish@gslab.com (Manish Sapariya)
    642 Date: Mon, 04 Feb 2008 15:21:27 +0530
    643 Subject: [sup-talk] Need help to use/customize sup
    644 In-Reply-To: <47A6DC3B.4090808@gslab.com>
    645 References: <47A6DC3B.4090808@gslab.com>
    646 Message-ID: <47A6E01F.3020506@gslab.com>
    647 
    648 One more things is that when I press @ to refresh the inbox view,
    649 I see many other threads which do not have inbox label in it. Do I
    650 have to take any extra action on all those messages? I believe they
    651 are all unread messages? Is this the case?
    652 Thanks,
    653 Manish
    654 Manish Sapariya wrote:
    655 > Hi all,
    656 > Essentially I want to know:
    657 > - How can I mark all marked/tagged mails/threads as read.
    658 > - Can I tell sup, to not show any mail/thread in inbox, if mail has no inbox
    659 > label.
    660 >
    661 > This is the way I operate Thunderbird and I wanted to keep my workflow
    662 > same for both.
    663 >
    664 > Thanks and Regards,
    665 > Manish
    666 >
    667 > _______________________________________________
    668 > sup-talk mailing list
    669 > sup-talk at rubyforge.org
    670 > http://rubyforge.org/mailman/listinfo/sup-talk
    671 >
    672 >   
    673 
    674 
    675 From chrisw@rice.edu  Mon Feb  4 06:04:42 2008
    676 From: chrisw@rice.edu (Christopher Warrington)
    677 Date: Mon, 04 Feb 2008 05:04:42 -0600
    678 Subject: [sup-talk] Need help to use/customize sup
    679 In-Reply-To: <47A6DC3B.4090808@gslab.com>
    680 References: <47A6DC3B.4090808@gslab.com>
    681 Message-ID: <1202122974-sup-1896@chris-tablet>
    682 
    683 Excerpts from Manish Sapariya's message of Mon Feb 04 03:34:51 -0600 2008:
    684 > - How can I mark all marked/tagged mails/threads as read.
    685 
    686 Tag threads with 't', press ';' for apply, press 'N' to toggle from 
    687 unread to read.
    688 
    689 If you have a search that includes both read and unread threads, you can 
    690 select only the unread threads by including "is:unread" in your query.
    691 
    692 You can use tag and apply with other commands too, like delete and label.
    693 
    694 > - Can I tell sup, to not show any mail/thread in inbox, if mail has no inbox
    695 > label.
    696 
    697 That's what it does already. However, in the inbox view, the "inbox" 
    698 label is not shown. It IS shown in other views, like the search results 
    699 view.
    700 
    701 If you don't want a thread to reappear in the inbox when a new message 
    702 arrives, kill it with '&' instead of archiving it with 'a'.
    703 
    704 -- 
    705 Christopher Warrington <chrisw at rice.edu>
    706 Jones College
    707 
    708 From chrisw@rice.edu  Mon Feb  4 06:07:35 2008
    709 From: chrisw@rice.edu (Christopher Warrington)
    710 Date: Mon, 04 Feb 2008 05:07:35 -0600
    711 Subject: [sup-talk] Need help to use/customize sup
    712 In-Reply-To: <47A6E01F.3020506@gslab.com>
    713 References: <47A6DC3B.4090808@gslab.com> <47A6E01F.3020506@gslab.com>
    714 Message-ID: <1202123094-sup-752@chris-tablet>
    715 
    716 Excerpts from Manish Sapariya's message of Mon Feb 04 03:51:27 -0600 2008:
    717 > One more things is that when I press @ to refresh the inbox view, I 
    718 > see many other threads which do not have inbox label in it. Do I have 
    719 > to take any extra action on all those messages? I believe they are all 
    720 > unread messages? Is this the case?
    721 
    722 This is a bug (I think) in recent version. Initially, these threads are 
    723 not displayed because of sup's 20 message result limit. Re-running the 
    724 query with @ pulls in all threads.
    725 
    726 I could be wrong about the above: I'm not looking at the code right now.
    727 
    728 All the messages have the inbox label. As I said in my other message, 
    729 you just don't see it in the inbox view. Open the thread and you will 
    730 see inbox in the list of labels.
    731 
    732 -- 
    733 Christopher Warrington <chrisw at rice.edu>
    734 Jones College
    735 
    736 From manish@gslab.com  Mon Feb  4 07:53:35 2008
    737 From: manish@gslab.com (Manish Sapariya)
    738 Date: Mon, 04 Feb 2008 18:23:35 +0530
    739 Subject: [sup-talk] Need help to use/customize sup
    740 In-Reply-To: <1202122974-sup-1896@chris-tablet>
    741 References: <47A6DC3B.4090808@gslab.com> <1202122974-sup-1896@chris-tablet>
    742 Message-ID: <47A70ACF.4090005@gslab.com>
    743 
    744 Hi Chris,
    745 I have some comments inline.
    746 
    747 Christopher Warrington wrote:
    748 > Tag threads with 't', press ';' for apply, press 'N' to toggle from 
    749 > unread to read.
    750 >
    751 > If you have a search that includes both read and unread threads, you can 
    752 > select only the unread threads by including "is:unread" in your query.
    753 >   
    754 is:unread is very good trick. Thanks.
    755 > You can use tag and apply with other commands too, like delete and label.
    756 >   
    757 I am not sure if I am missing something here, but I could not delete 
    758 labels from all
    759 tagged threads. I could remove label from single though.
    760 > If you don't want a thread to reappear in the inbox when a new message 
    761 > arrives, kill it with '&' instead of archiving it with 'a'.
    762 >
    763 >   
    764 Just so that I understand it, kill will remove the thread from appearing 
    765 from inbox, but
    766 in my search results it will show up?
    767 
    768 Thanks and Regards,
    769 Manish
    770 
    771 
    772 From manish@gslab.com  Mon Feb  4 08:13:25 2008
    773 From: manish@gslab.com (Manish Sapariya)
    774 Date: Mon, 04 Feb 2008 18:43:25 +0530
    775 Subject: [sup-talk] Need help to use/customize sup
    776 In-Reply-To: <1202122974-sup-1896@chris-tablet>
    777 References: <47A6DC3B.4090808@gslab.com> <1202122974-sup-1896@chris-tablet>
    778 Message-ID: <47A70F75.4020006@gslab.com>
    779 
    780 Also,
    781 Is there anything using which I can load all messages? I have to do M to 
    782 load
    783 all messages until it says no messages found.
    784 
    785 Thanks,
    786 Manish
    787 
    788 
    789 From gsf@fruct.us  Mon Feb  4 10:12:21 2008
    790 From: gsf@fruct.us (Gabriel Sean Farrell)
    791 Date: Mon, 4 Feb 2008 10:12:21 -0500
    792 Subject: [sup-talk] Persistence between IMAP clients
    793 Message-ID: <20080204151221.GA29477@manheim.library.drexel.edu>
    794 
    795 Is there a way to persist the labels applied from an instance of sup
    796 IMAPing from one machine to another instance on another machine?  I
    797 check my mail from four different computers on a regular basis, and I
    798 haven't figured out, for example, how to delete emails when checking
    799 with one machine and see them as deleted (that is, *not* see them in my
    800 inbox) when checking with another.  
    801 
    802 Gabriel
    803 
    804 From marcus-sup@bar-coded.net  Mon Feb  4 12:12:55 2008
    805 From: marcus-sup@bar-coded.net (Marcus Williams)
    806 Date: Mon, 04 Feb 2008 17:12:55 +0000
    807 Subject: [sup-talk] Need help to use/customize sup
    808 In-Reply-To: <47A70F75.4020006@gslab.com>
    809 References: <47A6DC3B.4090808@gslab.com> <1202122974-sup-1896@chris-tablet>
    810 	<47A70F75.4020006@gslab.com>
    811 Message-ID: <1202145050-sup-9087@tomsk>
    812 
    813 On 4.2.2008, Manish Sapariya wrote:
    814 > Also,
    815 > Is there anything using which I can load all messages? I have to do
    816 > M to load all messages until it says no messages found.
    817 
    818 depending on the version of sup you are running, "!!" should do it.
    819 Hit ctrl-g to stop the operation (as getting all threads in some
    820 circumstances is going to hurt if you've got a large mailbox)
    821 
    822 Marcus
    823 
    824 From johnbent@lanl.gov  Mon Feb  4 13:46:16 2008
    825 From: johnbent@lanl.gov (John Bent)
    826 Date: Mon, 04 Feb 2008 11:46:16 -0700
    827 Subject: [sup-talk] Persistence between IMAP clients
    828 In-Reply-To: <20080204151221.GA29477@manheim.library.drexel.edu>
    829 References: <20080204151221.GA29477@manheim.library.drexel.edu>
    830 Message-ID: <1202149761-sup-2303@tangerine.lanl.gov>
    831 
    832 Excerpts from Gabriel Sean Farrell's message of Mon Feb 04 08:12:21 -0700 2008:
    833 > Is there a way to persist the labels applied from an instance of sup
    834 > IMAPing from one machine to another instance on another machine?  I
    835 > check my mail from four different computers on a regular basis, and I
    836 > haven't figured out, for example, how to delete emails when checking
    837 > with one machine and see them as deleted (that is, *not* see them in my
    838 > inbox) when checking with another.  
    839 > 
    840 This isn't really answering your question but ... the reason I use sup is
    841 because I can then use multiple computers to check email but have a
    842 persistent view (exactly like what you want).  However, the way I do this
    843 is not by figuring out how to maintain consistent labeling state across
    844 the multiple instances but rather by only actually running sup from one
    845 machine.  I then can check email from multiple computers by always ssh'ing
    846 to that machine.  That's why I like sup: it's console based and lends itself
    847 perfectly to this approach.
    848 
    849 Even though this probably wasn't the answer you were looking for, I fear it
    850 might be the best one you get.  sup isn't designed to actually modify any of
    851 your existing mail folders.  It only reads them and then maintains its own
    852 external state.  So, for example, you can't configure sup to delete emails from
    853 an IMAP server.  What you can do is configure an external program like
    854 fetchmail to pull the emails (and delete them from the IMAP server) and put
    855 them into a local mbox on your machine which sup can then read.  That might
    856 work for you; however, you'll splinter your emails.  Emails which are read on
    857 one machine won't appear on your other three.  What you want is for sup to just
    858 read from the IMAP server and leave them there and then for the four multiple
    859 instances of sup to share their state with each other.  But they have no
    860 mechanism for doing so - they'd need some server somewhere to help them and
    861 they'd also need a bunch of code to implement that functionality.  You could
    862 try to get that functionality transparently by using a distributed file system
    863 shared across the four machines in which you keep your .sup folder.  That
    864 should work (unless maybe there is binary data kept in the .sup files and you
    865 have endian incompatibility across the four machines).  You could try to
    866 approximate the shared file system thing by using something like cvs or git,
    867 but that would be a big silly hassle.  Unless anyone else thinks of something
    868 better, I think the ssh approach is your best bet.
    869 
    870 My only remaining limitation with the ssh scheme is that my primary machine is
    871 my desktop so I am not able to slurp down a bunch of new emails onto my laptop
    872 and work on them from the plane... (the answer of course is to make the laptop
    873 be the primary machine but that doesn't work for a couple of other various
    874 reasons).
    875 
    876 John 
    877 
    878 From manish@gslab.com  Tue Feb  5 04:30:01 2008
    879 From: manish@gslab.com (Manish Sapariya)
    880 Date: Tue, 05 Feb 2008 15:00:01 +0530
    881 Subject: [sup-talk] Need help to use/customize sup
    882 In-Reply-To: <1202122974-sup-1896@chris-tablet>
    883 References: <47A6DC3B.4090808@gslab.com> <1202122974-sup-1896@chris-tablet>
    884 Message-ID: <1202203637-sup-4581@alioth.gs-lab.com>
    885 
    886 > If you don't want a thread to reappear in the inbox when a new message 
    887 > arrives, kill it with '&' instead of archiving it with 'a'.
    888 > 
    889 I hope I not missing something obvious, but I am seeing messages
    890 killed again in my inbox. It does have killed label.
    891 
    892 By the way, thanks for all the help. I am now using sup for all my
    893 mail communication. It does crash once in a while, mostly when I do some
    894 quick operation of loading messages and opening them and most of the 
    895 issues seems to be while accessing the index.
    896 
    897 Thanks and Regards,
    898 -Manish
    899 
    900 From patroclo7@gmail.com  Tue Feb  5 04:56:33 2008
    901 From: patroclo7@gmail.com (Giorgio Lando)
    902 Date: Tue, 05 Feb 2008 10:56:33 +0100
    903 Subject: [sup-talk] upgrade to gettext 1.90.0 breaks encodings
    904 Message-ID: <1202205301-sup-5725@clarabella.clarabella>
    905 
    906 After upgrading with gem to the recent gettext 1.90.0, my encoding was not anymore
    907 identified and it defaulted to UTF8.
    908 Downgrading again to gettext 1.10.0 fixes the issue
    909 
    910 -- 
    911 Giorgio Lando <patroclo7 at gmail dot com>
    912 
    913 From wmorgan-sup@masanjin.net  Tue Feb  5 11:42:03 2008
    914 From: wmorgan-sup@masanjin.net (William Morgan)
    915 Date: Tue, 05 Feb 2008 08:42:03 -0800
    916 Subject: [sup-talk] Persistence between IMAP clients
    917 In-Reply-To: <20080204151221.GA29477@manheim.library.drexel.edu>
    918 References: <20080204151221.GA29477@manheim.library.drexel.edu>
    919 Message-ID: <1202229600-sup-4858@south>
    920 
    921 Reformatted excerpts from Gabriel Sean Farrell's message of 2008-02-04:
    922 > Is there a way to persist the labels applied from an instance of sup
    923 > IMAPing from one machine to another instance on another machine?  I
    924 > check my mail from four different computers on a regular basis, and I
    925 > haven't figured out, for example, how to delete emails when checking
    926 > with one machine and see them as deleted (that is, *not* see them in my
    927 > inbox) when checking with another. 
    928 
    929 There is no good way to do this. There are bad ways (you can dump all
    930 your labels with sup-dump, send them over, and apply them with
    931 sup-sync).
    932 
    933 Sup will probably never work well in this kind of setup.
    934 
    935 -- 
    936 William <wmorgan-sup at masanjin.net>
    937 
    938 From wmorgan-sup@masanjin.net  Tue Feb  5 12:27:26 2008
    939 From: wmorgan-sup@masanjin.net (William Morgan)
    940 Date: Tue, 05 Feb 2008 09:27:26 -0800
    941 Subject: [sup-talk] [PATCH] don't try to open the next thread if there
    942 	isn't one available
    943 In-Reply-To: <1201707688-sup-6637@tangerine.lanl.gov>
    944 References: <1201681010-sup-3463@archie>
    945 	<1201707688-sup-6637@tangerine.lanl.gov>
    946 Message-ID: <1202232384-sup-1186@south>
    947 
    948 Reformatted excerpts from John Bent's message of 2008-01-30:
    949 > Perhaps I should just change my habits but I like to traverse my inbox in
    950 > chronological order (i.e. bottom up instead of top down).  If anyone could 
    951 > make a patch that does ,a or ,n but moves it up instead of down, I'd very
    952 > much appreciate it.
    953 
    954 I do this too, often. Try ']' in next.
    955 
    956 I really need a better keybinding. Wonder if I just should bite the
    957 bullet and do < and > for previous and next instead of , and ].
    958 
    959 -- 
    960 William <wmorgan-sup at masanjin.net>
    961 
    962 From patroclo7@gmail.com  Tue Feb  5 12:31:14 2008
    963 From: patroclo7@gmail.com (Giorgio Lando)
    964 Date: Tue,  5 Feb 2008 18:31:14 +0100
    965 Subject: [sup-talk] [PATCH] allow user to make a gem with a specific version
    966 	number
    967 Message-ID: <1202232674-20414-1-git-send-email-patroclo7@gmail.com>
    968 
    969 If one want to make a gem from a git version of sup, he can also
    970 want to define a version number (e.g. in the form <previous public
    971 release>.1, so that when a new version is released the gem will be
    972 updated nonetheless). With this patch the version can be defined with
    973 the REL environment variable (as in ferret Rakefile)
    974 ---
    975  Rakefile |   10 +++++++---
    976  1 files changed, 7 insertions(+), 3 deletions(-)
    977 
    978 diff --git a/Rakefile b/Rakefile
    979 index f99246f..289da64 100644
    980 --- a/Rakefile
    981 +++ b/Rakefile
    982 @@ -9,9 +9,13 @@ end # thanks to "Mike H"
    983  
    984  ## allow people who use development versions by running "rake gem"
    985  ## and installing the resulting gem it to be able to do this. (gem
    986 -## versions must be in dotted-digit notation only).
    987 -version = Redwood::VERSION == "git" ? "999" : Redwood::VERSION
    988 -
    989 +## versions must be in dotted-digit notation only and can be passed
    990 +## with the REL environment variable to "rake gem").
    991 +if ENV['REL']
    992 +  version = ENV['REL']
    993 +else
    994 +  version = Redwood::VERSION == "git" ? "999" : Redwood::VERSION
    995 +end
    996  Hoe.new('sup', version) do |p|
    997    p.rubyforge_name = 'sup'
    998    p.author = "William Morgan"
    999 -- 
   1000 1.5.4
   1001 
   1002 
   1003 From wmorgan-sup@masanjin.net  Tue Feb  5 12:34:12 2008
   1004 From: wmorgan-sup@masanjin.net (William Morgan)
   1005 Date: Tue, 05 Feb 2008 09:34:12 -0800
   1006 Subject: [sup-talk] [PATCH] shell commands are now run in a child process
   1007 In-Reply-To: <1202026272-3432-2-git-send-email-chrisw@rice.edu>
   1008 References: <1202026272-3432-2-git-send-email-chrisw@rice.edu>
   1009 Message-ID: <1202232814-sup-1005@south>
   1010 
   1011 Reformatted excerpts from Christopher Warrington's message of 2008-02-03:
   1012 > When shelling out, the external command is now run in a child process.
   1013 > Before the external command is run, all (I hope) of sup's open files
   1014 > are closed first.
   1015 
   1016 This seems crazy. Do mbox sources even continue to function properly
   1017 once this has happened? It seems like they'd crash with their file
   1018 handles closed from under them.
   1019 
   1020 If the issue is that Windows has bad behavior when Sup polls while
   1021 you're editing a message, another option might be to turn off polling
   1022 when Sup is shelled out.
   1023 
   1024 Something like (although this doesn't prevent you from starting an
   1025 editor while a background poll is in progress):
   1026 
   1027 diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
   1028 index d40a626..96f676b 100644
   1029 --- a/lib/sup/buffer.rb
   1030 +++ b/lib/sup/buffer.rb
   1031 @@ -137,6 +137,7 @@ class BufferManager
   1032    include Singleton
   1033  
   1034    attr_reader :focus_buf
   1035 +  bool_reader :shelled
   1036  
   1037    ## we have to define the key used to continue in-buffer search here, because
   1038    ## it has special semantics that BufferManager deals with---current searches
   1039 diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb
   1040 index 2dd9150..a67e801 100644
   1041 --- a/lib/sup/poll.rb
   1042 +++ b/lib/sup/poll.rb
   1043 @@ -45,7 +45,8 @@ EOS
   1044    end
   1045  
   1046    def poll
   1047 -    return if @polling
   1048 +    return if @polling || BufferManager.shelled?
   1049 +
   1050      @polling = true
   1051      HookManager.run "before-poll"
   1052  
   1053 
   1054 
   1055 -- 
   1056 William <wmorgan-sup at masanjin.net>
   1057 
   1058 From wmorgan-sup@masanjin.net  Tue Feb  5 12:50:33 2008
   1059 From: wmorgan-sup@masanjin.net (William Morgan)
   1060 Date: Tue, 05 Feb 2008 09:50:33 -0800
   1061 Subject: [sup-talk] [PATCH] allow user to make a gem with a specific
   1062 	version number
   1063 In-Reply-To: <1202232674-20414-1-git-send-email-patroclo7@gmail.com>
   1064 References: <1202232674-20414-1-git-send-email-patroclo7@gmail.com>
   1065 Message-ID: <1202233803-sup-1311@south>
   1066 
   1067 Reformatted excerpts from Giorgio Lando's message of 2008-02-05:
   1068 > If one want to make a gem from a git version of sup, he can also want
   1069 > to define a version number (e.g. in the form <previous public
   1070 > release>.1, so that when a new version is released the gem will be
   1071 > updated nonetheless). With this patch the version can be defined with
   1072 > the REL environment variable (as in ferret Rakefile)
   1073 
   1074 Applied, thanks!
   1075 
   1076 -- 
   1077 William <wmorgan-sup at masanjin.net>
   1078 
   1079 From magnus@therning.org  Tue Feb  5 14:12:10 2008
   1080 From: magnus@therning.org (Magnus Therning)
   1081 Date: Tue, 05 Feb 2008 19:12:10 +0000
   1082 Subject: [sup-talk] Persistence between IMAP clients
   1083 In-Reply-To: <1202229600-sup-4858@south>
   1084 References: <20080204151221.GA29477@manheim.library.drexel.edu>
   1085 	<1202229600-sup-4858@south>
   1086 Message-ID: <47A8B50A.3030302@therning.org>
   1087 
   1088 William Morgan wrote:
   1089 > Reformatted excerpts from Gabriel Sean Farrell's message of 2008-02-04:
   1090 >> Is there a way to persist the labels applied from an instance of sup
   1091 >> IMAPing from one machine to another instance on another machine?  I
   1092 >> check my mail from four different computers on a regular basis, and I
   1093 >> haven't figured out, for example, how to delete emails when checking
   1094 >> with one machine and see them as deleted (that is, *not* see them in my
   1095 >> inbox) when checking with another. 
   1096 > 
   1097 > There is no good way to do this. There are bad ways (you can dump all
   1098 > your labels with sup-dump, send them over, and apply them with
   1099 > sup-sync).
   1100 > 
   1101 > Sup will probably never work well in this kind of setup.
   1102 
   1103 Would it be possible to simply use unison to synchronise the machines?
   1104 As long as you can make sure to avoid conflicts and you can make sure
   1105 system-specific settings (such as file locations and server settings)
   1106 are the same it /could/ work.  Please note that I've never tried it with
   1107 sup, but other MUAs have worked fine this way.
   1108 
   1109 /M
   1110 
   1111 -- 
   1112 Magnus Therning                             (OpenPGP: 0xAB4DFBA4)
   1113 magnus?therning?org             Jabber: magnus?therning?gmail?com
   1114 http://therning.org/magnus
   1115 
   1116 What if I don't want to obey the laws? Do they throw me in jail with
   1117 the other bad monads?
   1118      -- Daveman
   1119 
   1120 -------------- next part --------------
   1121 A non-text attachment was scrubbed...
   1122 Name: signature.asc
   1123 Type: application/pgp-signature
   1124 Size: 189 bytes
   1125 Desc: OpenPGP digital signature
   1126 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080205/27dda927/attachment.bin 
   1127 
   1128 From chrisw@rice.edu  Tue Feb  5 14:29:19 2008
   1129 From: chrisw@rice.edu (Christopher Warrington)
   1130 Date: Tue, 05 Feb 2008 13:29:19 -0600
   1131 Subject: [sup-talk] [PATCH] shell commands are now run in a child process
   1132 In-Reply-To: <1202232814-sup-1005@south>
   1133 References: <1202026272-3432-2-git-send-email-chrisw@rice.edu>
   1134 	<1202232814-sup-1005@south>
   1135 Message-ID: <1202239755-sup-3523@chris-tablet>
   1136 
   1137 Excerpts from William Morgan's message of Tue Feb 05 11:34:12 -0600 2008:
   1138 >> When shelling out, the external command is now run in a child 
   1139 >> process. Before the external command is run, all (I hope) of sup's 
   1140 >> open files are closed first.
   1141 > This seems crazy. Do mbox sources even continue to function properly 
   1142 > once this has happened? It seems like they'd crash with their file 
   1143 > handles closed from under them.
   1144 
   1145 No, it's not elegant at all. mbox sources do still work, though. I only 
   1146 close the files in the child process. They remain open in sup's main 
   1147 process.
   1148 
   1149 Setting the file descriptors to FD_CLOEXEC would be a cleaner solution, 
   1150 but I don't think that this works on Cygwin (or is accessible via Ruby).
   1151 
   1152 > If the issue is that Windows has bad behavior when Sup polls while
   1153 > you're editing a message, another option might be to turn off polling
   1154 > when Sup is shelled out.
   1155 
   1156 That's a thought. If I get some time, I may be able to dig into this.
   1157 
   1158 -- 
   1159 Christopher Warrington <chrisw at rice.edu>
   1160 
   1161 From wmorgan-sup@masanjin.net  Tue Feb  5 14:51:08 2008
   1162 From: wmorgan-sup@masanjin.net (William Morgan)
   1163 Date: Tue, 05 Feb 2008 11:51:08 -0800
   1164 Subject: [sup-talk] Persistence between IMAP clients
   1165 In-Reply-To: <47A8B50A.3030302@therning.org>
   1166 References: <20080204151221.GA29477@manheim.library.drexel.edu>
   1167 	<1202229600-sup-4858@south> <47A8B50A.3030302@therning.org>
   1168 Message-ID: <1202240647-sup-2072@south>
   1169 
   1170 Reformatted excerpts from Magnus Therning's message of 2008-02-05:
   1171 > Would it be possible to simply use unison to synchronise the machines?
   1172 
   1173 If ~/.sup/sources.yaml and ~/.sup/ferret are both synchronized, that
   1174 should basically work. Of course, unless Unison does sub-file
   1175 synchronization, synchronizing the ferret index could be slow.
   1176 And conflicts won't really be mergeable; you'll have to pick one version
   1177 or the other.
   1178 
   1179 -- 
   1180 William <wmorgan-sup at masanjin.net>
   1181 
   1182 From wmorgan-sup@masanjin.net  Tue Feb  5 15:12:23 2008
   1183 From: wmorgan-sup@masanjin.net (William Morgan)
   1184 Date: Tue, 05 Feb 2008 12:12:23 -0800
   1185 Subject: [sup-talk] [PATCH] shell commands are now run in a child process
   1186 In-Reply-To: <1202239755-sup-3523@chris-tablet>
   1187 References: <1202026272-3432-2-git-send-email-chrisw@rice.edu>
   1188 	<1202232814-sup-1005@south> <1202239755-sup-3523@chris-tablet>
   1189 Message-ID: <1202241831-sup-1777@south>
   1190 
   1191 Reformatted excerpts from Christopher Warrington's message of 2008-02-05:
   1192 > No, it's not elegant at all. mbox sources do still work, though. I
   1193 > only close the files in the child process. They remain open in sup's
   1194 > main process.
   1195 
   1196 Oh, I see. Sorry, I misread the patch.
   1197 
   1198 It would be good to understand this a bit more. Why are the Ferret
   1199 errors caused by open filehandles? And Windows supports fork now? I
   1200 thought that didn't work.
   1201 
   1202 -- 
   1203 William <wmorgan-sup at masanjin.net>
   1204 
   1205 From gsf@fruct.us  Tue Feb  5 16:03:42 2008
   1206 From: gsf@fruct.us (Gabriel Sean Farrell)
   1207 Date: Tue, 5 Feb 2008 16:03:42 -0500
   1208 Subject: [sup-talk] Persistence between IMAP clients
   1209 In-Reply-To: <1202149761-sup-2303@tangerine.lanl.gov>
   1210 References: <20080204151221.GA29477@manheim.library.drexel.edu>
   1211 	<1202149761-sup-2303@tangerine.lanl.gov>
   1212 Message-ID: <20080205210342.GA4870@manheim.library.drexel.edu>
   1213 
   1214 On Mon, Feb 04, 2008 at 11:46:16AM -0700, John Bent wrote:
   1215 > Excerpts from Gabriel Sean Farrell's message of Mon Feb 04 08:12:21 -0700 2008:
   1216 > > Is there a way to persist the labels applied from an instance of sup
   1217 > > IMAPing from one machine to another instance on another machine?  I
   1218 > > check my mail from four different computers on a regular basis, and I
   1219 > > haven't figured out, for example, how to delete emails when checking
   1220 > > with one machine and see them as deleted (that is, *not* see them in my
   1221 > > inbox) when checking with another.  
   1222 > > 
   1223 > This isn't really answering your question but ... the reason I use sup is
   1224 > because I can then use multiple computers to check email but have a
   1225 > persistent view (exactly like what you want).  However, the way I do this
   1226 > is not by figuring out how to maintain consistent labeling state across
   1227 > the multiple instances but rather by only actually running sup from one
   1228 > machine.  I then can check email from multiple computers by always ssh'ing
   1229 > to that machine.  That's why I like sup: it's console based and lends itself
   1230 > perfectly to this approach.
   1231 > 
   1232 > Even though this probably wasn't the answer you were looking for, I fear it
   1233 > might be the best one you get.  sup isn't designed to actually modify any of
   1234 > your existing mail folders.  It only reads them and then maintains its own
   1235 > external state.  So, for example, you can't configure sup to delete emails from
   1236 > an IMAP server.  What you can do is configure an external program like
   1237 > fetchmail to pull the emails (and delete them from the IMAP server) and put
   1238 > them into a local mbox on your machine which sup can then read.  That might
   1239 > work for you; however, you'll splinter your emails.  Emails which are read on
   1240 > one machine won't appear on your other three.  What you want is for sup to just
   1241 > read from the IMAP server and leave them there and then for the four multiple
   1242 > instances of sup to share their state with each other.  But they have no
   1243 > mechanism for doing so - they'd need some server somewhere to help them and
   1244 > they'd also need a bunch of code to implement that functionality.  You could
   1245 > try to get that functionality transparently by using a distributed file system
   1246 > shared across the four machines in which you keep your .sup folder.  That
   1247 > should work (unless maybe there is binary data kept in the .sup files and you
   1248 > have endian incompatibility across the four machines).  You could try to
   1249 > approximate the shared file system thing by using something like cvs or git,
   1250 > but that would be a big silly hassle.  Unless anyone else thinks of something
   1251 > better, I think the ssh approach is your best bet.
   1252 > 
   1253 > My only remaining limitation with the ssh scheme is that my primary machine is
   1254 > my desktop so I am not able to slurp down a bunch of new emails onto my laptop
   1255 > and work on them from the plane... (the answer of course is to make the laptop
   1256 > be the primary machine but that doesn't work for a couple of other various
   1257 > reasons).
   1258 
   1259 Thanks for the thoughtful response.
   1260 
   1261 I have checked my mail over ssh for a long time (with mutt), but within
   1262 the last year I've come to really appreciate IMAP.  I use a combination
   1263 of ssh and screen to work on all of my servers, but it's nice to be able
   1264 to avoid it when checking email on a spotty connection (no more network
   1265 stuttering while I edit a response!).  Also, attachments are easier to
   1266 deal with.  An IMAP setup allows me to check in with the client on my
   1267 phone occasionally as well.  
   1268 
   1269 In short, I like to have one place that handles the storage (which is
   1270 why I don't use POP3) *and* the status of my email.  It occurs to me now
   1271 that Sup, when used with IMAP, follows a paradigm wherein the status
   1272 (maybe "metadata" would be a better word) for each email is shared
   1273 between the server and client.  Maybe my preference is due to
   1274 assumptions from my years of mutt use.  After all, the difference
   1275 doesn't matter if you only use one client.  It is the reason Sup doesn't
   1276 play well with others, however, or with other instances of itself.
   1277 
   1278 Gabriel
   1279 
   1280 From gsf@fruct.us  Tue Feb  5 16:11:41 2008
   1281 From: gsf@fruct.us (Gabriel Sean Farrell)
   1282 Date: Tue, 5 Feb 2008 16:11:41 -0500
   1283 Subject: [sup-talk] Persistence between IMAP clients
   1284 In-Reply-To: <1202229600-sup-4858@south>
   1285 References: <20080204151221.GA29477@manheim.library.drexel.edu>
   1286 	<1202229600-sup-4858@south>
   1287 Message-ID: <20080205211141.GB4870@manheim.library.drexel.edu>
   1288 
   1289 On Tue, Feb 05, 2008 at 08:42:03AM -0800, William Morgan wrote:
   1290 > Sup will probably never work well in this kind of setup.
   1291 
   1292 Agreed.  Thanks for the honest assessment.
   1293 
   1294 From wmorgan-sup@masanjin.net  Tue Feb  5 17:02:37 2008
   1295 From: wmorgan-sup@masanjin.net (William Morgan)
   1296 Date: Tue, 05 Feb 2008 14:02:37 -0800
   1297 Subject: [sup-talk] Persistence between IMAP clients
   1298 In-Reply-To: <1202229600-sup-4858@south>
   1299 References: <20080204151221.GA29477@manheim.library.drexel.edu>
   1300 	<1202229600-sup-4858@south>
   1301 Message-ID: <1202248916-sup-1460@south>
   1302 
   1303 Reformatted excerpts from William Morgan's message of 2008-02-05:
   1304 > Sup will probably never work well in this kind of setup.
   1305 
   1306 Until we make SupServer!
   1307 
   1308 -- 
   1309 William <wmorgan-sup at masanjin.net>
   1310 
   1311 From johnbent@lanl.gov  Wed Feb  6 11:21:37 2008
   1312 From: johnbent@lanl.gov (John Bent)
   1313 Date: Wed, 06 Feb 2008 09:21:37 -0700
   1314 Subject: [sup-talk] [PATCH] don't try to open the next thread if
   1315 	there	isn't one available
   1316 In-Reply-To: <1202232384-sup-1186@south>
   1317 References: <1201681010-sup-3463@archie>
   1318 	<1201707688-sup-6637@tangerine.lanl.gov>
   1319 	<1202232384-sup-1186@south>
   1320 Message-ID: <1202314746-sup-2532@tangerine.lanl.gov>
   1321 
   1322 Excerpts from William Morgan's message of Tue Feb 05 10:27:26 -0700 2008:
   1323 > Reformatted excerpts from John Bent's message of 2008-01-30:
   1324 > > Perhaps I should just change my habits but I like to traverse my inbox in
   1325 > > chronological order (i.e. bottom up instead of top down).  If anyone could 
   1326 > > make a patch that does ,a or ,n but moves it up instead of down, I'd very
   1327 > > much appreciate it.
   1328 > 
   1329 > I do this too, often. Try ']' in next.
   1330 > 
   1331 That's great!  Thanks.
   1332 
   1333 > I really need a better keybinding. Wonder if I just should bite the
   1334 > bullet and do < and > for previous and next instead of , and ].
   1335 > 
   1336 That'd be nice too (and probably more intuitive).  Or maybe it's really
   1337 hard but user-defined macros or shortcuts.  So people could map
   1338 < to ,n and > to ]n.  Or did I get the order wrong?  Also, if we had
   1339 macros, I'd map something to |muttprint.
   1340 
   1341 From gsf@fruct.us  Wed Feb  6 17:37:33 2008
   1342 From: gsf@fruct.us (Gabriel Sean Farrell)
   1343 Date: Wed, 6 Feb 2008 17:37:33 -0500
   1344 Subject: [sup-talk] Persistence between IMAP clients
   1345 In-Reply-To: <1202248916-sup-1460@south>
   1346 References: <20080204151221.GA29477@manheim.library.drexel.edu>
   1347 	<1202229600-sup-4858@south> <1202248916-sup-1460@south>
   1348 Message-ID: <20080206223733.GA13929@manheim.library.drexel.edu>
   1349 
   1350 On Tue, Feb 05, 2008 at 02:02:37PM -0800, William Morgan wrote:
   1351 > Reformatted excerpts from William Morgan's message of 2008-02-05:
   1352 > > Sup will probably never work well in this kind of setup.
   1353 > 
   1354 > Until we make SupServer!
   1355 > 
   1356 
   1357 Something like SupServer could be exciting.  Along with its shortcomings
   1358 in the display department, mutt also suffers in a multiple-client-IMAP
   1359 setup.  For example, I see no reason why I should keep aliases and list
   1360 subscriptions for each client.
   1361 
   1362 From marcus-sup@bar-coded.net  Thu Feb  7 03:45:33 2008
   1363 From: marcus-sup@bar-coded.net (Marcus Williams)
   1364 Date: Thu, 07 Feb 2008 08:45:33 +0000
   1365 Subject: [sup-talk] Persistence between IMAP clients
   1366 In-Reply-To: <1202248916-sup-1460@south>
   1367 References: <20080204151221.GA29477@manheim.library.drexel.edu>
   1368 	<1202229600-sup-4858@south> <1202248916-sup-1460@south>
   1369 Message-ID: <1202373660-sup-5293@tomsk>
   1370 
   1371 On 5.2.2008, William Morgan wrote:
   1372 > Reformatted excerpts from William Morgan's message of 2008-02-05:
   1373 > > Sup will probably never work well in this kind of setup.
   1374 > 
   1375 > Until we make SupServer!
   1376 
   1377 I never know if you're joking when you say stuff like this :) Joking
   1378 aside though, if you treat sup as a frontend for a database (which is
   1379 basically what it is forgetting the email client side) all you
   1380 actually need is to get ferret to run as a server.... and if thats all
   1381 you need perhaps we can use the work on the DRb server for the RoR
   1382 act_as_ferret plugin and have a remote index that sup can then be a
   1383 client of.
   1384 
   1385 This then leads me to a wishlist item - perhaps the contacts stuff
   1386 should be moved into a ferret db. That way sup can be a searchable
   1387 contacts db as well (and it can be remote so shared across clients).
   1388 
   1389 Any thoughts?
   1390 
   1391 Marcus
   1392 
   1393 From wmorgan-sup@masanjin.net  Thu Feb  7 13:12:43 2008
   1394 From: wmorgan-sup@masanjin.net (William Morgan)
   1395 Date: Thu, 07 Feb 2008 10:12:43 -0800
   1396 Subject: [sup-talk] Persistence between IMAP clients
   1397 In-Reply-To: <1202373660-sup-5293@tomsk>
   1398 References: <20080204151221.GA29477@manheim.library.drexel.edu>
   1399 	<1202229600-sup-4858@south> <1202248916-sup-1460@south>
   1400 	<1202373660-sup-5293@tomsk>
   1401 Message-ID: <1202407800-sup-6982@south>
   1402 
   1403 Reformatted excerpts from Marcus Williams's message of 2008-02-07:
   1404 > Any thoughts?
   1405 
   1406 Why is it that people are so excited about having an email clients with
   1407 this crazy client/server architecture? We don't demand that of any other
   1408 console program we use.
   1409 
   1410 If you can run a sup server somewhere, surely you can run sshd there
   1411 instead. The only difference would be UI lag on slow connections. Is
   1412 that the big win?
   1413 
   1414 -- 
   1415 William <wmorgan-sup at masanjin.net>
   1416 
   1417 From wmorgan-sup@masanjin.net  Thu Feb  7 13:40:17 2008
   1418 From: wmorgan-sup@masanjin.net (William Morgan)
   1419 Date: Thu, 07 Feb 2008 10:40:17 -0800
   1420 Subject: [sup-talk] new in git next: maildir speedups
   1421 Message-ID: <1202409514-sup-9247@south>
   1422 
   1423 I believe I've fixed the issue of maildir directory rescanning in next.
   1424 Now the directory is only scanned rescanned when polling. Try it out!
   1425 
   1426 -- 
   1427 William <wmorgan-sup at masanjin.net>
   1428 
   1429 From gsf@fruct.us  Thu Feb  7 15:12:34 2008
   1430 From: gsf@fruct.us (Gabriel Sean Farrell)
   1431 Date: Thu, 7 Feb 2008 15:12:34 -0500
   1432 Subject: [sup-talk] Persistence between IMAP clients
   1433 In-Reply-To: <1202407800-sup-6982@south>
   1434 References: <20080204151221.GA29477@manheim.library.drexel.edu>
   1435 	<1202229600-sup-4858@south> <1202248916-sup-1460@south>
   1436 	<1202373660-sup-5293@tomsk> <1202407800-sup-6982@south>
   1437 Message-ID: <20080207201234.GB18001@manheim.library.drexel.edu>
   1438 
   1439 On Thu, Feb 07, 2008 at 10:12:43AM -0800, William Morgan wrote:
   1440 > Why is it that people are so excited about having an email clients with
   1441 > this crazy client/server architecture? We don't demand that of any other
   1442 > console program we use.
   1443 
   1444 Let's see, what console programs do I have open right now?  Mutt, irssi,
   1445 lynx, tintin++, and btlaunchmanycurses.  We've already discussed Mutt.
   1446 irssi is a great example of a console program that acts as a client to a
   1447 server.  lynx is an example of the most commonly understood
   1448 client/server relationship today.  tintin++ is a mud client, and the
   1449 improvements it has over simple telnet clients in the specific domain of
   1450 muds could serve as a model for others that rely on ssh/sftp/etc for
   1451 other domains.  btlaunchmanycurses is a curses bittorrent client and,
   1452 being bittorrent, connects to other clients instead of a server.
   1453 Nonetheless, it demonstrates another protocol that I choose a console UI
   1454 for.
   1455 
   1456 Even Vim provides the option of editing via sftp and scp, essentially
   1457 creating a client connection to files on a server.  It's a pretty
   1458 fantastic feature that I recommend you try out if you haven't done so
   1459 already.
   1460 
   1461 > If you can run a sup server somewhere, surely you can run sshd there
   1462 > instead. The only difference would be UI lag on slow connections. Is
   1463 > that the big win?
   1464 
   1465 The ability to access these programs over ssh is part of the reason I
   1466 use them, but I prefer running them on the local box because UI lag and
   1467 dropped connections have frustrated me enough that I'd rather not deal
   1468 with them when I don't have to.
   1469 
   1470 From patroclo7@gmail.com  Thu Feb  7 13:47:56 2008
   1471 From: patroclo7@gmail.com (Giorgio Lando)
   1472 Date: Thu, 07 Feb 2008 19:47:56 +0100
   1473 Subject: [sup-talk] new in git next: maildir speedups
   1474 In-Reply-To: <1202409514-sup-9247@south>
   1475 References: <1202409514-sup-9247@south>
   1476 Message-ID: <1202410054-sup-9855@clarabella.clarabella>
   1477 
   1478 Excerpts from William Morgan's message of Thu Feb 07 19:40:17 +0100 2008:
   1479 > I believe I've fixed the issue of maildir directory rescanning in next.
   1480 > Now the directory is only scanned rescanned when polling. Try it out!
   1481 
   1482 Yes, the speedup is noticeable!
   1483 -- 
   1484 Giorgio Lando <patroclo7 at gmail dot com>
   1485 
   1486 From marcus-sup@bar-coded.net  Thu Feb  7 16:09:05 2008
   1487 From: marcus-sup@bar-coded.net (Marcus Williams)
   1488 Date: Thu, 07 Feb 2008 21:09:05 +0000
   1489 Subject: [sup-talk] Persistence between IMAP clients
   1490 In-Reply-To: <1202407800-sup-6982@south>
   1491 References: <20080204151221.GA29477@manheim.library.drexel.edu>
   1492 	<1202229600-sup-4858@south> <1202248916-sup-1460@south>
   1493 	<1202373660-sup-5293@tomsk> <1202407800-sup-6982@south>
   1494 Message-ID: <1202417630-sup-9601@tomsk>
   1495 
   1496 On 7.2.2008, William Morgan wrote:
   1497 > If you can run a sup server somewhere, surely you can run sshd there
   1498 > instead. The only difference would be UI lag on slow connections. Is
   1499 > that the big win?
   1500 
   1501 Man, your throw away suggestions should come with "warning, bear trap
   1502 ahead" notices :)
   1503 
   1504 For me, the biggest draw of having it as a service is multi-app usage.
   1505 I treat sup as a view upon my email but I use my email for a whole lot
   1506 of things and sup doesnt (yet) give me views of this data if you see
   1507 what I mean. For instance - I might mark emails as todos via the
   1508 message hooks so I can email myself todos. I dont need to see who
   1509 these are from or the date of these email, just the snippet. Also I
   1510 dont really want to go into sup to get these I'd rather have them
   1511 available via http. I can do this read only now, but if I want to do
   1512 any interactions with this "view" I need to go via sup really. Also I
   1513 cant do this when sup is open on my machine as its got the index open
   1514 and I'm not sure ferret lets you do multi-user access to the index.
   1515 
   1516 Console access is great when you've got it, but its not so good on a
   1517 phone/pda (I am determined to get it running locally on my n800
   1518 though!) - so accessing the index through other ways would be useful
   1519 here.
   1520 
   1521 Also, sup *is already* a client/server console tool - you're accessing
   1522 imap or maildir-over-ssh as a client. The beauty of IMAP (_not_ the
   1523 protocol which I have to agree sucks) is the fact I can use any client
   1524 I want *locally* and have the same view upon my email anywhere. I dont
   1525 have to save an attachment to a disk on my imap server, open winscp to
   1526 go to that server pick up the attachment and save locally to view it
   1527 on my machine at work or battle with x11 auth and install x11/gnome
   1528 packages on my server so I can view it over X11 over ssh.
   1529 
   1530 Dont get me wrong, for my biggest usage sup doesnt need to use the
   1531 index over a networked service, I could write most stuff as ruby cgis
   1532 or RoR that access the ferret index because most of the time sup wont
   1533 be running so wont care. Its just I wouldnt have to worry about it if
   1534 it was networked :) and I think it would open up more possibilities of
   1535 the use of the index (again, I'm thinking "views" upon my data not
   1536 necessarily sup's usage).
   1537 
   1538 Marcus
   1539 
   1540 From wmorgan-sup@masanjin.net  Thu Feb  7 20:09:37 2008
   1541 From: wmorgan-sup@masanjin.net (William Morgan)
   1542 Date: Thu, 07 Feb 2008 17:09:37 -0800
   1543 Subject: [sup-talk] 0.5 thoughts
   1544 In-Reply-To: <1201785683-sup-4356@clarabella.clarabella>
   1545 References: <1201240480-sup-1977@south>
   1546 	<288A3057-1B27-4BDF-9B96-F860CA73C305@gmail.com>
   1547 	<1201260309-sup-8211@ausone.local>
   1548 	<1201785683-sup-4356@clarabella.clarabella>
   1549 Message-ID: <1202432955-sup-4239@south>
   1550 
   1551 Reformatted excerpts from Giorgio Lando's message of 2008-01-31:
   1552 > I would like to add a further feature request: sup could accept an
   1553 > email address as a command line argument, going directly to prompt for
   1554 > a subject or a CC and then passing to the editor. This would be nice
   1555 > for interaction with browsers, when clicking on a certain address open
   1556 > a program designated to treat the mailto protocol. 
   1557 
   1558 This is in. Use -c.
   1559 
   1560 -- 
   1561 William <wmorgan-sup at masanjin.net>
   1562 
   1563 From sup-talk@gurski.org  Thu Feb  7 12:27:26 2008
   1564 From: sup-talk@gurski.org (Michael Gurski)
   1565 Date: Thu, 7 Feb 2008 12:27:26 -0500
   1566 Subject: [sup-talk] Crash on startup, "wrong id called on nil"
   1567 Message-ID: <20080207172725.GA9157@gurski.org>
   1568 
   1569 It's been a while since I launched sup, and updating today from
   1570 master, I get a crash on startup:
   1571 
   1572 --- RuntimeError from thread: load threads for thread-index-mode
   1573 wrong id called on nil
   1574 
   1575 
   1576 IIRC, this was also happening maybe a month or so ago, and I just
   1577 didn't have the time to deal with it then.  Dumping the index,
   1578 rebuilding, etc, seem to not affect this at all.
   1579 
   1580 
   1581 The full exception log is:
   1582 
   1583 $ cat sup-exception-log.txt 
   1584 --- RuntimeError from thread: load threads for thread-index-mode
   1585 wrong id called on nil
   1586 ./lib/sup.rb:13:in `id'
   1587 ./lib/sup/modes/thread-index-mode.rb:183:in `update'
   1588 ./lib/sup/hook.rb:123:in `sort_by'
   1589 ./lib/sup/modes/thread-index-mode.rb:183:in `each'
   1590 ./lib/sup/modes/thread-index-mode.rb:183:in `sort_by'
   1591 ./lib/sup/modes/thread-index-mode.rb:183:in `update'
   1592 /usr/lib/ruby/1.8/thread.rb:135:in `synchronize'
   1593 ./lib/sup/modes/thread-index-mode.rb:181:in `update'
   1594 ./lib/sup/modes/thread-index-mode.rb:466:in
   1595 `__unprotected_load_n_threads'
   1596 ./lib/sup/thread.rb:332:in `load_n_threads'
   1597 ./lib/sup/index.rb:224:in `each_id_by_date'
   1598 ./lib/sup/index.rb:224:in `each'
   1599 ./lib/sup/index.rb:224:in `each_id_by_date'
   1600 ./lib/sup/thread.rb:326:in `load_n_threads'
   1601 ./lib/sup/modes/thread-index-mode.rb:463:in
   1602 `__unprotected_load_n_threads'
   1603 (eval):12:in `load_n_threads'
   1604 ./lib/sup/modes/thread-index-mode.rb:452:in
   1605 `load_n_threads_background'
   1606 ./lib/sup.rb:60:in `reporting_thread'
   1607 ./lib/sup.rb:58:in `initialize'
   1608 ./lib/sup.rb:58:in `new'
   1609 ./lib/sup.rb:58:in `reporting_thread'
   1610 ./lib/sup/modes/thread-index-mode.rb:451:in
   1611 `load_n_threads_background'
   1612 ./lib/sup/modes/thread-index-mode.rb:502:in
   1613 `__unprotected_load_threads'
   1614 (eval):12:in `load_threads'
   1615 bin/sup:199
   1616 --- SystemExit from thread: main
   1617 wrong id called on nil
   1618 ./lib/sup.rb:64:in `select'
   1619 ./lib/sup/buffer.rb:31:in `nonblocking_getch'
   1620 bin/sup:212
   1621 
   1622 -- 
   1623 Michael A. Gurski (opt. [first].)[last]@pobox.com  http://www.pobox.com/~[last]
   1624 1024R/39B5BADD PGP: 34 93 A9 94 B1 59 48 B7  17 57 1E 4E 62 56 45 70
   1625 1024D/1166213E GPG: 628F 37A4 62AF 1475 45DB  AD81 ADC9 E606 1166 213E
   1626 4096R/C0B4F04B GPG: 5B3E 75D7 43CF CF34 4042  7788 1DCE B5EE C0B4 F04B
   1627 Views expressed by the host do not reflect the staff, management or sponsors.
   1628 
   1629 
   1630 From patroclo7@gmail.com  Fri Feb  8 03:42:33 2008
   1631 From: patroclo7@gmail.com (Giorgio Lando)
   1632 Date: Fri, 08 Feb 2008 09:42:33 +0100
   1633 Subject: [sup-talk] 0.5 thoughts
   1634 In-Reply-To: <1202432955-sup-4239@south>
   1635 References: <1201240480-sup-1977@south>
   1636 	<288A3057-1B27-4BDF-9B96-F860CA73C305@gmail.com>
   1637 	<1201260309-sup-8211@ausone.local>
   1638 	<1201785683-sup-4356@clarabella.clarabella>
   1639 	<1202432955-sup-4239@south>
   1640 Message-ID: <1202460092-sup-5021@clarabella.clarabella>
   1641 
   1642 Excerpts from William Morgan's message of Fri Feb 08 02:09:37 +0100 2008:
   1643 > Reformatted excerpts from Giorgio Lando's message of 2008-01-31:
   1644 > > I would like to add a further feature request: sup could accept an
   1645 > > email address as a command line argument, going directly to prompt for
   1646 > > a subject or a CC and then passing to the editor. This would be nice
   1647 > > for interaction with browsers, when clicking on a certain address open
   1648 > > a program designated to treat the mailto protocol. 
   1649 > 
   1650 > This is in. Use -c.
   1651 > 
   1652 
   1653 Thank you a lot!
   1654 
   1655 -- 
   1656 Giorgio Lando <patroclo7 at gmail dot com>
   1657 
   1658 From chrisw@rice.edu  Fri Feb  8 04:40:55 2008
   1659 From: chrisw@rice.edu (Christopher Warrington)
   1660 Date: Fri, 08 Feb 2008 03:40:55 -0600
   1661 Subject: [sup-talk] [PATCH] shell commands are now run in a child process
   1662 In-Reply-To: <1202241831-sup-1777@south>
   1663 References: <1202026272-3432-2-git-send-email-chrisw@rice.edu>
   1664 	<1202232814-sup-1005@south> <1202239755-sup-3523@chris-tablet>
   1665 	<1202241831-sup-1777@south>
   1666 Message-ID: <1202462044-sup-3129@chris-tablet>
   1667 
   1668 Excerpts from William Morgan's message of Tue Feb 05 14:12:23 -0600 2008:
   1669 > It would be good to understand this a bit more. Why are the Ferret
   1670 > errors caused by open filehandles?
   1671 
   1672 It is an odd interplay between Cygwin and Windows.
   1673 
   1674 Sometimes, when ferret updates the index, it needs to delete (or
   1675 rename, I'm not sure) one of its files. So, ferret deletes the file
   1676 and then checks that it has been deleted (in fs_exists() from
   1677 ferret-.../ext/fs_store.c:70). To do the delete, unlink() is
   1678 called. Cygwin maps this to a series of Windows kernel calls that 1)
   1679 open the file, 2) set the delete-on-close flag, and 3) close the file.
   1680 
   1681 (See unline_nt() in
   1682 http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/syscalls.cc?rev=1.469&content-type=text/x-cvsweb-markup&cvsroot=src)
   1683 
   1684 If only sup is running, the file is closed and deleted. The file no
   1685 longer exists, so the open() in fs_exists fails with ENOENT. This is
   1686 to be expected.
   1687 
   1688 If the editor is also running, things happen a little differently. The
   1689 editor has inherited all of sup's file handles. When the unlink() is
   1690 called this time, the same three kernel calls are made: 1) open, 2)
   1691 set delete-on-close flag, 3) close file. However, there are still an
   1692 open handle for the file (the editor has it), so the file enters the
   1693 DELETE_PENDING state. This causes the open() call in fs_exists to fail
   1694 with EACCES, triggering the exception.
   1695 
   1696 I have a Process Monitor log of what's going on and the exception log
   1697 if you think that that would be helpful.
   1698 
   1699 > And Windows supports fork now? I thought that didn't work.
   1700 
   1701 No. But Cygwin does. This still causes the file handle duplication, so
   1702 I close all the open files except STDIN, STDOUT, and STDERR. That way,
   1703 the ferret file never enters the DELETE_PENDING state.
   1704 
   1705 I don't think that this would be an issue if I were running sup
   1706 natively on Windows. The editor would NOT inherit sup's file
   1707 handlers. However, I have not been able to get ncurses (or the Ruby
   1708 gem, I can't remember) to compile for Windows. So, I'm stuck in Cygwin
   1709 bizzaro-land.
   1710 
   1711 -- 
   1712 Christopher Warrington <chrisw at rice.edu>
   1713 
   1714 From patroclo7@gmail.com  Fri Feb  8 17:10:07 2008
   1715 From: patroclo7@gmail.com (Giorgio Lando)
   1716 Date: Fri, 08 Feb 2008 23:10:07 +0100
   1717 Subject: [sup-talk] the num_inbox_unread variable
   1718 Message-ID: <1202508462-sup-2051@clarabella.clarabella>
   1719 
   1720 Hi,
   1721    I have a small problem with the num_inbox_unread variable, which is used
   1722 for example in the status-bar-text.rb: in the number of unread messages
   1723 the messages belonging to killed threads are included, but, from the
   1724 name of the variable, I do not think that this is the expected behaviour
   1725 (they are unread, but they are not the inbox.
   1726 
   1727 -- 
   1728 Giorgio Lando <patroclo7 at gmail dot com>
   1729 
   1730 From brabuhr@gmail.com  Fri Feb  8 21:01:31 2008
   1731 From: brabuhr@gmail.com (brabuhr at gmail.com)
   1732 Date: Fri, 8 Feb 2008 21:01:31 -0500
   1733 Subject: [sup-talk] [PATCH] first pass at a simple interface to extract
   1734 	URIs from a message
   1735 In-Reply-To: <1202007092-sup-19@south>
   1736 References: <21aa9f0801291923w2df946dbga7832a7345c09a95@mail.gmail.com>
   1737 	<1202007092-sup-19@south>
   1738 Message-ID: <55fa96700802081801mfc27b6axd68a3d640175dddd@mail.gmail.com>
   1739 
   1740 On Feb 2, 2008 9:56 PM, William Morgan <wmorgan-sup at masanjin.net> wrote:
   1741 > Reformatted excerpts from brabuhr's message of 2008-01-29:
   1742 > > This adds a new key binding to the thread-view mode (L) to assist with
   1743 > > loading URIs from the body of the message.  This first pass will pull
   1744 > > the URIs from the message text and loop through them while asking if
   1745 > > that URI should be loaded.  Currently, there is no code to actually
   1746 > > perform the load.
   1747 >
   1748 > Looks good. I have a slight preference for a "if uris.size == 0" block
   1749 > that flashes a message and returns, so that the meat of the method
   1750 > doesn't have to be too indented.
   1751 
   1752 I was also thinking that it would be better to display the discovered URIs
   1753 in a list instead of the prompting, but I wasn't sure how to implement that.
   1754 Another problem I see is that the extractor is too-greedy and will pull in
   1755 the punctuation following the URL; so, perhaps the list should allow
   1756 line editing before calling the view-url hook?
   1757 
   1758 From manish@gslab.com  Fri Feb  8 23:39:42 2008
   1759 From: manish@gslab.com (Manish Sapariya)
   1760 Date: Sat, 09 Feb 2008 10:09:42 +0530
   1761 Subject: [sup-talk] Exception while composing message from lable list buffer
   1762 Message-ID: <1202531797-sup-97@alioth.gs-lab.com>
   1763 
   1764 Hi,
   1765 I ran into this once, next time I tried it did not happen.
   1766 
   1767 in inbox window, I pressed L to check mails against each lable,
   1768 from that window I pressed c to compose new mail and it blasted.
   1769 
   1770 --- NoMethodError from thread: main
   1771 undefined method `<=>' for nil:NilClass
   1772 /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:494:in `sort'
   1773 /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:494:in
   1774 `ask_for_contacts'
   1775 /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `send'
   1776 /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in
   1777 `method_missing'
   1778 /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/compose-mode.rb:23:in
   1779 `spawn_nicely'
   1780 /usr/lib/ruby/gems/1.8/gems/sup-0.4/bin/sup:259
   1781 /usr/bin/sup:16:in `load'
   1782 /usr/bin/sup:16
   1783 
   1784 Regards,
   1785 Manish
   1786 
   1787 
   1788 
   1789 From nicolas.pouillard@gmail.com  Sat Feb  9 07:05:29 2008
   1790 From: nicolas.pouillard@gmail.com (Nicolas Pouillard)
   1791 Date: Sat,  9 Feb 2008 13:05:29 +0100
   1792 Subject: [sup-talk] [PATCH] Show drafts in red, in thread-index-mode.
   1793 In-Reply-To: <1201112451-sup-5510@south>
   1794 References: <1201112451-sup-5510@south>
   1795 Message-ID: <12025587293812-git-send-email-nicolas.pouillard@gmail.com>
   1796 
   1797 This patch would help to think about finishing drafts.
   1798 ---
   1799  bin/sup                            |    2 ++
   1800  lib/sup/modes/inbox-mode.rb        |    2 +-
   1801  lib/sup/modes/thread-index-mode.rb |    5 +++--
   1802  3 files changed, 6 insertions(+), 3 deletions(-)
   1803 
   1804 diff --git a/bin/sup b/bin/sup
   1805 index 84fd77c..f536da6 100644
   1806 --- a/bin/sup
   1807 +++ b/bin/sup
   1808 @@ -138,6 +138,8 @@ begin
   1809             Ncurses::A_BOLD
   1810      c.add :index_starred_color, Ncurses::COLOR_YELLOW, Ncurses::COLOR_BLACK, 
   1811             Ncurses::A_BOLD
   1812 +    c.add :index_draft_color, Ncurses::COLOR_RED, Ncurses::COLOR_BLACK,
   1813 +           Ncurses::A_BOLD
   1814      c.add :labellist_old_color, Ncurses::COLOR_WHITE, Ncurses::COLOR_BLACK
   1815      c.add :labellist_new_color, Ncurses::COLOR_WHITE, Ncurses::COLOR_BLACK, 
   1816             Ncurses::A_BOLD
   1817 diff --git a/lib/sup/modes/inbox-mode.rb b/lib/sup/modes/inbox-mode.rb
   1818 index a2de13f..f156b69 100644
   1819 --- a/lib/sup/modes/inbox-mode.rb
   1820 +++ b/lib/sup/modes/inbox-mode.rb
   1821 @@ -9,7 +9,7 @@ class InboxMode < ThreadIndexMode
   1822    end
   1823  
   1824    def initialize
   1825 -    super [:inbox, :sent], { :label => :inbox, :skip_killed => true }
   1826 +    super [:inbox, :sent, :draft], { :label => :inbox, :skip_killed => true }
   1827      raise "can't have more than one!" if defined? @@instance
   1828      @@instance = self
   1829    end
   1830 diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
   1831 index e24d7e0..7a0b815 100644
   1832 --- a/lib/sup/modes/thread-index-mode.rb
   1833 +++ b/lib/sup/modes/thread-index-mode.rb
   1834 @@ -655,7 +655,6 @@ protected
   1835  
   1836      date = t.date.to_nice_s
   1837  
   1838 -    new = t.has_label?(:unread)
   1839      starred = t.has_label?(:starred)
   1840  
   1841      ## format the from column
   1842 @@ -692,7 +691,9 @@ protected
   1843      p = dp || t.participants.any? { |p| AccountManager.is_account? p }
   1844  
   1845      subj_color =
   1846 -      if new
   1847 +      if t.has_label?(:draft)
   1848 +        :index_draft_color
   1849 +      elsif t.has_label?(:unread)
   1850          :index_new_color
   1851        elsif starred
   1852          :index_starred_color
   1853 -- 
   1854 1.5.3.1.109.gacd69
   1855 
   1856 From mdk@mdk.am  Mon Feb 11 18:57:37 2008
   1857 From: mdk@mdk.am (Michael Dominic K.)
   1858 Date: Tue, 12 Feb 2008 00:57:37 +0100
   1859 Subject: [sup-talk] Backspace key?
   1860 Message-ID: <1202774257.8173.4.camel@localhost.localdomain>
   1861 
   1862 Hello, 
   1863 
   1864 I just gave a test-drive to sup. So far it looks absolutely great -- two
   1865 thumbs up to the authors!
   1866 
   1867 I'm having one trivial problem though -- my backspace key doesn't work
   1868 in all entry fields (del works). It's been a while since I fixed
   1869 del/backspace issues in linux... any help/hints/config switch?
   1870 
   1871 I'm running:
   1872 
   1873 [Tue Feb 12 00:56:17 +0100 2008] using character set encoding "utf8" 
   1874 sup v0.4
   1875 
   1876 ...installed via gems. My terminal standard gnome-terminal. 
   1877 
   1878 Thanks in advance, 
   1879 
   1880 
   1881 -- 
   1882 Michael
   1883 
   1884 
   1885 From patroclo7@gmail.com  Tue Feb 12 03:25:43 2008
   1886 From: patroclo7@gmail.com (Giorgio Lando)
   1887 Date: Tue, 12 Feb 2008 09:25:43 +0100
   1888 Subject: [sup-talk] Backspace key?
   1889 In-Reply-To: <1202774257.8173.4.camel@localhost.localdomain>
   1890 References: <1202774257.8173.4.camel@localhost.localdomain>
   1891 Message-ID: <1202804371-sup-2434@clarabella.clarabella>
   1892 
   1893 Excerpts from Michael Dominic K.'s message of Tue Feb 12 00:57:37 +0100 2008:
   1894 > I'm having one trivial problem though -- my backspace key doesn't work
   1895 > in all entry fields (del works). It's been a while since I fixed
   1896 > del/backspace issues in linux... any help/hints/config switch?
   1897 
   1898 I do not use the gnome-terminal, but in my case the working string for
   1899 backspace in sup is ^h, while my terminals (all rxvt derivatives) sent
   1900 ^? by default. From the large literature about the topic, I think that
   1901 other terminal settings could adjust the behaviour also with ^?, but
   1902 setting ^h has no negative side effect for me. So look in the
   1903 configuration of gnome-terminal for something like backspaceKey or
   1904 string...
   1905 -- 
   1906 Giorgio Lando <patroclo7 at gmail dot com>
   1907 
   1908 From nicolas.pouillard@gmail.com  Tue Feb 12 04:48:49 2008
   1909 From: nicolas.pouillard@gmail.com (Nicolas Pouillard)
   1910 Date: Tue, 12 Feb 2008 10:48:49 +0100
   1911 Subject: [sup-talk] Backspace key?
   1912 In-Reply-To: <1202774257.8173.4.camel@localhost.localdomain>
   1913 References: <1202774257.8173.4.camel@localhost.localdomain>
   1914 Message-ID: <1202809606-sup-7188@port-ext6.ensta.fr>
   1915 
   1916 Excerpts from Michael Dominic K.'s message of Tue Feb 12 00:57:37 +0100 2008:
   1917 > Hello, 
   1918 Hello,
   1919 
   1920 [...]
   1921 
   1922 > I'm having one trivial problem though -- my backspace key doesn't work
   1923 > in all entry fields (del works). It's been a while since I fixed
   1924 > del/backspace issues in linux... any help/hints/config switch?
   1925 
   1926 I had the same issue, as a workaround hitting CTRL-BACKSPACE worked for me.
   1927 However I've made up an ugly change to handle this, perhaps it can help you.
   1928 
   1929 -- 
   1930 Nicolas Pouillard aka Ertai
   1931 -------------- next part --------------
   1932 A non-text attachment was scrubbed...
   1933 Name: 0001-Handle-the-keycode-127-like-KEY_BACKSPACE.patch
   1934 Type: application/octet-stream
   1935 Size: 822 bytes
   1936 Desc: not available
   1937 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080212/46e95e95/attachment.obj 
   1938 -------------- next part --------------
   1939 A non-text attachment was scrubbed...
   1940 Name: signature.asc
   1941 Type: application/pgp-signature
   1942 Size: 232 bytes
   1943 Desc: not available
   1944 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080212/46e95e95/attachment.bin 
   1945 
   1946 From marko.myllymaki@iki.fi  Tue Feb 12 14:30:42 2008
   1947 From: marko.myllymaki@iki.fi (marko.myllymaki at iki.fi)
   1948 Date: Tue, 12 Feb 2008 21:30:42 +0200
   1949 Subject: [sup-talk] how to browse archived?
   1950 Message-ID: <1202844150-sup-5784@sieni>
   1951 
   1952 Sup 0.4 works fine! Only one wish at the moment: 
   1953 
   1954 It would be nice to be able to browse archived messages (there is no
   1955 such label in L list). Sometimes you just forget what actual words to
   1956 search in some previous emails (which have no labels). So they are
   1957 difficult to search but by browsing them you would find them.
   1958 
   1959 Funny... at the moment Delete seems to do the right thing for me
   1960 (because "Deleted" appears in the label list for browsing :)
   1961 
   1962 
   1963 
   1964 
   1965 From johannes@antiklimax.com  Tue Feb 12 14:36:44 2008
   1966 From: johannes@antiklimax.com (Johannes Martinsson)
   1967 Date: Tue, 12 Feb 2008 20:36:44 +0100
   1968 Subject: [sup-talk] how to browse archived?
   1969 In-Reply-To: <1202844150-sup-5784@sieni>
   1970 References: <1202844150-sup-5784@sieni>
   1971 Message-ID: <1202844988-sup-7181@banana>
   1972 
   1973 > It would be nice to be able to browse archived messages (there is no
   1974 > such label in L list). Sometimes you just forget what actual words to
   1975 > search in some previous emails (which have no labels). So they are
   1976 > difficult to search but by browsing them you would find them.
   1977 
   1978 Have you tried searching (\) for '*', that seems to show all archived 
   1979 messages.
   1980 
   1981 -- 
   1982 Johannes Martinsson
   1983 johannes at antiklimax.se
   1984 0736 - 345 661
   1985 
   1986 From chrisw@rice.edu  Tue Feb 12 15:10:32 2008
   1987 From: chrisw@rice.edu (Christopher Warrington)
   1988 Date: Tue, 12 Feb 2008 14:10:32 -0600
   1989 Subject: [sup-talk] how to browse archived?
   1990 In-Reply-To: <1202844150-sup-5784@sieni>
   1991 References: <1202844150-sup-5784@sieni>
   1992 Message-ID: <1202846964-sup-7866@chris-tablet>
   1993 
   1994 Excerpts from Marko MyllymXXki's message of Tue Feb 12 13:30:42 -0600 2008:
   1995 > It would be nice to be able to browse archived messages (there is no
   1996 > such label in L list). Sometimes you just forget what actual words
   1997 > to search in some previous emails (which have no labels). So they
   1998 > are difficult to search but by browsing them you would find them.
   1999 
   2000 Search for "-label:inbox"
   2001 
   2002 -- 
   2003 Christopher Warrington <chrisw at rice.edu>
   2004 
   2005 From marko.myllymaki@iki.fi  Wed Feb 13 02:16:18 2008
   2006 From: marko.myllymaki@iki.fi (marko.myllymaki at iki.fi)
   2007 Date: Wed, 13 Feb 2008 09:16:18 +0200
   2008 Subject: [sup-talk] how to browse archived?
   2009 In-Reply-To: <1202844988-sup-7181@banana>
   2010 References: <1202844150-sup-5784@sieni> <1202844988-sup-7181@banana>
   2011 Message-ID: <1202886942-sup-6585@sieni>
   2012 
   2013 Excerpts from Johannes Martinsson's message of Tue Feb 12 21:36:44 +0200 2008:
   2014 > Have you tried searching (\) for '*', that seems to show all archived 
   2015 > messages.
   2016 
   2017 Thanks -this does the trick!
   2018 
   2019 
   2020 From mdk@mdk.am  Wed Feb 13 18:08:57 2008
   2021 From: mdk@mdk.am (Michael Dominic K.)
   2022 Date: Thu, 14 Feb 2008 00:08:57 +0100
   2023 Subject: [sup-talk] Backspace key?
   2024 In-Reply-To: <1202804371-sup-2434@clarabella.clarabella>
   2025 References: <1202774257.8173.4.camel@localhost.localdomain>
   2026 	<1202804371-sup-2434@clarabella.clarabella>
   2027 Message-ID: <67ed228e0802131508y19d94e55h2ba3b41bd748e758@mail.gmail.com>
   2028 
   2029 On Feb 12, 2008 9:25 AM, Giorgio Lando <patroclo7 at gmail.com> wrote:
   2030 > Excerpts from Michael Dominic K.'s message of Tue Feb 12 00:57:37 +0100 2008:
   2031 > > I'm having one trivial problem though -- my backspace key doesn't work
   2032 > > in all entry fields (del works). It's been a while since I fixed
   2033 > > del/backspace issues in linux... any help/hints/config switch?
   2034 >
   2035 > I do not use the gnome-terminal, but in my case the working string for
   2036 > backspace in sup is ^h, while my terminals (all rxvt derivatives) sent
   2037 > ^? by default. From the large literature about the topic, I think that
   2038 > other terminal settings could adjust the behaviour also with ^?, but
   2039 > setting ^h has no negative side effect for me. So look in the
   2040 > configuration of gnome-terminal for something like backspaceKey or
   2041 > string...
   2042 
   2043 Thanks,
   2044 
   2045 that worked for me (^h). Actually gnome terminal has a special
   2046 configuration in the "compatibility section" that allows you to choose
   2047 what is sent for backspace.
   2048 
   2049 However, I belive this is a bit of a workaround. I haven't noticed
   2050 anything breaking with ^h except... sup-config. Where, again,
   2051 backspace doesn't work with ^h on.
   2052 
   2053 -- 
   2054 Michael.
   2055 
   2056 From johannes@antiklimax.com  Tue Feb 12 13:10:27 2008
   2057 From: johannes@antiklimax.com (Johannes Martinsson)
   2058 Date: Tue, 12 Feb 2008 19:10:27 +0100
   2059 Subject: [sup-talk] [PATCH] Changed all (but one) occurrences of redwood to
   2060 	sup.
   2061 Message-ID: <1202839827-11975-1-git-send-email-johannes@antiklimax.com>
   2062 
   2063 * Changed all occurrences of redwood to sup, but left out the one in the
   2064   FAQ (What are all these "Red...).
   2065 ---
   2066  Rakefile                                    |    2 +-
   2067  bin/sup                                     |   34 ++++++++--------
   2068  bin/sup-add                                 |   16 ++++----
   2069  bin/sup-config                              |   18 ++++----
   2070  bin/sup-dump                                |    4 +-
   2071  bin/sup-recover-sources                     |   10 ++--
   2072  bin/sup-sync                                |   12 +++---
   2073  bin/sup-sync-back                           |   14 +++---
   2074  bin/sup-tweak-labels                        |    8 ++--
   2075  devel/load-index.rb                         |    2 +-
   2076  devel/profile.rb                            |    4 +-
   2077  devel/start-console.rb                      |    2 +-
   2078  doc/FAQ.txt                                 |    2 +-
   2079  lib/sup.rb                                  |   54 +++++++++++++-------------
   2080  lib/sup/account.rb                          |    2 +-
   2081  lib/sup/buffer.rb                           |    4 +-
   2082  lib/sup/colormap.rb                         |    6 +-
   2083  lib/sup/contact.rb                          |    2 +-
   2084  lib/sup/crypto.rb                           |   20 +++++-----
   2085  lib/sup/draft.rb                            |    4 +-
   2086  lib/sup/hook.rb                             |    6 +-
   2087  lib/sup/horizontal-selector.rb              |    2 +-
   2088  lib/sup/imap.rb                             |   16 ++++----
   2089  lib/sup/index.rb                            |   54 +++++++++++++-------------
   2090  lib/sup/keymap.rb                           |    2 +-
   2091  lib/sup/label.rb                            |    2 +-
   2092  lib/sup/logger.rb                           |    2 +-
   2093  lib/sup/maildir.rb                          |    2 +-
   2094  lib/sup/mbox.rb                             |    4 +-
   2095  lib/sup/mbox/loader.rb                      |    2 +-
   2096  lib/sup/mbox/ssh-file.rb                    |    6 +-
   2097  lib/sup/mbox/ssh-loader.rb                  |    2 +-
   2098  lib/sup/message-chunks.rb                   |    4 +-
   2099  lib/sup/message.rb                          |   34 ++++++++--------
   2100  lib/sup/mode.rb                             |    6 +-
   2101  lib/sup/modes/buffer-list-mode.rb           |    2 +-
   2102  lib/sup/modes/completion-mode.rb            |    2 +-
   2103  lib/sup/modes/compose-mode.rb               |    2 +-
   2104  lib/sup/modes/contact-list-mode.rb          |    4 +-
   2105  lib/sup/modes/edit-message-mode.rb          |    8 ++--
   2106  lib/sup/modes/file-browser-mode.rb          |    2 +-
   2107  lib/sup/modes/forward-mode.rb               |    2 +-
   2108  lib/sup/modes/help-mode.rb                  |    2 +-
   2109  lib/sup/modes/inbox-mode.rb                 |    2 +-
   2110  lib/sup/modes/label-list-mode.rb            |    4 +-
   2111  lib/sup/modes/label-search-results-mode.rb  |    2 +-
   2112  lib/sup/modes/line-cursor-mode.rb           |    2 +-
   2113  lib/sup/modes/log-mode.rb                   |    2 +-
   2114  lib/sup/modes/person-search-results-mode.rb |    2 +-
   2115  lib/sup/modes/poll-mode.rb                  |    2 +-
   2116  lib/sup/modes/reply-mode.rb                 |    2 +-
   2117  lib/sup/modes/resume-mode.rb                |    2 +-
   2118  lib/sup/modes/scroll-mode.rb                |    2 +-
   2119  lib/sup/modes/search-results-mode.rb        |    2 +-
   2120  lib/sup/modes/text-mode.rb                  |    2 +-
   2121  lib/sup/modes/thread-index-mode.rb          |    6 +-
   2122  lib/sup/modes/thread-view-mode.rb           |    2 +-
   2123  lib/sup/person.rb                           |    2 +-
   2124  lib/sup/poll.rb                             |   16 ++++----
   2125  lib/sup/sent.rb                             |    4 +-
   2126  lib/sup/source.rb                           |    2 +-
   2127  lib/sup/suicide.rb                          |    4 +-
   2128  lib/sup/tagger.rb                           |    2 +-
   2129  lib/sup/textfield.rb                        |    6 +-
   2130  lib/sup/thread.rb                           |    2 +-
   2131  lib/sup/update.rb                           |    2 +-
   2132  test/dummy_source.rb                        |    2 +-
   2133  test/test_message.rb                        |   10 ++--
   2134  68 files changed, 237 insertions(+), 237 deletions(-)
   2135 
   2136 diff --git a/Rakefile b/Rakefile
   2137 index f99246f..3940e4d 100644
   2138 --- a/Rakefile
   2139 +++ b/Rakefile
   2140 @@ -10,7 +10,7 @@ end # thanks to "Mike H"
   2141  ## allow people who use development versions by running "rake gem"
   2142  ## and installing the resulting gem it to be able to do this. (gem
   2143  ## versions must be in dotted-digit notation only).
   2144 -version = Redwood::VERSION == "git" ? "999" : Redwood::VERSION
   2145 +version = Sup::VERSION == "git" ? "999" : Sup::VERSION
   2146  
   2147  Hoe.new('sup', version) do |p|
   2148    p.rubyforge_name = 'sup'
   2149 diff --git a/bin/sup b/bin/sup
   2150 index 95b0af7..d0e3472 100644
   2151 --- a/bin/sup
   2152 +++ b/bin/sup
   2153 @@ -9,12 +9,12 @@ require "sup"
   2154  
   2155  BIN_VERSION = "git"
   2156  
   2157 -unless Redwood::VERSION == BIN_VERSION
   2158 +unless Sup::VERSION == BIN_VERSION
   2159    $stderr.puts <<EOS
   2160  
   2161  Error: version mismatch!
   2162  The sup executable is at version #{BIN_VERSION.inspect}.
   2163 -The sup libraries are at version #{Redwood::VERSION.inspect}.
   2164 +The sup libraries are at version #{Sup::VERSION.inspect}.
   2165  
   2166  Is your development environment conflicting with rubygems?
   2167  EOS
   2168 @@ -23,7 +23,7 @@ end
   2169  
   2170  $exceptions = []
   2171  $opts = Trollop::options do
   2172 -  version "sup v#{Redwood::VERSION}"
   2173 +  version "sup v#{Sup::VERSION}"
   2174    banner <<EOS
   2175  Sup is a curses-based email client.
   2176  
   2177 @@ -39,16 +39,16 @@ EOS
   2178  end
   2179  
   2180  if $opts[:list_hooks]
   2181 -  Redwood::HookManager.print_hooks
   2182 +  Sup::HookManager.print_hooks
   2183    exit
   2184  end
   2185  
   2186  Thread.abort_on_exception = true # make debugging possible
   2187  
   2188 -module Redwood
   2189 +module Sup
   2190  
   2191  global_keymap = Keymap.new do |k|
   2192 -  k.add :quit, "Quit Redwood", 'q'
   2193 +  k.add :quit, "Quit Sup", 'q'
   2194    k.add :help, "Show help", 'H', '?'
   2195    k.add :roll_buffers, "Switch to next buffer", 'b'
   2196  #  k.add :roll_buffers_backwards, "Switch to previous buffer", 'B'
   2197 @@ -95,9 +95,9 @@ rescue Index::LockError => e
   2198    case h.ask("Should I ask that process to kill itself? ")
   2199    when /^\s*y\s*$/i
   2200      h.say "Ok, suggesting seppuku..."
   2201 -    FileUtils.touch Redwood::SUICIDE_FN
   2202 +    FileUtils.touch Sup::SUICIDE_FN
   2203      sleep SuicideManager::DELAY * 2
   2204 -    FileUtils.rm_f Redwood::SUICIDE_FN
   2205 +    FileUtils.rm_f Sup::SUICIDE_FN
   2206      h.say "Let's try that again."
   2207      retry
   2208    else
   2209 @@ -110,20 +110,20 @@ EOS
   2210  end
   2211  
   2212  begin
   2213 -  Redwood::start
   2214 +  Sup::start
   2215    Index.load
   2216  
   2217    if(s = Index.source_for DraftManager.source_name)
   2218      DraftManager.source = s
   2219    else
   2220 -    Redwood::log "no draft source, auto-adding..."
   2221 +    Sup::log "no draft source, auto-adding..."
   2222      Index.add_source DraftManager.new_source
   2223    end
   2224  
   2225    if(s = Index.source_for SentManager.source_name)
   2226      SentManager.source = s
   2227    else
   2228 -    Redwood::log "no sent mail source, auto-adding..."
   2229 +    Sup::log "no sent mail source, auto-adding..."
   2230      Index.add_source SentManager.new_source
   2231    end
   2232  
   2233 @@ -191,7 +191,7 @@ begin
   2234        begin
   2235          s.connect
   2236        rescue SourceError => e
   2237 -        Redwood::log "fatal error loading from #{s}: #{e.message}"
   2238 +        Sup::log "fatal error loading from #{s}: #{e.message}"
   2239        end
   2240      end
   2241    end unless $opts[:no_initial_poll]
   2242 @@ -293,19 +293,19 @@ ensure
   2243      Index.stop_lock_update_thread
   2244    end
   2245  
   2246 -  Redwood::finish
   2247 +  Sup::finish
   2248    stop_cursing
   2249 -  Redwood::log "stopped cursing"
   2250 +  Sup::log "stopped cursing"
   2251  
   2252    if SuicideManager.instantiated? && SuicideManager.die?
   2253 -    Redwood::log "I've been ordered to commit seppuku. I obey!"
   2254 +    Sup::log "I've been ordered to commit seppuku. I obey!"
   2255    end
   2256  
   2257    if $exceptions.empty?
   2258 -    Redwood::log "no fatal errors. good job, william."
   2259 +    Sup::log "no fatal errors. good job, william."
   2260      Index.save
   2261    else
   2262 -    Redwood::log "oh crap, an exception"
   2263 +    Sup::log "oh crap, an exception"
   2264    end
   2265  
   2266    Index.unlock
   2267 diff --git a/bin/sup-add b/bin/sup-add
   2268 index 50bbb29..b78963f 100644
   2269 --- a/bin/sup-add
   2270 +++ b/bin/sup-add
   2271 @@ -7,7 +7,7 @@ require 'trollop'
   2272  require "sup"
   2273  
   2274  $opts = Trollop::options do
   2275 -  version "sup-add (sup #{Redwood::VERSION})"
   2276 +  version "sup-add (sup #{Sup::VERSION})"
   2277    banner <<EOS
   2278  Adds a source to the Sup source list.
   2279  
   2280 @@ -76,8 +76,8 @@ def get_login_info uri, sources
   2281  end
   2282  
   2283  $terminal.wrap_at = :auto
   2284 -Redwood::start
   2285 -index = Redwood::Index.new
   2286 +Sup::start
   2287 +index = Sup::Index.new
   2288  
   2289  index.lock_or_die
   2290  
   2291 @@ -100,14 +100,14 @@ begin
   2292          say "For SSH connections, if you will use public key authentication, you may leave the username and password blank."
   2293          say ""
   2294          username, password = get_login_info uri, index.sources
   2295 -        Redwood::MBox::SSHLoader.new uri, username, password, nil, !$opts[:unusual], $opts[:archive], nil, labels
   2296 +        Sup::MBox::SSHLoader.new uri, username, password, nil, !$opts[:unusual], $opts[:archive], nil, labels
   2297        when "imap", "imaps"
   2298          username, password = get_login_info uri, index.sources
   2299 -        Redwood::IMAP.new uri, username, password, nil, !$opts[:unusual], $opts[:archive], nil, labels
   2300 +        Sup::IMAP.new uri, username, password, nil, !$opts[:unusual], $opts[:archive], nil, labels
   2301        when "maildir"
   2302 -        Redwood::Maildir.new uri, nil, !$opts[:unusual], $opts[:archive], nil, labels
   2303 +        Sup::Maildir.new uri, nil, !$opts[:unusual], $opts[:archive], nil, labels
   2304        when "mbox"
   2305 -        Redwood::MBox::Loader.new uri, nil, !$opts[:unusual], $opts[:archive], nil, labels
   2306 +        Sup::MBox::Loader.new uri, nil, !$opts[:unusual], $opts[:archive], nil, labels
   2307        when nil
   2308          Trollop::die "Sources must be specified with an URI"
   2309        else
   2310 @@ -119,5 +119,5 @@ begin
   2311  ensure
   2312    index.save
   2313    index.unlock
   2314 -  Redwood::finish
   2315 +  Sup::finish
   2316  end
   2317 diff --git a/bin/sup-config b/bin/sup-config
   2318 index f978a6b..33e11ed 100644
   2319 --- a/bin/sup-config
   2320 +++ b/bin/sup-config
   2321 @@ -7,7 +7,7 @@ require 'trollop'
   2322  require "sup"
   2323  
   2324  $opts = Trollop::options do
   2325 -  version "sup-config (sup #{Redwood::VERSION})"
   2326 +  version "sup-config (sup #{Sup::VERSION})"
   2327    banner <<EOS
   2328  Interactive configuration tool for Sup. Won't destroy existing
   2329  configuration.
   2330 @@ -62,7 +62,7 @@ def add_source
   2331          return if fn.nil? || fn.empty?
   2332  
   2333          $last_fn = fn
   2334 -        [Redwood::MBox::Loader.suggest_labels_for(fn),
   2335 +        [Sup::MBox::Loader.suggest_labels_for(fn),
   2336           { :scheme => "mbox", :path => fn }]
   2337        when :maildir
   2338          $last_fn ||= ENV["MAIL"]
   2339 @@ -70,7 +70,7 @@ def add_source
   2340          return if fn.nil? || fn.empty?
   2341  
   2342          $last_fn = fn
   2343 -        [Redwood::Maildir.suggest_labels_for(fn),
   2344 +        [Sup::Maildir.suggest_labels_for(fn),
   2345           { :scheme => "maildir", :path => fn }]
   2346        when :mboxssh
   2347          $last_server ||= "localhost"
   2348 @@ -82,7 +82,7 @@ def add_source
   2349          return if fn.nil? || fn.empty?
   2350          $last_fn = fn
   2351          fn = "/#{fn}" # lame
   2352 -        [Redwood::MBox::SSHLoader.suggest_labels_for(fn),
   2353 +        [Sup::MBox::SSHLoader.suggest_labels_for(fn),
   2354           { :scheme => "mbox+ssh", :host => srv, :path => fn }]
   2355        when :imap, :imaps
   2356          $last_server ||= "localhost"
   2357 @@ -101,7 +101,7 @@ def add_source
   2358          else
   2359            host, port = srv, nil
   2360          end
   2361 -        [Redwood::IMAP.suggest_labels_for(fn),
   2362 +        [Sup::IMAP.suggest_labels_for(fn),
   2363           { :scheme => type.to_s, :host => host, :port => port, :path => fn }]
   2364        end
   2365      
   2366 @@ -150,8 +150,8 @@ def add_source
   2367  end
   2368  
   2369  $terminal.wrap_at = :auto
   2370 -Redwood::start
   2371 -index = Redwood::Index.new
   2372 +Sup::start
   2373 +index = Sup::Index.new
   2374  index.load_sources
   2375  
   2376  say <<EOS
   2377 @@ -187,9 +187,9 @@ $config[:accounts][:default][:alternates] = alts
   2378  $config[:accounts][:default][:signature] = sigfn
   2379  $config[:editor] = editor
   2380  
   2381 -Redwood::save_yaml_obj $config, Redwood::CONFIG_FN
   2382 +Sup::save_yaml_obj $config, Sup::CONFIG_FN
   2383  
   2384 -say "Ok, I've saved you up a nice lil' #{Redwood::CONFIG_FN}."
   2385 +say "Ok, I've saved you up a nice lil' #{Sup::CONFIG_FN}."
   2386  
   2387  done = false
   2388  until done
   2389 diff --git a/bin/sup-dump b/bin/sup-dump
   2390 index 29f6d6e..5ba5fee 100644
   2391 --- a/bin/sup-dump
   2392 +++ b/bin/sup-dump
   2393 @@ -5,7 +5,7 @@ require 'trollop'
   2394  require "sup"
   2395  
   2396  $opts = Trollop::options do
   2397 -  version "sup-dump (sup #{Redwood::VERSION})"
   2398 +  version "sup-dump (sup #{Sup::VERSION})"
   2399    banner <<EOS
   2400  Dumps all message state from the sup index to standard out. You can
   2401  later use sup-sync --restored --restore <filename> to recover the index.
   2402 @@ -21,7 +21,7 @@ No options.
   2403  EOS
   2404  end
   2405  
   2406 -index = Redwood::Index.new
   2407 +index = Sup::Index.new
   2408  index.load
   2409  
   2410  (1 ... index.index.reader.max_doc).each do |i|
   2411 diff --git a/bin/sup-recover-sources b/bin/sup-recover-sources
   2412 index af39b7d..33b1a65 100644
   2413 --- a/bin/sup-recover-sources
   2414 +++ b/bin/sup-recover-sources
   2415 @@ -49,7 +49,7 @@ end.parse(ARGV)
   2416  
   2417  require "sup"
   2418  puts "loading index..."
   2419 -index = Redwood::Index.new
   2420 +index = Sup::Index.new
   2421  index.load
   2422  puts "loaded index of #{index.size} messages"
   2423  
   2424 @@ -64,16 +64,16 @@ ARGV.each do |fn|
   2425        username = $stdin.gets.chomp
   2426        print "Password for #{fn} (warning: cleartext): "
   2427        password = $stdin.gets.chomp
   2428 -      Redwood::IMAP.new(fn, username, password, nil, !$opts[:unusual], $opts[:archive])
   2429 +      Sup::IMAP.new(fn, username, password, nil, !$opts[:unusual], $opts[:archive])
   2430      else
   2431 -      Redwood::MBox::Loader.new(fn, nil, !$opts[:unusual], $opts[:archive])
   2432 +      Sup::MBox::Loader.new(fn, nil, !$opts[:unusual], $opts[:archive])
   2433      end
   2434  
   2435    source_ids = {}
   2436    count = 0
   2437    source.each do |offset, labels|
   2438      begin
   2439 -      m = Redwood::Message.new :source => source, :source_info => offset
   2440 +      m = Sup::Message.new :source => source, :source_info => offset
   2441        docid, entry = index.load_entry_for_id m.id
   2442        next unless entry
   2443        #puts "# #{source} #{offset} #{entry[:source_id]}"
   2444 @@ -81,7 +81,7 @@ ARGV.each do |fn|
   2445        source_ids[entry[:source_id]] = (source_ids[entry[:source_id]] || 0) + 1
   2446        count += 1
   2447        break if count == $opts[:scan_num]
   2448 -    rescue Redwood::MessageFormatError => e
   2449 +    rescue Sup::MessageFormatError => e
   2450        puts "# #{e.message}"
   2451      end
   2452    end
   2453 diff --git a/bin/sup-sync b/bin/sup-sync
   2454 index 4a05257..9cb44c4 100644
   2455 --- a/bin/sup-sync
   2456 +++ b/bin/sup-sync
   2457 @@ -26,7 +26,7 @@ def time
   2458  end
   2459  
   2460  opts = Trollop::options do
   2461 -  version "sup-sync (sup #{Redwood::VERSION})"
   2462 +  version "sup-sync (sup #{Sup::VERSION})"
   2463    banner <<EOS
   2464  Synchronizes the Sup index with one or more message sources by adding
   2465  messages, deleting messages, or changing message state in the index as
   2466 @@ -90,8 +90,8 @@ end
   2467  target = [:new, :changed, :all, :restored].find { |x| opts[x] } || :new
   2468  op = [:asis, :restore, :discard].find { |x| opts[x] } || :asis
   2469  
   2470 -Redwood::start
   2471 -index = Redwood::Index.new
   2472 +Sup::start
   2473 +index = Sup::Index.new
   2474  
   2475  restored_state =
   2476    if opts[:restore]
   2477 @@ -133,7 +133,7 @@ begin
   2478      num_added = num_updated = num_scanned = num_restored = 0
   2479      last_info_time = start_time = Time.now
   2480  
   2481 -    Redwood::PollManager.add_messages_from source do |m, offset, entry|
   2482 +    Sup::PollManager.add_messages_from source do |m, offset, entry|
   2483        num_scanned += 1
   2484        seen[m.id] = true
   2485  
   2486 @@ -234,12 +234,12 @@ begin
   2487      optt = time { index.index.optimize unless opts[:dry_run] }
   2488      $stderr.puts "Optimized index of size #{index.size} in #{optt}s."
   2489    end
   2490 -rescue Redwood::FatalSourceError => e
   2491 +rescue Sup::FatalSourceError => e
   2492    $stderr.puts "Sorry, I couldn't communicate with a source: #{e.message}"
   2493  rescue Exception => e
   2494    File.open("sup-exception-log.txt", "w") { |f| f.puts e.backtrace }
   2495    raise
   2496  ensure
   2497 -  Redwood::finish
   2498 +  Sup::finish
   2499    index.unlock
   2500  end
   2501 diff --git a/bin/sup-sync-back b/bin/sup-sync-back
   2502 index 57bebbe..8beb614 100644
   2503 --- a/bin/sup-sync-back
   2504 +++ b/bin/sup-sync-back
   2505 @@ -16,7 +16,7 @@ def die msg
   2506  end
   2507  
   2508  opts = Trollop::options do
   2509 -  version "sup-sync-back (sup #{Redwood::VERSION})"
   2510 +  version "sup-sync-back (sup #{Sup::VERSION})"
   2511    banner <<EOS
   2512  Drop or move messages from Sup sources that are marked as deleted or
   2513  spam in the Sup index.
   2514 @@ -55,8 +55,8 @@ unless opts[:drop_deleted] || opts[:move_deleted] || opts[:drop_spam] || opts[:m
   2515    exit
   2516  end
   2517  
   2518 -Redwood::start
   2519 -index = Redwood::Index.new
   2520 +Sup::start
   2521 +index = Sup::Index.new
   2522  index.lock_or_die
   2523  
   2524  deleted_fp, spam_fp = nil
   2525 @@ -72,12 +72,12 @@ begin
   2526  
   2527    sources = ARGV.map do |uri|
   2528      s = index.source_for(uri) or die "unknown source: #{uri}. Did you add it with sup-add first?"
   2529 -    s.is_a?(Redwood::MBox::Loader) or die "#{uri} is not an mbox source."
   2530 +    s.is_a?(Sup::MBox::Loader) or die "#{uri} is not an mbox source."
   2531      s
   2532    end
   2533  
   2534    if sources.empty?
   2535 -    sources = index.usual_sources.select { |s| s.is_a? Redwood::MBox::Loader } 
   2536 +    sources = index.usual_sources.select { |s| s.is_a? Sup::MBox::Loader } 
   2537    end
   2538  
   2539    unless sources.all? { |s| s.file_path.nil? } || File.executable?(dotlockfile) || opts[:dont_use_dotlockfile]
   2540 @@ -101,7 +101,7 @@ EOS
   2541      num_dropped = num_moved = num_scanned = 0
   2542      
   2543      out_fp = Tempfile.new "sup-sync-back-#{source.id}"
   2544 -    Redwood::PollManager.add_messages_from source do |m, offset, entry|
   2545 +    Sup::PollManager.add_messages_from source do |m, offset, entry|
   2546        num_scanned += 1
   2547  
   2548        if entry
   2549 @@ -166,6 +166,6 @@ rescue Exception => e
   2550    File.open("sup-exception-log.txt", "w") { |f| f.puts e.backtrace }
   2551    raise
   2552  ensure
   2553 -  Redwood::finish
   2554 +  Sup::finish
   2555    index.unlock
   2556  end
   2557 diff --git a/bin/sup-tweak-labels b/bin/sup-tweak-labels
   2558 index 21e766c..eba76f7 100644
   2559 --- a/bin/sup-tweak-labels
   2560 +++ b/bin/sup-tweak-labels
   2561 @@ -25,7 +25,7 @@ def time
   2562  end
   2563  
   2564  opts = Trollop::options do
   2565 -  version "sup-tweak-labels (sup #{Redwood::VERSION})"
   2566 +  version "sup-tweak-labels (sup #{Sup::VERSION})"
   2567    banner <<EOS
   2568  Batch modification of message state for messages already in the index.
   2569  
   2570 @@ -55,9 +55,9 @@ remove_labels = (opts[:remove] || "").split(",").map { |l| l.intern }.uniq
   2571  
   2572  Trollop::die "nothing to do: no labels to add or remove" if add_labels.empty? && remove_labels.empty?
   2573  
   2574 -Redwood::start
   2575 +Sup::start
   2576  begin
   2577 -  index = Redwood::Index.new
   2578 +  index = Sup::Index.new
   2579    index.load
   2580  
   2581    source_ids = 
   2582 @@ -121,7 +121,7 @@ rescue Exception => e
   2583    raise
   2584  ensure
   2585    index.save
   2586 -  Redwood::finish
   2587 +  Sup::finish
   2588    index.unlock
   2589  end
   2590  
   2591 diff --git a/devel/load-index.rb b/devel/load-index.rb
   2592 index 858c8b5..8fa5861 100644
   2593 --- a/devel/load-index.rb
   2594 +++ b/devel/load-index.rb
   2595 @@ -1,7 +1,7 @@
   2596  require 'sup'
   2597  
   2598  puts "loading index..."
   2599 - at index = Redwood::Index.new
   2600 + at index = Sup::Index.new
   2601  @index.load
   2602  @i = @index.index
   2603  puts "loaded index of #{@i.size} messages"
   2604 diff --git a/devel/profile.rb b/devel/profile.rb
   2605 index 67b6b08..e2d6b25 100644
   2606 --- a/devel/profile.rb
   2607 +++ b/devel/profile.rb
   2608 @@ -1,9 +1,9 @@
   2609  require 'rubygems'
   2610  require 'ruby-prof'
   2611 -require "redwood"
   2612 +require "sup"
   2613  
   2614  result = RubyProf.profile do
   2615 -  Redwood::ThreadSet.new(ARGV.map { |fn| Redwood::MBox::Scanner.new fn }).load_n_threads 100
   2616 +  Sup::ThreadSet.new(ARGV.map { |fn| Sup::MBox::Scanner.new fn }).load_n_threads 100
   2617  end
   2618  
   2619  printer = RubyProf::GraphHtmlPrinter.new(result)
   2620 diff --git a/devel/start-console.rb b/devel/start-console.rb
   2621 index 2d7de10..ab7224f 100644
   2622 --- a/devel/start-console.rb
   2623 +++ b/devel/start-console.rb
   2624 @@ -1,5 +1,5 @@
   2625  require 'sup'
   2626 -include Redwood
   2627 +include Sup
   2628  start
   2629  Index.new
   2630  Index.load
   2631 diff --git a/doc/FAQ.txt b/doc/FAQ.txt
   2632 index 3b65330..1ca093e 100644
   2633 --- a/doc/FAQ.txt
   2634 +++ b/doc/FAQ.txt
   2635 @@ -88,7 +88,7 @@ A: Move the messages from the source to the target using whatever tool
   2636     states will be lost when you sync the other source. So do them both
   2637     in one go.
   2638  
   2639 -Q: What are all these "Redwood" references I see in the code?
   2640 +Q: What are all these "sup" references I see in the code?
   2641  A: That was Sup's original name. (Think pine, elm. Although I was a
   2642     Mutt user, I couldn't think of a good progression there.) But it
   2643     was taken by another project on RubyForge, and wasn't that
   2644 diff --git a/lib/sup.rb b/lib/sup.rb
   2645 index cec36b6..05ba6c4 100644
   2646 --- a/lib/sup.rb
   2647 +++ b/lib/sup.rb
   2648 @@ -23,16 +23,16 @@ class Module
   2649      
   2650      klass.instance_eval do
   2651        define_method(:to_yaml_properties) { vars }
   2652 -      define_method(:to_yaml_type) { "!#{Redwood::YAML_DOMAIN},#{Redwood::YAML_DATE}/#{path}" }
   2653 +      define_method(:to_yaml_type) { "!#{Sup::YAML_DOMAIN},#{Sup::YAML_DATE}/#{path}" }
   2654      end
   2655  
   2656 -    YAML.add_domain_type("#{Redwood::YAML_DOMAIN},#{Redwood::YAML_DATE}", path) do |type, val|
   2657 +    YAML.add_domain_type("#{Sup::YAML_DOMAIN},#{Sup::YAML_DATE}", path) do |type, val|
   2658        klass.new(*props.map { |p| val[p] })
   2659      end
   2660    end
   2661  end
   2662  
   2663 -module Redwood
   2664 +module Sup
   2665    VERSION = "git"
   2666  
   2667    BASE_DIR   = ENV["SUP_BASE"] || File.join(ENV["HOME"], ".sup")
   2668 @@ -91,23 +91,23 @@ module Redwood
   2669    end
   2670  
   2671    def start
   2672 -    Redwood::PersonManager.new Redwood::PERSON_FN
   2673 -    Redwood::SentManager.new Redwood::SENT_FN
   2674 -    Redwood::ContactManager.new Redwood::CONTACT_FN
   2675 -    Redwood::LabelManager.new Redwood::LABEL_FN
   2676 -    Redwood::AccountManager.new $config[:accounts]
   2677 -    Redwood::DraftManager.new Redwood::DRAFT_DIR
   2678 -    Redwood::UpdateManager.new
   2679 -    Redwood::PollManager.new
   2680 -    Redwood::SuicideManager.new Redwood::SUICIDE_FN
   2681 -    Redwood::CryptoManager.new
   2682 +    Sup::PersonManager.new Sup::PERSON_FN
   2683 +    Sup::SentManager.new Sup::SENT_FN
   2684 +    Sup::ContactManager.new Sup::CONTACT_FN
   2685 +    Sup::LabelManager.new Sup::LABEL_FN
   2686 +    Sup::AccountManager.new $config[:accounts]
   2687 +    Sup::DraftManager.new Sup::DRAFT_DIR
   2688 +    Sup::UpdateManager.new
   2689 +    Sup::PollManager.new
   2690 +    Sup::SuicideManager.new Sup::SUICIDE_FN
   2691 +    Sup::CryptoManager.new
   2692    end
   2693  
   2694    def finish
   2695 -    Redwood::LabelManager.save if Redwood::LabelManager.instantiated?
   2696 -    Redwood::ContactManager.save if Redwood::ContactManager.instantiated?
   2697 -    Redwood::PersonManager.save if Redwood::PersonManager.instantiated?
   2698 -    Redwood::BufferManager.deinstantiate! if Redwood::BufferManager.instantiated?
   2699 +    Sup::LabelManager.save if Sup::LabelManager.instantiated?
   2700 +    Sup::ContactManager.save if Sup::ContactManager.instantiated?
   2701 +    Sup::PersonManager.save if Sup::PersonManager.instantiated?
   2702 +    Sup::BufferManager.deinstantiate! if Sup::BufferManager.instantiated?
   2703    end
   2704  
   2705    ## not really a good place for this, so I'll just dump it here.
   2706 @@ -164,8 +164,8 @@ EOM
   2707  end
   2708  
   2709  ## set up default configuration file
   2710 -if File.exists? Redwood::CONFIG_FN
   2711 -  $config = Redwood::load_yaml_obj Redwood::CONFIG_FN
   2712 +if File.exists? Sup::CONFIG_FN
   2713 +  $config = Sup::load_yaml_obj Sup::CONFIG_FN
   2714  else
   2715    require 'etc'
   2716    require 'socket'
   2717 @@ -198,8 +198,8 @@ else
   2718      :discard_snippets_from_encrypted_messages => false,
   2719    }
   2720    begin
   2721 -    FileUtils.mkdir_p Redwood::BASE_DIR
   2722 -    Redwood::save_yaml_obj $config, Redwood::CONFIG_FN
   2723 +    FileUtils.mkdir_p Sup::BASE_DIR
   2724 +    Sup::save_yaml_obj $config, Sup::CONFIG_FN
   2725    rescue StandardError => e
   2726      $stderr.puts "warning: #{e.message}"
   2727    end
   2728 @@ -211,7 +211,7 @@ require "sup/hook"
   2729  ## we have to initialize this guy first, because other classes must
   2730  ## reference it in order to register hooks, and they do that at parse
   2731  ## time.
   2732 -Redwood::HookManager.new Redwood::HOOK_DIR
   2733 +Sup::HookManager.new Sup::HOOK_DIR
   2734  
   2735  ## everything we need to get logging working
   2736  require "sup/buffer"
   2737 @@ -221,7 +221,7 @@ require "sup/modes/scroll-mode"
   2738  require "sup/modes/text-mode"
   2739  require "sup/modes/log-mode"
   2740  require "sup/logger"
   2741 -module Redwood
   2742 +module Sup
   2743    def log s; Logger.log s; end
   2744    module_function :log
   2745  end
   2746 @@ -229,13 +229,13 @@ end
   2747  ## determine encoding and character set
   2748    $encoding = Locale.current.charset
   2749    if $encoding
   2750 -    Redwood::log "using character set encoding #{$encoding.inspect}"
   2751 +    Sup::log "using character set encoding #{$encoding.inspect}"
   2752    else
   2753 -    Redwood::log "warning: can't find character set by using locale, defaulting to utf-8"
   2754 +    Sup::log "warning: can't find character set by using locale, defaulting to utf-8"
   2755      $encoding = "utf-8"
   2756    end
   2757  
   2758 -## now everything else (which can feel free to call Redwood::log at load time)
   2759 +## now everything else (which can feel free to call Sup::log at load time)
   2760  require "sup/update"
   2761  require "sup/suicide"
   2762  require "sup/message-chunks"
   2763 @@ -280,5 +280,5 @@ require "sup/sent"
   2764  
   2765  $:.each do |base|
   2766    d = File.join base, "sup/share/modes/"
   2767 -  Redwood::Mode.load_all_modes d if File.directory? d
   2768 +  Sup::Mode.load_all_modes d if File.directory? d
   2769  end
   2770 diff --git a/lib/sup/account.rb b/lib/sup/account.rb
   2771 index f8ac0fc..30a8a31 100644
   2772 --- a/lib/sup/account.rb
   2773 +++ b/lib/sup/account.rb
   2774 @@ -1,4 +1,4 @@
   2775 -module Redwood
   2776 +module Sup
   2777  
   2778  class Account < Person
   2779    attr_accessor :sendmail, :signature
   2780 diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
   2781 index 4374fa8..6fa659f 100644
   2782 --- a/lib/sup/buffer.rb
   2783 +++ b/lib/sup/buffer.rb
   2784 @@ -46,7 +46,7 @@ module Ncurses
   2785  end
   2786  end
   2787  
   2788 -module Redwood
   2789 +module Sup
   2790  
   2791  class InputSequenceAborted < StandardError; end
   2792  
   2793 @@ -713,7 +713,7 @@ private
   2794    end
   2795  
   2796    def default_terminal_title buf
   2797 -    "Sup #{Redwood::VERSION} :: #{buf.title}"
   2798 +    "Sup #{Sup::VERSION} :: #{buf.title}"
   2799    end
   2800  
   2801    def get_status_and_title buf
   2802 diff --git a/lib/sup/colormap.rb b/lib/sup/colormap.rb
   2803 index 9c6869a..941de40 100644
   2804 --- a/lib/sup/colormap.rb
   2805 +++ b/lib/sup/colormap.rb
   2806 @@ -1,4 +1,4 @@
   2807 -module Redwood
   2808 +module Sup
   2809  
   2810  class Colormap
   2811    @@instance = nil
   2812 @@ -86,7 +86,7 @@ class Colormap
   2813        @next_id = (@next_id + 1) % NUM_COLORS
   2814        @next_id += 1 if @next_id == 0 # 0 is always white on black
   2815        id = @next_id
   2816 -      Redwood::log "colormap: for color #{sym}, using id #{id} -> #{fg}, #{bg}"
   2817 +      Sup::log "colormap: for color #{sym}, using id #{id} -> #{fg}, #{bg}"
   2818        Curses.init_pair id, fg, bg or raise ArgumentError,
   2819          "couldn't initialize curses color pair #{fg}, #{bg} (key #{id})"
   2820  
   2821 @@ -94,7 +94,7 @@ class Colormap
   2822        ## delete the old mapping, if it exists
   2823        if @users[cp]
   2824          @users[cp].each do |usym|
   2825 -          Redwood::log "dropping color #{usym} (#{id})"
   2826 +          Sup::log "dropping color #{usym} (#{id})"
   2827            @entries[usym][3] = nil
   2828          end
   2829          @users[cp] = []
   2830 diff --git a/lib/sup/contact.rb b/lib/sup/contact.rb
   2831 index 8050c06..8bea99d 100644
   2832 --- a/lib/sup/contact.rb
   2833 +++ b/lib/sup/contact.rb
   2834 @@ -1,4 +1,4 @@
   2835 -module Redwood
   2836 +module Sup
   2837  
   2838  class ContactManager
   2839    include Singleton
   2840 diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb
   2841 index 9e16132..82174bd 100644
   2842 --- a/lib/sup/crypto.rb
   2843 +++ b/lib/sup/crypto.rb
   2844 @@ -1,4 +1,4 @@
   2845 -module Redwood
   2846 +module Sup
   2847  
   2848  class CryptoManager
   2849    include Singleton
   2850 @@ -20,10 +20,10 @@ class CryptoManager
   2851      @cmd =
   2852        case bin
   2853        when /\S/
   2854 -        Redwood::log "crypto: detected gpg binary in #{bin}"
   2855 +        Sup::log "crypto: detected gpg binary in #{bin}"
   2856          "#{bin} --quiet --batch --no-verbose --logger-fd 1 --use-agent"
   2857        else
   2858 -        Redwood::log "crypto: no gpg binary detected"
   2859 +        Sup::log "crypto: no gpg binary detected"
   2860          nil
   2861        end
   2862    end
   2863 @@ -31,7 +31,7 @@ class CryptoManager
   2864    def have_crypto?; !@cmd.nil? end
   2865  
   2866    def sign from, to, payload
   2867 -    payload_fn = Tempfile.new "redwood.payload"
   2868 +    payload_fn = Tempfile.new "sup.payload"
   2869      payload_fn.write format_payload(payload)
   2870      payload_fn.close
   2871  
   2872 @@ -49,7 +49,7 @@ class CryptoManager
   2873    end
   2874  
   2875    def encrypt from, to, payload, sign=false
   2876 -    payload_fn = Tempfile.new "redwood.payload"
   2877 +    payload_fn = Tempfile.new "sup.payload"
   2878      payload_fn.write format_payload(payload)
   2879      payload_fn.close
   2880  
   2881 @@ -83,11 +83,11 @@ class CryptoManager
   2882    def verify payload, signature # both RubyMail::Message objects
   2883      return unknown_status(cant_find_binary) unless @cmd
   2884  
   2885 -    payload_fn = Tempfile.new "redwood.payload"
   2886 +    payload_fn = Tempfile.new "sup.payload"
   2887      payload_fn.write format_payload(payload)
   2888      payload_fn.close
   2889  
   2890 -    signature_fn = Tempfile.new "redwood.signature"
   2891 +    signature_fn = Tempfile.new "sup.signature"
   2892      signature_fn.write signature.decode
   2893      signature_fn.close
   2894  
   2895 @@ -109,7 +109,7 @@ class CryptoManager
   2896    def decrypt payload # a RubyMail::Message object
   2897      return unknown_status(cant_find_binary) unless @cmd
   2898  
   2899 -    payload_fn = Tempfile.new "redwood.payload"
   2900 +    payload_fn = Tempfile.new "sup.payload"
   2901      payload_fn.write payload.to_s
   2902      payload_fn.close
   2903  
   2904 @@ -156,9 +156,9 @@ private
   2905  
   2906    def run_gpg args
   2907      cmd = "#{@cmd} #{args} 2> /dev/null"
   2908 -    #Redwood::log "crypto: running: #{cmd}"
   2909 +    #Sup::log "crypto: running: #{cmd}"
   2910      output = `#{cmd}`
   2911 -    #Redwood::log "crypto: output: #{output.inspect}" unless $?.success?
   2912 +    #Sup::log "crypto: output: #{output.inspect}" unless $?.success?
   2913      output
   2914    end
   2915  end
   2916 diff --git a/lib/sup/draft.rb b/lib/sup/draft.rb
   2917 index 81c0044..87af878 100644
   2918 --- a/lib/sup/draft.rb
   2919 +++ b/lib/sup/draft.rb
   2920 @@ -1,4 +1,4 @@
   2921 -module Redwood
   2922 +module Sup
   2923  
   2924  class DraftManager
   2925    include Singleton
   2926 @@ -45,7 +45,7 @@ class DraftLoader < Source
   2927    yaml_properties :cur_offset
   2928  
   2929    def initialize cur_offset=0
   2930 -    dir = Redwood::DRAFT_DIR
   2931 +    dir = Sup::DRAFT_DIR
   2932      Dir.mkdir dir unless File.exists? dir
   2933      super DraftManager.source_name, cur_offset, true, false
   2934      @dir = dir
   2935 diff --git a/lib/sup/hook.rb b/lib/sup/hook.rb
   2936 index 98fcf57..c3f018e 100644
   2937 --- a/lib/sup/hook.rb
   2938 +++ b/lib/sup/hook.rb
   2939 @@ -1,4 +1,4 @@
   2940 -module Redwood
   2941 +module Sup
   2942  
   2943  class HookManager
   2944    ## there's probably a better way to do this, but to evaluate a hook
   2945 @@ -40,7 +40,7 @@ class HookManager
   2946      end
   2947  
   2948      def log s
   2949 -      Redwood::log "hook[#@__name]: #{s}"
   2950 +      Sup::log "hook[#@__name]: #{s}"
   2951      end
   2952  
   2953      def ask_yes_or_no q
   2954 @@ -137,7 +137,7 @@ private
   2955    end
   2956  
   2957    def log m
   2958 -    Redwood::log("hook: " + m)
   2959 +    Sup::log("hook: " + m)
   2960    end
   2961  end
   2962  
   2963 diff --git a/lib/sup/horizontal-selector.rb b/lib/sup/horizontal-selector.rb
   2964 index aef16d4..5d09321 100644
   2965 --- a/lib/sup/horizontal-selector.rb
   2966 +++ b/lib/sup/horizontal-selector.rb
   2967 @@ -1,4 +1,4 @@
   2968 -module Redwood
   2969 +module Sup
   2970  
   2971  class HorizontalSelector
   2972    attr_accessor :label
   2973 diff --git a/lib/sup/imap.rb b/lib/sup/imap.rb
   2974 index e785597..b21cebc 100644
   2975 --- a/lib/sup/imap.rb
   2976 +++ b/lib/sup/imap.rb
   2977 @@ -41,7 +41,7 @@ require 'cgi'
   2978  ##
   2979  ## fuck you, imap committee. you managed to design something nearly as
   2980  ## shitty as mbox but goddamn THIRTY YEARS LATER.
   2981 -module Redwood
   2982 +module Sup
   2983  
   2984  class IMAP < Source
   2985    SCAN_INTERVAL = 60 # seconds
   2986 @@ -131,13 +131,13 @@ class IMAP < Source
   2987      return if last_id == @ids.length
   2988  
   2989      range = (@ids.length + 1) .. last_id
   2990 -    Redwood::log "fetching IMAP headers #{range}"
   2991 +    Sup::log "fetching IMAP headers #{range}"
   2992      fetch(range, ['RFC822.SIZE', 'INTERNALDATE', 'FLAGS']).each do |v|
   2993        id = make_id v
   2994        @ids << id
   2995        @imap_state[id] = { :id => v.seqno, :flags => v.attr["FLAGS"] }
   2996      end
   2997 -    Redwood::log "done fetching IMAP headers"
   2998 +    Sup::log "done fetching IMAP headers"
   2999    end
   3000    synchronized :scan_mailbox
   3001  
   3002 @@ -196,7 +196,7 @@ private
   3003      if good_results.empty?
   3004        raise FatalSourceError, "no IMAP response for #{ids} containing all fields #{fields.join(', ')} (got #{results.size} results)"
   3005      elsif good_results.size < results.size
   3006 -      Redwood::log "Your IMAP server sucks. It sent #{results.size} results for a request for #{good_results.size} messages. What are you using, Binc?"
   3007 +      Sup::log "Your IMAP server sucks. It sent #{results.size} results for a request for #{good_results.size} messages. What are you using, Binc?"
   3008      end
   3009  
   3010      good_results
   3011 @@ -224,12 +224,12 @@ private
   3012            raise Net::IMAP::NoResponseError unless @imap.capability().member? "AUTH=CRAM-MD5"
   3013            @imap.authenticate 'CRAM-MD5', @username, @password
   3014          rescue Net::IMAP::BadResponseError, Net::IMAP::NoResponseError => e
   3015 -          Redwood::log "CRAM-MD5 authentication failed: #{e.class}. Trying LOGIN auth..."
   3016 +          Sup::log "CRAM-MD5 authentication failed: #{e.class}. Trying LOGIN auth..."
   3017            begin
   3018              raise Net::IMAP::NoResponseError unless @imap.capability().member? "AUTH=LOGIN"
   3019              @imap.authenticate 'LOGIN', @username, @password
   3020            rescue Net::IMAP::BadResponseError, Net::IMAP::NoResponseError => e
   3021 -            Redwood::log "LOGIN authentication failed: #{e.class}. Trying plain-text LOGIN..."
   3022 +            Sup::log "LOGIN authentication failed: #{e.class}. Trying plain-text LOGIN..."
   3023              @imap.login @username, @password
   3024            end
   3025          end
   3026 @@ -246,7 +246,7 @@ private
   3027  
   3028    def say s
   3029      @say_id = BufferManager.say s, @say_id if BufferManager.instantiated?
   3030 -    Redwood::log s
   3031 +    Sup::log s
   3032    end
   3033  
   3034    def shutup
   3035 @@ -303,7 +303,7 @@ private
   3036        rescue *RECOVERABLE_ERRORS => e
   3037          if (retries += 1) <= 3
   3038            @imap = nil
   3039 -          Redwood::log "got #{e.class.name}: #{e.message.inspect}"
   3040 +          Sup::log "got #{e.class.name}: #{e.message.inspect}"
   3041            sleep 2
   3042            retry
   3043          end
   3044 diff --git a/lib/sup/index.rb b/lib/sup/index.rb
   3045 index cf2ac6d..b634b63 100644
   3046 --- a/lib/sup/index.rb
   3047 +++ b/lib/sup/index.rb
   3048 @@ -1,4 +1,4 @@
   3049 -## the index structure for redwood. interacts with ferret.
   3050 +## the index structure for sup. interacts with ferret.
   3051  
   3052  require 'fileutils'
   3053  require 'ferret'
   3054 @@ -6,11 +6,11 @@ begin
   3055    require 'chronic'
   3056    $have_chronic = true
   3057  rescue LoadError => e
   3058 -  Redwood::log "optional 'chronic' library not found (run 'gem install chronic' to install)"
   3059 +  Sup::log "optional 'chronic' library not found (run 'gem install chronic' to install)"
   3060    $have_chronic = false
   3061  end
   3062  
   3063 -module Redwood
   3064 +module Sup
   3065  
   3066  class Index
   3067    class LockError < StandardError
   3068 @@ -44,7 +44,7 @@ class Index
   3069    def lockfile; File.join @dir, "lock" end
   3070  
   3071    def lock
   3072 -    Redwood::log "locking #{lockfile}..."
   3073 +    Sup::log "locking #{lockfile}..."
   3074      begin
   3075        @lock.lock
   3076      rescue Lockfile::MaxTriesLockError
   3077 @@ -53,7 +53,7 @@ class Index
   3078    end
   3079  
   3080    def start_lock_update_thread
   3081 -    @lock_update_thread = Redwood::reporting_thread("lock update") do
   3082 +    @lock_update_thread = Sup::reporting_thread("lock update") do
   3083        while true
   3084          sleep 30
   3085          @lock.touch_yourself
   3086 @@ -99,7 +99,7 @@ EOS
   3087  
   3088    def unlock
   3089      if @lock && @lock.locked?
   3090 -      Redwood::log "unlocking #{lockfile}..."
   3091 +      Sup::log "unlocking #{lockfile}..."
   3092        @lock.unlock
   3093      end
   3094    end
   3095 @@ -110,7 +110,7 @@ EOS
   3096    end
   3097  
   3098    def save
   3099 -    Redwood::log "saving index and sources..."
   3100 +    Sup::log "saving index and sources..."
   3101      FileUtils.mkdir_p @dir unless File.exists? @dir
   3102      save_sources
   3103      save_index
   3104 @@ -131,11 +131,11 @@ EOS
   3105  
   3106    def load_index dir=File.join(@dir, "ferret")
   3107      if File.exists? dir
   3108 -      Redwood::log "loading index..."
   3109 +      Sup::log "loading index..."
   3110        @index = Ferret::Index::Index.new(:path => dir, :analyzer => @analyzer)
   3111 -      Redwood::log "loaded index of #{@index.size} messages"
   3112 +      Sup::log "loaded index of #{@index.size} messages"
   3113      else
   3114 -      Redwood::log "creating index..."
   3115 +      Sup::log "creating index..."
   3116        field_infos = Ferret::Index::FieldInfos.new :store => :yes
   3117        field_infos.add_field :message_id
   3118        field_infos.add_field :source_id
   3119 @@ -220,7 +220,7 @@ EOS
   3120      offset = 0
   3121      while true
   3122        results = @index.search(query, :sort => "date DESC", :limit => EACH_BY_DATE_NUM, :offset => offset)
   3123 -      Redwood::log "got #{results.total_hits} results for query (offset #{offset}) #{query.inspect}"
   3124 +      Sup::log "got #{results.total_hits} results for query (offset #{offset}) #{query.inspect}"
   3125        results.hits.each { |hit| yield @index[hit.doc][:message_id], lambda { build_message hit.doc } }
   3126        break if offset >= results.total_hits - EACH_BY_DATE_NUM
   3127        offset += EACH_BY_DATE_NUM
   3128 @@ -245,7 +245,7 @@ EOS
   3129    SAME_SUBJECT_DATE_LIMIT = 7
   3130    MAX_CLAUSES = 1000
   3131    def each_message_in_thread_for m, opts={}
   3132 -    #Redwood::log "Building thread for #{m.id}: #{m.subj}"
   3133 +    #Sup::log "Building thread for #{m.id}: #{m.subj}"
   3134      messages = {}
   3135      searched = {}
   3136      num_queries = 0
   3137 @@ -265,7 +265,7 @@ EOS
   3138        q = build_query :qobj => q
   3139  
   3140        pending = @index.search(q).hits.map { |hit| @index[hit.doc][:message_id] }
   3141 -      Redwood::log "found #{pending.size} results for subject query #{q}"
   3142 +      Sup::log "found #{pending.size} results for subject query #{q}"
   3143      else
   3144        pending = [m.id]
   3145      end
   3146 @@ -295,7 +295,7 @@ EOS
   3147          end
   3148          mid = @index[docid][:message_id]
   3149          unless messages.member?(mid)
   3150 -          #Redwood::log "got #{mid} as a child of #{id}"
   3151 +          #Sup::log "got #{mid} as a child of #{id}"
   3152            messages[mid] ||= lambda { build_message docid }
   3153            refs = @index[docid][:refs].split(" ")
   3154            pending += refs.select { |id| !searched[id] }
   3155 @@ -304,10 +304,10 @@ EOS
   3156      end
   3157  
   3158      if killed
   3159 -      Redwood::log "thread for #{m.id} is killed, ignoring"
   3160 +      Sup::log "thread for #{m.id} is killed, ignoring"
   3161        false
   3162      else
   3163 -      Redwood::log "ran #{num_queries} queries to build thread of #{messages.size + 1} messages for #{m.id}: #{m.subj}" if num_queries > 0
   3164 +      Sup::log "ran #{num_queries} queries to build thread of #{messages.size + 1} messages for #{m.id}: #{m.subj}" if num_queries > 0
   3165        messages.each { |mid, builder| yield mid, builder }
   3166        true
   3167      end
   3168 @@ -357,12 +357,12 @@ EOS
   3169      end
   3170      q.add_query Ferret::Search::TermQuery.new(:label, "spam"), :must_not
   3171      
   3172 -    Redwood::log "contact search: #{q}"
   3173 +    Sup::log "contact search: #{q}"
   3174      contacts = {}
   3175      num = h[:num] || 20
   3176      @index.search_each(q, :sort => "date DESC", :limit => :all) do |docid, score|
   3177        break if contacts.size >= num
   3178 -      #Redwood::log "got message #{docid} to: #{@index[docid][:to].inspect} and from: #{@index[docid][:from].inspect}"
   3179 +      #Sup::log "got message #{docid} to: #{@index[docid][:to].inspect} and from: #{@index[docid][:from].inspect}"
   3180        f = @index[docid][:from]
   3181        t = @index[docid][:to]
   3182  
   3183 @@ -376,8 +376,8 @@ EOS
   3184      contacts.keys.compact
   3185    end
   3186  
   3187 -  def load_sources fn=Redwood::SOURCE_FN
   3188 -    source_array = (Redwood::load_yaml_obj(fn) || []).map { |o| Recoverable.new o }
   3189 +  def load_sources fn=Sup::SOURCE_FN
   3190 +    source_array = (Sup::load_yaml_obj(fn) || []).map { |o| Recoverable.new o }
   3191      @sources = Hash[*(source_array).map { |s| [s.id, s] }.flatten]
   3192      @sources_dirty = false
   3193    end
   3194 @@ -405,7 +405,7 @@ protected
   3195      ## the string with Ferret, and return the resulting query object.
   3196  
   3197      norms = @qparser.parse(s).to_s
   3198 -    Redwood::log "normalized #{s.inspect} to #{norms.inspect}" unless s == norms
   3199 +    Sup::log "normalized #{s.inspect} to #{norms.inspect}" unless s == norms
   3200  
   3201      subs = norms.gsub(/\b(to|from):(\S+)\b/) do
   3202        field, name = $1, $2
   3203 @@ -460,13 +460,13 @@ protected
   3204          if realdate
   3205            case field
   3206            when "after"
   3207 -            Redwood::log "chronic: translated #{field}:#{datestr} to #{realdate.end}"
   3208 +            Sup::log "chronic: translated #{field}:#{datestr} to #{realdate.end}"
   3209              "date:(>= #{sprintf "%012d", realdate.end.to_i})"
   3210            when "before"
   3211 -            Redwood::log "chronic: translated #{field}:#{datestr} to #{realdate.begin}"
   3212 +            Sup::log "chronic: translated #{field}:#{datestr} to #{realdate.begin}"
   3213              "date:(<= #{sprintf "%012d", realdate.begin.to_i})"
   3214            else
   3215 -            Redwood::log "chronic: translated #{field}:#{datestr} to #{realdate}"
   3216 +            Sup::log "chronic: translated #{field}:#{datestr} to #{realdate}"
   3217              "date:(<= #{sprintf "%012d", realdate.end.to_i}) date:(>= #{sprintf "%012d", realdate.begin.to_i})"
   3218            end
   3219          else
   3220 @@ -477,7 +477,7 @@ protected
   3221        subs = nil if chronic_failure
   3222      end
   3223      
   3224 -    Redwood::log "translated #{norms.inspect} to #{subs.inspect}" unless subs == norms
   3225 +    Sup::log "translated #{norms.inspect} to #{subs.inspect}" unless subs == norms
   3226      if subs
   3227        [@qparser.parse(subs), extraopts]
   3228      else
   3229 @@ -505,14 +505,14 @@ protected
   3230      query
   3231    end
   3232  
   3233 -  def save_sources fn=Redwood::SOURCE_FN
   3234 +  def save_sources fn=Sup::SOURCE_FN
   3235      if @sources_dirty || @sources.any? { |id, s| s.dirty? }
   3236        bakfn = fn + ".bak"
   3237        if File.exists? fn
   3238          File.chmod 0600, fn
   3239          FileUtils.mv fn, bakfn, :force => true unless File.exists?(bakfn) && File.size(fn) == 0
   3240        end
   3241 -      Redwood::save_yaml_obj @sources.values.sort_by { |s| s.id.to_i }, fn, true
   3242 +      Sup::save_yaml_obj @sources.values.sort_by { |s| s.id.to_i }, fn, true
   3243        File.chmod 0600, fn
   3244      end
   3245      @sources_dirty = false
   3246 diff --git a/lib/sup/keymap.rb b/lib/sup/keymap.rb
   3247 index 3176415..d05be92 100644
   3248 --- a/lib/sup/keymap.rb
   3249 +++ b/lib/sup/keymap.rb
   3250 @@ -1,4 +1,4 @@
   3251 -module Redwood
   3252 +module Sup
   3253  
   3254  class Keymap
   3255    def initialize
   3256 diff --git a/lib/sup/label.rb b/lib/sup/label.rb
   3257 index 4afc0f9..8d689fe 100644
   3258 --- a/lib/sup/label.rb
   3259 +++ b/lib/sup/label.rb
   3260 @@ -1,4 +1,4 @@
   3261 -module Redwood
   3262 +module Sup
   3263  
   3264  class LabelManager
   3265    include Singleton
   3266 diff --git a/lib/sup/logger.rb b/lib/sup/logger.rb
   3267 index ebdeebe..6fc60ba 100644
   3268 --- a/lib/sup/logger.rb
   3269 +++ b/lib/sup/logger.rb
   3270 @@ -1,4 +1,4 @@
   3271 -module Redwood
   3272 +module Sup
   3273  
   3274  class Logger
   3275    @@instance = nil
   3276 diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb
   3277 index 7b85383..c03f1d5 100644
   3278 --- a/lib/sup/maildir.rb
   3279 +++ b/lib/sup/maildir.rb
   3280 @@ -1,7 +1,7 @@
   3281  require 'rmail'
   3282  require 'uri'
   3283  
   3284 -module Redwood
   3285 +module Sup
   3286  
   3287  ## Maildir doesn't provide an ordered unique id, which is what Sup
   3288  ## requires to be really useful. So we must maintain, in memory, a
   3289 diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb
   3290 index 0ce52fe..19302be 100644
   3291 --- a/lib/sup/mbox.rb
   3292 +++ b/lib/sup/mbox.rb
   3293 @@ -3,7 +3,7 @@ require "sup/mbox/ssh-file"
   3294  require "sup/mbox/ssh-loader"
   3295  require "sup/rfc2047"
   3296  
   3297 -module Redwood
   3298 +module Sup
   3299  
   3300  ## some utility functions. actually these are not mbox-specific at all
   3301  ## and should be moved somewhere else.
   3302 @@ -58,7 +58,7 @@ module MBox
   3303          begin
   3304            Rfc2047.decode_to $encoding, v
   3305          rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::IllegalSequence => e
   3306 -          Redwood::log "warning: error decoding RFC 2047 header (#{e.class.name}): #{e.message}"
   3307 +          Sup::log "warning: error decoding RFC 2047 header (#{e.class.name}): #{e.message}"
   3308            v
   3309          end
   3310      end
   3311 diff --git a/lib/sup/mbox/loader.rb b/lib/sup/mbox/loader.rb
   3312 index a66d7b9..92220c2 100644
   3313 --- a/lib/sup/mbox/loader.rb
   3314 +++ b/lib/sup/mbox/loader.rb
   3315 @@ -1,7 +1,7 @@
   3316  require 'rmail'
   3317  require 'uri'
   3318  
   3319 -module Redwood
   3320 +module Sup
   3321  module MBox
   3322  
   3323  class Loader < Source
   3324 diff --git a/lib/sup/mbox/ssh-file.rb b/lib/sup/mbox/ssh-file.rb
   3325 index d474636..ca87d63 100644
   3326 --- a/lib/sup/mbox/ssh-file.rb
   3327 +++ b/lib/sup/mbox/ssh-file.rb
   3328 @@ -1,6 +1,6 @@
   3329  require 'net/ssh'
   3330  
   3331 -module Redwood
   3332 +module Sup
   3333  module MBox
   3334  
   3335  class SSHFileError < StandardError; end
   3336 @@ -18,7 +18,7 @@ class SSHFileError < StandardError; end
   3337  
   3338  ## debugging TODO: remove me
   3339  def debug s
   3340 -  Redwood::log s
   3341 +  Sup::log s
   3342  end
   3343  module_function :debug
   3344  
   3345 @@ -154,7 +154,7 @@ private
   3346    ## TODO: share this code with imap
   3347    def say s
   3348      @say_id = BufferManager.say s, @say_id if BufferManager.instantiated?
   3349 -    Redwood::log s
   3350 +    Sup::log s
   3351    end
   3352  
   3353    def shutup
   3354 diff --git a/lib/sup/mbox/ssh-loader.rb b/lib/sup/mbox/ssh-loader.rb
   3355 index e422a48..f4c163c 100644
   3356 --- a/lib/sup/mbox/ssh-loader.rb
   3357 +++ b/lib/sup/mbox/ssh-loader.rb
   3358 @@ -1,6 +1,6 @@
   3359  require 'net/ssh'
   3360  
   3361 -module Redwood
   3362 +module Sup
   3363  module MBox
   3364  
   3365  class SSHLoader < Source
   3366 diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb
   3367 index 0606395..9bbad7d 100644
   3368 --- a/lib/sup/message-chunks.rb
   3369 +++ b/lib/sup/message-chunks.rb
   3370 @@ -39,7 +39,7 @@ class Tempfile
   3371  end
   3372  
   3373  
   3374 -module Redwood
   3375 +module Sup
   3376  module Chunk
   3377    class Attachment
   3378      HookManager.register "mime-decode", <<EOS
   3379 @@ -117,7 +117,7 @@ EOS
   3380      def viewable?; @lines.nil? end
   3381      def view_default! path
   3382        cmd = "/usr/bin/run-mailcap --action=view '#{@content_type}:#{path}' > /dev/null 2> /dev/null"
   3383 -      Redwood::log "running: #{cmd.inspect}"
   3384 +      Sup::log "running: #{cmd.inspect}"
   3385        system cmd
   3386        $? == 0
   3387      end
   3388 diff --git a/lib/sup/message.rb b/lib/sup/message.rb
   3389 index 42a58fa..1920633 100644
   3390 --- a/lib/sup/message.rb
   3391 +++ b/lib/sup/message.rb
   3392 @@ -1,7 +1,7 @@
   3393  require 'time'
   3394  require 'iconv'
   3395  
   3396 -module Redwood
   3397 +module Sup
   3398  
   3399  class MessageFormatError < StandardError; end
   3400  
   3401 @@ -83,8 +83,8 @@ class Message
   3402          PersonManager.person_for fakename
   3403        end
   3404  
   3405 -    Redwood::log "faking message-id for message from #@from: #{id}" if fakeid
   3406 -    Redwood::log "faking from for message #@id: #{fakename}" if fakename
   3407 +    Sup::log "faking message-id for message from #@from: #{id}" if fakeid
   3408 +    Sup::log "faking from for message #@id: #{fakename}" if fakename
   3409  
   3410      date = header["date"]
   3411      @date =
   3412 @@ -98,7 +98,7 @@ class Message
   3413            raise MessageFormatError, "unparsable date #{header['date']}: #{e.message}"
   3414          end
   3415        else
   3416 -        Redwood::log "faking date header for #{@id}"
   3417 +        Sup::log "faking date header for #{@id}"
   3418          Time.now
   3419        end
   3420  
   3421 @@ -200,11 +200,11 @@ class Message
   3422            parse_header @source.load_header(@source_info)
   3423            message_to_chunks @source.load_message(@source_info)
   3424          rescue SourceError, SocketError, MessageFormatError => e
   3425 -          Redwood::log "problem getting messages from #{@source}: #{e.message}"
   3426 +          Sup::log "problem getting messages from #{@source}: #{e.message}"
   3427            ## we need force_to_top here otherwise this window will cover
   3428            ## up the error message one
   3429            @source.error ||= e
   3430 -          Redwood::report_broken_sources :force_to_top => true
   3431 +          Sup::report_broken_sources :force_to_top => true
   3432            [Chunk::Text.new(error_message(e.message).split("\n"))]
   3433          end
   3434        end
   3435 @@ -234,9 +234,9 @@ EOS
   3436      begin
   3437        yield
   3438      rescue SourceError => e
   3439 -      Redwood::log "problem getting messages from #{@source}: #{e.message}"
   3440 +      Sup::log "problem getting messages from #{@source}: #{e.message}"
   3441        @source.error ||= e
   3442 -      Redwood::report_broken_sources :force_to_top => true
   3443 +      Sup::report_broken_sources :force_to_top => true
   3444        error_message e.message
   3445      end
   3446    end
   3447 @@ -307,25 +307,25 @@ private
   3448  
   3449    def multipart_signed_to_chunks m
   3450      if m.body.size != 2
   3451 -      Redwood::log "warning: multipart/signed with #{m.body.size} parts (expecting 2)"
   3452 +      Sup::log "warning: multipart/signed with #{m.body.size} parts (expecting 2)"
   3453        return
   3454      end
   3455  
   3456      payload, signature = m.body
   3457      if signature.multipart?
   3458 -      Redwood::log "warning: multipart/signed with payload multipart #{payload.multipart?} and signature multipart #{signature.multipart?}"
   3459 +      Sup::log "warning: multipart/signed with payload multipart #{payload.multipart?} and signature multipart #{signature.multipart?}"
   3460        return
   3461      end
   3462  
   3463      ## this probably will never happen
   3464      if payload.header.content_type == "application/pgp-signature"
   3465 -      Redwood::log "warning: multipart/signed with payload content type #{payload.header.content_type}"
   3466 +      Sup::log "warning: multipart/signed with payload content type #{payload.header.content_type}"
   3467        return
   3468      end
   3469  
   3470      if signature.header.content_type != "application/pgp-signature"
   3471        ## unknown signature type; just ignore.
   3472 -      #Redwood::log "warning: multipart/signed with signature content type #{signature.header.content_type}"
   3473 +      #Sup::log "warning: multipart/signed with signature content type #{signature.header.content_type}"
   3474        return
   3475      end
   3476  
   3477 @@ -334,23 +334,23 @@ private
   3478  
   3479    def multipart_encrypted_to_chunks m
   3480      if m.body.size != 2
   3481 -      Redwood::log "warning: multipart/encrypted with #{m.body.size} parts (expecting 2)"
   3482 +      Sup::log "warning: multipart/encrypted with #{m.body.size} parts (expecting 2)"
   3483        return
   3484      end
   3485  
   3486      control, payload = m.body
   3487      if control.multipart?
   3488 -      Redwood::log "warning: multipart/encrypted with control multipart #{control.multipart?} and payload multipart #{payload.multipart?}"
   3489 +      Sup::log "warning: multipart/encrypted with control multipart #{control.multipart?} and payload multipart #{payload.multipart?}"
   3490        return
   3491      end
   3492  
   3493      if payload.header.content_type != "application/octet-stream"
   3494 -      Redwood::log "warning: multipart/encrypted with payload content type #{payload.header.content_type}"
   3495 +      Sup::log "warning: multipart/encrypted with payload content type #{payload.header.content_type}"
   3496        return
   3497      end
   3498  
   3499      if control.header.content_type != "application/pgp-encrypted"
   3500 -      Redwood::log "warning: multipart/encrypted with control content type #{signature.header.content_type}"
   3501 +      Sup::log "warning: multipart/encrypted with control content type #{signature.header.content_type}"
   3502        return
   3503      end
   3504  
   3505 @@ -421,7 +421,7 @@ private
   3506        return body unless charset
   3507        Iconv.iconv($encoding + "//IGNORE", charset, body + " ").join[0 .. -2]
   3508      rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::IllegalSequence, MessageFormatError => e
   3509 -      Redwood::log "warning: error (#{e.class.name}) decoding message body from #{charset}: #{e.message}"
   3510 +      Sup::log "warning: error (#{e.class.name}) decoding message body from #{charset}: #{e.message}"
   3511        File.open("sup-unable-to-decode.txt", "w") { |f| f.write body }
   3512        body
   3513      end
   3514 diff --git a/lib/sup/mode.rb b/lib/sup/mode.rb
   3515 index 9900dc3..0808c6b 100644
   3516 --- a/lib/sup/mode.rb
   3517 +++ b/lib/sup/mode.rb
   3518 @@ -1,4 +1,4 @@
   3519 -module Redwood
   3520 +module Sup
   3521  
   3522  class Mode
   3523    attr_accessor :buffer
   3524 @@ -91,10 +91,10 @@ EOS
   3525        unless err.empty?
   3526          message = err.first.read
   3527          if message =~ /^\s*$/
   3528 -          Redwood::log "error running #{command} (but no error message)"
   3529 +          Sup::log "error running #{command} (but no error message)"
   3530            BufferManager.flash "Error running #{command}!"
   3531          else
   3532 -          Redwood::log "error running #{command}: #{message}"
   3533 +          Sup::log "error running #{command}: #{message}"
   3534            BufferManager.flash "Error: #{message}"
   3535          end
   3536          return
   3537 diff --git a/lib/sup/modes/buffer-list-mode.rb b/lib/sup/modes/buffer-list-mode.rb
   3538 index 91b2fac..e193af7 100644
   3539 --- a/lib/sup/modes/buffer-list-mode.rb
   3540 +++ b/lib/sup/modes/buffer-list-mode.rb
   3541 @@ -1,4 +1,4 @@
   3542 -module Redwood
   3543 +module Sup
   3544  
   3545  class BufferListMode < LineCursorMode
   3546    register_keymap do |k|
   3547 diff --git a/lib/sup/modes/completion-mode.rb b/lib/sup/modes/completion-mode.rb
   3548 index 3cb2fad..06cd5dc 100644
   3549 --- a/lib/sup/modes/completion-mode.rb
   3550 +++ b/lib/sup/modes/completion-mode.rb
   3551 @@ -1,4 +1,4 @@
   3552 -module Redwood
   3553 +module Sup
   3554  
   3555  class CompletionMode < ScrollMode
   3556    INTERSTITIAL = "  "
   3557 diff --git a/lib/sup/modes/compose-mode.rb b/lib/sup/modes/compose-mode.rb
   3558 index f063b92..c3ace01 100644
   3559 --- a/lib/sup/modes/compose-mode.rb
   3560 +++ b/lib/sup/modes/compose-mode.rb
   3561 @@ -1,4 +1,4 @@
   3562 -module Redwood
   3563 +module Sup
   3564  
   3565  class ComposeMode < EditMessageMode
   3566    def initialize opts={}
   3567 diff --git a/lib/sup/modes/contact-list-mode.rb b/lib/sup/modes/contact-list-mode.rb
   3568 index f7b3ccb..e5bed77 100644
   3569 --- a/lib/sup/modes/contact-list-mode.rb
   3570 +++ b/lib/sup/modes/contact-list-mode.rb
   3571 @@ -1,4 +1,4 @@
   3572 -module Redwood
   3573 +module Sup
   3574  
   3575  module CanAliasContacts
   3576    def alias_contact p
   3577 @@ -98,7 +98,7 @@ class ContactListMode < LineCursorMode
   3578    end
   3579  
   3580    def load_in_background
   3581 -    Redwood::reporting_thread("contact manager load in bg") do
   3582 +    Sup::reporting_thread("contact manager load in bg") do
   3583        load
   3584        update
   3585        BufferManager.draw_screen
   3586 diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb
   3587 index 6a7f273..e2e1656 100644
   3588 --- a/lib/sup/modes/edit-message-mode.rb
   3589 +++ b/lib/sup/modes/edit-message-mode.rb
   3590 @@ -3,7 +3,7 @@ require 'socket' # just for gethostname!
   3591  require 'pathname'
   3592  require 'rmail'
   3593  
   3594 -module Redwood
   3595 +module Sup
   3596  
   3597  class SendmailCommandFailed < StandardError; end
   3598  
   3599 @@ -285,7 +285,7 @@ protected
   3600        BufferManager.flash "Message sent!"
   3601        true
   3602      rescue SystemCallError, SendmailCommandFailed, CryptoManager::Error => e
   3603 -      Redwood::log "Problem sending mail: #{e.message}"
   3604 +      Sup::log "Problem sending mail: #{e.message}"
   3605        BufferManager.flash "Problem sending mail: #{e.message}"
   3606        false
   3607      end
   3608 @@ -335,7 +335,7 @@ protected
   3609      end
   3610      m.header["Date"] = date.rfc2822
   3611      m.header["Message-Id"] = @message_id
   3612 -    m.header["User-Agent"] = "Sup/#{Redwood::VERSION}"
   3613 +    m.header["User-Agent"] = "Sup/#{Sup::VERSION}"
   3614      m
   3615    end
   3616  
   3617 @@ -355,7 +355,7 @@ EOS
   3618  Mime-Version: 1.0
   3619  Content-Type: text/plain; charset=us-ascii
   3620  Content-Disposition: inline
   3621 -User-Agent: Redwood/#{Redwood::VERSION}
   3622 +User-Agent: Sup/#{Sup::VERSION}
   3623  EOS
   3624      end
   3625  
   3626 diff --git a/lib/sup/modes/file-browser-mode.rb b/lib/sup/modes/file-browser-mode.rb
   3627 index b49f3f4..11c7e26 100644
   3628 --- a/lib/sup/modes/file-browser-mode.rb
   3629 +++ b/lib/sup/modes/file-browser-mode.rb
   3630 @@ -1,6 +1,6 @@
   3631  require 'pathname'
   3632  
   3633 -module Redwood
   3634 +module Sup
   3635  
   3636  ## meant to be spawned via spawn_modal!
   3637  class FileBrowserMode < LineCursorMode
   3638 diff --git a/lib/sup/modes/forward-mode.rb b/lib/sup/modes/forward-mode.rb
   3639 index 147efb6..3080a6f 100644
   3640 --- a/lib/sup/modes/forward-mode.rb
   3641 +++ b/lib/sup/modes/forward-mode.rb
   3642 @@ -1,4 +1,4 @@
   3643 -module Redwood
   3644 +module Sup
   3645  
   3646  class ForwardMode < EditMessageMode
   3647    ## TODO: share some of this with reply-mode
   3648 diff --git a/lib/sup/modes/help-mode.rb b/lib/sup/modes/help-mode.rb
   3649 index b98f131..4244950 100644
   3650 --- a/lib/sup/modes/help-mode.rb
   3651 +++ b/lib/sup/modes/help-mode.rb
   3652 @@ -1,4 +1,4 @@
   3653 -module Redwood
   3654 +module Sup
   3655  
   3656  class HelpMode < TextMode
   3657    def initialize mode, global_keymap
   3658 diff --git a/lib/sup/modes/inbox-mode.rb b/lib/sup/modes/inbox-mode.rb
   3659 index a2de13f..e48db6e 100644
   3660 --- a/lib/sup/modes/inbox-mode.rb
   3661 +++ b/lib/sup/modes/inbox-mode.rb
   3662 @@ -1,6 +1,6 @@
   3663  require 'thread'
   3664  
   3665 -module Redwood
   3666 +module Sup
   3667  
   3668  class InboxMode < ThreadIndexMode
   3669    register_keymap do |k|
   3670 diff --git a/lib/sup/modes/label-list-mode.rb b/lib/sup/modes/label-list-mode.rb
   3671 index 514e9c4..64221eb 100644
   3672 --- a/lib/sup/modes/label-list-mode.rb
   3673 +++ b/lib/sup/modes/label-list-mode.rb
   3674 @@ -1,4 +1,4 @@
   3675 -module Redwood
   3676 +module Sup
   3677  
   3678  class LabelListMode < LineCursorMode
   3679    register_keymap do |k|
   3680 @@ -61,7 +61,7 @@ protected
   3681      @labels = []
   3682      counts.map do |label, string, total, unread|
   3683        if total == 0 && !LabelManager::RESERVED_LABELS.include?(label)
   3684 -        Redwood::log "no hits for label #{label}, deleting"
   3685 +        Sup::log "no hits for label #{label}, deleting"
   3686          LabelManager.delete label
   3687          next
   3688        end
   3689 diff --git a/lib/sup/modes/label-search-results-mode.rb b/lib/sup/modes/label-search-results-mode.rb
   3690 index af6831c..6d478d5 100644
   3691 --- a/lib/sup/modes/label-search-results-mode.rb
   3692 +++ b/lib/sup/modes/label-search-results-mode.rb
   3693 @@ -1,4 +1,4 @@
   3694 -module Redwood
   3695 +module Sup
   3696  
   3697  class LabelSearchResultsMode < ThreadIndexMode
   3698    def initialize labels
   3699 diff --git a/lib/sup/modes/line-cursor-mode.rb b/lib/sup/modes/line-cursor-mode.rb
   3700 index 246f2b5..51c1cda 100644
   3701 --- a/lib/sup/modes/line-cursor-mode.rb
   3702 +++ b/lib/sup/modes/line-cursor-mode.rb
   3703 @@ -1,4 +1,4 @@
   3704 -module Redwood
   3705 +module Sup
   3706  
   3707  ## extends ScrollMode to have a line-based cursor.
   3708  class LineCursorMode < ScrollMode
   3709 diff --git a/lib/sup/modes/log-mode.rb b/lib/sup/modes/log-mode.rb
   3710 index de16b5e..60f28a8 100644
   3711 --- a/lib/sup/modes/log-mode.rb
   3712 +++ b/lib/sup/modes/log-mode.rb
   3713 @@ -1,4 +1,4 @@
   3714 -module Redwood
   3715 +module Sup
   3716  
   3717  class LogMode < TextMode
   3718    register_keymap do |k|
   3719 diff --git a/lib/sup/modes/person-search-results-mode.rb b/lib/sup/modes/person-search-results-mode.rb
   3720 index fc09126..bc46c71 100644
   3721 --- a/lib/sup/modes/person-search-results-mode.rb
   3722 +++ b/lib/sup/modes/person-search-results-mode.rb
   3723 @@ -1,4 +1,4 @@
   3724 -module Redwood
   3725 +module Sup
   3726  
   3727  class PersonSearchResultsMode < ThreadIndexMode
   3728    def initialize people
   3729 diff --git a/lib/sup/modes/poll-mode.rb b/lib/sup/modes/poll-mode.rb
   3730 index 5849f3e..0e90643 100644
   3731 --- a/lib/sup/modes/poll-mode.rb
   3732 +++ b/lib/sup/modes/poll-mode.rb
   3733 @@ -1,4 +1,4 @@
   3734 -module Redwood
   3735 +module Sup
   3736  
   3737  class PollMode < LogMode
   3738    def initialize
   3739 diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb
   3740 index e7b2929..26549e4 100644
   3741 --- a/lib/sup/modes/reply-mode.rb
   3742 +++ b/lib/sup/modes/reply-mode.rb
   3743 @@ -1,4 +1,4 @@
   3744 -module Redwood
   3745 +module Sup
   3746  
   3747  class ReplyMode < EditMessageMode
   3748    REPLY_TYPES = [:sender, :recipient, :list, :all, :user]
   3749 diff --git a/lib/sup/modes/resume-mode.rb b/lib/sup/modes/resume-mode.rb
   3750 index b1c69fc..9f08cfd 100644
   3751 --- a/lib/sup/modes/resume-mode.rb
   3752 +++ b/lib/sup/modes/resume-mode.rb
   3753 @@ -1,4 +1,4 @@
   3754 -module Redwood
   3755 +module Sup
   3756  
   3757  class ResumeMode < EditMessageMode
   3758    def initialize m
   3759 diff --git a/lib/sup/modes/scroll-mode.rb b/lib/sup/modes/scroll-mode.rb
   3760 index 219a4ce..d79754a 100644
   3761 --- a/lib/sup/modes/scroll-mode.rb
   3762 +++ b/lib/sup/modes/scroll-mode.rb
   3763 @@ -1,4 +1,4 @@
   3764 -module Redwood
   3765 +module Sup
   3766  
   3767  class ScrollMode < Mode
   3768    ## we define topline and botline as the top and bottom lines of any
   3769 diff --git a/lib/sup/modes/search-results-mode.rb b/lib/sup/modes/search-results-mode.rb
   3770 index f64a227..3609762 100644
   3771 --- a/lib/sup/modes/search-results-mode.rb
   3772 +++ b/lib/sup/modes/search-results-mode.rb
   3773 @@ -1,4 +1,4 @@
   3774 -module Redwood
   3775 +module Sup
   3776  
   3777  class SearchResultsMode < ThreadIndexMode
   3778    def initialize qobj, qopts = nil
   3779 diff --git a/lib/sup/modes/text-mode.rb b/lib/sup/modes/text-mode.rb
   3780 index 273c028..3ae9935 100644
   3781 --- a/lib/sup/modes/text-mode.rb
   3782 +++ b/lib/sup/modes/text-mode.rb
   3783 @@ -1,4 +1,4 @@
   3784 -module Redwood
   3785 +module Sup
   3786  
   3787  class TextMode < ScrollMode
   3788    attr_reader :text
   3789 diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
   3790 index b13729d..14e1ca6 100644
   3791 --- a/lib/sup/modes/thread-index-mode.rb
   3792 +++ b/lib/sup/modes/thread-index-mode.rb
   3793 @@ -1,4 +1,4 @@
   3794 -module Redwood
   3795 +module Sup
   3796  
   3797  ## subclasses should implement:
   3798  ## - is_relevant?
   3799 @@ -79,7 +79,7 @@ EOS
   3800    def select t=nil, when_done=nil
   3801      t ||= cursor_thread or return
   3802  
   3803 -    Redwood::reporting_thread("load messages for thread-view-mode") do
   3804 +    Sup::reporting_thread("load messages for thread-view-mode") do
   3805        num = t.size
   3806        message = "Loading #{num.pluralize 'message body'}..."
   3807        BufferManager.say(message) do |sid|
   3808 @@ -448,7 +448,7 @@ EOS
   3809  
   3810    def load_n_threads_background n=LOAD_MORE_THREAD_NUM, opts={}
   3811      return if @load_thread # todo: wrap in mutex
   3812 -    @load_thread = Redwood::reporting_thread("load threads for thread-index-mode") do
   3813 +    @load_thread = Sup::reporting_thread("load threads for thread-index-mode") do
   3814        num = load_n_threads n, opts
   3815        opts[:when_done].call(num) if opts[:when_done]
   3816        @load_thread = nil
   3817 diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
   3818 index 961fc5d..766cea5 100644
   3819 --- a/lib/sup/modes/thread-view-mode.rb
   3820 +++ b/lib/sup/modes/thread-view-mode.rb
   3821 @@ -1,5 +1,5 @@
   3822  require 'open3'
   3823 -module Redwood
   3824 +module Sup
   3825  
   3826  class ThreadViewMode < LineCursorMode
   3827    ## this holds all info we need to lay out a message
   3828 diff --git a/lib/sup/person.rb b/lib/sup/person.rb
   3829 index fb58f23..1995059 100644
   3830 --- a/lib/sup/person.rb
   3831 +++ b/lib/sup/person.rb
   3832 @@ -1,4 +1,4 @@
   3833 -module Redwood
   3834 +module Sup
   3835  
   3836  class PersonManager
   3837    include Singleton
   3838 diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb
   3839 index 2dd9150..68f1171 100644
   3840 --- a/lib/sup/poll.rb
   3841 +++ b/lib/sup/poll.rb
   3842 @@ -1,6 +1,6 @@
   3843  require 'thread'
   3844  
   3845 -module Redwood
   3846 +module Sup
   3847  
   3848  class PollManager
   3849    include Singleton
   3850 @@ -64,7 +64,7 @@ EOS
   3851    end
   3852  
   3853    def start
   3854 -    @thread = Redwood::reporting_thread("periodic poll") do
   3855 +    @thread = Sup::reporting_thread("periodic poll") do
   3856        while true
   3857          sleep DELAY / 2
   3858          poll if @last_poll.nil? || (Time.now - @last_poll) >= DELAY
   3859 @@ -88,8 +88,8 @@ EOS
   3860          begin
   3861            yield "Loading from #{source}... " unless source.done? || source.has_errors?
   3862          rescue SourceError => e
   3863 -          Redwood::log "problem getting messages from #{source}: #{e.message}"
   3864 -          Redwood::report_broken_sources :force_to_top => true
   3865 +          Sup::log "problem getting messages from #{source}: #{e.message}"
   3866 +          Sup::report_broken_sources :force_to_top => true
   3867            next
   3868          end
   3869  
   3870 @@ -140,7 +140,7 @@ EOS
   3871        
   3872        source.each do |offset, labels|
   3873          if source.has_errors?
   3874 -          Redwood::log "error loading messages from #{source}: #{source.error.message}"
   3875 +          Sup::log "error loading messages from #{source}: #{source.error.message}"
   3876            return
   3877          end
   3878        
   3879 @@ -160,12 +160,12 @@ EOS
   3880            Index.sync_message m, docid, entry
   3881            UpdateManager.relay self, :added, m unless entry
   3882          rescue MessageFormatError => e
   3883 -          Redwood::log "ignoring erroneous message at #{source}##{offset}: #{e.message}"
   3884 +          Sup::log "ignoring erroneous message at #{source}##{offset}: #{e.message}"
   3885          end
   3886        end
   3887      rescue SourceError => e
   3888 -      Redwood::log "problem getting messages from #{source}: #{e.message}"
   3889 -      Redwood::report_broken_sources :force_to_top => true
   3890 +      Sup::log "problem getting messages from #{source}: #{e.message}"
   3891 +      Sup::report_broken_sources :force_to_top => true
   3892      end
   3893    end
   3894  end
   3895 diff --git a/lib/sup/sent.rb b/lib/sup/sent.rb
   3896 index 9c802d9..03b9e2a 100644
   3897 --- a/lib/sup/sent.rb
   3898 +++ b/lib/sup/sent.rb
   3899 @@ -1,4 +1,4 @@
   3900 -module Redwood
   3901 +module Sup
   3902  
   3903  class SentManager
   3904    include Singleton
   3905 @@ -34,7 +34,7 @@ class SentLoader < MBox::Loader
   3906    yaml_properties :cur_offset
   3907  
   3908    def initialize cur_offset=0
   3909 -    @filename = Redwood::SENT_FN
   3910 +    @filename = Sup::SENT_FN
   3911      File.open(@filename, "w") { } unless File.exists? @filename
   3912      super "mbox://" + @filename, cur_offset, true, true
   3913    end
   3914 diff --git a/lib/sup/source.rb b/lib/sup/source.rb
   3915 index 6510aae..e69f816 100644
   3916 --- a/lib/sup/source.rb
   3917 +++ b/lib/sup/source.rb
   3918 @@ -1,4 +1,4 @@
   3919 -module Redwood
   3920 +module Sup
   3921  
   3922  class SourceError < StandardError
   3923    def initialize *a
   3924 diff --git a/lib/sup/suicide.rb b/lib/sup/suicide.rb
   3925 index 98b4346..d84a3b9 100644
   3926 --- a/lib/sup/suicide.rb
   3927 +++ b/lib/sup/suicide.rb
   3928 @@ -1,4 +1,4 @@
   3929 -module Redwood
   3930 +module Sup
   3931  
   3932  class SuicideManager
   3933    include Singleton
   3934 @@ -16,7 +16,7 @@ class SuicideManager
   3935    bool_reader :die
   3936  
   3937    def start
   3938 -    @thread = Redwood::reporting_thread("suicide watch") do
   3939 +    @thread = Sup::reporting_thread("suicide watch") do
   3940        while true
   3941          sleep DELAY
   3942          if File.exists? @fn
   3943 diff --git a/lib/sup/tagger.rb b/lib/sup/tagger.rb
   3944 index 3e72463..b8efa8e 100644
   3945 --- a/lib/sup/tagger.rb
   3946 +++ b/lib/sup/tagger.rb
   3947 @@ -1,4 +1,4 @@
   3948 -module Redwood
   3949 +module Sup
   3950  
   3951  class Tagger
   3952    def initialize mode
   3953 diff --git a/lib/sup/textfield.rb b/lib/sup/textfield.rb
   3954 index 2c52595..1c5a751 100644
   3955 --- a/lib/sup/textfield.rb
   3956 +++ b/lib/sup/textfield.rb
   3957 @@ -1,4 +1,4 @@
   3958 -module Redwood
   3959 +module Sup
   3960  
   3961  ## a fully-functional text field supporting completions, expansions,
   3962  ## history--everything!
   3963 @@ -112,11 +112,11 @@ class TextField
   3964          unless @history.empty?
   3965            value = get_cursed_value
   3966            @i ||= @history.size
   3967 -          #Redwood::log "history before #{@history.inspect}"
   3968 +          #Sup::log "history before #{@history.inspect}"
   3969            @history[@i] = value #unless value =~ /^\s*$/
   3970            @i = (@i + (c == Ncurses::KEY_UP ? -1 : 1)) % @history.size
   3971            @value = @history[@i]
   3972 -          #Redwood::log "history after #{@history.inspect}"
   3973 +          #Sup::log "history after #{@history.inspect}"
   3974            set_cursed_value @value
   3975            Ncurses::Form::REQ_END_FIELD
   3976          end
   3977 diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb
   3978 index 32002c4..a087e2b 100644
   3979 --- a/lib/sup/thread.rb
   3980 +++ b/lib/sup/thread.rb
   3981 @@ -24,7 +24,7 @@
   3982  ## a faked root object tying them all together into one tree
   3983  ## structure.
   3984  
   3985 -module Redwood
   3986 +module Sup
   3987  
   3988  class Thread
   3989    include Enumerable
   3990 diff --git a/lib/sup/update.rb b/lib/sup/update.rb
   3991 index 021b7e1..e7a9983 100644
   3992 --- a/lib/sup/update.rb
   3993 +++ b/lib/sup/update.rb
   3994 @@ -1,4 +1,4 @@
   3995 -module Redwood
   3996 +module Sup
   3997  
   3998  ## Classic listener/broadcaster paradigm. Handles communication between various
   3999  ## parts of Sup.
   4000 diff --git a/test/dummy_source.rb b/test/dummy_source.rb
   4001 index f3afa31..4e84d31 100644
   4002 --- a/test/dummy_source.rb
   4003 +++ b/test/dummy_source.rb
   4004 @@ -5,7 +5,7 @@ require 'stringio'
   4005  require 'rmail'
   4006  require 'uri'
   4007  
   4008 -module Redwood
   4009 +module Sup
   4010  
   4011  class DummySource < Source
   4012  
   4013 diff --git a/test/test_message.rb b/test/test_message.rb
   4014 index c887773..6a3c4a9 100644
   4015 --- a/test/test_message.rb
   4016 +++ b/test/test_message.rb
   4017 @@ -24,7 +24,7 @@ class File
   4018  
   4019  end
   4020  
   4021 -module Redwood
   4022 +module Sup
   4023  
   4024  class TestMessage < Test::Unit::TestCase
   4025    
   4026 @@ -236,10 +236,10 @@ EOS
   4027      # the message, then the non-quoted part, then the two attachments
   4028      assert_equal(4, chunks.length)
   4029  
   4030 -    assert_equal(chunks[0].class, Redwood::Chunk::Quote)
   4031 -    assert_equal(chunks[1].class, Redwood::Chunk::Text)
   4032 -    assert_equal(chunks[2].class, Redwood::Chunk::Attachment)
   4033 -    assert_equal(chunks[3].class, Redwood::Chunk::Attachment)
   4034 +    assert_equal(chunks[0].class, Sup::Chunk::Quote)
   4035 +    assert_equal(chunks[1].class, Sup::Chunk::Text)
   4036 +    assert_equal(chunks[2].class, Sup::Chunk::Attachment)
   4037 +    assert_equal(chunks[3].class, Sup::Chunk::Attachment)
   4038  
   4039      # further testing of chunks will happen in test_message_chunks.rb
   4040      # (possibly not yet implemented)
   4041 -- 
   4042 1.5.3.8
   4043 
   4044 
   4045 From chaos@highprogrammer.com  Thu Feb 14 16:22:01 2008
   4046 From: chaos@highprogrammer.com (Alan De Smet)
   4047 Date: Thu, 14 Feb 2008 15:22:01 -0600
   4048 Subject: [sup-talk] fatal exception: invalid contacts.txt
   4049 Message-ID: <20080214212201.GE7284@alpha.monkeycosm.net>
   4050 
   4051 I'm trying to import a bunch of contacts into sup by directly
   4052 modifying the .sup/contacts.txt file.  Apparently blank lines and
   4053 comments are not welcome.  If the goals of contacts.txt include
   4054 that humans are able to edit it, blank lines and comments are
   4055 helpful and it would be nice if they were allowed.  If that's
   4056 madness, and only software should edit the file, I'd expect an
   4057 error message and more graceful exit.
   4058 
   4059 This is sup v0.4, installed this morning via gem.  It (and
   4060 rubygems) is installed as a user, not root, on a Red Hat
   4061 Enterprise Linux 5 machine.
   4062 
   4063 contents of contacts.txt:
   4064 > alice: Alice <alice at example.com>
   4065 > 
   4066 > bob: Bob <bob at example.com>
   4067 
   4068 Output:
   4069 > [Thu Feb 14 15:17:25 -0600 2008] using character set encoding "UTF-8"
   4070 > [Thu Feb 14 15:17:25 -0600 2008] optional 'chronic' library not found (run 'gem install chronic' to install)
   4071 > [Thu Feb 14 15:17:25 -0600 2008] locking /u/a/d/adesmet/.sup/lock...
   4072 > [Thu Feb 14 15:17:25 -0600 2008] stopped cursing
   4073 > [Thu Feb 14 15:17:25 -0600 2008] oh crap, an exception
   4074 > [Thu Feb 14 15:17:25 -0600 2008] unlocking /u/a/d/adesmet/.sup/lock...
   4075 > ----------------------------------------------------------------
   4076 > I'm very sorry. It seems that an error occurred in Sup. Please
   4077 > accept my sincere apologies. If you don't mind, please send the
   4078 > contents of sup-exception-log.txt and a brief report of the
   4079 > circumstances to sup-talk at rubyforge dot orgs so that I might
   4080 > address this problem. Thank you!
   4081 > 
   4082 > Sincerely,
   4083 > William
   4084 > ----------------------------------------------------------------
   4085 > --- RuntimeError from thread: main
   4086 > can't parse /u/a/d/adesmet/.sup/contacts.txt line "\n"
   4087 > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:18:in `initialize'
   4088 > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:17:in `foreach'
   4089 > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:17:in `initialize'
   4090 > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup.rb:96:in `new'
   4091 > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup.rb:96:in `start'
   4092 > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/bin/sup:113
   4093 > opt/ruby_gem_home/bin/sup:19:in `load'
   4094 > opt/ruby_gem_home/bin/sup:19
   4095 
   4096 
   4097 contents of sup-exception-log.txt:
   4098 > --- RuntimeError from thread: main
   4099 > can't parse /u/a/d/adesmet/.sup/contacts.txt line "\n"
   4100 > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:18:in `initialize'
   4101 > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:17:in `foreach'
   4102 > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:17:in `initialize'
   4103 > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup.rb:96:in `new'
   4104 > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup.rb:96:in `start'
   4105 > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/bin/sup:113
   4106 > opt/ruby_gem_home/bin/sup:19:in `load'
   4107 > opt/ruby_gem_home/bin/sup:19
   4108 
   4109 You get very similar output with a contacts.txt file of:
   4110 > alice: Alice <alice at example.com>
   4111 > # Bob's a nice guy
   4112 > bob: Bob <bob at example.com>
   4113 
   4114 -- 
   4115 Alan De Smet              http://www.highprogrammer.com/alan
   4116 
   4117 From wmorgan-sup@masanjin.net  Sat Feb 16 08:15:49 2008
   4118 From: wmorgan-sup@masanjin.net (William Morgan)
   4119 Date: Sat, 16 Feb 2008 05:15:49 -0800
   4120 Subject: [sup-talk] fatal exception: invalid contacts.txt
   4121 In-Reply-To: <20080214212201.GE7284@alpha.monkeycosm.net>
   4122 References: <20080214212201.GE7284@alpha.monkeycosm.net>
   4123 Message-ID: <1203167697-sup-973@south>
   4124 
   4125 Reformatted excerpts from Alan De Smet's message of 2008-02-14:
   4126 > If the goals of contacts.txt include that humans are able to edit it,
   4127 > blank lines and comments are helpful and it would be nice if they were
   4128 > allowed.
   4129 
   4130 I agree completely. I'll work on a better parser for this. Patches
   4131 welcome, of course!
   4132 
   4133 -- 
   4134 William <wmorgan-sup at masanjin.net>
   4135 
   4136 From wmorgan-sup@masanjin.net  Sat Feb 16 08:21:52 2008
   4137 From: wmorgan-sup@masanjin.net (William Morgan)
   4138 Date: Sat, 16 Feb 2008 05:21:52 -0800
   4139 Subject: [sup-talk] Backspace key?
   4140 In-Reply-To: <1202809606-sup-7188@port-ext6.ensta.fr>
   4141 References: <1202774257.8173.4.camel@localhost.localdomain>
   4142 	<1202809606-sup-7188@port-ext6.ensta.fr>
   4143 Message-ID: <1203168084-sup-5319@south>
   4144 
   4145 Reformatted excerpts from nicolas.pouillard's message of 2008-02-12:
   4146 > I had the same issue, as a workaround hitting CTRL-BACKSPACE worked
   4147 > for me.  However I've made up an ugly change to handle this, perhaps
   4148 > it can help you.
   4149 
   4150 Ugly? It's beautiful! And now in master and next.
   4151 
   4152 -- 
   4153 William <wmorgan-sup at masanjin.net>
   4154 
   4155 From nicolas.pouillard@gmail.com  Sat Feb 16 08:54:55 2008
   4156 From: nicolas.pouillard@gmail.com (Nicolas Pouillard)
   4157 Date: Sat, 16 Feb 2008 14:54:55 +0100
   4158 Subject: [sup-talk] Backspace key?
   4159 In-Reply-To: <1203168084-sup-5319@south>
   4160 References: <1202774257.8173.4.camel@localhost.localdomain>
   4161 	<1202809606-sup-7188@port-ext6.ensta.fr>
   4162 	<1203168084-sup-5319@south>
   4163 Message-ID: <1203170060-sup-2662@ausone.local>
   4164 
   4165 Excerpts from William Morgan's message of Sat Feb 16 14:21:52 +0100 2008:
   4166 > Reformatted excerpts from nicolas.pouillard's message of 2008-02-12:
   4167 > > I had the same issue, as a workaround hitting CTRL-BACKSPACE worked
   4168 > > for me.  However I've made up an ugly change to handle this, perhaps
   4169 > > it can help you.
   4170 > 
   4171 > Ugly? It's beautiful! And now in master and next.
   4172 
   4173 Cool, thanks.
   4174 
   4175 -- 
   4176 Nicolas Pouillard aka Ertai
   4177 -------------- next part --------------
   4178 A non-text attachment was scrubbed...
   4179 Name: signature.asc
   4180 Type: application/pgp-signature
   4181 Size: 194 bytes
   4182 Desc: not available
   4183 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080216/3c286619/attachment.bin 
   4184 
   4185 From wmorgan-sup@masanjin.net  Sat Feb 16 09:27:49 2008
   4186 From: wmorgan-sup@masanjin.net (William Morgan)
   4187 Date: Sat, 16 Feb 2008 06:27:49 -0800
   4188 Subject: [sup-talk] Crash on startup, "wrong id called on nil"
   4189 In-Reply-To: <20080207172725.GA9157@gurski.org>
   4190 References: <20080207172725.GA9157@gurski.org>
   4191 Message-ID: <1203172019-sup-1133@south>
   4192 
   4193 Reformatted excerpts from Michael Gurski's message of 2008-02-07:
   4194 > It's been a while since I launched sup, and updating today from
   4195 > master, I get a crash on startup:
   4196 > 
   4197 > --- RuntimeError from thread: load threads for thread-index-mode wrong
   4198 > id called on nil
   4199 
   4200 Hm, this is a bit tricky. It looks like on of the thread invariants I
   4201 maintain is actually a variant.
   4202 
   4203 Although it would be trivial to just guard against this error, it would
   4204 be better to find out why it's happening. Would you mind applying the
   4205 following patch (just save it to disk and run "git am" on it from your
   4206 sup directory), which will emit some debugging output to send-me.txt
   4207 when you run Sup and this error occurs. Then you can send me that file
   4208 and maybe I can figure out what's going on.
   4209 
   4210 Thanks!
   4211 
   4212 -- 
   4213 William <wmorgan-sup at masanjin.net>
   4214 -------------- next part --------------
   4215 A non-text attachment was scrubbed...
   4216 Name: 0001-add-debugging-code-to-discover-when-Thread-first-ret.patch
   4217 Type: application/octet-stream
   4218 Size: 1416 bytes
   4219 Desc: not available
   4220 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080216/39492fd5/attachment.obj 
   4221 
   4222 From wmorgan-sup@masanjin.net  Sat Feb 16 14:13:47 2008
   4223 From: wmorgan-sup@masanjin.net (William Morgan)
   4224 Date: Sat, 16 Feb 2008 11:13:47 -0800
   4225 Subject: [sup-talk] [PATCH] Changed all (but one) occurrences of redwood
   4226 	to sup.
   4227 In-Reply-To: <1202839827-11975-1-git-send-email-johannes@antiklimax.com>
   4228 References: <1202839827-11975-1-git-send-email-johannes@antiklimax.com>
   4229 Message-ID: <1203188677-sup-4093@south>
   4230 
   4231 Hi Johannes,
   4232 
   4233 Reformatted excerpts from Johannes Martinsson's message of 2008-02-12:
   4234 > * Changed all occurrences of redwood to sup, but left out the one in the
   4235 >   FAQ (What are all these "Red...).
   4236 
   4237 Thanks for this very thorough patch. I'm going to hold off on applying
   4238 it until there's a good time with minimal changes (maybe when things
   4239 have synced up on a release) so as to avoid unnecessary conflicts.
   4240 
   4241 -- 
   4242 William <wmorgan-sup at masanjin.net>
   4243 
   4244 From wmorgan-sup@masanjin.net  Sat Feb 16 14:20:07 2008
   4245 From: wmorgan-sup@masanjin.net (William Morgan)
   4246 Date: Sat, 16 Feb 2008 11:20:07 -0800
   4247 Subject: [sup-talk] [PATCH] Show drafts in red, in thread-index-mode.
   4248 In-Reply-To: <12025587293812-git-send-email-nicolas.pouillard@gmail.com>
   4249 References: <1201112451-sup-5510@south>
   4250 	<12025587293812-git-send-email-nicolas.pouillard@gmail.com>
   4251 Message-ID: <1203189567-sup-6453@south>
   4252 
   4253 Reformatted excerpts from nicolas.pouillard's message of 2008-02-09:
   4254 > This patch would help to think about finishing drafts.
   4255 
   4256 Merged into next. How do people like it? Thanks, Nicolas.
   4257 
   4258 -- 
   4259 William <wmorgan-sup at masanjin.net>
   4260 
   4261 From wmorgan-sup@masanjin.net  Sat Feb 16 15:04:32 2008
   4262 From: wmorgan-sup@masanjin.net (William Morgan)
   4263 Date: Sat, 16 Feb 2008 12:04:32 -0800
   4264 Subject: [sup-talk] [PATCH] first pass at a simple interface to extract
   4265 	URIs from a message
   4266 Message-ID: <1203192249-sup-6640@south>
   4267 
   4268 [forgot to send to list]
   4269 
   4270 Reformatted excerpts from brabuhr's message of 2008-02-08:
   4271 > I was also thinking that it would be better to display the discovered
   4272 > URIs in a list instead of the prompting, but I wasn't sure how to
   4273 > implement that.  Another problem I see is that the extractor is
   4274 > too-greedy and will pull in the punctuation following the URL; so,
   4275 > perhaps the list should allow line editing before calling the view-url
   4276 > hook?
   4277 
   4278 If you want to display them as a list, I would add a mode called
   4279 UrlListMode or something like that which was a subclass of
   4280 LineCursorMode. You can look to BufferListMode as an example, though it
   4281 will be even simpler than that because the content won't ever change.
   4282 
   4283 Spawn an instance of that mode when the user presses 'L', and have
   4284 enter in UrlListMode trigger the URL viewing hook, possibly first
   4285 running it through BufferManager#ask for editing. We can also trim
   4286 trailing punctuation from whatever URI.extract pulls out, since that
   4287 sounds like the common case.
   4288 
   4289 
   4290 -- 
   4291 William <wmorgan-sup at masanjin.net>
   4292 
   4293 From wmorgan-sup@masanjin.net  Sat Feb 16 15:06:32 2008
   4294 From: wmorgan-sup@masanjin.net (William Morgan)
   4295 Date: Sat, 16 Feb 2008 12:06:32 -0800
   4296 Subject: [sup-talk] [PATCH] add URL extraction, listing,
   4297 	and viewing capabilities to ThreadViewMode
   4298 In-Reply-To: <1203192249-sup-6640@south>
   4299 References: <21aa9f0801291923w2df946dbga7832a7345c09a95@mail.gmail.com>
   4300 	<1203192249-sup-6640@south>
   4301 Message-ID: <1203192317-sup-4404@south>
   4302 
   4303 ---
   4304 Here's a "starter patch". Still needs HookManager integration to
   4305 actually view the URLs, and probably some touching up of the extraction
   4306 to trim out punctuation and the like. I found that URI.extract is very
   4307 general unless you restrict it to particular schemata, so this limits it
   4308 to http and ftp only. Feel free to expand/tweak any of it.
   4309 
   4310  lib/sup.rb                        |    1 +
   4311  lib/sup/modes/thread-view-mode.rb |   13 +++++++++++++
   4312  lib/sup/modes/url-list-mode.rb    |   23 +++++++++++++++++++++++
   4313  3 files changed, 37 insertions(+), 0 deletions(-)
   4314  create mode 100644 lib/sup/modes/url-list-mode.rb
   4315 
   4316 diff --git a/lib/sup.rb b/lib/sup.rb
   4317 index cec36b6..3c591e6 100644
   4318 --- a/lib/sup.rb
   4319 +++ b/lib/sup.rb
   4320 @@ -276,6 +276,7 @@ require "sup/modes/buffer-list-mode"
   4321  require "sup/modes/poll-mode"
   4322  require "sup/modes/file-browser-mode"
   4323  require "sup/modes/completion-mode"
   4324 +require "sup/modes/url-list-mode"
   4325  require "sup/sent"
   4326  
   4327  $:.each do |base|
   4328 diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
   4329 index fb324c1..99b7908 100644
   4330 --- a/lib/sup/modes/thread-view-mode.rb
   4331 +++ b/lib/sup/modes/thread-view-mode.rb
   4332 @@ -48,6 +48,7 @@ EOS
   4333      k.add :subscribe_to_list, "Subscribe to/unsubscribe from mailing list", "("
   4334      k.add :unsubscribe_from_list, "Subscribe to/unsubscribe from mailing list", ")"
   4335      k.add :pipe_message, "Pipe message or attachment to a shell command", '|'
   4336 +    k.add :view_urls, "View URLs in message", 'L'
   4337  
   4338      k.add_multi "(a)rchive/(d)elete/mark as (s)pam/mark as u(N)read:", '.' do |kk|
   4339        kk.add :archive_and_kill, "Archive this thread and kill buffer", 'a'
   4340 @@ -118,6 +119,18 @@ EOS
   4341    def lines; @text.length; end
   4342    def [] i; @text[i]; end
   4343  
   4344 +  def view_urls
   4345 +    m = @message_lines[curpos] or return
   4346 +    chunks = m.chunks.select { |c| c.is_a? Chunk::Text }
   4347 +    return if chunks.empty?
   4348 +
   4349 +    lines = chunks.map { |c| c.lines }.flatten.join(" ")
   4350 +    urls = URI.extract(lines, %w(http ftp)).uniq.sort
   4351 +    return if urls.empty?
   4352 +
   4353 +    BufferManager.spawn "URLs for #{m.subj}", UrlListMode.new(urls)
   4354 +  end
   4355 +
   4356    def show_header
   4357      m = @message_lines[curpos] or return
   4358      BufferManager.spawn_unless_exists("Full header for #{m.id}") do
   4359 diff --git a/lib/sup/modes/url-list-mode.rb b/lib/sup/modes/url-list-mode.rb
   4360 new file mode 100644
   4361 index 0000000..f51cd52
   4362 --- /dev/null
   4363 +++ b/lib/sup/modes/url-list-mode.rb
   4364 @@ -0,0 +1,23 @@
   4365 +module Redwood
   4366 +class UrlListMode < LineCursorMode
   4367 +  register_keymap do |k|
   4368 +    k.add :view_url, "View selected URL", :enter
   4369 +  end
   4370 +
   4371 +  def initialize urls
   4372 +    @urls = urls
   4373 +    @text = urls.map { |u| u.to_s }
   4374 +    super()
   4375 +  end
   4376 +
   4377 +  def lines; @text.length end
   4378 +  def [] i; @text[i] end
   4379 +
   4380 +  def view_url
   4381 +    url = BufferManager.ask :url, "URL: ", @urls[curpos].to_s
   4382 +    return unless url
   4383 +    BufferManager.flash "viewing #{url.inspect}"
   4384 +  end
   4385 +end
   4386 +
   4387 +end
   4388 -- 
   4389 1.5.4.rc2.69.g10f0
   4390 
   4391 
   4392 -- 
   4393 William <wmorgan-sup at masanjin.net>
   4394 
   4395 From wmorgan-sup@masanjin.net  Sat Feb 16 15:09:28 2008
   4396 From: wmorgan-sup@masanjin.net (William Morgan)
   4397 Date: Sat, 16 Feb 2008 12:09:28 -0800
   4398 Subject: [sup-talk] the num_inbox_unread variable
   4399 In-Reply-To: <1202508462-sup-2051@clarabella.clarabella>
   4400 References: <1202508462-sup-2051@clarabella.clarabella>
   4401 Message-ID: <1203192425-sup-1910@south>
   4402 
   4403 Reformatted excerpts from Giorgio Lando's message of 2008-02-08:
   4404 > I have a small problem with the num_inbox_unread variable, which is
   4405 > used for example in the status-bar-text.rb: in the number of unread
   4406 > messages the messages belonging to killed threads are included, but,
   4407 > from the name of the variable, I do not think that this is the
   4408 > expected behaviour (they are unread, but they are not the inbox.
   4409 
   4410 Yes, this is a known bug. Killed threads need a little more work.
   4411 
   4412 -- 
   4413 William <wmorgan-sup at masanjin.net>
   4414 
   4415 From daniel@wagner-home.com  Sun Feb 17 17:44:34 2008
   4416 From: daniel@wagner-home.com (Daniel Wagner)
   4417 Date: Sun, 17 Feb 2008 14:44:34 -0800
   4418 Subject: [sup-talk] header parsing
   4419 Message-ID: <1203288077-sup-526@buckwheat>
   4420 
   4421 Hello,
   4422 
   4423 Can sup be a bit more lax on parsing email headers?  In particular, it
   4424 seems to discard any where the ':' is not immediately followed by a ' '.
   4425 I'm not totally sure of the spec, but I couldn't find anything in
   4426 <http://tools.ietf.org/html/rfc2822#section-2.2> that required a space
   4427 after the colon.  (Granted, I did do a very cursory look.)
   4428 
   4429 Thanks,
   4430 ~d
   4431 
   4432 From marko.myllymaki@iki.fi  Mon Feb 18 07:04:58 2008
   4433 From: marko.myllymaki@iki.fi (marko.myllymaki at iki.fi)
   4434 Date: Mon, 18 Feb 2008 14:04:58 +0200
   4435 Subject: [sup-talk] save somewhere else than temp?
   4436 Message-ID: <1203336125-sup-4686@sieni>
   4437 
   4438 Is it possible to change where sup saves the messages under editing? Sup
   4439 just crashed and I lost quite a long message editing in /tmp/ ;)
   4440 
   4441 I'd like the edited messages be saved to .sup/editing/*
   4442 
   4443 
   4444 
   4445 
   4446 
   4447 
   4448 From wmorgan-sup@masanjin.net  Mon Feb 18 09:33:55 2008
   4449 From: wmorgan-sup@masanjin.net (William Morgan)
   4450 Date: Mon, 18 Feb 2008 06:33:55 -0800
   4451 Subject: [sup-talk] header parsing
   4452 In-Reply-To: <1203288077-sup-526@buckwheat>
   4453 References: <1203288077-sup-526@buckwheat>
   4454 Message-ID: <1203345204-sup-9115@south>
   4455 
   4456 Reformatted excerpts from Daniel Wagner's message of 2008-02-17:
   4457 > Can sup be a bit more lax on parsing email headers?  In particular, it
   4458 > seems to discard any where the ':' is not immediately followed by a '
   4459 > '.  I'm not totally sure of the spec, but I couldn't find anything in
   4460 > <http://tools.ietf.org/html/rfc2822#section-2.2> that required a space
   4461 > after the colon.  (Granted, I did do a very cursory look.)
   4462 
   4463 Funny, I encountered this today too. I've merged in a change to next.
   4464 
   4465 -- 
   4466 William <wmorgan-sup at masanjin.net>
   4467 
   4468 From wmorgan-sup@masanjin.net  Mon Feb 18 09:34:42 2008
   4469 From: wmorgan-sup@masanjin.net (William Morgan)
   4470 Date: Mon, 18 Feb 2008 06:34:42 -0800
   4471 Subject: [sup-talk] save somewhere else than temp?
   4472 In-Reply-To: <1203336125-sup-4686@sieni>
   4473 References: <1203336125-sup-4686@sieni>
   4474 Message-ID: <1203345244-sup-338@south>
   4475 
   4476 Reformatted excerpts from Marko Myllym?ki's message of 2008-02-18:
   4477 > Is it possible to change where sup saves the messages under editing?
   4478 > Sup just crashed and I lost quite a long message editing in /tmp/ ;)
   4479 > 
   4480 > I'd like the edited messages be saved to .sup/editing/*
   4481 
   4482 Just because it's in /tmp doesn't mean it's automatically deleted, does
   4483 it? (Except maybe at system startup.)
   4484 
   4485 -- 
   4486 William <wmorgan-sup at masanjin.net>
   4487 
   4488 From marko.myllymaki@iki.fi  Mon Feb 18 10:57:24 2008
   4489 From: marko.myllymaki@iki.fi (marko.myllymaki at iki.fi)
   4490 Date: Mon, 18 Feb 2008 17:57:24 +0200
   4491 Subject: [sup-talk] save somewhere else than temp?
   4492 In-Reply-To: <1203345244-sup-338@south>
   4493 References: <1203336125-sup-4686@sieni> <1203345244-sup-338@south>
   4494 Message-ID: <1203348513-sup-3168@sieni>
   4495 
   4496 Excerpts from William Morgan's message of Mon Feb 18 16:34:42 +0200 2008:
   4497 > Just because it's in /tmp doesn't mean it's automatically deleted, does
   4498 > it? (Except maybe at system startup.)
   4499 
   4500 Yes, it's weird. At what stage does Sup actually delete the edited
   4501 messages (after sending I guess)? I was not able to see any edited
   4502 messages in /tmp after the crashes. Sup crashed after exiting the emacs
   4503 editor. No files in drafts or sent.mbox either...
   4504 
   4505 However I was able to see file 12554-0-sup.compose-mode when I
   4506 intentionally killed Sup, trying to simulate the situation... 
   4507 
   4508 Here is the exception log after one crash if it helps in any way:
   4509 --- Interrupt from thread: main
   4510 
   4511 /var/lib/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:31:in `select'
   4512 /var/lib/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:31:in
   4513 `nonblocking_getch'
   4514 /var/lib/gems/1.8/gems/sup-0.4/bin/sup:213
   4515 /usr/bin/sup:19:in `load'
   4516 /usr/bin/sup:19
   4517 
   4518 
   4519 
   4520 From nicolas.pouillard@gmail.com  Mon Feb 18 17:47:45 2008
   4521 From: nicolas.pouillard@gmail.com (Nicolas Pouillard)
   4522 Date: Mon, 18 Feb 2008 23:47:45 +0100
   4523 Subject: [sup-talk] save somewhere else than temp?
   4524 In-Reply-To: <1203345244-sup-338@south>
   4525 References: <1203336125-sup-4686@sieni> <1203345244-sup-338@south>
   4526 Message-ID: <1203374771-sup-6461@ausone.local>
   4527 
   4528 Excerpts from William Morgan's message of Mon Feb 18 15:34:42 +0100 2008:
   4529 > Reformatted excerpts from Marko Myllym?ki's message of 2008-02-18:
   4530 > > Is it possible to change where sup saves the messages under editing?
   4531 > > Sup just crashed and I lost quite a long message editing in /tmp/ ;)
   4532 > > 
   4533 > > I'd like the edited messages be saved to .sup/editing/*
   4534 > 
   4535 > Just because it's in /tmp doesn't mean it's automatically deleted, does
   4536 > it? (Except maybe at system startup.)
   4537 
   4538 If  you're  using  Tempfile  then closing the file, delete it. And closing the
   4539 process can force it to close it's files.
   4540 
   4541 I've  locally  workaround this problem by defining a custom script that keep a
   4542 copy in ~/tmp as the sup editor.
   4543 
   4544 Regards,
   4545 
   4546 -- 
   4547 Nicolas Pouillard aka Ertai
   4548 -------------- next part --------------
   4549 A non-text attachment was scrubbed...
   4550 Name: signature.asc
   4551 Type: application/pgp-signature
   4552 Size: 194 bytes
   4553 Desc: not available
   4554 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080218/39a69292/attachment.bin 
   4555 
   4556 From nicolas.pouillard@gmail.com  Mon Feb 18 18:24:54 2008
   4557 From: nicolas.pouillard@gmail.com (Nicolas Pouillard)
   4558 Date: Tue, 19 Feb 2008 00:24:54 +0100
   4559 Subject: [sup-talk] [PATCH] first pass at a simple interface to extract
   4560 	URIs from a message
   4561 In-Reply-To: <1203192249-sup-6640@south>
   4562 References: <1203192249-sup-6640@south>
   4563 Message-ID: <1203376951-sup-2550@ausone.local>
   4564 
   4565 Excerpts from William Morgan's message of Sat Feb 16 21:04:32 +0100 2008:
   4566 > [forgot to send to list]
   4567 > 
   4568 > Reformatted excerpts from brabuhr's message of 2008-02-08:
   4569 > > I was also thinking that it would be better to display the discovered
   4570 > > URIs in a list instead of the prompting, but I wasn't sure how to
   4571 > > implement that.  Another problem I see is that the extractor is
   4572 > > too-greedy and will pull in the punctuation following the URL; so,
   4573 > > perhaps the list should allow line editing before calling the view-url
   4574 > > hook?
   4575 > 
   4576 > If you want to display them as a list, I would add a mode called
   4577 > UrlListMode or something like that which was a subclass of
   4578 > LineCursorMode. You can look to BufferListMode as an example, though it
   4579 > will be even simpler than that because the content won't ever change.
   4580 > 
   4581 > Spawn an instance of that mode when the user presses 'L', and have
   4582 > enter in UrlListMode trigger the URL viewing hook, possibly first
   4583 > running it through BufferManager#ask for editing. We can also trim
   4584 > trailing punctuation from whatever URI.extract pulls out, since that
   4585 > sounds like the common case.
   4586 
   4587 You  should look the rxvt-unicode terminal, there is an extension to deal with
   4588 URLs [1]. That's pretty handy in fact and applies not only to sup.
   4589 
   4590 [1]: http://www.jukie.net/~bart/blog/20070503013555
   4591 
   4592 Regards,
   4593 
   4594 -- 
   4595 Nicolas Pouillard aka Ertai
   4596 -------------- next part --------------
   4597 A non-text attachment was scrubbed...
   4598 Name: signature.asc
   4599 Type: application/pgp-signature
   4600 Size: 194 bytes
   4601 Desc: not available
   4602 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080219/cb877745/attachment.bin 
   4603 
   4604 From daniel@wagner-home.com  Mon Feb 18 22:12:15 2008
   4605 From: daniel@wagner-home.com (Daniel Wagner)
   4606 Date: Mon, 18 Feb 2008 19:12:15 -0800
   4607 Subject: [sup-talk] [PATCH] first pass at a simple interface to extract
   4608 	URIs from a message
   4609 In-Reply-To: <1203376951-sup-2550@ausone.local>
   4610 References: <1203192249-sup-6640@south> <1203376951-sup-2550@ausone.local>
   4611 Message-ID: <1203390402-sup-7571@buckwheat>
   4612 
   4613 Excerpts from Nicolas Pouillard's message of Mon Feb 18 15:24:54 -0800 2008:
   4614 > You  should look the rxvt-unicode terminal, there is an extension to deal with
   4615 > URLs [1]. That's pretty handy in fact and applies not only to sup.
   4616 > 
   4617 > [1]: http://www.jukie.net/~bart/blog/20070503013555
   4618 
   4619 Sounds nice, does it handle multi-line URLs gracefully?  In particular,
   4620 in sup a multi-line URL could have a line-break in it... care to report
   4621 how it handles this?
   4622 
   4623 http://www.yahoo.com/?this-is-a-really-long-url-for-you-to-test-with-if-you-would-be-so-kind-that-contains-no-newline-in-the-actual-message-as-sent
   4624 http://www.yahoo.com/?this-is-a-really-long-url-for-you-to-test-with-if-you-woul
   4625 d-be-so-kind-that-contains-a-newline-in-the-eightieth-column
   4626 
   4627 Either way, thanks for the tip!
   4628 ~d
   4629 
   4630 From daniel@wagner-home.com  Mon Feb 18 23:01:49 2008
   4631 From: daniel@wagner-home.com (Daniel Wagner)
   4632 Date: Mon, 18 Feb 2008 20:01:49 -0800
   4633 Subject: [sup-talk] mime-view
   4634 Message-ID: <1203393696-sup-1607@buckwheat>
   4635 
   4636 Hello,
   4637 
   4638 Recently, activating attachments has stopped working.  (I can't be more
   4639 specific about when this started; it could have been at the upgrade to
   4640 0.4, or weeks after, I'm not sure.)  I get a message like "Couldn't view
   4641 the attachment, opening as text", which obviously doesn't work well for
   4642 a large variety of attachments.
   4643 
   4644 I verified that sup is detecting the correct mime-type, and that saving
   4645 the file to disk and manually running "see" did the Right Thing.  I also
   4646 tried adding a hook; the contents of my ~/.sup/hooks/mime-view.rb:
   4647 
   4648 system "xmessage -default okay In the hook."
   4649 system "see #{content_type}:#{filename}"
   4650 return true
   4651 
   4652 The xmessage window appears.  Still, this is pieced together from the
   4653 examples on the wiki and the comments in message-chunks.rb; I have no
   4654 real knowledge of Ruby.  Please let me know if I've written nonsense.
   4655 In any case, still no luck.
   4656 
   4657 Any clues on what I should do?  Thanks.
   4658 ~d
   4659 
   4660 From guillaume.quintard@gmail.com  Tue Feb 19 01:25:00 2008
   4661 From: guillaume.quintard@gmail.com (Guillaume Quintard)
   4662 Date: Mon, 18 Feb 2008 22:25:00 -0800
   4663 Subject: [sup-talk] Can't sup sync
   4664 Message-ID: <1e5fdab70802182225n12a3c127l782cb1a034b1629c@mail.gmail.com>
   4665 
   4666 Hi, I just got a new ubuntu installed and I cant get sup running on it
   4667 :-( Both next and master give me that :
   4668 
   4669 shivan at altis:~/sup$ ruby -Ilib bin/sup-sync --all-sources
   4670 [Mon Feb 18 22:20:06 -0800 2008] using character set encoding "UTF-8"
   4671 [Mon Feb 18 22:20:07 -0800 2008] crypto: detected gpg binary in /usr/bin/gpg
   4672 [Mon Feb 18 22:20:07 -0800 2008] locking /home/shivan/.sup/lock...
   4673 [Mon Feb 18 22:20:07 -0800 2008] loading index...
   4674 [Mon Feb 18 22:20:07 -0800 2008] loaded index of 2924 messages
   4675 Scanning sup://drafts...
   4676 Scanned 0, added 0, updated 0 messages from sup://drafts.
   4677 Scanning mbox:/home/shivan/.gmail.mbox...
   4678 [Mon Feb 18 22:20:18 -0800 2008] unlocking /home/shivan/.sup/lock...
   4679 /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser/multipart.rb:159:in
   4680 `[]=': can't modify frozen string (TypeError)
   4681 	from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser/multipart.rb:159:in
   4682 `read_chunk_low'
   4683 	from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser/multipart.rb:94:in
   4684 `loop'
   4685 	from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser/multipart.rb:94:in
   4686 `read_chunk_low'
   4687 	from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser/multipart.rb:76:in
   4688 `read_chunk'
   4689 	from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser/pushbackreader.rb:85:in
   4690 `read'
   4691 	from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser.rb:285:in
   4692 `parse_singlepart_body'
   4693 	from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser.rb:198:in `parse_low'
   4694 	from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser.rb:275:in
   4695 `parse_multipart_body'
   4696 	 ... 25 levels...
   4697 	from ./lib/sup/util.rb:497:in `method_missing'
   4698 	from bin/sup-sync:136
   4699 	from bin/sup-sync:131:in `each'
   4700 	from bin/sup-sync:131
   4701 
   4702 any idea ?
   4703 
   4704 -- 
   4705 Guillaume
   4706 
   4707 From nicolas.pouillard@gmail.com  Tue Feb 19 05:17:25 2008
   4708 From: nicolas.pouillard@gmail.com (Nicolas Pouillard)
   4709 Date: Tue, 19 Feb 2008 11:17:25 +0100
   4710 Subject: [sup-talk] [PATCH] first pass at a simple interface to extract
   4711 	URIs from a message
   4712 In-Reply-To: <1203390402-sup-7571@buckwheat>
   4713 References: <1203192249-sup-6640@south> <1203376951-sup-2550@ausone.local>
   4714 	<1203390402-sup-7571@buckwheat>
   4715 Message-ID: <1203416134-sup-2417@port-ext6.ensta.fr>
   4716 
   4717 Excerpts from Daniel Wagner's message of Tue Feb 19 04:12:15 +0100 2008:
   4718 > Excerpts from Nicolas Pouillard's message of Mon Feb 18 15:24:54 -0800 2008:
   4719 > > You  should look the rxvt-unicode terminal, there is an extension to deal with
   4720 > > URLs [1]. That's pretty handy in fact and applies not only to sup.
   4721 > > 
   4722 > > [1]: http://www.jukie.net/~bart/blog/20070503013555
   4723 > 
   4724 > Sounds nice, does it handle multi-line URLs gracefully?  In particular,
   4725 > in sup a multi-line URL could have a line-break in it... care to report
   4726 > how it handles this?
   4727 > 
   4728 > http://www.yahoo.com/?this-is-a-really-long-url-for-you-to-test-with-if-you-would-be-so-kind-that-contains-no-newline-in-the-actual-message-as-sent
   4729 > http://www.yahoo.com/?this-is-a-really-long-url-for-you-to-test-with-if-you-would-be-so-kind-that-contains-a-newline-in-the-eightieth-column
   4730 
   4731 It  doesn't  handle  br0ken  URLs, however here that's perhaps sup jobs to fix
   4732 them. I send a patch to the list to fix this.
   4733 
   4734 Regards,
   4735 
   4736 -- 
   4737 Nicolas Pouillard aka Ertai
   4738 -------------- next part --------------
   4739 A non-text attachment was scrubbed...
   4740 Name: signature.asc
   4741 Type: application/pgp-signature
   4742 Size: 240 bytes
   4743 Desc: not available
   4744 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080219/61653c81/attachment-0001.bin 
   4745 
   4746 From nicolas.pouillard@gmail.com  Tue Feb 19 05:17:50 2008
   4747 From: nicolas.pouillard@gmail.com (Nicolas Pouillard)
   4748 Date: Tue, 19 Feb 2008 11:17:50 +0100
   4749 Subject: [sup-talk] [PATCH] Unwrap br0ken URLs.
   4750 Message-ID: <12034162702820-git-send-email-nicolas.pouillard@gmail.com>
   4751 
   4752 ---
   4753  lib/sup/message-chunks.rb |    2 +-
   4754  lib/sup/util.rb           |   25 +++++++++++++++++++++++++
   4755  2 files changed, 26 insertions(+), 1 deletions(-)
   4756 
   4757 diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb
   4758 index 0606395..98b829c 100644
   4759 --- a/lib/sup/message-chunks.rb
   4760 +++ b/lib/sup/message-chunks.rb
   4761 @@ -147,7 +147,7 @@ EOS
   4762  
   4763      attr_reader :lines
   4764      def initialize lines
   4765 -      @lines = lines.map { |l| l.chomp.wrap WRAP_LEN }.flatten # wrap
   4766 +      @lines = lines.unwrap_urls.map { |l| l.chomp.wrap WRAP_LEN }.flatten # wrap
   4767  
   4768        ## trim off all empty lines except one
   4769        @lines.pop while @lines.length > 1 && @lines[-1] =~ /^\s*$/ && @lines[-2] =~ /^\s*$/
   4770 diff --git a/lib/sup/util.rb b/lib/sup/util.rb
   4771 index ceaf0b8..99e73b4 100644
   4772 --- a/lib/sup/util.rb
   4773 +++ b/lib/sup/util.rb
   4774 @@ -401,6 +401,31 @@ class Array
   4775  
   4776    def last= e; self[-1] = e end
   4777    def nonempty?; !empty? end
   4778 +
   4779 +  URL_CHAR      = /[a-zA-Z0-9\-@;\/?:&=%$_.+!*\x27()~,#]/
   4780 +  URL_CHAR_LESS = /[a-zA-Z0-9\-@;\/?:&=%$_.+!*\x27()~]/
   4781 +  URL_RE = %r{(?:https?://|ftp://|news://|mailto:|file://)#{URL_CHAR}+}
   4782 +  TRAILING_URL_RE = /#{URL_RE}$/
   4783 +  LEADING_URL_RE = /^#{URL_RE}/
   4784 +  URL_PART_RE = /^#{URL_CHAR}+#{URL_CHAR_LESS}/
   4785 +
   4786 +  def unwrap_urls
   4787 +    res = []
   4788 +    len = size
   4789 +    i = 0
   4790 +    while i < len do
   4791 +      x = self[i]
   4792 +      y = self[i+1]
   4793 +      if y && x =~ TRAILING_URL_RE && y =~ URL_PART_RE && y !~ LEADING_URL_RE
   4794 +        res << x.chomp + y
   4795 +        i += 2
   4796 +      else
   4797 +        res << x
   4798 +        i += 1
   4799 +      end
   4800 +    end
   4801 +    res
   4802 +  end
   4803  end
   4804  
   4805  class Time
   4806 -- 
   4807 1.5.3.1.109.gacd69
   4808 
   4809 From nicolas.pouillard@gmail.com  Tue Feb 19 05:17:59 2008
   4810 From: nicolas.pouillard@gmail.com (Nicolas Pouillard)
   4811 Date: Tue, 19 Feb 2008 11:17:59 +0100
   4812 Subject: [sup-talk] [PATCH] Add a startup hook.
   4813 Message-ID: <12034162793917-git-send-email-nicolas.pouillard@gmail.com>
   4814 
   4815 ---
   4816  bin/sup |    8 ++++++++
   4817  1 files changed, 8 insertions(+), 0 deletions(-)
   4818 
   4819 diff --git a/bin/sup b/bin/sup
   4820 index 0a35fd7..0d34215 100644
   4821 --- a/bin/sup
   4822 +++ b/bin/sup
   4823 @@ -39,6 +39,12 @@ EOS
   4824    opt :compose, "Compose message to this recipient upon startup", :type => String
   4825  end
   4826  
   4827 +Redwood::HookManager.register "startup", <<EOS
   4828 +Executes at startup
   4829 +No variables.
   4830 +No return value.
   4831 +EOS
   4832 +
   4833  if $opts[:list_hooks]
   4834    Redwood::HookManager.print_hooks
   4835    exit
   4836 @@ -128,6 +134,8 @@ begin
   4837      Index.add_source SentManager.new_source
   4838    end
   4839  
   4840 +  HookManager.run "startup"
   4841 +
   4842    log "starting curses"
   4843    start_cursing
   4844  
   4845 -- 
   4846 1.5.3.1.109.gacd69
   4847 
   4848 From wmorgan-sup@masanjin.net  Tue Feb 19 12:15:11 2008
   4849 From: wmorgan-sup@masanjin.net (William Morgan)
   4850 Date: Tue, 19 Feb 2008 09:15:11 -0800
   4851 Subject: [sup-talk] Can't sup sync
   4852 In-Reply-To: <1e5fdab70802182225n12a3c127l782cb1a034b1629c@mail.gmail.com>
   4853 References: <1e5fdab70802182225n12a3c127l782cb1a034b1629c@mail.gmail.com>
   4854 Message-ID: <1203441291-sup-8508@south>
   4855 
   4856 Reformatted excerpts from Guillaume Quintard's message of 2008-02-18:
   4857 > /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser/multipart.rb:159:in
   4858 > `[]=': can't modify frozen string (TypeError)
   4859 
   4860 RubyMail problem. Solution in the FAQ's.
   4861 
   4862 -- 
   4863 William <wmorgan-sup at masanjin.net>
   4864 
   4865 From wmorgan-sup@masanjin.net  Tue Feb 19 12:32:57 2008
   4866 From: wmorgan-sup@masanjin.net (William Morgan)
   4867 Date: Tue, 19 Feb 2008 09:32:57 -0800
   4868 Subject: [sup-talk] mime-view
   4869 In-Reply-To: <1203393696-sup-1607@buckwheat>
   4870 References: <1203393696-sup-1607@buckwheat>
   4871 Message-ID: <1203442283-sup-4449@south>
   4872 
   4873 Reformatted excerpts from Daniel Wagner's message of 2008-02-18:
   4874 > Recently, activating attachments has stopped working.
   4875 
   4876 You know, in reexamining this code, I think there is a silly bug here,
   4877 and I think it also caused the weirdness that John Bent was experiencing
   4878 a few weeks ago.
   4879 
   4880 Can you try the latest (master/next) from git, or apply the following
   4881 patch:
   4882 
   4883 diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb
   4884 index 0606395..ba8b846 100644
   4885 --- a/lib/sup/message-chunks.rb
   4886 +++ b/lib/sup/message-chunks.rb
   4887 @@ -126,7 +126,7 @@ EOS
   4888        path = write_to_disk
   4889        ret = HookManager.run "mime-view", :content_type => @content_type,
   4890                                           :filename => path
   4891 -      view_default! path unless ret
   4892 +      ret || view_default!(path)
   4893      end
   4894  
   4895      def write_to_disk
   4896 
   4897 > system "xmessage -default okay In the hook."
   4898 > system "see #{content_type}:#{filename}"
   4899 > return true
   4900 
   4901 This looks fine, though I would change the last line to just
   4902   $?.success?
   4903 
   4904 which will evaluate to true iff the see command was successful. With
   4905 the above change, everything should Just Work (tm).
   4906 
   4907 -- 
   4908 William <wmorgan-sup at masanjin.net>
   4909 
   4910 From wmorgan-sup@masanjin.net  Tue Feb 19 12:38:11 2008
   4911 From: wmorgan-sup@masanjin.net (William Morgan)
   4912 Date: Tue, 19 Feb 2008 09:38:11 -0800
   4913 Subject: [sup-talk] save somewhere else than temp?
   4914 In-Reply-To: <1203374771-sup-6461@ausone.local>
   4915 References: <1203336125-sup-4686@sieni> <1203345244-sup-338@south>
   4916 	<1203374771-sup-6461@ausone.local>
   4917 Message-ID: <1203442604-sup-2120@south>
   4918 
   4919 Reformatted excerpts from nicolas.pouillard's message of 2008-02-18:
   4920 > If  you're  using  Tempfile  then closing the file, delete it. And
   4921 > closing the process can force it to close it's files.
   4922 
   4923 I am using Tempfile, which has a non-deterministic behavior (at least, I
   4924 can't figure out a pattern) upon crashing: sometimes it deletes the
   4925 files, sometimes it leaves them.
   4926 
   4927 I guess the answer is to manage my own temporary files, deleting them
   4928 only upon successful shutdown.
   4929 
   4930 -- 
   4931 William <wmorgan-sup at masanjin.net>
   4932 
   4933 From wmorgan-sup@masanjin.net  Tue Feb 19 12:48:36 2008
   4934 From: wmorgan-sup@masanjin.net (William Morgan)
   4935 Date: Tue, 19 Feb 2008 09:48:36 -0800
   4936 Subject: [sup-talk] [PATCH] shell commands are now run in a child process
   4937 In-Reply-To: <1202462044-sup-3129@chris-tablet>
   4938 References: <1202026272-3432-2-git-send-email-chrisw@rice.edu>
   4939 	<1202232814-sup-1005@south> <1202239755-sup-3523@chris-tablet>
   4940 	<1202241831-sup-1777@south> <1202462044-sup-3129@chris-tablet>
   4941 Message-ID: <1203443085-sup-4054@south>
   4942 
   4943 Reformatted excerpts from Christopher Warrington's message of 2008-02-08:
   4944 > It is an odd interplay between Cygwin and Windows.
   4945 [snip lots]
   4946 
   4947 Thanks for that very detailed explanation.
   4948 
   4949 > So, I'm stuck in Cygwin bizzaro-land.
   4950 
   4951 I think most Windows Sup users are in the same situtation, so I would
   4952 like to make this work.
   4953 
   4954 The only thing that makes me uncomfortable about the patch now is the
   4955 2048 thing. But if that is, in fact, the documented maximum number of
   4956 fds ever opened by a Windows process, then heck, let's go for it.
   4957 
   4958 I'm going to move this code into a separate module that's only called
   4959 when run under Cygwin, then commit.
   4960 
   4961 -- 
   4962 William <wmorgan-sup at masanjin.net>
   4963 
   4964 From johnbent@lanl.gov  Tue Feb 19 12:54:10 2008
   4965 From: johnbent@lanl.gov (John Bent)
   4966 Date: Tue, 19 Feb 2008 10:54:10 -0700
   4967 Subject: [sup-talk] mime-view
   4968 In-Reply-To: <1203442283-sup-4449@south>
   4969 References: <1203393696-sup-1607@buckwheat> <1203442283-sup-4449@south>
   4970 Message-ID: <1203443552-sup-3358@tangerine.lanl.gov>
   4971 
   4972 Excerpts from William Morgan's message of Tue Feb 19 10:32:57 -0700 2008:
   4973 > Reformatted excerpts from Daniel Wagner's message of 2008-02-18:
   4974 > > Recently, activating attachments has stopped working.
   4975 > 
   4976 > You know, in reexamining this code, I think there is a silly bug here,
   4977 > and I think it also caused the weirdness that John Bent was experiencing
   4978 > a few weeks ago.
   4979 > 
   4980 That's a relief.  I thought I was the cause of the weirdness.  This works
   4981 great; thanks.  Now my hooks/mime-view.rb (for a mac) is:
   4982 ###########################
   4983 system "open '#{filename}'"
   4984 ###########################
   4985 
   4986 Thanks all!
   4987 
   4988 John
   4989 
   4990 From wmorgan-sup@masanjin.net  Tue Feb 19 12:55:11 2008
   4991 From: wmorgan-sup@masanjin.net (William Morgan)
   4992 Date: Tue, 19 Feb 2008 09:55:11 -0800
   4993 Subject: [sup-talk] OR query does not yield any result
   4994 In-Reply-To: <47A169A5.30801@gslab.com>
   4995 References: <47A169A5.30801@gslab.com>
   4996 Message-ID: <1203443545-sup-3261@south>
   4997 
   4998 Hi Manish,
   4999 
   5000 Sorry for the delay in replying.
   5001 
   5002 Reformatted excerpts from Manish Sapariya's message of 2008-01-30:
   5003 > when I press F and give query as "manish OR nobodypqr" it does not
   5004 > yield any result. However I do get results when I query the index
   5005 > using devel./console.sh.
   5006 
   5007 The behavior should be the same, except that querying through Sup
   5008 automatically removes results from spam, deleted and killed messages.
   5009 Could that explain the difference?
   5010 
   5011 If not, I need a few more details. What version of Sup? Can you give an
   5012 dump of the console.sh session, so I can see exactly what you're doing?
   5013 Finally, in Sup, when you execute the query, there should be two
   5014 corresponding lines in the log: one starting with "normalized" and one
   5015 starting with "got XXX results". Can you paste those in to the email as
   5016 well?
   5017 
   5018 Thanks,
   5019 
   5020 -- 
   5021 William <wmorgan-sup at masanjin.net>
   5022 
   5023 From wmorgan-sup@masanjin.net  Tue Feb 19 12:56:43 2008
   5024 From: wmorgan-sup@masanjin.net (William Morgan)
   5025 Date: Tue, 19 Feb 2008 09:56:43 -0800
   5026 Subject: [sup-talk] mime-view
   5027 In-Reply-To: <1203443552-sup-3358@tangerine.lanl.gov>
   5028 References: <1203393696-sup-1607@buckwheat> <1203442283-sup-4449@south>
   5029 	<1203443552-sup-3358@tangerine.lanl.gov>
   5030 Message-ID: <1203443752-sup-5424@south>
   5031 
   5032 Reformatted excerpts from John Bent's message of 2008-02-19:
   5033 > That's a relief.  I thought I was the cause of the weirdness.  This
   5034 > works great; thanks.
   5035 
   5036 Good to hear. Stupidest bug evar. Don't know how I missed it before.
   5037 
   5038 -- 
   5039 William <wmorgan-sup at masanjin.net>
   5040 
   5041 From wmorgan-sup@masanjin.net  Tue Feb 19 13:23:56 2008
   5042 From: wmorgan-sup@masanjin.net (William Morgan)
   5043 Date: Tue, 19 Feb 2008 10:23:56 -0800
   5044 Subject: [sup-talk] mime-view
   5045 In-Reply-To: <1203442283-sup-4449@south>
   5046 References: <1203393696-sup-1607@buckwheat> <1203442283-sup-4449@south>
   5047 Message-ID: <1203445365-sup-9276@south>
   5048 
   5049 Reformatted excerpts from William Morgan's message of 2008-02-19:
   5050 > Reformatted excerpts from Daniel Wagner's message of 2008-02-18:
   5051 > > system "xmessage -default okay In the hook."
   5052 > > system "see #{content_type}:#{filename}"
   5053 > > return true
   5054 > 
   5055 > This looks fine, though I would change the last line to just
   5056 >   $?.success?
   5057 
   5058 Never mind that. Remove the last (and first!) line completely.
   5059 Kernel#system returns true iff the command is successful.
   5060 
   5061 -- 
   5062 William <wmorgan-sup at masanjin.net>
   5063 
   5064 From wmorgan-sup@masanjin.net  Tue Feb 19 21:55:12 2008
   5065 From: wmorgan-sup@masanjin.net (William Morgan)
   5066 Date: Tue, 19 Feb 2008 18:55:12 -0800
   5067 Subject: [sup-talk] [PATCH] Add a startup hook.
   5068 In-Reply-To: <12034162793917-git-send-email-nicolas.pouillard@gmail.com>
   5069 References: <12034162793917-git-send-email-nicolas.pouillard@gmail.com>
   5070 Message-ID: <1203476102-sup-6559@south>
   5071 
   5072 Merged into next. Thanks!
   5073 
   5074 -- 
   5075 William <wmorgan-sup at masanjin.net>
   5076 
   5077 From daniel@wagner-home.com  Wed Feb 20 01:59:16 2008
   5078 From: daniel@wagner-home.com (Daniel Wagner)
   5079 Date: Tue, 19 Feb 2008 22:59:16 -0800
   5080 Subject: [sup-talk] mime-view
   5081 In-Reply-To: <1203442283-sup-4449@south>
   5082 References: <1203393696-sup-1607@buckwheat> <1203442283-sup-4449@south>
   5083 Message-ID: <1203490669-sup-3520@buckwheat>
   5084 
   5085 Excerpts from William Morgan's message of Tue Feb 19 09:32:57 -0800 2008:
   5086 > Reformatted excerpts from Daniel Wagner's message of 2008-02-18:
   5087 > > Recently, activating attachments has stopped working.
   5088 > 
   5089 > You know, in reexamining this code, I think there is a silly bug here,
   5090 > and I think it also caused the weirdness that John Bent was experiencing
   5091 > a few weeks ago.
   5092 > 
   5093 > Can you try the latest (master/next) from git, or apply the following
   5094 > patch:
   5095 
   5096 Applied it (by hand), still no joy.  BUT!  On a little more digging, it
   5097 looks like the #{} syntax wasn't properly escaping spaces in the
   5098 filename.  A few \" later, I'm back in business.
   5099 
   5100 system "see #{content_type}:\"#{filename}\""
   5101 
   5102 Thanks,
   5103 ~d
   5104 
   5105 From manish@gslab.com  Wed Feb 20 04:02:39 2008
   5106 From: manish@gslab.com (Manish Sapariya)
   5107 Date: Wed, 20 Feb 2008 14:32:39 +0530
   5108 Subject: [sup-talk] OR query does not yield any result
   5109 In-Reply-To: <1203443545-sup-3261@south>
   5110 References: <47A169A5.30801@gslab.com> <1203443545-sup-3261@south>
   5111 Message-ID: <1203497807-sup-2137@alioth.gs-lab.com>
   5112 
   5113 Hi William,
   5114 Here are the snippets from log and output of devel/console.sh query.
   5115 
   5116 =======log sniipet ===
   5117 normalized "manish OR nobodyxyzpqrkljasdf" to "body:manish body:nobodyxyzpqrkljasdf"
   5118 got 0 results for query (offset 0) +(+body:manish +body:nobodyxyzpqrkljasdf) -label:spam -label:delete
   5119 
   5120 
   5121 normalized "manish or nobodyxyzpqrdalkjdfad" to "+body:manish +body:or +body:nobodyxyzpqrdalkjdfad"
   5122 got 0 results for query (offset 0) +(+body:manish +body:or +body:nobodyxyzpqrdalkjdfad) -label:spam -label:delete
   5123 =====================
   5124 
   5125 I was expecting all mails having manish in it to show up, but
   5126 none were reported.
   5127 
   5128 =======console snippet =========
   5129 [manish at alioth sup]$ sh ./devel/console.sh
   5130 [Wed Feb 20 14:25:28 +0530 2008] using character set encoding "UTF-8"
   5131 [Wed Feb 20 14:25:28 +0530 2008] crypto: detected gpg binary in /usr/bin/gpg
   5132 [Wed Feb 20 14:25:28 +0530 2008] loading index...
   5133 [Wed Feb 20 14:25:28 +0530 2008] loaded index of 18324 messages
   5134 irb(main):001:0> Index.index.search_each("manish OR nobodyxyzpqrkljasdf") { |id, score| m = Index.build_message(id); puts "[#{id}] [#{m.from}] [#{m.subj}]" }
   5135 [25951] [Manish Sapariya <manish at gslab.com>] [manish here]
   5136 [25985] [Manish Sapariya <manish at gslab.com>] [Manish here]
   5137 
   5138 ===============================
   5139 
   5140 Just FYI, as you can see in log snippet 'or' and 'OR' are treated differently.
   5141 
   5142 Hope this helps.
   5143 Regards,
   5144 Manish
   5145 
   5146 Excerpts from William Morgan's message of Tue Feb 19 23:25:11 +0530 2008:
   5147 > Hi Manish,
   5148 > 
   5149 > Sorry for the delay in replying.
   5150 > 
   5151 > Reformatted excerpts from Manish Sapariya's message of 2008-01-30:
   5152 > > when I press F and give query as "manish OR nobodypqr" it does not
   5153 > > yield any result. However I do get results when I query the index
   5154 > > using devel./console.sh.
   5155 > 
   5156 > The behavior should be the same, except that querying through Sup
   5157 > automatically removes results from spam, deleted and killed messages.
   5158 > Could that explain the difference?
   5159 > 
   5160 > If not, I need a few more details. What version of Sup? Can you give an
   5161 > dump of the console.sh session, so I can see exactly what you're doing?
   5162 > Finally, in Sup, when you execute the query, there should be two
   5163 > corresponding lines in the log: one starting with "normalized" and one
   5164 > starting with "got XXX results". Can you paste those in to the email as
   5165 > well?
   5166 > 
   5167 > Thanks,
   5168 > 
   5169 
   5170 -- 
   5171 
   5172 From manish@gslab.com  Wed Feb 20 04:18:48 2008
   5173 From: manish@gslab.com (Manish Sapariya)
   5174 Date: Wed, 20 Feb 2008 14:48:48 +0530
   5175 Subject: [sup-talk] OR query does not yield any result
   5176 In-Reply-To: <1203443545-sup-3261@south>
   5177 References: <47A169A5.30801@gslab.com> <1203443545-sup-3261@south>
   5178 Message-ID: <1203499107-sup-9894@alioth.gs-lab.com>
   5179 
   5180 Version is sup 0.4
   5181 -Manish
   5182 
   5183 Excerpts from William Morgan's message of Tue Feb 19 23:25:11 +0530 2008:
   5184 > Hi Manish,
   5185 > 
   5186 > Sorry for the delay in replying.
   5187 > 
   5188 > Reformatted excerpts from Manish Sapariya's message of 2008-01-30:
   5189 > > when I press F and give query as "manish OR nobodypqr" it does not
   5190 > > yield any result. However I do get results when I query the index
   5191 > > using devel./console.sh.
   5192 > 
   5193 > The behavior should be the same, except that querying through Sup
   5194 > automatically removes results from spam, deleted and killed messages.
   5195 > Could that explain the difference?
   5196 > 
   5197 > If not, I need a few more details. What version of Sup? Can you give an
   5198 > dump of the console.sh session, so I can see exactly what you're doing?
   5199 > Finally, in Sup, when you execute the query, there should be two
   5200 > corresponding lines in the log: one starting with "normalized" and one
   5201 > starting with "got XXX results". Can you paste those in to the email as
   5202 > well?
   5203 > 
   5204 > Thanks,
   5205 > 
   5206 
   5207 -- 
   5208 
   5209 From nicolas.pouillard@gmail.com  Wed Feb 20 05:54:20 2008
   5210 From: nicolas.pouillard@gmail.com (Nicolas Pouillard)
   5211 Date: Wed, 20 Feb 2008 11:54:20 +0100
   5212 Subject: [sup-talk] save somewhere else than temp?
   5213 In-Reply-To: <1203442604-sup-2120@south>
   5214 References: <1203336125-sup-4686@sieni> <1203345244-sup-338@south>
   5215 	<1203374771-sup-6461@ausone.local> <1203442604-sup-2120@south>
   5216 Message-ID: <1203504717-sup-2964@port-ext6.ensta.fr>
   5217 
   5218 Excerpts from William Morgan's message of Tue Feb 19 18:38:11 +0100 2008:
   5219 > Reformatted excerpts from nicolas.pouillard's message of 2008-02-18:
   5220 > > If  you're  using  Tempfile  then closing the file, delete it. And
   5221 > > closing the process can force it to close it's files.
   5222 > 
   5223 > I am using Tempfile, which has a non-deterministic behavior (at least, I
   5224 > can't figure out a pattern) upon crashing: sometimes it deletes the
   5225 > files, sometimes it leaves them.
   5226 > 
   5227 > I guess the answer is to manage my own temporary files, deleting them
   5228 > only upon successful shutdown.
   5229 
   5230 Long  time  ago  (when I did more ruby stuffs), I wrote this module (attached)
   5231 that  makes  part of a package called core_ex. I found it far more useful than
   5232 the default module. Feel free to import it.
   5233 
   5234 -- 
   5235 Nicolas Pouillard aka Ertai
   5236 -------------- next part --------------
   5237 A non-text attachment was scrubbed...
   5238 Name: temp_path.rb
   5239 Type: application/octet-stream
   5240 Size: 5318 bytes
   5241 Desc: not available
   5242 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080220/41dbda11/attachment.obj 
   5243 -------------- next part --------------
   5244 A non-text attachment was scrubbed...
   5245 Name: signature.asc
   5246 Type: application/pgp-signature
   5247 Size: 194 bytes
   5248 Desc: not available
   5249 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080220/41dbda11/attachment.bin 
   5250 
   5251 From dunghopper@gmail.com  Wed Feb 20 23:43:55 2008
   5252 From: dunghopper@gmail.com (Daniel Hilton)
   5253 Date: Wed, 20 Feb 2008 21:43:55 -0700
   5254 Subject: [sup-talk] nonblocking_getch
   5255 Message-ID: <3902af2f0802202043r3c8a98ablabf458d0a99937b3@mail.gmail.com>
   5256 
   5257 First of all, kudos to all who have contributed to sup (especially
   5258 William!).  Its the bees knees.
   5259 
   5260 One issue:
   5261 At least on my slow computer, the time it takes to dispatch even a simple
   5262 action (like cursor_down) is a bit longer than my keyboard's repeat
   5263 interval.
   5264 So, when I hold down 'j' to scroll through several messages, it continues to
   5265 scroll for a few seconds after I release the key, causing me to overshoot my
   5266 target every time.
   5267 
   5268 I've got a solution that works on my system, adding
   5269 'Ncurses.stdscr.nodelay1' to start_cursing, and modifying
   5270 nonblocking_getch as follows:
   5271 
   5272   def nonblocking_getch
   5273     if IO.select([$stdin], nil, nil, 1)
   5274       repeat = c = Ncurses.getch
   5275       repeat = Ncurses.getch until repeat != c
   5276       c
   5277     else
   5278       nil
   5279     end
   5280   end
   5281 
   5282 This effectively discards the extra keystrokes that accumulate while the
   5283 action is taking place, and makes the UI seem more responsive (even though
   5284 it isn't actually any faster).
   5285 
   5286 As a side note: having added nodelay, there doesn't seem to be any real
   5287 reason we would need to keep the IO.select... but in my brief
   5288 experimentation I found various unpleasant side-effects when I tried to
   5289 remove it. I guess it doesn't hurt anything to leave it in.
   5290 
   5291 There may also be side-effects that I haven't noticed from using nodelay,
   5292 but everything seems to work as it should.
   5293 
   5294 Dan
   5295 -------------- next part --------------
   5296 An HTML attachment was scrubbed...
   5297 URL: http://rubyforge.org/pipermail/sup-talk/attachments/20080220/0c1c9318/attachment.html 
   5298 
   5299 From vasudeva@linkswarm.com  Thu Feb 21 19:17:11 2008
   5300 From: vasudeva@linkswarm.com (vasudeva)
   5301 Date: Thu, 21 Feb 2008 19:17:11 -0500
   5302 Subject: [sup-talk] sup-sync-back reports: Nothing to do
   5303 Message-ID: <1203639414-sup-3734@lenin>
   5304 
   5305 I seem to be unable to run sup-sync-back to apply my sup-world changes
   5306 back to my mbox file...
   5307 
   5308 **
   5309 ruby -I /home/vasudeva/sup/lib -w /home/vasudeva/sup/bin/sup-sync-back mbox:///home/vasudeva/muttmail/inbox
   5310 /home/vasudeva/sup/lib/sup/util.rb:8: warning: method redefined; discarding old gen_lock_id
   5311 /home/vasudeva/sup/lib/sup/util.rb:19: warning: method redefined; discarding old dump_lock_id
   5312 [Thu Feb 21 17:34:46 -0500 2008] using character set encoding "UTF-8"
   5313 /home/vasudeva/sup/lib/sup/message-chunks.rb:36: warning: method
   5314 redefined; discarding old make_tmpname
   5315 /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/repeaters/repeater_month_name.rb:13: warning: useless use of > in void context
   5316 /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/repeaters/repeater_month_name.rb:19: warning: useless use of > in void context
   5317 /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/repeaters/repeater_month_name.rb:25: warning: useless use of < in void context
   5318 Nothing to do.
   5319 **
   5320 
   5321 There are definitely changes that need to be applied; enough that I
   5322 think there may be some kind of index desynching going on.
   5323 
   5324 I'm not terribly worried about it, since it'll take 10 minutes to re-do
   5325 those changes manually to my mbox, but I thought it was kind of an
   5326 interesting oddity, and might shed some light on something worthwhile if
   5327 anyone's bored.
   5328 
   5329 I've tried against the newest master and next; same deal.
   5330 
   5331 
   5332 
   5333 
   5334 -- 
   5335 linkswarm.com :: Collaborative Insolence
   5336 vasudeva.linkswarm.com/gallery :: For The Faint of Heart
   5337 
   5338 
   5339 From luis@tieguy.org  Fri Feb 22 10:46:55 2008
   5340 From: luis@tieguy.org (Luis Villa)
   5341 Date: Fri, 22 Feb 2008 10:46:55 -0500
   5342 Subject: [sup-talk] Amazon.com messages can't be added to index
   5343 Message-ID: <2cb10c440802220746w53904b96n18ed9511efc664de@mail.gmail.com>
   5344 
   5345 >From a long ago thread:
   5346 http://rubyforge.org/pipermail/sup-talk/2007-October/000326.html
   5347 
   5348 It looks like I've found a similar problem. In importing my mail (with
   5349 0.4, haven't tried next yet) I get:
   5350 
   5351 /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:200:in
   5352 `sync_message': just added message
   5353 "!~!UENERkVCMDkAAQACAPYAAAAAAAAAOKG7EAXlEBqhuwgAKypWwgAAbXNwc3QuZGxsAAAAAABOSVRB+b+4AQCqADfZbgAAAABDADoAXABEAG8AYwB1AG0AZQBuAHQAcwAgAGEAbgBkACAAUwBlAHQAdABpAG4AZwBzAFwAawBiAGUAbgB0AG8AbgBcAEwAbwBjAGEAbAAgAFMAZQB0AHQAaQBuAGcAcwBcAEEAcABwAGwAaQBjAGEAdABpAG8AbgAgAEQAYQB0AGEAXABNAGkAYwByAG8AcwBvAGYAdABcAE8AdQB0AGwAbwBvAGsAXABPAHUAdABsAG8AbwBrAC4AcABzAHQAAAAYAAAAAAAAALLH/vR9UMVCgMck3LV+0wHCgAAAGAAAAAAAAACyx/70fVDFQoDHJNy1ftMBhLcgAAAAAAAQAAAAqTDfdQ6dIEawbQUxhNxqVz4AAABSRTogQnVnemlsbGE6IEhhcyBhbnlvbmUgc3VjY2Vzc2Z1bGx5IGNyZWF0ZWQgU3ViLUNvbXBvbmVudHM/AA==@amd.com"
   5354 but couldn't find it in a search (RuntimeError)
   5355 
   5356 Is this still a tokenization problem, or...? Any additional debugging
   5357 information I can grab to help debug?
   5358 
   5359 Thanks-
   5360 Luis
   5361 
   5362 From luis@tieguy.org  Fri Feb 22 11:25:01 2008
   5363 From: luis@tieguy.org (Luis Villa)
   5364 Date: Fri, 22 Feb 2008 11:25:01 -0500
   5365 Subject: [sup-talk] Amazon.com messages can't be added to index
   5366 In-Reply-To: <2cb10c440802220746w53904b96n18ed9511efc664de@mail.gmail.com>
   5367 References: <2cb10c440802220746w53904b96n18ed9511efc664de@mail.gmail.com>
   5368 Message-ID: <2cb10c440802220825l1f22fd07s926db4d1e17b4f81@mail.gmail.com>
   5369 
   5370 >From a long ago thread:
   5371 http://rubyforge.org/pipermail/sup-talk/2007-October/000326.html
   5372 
   5373 It looks like I've found a similar problem. In importing my mail (with
   5374 0.4, haven't tried next yet) I get:
   5375 
   5376 /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:200:in
   5377 `sync_message': just added message
   5378 "!~!UENERkVCMDkAAQACAPYAAAAAAAAAOKG7EAXlEBqhuwgAKypWwgAAbXNwc3QuZGxsAAAAAABOSVRB+b+4AQCqADfZbgAAAABDADoAXABEAG8AYwB1AG0AZQBuAHQAcwAgAGEAbgBkACAAUwBlAHQAdABpAG4AZwBzAFwAawBiAGUAbgB0AG8AbgBcAEwAbwBjAGEAbAAgAFMAZQB0AHQAaQBuAGcAcwBcAEEAcABwAGwAaQBjAGEAdABpAG8AbgAgAEQAYQB0AGEAXABNAGkAYwByAG8AcwBvAGYAdABcAE8AdQB0AGwAbwBvAGsAXABPAHUAdABsAG8AbwBrAC4AcABzAHQAAAAYAAAAAAAAALLH/vR9UMVCgMck3LV+0wHCgAAAGAAAAAAAAACyx/70fVDFQoDHJNy1ftMBhLcgAAAAAAAQAAAAqTDfdQ6dIEawbQUxhNxqVz4AAABSRTogQnVnemlsbGE6IEhhcyBhbnlvbmUgc3VjY2Vzc2Z1bGx5IGNyZWF0ZWQgU3ViLUNvbXBvbmVudHM/AA==@amd.com"
   5379 but couldn't find it in a search (RuntimeError)
   5380 
   5381 Is this still a tokenization problem, or...? Any additional debugging
   5382 information I can grab to help debug?
   5383 
   5384 Thanks-
   5385 Luis
   5386 
   5387 From guillaume.quintard@gmail.com  Sat Feb 23 16:34:30 2008
   5388 From: guillaume.quintard@gmail.com (Guillaume Quintard)
   5389 Date: Sat, 23 Feb 2008 13:34:30 -0800
   5390 Subject: [sup-talk] filter question
   5391 Message-ID: <1203801642-sup-8748@altis>
   5392 
   5393 w00t, I finally switched to sup (and this is my first mail to the list using it).
   5394 I still have a little problem about filters though. they don't seem to do anything. I have this in my before-add-message.rb :
   5395 
   5396 message.add_label "sent" if message.from =~ /guillaume.quintard at gmail.com/
   5397 
   5398 but, when I send mail to myself, it doesn't label the mail.
   5399 I know that it reads the hook (tried some say + sleep calls), but for a reason I don't understand it does nothing.
   5400 
   5401 and yes, this time, I read the FAQ before ;-)
   5402 
   5403 -- 
   5404 Guillaume
   5405 
   5406 From wmorgan-sup@masanjin.net  Sun Feb 24 12:15:32 2008
   5407 From: wmorgan-sup@masanjin.net (William Morgan)
   5408 Date: Sun, 24 Feb 2008 09:15:32 -0800
   5409 Subject: [sup-talk] new in next: faster saving and bigger indexes
   5410 Message-ID: <1203871982-sup-7942@south>
   5411 
   5412 I've just merged in a changeset that makes Sup store message body
   5413 content in the Ferret index. (They've always been indexed, but now
   5414 they're stored as well.) This means that changing the labels on a
   5415 message can be a copy operation of the previous Ferret document, rather
   5416 than requiring downloading and parsing the original message to create a
   5417 new Ferret document.
   5418 
   5419 So, this should have two effects:
   5420 
   5421 1. The Ferret index size will expand by about 50%. Sorry.
   5422 2. Tweaking message labels should be much, much faster, since the
   5423    message no longer has to be downloaded from the source in order to
   5424    change the labels. If you've ever tried to label a large IMAP thread,
   5425    you no longer have to wait 5 minutes just to save. :)
   5426 
   5427 The index size increase is unfortunate, but it's something that has to
   5428 happen anyways if we want search-results-mode to have matching text in
   5429 the snippets, which is in the future TODO.
   5430 
   5431 The change was made in such a way that it's incrementally applied
   5432 whenever a message is saved or changed in the Ferret index. So, if you
   5433 want the above behavior on all messages immediately, you must do
   5434 sup-sync --all on a source (which will require downloading each
   5435 message). Otherwise, you will get the slow behavior (message body needs
   5436 to be downloaded from the source) the first time you save a message
   5437 after merging this change, and the fast behavior (no downloading
   5438 required) on all subsequent times.
   5439 
   5440 I'm planning on committing another change in the near future that will
   5441 also require a sup-sync --all, so you might want to hold out for that if
   5442 you have a lot of messages. (I'm planning to have message state be
   5443 duplicated outside the Ferret index, so that Ferret index corruption is
   5444 a nuisance rather than a nightmare.)
   5445 
   5446 There's also a potential next step here where no interaction with
   5447 external sources is *ever* required except at poll time, which would
   5448 mean IMAP would become actually useable. (The other option being just
   5449 figure out why the Ruby IMAP library is so incredibly slow.)
   5450 
   5451 
   5452 
   5453 
   5454 -- 
   5455 William <wmorgan-sup at masanjin.net>
   5456 
   5457 From wmorgan-sup@masanjin.net  Sun Feb 24 17:58:00 2008
   5458 From: wmorgan-sup@masanjin.net (William Morgan)
   5459 Date: Sun, 24 Feb 2008 14:58:00 -0800
   5460 Subject: [sup-talk] filter question
   5461 In-Reply-To: <1203801642-sup-8748@altis>
   5462 References: <1203801642-sup-8748@altis>
   5463 Message-ID: <1203893761-sup-560@south>
   5464 
   5465 Reformatted excerpts from Guillaume Quintard's message of 2008-02-23:
   5466 > I still have a little problem about filters though. they don't seem to
   5467 > do anything. I have this in my before-add-message.rb :
   5468 > 
   5469 > message.add_label "sent" if message.from =~ /guillaume.quintard at gmail.com/
   5470 > 
   5471 > but, when I send mail to myself, it doesn't label the mail.
   5472 
   5473 Yep, there was a bug where the before-add-message hook wasn't being
   5474 called on sent messages. I've fixed this in git next. Update and try
   5475 now.
   5476 
   5477 But you shouldn't have to write that hook, because the sent label is
   5478 applied to all sent messages anyways!
   5479 
   5480 (Also, you'd need to use message.from.email because message.from is a
   5481 Person object).
   5482 
   5483 -- 
   5484 William <wmorgan-sup at masanjin.net>
   5485 
   5486 From guillaume.quintard@enst-bretagne.fr  Sun Feb 24 19:12:03 2008
   5487 From: guillaume.quintard@enst-bretagne.fr (Guillaume Quintard)
   5488 Date: Sun, 24 Feb 2008 16:12:03 -0800
   5489 Subject: [sup-talk] filter question
   5490 In-Reply-To: <1203893761-sup-560@south>
   5491 References: <1203801642-sup-8748@altis> <1203893761-sup-560@south>
   5492 Message-ID: <1203898237-sup-1505@altis>
   5493 
   5494 Excerpts from William Morgan's message of Sun Feb 24 14:58:00 -0800 2008:
   5495 > But you shouldn't have to write that hook, because the sent label is
   5496 > applied to all sent messages anyways!
   5497 >
   5498 actually, the idea was to label mail sent by me from gmail.
   5499 
   5500 > (Also, you'd need to use message.from.email because message.from is a
   5501 > Person object).
   5502 
   5503 message.add_label "test" if message.from.email =~ /guillaume.quintard at gmail.com/
   5504 doesn't seem to do a thing either :-(
   5505 
   5506 -- 
   5507 Guillaume
   5508 
   5509 From wmorgan-sup@masanjin.net  Mon Feb 25 00:10:57 2008
   5510 From: wmorgan-sup@masanjin.net (William Morgan)
   5511 Date: Sun, 24 Feb 2008 21:10:57 -0800
   5512 Subject: [sup-talk] Amazon.com messages can't be added to index
   5513 In-Reply-To: <2cb10c440802220825l1f22fd07s926db4d1e17b4f81@mail.gmail.com>
   5514 References: <2cb10c440802220746w53904b96n18ed9511efc664de@mail.gmail.com>
   5515 	<2cb10c440802220825l1f22fd07s926db4d1e17b4f81@mail.gmail.com>
   5516 Message-ID: <1203915874-sup-5504@south>
   5517 
   5518 Reformatted excerpts from Luis Villa's message of 2008-02-22:
   5519 > /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:200:in `sync_message': just added message "!~!UENERkVCMDkAAQACAPYAAAAAAAAAOKG7EAXlEBqhuwgAKypWwgAAbXNwc3QuZGxsAAAAAABOSVRB+b+4AQCqADfZbgAAAABDADoAXABEAG8AYwB1AG0AZQBuAHQAcwAgAGEAbgBkACAAUwBlAHQAdABpAG4AZwBzAFwAawBiAGUAbgB0AG8AbgBcAEwAbwBjAGEAbAAgAFMAZQB0AHQAaQBuAGcAcwBcAEEAcABwAGwAaQBjAGEAdABpAG8AbgAgAEQAYQB0AGEAXABNAGkAYwByAG8AcwBvAGYAdABcAE8AdQB0AGwAbwBvAGsAXABPAHUAdABsAG8AbwBrAC4AcABzAHQAAAAYAAAAAAAAALLH/vR9UMVCgMck3LV+0wHCgAAAGAAAAAAAAACyx/70fVDFQoDHJNy1ftMBhLcgAAAAAAAQAAAAqTDfdQ6dIEawbQUxhNxqVz4AAABSRTogQnVnemlsbGE6IEhhcyBhbnlvbmUgc3VjY2Vzc2Z1bGx5IGNyZWF0ZWQgU3ViLUNvbXBvbmVudHM/AA==@amd.com" but couldn't find it in a search (RuntimeError)
   5520 
   5521 Sigh. Why would anyone generate a message id like that?
   5522 
   5523 There were two problems causing your error. I've fixed them both in git
   5524 next. You can probably apply the attached patches to your 0.4 release if
   5525 you don't want to use git just yet.
   5526 
   5527 The first problem was that marking the message_id field as non-tokenized
   5528 in Ferret just solves all sorts of tokenization problems. So that's in.
   5529 
   5530 The second problem is a Ferret bug, where apparently TermQuery values of
   5531 more than 255 characters never match anything. The current workaround
   5532 just lops off anything after the 255th character. And that may very well
   5533 screw things up if falsely uniquefies things.
   5534 
   5535 The right long-term answer is probably to take the hex SHA1 of every
   5536 message id and just use that instead of the original value. Then all of
   5537 these issues will be solved. That will require an index rebuild for
   5538 everyone, so I'm going to hold off on that for now.
   5539 
   5540 -- 
   5541 William <wmorgan-sup at masanjin.net>
   5542 -------------- next part --------------
   5543 A non-text attachment was scrubbed...
   5544 Name: 0001-don-t-tokenize-message_id-field-in-index.patch
   5545 Type: application/octet-stream
   5546 Size: 945 bytes
   5547 Desc: not available
   5548 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080224/94955be9/attachment.obj 
   5549 -------------- next part --------------
   5550 A non-text attachment was scrubbed...
   5551 Name: 0002-only-use-the-first-255-characters-of-a-message-id-f.patch
   5552 Type: application/octet-stream
   5553 Size: 1046 bytes
   5554 Desc: not available
   5555 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080224/94955be9/attachment-0001.obj 
   5556 
   5557 From wmorgan-sup@masanjin.net  Mon Feb 25 00:13:11 2008
   5558 From: wmorgan-sup@masanjin.net (William Morgan)
   5559 Date: Sun, 24 Feb 2008 21:13:11 -0800
   5560 Subject: [sup-talk] filter question
   5561 In-Reply-To: <1203898237-sup-1505@altis>
   5562 References: <1203801642-sup-8748@altis> <1203893761-sup-560@south>
   5563 	<1203898237-sup-1505@altis>
   5564 Message-ID: <1203916279-sup-3593@south>
   5565 
   5566 Reformatted excerpts from guillaume.quintard's message of 2008-02-24:
   5567 > message.add_label "test" if message.from.email =~ /guillaume.quintard at gmail.com/
   5568 > doesn't seem to do a thing either :-(
   5569 
   5570 That should work. What if you add some logging information, like:
   5571 
   5572   log "called"
   5573   log "email is #{message.from.email.inspect}"
   5574   match = message.from.email =~ /guillaume\.quintard at gmail\.com/
   5575   log "match is #{match.inspect}"
   5576   message.add_label :test if match
   5577   log "message labels now #{message.labels.inspect}"
   5578 
   5579 
   5580 -- 
   5581 William <wmorgan-sup at masanjin.net>
   5582 
   5583 From marcus-sup@bar-coded.net  Mon Feb 25 08:01:44 2008
   5584 From: marcus-sup@bar-coded.net (Marcus Williams)
   5585 Date: Mon, 25 Feb 2008 13:01:44 +0000
   5586 Subject: [sup-talk] [BUG] Normalised searches break bracketed multi-term
   5587 	searches
   5588 Message-ID: <1203944320-sup-3692@tomsk>
   5589 
   5590 Hi -
   5591 
   5592 Lookes like the search normalisation has broken things like date
   5593 searches like "before:(2 days ago)" because they get broken up into
   5594 something like "before:2 before:days before:ago".
   5595 
   5596 Only picked it up because my hasattachment/filetype searching code
   5597 (coming soon to a patch near you!) relies on it.
   5598 
   5599 Should bracketed stuff still work?
   5600 
   5601 Marcus
   5602 
   5603 
   5604 From kingshivan@gmail.com  Mon Feb 25 01:28:30 2008
   5605 From: kingshivan@gmail.com (shivan)
   5606 Date: Sun, 24 Feb 2008 22:28:30 -0800
   5607 Subject: [sup-talk] filter question
   5608 In-Reply-To: <1203916279-sup-3593@south>
   5609 References: <1203801642-sup-8748@altis> <1203893761-sup-560@south>
   5610 	<1203898237-sup-1505@altis> <1203916279-sup-3593@south>
   5611 Message-ID: <1203920420-sup-2769@altis>
   5612 
   5613 ok, I got it, this line was causing problem :
   5614 message.add_label "server" if message.from.email =~ /@server.com/
   5615 
   5616 replacing @ with \@ did the trick
   5617 
   5618 thanks !
   5619 
   5620 PS : in fact, I'd have another questio : is there an way to switch the "from" field, like it is done in gmail ? I entered two additionnal email addresses with sup-config but found no option to use them.
   5621 anyway, kudos to you people, sup is really great !
   5622 
   5623 -- 
   5624 Guillaume
   5625 
   5626 From wmorgan-sup@masanjin.net  Mon Feb 25 12:02:19 2008
   5627 From: wmorgan-sup@masanjin.net (William Morgan)
   5628 Date: Mon, 25 Feb 2008 09:02:19 -0800
   5629 Subject: [sup-talk] filter question
   5630 In-Reply-To: <1203920420-sup-2769@altis>
   5631 References: <1203801642-sup-8748@altis> <1203893761-sup-560@south>
   5632 	<1203898237-sup-1505@altis> <1203916279-sup-3593@south>
   5633 	<1203920420-sup-2769@altis>
   5634 Message-ID: <1203958719-sup-6567@south>
   5635 
   5636 Reformatted excerpts from kingshivan's message of 2008-02-24:
   5637 > ok, I got it, this line was causing problem :
   5638 > message.add_label "server" if message.from.email =~ /@server.com/
   5639 > 
   5640 > replacing @ with \@ did the trick
   5641 
   5642 Weird. That shouldn't make a difference. @ doesn't require escaping in
   5643 regexes. E.g.:
   5644 
   5645   $ irb
   5646   irb(main):001:0> "bob at server.com" =~ /@server.com/
   5647   => 3
   5648   irb(main):002:0> "bob at server.com" =~ /\@server.com/
   5649   => 3
   5650 
   5651 Well, if it works, it works.
   5652 
   5653 > PS : in fact, I'd have another questio : is there an way to switch the
   5654 > "from" field, like it is done in gmail ? I entered two additionnal
   5655 > email addresses with sup-config but found no option to use them.
   5656 
   5657 There's no way in the GUI, at least currently. I would like to have a
   5658 way, but I'm not sure what the interface would look like.
   5659 
   5660 You have two options: you can overwrite the From: line in the editor
   5661 when you compose an email, or you can use the before-edit hook to
   5662 programmatically set the From address based on the to address, etc.
   5663 
   5664 -- 
   5665 William <wmorgan-sup at masanjin.net>
   5666 
   5667 From chrisw@rice.edu  Mon Feb 25 12:08:22 2008
   5668 From: chrisw@rice.edu (Christopher Warrington)
   5669 Date: Mon, 25 Feb 2008 11:08:22 -0600
   5670 Subject: [sup-talk] Amazon.com messages can't be added to index
   5671 In-Reply-To: <1203915874-sup-5504@south>
   5672 References: <2cb10c440802220746w53904b96n18ed9511efc664de@mail.gmail.com>
   5673 	<2cb10c440802220825l1f22fd07s926db4d1e17b4f81@mail.gmail.com>
   5674 	<1203915874-sup-5504@south>
   5675 Message-ID: <541961788.20080225110822@rice.edu>
   5676 
   5677 
   5678 William Morgan @ 2008-2-24 11:10:57 PM
   5679 "[sup-talk] Amazon.com messages can't be added to index" <mid:1203915874-sup-5504 at south>
   5680 
   5681 >> /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:200:in `sync_message': just added message "!~!UENERkVCMDkAAQACAPYAAAAAAAAAOKG7EAXlEBqhuwgAKypWwgAAbXNwc3QuZGxsAAAAAABOSVRB+b+4AQCqADfZbgAAAABDADoAXABEAG8AYwB1AG0AZQBuAHQAcwAgAGEAbgBkACAAUwBlAHQAdABpAG4AZwBzAFwAawBiAGUAbgB0AG8AbgBcAEwAbwBjAGEAbAAgAFMAZQB0AHQAaQBuAGcAcwBcAEEAcABwAGwAaQBjAGEAdABpAG8AbgAgAEQAYQB0AGEAXABNAGkAYwByAG8AcwBvAGYAdABcAE8AdQB0AGwAbwBvAGsAXABPAHUAdABsAG8AbwBrAC4AcABzAHQAAAAYAAAAAAAAALLH/vR9UMVCgMck3LV+0wHCgAAAGAAAAAAAAACyx/70fVDFQoDHJNy1ftMBhLcgAAAAAAAQAAAAqTDfdQ6dIEawbQUxhNxqVz4AAABSRTogQnVnemlsbGE6IEhhcyBhbnlvbmUgc3VjY2Vzc2Z1bGx5IGNyZWF0ZWQgU3ViLUNvbXBvbmVudHM/AA==@amd.com" but couldn't find it in a search (RuntimeError)
   5682 > Sigh. Why would anyone generate a message id like that?
   5683 
   5684 I've seen some Netscape.com (webmail, I assume) messages with ids
   5685 like that. In fact, I just got one today:
   5686 
   5687 Message-ID: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAXMhTt2UCrU6Chc6GzOTGusKAAAAQAAAASrY7ZritsEOjEOY8QXLoDQEAAAAA at netscape.com>
   5688 
   5689 -- 
   5690 Christopher Warrington <chrisw at rice.edu>
   5691 
   5692 "Be careful of reading health books: you might die of a misprint."
   5693 -Mark Twain
   5694 -------------- next part --------------
   5695 A non-text attachment was scrubbed...
   5696 Name: not available
   5697 Type: application/pgp-signature
   5698 Size: 183 bytes
   5699 Desc: not available
   5700 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080225/fa4b01ba/attachment.bin 
   5701 
   5702 From wmorgan-sup@masanjin.net  Mon Feb 25 12:09:00 2008
   5703 From: wmorgan-sup@masanjin.net (William Morgan)
   5704 Date: Mon, 25 Feb 2008 09:09:00 -0800
   5705 Subject: [sup-talk] [BUG] Normalised searches break bracketed multi-term
   5706 	searches
   5707 In-Reply-To: <1203944320-sup-3692@tomsk>
   5708 References: <1203944320-sup-3692@tomsk>
   5709 Message-ID: <1203959274-sup-9031@south>
   5710 
   5711 Reformatted excerpts from Marcus Williams's message of 2008-02-25:
   5712 > Lookes like the search normalisation has broken things like date
   5713 > searches like "before:(2 days ago)" because they get broken up into
   5714 > something like "before:2 before:days before:ago".
   5715 
   5716 Yep, normalization was completely b0rked. It was also screwing up simple
   5717 OR queries (Manish's bug).
   5718 
   5719 The benefit was very limited, so I've removed this in next.
   5720 
   5721 -- 
   5722 William <wmorgan-sup at masanjin.net>
   5723 
   5724 From wmorgan-sup@masanjin.net  Mon Feb 25 12:13:35 2008
   5725 From: wmorgan-sup@masanjin.net (William Morgan)
   5726 Date: Mon, 25 Feb 2008 09:13:35 -0800
   5727 Subject: [sup-talk] Amazon.com messages can't be added to index
   5728 In-Reply-To: <541961788.20080225110822@rice.edu>
   5729 References: <2cb10c440802220746w53904b96n18ed9511efc664de@mail.gmail.com>
   5730 	<2cb10c440802220825l1f22fd07s926db4d1e17b4f81@mail.gmail.com>
   5731 	<1203915874-sup-5504@south> <541961788.20080225110822@rice.edu>
   5732 Message-ID: <1203959567-sup-8488@south>
   5733 
   5734 Reformatted excerpts from Christopher Warrington's message of 2008-02-25:
   5735 > I've seen some Netscape.com (webmail, I assume) messages with ids
   5736 > like that. In fact, I just got one today:
   5737 > 
   5738 > Message-ID:
   5739 > <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAXMhTt2UCrU6Chc6GzOTGusKAAAAQAAAASrY7ZritsEOjEOY8QXLoDQEAAAAA at netscape.com>
   5740 
   5741 Hey, at least that one's under 255 characters. :)
   5742 
   5743 Does seem to be the same software, though. !~! my ass.
   5744 
   5745 -- 
   5746 William <wmorgan-sup at masanjin.net>
   5747 
   5748 From wmorgan-sup@masanjin.net  Mon Feb 25 12:17:28 2008
   5749 From: wmorgan-sup@masanjin.net (William Morgan)
   5750 Date: Mon, 25 Feb 2008 09:17:28 -0800
   5751 Subject: [sup-talk] sup-sync-back reports: Nothing to do
   5752 In-Reply-To: <1203639414-sup-3734@lenin>
   5753 References: <1203639414-sup-3734@lenin>
   5754 Message-ID: <1203959676-sup-1952@south>
   5755 
   5756 Reformatted excerpts from vasudeva's message of 2008-02-21:
   5757 > Nothing to do.
   5758 
   5759 I've improved this message in git. You need to specify least one of
   5760 --drop-deleted, --move-deleted, --drop-spam, or --move-spam.
   5761 
   5762 -- 
   5763 William <wmorgan-sup at masanjin.net>
   5764 
   5765 From wmorgan-sup@masanjin.net  Mon Feb 25 12:38:28 2008
   5766 From: wmorgan-sup@masanjin.net (William Morgan)
   5767 Date: Mon, 25 Feb 2008 09:38:28 -0800
   5768 Subject: [sup-talk] nonblocking_getch
   5769 In-Reply-To: <3902af2f0802202043r3c8a98ablabf458d0a99937b3@mail.gmail.com>
   5770 References: <3902af2f0802202043r3c8a98ablabf458d0a99937b3@mail.gmail.com>
   5771 Message-ID: <1203959878-sup-6905@south>
   5772 
   5773 Reformatted excerpts from Daniel Hilton's message of 2008-02-20:
   5774 > I've got a solution that works on my system, adding
   5775 > 'Ncurses.stdscr.nodelay1' to start_cursing, and modifying
   5776 > nonblocking_getch as follows:
   5777 > 
   5778 >   def nonblocking_getch
   5779 >     if IO.select([$stdin], nil, nil, 1)
   5780 >       repeat = c = Ncurses.getch
   5781 >       repeat = Ncurses.getch until repeat != c
   5782 >       c
   5783 >     else
   5784 >       nil
   5785 >     end
   5786 >   end
   5787 
   5788 Thanks, I'm going to play around with this. If you feel like learning
   5789 git-format-patch (the wiki has some instructions), you can get your name
   5790 in the commit log (ooohhh!).
   5791 
   5792 > As a side note: having added nodelay, there doesn't seem to be any
   5793 > real reason we would need to keep the IO.select... but in my brief
   5794 > experimentation I found various unpleasant side-effects when I tried
   5795 > to remove it. I guess it doesn't hurt anything to leave it in.
   5796 
   5797 Yeah, the entire ncurses setup is completely cargo-cult programming. I
   5798 have no idea why it works, and changing any bit of it breaks everything
   5799 in weird ways.
   5800 
   5801 -- 
   5802 William <wmorgan-sup at masanjin.net>
   5803 
   5804 From wmorgan-sup@masanjin.net  Mon Feb 25 12:41:57 2008
   5805 From: wmorgan-sup@masanjin.net (William Morgan)
   5806 Date: Mon, 25 Feb 2008 09:41:57 -0800
   5807 Subject: [sup-talk] OR query does not yield any result
   5808 In-Reply-To: <1203497807-sup-2137@alioth.gs-lab.com>
   5809 References: <47A169A5.30801@gslab.com> <1203443545-sup-3261@south>
   5810 	<1203497807-sup-2137@alioth.gs-lab.com>
   5811 Message-ID: <1203961283-sup-5515@south>
   5812 
   5813 Reformatted excerpts from Manish Sapariya's message of 2008-02-20:
   5814 > Here are the snippets from log and output of devel/console.sh query.
   5815 
   5816 Thanks! Try in the current git. I think this was due to the
   5817 query normalization, which I've removed.
   5818 
   5819 -- 
   5820 William <wmorgan-sup at masanjin.net>
   5821 
   5822 From guillaume.quintard@gmail.com  Mon Feb 25 12:42:30 2008
   5823 From: guillaume.quintard@gmail.com (Guillaume Quintard)
   5824 Date: Mon, 25 Feb 2008 09:42:30 -0800
   5825 Subject: [sup-talk] filter question
   5826 In-Reply-To: <1203958719-sup-6567@south>
   5827 References: <1203801642-sup-8748@altis> <1203893761-sup-560@south>
   5828 	<1203898237-sup-1505@altis> <1203916279-sup-3593@south>
   5829 	<1203920420-sup-2769@altis> <1203958719-sup-6567@south>
   5830 Message-ID: <1203961236-sup-7427@altis>
   5831 
   5832 Excerpts from William Morgan's message of Mon Feb 25 09:02:19 -0800 2008:
   5833 > There's no way in the GUI, at least currently. I would like to have a
   5834 > way, but I'm not sure what the interface would look like.
   5835 
   5836 why not using the same bar as for encryption, and reply-to choices ?
   5837 
   5838 -- 
   5839 Guillaume
   5840 
   5841 From wmorgan-sup@masanjin.net  Mon Feb 25 12:48:19 2008
   5842 From: wmorgan-sup@masanjin.net (William Morgan)
   5843 Date: Mon, 25 Feb 2008 09:48:19 -0800
   5844 Subject: [sup-talk] [PATCH] shell commands are now run in a child process
   5845 Message-ID: <1203961671-sup-8158@south>
   5846 
   5847 Reformatted excerpts from Christopher Warrington's message of 2008-02-20:
   5848 > I wouldn't right now. I was getting ruby seg. faults with the code I
   5849 > submitted and ruby 1.8.6 (ruby bug? I don't know). Changing to code
   5850 > that closes open files descriptors until the first invalid file
   5851 > descriptor is encountered closes enough that I don't get the crash,
   5852 > but also doesn't cause a seg. fault.
   5853 
   5854 Well, this wouldn't be the most cargo-cultish code that's in Sup. (See
   5855 previous message about ncurses.)
   5856 
   5857 I'll keep this patch on the back burner, then, until we have a little
   5858 more experience. Is anyone else out there using Cygwin?
   5859 
   5860 -- 
   5861 William <wmorgan-sup at masanjin.net>
   5862 
   5863 From vasudeva@linkswarm.com  Mon Feb 25 12:53:02 2008
   5864 From: vasudeva@linkswarm.com (vasudeva)
   5865 Date: Mon, 25 Feb 2008 12:53:02 -0500
   5866 Subject: [sup-talk] sup-sync-back reports: Nothing to do
   5867 In-Reply-To: <1203959676-sup-1952@south>
   5868 References: <1203639414-sup-3734@lenin> <1203959676-sup-1952@south>
   5869 Message-ID: <1203961949-sup-3973@lenin>
   5870 
   5871 Excerpts from William Morgan's message of Mon Feb 25 12:17:28 -0500 2008:
   5872 > Reformatted excerpts from vasudeva's message of 2008-02-21:
   5873 > > Nothing to do.
   5874 > 
   5875 > I've improved this message in git. You need to specify least one of
   5876 > --drop-deleted, --move-deleted, --drop-spam, or --move-spam.
   5877 
   5878 Thanks -- that was it.
   5879 
   5880 
   5881 
   5882 
   5883 -- 
   5884 linkswarm.com :: Collaborative Insolence
   5885 vasudeva.linkswarm.com/gallery :: For The Faint of Heart
   5886 
   5887 
   5888 From marcus-sup@bar-coded.net  Mon Feb 25 15:50:09 2008
   5889 From: marcus-sup@bar-coded.net (Marcus Williams)
   5890 Date: Mon, 25 Feb 2008 20:50:09 +0000
   5891 Subject: [sup-talk] [PATCH] First draft of attachment processing for more
   5892 	gmail style searches
   5893 Message-ID: <1203972458-sup-5906@tomsk>
   5894 
   5895 This patch adds the search terms "filename" and "filetype". This changes
   5896 the index so requires a sup-sync --all to work properly, but should work
   5897 on all new messages without it. You can now search for something like
   5898 "from:phil* filetype:pdf" for all messages from a person called phil
   5899 with a pdf attachment. You can also specify a file name for the
   5900 attachment with "filename:(this is a filename with spaces.txt)". You
   5901 can use wildcards in the filename ("filename:test*.pdf").
   5902 ---
   5903  lib/sup/index.rb   |   15 +++++++++++++++
   5904  lib/sup/message.rb |    7 ++++++-
   5905  2 files changed, 21 insertions(+), 1 deletions(-)
   5906 
   5907 diff --git a/lib/sup/index.rb b/lib/sup/index.rb
   5908 index f812fc7..4205f2a 100644
   5909 --- a/lib/sup/index.rb
   5910 +++ b/lib/sup/index.rb
   5911 @@ -147,6 +147,7 @@ EOS
   5912        field_infos.add_field :date, :index => :untokenized
   5913        field_infos.add_field :body
   5914        field_infos.add_field :label
   5915 +      field_infos.add_field :attachments
   5916        field_infos.add_field :subject
   5917        field_infos.add_field :from
   5918        field_infos.add_field :to
   5919 @@ -198,6 +199,7 @@ EOS
   5920        :body => (entry[:body] || m.indexable_content),
   5921        :snippet => snippet, # always override
   5922        :label => m.labels.uniq.join(" "), # always override
   5923 +      :attachments => (entry[:attachments] || m.attachments.uniq.join(" ")),
   5924        :from => (entry[:from] || (m.from ? m.from.indexable_content : "")),
   5925        :to => (entry[:to] || (m.to + m.cc + m.bcc).map { |x| x.indexable_content }.join(" ")),
   5926        :subject => (entry[:subject] || wrap_subj(m.subj)),
   5927 @@ -452,6 +454,19 @@ protected
   5928        end
   5929      end
   5930  
   5931 +    ## gmail style attachments "filename" and "filetype" searches
   5932 +    subs = subs.gsub(/\b(filename|filetype):(\((.+?)\)\B|(\S+)\b)/) do
   5933 +      field, name = $1, ($3 || $4)
   5934 +      case field
   5935 +      when "filename"
   5936 +        Redwood::log "filename - translated #{field}:#{name} to attachments:(#{name.downcase})"
   5937 +        "attachments:(#{name.downcase})"
   5938 +      when "filetype"
   5939 +        Redwood::log "filetype - translated #{field}:#{name} to attachments:(*.#{name.downcase})"
   5940 +        "attachments:(*.#{name.downcase})"
   5941 +      end
   5942 +    end
   5943 +
   5944      if $have_chronic
   5945        chronic_failure = false
   5946        subs = subs.gsub(/\b(before|on|in|during|after):(\((.+?)\)\B|(\S+)\b)/) do
   5947 diff --git a/lib/sup/message.rb b/lib/sup/message.rb
   5948 index 6a2a9c4..480f52c 100644
   5949 --- a/lib/sup/message.rb
   5950 +++ b/lib/sup/message.rb
   5951 @@ -37,7 +37,7 @@ class Message
   5952    DEFAULT_SENDER = "(missing sender)"
   5953  
   5954    attr_reader :id, :date, :from, :subj, :refs, :replytos, :to, :source,
   5955 -              :cc, :bcc, :labels, :list_address, :recipient_email, :replyto,
   5956 +              :cc, :bcc, :labels, :attachments, :list_address, :recipient_email, :replyto,
   5957                :source_info, :list_subscribe, :list_unsubscribe
   5958  
   5959    bool_reader :dirty, :source_marked_read, :snippet_contains_encrypted_content
   5960 @@ -54,6 +54,7 @@ class Message
   5961      @dirty = false
   5962      @encrypted = false
   5963      @chunks = nil
   5964 +    @attachments = []
   5965  
   5966      ## we need to initialize this. see comments in parse_header as to
   5967      ## why.
   5968 @@ -405,6 +406,10 @@ private
   5969  
   5970        ## if there's a filename, we'll treat it as an attachment.
   5971        if filename
   5972 +        # add this to the attachments list if its not a generated html
   5973 +        # attachment (should we allow images with generated names?).
   5974 +        # Lowercase the filename because searches are easier that way 
   5975 +        @attachments.push filename.downcase unless filename =~ /^sup-attachment-/
   5976          [Chunk::Attachment.new(m.header.content_type, filename, m, sibling_types)]
   5977  
   5978        ## otherwise, it's body text
   5979 -- 
   5980 1.5.3.7
   5981 
   5982 
   5983 From teatime@gmx.com  Tue Feb 26 22:40:54 2008
   5984 From: teatime@gmx.com (Jan Spakula)
   5985 Date: Tue, 26 Feb 2008 21:40:54 -0600
   5986 Subject: [sup-talk] gpg signing issue
   5987 Message-ID: <1204081553-sup-4470@aconcagua>
   5988 
   5989 Hello,
   5990 
   5991 I have an issue with gpg signing emails with sup. The header of sent
   5992 emails look like this:
   5993 Content-Type: multipart/signed; protocol=""application/pgp-signature""; boundary="=-1204074034-949437-9467-7738-1-="; micalg="pgp-sha1"
   5994 Note the double quotation marks around
   5995 application/pgp-signature. (I checked it in the "Sent", and of course on
   5996 my other e-mail account.) Apparently they throw off at least mutt and
   5997 claws-mail, so that they don't recognize the protocol for the
   5998 attachment. However, if I manually edit the header to have only one set
   5999 of quotation marks, the signature is recognized.
   6000 
   6001 I took a peek on the sources (crypto.rb), and I don't know how the
   6002 double quotation marks could be created. Anybody else having this
   6003 problem?
   6004 
   6005 Thanks,
   6006   Jan
   6007 
   6008 ---
   6009  . gpg key: http://freeshell.de/~teatime/teatime.sig
   6010 -------------- next part --------------
   6011 A non-text attachment was scrubbed...
   6012 Name: signature.asc
   6013 Type: application/pgp-signature
   6014 Size: 197 bytes
   6015 Desc: not available
   6016 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080226/134de07a/attachment.bin 
   6017 
   6018 From nicolas.pouillard@gmail.com  Wed Feb 27 03:39:38 2008
   6019 From: nicolas.pouillard@gmail.com (Nicolas Pouillard)
   6020 Date: Wed, 27 Feb 2008 09:39:38 +0100
   6021 Subject: [sup-talk] gpg signing issue
   6022 In-Reply-To: <1204081553-sup-4470@aconcagua>
   6023 References: <1204081553-sup-4470@aconcagua>
   6024 Message-ID: <1204101423-sup-3529@ausone.inria.fr>
   6025 
   6026 Excerpts from Jan Spakula's message of Wed Feb 27 04:40:54 +0100 2008:
   6027 > Hello,
   6028 > 
   6029 > I have an issue with gpg signing emails with sup. The header of sent
   6030 > emails look like this:
   6031 > Content-Type: multipart/signed; protocol=""application/pgp-signature""; boundary="=-1204074034-949437-9467-7738-1-="; micalg="pgp-sha1"
   6032 > Note the double quotation marks around
   6033 > application/pgp-signature. (I checked it in the "Sent", and of course on
   6034 > my other e-mail account.) Apparently they throw off at least mutt and
   6035 > claws-mail, so that they don't recognize the protocol for the
   6036 > attachment. However, if I manually edit the header to have only one set
   6037 > of quotation marks, the signature is recognized.
   6038 > 
   6039 > I took a peek on the sources (crypto.rb), and I don't know how the
   6040 > double quotation marks could be created. Anybody else having this
   6041 > problem?
   6042 
   6043 That's  a  ruby-mail  bug  with  a  working patch [1], however ruby-mail is no
   6044 longer actively maintained :(
   6045 
   6046 [1]: "[2661] set_boundary doubles quotes in params which already contained a quote"
   6047 http://rubyforge.org/tracker/index.php?func=detail&aid=2661&group_id=446&atid=1756
   6048 
   6049 -- 
   6050 Nicolas Pouillard aka Ertai
   6051 -------------- next part --------------
   6052 A non-text attachment was scrubbed...
   6053 Name: signature.asc
   6054 Type: application/pgp-signature
   6055 Size: 194 bytes
   6056 Desc: not available
   6057 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080227/94488b5f/attachment.bin 
   6058 
   6059 From marcus-sup@bar-coded.net  Wed Feb 27 10:19:03 2008
   6060 From: marcus-sup@bar-coded.net (Marcus Williams)
   6061 Date: Wed, 27 Feb 2008 15:19:03 +0000
   6062 Subject: [sup-talk] new in next: faster saving and bigger indexes
   6063 In-Reply-To: <1203871982-sup-7942@south>
   6064 References: <1203871982-sup-7942@south>
   6065 Message-ID: <1204125329-sup-6077@tomsk>
   6066 
   6067 On 24.2.2008, William Morgan wrote:
   6068 > The change was made in such a way that it's incrementally applied
   6069 > whenever a message is saved or changed in the Ferret index.
   6070 
   6071 I'm not sure if this is down to this change in next or not but I'm
   6072 seeing an oddity with mail lists where my outgoing message (in sent)
   6073 doesnt get updated by the incoming message (from the mail list).
   6074 
   6075 An example might be clearer - I send a message to sup-talk and I get a
   6076 copy of my sent message in my inbox. I then get the same message sent
   6077 back to me from sup-talk and what used to happen is the headers would
   6078 update to the new incoming message (and all my hooks would kick in).
   6079 My recent messages to sup-talk dont seem to be doing this.
   6080 
   6081 So... either a recent change has caused this or sup-talk is now not
   6082 delivering copies of my messages to me (which is certainly a mailman
   6083 option).
   6084 
   6085 Any ideas?
   6086 
   6087 Marcus
   6088 
   6089 From wmorgan-sup@masanjin.net  Wed Feb 27 12:16:42 2008
   6090 From: wmorgan-sup@masanjin.net (William Morgan)
   6091 Date: Wed, 27 Feb 2008 09:16:42 -0800
   6092 Subject: [sup-talk] new in next: faster saving and bigger indexes
   6093 In-Reply-To: <1204125329-sup-6077@tomsk>
   6094 References: <1203871982-sup-7942@south> <1204125329-sup-6077@tomsk>
   6095 Message-ID: <1204132459-sup-1072@south>
   6096 
   6097 Reformatted excerpts from Marcus Williams's message of 2008-02-27:
   6098 > I'm not sure if this is down to this change in next or not but I'm
   6099 > seeing an oddity with mail lists where my outgoing message (in sent)
   6100 > doesnt get updated by the incoming message (from the mail list).
   6101 
   6102 Good catch. This is an unintented consequence of that change. I'm seeing
   6103 it too. I'll work on a fix---I have an idea and I don't think it will
   6104 be too hard.
   6105 
   6106 In the mean time, feel free to git reset to back to before that commit. :)
   6107 
   6108 -- 
   6109 William <wmorgan-sup at masanjin.net>
   6110 
   6111 From wmorgan-sup@masanjin.net  Wed Feb 27 12:50:37 2008
   6112 From: wmorgan-sup@masanjin.net (William Morgan)
   6113 Date: Wed, 27 Feb 2008 09:50:37 -0800
   6114 Subject: [sup-talk] gpg signing issue
   6115 In-Reply-To: <1204101423-sup-3529@ausone.inria.fr>
   6116 References: <1204081553-sup-4470@aconcagua>
   6117 	<1204101423-sup-3529@ausone.inria.fr>
   6118 Message-ID: <1204134542-sup-7286@south>
   6119 
   6120 Reformatted excerpts from nicolas.pouillard's message of 2008-02-27:
   6121 > That's  a  ruby-mail  bug  with  a  working patch [1], however
   6122 > ruby-mail is no longer actively maintained :(
   6123 
   6124 I did hear from Matt Armstrong recently that he was starting to maintain
   6125 it again. At least, he released a 1.0.0 last month that has Ruby 1.9
   6126 modifications. But nothing since.
   6127 
   6128 > [1]: "[2661] set_boundary doubles quotes in params which already contained a
   6129 > quote"
   6130 > http://rubyforge.org/tracker/index.php?func=detail&aid=2661&group_id=446&atid=1756
   6131 
   6132 Does the following workaround help? (Completely untested.)
   6133 
   6134 diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb
   6135 index 9e16132..ee06958 100644
   6136 --- a/lib/sup/crypto.rb
   6137 +++ b/lib/sup/crypto.rb
   6138 @@ -40,7 +40,7 @@ class CryptoManager
   6139      raise Error, (output || "gpg command failed: #{cmd}") unless $?.success?
   6140  
   6141      envelope = RMail::Message.new
   6142 -    envelope.header["Content-Type"] = 'multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1'
   6143 +    envelope.header["Content-Type"] = 'multipart/signed; protocol=application/pgp-signature; micalg=pgp-sha1'
   6144  
   6145      envelope.add_part payload
   6146      signature = RMail::Message.make_attachment output, "application/pgp-signature", nil, "signature.asc"
   6147 
   6148 
   6149 -- 
   6150 William <wmorgan-sup at masanjin.net>
   6151 
   6152 From chrisw@rice.edu  Wed Feb 27 13:55:12 2008
   6153 From: chrisw@rice.edu (Christopher Warrington)
   6154 Date: Wed, 27 Feb 2008 12:55:12 -0600
   6155 Subject: [sup-talk] new in next: faster saving and bigger indexes
   6156 In-Reply-To: <1203871982-sup-7942@south>
   6157 References: <1203871982-sup-7942@south>
   6158 Message-ID: <1204138450-sup-1391@chris-tablet>
   6159 
   6160 Excerpts from William Morgan's message of Sun Feb 24 11:15:32 -0600 2008:
   6161 > There's also a potential next step here where no interaction with
   6162 > external sources is *ever* required except at poll time, which would
   6163 > mean IMAP would become actually useable. (The other option being
   6164 > just figure out why the Ruby IMAP library is so incredibly slow.)
   6165 
   6166 Now, we have offline(-ish) mode for IMAP. Horray! I can do e-mail on
   6167 the plane.
   6168 
   6169 -- 
   6170 Christopher Warrington <chrisw at rice.edu>
   6171 
   6172 From teatime@gmx.com  Wed Feb 27 13:56:07 2008
   6173 From: teatime@gmx.com (Jan Spakula)
   6174 Date: Wed, 27 Feb 2008 12:56:07 -0600
   6175 Subject: [sup-talk] gpg signing issue
   6176 In-Reply-To: <1204134542-sup-7286@south>
   6177 References: <1204081553-sup-4470@aconcagua>
   6178 	<1204101423-sup-3529@ausone.inria.fr> <1204134542-sup-7286@south>
   6179 Message-ID: <1204138293-sup-8382@aconcagua>
   6180 
   6181 Excerpts from William Morgan's message of Wed Feb 27 11:50:37 -0600 2008:
   6182 > Reformatted excerpts from nicolas.pouillard's message of 2008-02-27:
   6183 > > [1]: "[2661] set_boundary doubles quotes in params which already contained a
   6184 > > quote"
   6185 > > http://rubyforge.org/tracker/index.php?func=detail&aid=2661&group_id=446&atid=1756
   6186 > 
   6187 > Does the following workaround help? (Completely untested.)
   6188 > ...
   6189 
   6190 Yes, both fixes work. (Didn't try them simultaneusly though.)
   6191 
   6192 Thanks a lot,
   6193   Jan
   6194 
   6195 
   6196 
   6197 From marcus-sup@bar-coded.net  Wed Feb 27 17:40:57 2008
   6198 From: marcus-sup@bar-coded.net (Marcus Williams)
   6199 Date: Wed, 27 Feb 2008 22:40:57 +0000
   6200 Subject: [sup-talk] [PATCH] Additional attachment goodness...
   6201 Message-ID: <1204151850-sup-9501@tomsk>
   6202 
   6203 Adds hidden/reserved attachment label to track attachments. Also adds
   6204 new flag on thread index mode to denote an attachment '#'. This
   6205 extends the attachments patch sent earlier and is also against latest
   6206 'next'.  It will require another sup-sync -all to work against all
   6207 sources, but attempts to be backwards compatable with non-synced
   6208 sources. Adds a "has:attachment" search query.
   6209 ---
   6210  lib/sup/index.rb                   |    2 +-
   6211  lib/sup/label.rb                   |    6 +++---
   6212  lib/sup/message.rb                 |    1 +
   6213  lib/sup/modes/thread-index-mode.rb |    3 ++-
   6214  4 files changed, 7 insertions(+), 5 deletions(-)
   6215 
   6216 diff --git a/lib/sup/index.rb b/lib/sup/index.rb
   6217 index 4205f2a..bb70328 100644
   6218 --- a/lib/sup/index.rb
   6219 +++ b/lib/sup/index.rb
   6220 @@ -438,7 +438,7 @@ protected
   6221      extraopts[:load_deleted] = true if subs =~ /\blabel:deleted\b/
   6222  
   6223      ## gmail style "is" operator
   6224 -    subs = subs.gsub(/\b(is):(\S+)\b/) do
   6225 +    subs = subs.gsub(/\b(is|has):(\S+)\b/) do
   6226        field, label = $1, $2
   6227        case label
   6228        when "read"
   6229 diff --git a/lib/sup/label.rb b/lib/sup/label.rb
   6230 index 4afc0f9..716ef98 100644
   6231 --- a/lib/sup/label.rb
   6232 +++ b/lib/sup/label.rb
   6233 @@ -5,13 +5,13 @@ class LabelManager
   6234  
   6235    ## labels that have special semantics. user will be unable to
   6236    ## add/remove these via normal label mechanisms.
   6237 -  RESERVED_LABELS = [ :starred, :spam, :draft, :unread, :killed, :sent, :deleted, :inbox ]
   6238 +  RESERVED_LABELS = [ :starred, :spam, :draft, :unread, :killed, :sent, :deleted, :inbox, :attachment ]
   6239  
   6240    ## labels which it nonetheless makes sense to search for by
   6241 -  LISTABLE_RESERVED_LABELS = [ :starred, :spam, :draft, :sent, :killed, :deleted, :inbox ]
   6242 +  LISTABLE_RESERVED_LABELS = [ :starred, :spam, :draft, :sent, :killed, :deleted, :inbox, :attachment ]
   6243  
   6244    ## labels that will typically be hidden from the user
   6245 -  HIDDEN_RESERVED_LABELS = [ :starred, :unread ]
   6246 +  HIDDEN_RESERVED_LABELS = [ :starred, :unread, :attachment ]
   6247  
   6248    def initialize fn
   6249      @fn = fn
   6250 diff --git a/lib/sup/message.rb b/lib/sup/message.rb
   6251 index 480f52c..2be779c 100644
   6252 --- a/lib/sup/message.rb
   6253 +++ b/lib/sup/message.rb
   6254 @@ -410,6 +410,7 @@ private
   6255          # attachment (should we allow images with generated names?).
   6256          # Lowercase the filename because searches are easier that way 
   6257          @attachments.push filename.downcase unless filename =~ /^sup-attachment-/
   6258 +        add_label :attachment unless filename =~ /^sup-attachment-/
   6259          [Chunk::Attachment.new(m.header.content_type, filename, m, sibling_types)]
   6260  
   6261        ## otherwise, it's body text
   6262 diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
   6263 index 7a0b815..1b2c0d7 100644
   6264 --- a/lib/sup/modes/thread-index-mode.rb
   6265 +++ b/lib/sup/modes/thread-index-mode.rb
   6266 @@ -713,7 +713,8 @@ protected
   6267        from +
   6268        [
   6269        [subj_color, size_widget_text],
   6270 -      [:to_me_color, dp ? " >" : (p ? ' +' : "  ")],
   6271 +      [:to_me_color, t.labels.member?(:attachment) ? "#" : " "],
   6272 +      [:to_me_color, dp ? ">" : (p ? '+' : " ")],
   6273        [subj_color, t.subj + (t.subj.empty? ? "" : " ")],
   6274      ] +
   6275        (t.labels - @hidden_labels).map { |label| [:label_color, "+#{label} "] } +
   6276 -- 
   6277 1.5.4.1
   6278 
   6279 
   6280 From 5srmspw02@sneakemail.com  Wed Feb 27 21:29:39 2008
   6281 From: 5srmspw02@sneakemail.com (Guarded Identity)
   6282 Date: Wed, 27 Feb 2008 20:29:39 -0600
   6283 Subject: [sup-talk] Boolean "OR" operator in query?
   6284 Message-ID: <15896-58934@sneakemail.com>
   6285 
   6286 Hi,
   6287 
   6288 I'm using the latest git Sup, and I tried to do the following query:
   6289 
   6290     label:admin OR label:info
   6291 
   6292 Here's an excerpt from the log (a little formatting to dodge wrapping)
   6293 
   6294     Wed Feb 27 19:49:18 -0600 2008:
   6295         normalized "label:admin OR label:info" to "label:admin label:info"
   6296 
   6297     Wed Feb 27 19:49:18 -0600 2008:
   6298         got 1 results for query (offset 0) +(+label:admin +label:info)
   6299         -label:spam -label:deleted
   6300 
   6301 It's pretty clear the boolean operators are getting dropped.  It also easy to
   6302 find the section of code in index.rb that's doing this conversion.  I read a
   6303 little of the Ferret API and also some of the comments in
   6304 Redwood::Index.parse_user_query_string, but I've not yet reached an
   6305 understanding of why the operators are being dropped.
   6306 
   6307 So I got lazy and thought I'd ask the list because I'd like to have the ability
   6308 to have disjunctions in queries.
   6309 
   6310 Thanks for your help,
   6311 Sukant
   6312 
   6313 From wmorgan-sup@masanjin.net  Thu Feb 28 11:59:37 2008
   6314 From: wmorgan-sup@masanjin.net (William Morgan)
   6315 Date: Thu, 28 Feb 2008 08:59:37 -0800
   6316 Subject: [sup-talk] Boolean "OR" operator in query?
   6317 In-Reply-To: <15896-58934@sneakemail.com>
   6318 References: <15896-58934@sneakemail.com>
   6319 Message-ID: <1204217919-sup-212@south>
   6320 
   6321 Reformatted excerpts from Guarded Identity's message of 2008-02-27:
   6322 > So I got lazy and thought I'd ask the list because I'd like to have
   6323 > the ability to have disjunctions in queries.
   6324 
   6325 The latest git next has the query normalization stuff removed because it
   6326 was breaking several things, including this.
   6327 
   6328 -- 
   6329 William <wmorgan-sup at masanjin.net>
   6330 
   6331 From wmorgan-sup@masanjin.net  Thu Feb 28 12:02:46 2008
   6332 From: wmorgan-sup@masanjin.net (William Morgan)
   6333 Date: Thu, 28 Feb 2008 09:02:46 -0800
   6334 Subject: [sup-talk] [PATCH] Additional attachment goodness...
   6335 In-Reply-To: <1204151850-sup-9501@tomsk>
   6336 References: <1204151850-sup-9501@tomsk>
   6337 Message-ID: <1204218028-sup-7748@south>
   6338 
   6339 Reformatted excerpts from Marcus Williams's message of 2008-02-27:
   6340 > Adds hidden/reserved attachment label to track attachments. Also adds
   6341 > new flag on thread index mode to denote an attachment '#'.
   6342 
   6343 The attachment icon should clearly be the little ASCII paperclip, "@"!
   6344 Who's with me?
   6345 
   6346 -- 
   6347 William <wmorgan-sup at masanjin.net>
   6348 
   6349 From wmorgan-sup@masanjin.net  Thu Feb 28 12:09:55 2008
   6350 From: wmorgan-sup@masanjin.net (William Morgan)
   6351 Date: Thu, 28 Feb 2008 09:09:55 -0800
   6352 Subject: [sup-talk] gpg signing issue
   6353 In-Reply-To: <1204138293-sup-8382@aconcagua>
   6354 References: <1204081553-sup-4470@aconcagua>
   6355 	<1204101423-sup-3529@ausone.inria.fr>
   6356 	<1204134542-sup-7286@south> <1204138293-sup-8382@aconcagua>
   6357 Message-ID: <1204218343-sup-313@south>
   6358 
   6359 Reformatted excerpts from Jan Spakula's message of 2008-02-27:
   6360 > Yes, both fixes work. (Didn't try them simultaneusly though.)
   6361 
   6362 Ok, I'm going to merge this into both next and master.
   6363 
   6364 -- 
   6365 William <wmorgan-sup at masanjin.net>
   6366 
   6367 From wmorgan-sup@masanjin.net  Thu Feb 28 12:23:29 2008
   6368 From: wmorgan-sup@masanjin.net (William Morgan)
   6369 Date: Thu, 28 Feb 2008 09:23:29 -0800
   6370 Subject: [sup-talk] new in next: faster saving and bigger indexes
   6371 In-Reply-To: <1204138450-sup-1391@chris-tablet>
   6372 References: <1203871982-sup-7942@south> <1204138450-sup-1391@chris-tablet>
   6373 Message-ID: <1204219351-sup-3340@south>
   6374 
   6375 Reformatted excerpts from Christopher Warrington's message of 2008-02-27:
   6376 > Now, we have offline(-ish) mode for IMAP. Horray! I can do e-mail on
   6377 > the plane.
   6378 
   6379 You could always have used offlineimap. :)
   6380 
   6381 -- 
   6382 William <wmorgan-sup at masanjin.net>
   6383 
   6384 From wmorgan-sup@masanjin.net  Thu Feb 28 12:29:49 2008
   6385 From: wmorgan-sup@masanjin.net (William Morgan)
   6386 Date: Thu, 28 Feb 2008 09:29:49 -0800
   6387 Subject: [sup-talk] [PATCH] Unwrap br0ken URLs.
   6388 In-Reply-To: <12034162702820-git-send-email-nicolas.pouillard@gmail.com>
   6389 References: <12034162702820-git-send-email-nicolas.pouillard@gmail.com>
   6390 Message-ID: <1204219598-sup-1190@south>
   6391 
   6392 I would love to have a feature like this in Sup. This patch still has
   6393 some issues in terms of being over-aggressive. What I would really like
   6394 to see as a starting point is a corpus of broken URL examples that we
   6395 can build unit tests of. Then we can tweak these regexes until we get
   6396 something that has both high precision and high recall.
   6397 
   6398 Also, have you looked at URI.regexp? I think that can do a lot of the
   6399 dirty work.
   6400 
   6401 -- 
   6402 William <wmorgan-sup at masanjin.net>
   6403 
   6404 From wmorgan-sup@masanjin.net  Thu Feb 28 12:40:35 2008
   6405 From: wmorgan-sup@masanjin.net (William Morgan)
   6406 Date: Thu, 28 Feb 2008 09:40:35 -0800
   6407 Subject: [sup-talk] [PATCH] First draft of attachment processing for
   6408 	more gmail style searches
   6409 In-Reply-To: <1203972458-sup-5906@tomsk>
   6410 References: <1203972458-sup-5906@tomsk>
   6411 Message-ID: <1204220051-sup-129@south>
   6412 
   6413 Reformatted excerpts from Marcus Williams's message of 2008-02-25:
   6414 > This patch adds the search terms "filename" and "filetype". This
   6415 > changes the index so requires a sup-sync --all to work properly, but
   6416 > should work on all new messages without it.
   6417 
   6418 Just reading the patch without having applied it yet, this looks pretty
   6419 good. To answer the question in the comments, attachments with generated
   6420 names are things that are meant to be displayed inline, not
   6421 "download-worthy attachments", so I don't think they should be included
   6422 in the list of attachments. (Sup only generates a name for them to allow
   6423 external viewing programs to view them.) So I think the current
   6424 implementation is correct on that point.
   6425 
   6426 -- 
   6427 William <wmorgan-sup at masanjin.net>
   6428 
   6429 From wmorgan-sup@masanjin.net  Thu Feb 28 12:43:09 2008
   6430 From: wmorgan-sup@masanjin.net (William Morgan)
   6431 Date: Thu, 28 Feb 2008 09:43:09 -0800
   6432 Subject: [sup-talk] filter question
   6433 In-Reply-To: <1203961236-sup-7427@altis>
   6434 References: <1203801642-sup-8748@altis> <1203893761-sup-560@south>
   6435 	<1203898237-sup-1505@altis> <1203916279-sup-3593@south>
   6436 	<1203920420-sup-2769@altis> <1203958719-sup-6567@south>
   6437 	<1203961236-sup-7427@altis>
   6438 Message-ID: <1204220447-sup-3859@south>
   6439 
   6440 Reformatted excerpts from Guillaume Quintard's message of 2008-02-25:
   6441 > Excerpts from William Morgan's message of Mon Feb 25 09:02:19 -0800 2008:
   6442 > > There's no way in the GUI, at least currently. I would like to have
   6443 > > a way, but I'm not sure what the interface would look like.
   6444 > 
   6445 > why not using the same bar as for encryption, and reply-to choices ?
   6446 
   6447 Well, the user might have 20 different accounts... horizontal scrolling
   6448 just isn't going to cut it. Now that I've thought about it, the right
   6449 interface is probably to have a keystroke in edit-message-mode that
   6450 brings up a modal buffer with a list of all your account default email
   6451 addresses and allows you to select one. Then we can leverage Sup's
   6452 existing "vertical scrolling technology".
   6453 
   6454 Patches welcome. :)
   6455 
   6456 -- 
   6457 William <wmorgan-sup at masanjin.net>
   6458 
   6459 From wmorgan-sup@masanjin.net  Thu Feb 28 13:25:45 2008
   6460 From: wmorgan-sup@masanjin.net (William Morgan)
   6461 Date: Thu, 28 Feb 2008 10:25:45 -0800
   6462 Subject: [sup-talk] new in next: faster saving and bigger indexes
   6463 In-Reply-To: <1204132459-sup-1072@south>
   6464 References: <1203871982-sup-7942@south> <1204125329-sup-6077@tomsk>
   6465 	<1204132459-sup-1072@south>
   6466 Message-ID: <1204223070-sup-8156@south>
   6467 
   6468 Reformatted excerpts from William Morgan's message of 2008-02-27:
   6469 > Good catch. This is an unintented consequence of that change. I'm
   6470 > seeing it too. I'll work on a fix---I have an idea and I don't think
   6471 > it will be too hard.
   6472 
   6473 I think I've solved this in next. Later versions of the same message
   6474 can overwrite previous versions, except for labels, which are merged in.
   6475 This should address a previous bug as well.
   6476 
   6477 Try it out and lmk. A sup-sync --changed should fix everything.
   6478 (Make a backup first, of course!)
   6479 
   6480 -- 
   6481 William <wmorgan-sup at masanjin.net>
   6482 
   6483 From marcus-sup@bar-coded.net  Thu Feb 28 15:57:54 2008
   6484 From: marcus-sup@bar-coded.net (Marcus Williams)
   6485 Date: Thu, 28 Feb 2008 20:57:54 +0000
   6486 Subject: [sup-talk] [PATCH] Additional attachment goodness...
   6487 In-Reply-To: <1204218028-sup-7748@south>
   6488 References: <1204151850-sup-9501@tomsk> <1204218028-sup-7748@south>
   6489 Message-ID: <1204232067-sup-3518@tomsk>
   6490 
   6491 On 28.2.2008, William Morgan wrote:
   6492 > The attachment icon should clearly be the little ASCII paperclip, "@"!
   6493 > Who's with me?
   6494 
   6495 ... definitely! should have thought of that :)
   6496 
   6497 From marcus-sup@bar-coded.net  Thu Feb 28 16:15:42 2008
   6498 From: marcus-sup@bar-coded.net (Marcus Williams)
   6499 Date: Thu, 28 Feb 2008 21:15:42 +0000
   6500 Subject: [sup-talk] [PATCH] First draft of attachment processing for
   6501 	more gmail style searches
   6502 In-Reply-To: <1204220051-sup-129@south>
   6503 References: <1203972458-sup-5906@tomsk> <1204220051-sup-129@south>
   6504 Message-ID: <1204232994-sup-628@tomsk>
   6505 
   6506 On 28.2.2008, William Morgan wrote:
   6507 > Just reading the patch without having applied it yet, this looks pretty
   6508 > good. To answer the question in the comments, attachments with generated
   6509 > names are things that are meant to be displayed inline, not
   6510 > "download-worthy attachments", so I don't think they should be included
   6511 > in the list of attachments. 
   6512 
   6513 Guessed as much (had to sup-sync -all about 10 times on a large imap
   6514 account to figure this out though! - although this has made me move to
   6515 offlineimap and maildirs which are _much_ faster so I gained something
   6516 in the end :)
   6517 
   6518 The only thing I'm a little wary of is the join() I do of the
   6519 attachment filenames for the index (like labels). This means that
   6520 ferret doesnt actually know the difference between two files called
   6521 file1 and file2 and a single file called "file1 file2". Not sure it
   6522 matters that much for this usage though.
   6523 
   6524 Also I dont repopulate the attachments attribute on the message object
   6525 and I couldnt figure out quite how you do it for labels (through the
   6526 initialise?). Might be nice to be able to query the attachments field
   6527 as a list on a message object much like labels. This then brought me
   6528 back to the problem of how to deal with spaces in filenames. It might
   6529 be that I should use some other character for the join thats unlikely
   6530 to be in a filename. Not sure what though.
   6531 
   6532 Marcus
   6533 
   6534 From marcus-sup@bar-coded.net  Thu Feb 28 18:05:20 2008
   6535 From: marcus-sup@bar-coded.net (Marcus Williams)
   6536 Date: Thu, 28 Feb 2008 23:05:20 +0000
   6537 Subject: [sup-talk] new in next: faster saving and bigger indexes
   6538 In-Reply-To: <1204223070-sup-8156@south>
   6539 References: <1203871982-sup-7942@south> <1204125329-sup-6077@tomsk>
   6540 	<1204132459-sup-1072@south> <1204223070-sup-8156@south>
   6541 Message-ID: <1204239818-sup-9440@tomsk>
   6542 
   6543 On 28.2.2008, William Morgan wrote:
   6544 > I think I've solved this in next. 
   6545 
   6546 I just did an update but didnt get anything new other than the pgp
   6547 stuff. You sure its in next? :)
   6548 
   6549 Marcus
   6550 
   6551 From wmorgan-sup@masanjin.net  Thu Feb 28 19:28:22 2008
   6552 From: wmorgan-sup@masanjin.net (William Morgan)
   6553 Date: Thu, 28 Feb 2008 16:28:22 -0800
   6554 Subject: [sup-talk] new in next: faster saving and bigger indexes
   6555 In-Reply-To: <1204239818-sup-9440@tomsk>
   6556 References: <1203871982-sup-7942@south> <1204125329-sup-6077@tomsk>
   6557 	<1204132459-sup-1072@south> <1204223070-sup-8156@south>
   6558 	<1204239818-sup-9440@tomsk>
   6559 Message-ID: <1204244881-sup-2122@south>
   6560 
   6561 Reformatted excerpts from Marcus Williams's message of 2008-02-28:
   6562 > I just did an update but didnt get anything new other than the pgp
   6563 > stuff. You sure its in next? :)
   6564 
   6565 Should be: commit 28f7a766f32040f993af88dae9fe2d994a80f16c.
   6566 
   6567 -- 
   6568 William <wmorgan-sup at masanjin.net>
   6569 
   6570 From wmorgan-sup@masanjin.net  Thu Feb 28 20:27:27 2008
   6571 From: wmorgan-sup@masanjin.net (William Morgan)
   6572 Date: Thu, 28 Feb 2008 17:27:27 -0800
   6573 Subject: [sup-talk] new in next: faster saving and bigger indexes
   6574 In-Reply-To: <1204244881-sup-2122@south>
   6575 References: <1203871982-sup-7942@south> <1204125329-sup-6077@tomsk>
   6576 	<1204132459-sup-1072@south> <1204223070-sup-8156@south>
   6577 	<1204239818-sup-9440@tomsk> <1204244881-sup-2122@south>
   6578 Message-ID: <1204248415-sup-8393@south>
   6579 
   6580 Hah, I hadn't actually pushed it out yet. In the mean time I found
   6581 another bug, and fixed it, so... try now.
   6582 
   6583 -- 
   6584 William <wmorgan-sup at masanjin.net>
   6585 
   6586 From stipim@rpi.edu  Fri Feb 29 19:45:03 2008
   6587 From: stipim@rpi.edu (Mike Stipicevic)
   6588 Date: Fri, 29 Feb 2008 19:45:03 -0500
   6589 Subject: [sup-talk] error log
   6590 Message-ID: <000001c87b35$7d3a8750$0202a8c0@STIPIMT43p>
   6591 
   6592 Hello,
   6593 
   6594 I am an infrequent sup user and just started playing with its archive
   6595 abilities. I have not modified the local mailbox in any way until now when I
   6596 archived several messages. I then browsed the help screen a few times and
   6597 quit. While quitting, sup hung on "saving 2/17," using 0% of the cpu. I then
   6598 hit ctrl-C to terminate the program. I use Slackware 11, ruby 1.8.6, and sup
   6599 0.4 (rubygem)
   6600 
   6601 Here is the contents of sup-exception-log.txt
   6602 
   6603 
   6604 --- Interrupt from thread: main
   6605 
   6606 /usr/local/lib/ruby/1.8/monitor.rb:102:in `stop'
   6607 /usr/local/lib/ruby/1.8/monitor.rb:102:in `wait'
   6608 /usr/local/lib/ruby/1.8/net/imap.rb:967:in `get_tagged_response'
   6609 /usr/local/lib/ruby/1.8/net/imap.rb:1027:in `send_command'
   6610 /usr/local/lib/ruby/1.8/monitor.rb:238:in `synchronize'
   6611 /usr/local/lib/ruby/1.8/net/imap.rb:1012:in `send_command'
   6612 /usr/local/lib/ruby/1.8/net/imap.rb:1165:in `fetch_internal'
   6613 /usr/local/lib/ruby/1.8/monitor.rb:238:in `synchronize'
   6614 /usr/local/lib/ruby/1.8/net/imap.rb:1163:in `fetch_internal'
   6615 /usr/local/lib/ruby/1.8/net/imap.rb:707:in `fetch'
   6616 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:188:in `fetch'
   6617 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:302:in `safely'
   6618 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:188:in `fetch'
   6619 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:271:in
   6620 `get_imap_fields'
   6621 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:113:in
   6622 `unsynchronized_raw_message'
   6623 (eval):3:in `raw_message'
   6624 (eval):3:in `synchronize'
   6625 (eval):3:in `raw_message'
   6626 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:97:in
   6627 `load_message'
   6628 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:534:in `send'
   6629 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:534:in `__pass'
   6630 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:523:in
   6631 `method_missing'
   6632 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/message.rb:195:in
   6633 `load_from_source!'
   6634 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/message.rb:252:in
   6635 `content'
   6636 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:186:in
   6637 `sync_message'
   6638 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `send'
   6639 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in
   6640 `method_missing'
   6641 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/message.rb:149:in `save'
   6642 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/thread.rb:114:in `save'
   6643 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/thread.rb:66:in `each'
   6644 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/thread.rb:168:in
   6645 `each_with_stuff'
   6646 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/thread.rb:65:in `each'
   6647 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/thread.rb:114:in `save'
   6648 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb
   6649 :363:in `save'
   6650 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/hook.rb:123:in
   6651 `each_with_index'
   6652 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb
   6653 :361:in `each'
   6654 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb
   6655 :361:in `each_with_index'
   6656 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb
   6657 :361:in `save'
   6658 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:668:in `say'
   6659 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `send'
   6660 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in
   6661 `method_missing'
   6662 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb
   6663 :360:in `save'
   6664 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb
   6665 :377:in `cleanup'
   6666 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:387:in
   6667 `kill_buffer'
   6668 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:369:in
   6669 `kill_all_buffers_safely'
   6670 /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/bin/sup:229
   6671 /usr/local/bin/sup:16:in `load'
   6672 /usr/local/bin/sup:16
   6673 
   6674 
   6675 
   6676 Hope this helps,
   6677 - Mike
   6678 
   6679 --
   6680 Mike Stipicevic
   6681 Chairman, RPI Student Branch of the IEEE
   6682 
   6683 stipim at rpi.edu
   6684 mstipicevic at ieee.org
   6685 
   6686 
   6687 
   6688 From wmorgan-sup@masanjin.net  Fri Feb 29 23:16:21 2008
   6689 From: wmorgan-sup@masanjin.net (William Morgan)
   6690 Date: Fri, 29 Feb 2008 20:16:21 -0800
   6691 Subject: [sup-talk] error log
   6692 In-Reply-To: <000001c87b35$7d3a8750$0202a8c0@STIPIMT43p>
   6693 References: <000001c87b35$7d3a8750$0202a8c0@STIPIMT43p>
   6694 Message-ID: <1204344959-sup-6336@south>
   6695 
   6696 Reformatted excerpts from Mike Stipicevic's message of 2008-02-29:
   6697 > /usr/local/lib/ruby/1.8/monitor.rb:102:in `stop'
   6698 > /usr/local/lib/ruby/1.8/monitor.rb:102:in `wait'
   6699 > /usr/local/lib/ruby/1.8/net/imap.rb:967:in `get_tagged_response'
   6700 > /usr/local/lib/ruby/1.8/net/imap.rb:1027:in `send_command'
   6701 
   6702 Looks like a deadlock in the IMAP library. Wow. Scary!
   6703 
   6704 -- 
   6705 William <wmorgan-sup at masanjin.net>
   6706 
   6707 From chrisw@rice.edu  Fri Feb 29 23:42:09 2008
   6708 From: chrisw@rice.edu (Christopher Warrington)
   6709 Date: Fri, 29 Feb 2008 22:42:09 -0600
   6710 Subject: [sup-talk] [PATCH] shell commands are now run in a child process
   6711 In-Reply-To: <1203961671-sup-8158@south>
   6712 References: <1203961671-sup-8158@south>
   6713 Message-ID: <1645600603.20080229224209@rice.edu>
   6714 
   6715 
   6716 William Morgan @ 2008-2-25 11:48:19 AM
   6717 "[sup-talk] [PATCH] shell commands are now run in a child process" <mid:1203961671-sup-8158 at south>
   6718 
   6719 I've been getting more of these when playing with offlineimap. I
   6720 submitted a bug upstream:
   6721 http://ferret.davebalmain.com/trac/ticket/343
   6722 
   6723 -- 
   6724 Christopher Warrington <chrisw at rice.edu>
   6725 
   6726 Today's Oxymoron: Twelve-ounce pound cake
   6727 -------------- next part --------------
   6728 A non-text attachment was scrubbed...
   6729 Name: not available
   6730 Type: application/pgp-signature
   6731 Size: 183 bytes
   6732 Desc: not available
   6733 Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080229/bc3669a5/attachment.bin 
   6734