sup

A curses threads-with-tags style email client

sup-website.git

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

community/pipermail-archives/sup-devel/2010-05.txt (49256B) - raw

      1 From sup-bugs@masanjin.net  Mon May  3 15:40:16 2010
      2 From: sup-bugs@masanjin.net (anonymous)
      3 Date: Mon, 03 May 2010 19:40:16 +0000
      4 Subject: [sup-devel] [issue98] `force_encoding': can't modify frozen string
      5 	(RuntimeError)	- On first start
      6 In-Reply-To: <1272915616.88.0.00422065712816.issue98@masanjin.net>
      7 Message-ID: <1272915616.88.0.00422065712816.issue98@masanjin.net>
      8 
      9 
     10 New submission from anonymous:
     11 
     12 Hello,
     13 If I start sup or sup-config the very first time, the following error occurs:
     14 
     15 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:53:in
     16 `force_encoding': can't modify frozen string (RuntimeError)
     17 	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:53:in `block in
     18 add_account'
     19 	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:53:in `each'
     20 	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:53:in `add_account'
     21 	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:37:in `initialize'
     22 	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/util.rb:574:in `new'
     23 	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/util.rb:574:in `init'
     24 	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup.rb:126:in `start'
     25 	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/bin/sup-config:115:in `<top
     26 (required)>'
     27 	from /usr/bin/sup-config:19:in `load'
     28 	from /usr/bin/sup-config:19:in `<main>'
     29 
     30 If I then run the command again, it is working, thus there exists an ~/.sup
     31 directory. I can reproduce this error by removing the ~/.sup directory and
     32 re-run it again. This 'cant modify frozen string'-issue can not be resolved by
     33 applying the lines to multipart.rb mentioned in the FAQ.
     34 
     35 Best regards
     36 
     37 ----------
     38 messages: 222
     39 nosy: anonymous
     40 priority: bug
     41 ruby_version: 1.9.1_p378
     42 status: unread
     43 sup_version: 0.11
     44 title: `force_encoding': can't modify frozen string (RuntimeError) - On first start
     45 
     46 _________________________________________
     47 Sup issue tracker <sup-bugs at masanjin.net>
     48 <http://masanjin.net/sup-bugs/issue98>
     49 _________________________________________
     50 
     51 From sup-bugs@masanjin.net  Thu May  6 10:14:49 2010
     52 From: sup-bugs@masanjin.net (Ben Walton)
     53 Date: Thu, 06 May 2010 14:14:49 +0000
     54 Subject: [sup-devel] [issue99] persistent crash with "wrong id called on nil"
     55 In-Reply-To: <1273155288.81.0.0378934243374.issue99@masanjin.net>
     56 Message-ID: <1273155288.81.0.0378934243374.issue99@masanjin.net>
     57 
     58 
     59 New submission from Ben Walton <bwalton at artsci.utoronto.ca>:
     60 
     61 This one is driving me nuts.  I'm not able to determine which message 
     62 (threadset) causes it yet.  Sometimes I can run for a few minutes, view 
     63 messages, etc.  The next time, sup crashes almost immediately after startup.
     64 
     65 This started with a crash last night (random after running for days).  I 
     66 couldn't get sup to restart.  I ended up hosing my index...I've now rebuilt it 
     67 and while I can run sup again, the crashes continue.
     68 
     69 Ideas?  This is going to be long day...
     70 
     71 Thanks
     72 -Ben
     73 
     74 --- RuntimeError from thread: load threads for thread-index-mode                
     75 wrong id called on nil
     76 ./sup.rb:17:in `id'
     77 ./sup/modes/thread-index-mode.rb:234:in `update'
     78 ./sup/hook.rb:123:in `sort_by'
     79 ./sup/modes/thread-index-mode.rb:234:in `each'
     80 ./sup/modes/thread-index-mode.rb:234:in `sort_by'
     81 ./sup/modes/thread-index-mode.rb:234:in `update'
     82 ./sup/modes/thread-index-mode.rb:232:in `synchronize'
     83 ./sup/modes/thread-index-mode.rb:232:in `update'
     84 ./sup/modes/thread-index-mode.rb:652:in `__unprotected_load_n_threads'
     85 (eval):12:in `load_n_threads'
     86 ./sup/modes/thread-index-mode.rb:624:in `load_n_threads_background'
     87 ./sup.rb:77:in `reporting_thread'
     88 ./sup.rb:75:in `initialize'
     89 ./sup.rb:75:in `new'
     90 ./sup.rb:75:in `reporting_thread'
     91 ./sup/modes/thread-index-mode.rb:623:in `load_n_threads_background'
     92 ./sup/modes/thread-index-mode.rb:694:in `__unprotected_load_threads'
     93 (eval):12:in `load_threads'
     94 ./sup/modes/thread-index-mode.rb:89:in `initialize'
     95 ./sup/modes/line-cursor-mode.rb:22:in `call'
     96 ./sup/modes/line-cursor-mode.rb:22:in `initialize'
     97 ./sup/modes/line-cursor-mode.rb:22:in `each'
     98 ./sup/modes/line-cursor-mode.rb:22:in `initialize'
     99 ./sup/modes/line-cursor-mode.rb:19:in `new'
    100 ./sup/modes/line-cursor-mode.rb:19:in `initialize'
    101 ./sup/modes/thread-index-mode.rb:60:in `initialize'
    102 ./sup/modes/inbox-mode.rb:14:in `initialize'
    103 ../bin/sup:193:in `new'
    104 ../bin/sup:193
    105 
    106 ----------
    107 messages: 223
    108 nosy: bwalton
    109 priority: bug
    110 ruby_version: 1.8.5
    111 status: unread
    112 sup_version: next
    113 title: persistent crash with "wrong id called on nil"
    114 
    115 _________________________________________
    116 Sup issue tracker <sup-bugs at masanjin.net>
    117 <http://masanjin.net/sup-bugs/issue99>
    118 _________________________________________
    119 
    120 From snaipperi@gmail.com  Thu May  6 14:02:46 2010
    121 From: snaipperi@gmail.com (Matti Eiden)
    122 Date: Thu, 6 May 2010 21:02:46 +0300
    123 Subject: [sup-devel] Arch utf8 vs UTF-8 fix and wide character support
    124 In-Reply-To: <y2j6242182a1005061059w5e32fb54vd10ccfd7e4a1911e@mail.gmail.com>
    125 References: <y2j6242182a1005061059w5e32fb54vd10ccfd7e4a1911e@mail.gmail.com>
    126 Message-ID: <p2s6242182a1005061102ree7fa042jb595f0a2e7b443cc@mail.gmail.com>
    127 
    128 Hey folks,
    129 
    130 I've been experimenting with sup for the past few days, and of course,
    131 I love it. Firstly I had some trouble with getting unicode display
    132 going. This problem was already described in an old post on this
    133 mailing list:
    134 
    135 http://rubyforge.org/pipermail/sup-devel/2010-March/000522.html
    136 
    137 So Arch Linux defines encoding as utf8, but Iconv requires it to be
    138 UTF-8. I would say this is a bug in Arch Linux for not following
    139 standards, but anyway, I fixed it with the little modification to
    140 sup.rb:
    141 
    142 ## determine encoding and character set
    143 $encoding = Locale.current.charset
    144 $encoding = "UTF-8" if $encoding == "utf8"
    145 
    146 
    147 
    148 Then about wide character support. And I mean really wide. Like CJK
    149 characters. Scandics (?,?,?) and other European accent characters work
    150 nicely, as we all who are concerned probably know. These characters
    151 have a byte length of 2 and unicode length of 1.
    152 
    153 However, take an example of the following two-character Korean word
    154 (byte length of such single character is 3 instead of 2!)
    155 
    156 http://www.kotiposti.net/eiden/soulbound/hellovim.png (looking good in vim)
    157 http://www.kotiposti.net/eiden/soulbound/hellosup.png (sup lost 2
    158 characters (or bytes) from the line that has the Korean word)
    159 
    160 It seems that for every Korean character with a byte length of 3, one
    161 byte is lost from the end of the line. In the above example, two bytes
    162 are missing in sup, as there are two Korean characters on the same
    163 line.
    164 
    165 If the line consist of a single Korean character, nothing appears in
    166 sup (last byte out of three is missing?).
    167 If the line consist of two Korean characters, last character is
    168 missing (last two bytes out of six are missing?).
    169 etc.
    170 
    171 Some sort of miscalculation somewhere is causing this, perhaps
    172 assuming that unicode characters always have a byte length of 2? Can
    173 anybody with Ruby skills take a look on this?
    174 
    175 Thanks,
    176 Matti
    177 
    178 From rlane@club.cc.cmu.edu  Fri May  7 12:46:20 2010
    179 From: rlane@club.cc.cmu.edu (Rich Lane)
    180 Date: Fri, 07 May 2010 12:46:20 -0400
    181 Subject: [sup-devel] Arch utf8 vs UTF-8 fix and wide character support
    182 In-Reply-To: <p2s6242182a1005061102ree7fa042jb595f0a2e7b443cc@mail.gmail.com>
    183 References: <y2j6242182a1005061059w5e32fb54vd10ccfd7e4a1911e@mail.gmail.com>
    184 	<p2s6242182a1005061102ree7fa042jb595f0a2e7b443cc@mail.gmail.com>
    185 Message-ID: <1273250528-sup-9662@zyrg.net>
    186 
    187 Excerpts from Matti Eiden's message of 2010-05-06 14:02:46 -0400:
    188 > Hey folks,
    189 > 
    190 > I've been experimenting with sup for the past few days, and of course,
    191 > I love it. Firstly I had some trouble with getting unicode display
    192 > going. This problem was already described in an old post on this
    193 > mailing list:
    194 > 
    195 > http://rubyforge.org/pipermail/sup-devel/2010-March/000522.html
    196 > 
    197 > So Arch Linux defines encoding as utf8, but Iconv requires it to be
    198 > UTF-8. I would say this is a bug in Arch Linux for not following
    199 > standards, but anyway, I fixed it with the little modification to
    200 > sup.rb:
    201 > 
    202 > ## determine encoding and character set
    203 > $encoding = Locale.current.charset
    204 > $encoding = "UTF-8" if $encoding == "utf8"
    205 
    206 I've applied this fix, thanks.
    207 
    208 > Then about wide character support. And I mean really wide. Like CJK
    209 > characters. Scandics (?,?,?) and other European accent characters work
    210 > nicely, as we all who are concerned probably know. These characters
    211 > have a byte length of 2 and unicode length of 1.
    212 > 
    213 > However, take an example of the following two-character Korean word
    214 > (byte length of such single character is 3 instead of 2!)
    215 > 
    216 > http://www.kotiposti.net/eiden/soulbound/hellovim.png (looking good in vim)
    217 > http://www.kotiposti.net/eiden/soulbound/hellosup.png (sup lost 2
    218 > characters (or bytes) from the line that has the Korean word)
    219 > 
    220 > It seems that for every Korean character with a byte length of 3, one
    221 > byte is lost from the end of the line. In the above example, two bytes
    222 > are missing in sup, as there are two Korean characters on the same
    223 > line.
    224 > 
    225 > If the line consist of a single Korean character, nothing appears in
    226 > sup (last byte out of three is missing?).
    227 > If the line consist of two Korean characters, last character is
    228 > missing (last two bytes out of six are missing?).
    229 > etc.
    230 > 
    231 > Some sort of miscalculation somewhere is causing this, perhaps
    232 > assuming that unicode characters always have a byte length of 2? Can
    233 > anybody with Ruby skills take a look on this?
    234 
    235 It's actually the multiple screen cells that causes problems, not
    236 multiple bytes [1]. Sup currently thinks all characters are 1 cell wide.
    237 The right thing is probably a C extension that uses wcswidth.
    238 
    239 [1] http://mid.gmane.org/1264629880-sup-9232%40zyrg.net
    240 
    241 From michael+sup@stapelberg.de  Fri May  7 14:55:28 2010
    242 From: michael+sup@stapelberg.de (Michael Stapelberg)
    243 Date: Fri, 07 May 2010 20:55:28 +0200
    244 Subject: [sup-devel] [PATCH] Overwrite line contents before drawing the new
    245 	contents (instead of filling up the rest)
    246 Message-ID: <1273258431-sup-4976@midna.zekjur.net>
    247 
    248 Hi,
    249 
    250 quote from the commit message:
    251 
    252   Overwrite line contents before drawing the new contents (instead of filling
    253   up the rest)
    254   
    255   This fixes display problems of mails with tab characters in it, like
    256   "foo\n\tbar"
    257 
    258 The problem was that \t is one character but will be displayed as multiple
    259 characters, so that the filling started too early and overwrote valid content
    260 of the line (the "bar" is not visible).
    261 
    262 Best regards,
    263 Michael
    264 -------------- next part --------------
    265 A non-text attachment was scrubbed...
    266 Name: 0001-Overwrite-line-contents-before-drawing-the-new-conte.patch
    267 Type: application/octet-stream
    268 Size: 1220 bytes
    269 Desc: not available
    270 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100507/2e9615fd/attachment.obj>
    271 
    272 From sup-bugs@masanjin.net  Fri May  7 23:18:27 2010
    273 From: sup-bugs@masanjin.net (Todd Eisenberger)
    274 Date: Sat, 08 May 2010 03:18:27 +0000
    275 Subject: [sup-devel] [issue100] GPG Signing Bug
    276 In-Reply-To: <1273288706.87.0.318581427994.issue100@masanjin.net>
    277 Message-ID: <1273288706.87.0.318581427994.issue100@masanjin.net>
    278 
    279 
    280 New submission from Todd Eisenberger <teisenbe at andrew.cmu.edu>:
    281 
    282 After having a few messages fail verification on the recipient end, I discovered 
    283 that sup is not compliant with the RFC for signing email with PGP/GPG.  RFC2015 
    284 section 3 indicates that signed messages must be sent in a 7-bit format such as 
    285 base64 or quoted-printable.  Attached is a patch to provide compliance by 
    286 converting to base64 when crypto is used.  Note: I am unfamiliar with the code 
    287 base, so it is possible this patch is not correct.
    288 
    289 ----------
    290 files: gpg.patch
    291 messages: 227
    292 nosy: teisenbe
    293 priority: bug
    294 ruby_version: 1.8.7
    295 status: unread
    296 sup_version: git
    297 title: GPG Signing Bug
    298 
    299 _________________________________________
    300 Sup issue tracker <sup-bugs at masanjin.net>
    301 <http://masanjin.net/sup-bugs/issue100>
    302 _________________________________________
    303 -------------- next part --------------
    304 A non-text attachment was scrubbed...
    305 Name: gpg.patch
    306 Type: text/x-patch
    307 Size: 881 bytes
    308 Desc: not available
    309 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100508/a894fb45/attachment.bin>
    310 
    311 From rlane@club.cc.cmu.edu  Tue May 11 00:18:46 2010
    312 From: rlane@club.cc.cmu.edu (Rich Lane)
    313 Date: Tue, 11 May 2010 00:18:46 -0400
    314 Subject: [sup-devel] [issue100] GPG Signing Bug
    315 In-Reply-To: <1273288706.87.0.318581427994.issue100@masanjin.net>
    316 References: <1273288706.87.0.318581427994.issue100@masanjin.net>
    317 Message-ID: <1273551419-sup-9803@zyrg.net>
    318 
    319 Excerpts from Todd Eisenberger's message of 2010-05-07 23:18:27 -0400:
    320 > After having a few messages fail verification on the recipient end, I discovered 
    321 > that sup is not compliant with the RFC for signing email with PGP/GPG.  RFC2015 
    322 > section 3 indicates that signed messages must be sent in a 7-bit format such as 
    323 > base64 or quoted-printable.  Attached is a patch to provide compliance by 
    324 > converting to base64 when crypto is used.  Note: I am unfamiliar with the code 
    325 > base, so it is possible this patch is not correct.
    326 
    327 Thanks, applied to master.
    328 
    329 From snaipperi@gmail.com  Tue May 11 14:50:17 2010
    330 From: snaipperi@gmail.com (Matti Eiden)
    331 Date: Tue, 11 May 2010 21:50:17 +0300
    332 Subject: [sup-devel] Arch utf8 vs UTF-8 fix and wide character support
    333 In-Reply-To: <1273250528-sup-9662@zyrg.net>
    334 References: <y2j6242182a1005061059w5e32fb54vd10ccfd7e4a1911e@mail.gmail.com>
    335 	<p2s6242182a1005061102ree7fa042jb595f0a2e7b443cc@mail.gmail.com>
    336 	<1273250528-sup-9662@zyrg.net>
    337 Message-ID: <k2l6242182a1005111150n1b018aanf8a939e1d260b59a@mail.gmail.com>
    338 
    339 >
    340 > It's actually the multiple screen cells that causes problems, not
    341 > multiple bytes [1]. Sup currently thinks all characters are 1 cell wide.
    342 > The right thing is probably a C extension that uses wcswidth.
    343 >
    344 > [1] http://mid.gmane.org/1264629880-sup-9232%40zyrg.net
    345 >
    346 
    347 So okay, I sent my previous answer accidentally only to Rich. In this
    348 mail I mentioned a Ruby library called terminfo (
    349 http://www.a-k-r.org/ruby-terminfo/ ), which contains a function
    350 wcswidth.
    351 
    352 I downloaded terminfo and installed it, and edited lib/sup/util.rb slightly.
    353 1) Added of course "require 'terminfo'" on the top.
    354 2) Modified the display_length function of "nasty multibyte hack" to
    355 use TermInfo.wcswidth instead of native "size"
    356 
    357 
    358 Results: Everything seems to work now.
    359 
    360 I don't know what is the opinion of other sup users, whether adding a
    361 new dependency (to terminfo) is desirable, as the current list of
    362 dependencies is already rather high.. Discuss. If somebody with some C
    363 skills knows how to move that wcswidth function to the ruby-ncursesw
    364 (Rich? :D) would that be a more favourable option?
    365 
    366 Here's the actual patch of what I did to keep it clear (I notice there
    367 has been an earlier utf8 patch here, for pre Ruby 1.9.1 versions. I
    368 don't know how many of you use some earlier Ruby version still, of
    369 course this would also solve the "nasty" utf scan patch.):
    370 
    371 --- util-old.rb	2010-05-11 21:38:55.736596584 +0300
    372 +++ util.rb	2010-05-11 21:36:12.653281044 +0300
    373 @@ -3,6 +3,7 @@
    374  require 'mime/types'
    375  require 'pathname'
    376  require 'set'
    377 +require 'terminfo'
    378  ## time for some monkeypatching!
    379  class Lockfile
    380    def gen_lock_id
    381 @@ -183,7 +184,7 @@
    382      if RUBY_VERSION < '1.9.1' && ($encoding == "UTF-8" || $encoding == "utf8")
    383        scan(/./u).size
    384      else
    385 -      size
    386 +      TermInfo.wcswidth(self)
    387      end
    388    end
    389 
    390 From wmorgan-sup@masanjin.net  Tue May 11 15:19:43 2010
    391 From: wmorgan-sup@masanjin.net (William Morgan)
    392 Date: Tue, 11 May 2010 15:19:43 -0400
    393 Subject: [sup-devel] Arch utf8 vs UTF-8 fix and wide character support
    394 In-Reply-To: <k2l6242182a1005111150n1b018aanf8a939e1d260b59a@mail.gmail.com>
    395 References: <y2j6242182a1005061059w5e32fb54vd10ccfd7e4a1911e@mail.gmail.com>
    396 	<p2s6242182a1005061102ree7fa042jb595f0a2e7b443cc@mail.gmail.com>
    397 	<1273250528-sup-9662@zyrg.net>
    398 	<k2l6242182a1005111150n1b018aanf8a939e1d260b59a@mail.gmail.com>
    399 Message-ID: <1273605454-sup-2267@masanjin.net>
    400 
    401 Reformatted excerpts from Matti Eiden's message of 2010-05-11:
    402 > I don't know what is the opinion of other sup users, whether adding a
    403 > new dependency (to terminfo) is desirable, as the current list of
    404 > dependencies is already rather high.
    405 
    406 I'm working on a gem that provides both wcswidth functionality and the
    407 ability to slice a string at specific display widths, both of which, I
    408 think, will be required to function entirely.
    409 
    410 You can try it with 'gem install console'. It's 1.9-only for now.
    411 -- 
    412 William <wmorgan-sup at masanjin.net>
    413 
    414 From snaipperi@gmail.com  Tue May 11 17:51:20 2010
    415 From: snaipperi@gmail.com (Matti Eiden)
    416 Date: Wed, 12 May 2010 00:51:20 +0300
    417 Subject: [sup-devel] Arch utf8 vs UTF-8 fix and wide character support
    418 In-Reply-To: <1273605454-sup-2267@masanjin.net>
    419 References: <y2j6242182a1005061059w5e32fb54vd10ccfd7e4a1911e@mail.gmail.com>
    420 	<p2s6242182a1005061102ree7fa042jb595f0a2e7b443cc@mail.gmail.com>
    421 	<1273250528-sup-9662@zyrg.net>
    422 	<k2l6242182a1005111150n1b018aanf8a939e1d260b59a@mail.gmail.com>
    423 	<1273605454-sup-2267@masanjin.net>
    424 Message-ID: <t2s6242182a1005111451uc2781ca0rcd97dbf6d3146684@mail.gmail.com>
    425 
    426 Oh right, splitting. Yes right, makes sense. I tried your
    427 console/string, seems good, except the display_split ignores the
    428 padding request? Or did I understand this feature wrongly? I mean, it
    429 slices the string exactly where the end offset is, not by the nearest
    430 " ", space?
    431 
    432 Well anyway, I showed it inside sup, seems to be working nicely.
    433 
    434 Here's what I did to get it to work, if anybody's interested. I'm in a
    435 rush to work, so there may be mistakes. I tried to check that
    436 everything works.
    437 
    438 Summary:
    439 - buffer.rb is patched to slice all strings according to @width, this
    440 fixes issues in inbox-mode when email subjects have wide characters.
    441 Old "hacks" were removed.
    442 - utils.rb is patched to wrap using display_slice and then looking for
    443 nearest space. if no space is found, it uses simply the original
    444 output of display_slice. display_length function defaults to the
    445 display_width
    446 
    447 With quick testing for resizing the window with different kind of test
    448 emails, I see no lost characters or text corruption.
    449 
    450 
    451 Nice, thanks.
    452 -------------- next part --------------
    453 A non-text attachment was scrubbed...
    454 Name: console-sup-buffer.patch
    455 Type: text/x-patch
    456 Size: 754 bytes
    457 Desc: not available
    458 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100512/57b1f6dd/attachment-0002.bin>
    459 -------------- next part --------------
    460 A non-text attachment was scrubbed...
    461 Name: console-sup-util.patch
    462 Type: text/x-patch
    463 Size: 1449 bytes
    464 Desc: not available
    465 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100512/57b1f6dd/attachment-0003.bin>
    466 
    467 From bwalton@cquest.utoronto.ca  Tue May 11 20:28:34 2010
    468 From: bwalton@cquest.utoronto.ca (Ben Walton)
    469 Date: Tue, 11 May 2010 20:28:34 -0400
    470 Subject: [sup-devel] Toggling usual status of sources
    471 Message-ID: <4BE9F632.3020108@cquest.utoronto.ca>
    472 
    473 Hi All,
    474 
    475 I'm looking to redefine my mail storage and want to implement a somewhat 
    476 unorthodox hook[1].  I want to dynamically add new sources to sup while 
    477 sup is running using the after-poll hook.
    478 
    479 So far, I've succeeded in adding a source with the following:
    480 
    481 --snip--
    482 u = "maildir:/u/bwalton/Maildir/.test2/"
    483 
    484 unless Redwood::SourceManager.source_for(u)
    485    Redwood::Logger.force_message "test2 not setup yet." 
    486 
    487    Redwood::SourceManager.add_source 
    488 Recoverable.new(Redwood::Maildir.new(u)) un\
    489 less Redwood::SourceManager.source_for(u)
    490 end
    491 --snip--
    492 
    493 (Sorry about the wrapping...Thunderbird is driving me nuts.)
    494 
    495 Now, what I really want to do is something like:
    496 
    497 --snip--
    498 d = Date.today
    499 s = "maildir:/u/bwalton/Maildir/.incoming.#{d.year}.#{d.strftime('%m')}"
    500 
    501 unless Redwood::SourceManager.source_for(s)
    502    # determine currently 'primary' source (decrement month,
    503    # possibly wrap month to 12 and decrement year)
    504    #add source
    505    #toggle usual status on previous source
    506 end
    507 --snip--
    508 
    509 I don't see a way, currently, to toggle that flag.  Would there be 
    510 objections to adding support for that?  Is what I'm proposing _too_ nuts?
    511 
    512 I already have my procmail recipe delivering into the 
    513 .incoming.$year.$month folders and have given up filing individual lists 
    514 into separate folders...With a good before-add-message hook, I can give 
    515 up on assigning labels based on folders and just have monthly mailboxes 
    516 that are added automatically. :)
    517 
    518 Thoughts?
    519 
    520 Thanks
    521 -Ben
    522 
    523 [1] This is along the lines of my 'patterned/dynamic source' idea that I 
    524 briefly described a few nights back, but I think that was eaten...
    525 
    526 From tero@tilus.net  Wed May 12 00:44:29 2010
    527 From: tero@tilus.net (Tero Tilus)
    528 Date: Wed, 12 May 2010 07:44:29 +0300
    529 Subject: [sup-devel] Toggling usual status of sources
    530 In-Reply-To: <4BE9F632.3020108@cquest.utoronto.ca>
    531 References: <4BE9F632.3020108@cquest.utoronto.ca>
    532 Message-ID: <1273637602-sup-1446@tilus.net>
    533 
    534 Ben Walton, 2010-05-12 03:28:
    535 >    #toggle usual status on previous source
    536 > [...]
    537 > I don't see a way, currently, to toggle that flag.  Would there be
    538 > objections to adding support for that?  Is what I'm proposing _too_
    539 > nuts?
    540 
    541 Not at all.  If you do that, I'll switch to rotating inbox.
    542 
    543 > [1] This is along the lines of my 'patterned/dynamic source' idea
    544 > that I briefly described a few nights back, but I think that was
    545 > eaten...
    546 
    547 Patterned/dynamic/recursive sources are in my todo-list.  Haven't got
    548 around implementing it yet.  Gave it some thought though.  Did you
    549 consider them "virtual" (as in bunch of "physical" maildir/mbox stores
    550 made transparently look like one source) or "meta" (as in template
    551 source which sup uses to generate a set of "physical" sources)?  Which
    552 one would be better?
    553 
    554 I think rotating inbox would pretty clean to implement using either
    555 "virtual" or "meta" source.  If either of them ever got implemented.
    556 
    557 -- 
    558 Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
    559 
    560 From wmorgan-sup@masanjin.net  Thu May 13 08:33:50 2010
    561 From: wmorgan-sup@masanjin.net (William Morgan)
    562 Date: Thu, 13 May 2010 08:33:50 -0400
    563 Subject: [sup-devel] Arch utf8 vs UTF-8 fix and wide character support
    564 In-Reply-To: <t2s6242182a1005111451uc2781ca0rcd97dbf6d3146684@mail.gmail.com>
    565 References: <y2j6242182a1005061059w5e32fb54vd10ccfd7e4a1911e@mail.gmail.com>
    566 	<p2s6242182a1005061102ree7fa042jb595f0a2e7b443cc@mail.gmail.com>
    567 	<1273250528-sup-9662@zyrg.net>
    568 	<k2l6242182a1005111150n1b018aanf8a939e1d260b59a@mail.gmail.com>
    569 	<1273605454-sup-2267@masanjin.net>
    570 	<t2s6242182a1005111451uc2781ca0rcd97dbf6d3146684@mail.gmail.com>
    571 Message-ID: <1273753871-sup-7238@masanjin.net>
    572 
    573 Reformatted excerpts from Matti Eiden's message of 2010-05-11:
    574 > Oh right, splitting. Yes right, makes sense. I tried your
    575 > console/string, seems good, except the display_split ignores the
    576 > padding request? Or did I understand this feature wrongly? I mean, it
    577 > slices the string exactly where the end offset is, not by the nearest
    578 > " ", space?
    579 
    580 The padding only comes into play when you ask it to slice a string in
    581 the middle of a multi-column character. It will then pad the
    582 left/right/both ends of the string to make the total display width of
    583 the returned string what you asked for.
    584 
    585 > With quick testing for resizing the window with different kind of test
    586 > emails, I see no lost characters or text corruption.
    587 
    588 Awesome. I'll see what I can do about 1.8-compatibility.
    589 -- 
    590 William <wmorgan-sup at masanjin.net>
    591 
    592 From bwalton@artsci.utoronto.ca  Thu May 13 10:15:06 2010
    593 From: bwalton@artsci.utoronto.ca (Ben Walton)
    594 Date: Thu, 13 May 2010 10:15:06 -0400
    595 Subject: [sup-devel] Toggling usual status of sources
    596 In-Reply-To: <1273637602-sup-1446@tilus.net>
    597 References: <4BE9F632.3020108@cquest.utoronto.ca>
    598 	<1273637602-sup-1446@tilus.net>
    599 Message-ID: <1273759958-sup-326@pinkfloyd.chass.utoronto.ca>
    600 
    601 Excerpts from Tero Tilus's message of Wed May 12 00:44:29 -0400 2010:
    602 
    603 > Not at all.  If you do that, I'll switch to rotating inbox.
    604 
    605 Cool!
    606 
    607 > > [1] This is along the lines of my 'patterned/dynamic source' idea
    608 > > that I briefly described a few nights back, but I think that was
    609 > > eaten...
    610 > 
    611 > Patterned/dynamic/recursive sources are in my todo-list.  Haven't
    612 > got around implementing it yet.  Gave it some thought though.  Did
    613 > you consider them "virtual" (as in bunch of "physical" maildir/mbox
    614 > stores made transparently look like one source) or "meta" (as in
    615 > template source which sup uses to generate a set of "physical"
    616 > sources)?  Which one would be better?
    617 
    618 I was thinking meta, but virtual is interesting too.  I _think_ that
    619 meta would be easier to implement given the current code structure.  I
    620 also think having each of the 'dynamic' sources listed explicitly in
    621 sources.yaml has some merit.
    622 
    623 Thanks
    624 -Ben
    625 -- 
    626 Ben Walton
    627 Systems Programmer - CHASS
    628 University of Toronto
    629 C:416.407.5610 | W:416.978.4302
    630 
    631 
    632 From bwalton@artsci.utoronto.ca  Thu May 13 21:08:05 2010
    633 From: bwalton@artsci.utoronto.ca (Ben Walton)
    634 Date: Thu, 13 May 2010 21:08:05 -0400
    635 Subject: [sup-devel] [PATCH] Fix 1.9-ism use of Array.count
    636 Message-ID: <1273799285-31140-1-git-send-email-bwalton@artsci.utoronto.ca>
    637 
    638 Use the size method of array rather than the 1.9 specific count in
    639 message body parsing.
    640 
    641 Signed-off-by: Ben Walton <bwalton at artsci.utoronto.ca>
    642 ---
    643  lib/sup/message.rb |    2 +-
    644  1 files changed, 1 insertions(+), 1 deletions(-)
    645 
    646 diff --git a/lib/sup/message.rb b/lib/sup/message.rb
    647 index 0bda5b1..521f00f 100644
    648 --- a/lib/sup/message.rb
    649 +++ b/lib/sup/message.rb
    650 @@ -554,7 +554,7 @@ private
    651  
    652        sig = lines.between(GPG_SIGNED_START, GPG_SIG_END)
    653        payload = RMail::Message.new
    654 -      payload.body = sig[1, sig.count-2].join("\n")
    655 +      payload.body = sig[1, sig.size-2].join("\n")
    656        return [CryptoManager.verify(nil, msg, false), message_to_chunks(payload)].flatten.compact
    657      end
    658  
    659 -- 
    660 1.7.0
    661 
    662 
    663 From rlane@club.cc.cmu.edu  Thu May 13 21:58:47 2010
    664 From: rlane@club.cc.cmu.edu (Rich Lane)
    665 Date: Thu, 13 May 2010 21:58:47 -0400
    666 Subject: [sup-devel] [PATCH] Overwrite line contents before drawing the
    667 	new contents (instead of filling up the rest)
    668 In-Reply-To: <1273258431-sup-4976@midna.zekjur.net>
    669 References: <1273258431-sup-4976@midna.zekjur.net>
    670 Message-ID: <1273680127-sup-8786@zyrg.net>
    671 
    672 Excerpts from Michael Stapelberg's message of 2010-05-07 14:55:28 -0400:
    673 > Hi,
    674 > 
    675 > quote from the commit message:
    676 > 
    677 >   Overwrite line contents before drawing the new contents (instead of filling
    678 >   up the rest)
    679 >   
    680 >   This fixes display problems of mails with tab characters in it, like
    681 >   "foo\n\tbar"
    682 > 
    683 > The problem was that \t is one character but will be displayed as multiple
    684 > characters, so that the filling started too early and overwrote valid content
    685 > of the line (the "bar" is not visible).
    686 > 
    687 > Best regards,
    688 > Michael
    689 
    690 Applied to master.
    691 
    692 From rlane@club.cc.cmu.edu  Thu May 13 22:32:10 2010
    693 From: rlane@club.cc.cmu.edu (Rich Lane)
    694 Date: Thu, 13 May 2010 22:32:10 -0400
    695 Subject: [sup-devel] [PATCH] Fix 1.9-ism use of Array.count
    696 In-Reply-To: <1273799285-31140-1-git-send-email-bwalton@artsci.utoronto.ca>
    697 References: <1273799285-31140-1-git-send-email-bwalton@artsci.utoronto.ca>
    698 Message-ID: <1273804242-sup-3214@zyrg.net>
    699 
    700 Applied to inline-gpg and branch merged to master.
    701 
    702 From bwalton@artsci.utoronto.ca  Fri May 14 11:22:24 2010
    703 From: bwalton@artsci.utoronto.ca (Ben Walton)
    704 Date: Fri, 14 May 2010 11:22:24 -0400
    705 Subject: [sup-devel] [PATCH] Add global keybinding to clear all hooks
    706 Message-ID: <1273850544-16363-1-git-send-email-bwalton@artsci.utoronto.ca>
    707 
    708 When developing/tweaking hooks, it's inconvenient to use the console
    709 mode to run the clear hooks command.  Add a globally available key
    710 binding ('H') to trigger HookManager.clear.  As this is now more
    711 exposed in the UI, make HookManager flash a notice to the
    712 BufferManager indicating that it cleared the hooks.
    713 
    714 Signed-off-by: Ben Walton <bwalton at artsci.utoronto.ca>
    715 ---
    716  bin/sup         |    3 +++
    717  lib/sup/hook.rb |    2 +-
    718  2 files changed, 4 insertions(+), 1 deletions(-)
    719 
    720 diff --git a/bin/sup b/bin/sup
    721 index ef4092f..8638c78 100755
    722 --- a/bin/sup
    723 +++ b/bin/sup
    724 @@ -86,6 +86,7 @@ global_keymap = Keymap.new do |k|
    725    k.add :nothing, "Do nothing", :ctrl_g
    726    k.add :recall_draft, "Edit most recent draft message", 'R'
    727    k.add :show_inbox, "Show the Inbox buffer", 'I'
    728 +  k.add :clear_hooks, "Clear all hooks", 'H'
    729    k.add :show_console, "Show the Console buffer", '~'
    730  
    731    ## Submap for less often used keybindings
    732 @@ -330,6 +331,8 @@ begin
    733        end
    734      when :show_inbox
    735        BufferManager.raise_to_front ibuf
    736 +    when :clear_hooks
    737 +      HookManager.clear
    738      when :show_console
    739        b, new = bm.spawn_unless_exists("Console", :system => true) { ConsoleMode.new }
    740        b.mode.run
    741 diff --git a/lib/sup/hook.rb b/lib/sup/hook.rb
    742 index 08738cd..a2a39a5 100644
    743 --- a/lib/sup/hook.rb
    744 +++ b/lib/sup/hook.rb
    745 @@ -112,7 +112,7 @@ EOS
    746  
    747    def enabled? name; !hook_for(name).nil? end
    748  
    749 -  def clear; @hooks.clear; end
    750 +  def clear; @hooks.clear; BufferManager.flash "Hooks cleared" end
    751    def clear_one k; @hooks.delete k; end
    752  
    753  private
    754 -- 
    755 1.7.0
    756 
    757 
    758 From rlane@club.cc.cmu.edu  Fri May 14 12:05:41 2010
    759 From: rlane@club.cc.cmu.edu (Rich Lane)
    760 Date: Fri, 14 May 2010 12:05:41 -0400
    761 Subject: [sup-devel] [PATCH] Add global keybinding to clear all hooks
    762 In-Reply-To: <1273850544-16363-1-git-send-email-bwalton@artsci.utoronto.ca>
    763 References: <1273850544-16363-1-git-send-email-bwalton@artsci.utoronto.ca>
    764 Message-ID: <1273853116-sup-3498@zyrg.net>
    765 
    766 Applied to master.
    767 
    768 From bwalton@artsci.utoronto.ca  Sat May 15 14:45:21 2010
    769 From: bwalton@artsci.utoronto.ca (Ben Walton)
    770 Date: Sat, 15 May 2010 14:45:21 -0400
    771 Subject: [sup-devel] [PATCH] Allow toggle on Source.usual and Source.archived
    772 Message-ID: <1273949121-16731-1-git-send-email-bwalton@artsci.utoronto.ca>
    773 
    774 Allow sources to be more malleable by allowing for the modification of
    775 the usual and archived flags.  This is a first step toward patterned
    776 (meta) sources.  Initially, the patterning will be handled by one of
    777 the poll hooks, which will use the usual toggle when a 'new' source is
    778 added.  Later on, this may be handled internally for sources with a
    779 meta = true attribute (or something similar).
    780 
    781 Signed-off-by: Ben Walton <bwalton at artsci.utoronto.ca>
    782 ---
    783  lib/sup/source.rb |    3 ++-
    784  1 files changed, 2 insertions(+), 1 deletions(-)
    785 
    786 diff --git a/lib/sup/source.rb b/lib/sup/source.rb
    787 index 6fe7bfb..2f2e5df 100644
    788 --- a/lib/sup/source.rb
    789 +++ b/lib/sup/source.rb
    790 @@ -63,7 +63,8 @@ class Source
    791    ##
    792    ## dirty? means cur_offset has changed, so the source info needs to
    793    ## be re-saved to sources.yaml.
    794 -  bool_reader :usual, :archived, :dirty
    795 +  bool_reader :dirty
    796 +  bool_accessor :usual, :archived
    797    attr_reader :uri, :cur_offset
    798    attr_accessor :id
    799  
    800 -- 
    801 1.7.0
    802 
    803 
    804 From sup-bugs@masanjin.net  Mon May 24 12:30:06 2010
    805 From: sup-bugs@masanjin.net (wires)
    806 Date: Mon, 24 May 2010 16:30:06 +0000
    807 Subject: [sup-devel] [issue101] gem install fails on os x 10.6.3
    808 In-Reply-To: <1274718605.97.0.0811975060218.issue101@masanjin.net>
    809 Message-ID: <1274718605.97.0.0811975060218.issue101@masanjin.net>
    810 
    811 
    812 New submission from wires <jelle at defekt.nl>:
    813 
    814 I cannot seem to run sup:
    815 
    816 I've updated my gem system.
    817 
    818 $ sudo sudo gem update --system
    819 Updating RubyGems
    820 Updating rubygems-update
    821 Successfully installed rubygems-update-1.3.7
    822 Updating RubyGems to 1.3.7
    823 Installing RubyGems 1.3.7
    824 RubyGems 1.3.7 installed
    825 
    826 === 1.3.7 / 2010-05-13
    827 
    828 Installing sup seems to work
    829 
    830 $ sudo gem install sup
    831 Building native extensions.  This could take a while...
    832 Building native extensions.  This could take a while...
    833 Successfully installed xapian-full-1.1.3.4
    834 Successfully installed ncurses-0.9.1
    835 Successfully installed rmail-1.0.0
    836 Successfully installed highline-1.5.2
    837 Successfully installed net-ssh-2.0.22
    838 Successfully installed trollop-1.16.2
    839 Successfully installed lockfile-1.4.3
    840 Successfully installed mime-types-1.16
    841 Successfully installed locale-2.0.5
    842 Successfully installed gettext-2.1.0
    843 Successfully installed sup-0.11
    844 11 gems installed
    845 Installing ri documentation for xapian-full-1.1.3.4...
    846 Installing ri documentation for ncurses-0.9.1...
    847 Installing ri documentation for rmail-1.0.0...
    848 Installing ri documentation for highline-1.5.2...
    849 Installing ri documentation for net-ssh-2.0.22...
    850 Installing ri documentation for trollop-1.16.2...
    851 Installing ri documentation for lockfile-1.4.3...
    852 Installing ri documentation for mime-types-1.16...
    853 Installing ri documentation for locale-2.0.5...
    854 Installing ri documentation for gettext-2.1.0...
    855 Installing ri documentation for sup-0.11...
    856 Installing RDoc documentation for xapian-full-1.1.3.4...
    857 Installing RDoc documentation for ncurses-0.9.1...
    858 Installing RDoc documentation for rmail-1.0.0...
    859 Installing RDoc documentation for highline-1.5.2...
    860 Installing RDoc documentation for net-ssh-2.0.22...
    861 Installing RDoc documentation for trollop-1.16.2...
    862 Installing RDoc documentation for lockfile-1.4.3...
    863 Installing RDoc documentation for mime-types-1.16...
    864 Installing RDoc documentation for locale-2.0.5...
    865 Installing RDoc documentation for gettext-2.1.0...
    866 Installing RDoc documentation for sup-0.11...
    867 
    868 But running it fails:
    869 
    870 $ sup
    871 /opt/local/lib/ruby/gems/1.8/gems/xapian-full-1.1.3.4/lib/_xapian.bundle: 
    872 dlopen(/opt/local/lib/ruby/gems/1.8/gems/xapian-full-1.1.3.4/lib/_xapian.bundle, 
    873 9): Library not loaded: /usr/local/lib/libxapian-1.1.3.dylib (LoadError)
    874   Referenced from: /opt/local/lib/ruby/gems/1.8/gems/xapian-full-
    875 1.1.3.4/lib/_xapian.bundle
    876   Reason: image not found - /opt/local/lib/ruby/gems/1.8/gems/xapian-full-
    877 1.1.3.4/lib/_xapian.bundle
    878 	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
    879 `require'
    880 	from /opt/local/lib/ruby/gems/1.8/gems/xapian-full-
    881 1.1.3.4/lib/xapian.rb:41
    882 	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
    883 `gem_original_require'
    884 	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
    885 `require'
    886 	from /opt/local/lib/ruby/gems/1.8/gems/sup-0.11/lib/sup/index.rb:3
    887 	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
    888 `gem_original_require'
    889 	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
    890 `require'
    891 	from /opt/local/lib/ruby/gems/1.8/gems/sup-0.11/lib/sup.rb:316
    892 	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
    893 `gem_original_require'
    894 	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
    895 `require'
    896 	from /opt/local/lib/ruby/gems/1.8/gems/sup-0.11/bin/sup:15
    897 	from /opt/local/bin/sup:19:in `load'
    898 	from /opt/local/bin/sup:19
    899 
    900 These are the installed gems / versions
    901 
    902 $ gem list
    903 
    904 *** LOCAL GEMS ***
    905 
    906 gettext (2.1.0)
    907 highline (1.5.2)
    908 locale (2.0.5)
    909 lockfile (1.4.3)
    910 mime-types (1.16)
    911 ncurses (0.9.1)
    912 net-ssh (2.0.22)
    913 rmail (1.0.0)
    914 rubygems-update (1.3.7)
    915 sup (0.11)
    916 trollop (1.16.2)
    917 xapian-full (1.1.3.4)
    918 
    919 
    920 Any thoughts? Thanks :)
    921 
    922 ----------
    923 messages: 233
    924 nosy: wires
    925 priority: bug
    926 ruby_version: 1.8.7
    927 status: unread
    928 sup_version: 0.11
    929 title: gem install fails on os x 10.6.3
    930 
    931 _________________________________________
    932 Sup issue tracker <sup-bugs at masanjin.net>
    933 <http://masanjin.net/sup-bugs/issue101>
    934 _________________________________________
    935 
    936 From sup-bugs@masanjin.net  Mon May 24 12:54:51 2010
    937 From: sup-bugs@masanjin.net (anonymous)
    938 Date: Mon, 24 May 2010 16:54:51 +0000
    939 Subject: [sup-devel] [issue102] RuntimeError from thread: main
    940 In-Reply-To: <1274720091.21.0.757446456345.issue102@masanjin.net>
    941 Message-ID: <1274720091.21.0.757446456345.issue102@masanjin.net>
    942 
    943 
    944 New submission from anonymous:
    945 
    946 I just installed sup in Arch Linux using AUR [1]. When executing sup for first 
    947 time i get an error.
    948 
    949 The content of ~/.sup/exception-log.txt is:
    950 
    951 --- RuntimeError from thread: main
    952 can't modify frozen string
    953 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:53:in `force_encoding'
    954 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:53:in `block in 
    955 add_account'
    956 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:53:in `each'
    957 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:53:in `add_account'
    958 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:37:in `initialize'
    959 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/util.rb:574:in `new'
    960 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/util.rb:574:in `init'
    961 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup.rb:126:in `start'
    962 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/bin/sup:153:in `<module:Redwood>'
    963 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/bin/sup:68:in `<top (required)>'
    964 /usr/bin/sup:19:in `load'
    965 /usr/bin/sup:19:in `<main>'
    966 
    967 ----------
    968 messages: 234
    969 nosy: anonymous
    970 priority: bug
    971 ruby_version: ruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]
    972 status: unread
    973 sup_version: 0.11
    974 title: RuntimeError from thread: main
    975 
    976 _________________________________________
    977 Sup issue tracker <sup-bugs at masanjin.net>
    978 <http://masanjin.net/sup-bugs/issue102>
    979 _________________________________________
    980 
    981 From sup-bugs@masanjin.net  Tue May 25 13:18:01 2010
    982 From: sup-bugs@masanjin.net (anonymous)
    983 Date: Tue, 25 May 2010 17:18:01 +0000
    984 Subject: [sup-devel] [issue103] undefined method `has_label?' for
    985 	nil:NilClass
    986 In-Reply-To: <1274807881.68.0.551439031073.issue103@masanjin.net>
    987 Message-ID: <1274807881.68.0.551439031073.issue103@masanjin.net>
    988 
    989 
    990 New submission from anonymous:
    991 
    992 While reading a thread I encountered the following exception. I had used ",," (switch to next thread without archiving the current one) a few seconds before the crash. offlineimap was running, but inactive at the time of the crash.
    993 
    994 --- NoMethodError from thread: load messages for thread-view-mode
    995 undefined method `has_label?' for nil:NilClass
    996 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:833:in `text_for_thread_at'
    997 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:781:in `regen_text'
    998 /usr/lib/ruby/1.8/sup/util.rb:414:in `map_with_index'
    999 /usr/lib/ruby/1.8/sup/hook.rb:55:in `each_with_index'
   1000 /usr/lib/ruby/1.8/sup/util.rb:414:in `each'
   1001 /usr/lib/ruby/1.8/sup/util.rb:414:in `each_with_index'
   1002 /usr/lib/ruby/1.8/sup/util.rb:414:in `map_with_index'
   1003 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:781:in `regen_text'
   1004 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:242:in `update'
   1005 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:219:in `handle_spammed_update'
   1006 /usr/lib/ruby/1.8/sup/update.rb:26:in `send'
   1007 /usr/lib/ruby/1.8/sup/update.rb:26:in `relay'
   1008 /usr/lib/ruby/1.8/sup/update.rb:26:in `each'
   1009 /usr/lib/ruby/1.8/sup/update.rb:26:in `relay'
   1010 /usr/lib/ruby/1.8/sup/util.rb:570:in `send'
   1011 /usr/lib/ruby/1.8/sup/util.rb:570:in `method_missing'
   1012 /usr/lib/ruby/1.8/sup/modes/thread-view-mode.rb:560:in `spam_and_then'
   1013 /usr/lib/ruby/1.8/sup/modes/thread-view-mode.rb:600
   1014 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:129:in `call'
   1015 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:129:in `select'
   1016 /usr/lib/ruby/1.8/sup.rb:75:in `reporting_thread'
   1017 /usr/lib/ruby/1.8/sup.rb:73:in `initialize'
   1018 /usr/lib/ruby/1.8/sup.rb:73:in `new'
   1019 /usr/lib/ruby/1.8/sup.rb:73:in `reporting_thread'
   1020 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:109:in `select'
   1021 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:159:in `launch_another_thread'
   1022 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:141:in `launch_next_thread_after'
   1023 /usr/lib/ruby/1.8/sup/modes/thread-view-mode.rb:606:in `dispatch'
   1024 /usr/lib/ruby/1.8/sup/modes/thread-view-mode.rb:558:in `spam_and_then'
   1025 /usr/lib/ruby/1.8/sup/modes/thread-view-mode.rb:533:in `spam_and_next'
   1026 /usr/lib/ruby/1.8/sup/mode.rb:59:in `send'
   1027 /usr/lib/ruby/1.8/sup/mode.rb:59:in `handle_input'
   1028 /usr/lib/ruby/1.8/sup/buffer.rb:279:in `handle_input'
   1029 /usr/bin/sup-mail:277
   1030 
   1031 ----------
   1032 messages: 235
   1033 nosy: anonymous
   1034 priority: bug
   1035 ruby_version: 4.4 (Debian squeeze)
   1036 status: unread
   1037 sup_version: 0.11-2 (Debian squeeze)
   1038 title: undefined method `has_label?' for nil:NilClass
   1039 
   1040 _________________________________________
   1041 Sup issue tracker <sup-bugs at masanjin.net>
   1042 <http://masanjin.net/sup-bugs/issue103>
   1043 _________________________________________
   1044 
   1045 From wking@drexel.edu  Tue May 25 14:50:27 2010
   1046 From: wking@drexel.edu (W. Trevor King)
   1047 Date: Tue, 25 May 2010 14:50:27 -0400
   1048 Subject: [sup-devel] email threading - tree vs. graph
   1049 In-Reply-To: <1266730498-sup-78@tilus.net>
   1050 References: <20100218114943.GB911@mjolnir>
   1051  <1266730498-sup-78@tilus.net>
   1052 Message-ID: <20100525185026.GA11947@thialfi.home.net>
   1053 
   1054 On Sun, Feb 21, 2010 at 08:38:35AM +0200, Tero Tilus wrote:
   1055 > W. Trevor King, 2010-02-18 13:49:
   1056 > > Since email can have multiple parents [1], why does everyone make
   1057 > > threads trees rather than directed, acyclic graphs (DAGs)?
   1058 > > ...
   1059 > > On an implementation level, I've got the above graph browser going
   1060 > > in python/curses, so it should be easy to port to ruby/curses.
   1061 > 
   1062 > Have a pointer to code?
   1063 > 
   1064 > I would love to see sup being able to do something usefull with
   1065 > multiple parent messages.
   1066 
   1067 I got some good feedback from Nicolas Pouillard on the Python tidbit I
   1068 posted, but after waiting optimisticly for some enterprising Rubist to
   1069 port it to Ruby and merge it into Sup, I've finally taught myself
   1070 enough Ruby to do it myself ;).  Here's DAG-supporting Sup (+ a few
   1071 glaring documentation updates)
   1072 
   1073   http://www.physics.drexel.edu/~wking/code/git/git.php?p=sup.git
   1074 
   1075 I haven't done any benchmarking vs the tree-threading code, but if it
   1076 turns out to be too slow, we can always use:
   1077   if @graph_thread
   1078     ...general...code...
   1079   else
   1080     ...old...tree...code...
   1081   end
   1082 for bottleneck methods.
   1083 
   1084 We could also resurect the old indentation-style display in the thread
   1085 viewer, if people dislike my tig-style ascii graph.
   1086 
   1087 Cheers,
   1088 Trevor
   1089 
   1090 -- 
   1091 This email may be signed or encrypted with GPG (http://www.gnupg.org).
   1092 The GPG signature (if present) will be attached as 'signature.asc'.
   1093 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
   1094 
   1095 My public key is at http://www.physics.drexel.edu/~wking/pubkey.txt
   1096 -------------- next part --------------
   1097 A non-text attachment was scrubbed...
   1098 Name: not available
   1099 Type: application/pgp-signature
   1100 Size: 198 bytes
   1101 Desc: not available
   1102 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100525/2b2d676a/attachment.bin>
   1103 
   1104 From pi+sup@pihost.us  Wed May 26 17:48:12 2010
   1105 From: pi+sup@pihost.us (pi+sup at pihost.us)
   1106 Date: Wed, 26 May 2010 14:48:12 -0700
   1107 Subject: [sup-devel] [PATCH] Respect source.archived? in poll.
   1108 Message-ID: <1274910492-13206-1-git-send-email-pi+sup@pihost.us>
   1109 
   1110 From: Anthony Martinez <pi+sup at pihost.us>
   1111 
   1112 [14:31:51] <mtp> i have some sources marked as pre-archived, but it isn't obeying that
   1113 [14:38:02] <mtp> looks like 51789907cfcf80b5edb4d597c91a7c888ce5e003 broke it in the first hunk of lib/sup/poll.rb
   1114 
   1115 This appears to fix it.
   1116 ---
   1117  lib/sup/poll.rb |    1 +
   1118  1 files changed, 1 insertions(+), 0 deletions(-)
   1119 
   1120 diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb
   1121 index 20931f5..607d06a 100644
   1122 --- a/lib/sup/poll.rb
   1123 +++ b/lib/sup/poll.rb
   1124 @@ -158,6 +158,7 @@ EOS
   1125            m = Message.build_from_source source, args[:info]
   1126            old_m = Index.build_message m.id
   1127            m.labels += args[:labels]
   1128 +          m.labels.delete :inbox  if source.archived?
   1129            m.labels.delete :unread if source.read?
   1130            m.labels.delete :unread if m.source_marked_read? # preserve read status if possible
   1131            m.labels.each { |l| LabelManager << l }
   1132 -- 
   1133 1.6.6
   1134 
   1135 
   1136 From rlane@club.cc.cmu.edu  Wed May 26 23:31:04 2010
   1137 From: rlane@club.cc.cmu.edu (Rich Lane)
   1138 Date: Wed, 26 May 2010 23:31:04 -0400
   1139 Subject: [sup-devel] now in next: maildir and index version bump
   1140 Message-ID: <1274847527-sup-4673@zyrg.net>
   1141 
   1142 I've merged the maildir branch to next. These changes allow Sup to
   1143 handle maildirs where messages are being moved and deleted. There are
   1144 still some UI fixes I need to make to handle moved/deleted messages
   1145 smoothly, but I'm hoping that with the current code there aren't any
   1146 regressions.
   1147 
   1148 The maildir branch changes the how message locations are stored so
   1149 you'll have to do a full sync after upgrading. I've made sure of this by
   1150 incrementing the index version number. This is the first incompatible
   1151 index format change since switching to xapian, so I've taken the
   1152 opportunity to remove old compatibility code and make some improvements
   1153 to sup-dump. The sup-dump in next will work against any older
   1154 xapian-based index, so there's no need to downgrade to run it. It will
   1155 also work against newer index versions unless the basic structure
   1156 changes.
   1157 
   1158 From sup-bugs@masanjin.net  Fri May 28 06:57:33 2010
   1159 From: sup-bugs@masanjin.net (anonymous)
   1160 Date: Fri, 28 May 2010 10:57:33 +0000
   1161 Subject: [sup-devel] [issue104] Switching Reply To: discards the signature
   1162 In-Reply-To: <1275044253.64.0.816531245566.issue104@masanjin.net>
   1163 Message-ID: <1275044253.64.0.816531245566.issue104@masanjin.net>
   1164 
   1165 
   1166 New submission from anonymous:
   1167 
   1168 - hit 'r' (reply) in thread list mode or <enter> in thread-view-mode;
   1169 - highlight Reply To:
   1170 - change the option to anything else (even come back to Sender)
   1171 - the signature is gone
   1172 
   1173 ----------
   1174 messages: 239
   1175 nosy: anonymous
   1176 priority: bug
   1177 ruby_version: 1.8.7
   1178 status: unread
   1179 sup_version: master 6bc5fac5b9321acacce27a93f30e576d343b1ee5
   1180 title: Switching Reply To: discards the signature
   1181 
   1182 _________________________________________
   1183 Sup issue tracker <sup-bugs at masanjin.net>
   1184 <http://masanjin.net/sup-bugs/issue104>
   1185 _________________________________________
   1186 
   1187 From =?utf-8?q?=C3=81lvaro_Herrera_=3Csup-bugs=40masanjin=2Enet=3E?=  Fri May 28 22:31:27 2010
   1188 From: =?utf-8?q?=C3=81lvaro_Herrera_=3Csup-bugs=40masanjin=2Enet=3E?= (=?utf-8?q?=C3=81lvaro_Herrera_=3Csup-bugs=40masanjin=2Enet=3E?=)
   1189 Date: Sat, 29 May 2010 02:31:27 +0000
   1190 Subject: [sup-devel] [issue105] crash exception when viewing attachment with
   1191 	/s in filename
   1192 In-Reply-To: <1275100287.61.0.534667728298.issue105@masanjin.net>
   1193 Message-ID: <1275100287.61.0.534667728298.issue105@masanjin.net>
   1194 
   1195 
   1196 New submission from ??lvaro Herrera <alvherre at alvh.no-ip.org>:
   1197 
   1198 Got this exception today:
   1199 
   1200 --- RuntimeError from thread: main
   1201 cannot generate tempfile `/home/alvherre/tmp/13416-9-/pgpatches/regexp'
   1202 /usr/lib/ruby/1.8/tempfile.rb:52:in `initialize'
   1203 /usr/lib/ruby/1.8/sup/message-chunks.rb:152:in `new'
   1204 /usr/lib/ruby/1.8/sup/message-chunks.rb:152:in `write_to_disk'
   1205 /usr/lib/ruby/1.8/sup/message-chunks.rb:145:in `view!'
   1206 /usr/lib/ruby/1.8/sup/modes/thread-view-mode.rb:839:in `view'
   1207 /usr/lib/ruby/1.8/sup/modes/thread-view-mode.rb:341:in `activate_chunk'
   1208 /usr/lib/ruby/1.8/sup/mode.rb:59:in `send'
   1209 /usr/lib/ruby/1.8/sup/mode.rb:59:in `handle_input'
   1210 /usr/lib/ruby/1.8/sup/buffer.rb:279:in `handle_input'
   1211 /usr/bin/sup-mail:277
   1212 
   1213 The problem is that the attachment contains forward slashes in the filename, and 
   1214 this makes tempfile to raise an exception because it's expecting the directory 
   1215 to exist.
   1216 
   1217 Example message: http://archives.postgresql.org/msgtxt.php?
   1218 id=201005290201.o4T21bk04708 at momjian.us
   1219 
   1220 The attached patch (to 0.11) fixes the problem.
   1221 
   1222 ----------
   1223 files: msgchunks.patch
   1224 messages: 240
   1225 nosy: alvherre
   1226 priority: bug
   1227 ruby_version: 1.8
   1228 status: unread
   1229 sup_version: 0.11
   1230 title: crash exception when viewing attachment with /s in filename
   1231 
   1232 _________________________________________
   1233 Sup issue tracker <sup-bugs at masanjin.net>
   1234 <http://masanjin.net/sup-bugs/issue105>
   1235 _________________________________________
   1236 -------------- next part --------------
   1237 A non-text attachment was scrubbed...
   1238 Name: msgchunks.patch
   1239 Type: application/octet-stream
   1240 Size: 372 bytes
   1241 Desc: not available
   1242 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100529/d0662af1/attachment.obj>
   1243 
   1244 From sup-bugs@masanjin.net  Mon May 31 07:48:29 2010
   1245 From: sup-bugs@masanjin.net (anonymous)
   1246 Date: Mon, 31 May 2010 11:48:29 +0000
   1247 Subject: [sup-devel] [issue106] Crash with exception :undefined method 'ord'
   1248 In-Reply-To: <1275306509.64.0.734598838682.issue106@masanjin.net>
   1249 Message-ID: <1275306509.64.0.734598838682.issue106@masanjin.net>
   1250 
   1251 
   1252 New submission from anonymous:
   1253 
   1254 Crash.
   1255 Attached exception log.
   1256 
   1257 ----------
   1258 files: exception-log.txt
   1259 messages: 241
   1260 nosy: anonymous
   1261 priority: bug
   1262 ruby_version: ruby 1.8.6
   1263 status: unread
   1264 sup_version: 0.10
   1265 title: Crash with exception :undefined method 'ord'
   1266 
   1267 _________________________________________
   1268 Sup issue tracker <sup-bugs at masanjin.net>
   1269 <http://masanjin.net/sup-bugs/issue106>
   1270 _________________________________________
   1271 -------------- next part --------------
   1272 --- NoMethodError from thread: main
   1273 undefined method `ord' for 121:Fixnum
   1274 /usr/lib/ruby/gems/1.8/gems/sup-0.10/lib/sup/buffer.rb:648:in `ask_yes_or_no'
   1275 /usr/lib/ruby/gems/1.8/gems/sup-0.10/bin/sup:282
   1276 /usr/bin/sup:19:in `load'
   1277 /usr/bin/sup:19
   1278 
   1279 From bwalton@artsci.utoronto.ca  Mon May 31 16:48:37 2010
   1280 From: bwalton@artsci.utoronto.ca (Ben Walton)
   1281 Date: Mon, 31 May 2010 16:48:37 -0400
   1282 Subject: [sup-devel] [issue106] Crash with exception :undefined method
   1283 	'ord'
   1284 In-Reply-To: <1275306509.64.0.734598838682.issue106@masanjin.net>
   1285 References: <1275306509.64.0.734598838682.issue106@masanjin.net>
   1286 Message-ID: <1275338876-sup-2263@pinkfloyd.chass.utoronto.ca>
   1287 
   1288 Excerpts from anonymous's message of Mon May 31 07:48:29 -0400 2010:
   1289 
   1290 > --- NoMethodError from thread: main
   1291 > undefined method `ord' for 121:Fixnum
   1292 > /usr/lib/ruby/gems/1.8/gems/sup-0.10/lib/sup/buffer.rb:648:in `ask_yes_or_no'
   1293 > /usr/lib/ruby/gems/1.8/gems/sup-0.10/bin/sup:282
   1294 > /usr/bin/sup:19:in `load'
   1295 > /usr/bin/sup:19
   1296 
   1297 You're running a pretty old sup.  Try updating.  There was a bug fixed
   1298 related to this method some time ago.
   1299 
   1300 HTH.
   1301 -Ben
   1302 -- 
   1303 Ben Walton
   1304 Systems Programmer - CHASS
   1305 University of Toronto
   1306 C:416.407.5610 | W:416.978.4302
   1307 
   1308